@media (max-width: 1023px) {
  .desktop-only { display: none !important; }
  .tribe-directory-content { display: flex; flex-direction: column; }
  .tribe-mine { order: -1; }
  .tribe-mine:has(.tribe-shelf > p:only-child) { display: none; }
}

@media (min-width: 1024px) {
  :root {
    --social-pine: #173b31;
    --social-dark: #162c26;
    --social-text: #233b33;
    --social-muted: #4f625a;
    --social-paper: #f7f5ee;
    --social-line: #e2e3d9;
    --social-sun: #ffab80;
    --social-mint: #e2efe5;
    --social-lilac: #eee7f4;
    --social-page-width: min(calc(100% - clamp(2.6rem, 6vw, 8rem)), 88rem);
    --social-gap: clamp(1rem, 2.3vw, 2.2rem);
    --social-frame: 1.35rem;
  }
  body { background-color: var(--social-paper); }
  .social-page-shell :is(a, button, select, input, summary):focus-visible { outline: 2px solid #a84327; outline-offset: 3px; }
  .social-desktop-brand img { width: 47px; height: 47px; }
  .social-stage {
    width: var(--social-page-width); min-width: 0; max-width: none; min-height: 0; margin-inline: auto;
    padding: clamp(1.65rem, 3vw, 3.35rem) 0 4rem !important;
    background-color: transparent;
  }
  .social-stage h1, .social-stage h2, .social-form-page h1, .social-chat-room h1, .social-match-screen h1 {
    font-family: Inter, system-ui, sans-serif; letter-spacing: -.04em;
  }
  .social-stage h1, .social-form-page h1, .social-match-screen h1 { font-size: clamp(2rem, 3.65vw, 3.8rem); line-height: 1.05; font-weight: 800; overflow-wrap: anywhere; }
  .social-section-hero {
    min-height: 13.5rem; padding: clamp(1.35rem, 3.4vw, 3.1rem); border-radius: var(--social-frame);
    align-content: center; align-items: center; color: var(--social-dark);
  }
  .social-section-hero-outings { background: radial-gradient(ellipse at 98% 10%, #fff2bd 0%, transparent 56%), #f5ddca; }
  .social-section-hero-tickets { background: radial-gradient(ellipse at 94% 12%, #f5dff4, transparent 54%), var(--social-lilac); }
  .social-section-hero-trips { background: linear-gradient(100deg, #153a34 19%, #153a34a0 58%, transparent), url('covers/excursion.webp') 74% 55% / cover; color: white; min-height: 16rem; }
  .social-action-tabs { gap: .55rem; margin-top: 1.5rem; }
  .social-action-tabs button { min-height: 2.75rem; padding-inline: 1.15rem; }
  .social-empty-card { background: var(--social-mint); border: 1px solid #cfded1; border-radius: var(--social-frame); }
  .social-outing-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .social-outing-list > article:only-child { grid-column: auto; }
  .social-outing-list > article { min-height: 7rem; box-shadow: 0 5px 15px #16352709; }
  .social-outing-icon { width: 4.2rem; height: 4.2rem; overflow: hidden; }
  .social-outing-icon .social-outing-fallback { display: none; }
  .social-outing-icon img { width: 100%; height: 100%; object-fit: cover; }
  .social-ticket-wallet { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.4rem var(--social-gap); }
  .social-ticket-wallet > :is(header,nav) { grid-column: 1 / -1; margin: 0; }
  .social-ticket-wallet > section { min-width: 0; margin: 0; padding: 1.25rem; align-self: start; background: #fbf8ff; border: 1px solid var(--social-line); border-radius: var(--social-frame); }
  .social-ticket-wallet > section:last-child { background: #edf5eb; }
  .social-ticket-wallet section a:hover, .social-list-page a:hover { background: var(--social-mint); }

  .tribe-directory-header {
    padding: clamp(1.5rem, 3.8vw, 3.6rem); border-radius: var(--social-frame); min-height: 16rem;
    color: white; background: linear-gradient(100deg, #183b33 10%, #173c33ef 35%, #173a32a0 56%, #183b3347 80%), url('covers/discussion.webp') 56% 43% / cover;
  }
  .tribe-directory-header p { color: #fff6e8; max-width: 35rem; font-size: 1.04rem; margin-top: .65rem; }
  .tribe-directory-header .tribe-create {
    height: auto; width: auto; min-height: 3rem; flex-shrink: 0; align-self: start; flex-wrap: nowrap; gap: .45rem;
    border-radius: .8rem; padding: .5rem .95rem; background: var(--social-sun); color: #251d18; font-size: .9rem; font-weight: 800;
  }
  .tribe-search { display: flex; gap: .55rem; width: min(100%, 36rem); margin-top: 1.35rem; }
  .tribe-search input { background: white; color: var(--social-dark); border-radius: .7rem; min-width: 0; }
  .tribe-search button { padding: .6rem .9rem; background: #e9ede1; color: #21392f; font-weight: 750; border-radius: .7rem; }
  .tribe-directory-content { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--social-gap); }
  .tribe-directory-content:has(.tribe-mine) { grid-template-columns: minmax(0, 1fr) clamp(14rem, 23vw, 21rem); }
  .tribe-directory-content h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); margin-block: 1.85rem 1rem; }
  .tribe-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: clamp(.8rem, 1.5vw, 1.3rem); }
  .tribe-directory-content:has(.tribe-mine) .tribe-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tribe-gallery > * { margin: 0 !important; }
  .tribe-gallery .tribe-empty { grid-column: 1 / -1; min-height: 15rem; display: grid; align-content: center; justify-items: center; background: #f0ede6; }
  .tribe-gallery .tribe-empty a { background: var(--social-pine); }
  .tribe-card { background: white; box-shadow: 0 5px 18px #152e2810; overflow: hidden; }
  .tribe-gallery .tribe-card { display: flex; flex-direction: column; gap: 0; padding: 0; border: 1px solid var(--social-line); border-radius: 1rem; }
  .tribe-card:hover { border-color: #77a48b; box-shadow: 0 6px 18px #193f331c; }
  .tribe-gallery .tribe-card-media { width: 100%; height: auto; aspect-ratio: 1.85; border-radius: 0; background: var(--social-lilac); }
  .tribe-gallery .tribe-card-media > img:not(.tribe-card-logo) { position: absolute; width: 100%; height: 100%; object-fit: cover; }
  .tribe-gallery .tribe-card-media > img.bg-white { object-fit: contain; padding: .5rem; }
  .tribe-card-icon, .tribe-shelf .tribe-card-fallback { display: none; }
  .tribe-shelf .tribe-card-icon { display: block; }
  .tribe-gallery .tribe-card-text { padding: .9rem 1rem 1rem; }
  .tribe-card-description { margin-top: .34rem; }
  .tribe-card-meta { margin-top: .55rem; line-height: 1.4; }
  .tribe-shelf {
    display: grid; gap: .7rem; margin: 0; padding: .8rem; background: var(--social-mint);
    border: 1px solid #d5e3d8; border-radius: 1.1rem;
  }
  .tribe-shelf > p { color: var(--social-muted); font-size: .9rem; padding: .55rem; }
  .tribe-shelf .tribe-card { width: 100%; border-radius: .8rem; display: grid; align-items: center; grid-template-columns: 3.9rem minmax(0,1fr); }
  .tribe-shelf .tribe-card-media { height: 100%; min-height: 4.1rem; }

  .tribe-room {
    display: grid; grid-template-columns: minmax(0,1fr) clamp(17rem, 25vw, 23rem); gap: 0 var(--social-gap);
    grid-template-areas: 'cover cover' 'heading heading' 'tabs tabs' 'feed side';
  }
  .tribe-room-cover { grid-area: cover; height: clamp(13rem, 23vw, 23rem); border-radius: var(--social-frame); background: linear-gradient(125deg,#518a6e,#e0a36e); }
  .tribe-room-cover > img { border-radius: inherit; }
  .tribe-room-heading { grid-area: heading; padding: 2.65rem 0 .8rem; }
  .tribe-room-tabs {
    grid-area: tabs; display: flex; gap: .7rem; border: 1px solid var(--social-line); border-radius: .9rem; padding: .45rem; margin-top: 0;
    box-shadow: 0 5px 20px #183b3110;
  }
  .tribe-room-tabs a { flex: 1; }
  .tribe-room-side { grid-area: side; align-self: start; position: sticky; top: calc(var(--social-header-height) + 5.6rem); padding: 0; margin-top: 1.25rem; }
  .tribe-room-summary { background: var(--social-mint); padding: 1.25rem; border-radius: 1rem; }
  .tribe-room-summary h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: .6rem; }
  .tribe-room-summary p { color: var(--social-text); line-height: 1.6; overflow-wrap: anywhere; margin-bottom: .8rem; }
  .tribe-room-summary a { color: var(--social-pine); font-size: .89rem; font-weight: 800; }
  .tribe-room-actions { flex-wrap: wrap; }
  .tribe-room-actions > :is(a,form) { flex: 1 1 100%; }
  .tribe-room-feed { grid-area: feed; min-width: 0; padding: 0; margin-top: 1.25rem; }
  .tribe-room-feed > :is(form, article,div) { background-color: white; }

  .social-profile-layout { display: grid; grid-template-columns: minmax(18rem,.78fr) minmax(0,1.42fr); gap: var(--social-gap); align-items: start; }
  .social-profile-layout .social-profile-header { border-radius: var(--social-frame); min-height: 23rem; background: radial-gradient(ellipse at 88% 5%, #f6d5b9, transparent 60%), linear-gradient(135deg,#dbede3,#eee4f4); overflow: visible; }
  .social-profile-details { min-height: 0; padding: 0; }
  .social-profile-details > section { background-color: white; border-color: var(--social-line); }
  .social-profile-details > section:nth-of-type(3n + 2) { background: #eef4ef; }
  .social-profile-details > section:nth-of-type(3n + 3) { background: #f5eef7; }

  .social-activity-layout { display: grid; grid-template-columns: minmax(0,1fr) clamp(17rem,26vw,24rem); gap: 1.2rem var(--social-gap); grid-template-areas: 'cover cover' 'content action'; }
  .social-activity-cover { grid-area: cover; height: clamp(15rem,24vw,23rem); border-radius: var(--social-frame); }
  .social-activity-cover > img { border-radius: inherit; }
  .social-activity-cover > div:first-of-type { border-radius: inherit; }
  .social-activity-content { grid-area: content; background: white; border-radius: var(--social-frame); border: 1px solid var(--social-line); padding: 2rem; }
  .social-activity-action {
    grid-area: action; position: sticky; align-self: start; inset: calc(var(--social-header-height) + 1rem) auto auto;
    border: 1px solid #d1dfd5; border-radius: var(--social-frame); background: var(--social-mint); padding: 1rem !important;
  }
  .social-activity-action > div { flex-wrap: wrap; }
  .social-activity-action > div > :is(a,form,div) { min-width: min(11rem,100%); }
  .social-event-page .social-event-grid { grid-template-columns: minmax(0,1.22fr) minmax(0,.78fr); grid-template-rows: auto auto 1fr; border-radius: var(--social-frame); }
  .social-event-page .social-event-grid > header { background: #f6e8dd; min-height: 12rem; }
  .social-event-page .social-event-grid > aside { grid-column: 1; grid-row: 2; }
  .social-event-page .social-event-grid:has(> aside) .social-event-description { grid-row: 3; }
  .social-event-page .social-event-grid > header img { width: 7rem; height: 7rem; }
  .social-event-page .social-event-tickets { background: #edf4ee; align-self: stretch; grid-row: 1 / span 3; }

  .social-chat-directory { display: grid; grid-template-columns: minmax(0, 1fr) clamp(16rem,27vw,23rem); gap: 0 var(--social-gap); grid-template-areas: 'heading heading' 'list side'; }
  .social-chat-directory-heading { grid-area: heading; position: relative; top: auto; padding: 1.4rem; background: var(--social-lilac); border-radius: var(--social-frame); margin-bottom: 1rem; }
  .social-chat-directory-heading input { max-width: 36rem; background: white; }
  .social-chat-directory-heading div:last-child { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; }
  .social-chat-directory-list { grid-area: list; min-width: 0; align-self: start; border: 1px solid var(--social-line); background: white; border-radius: var(--social-frame); padding-bottom: 0; overflow: hidden; }
  .social-chat-directory-list a:hover { background: var(--social-mint); }
  .social-chat-directory-side, .social-match-aside { grid-area: side; align-self: start; min-width: 0; padding: 1rem; border-radius: var(--social-frame); background: var(--social-mint); }
  .social-chat-aside-visual, .social-match-aside-image { height: clamp(6rem,11vw,10rem); background: url('covers/terrasse.webp') center / cover; border-radius: .85rem; margin: 0 0 .8rem; }
  .social-chat-directory-side :is(h2,a), .social-match-aside :is(h2,a) { display: flex; justify-content: space-between; gap: .6rem; padding: .65rem .35rem; }
  .social-chat-directory-side h2, .social-match-aside h2 { font-size: 1.3rem; font-weight: 800; }
  .social-chat-directory-side a, .social-match-aside a { font-size: .9rem; font-weight: 750; border-top: 1px solid #c5dac9; }
  .social-chat-room {
    position: fixed; inset: calc(var(--social-header-height) + 1rem) 0 1rem; width: var(--social-page-width); margin-inline: auto;
    display: grid; grid-template-columns: clamp(15rem,27vw,23rem) minmax(0,1fr); gap: 1rem;
  }
  body:not(:has(.social-page-shell)) .social-chat-room { top: 1rem; }
  .social-chat-room-side { min-height: 0; display: flex; flex-direction: column; overflow: auto; padding: 1rem; background: var(--social-mint); border-radius: var(--social-frame); }
  .social-chat-room-side h1 { font-weight: 850; font-size: 1.65rem; margin-bottom: .9rem; }
  .social-chat-room-side h1 a, .social-chat-room-side nav a { display: flex; justify-content: space-between; gap: .65rem; align-items: center; }
  .social-chat-room-side p { background: #204335; color: white; font-weight: 750; border-radius: .75rem; padding: .65rem; }
  .social-chat-room-side nav a { justify-content: flex-start; padding: .6rem .35rem; border-bottom: 1px solid #cbdccf; overflow-wrap: anywhere; }
  .social-chat-room-side nav a:hover { background: #f7fff7; }
  .social-chat-room-side nav img { border-radius: 50%; object-fit: cover; aspect-ratio: 1; }
  .social-chat-friends { font-size: .86rem; font-weight: 800; padding-top: .75rem; }
  .social-chat-thread { position: relative; inset: auto; width: 100%; max-width: none; min-height: 0; overflow: hidden; border: 1px solid var(--social-line); border-radius: var(--social-frame); }
  .social-chat-thread > :is(div,form) { padding-inline: clamp(1rem, 3vw, 2rem); }
  .social-chat-thread [x-ref="scroller"] { background: linear-gradient(120deg,#f5ebe1,#eaf1e8); }

  .social-match-screen {
    display: grid; inset: calc(var(--social-header-height) + 1rem) 0 1rem; padding: 1rem 0; max-width: none; width: var(--social-page-width);
    grid-template-areas: 'head side' 'cards side' 'actions side'; grid-template-columns: minmax(0,1fr) clamp(18rem,29vw,27rem); grid-template-rows: auto minmax(0,1fr) auto; gap: 1rem var(--social-gap);
  }
  .social-page-shell .social-match-screen { bottom: 1rem; }
  .social-match-screen > header { grid-area: head; }
  .social-match-screen > p[role="alert"] { grid-area: cards; align-self: start; z-index: 2; }
  .social-match-stack { grid-area: cards; }
  .social-match-stack .social-discovery-card { max-width: 34rem; margin: auto; }
  .social-match-actions { grid-area: actions; }
  .social-match-aside { background: var(--social-lilac); }
  .social-match-aside-image { background-image: url('covers/lecture.webp'); }
  .social-match-aside a { border-color: #d9cadf; }

  .social-list-page h1 { margin-bottom: .8rem; }
  .social-list-page > :not(h1) { min-width: 0; }
  .social-list-page > :is(div,section):last-child { background: white; padding: 1rem; border: 1px solid var(--social-line); border-radius: var(--social-frame); }
  .social-trips-body { padding: 0; margin: 1.45rem 0 0; background: transparent; }
  .social-trips-body > section { background: white; border: 1px solid var(--social-line); border-radius: var(--social-frame); padding: 1.3rem; }
  .social-trips-destinations { display: grid; grid-template-columns: repeat(auto-fit,minmax(9.5rem,1fr)); gap: .7rem; margin-inline: 0; padding: 0; overflow: visible; }
  .social-trips-destinations a { width: auto; background: var(--social-mint); }
  .social-document { max-width: 75rem; }
  .social-document > :is(h1,h2,p,.moovin-legal-content) { max-width: 72ch; }
  .social-faq-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .social-faq-grid > details:nth-child(3n + 1) { background: var(--social-mint); }
  .social-faq-grid > details:nth-child(3n + 2) { background: var(--social-lilac); }
  .social-form-page { width: min(calc(100% - 4rem), 67rem); max-width: none; min-height: 0; background-color: white; border: 1px solid var(--social-line); border-radius: var(--social-frame); margin: 2rem auto; padding: clamp(1.15rem,3vw,2.7rem) !important; }
  .social-account-form > :first-of-type { top: var(--social-header-height); }
  .social-account-delete { margin-top: 0; background: #fbece6; }
  .social-workflow { border-radius: var(--social-frame); background: white; padding-top: 1rem !important; min-height: min(43rem,calc(100vh - 5rem)); }
  .social-workflow > div:not(.social-workflow-actions) { max-width: none; padding-inline: clamp(1.1rem, 3vw, 3.1rem); }
  .social-workflow > div:has(> section) { padding-bottom: 1rem; }
  .social-workflow-actions { position: static; max-width: none; padding: 1rem 2rem !important; }
  .social-workflow-actions > div { max-width: 35rem; }
  .social-world-page { max-width: 77rem; }
}

@media (prefers-reduced-motion: reduce) {
  .social-page-shell * { scroll-behavior: auto; }
}

.trip-create-form { max-height: calc(100dvh - 1rem); overflow-y: auto; }
.trip-date-grid > label, .trip-date-grid input { min-width: 0; max-width: 100%; }
.trip-date-grid input { display: block; min-height: 2.75rem; }
.trip-date-grid input::-webkit-date-and-time-value { min-width: 0; text-align: start; }
@media (max-width: 360px) { .trip-date-grid { grid-template-columns: minmax(0, 1fr); } }
