/* Milano Rendezvous — styles
   Tokens first (light on :root, dark under a guarded media query and the explicit toggle),
   then layout, then components. Colours are only ever referenced through tokens. */

:root {
  color-scheme: light;
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #E9EDF2;
  --ink: #101A28;
  --ink-2: #44546A;
  --muted: #7A8696;
  --line: #DAE0E8;
  --line-strong: #B8C2CE;
  --accent: #C4202F;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE8EA;
  --focus: #2A78D6;
  --shadow: 0 1px 2px rgba(16, 26, 40, .06), 0 8px 24px -12px rgba(16, 26, 40, .18);

  --sea: #E4EAF1;
  --land: #D3DBE5;
  --land-line: #BCC7D4;
  --grat: #DBE2EA;
  --map-label: #4B5A6E;

  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --good: #0ca30c; --warn: #fab219; --critical: #d03b3b;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A1018;
    --surface: #121A25;
    --surface-2: #1A2433;
    --ink: #EEF2F7;
    --ink-2: #B0BBC9;
    --muted: #76839A;
    --line: #23303F;
    --line-strong: #364559;
    --accent: #F0576A;
    --accent-ink: #14060A;
    --accent-soft: #3A1A22;
    --focus: #5598E7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
    --sea: #0A1018;
    --land: #172131;
    --land-line: #2A3649;
    --grat: #141D2A;
    --map-label: #B0BBC9;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A1018;
  --surface: #121A25;
  --surface-2: #1A2433;
  --ink: #EEF2F7;
  --ink-2: #B0BBC9;
  --muted: #76839A;
  --line: #23303F;
  --line-strong: #364559;
  --accent: #F0576A;
  --accent-ink: #14060A;
  --accent-soft: #3A1A22;
  --focus: #5598E7;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
  --sea: #0A1018;
  --land: #172131;
  --land-line: #2A3649;
  --grat: #141D2A;
  --map-label: #B0BBC9;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
}

/* ---- base ------------------------------------------------------------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.tz-chip:empty { display: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar ---------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 clamp(14px, 3vw, 28px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-word {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: .06em;
  font-size: 19px;
}
.brand-date {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: 6px;
}
.brand-date .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  text-decoration: none; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tz-chip {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px;
  white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
}
.tz-chip b { color: var(--ink); font-weight: 600; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: inline-grid; place-items: center; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  /* no backdrop-filter here: it would become the containing block of the fixed nav below */
  .topbar { gap: 10px; backdrop-filter: none; background: var(--surface); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .nav a { flex: 1; text-align: center; padding: 8px 6px; font-size: 13px; }
  .brand-date { display: none; }
  .tz-chip { max-width: 52vw; font-size: 11px; }
  body { padding-bottom: 64px; }
}

/* ---- layout ----------------------------------------------------------- */
.app { max-width: 1180px; margin: 0 auto; padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 28px) 60px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; margin-bottom: 20px; }
.page-head h1 {
  font-family: var(--display); font-weight: 700; font-stretch: 105%;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -.01em;
}
.page-head .sub { color: var(--ink-2); }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.countdown { margin-left: auto; text-align: right; }
.countdown .num { font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.countdown .lbl { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 860px) { .grid-main { grid-template-columns: 1fr; } }
.section-title { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.005em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head .meta { font-size: 12.5px; color: var(--muted); }

/* ---- cards ------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }

/* ---- map ------------------------------------------------------------- */
.map-card { position: relative; background: var(--sea); border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap { aspect-ratio: 16 / 8.2; width: 100%; min-height: 300px; }
@media (max-width: 640px) { .map-wrap { aspect-ratio: 4 / 3.6; } }
.map-wrap svg { display: block; width: 100%; height: 100%; }
.map-land { fill: var(--land); stroke: var(--land-line); stroke-width: .6; stroke-linejoin: round; }
.map-grat { stroke: var(--grat); stroke-width: 1; fill: none; }
.map-arc { fill: none; stroke-width: 2; stroke-linecap: round; }
.map-arc.option { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.map-arc.halo { stroke: var(--sea); stroke-width: 5; opacity: .9; }
.map-airport { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; }
.map-airport.dest { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.map-label { font-family: var(--mono); font-size: 11px; fill: var(--map-label); paint-order: stroke; stroke: var(--sea); stroke-width: 3px; stroke-linejoin: round; }
.map-label.city { font-family: var(--body); font-weight: 600; font-size: 12.5px; fill: var(--ink); }
.map-label.dest { fill: var(--accent); font-weight: 700; }
.plane { cursor: pointer; }
.plane path { stroke: var(--sea); stroke-width: 1.2; }
.map-legend {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; max-width: calc(100% - 24px);
}
.map-legend .lg { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.map-legend .lg.dim { opacity: .6; }
.map-legend .lg b { color: var(--ink); font-weight: 600; }
.map-title { position: absolute; left: 14px; top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--map-label); }
@media (max-width: 640px) {
  .map-legend { position: static; max-width: none; border-radius: 0; border-width: 1px 0 0; backdrop-filter: none; background: var(--surface); padding: 10px 14px; }
}
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.swatch.line { width: 14px; height: 2px; border-radius: 1px; }
.c1 { background: var(--s1); } .c2 { background: var(--s2); } .c3 { background: var(--s3); } .c4 { background: var(--s4); } .c5 { background: var(--s5); }
.stroke-c1 { stroke: var(--s1); } .stroke-c2 { stroke: var(--s2); } .stroke-c3 { stroke: var(--s3); } .stroke-c4 { stroke: var(--s4); } .stroke-c5 { stroke: var(--s5); }
.fill-c1 { fill: var(--s1); } .fill-c2 { fill: var(--s2); } .fill-c3 { fill: var(--s3); } .fill-c4 { fill: var(--s4); } .fill-c5 { fill: var(--s5); }

/* ---- timeline --------------------------------------------------------- */
.timeline { width: 100%; }
.timeline svg { display: block; width: 100%; overflow: visible; }
.tl-grid { stroke: var(--line); stroke-width: 1; }
.tl-axis { stroke: var(--line-strong); stroke-width: 1; }
.tl-tick { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.tl-tick.strong { fill: var(--ink-2); }
.tl-name { font-family: var(--body); font-weight: 600; font-size: 13px; fill: var(--ink); }
.tl-sub { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.tl-end { font-family: var(--mono); font-size: 11.5px; fill: var(--ink-2); }
.tl-bar { cursor: default; }
.tl-dot { stroke: var(--surface); stroke-width: 2; }
.tl-empty { fill: var(--muted); font-size: 13px; }
.tl-row-bg { fill: transparent; }
.tl-row-bg:hover { fill: var(--surface-2); }
.arrivals-list { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.arrivals-list li { display: grid; grid-template-columns: 14px 1fr auto; align-items: baseline; gap: 10px; font-size: 13.5px; }
.arrivals-list .who { font-weight: 600; }
.arrivals-list .what { color: var(--ink-2); }
.arrivals-list .when { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.arrivals-list .when small { display: block; color: var(--muted); font-size: 11px; }

/* ---- sync summary ---------------------------------------------------- */
.sync { display: grid; gap: 10px; }
.sync-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.sync-line .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.sync-line.warn .ico { color: var(--warn); }
.sync-line.good .ico { color: var(--good); }
.sync-line.info .ico { color: var(--ink-2); }
.sync-line b { font-weight: 600; }

/* ---- meeting point ---------------------------------------------------- */
.meet-place { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2; }
.meet-time { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.meet-notes { color: var(--ink-2); margin-top: 8px; white-space: pre-wrap; }
.meet-suggest { margin-top: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.meet-suggest b { color: var(--ink); }
.airport-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---- people ----------------------------------------------------------- */
.people-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.person {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: start;
  text-decoration: none; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, transform .15s;
}
.person:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 15px; color: #fff; grid-row: span 2;
}
.avatar.big { width: 56px; height: 56px; font-size: 22px; }
.person .name { font-weight: 600; }
.person .line { font-size: 12.5px; color: var(--ink-2); }
.person .line + .line { margin-top: 2px; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; border-radius: 999px; padding: 2px 8px; margin-top: 6px; border: 1px solid var(--line); color: var(--ink-2); }
.status.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.status.todo { color: var(--ink-2); }
.status.attn { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 40%, var(--line)); }

/* ---- flights board --------------------------------------------------- */
.traveller-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 13.5px; color: var(--ink-2);
}
.chip[aria-current="true"] { color: var(--ink); border-color: var(--ink); }
.board { display: grid; gap: 0; }
.board-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.board-head h2 { font-family: var(--display); font-weight: 700; font-size: 22px; }
.board-head .route { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.group-title { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.flight {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); border-left-width: 4px; border-left-color: transparent;
  border-radius: 0;
}
.flight:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.flight:last-of-type { border-radius: 0 0 var(--radius) var(--radius); }
.flight + .flight { margin-top: -1px; }
.flight.selected { background: color-mix(in srgb, var(--surface) 92%, var(--sel)); border-left-color: var(--sel); }
.flight .pick {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); padding: 0;
  display: grid; place-items: center; color: transparent;
}
.flight.selected .pick { border-color: var(--sel); background: var(--sel); color: #fff; }
.flight .pick svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 3; }
.flight .times { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.flight .t { font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.flight .t small { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.flight .arrow { color: var(--muted); }
.flight .desc { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.flight .desc b { color: var(--ink); font-weight: 600; }
.flight .yours { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.flight .side { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.flight .side .dur { font-size: 13px; color: var(--ink); }
.flight .side .stops { color: var(--muted); }
.flight .side .rm { display: block; margin-top: 6px; background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0; text-decoration: underline; }
.flight .side .rm:hover { color: var(--critical); }
@media (max-width: 560px) {
  .flight { grid-template-columns: 22px minmax(0, 1fr); }
  .flight .side { grid-column: 2; text-align: left; display: flex; gap: 10px; }
  .flight .t { font-size: 16px; }
}
.board-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.sched-meta { font-size: 12.5px; color: var(--muted); }
.host-note { padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2); }
.disclosure { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-size: 12.5px; }

/* ---- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500; font-size: 14px; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---- forms ----------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.field.check { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.field.check input { width: 18px; height: 18px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
legend { font-family: var(--display); font-weight: 700; font-size: 15px; margin-bottom: 4px; padding: 0; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contacts { display: grid; gap: 10px; }
.contact-row { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contact-row .row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.contact-remove { justify-self: end; }
.contact-row:only-child .contact-remove { display: none; }
.form-actions .saved { font-size: 12.5px; color: var(--muted); }
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.detail-head .who { font-family: var(--display); font-weight: 700; font-size: 24px; }
.detail-head .sub { color: var(--ink-2); font-size: 13.5px; }
.readout { display: grid; gap: 14px; }
.readout dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.readout dd { margin: 2px 0 0; white-space: pre-wrap; }
.readout dd.empty { color: var(--muted); font-style: italic; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; }

/* ---- dialog ---------------------------------------------------------- */
dialog.sheet { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: rgba(6, 10, 18, .5); backdrop-filter: blur(2px); }
dialog.sheet .sheet-in { padding: 22px; }
dialog.sheet h2 { font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 14px; }

/* ---- tooltip & toast ------------------------------------------------- */
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 8px;
  box-shadow: var(--shadow);
}
.tip b { font-weight: 600; }
.tip .mono { opacity: .85; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow);
  max-width: min(480px, calc(100vw - 32px));
}
.toast.error { background: var(--critical); color: #fff; }
@media (max-width: 640px) { .toast { bottom: 80px; } }

/* ---- gate (group code) ---------------------------------------------- */
.gate { min-height: calc(100vh - var(--topbar-h) - 140px); display: grid; place-items: center; padding: 10px 0; }
.gate-card { width: min(540px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.gate-card h1 { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.01em; margin-bottom: 6px; }
.gate-card .sub { color: var(--ink-2); margin-bottom: 22px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); gap: 8px; }
.who-grid .who { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; position: relative; font-size: 13px; font-weight: 600; background: var(--surface); }
.who-grid .who:hover { border-color: var(--line-strong); }
.who-grid .who input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.who-grid .who:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.who-grid .who:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.code-input { font-size: 22px; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.gate-error { color: var(--critical); font-size: 13.5px; }
.me-chip { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 13px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; white-space: nowrap; }
.me-chip:hover { background: var(--surface-2); }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.you { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
@media (max-width: 640px) { .me-chip { padding-right: 3px; } .me-chip .me-name { display: none; } }

/* ---- airport filter -------------------------------------------------- */
.filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.filter-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip.small { padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.chip .cnt { color: var(--muted); font-family: var(--mono); font-size: 11px; }

/* ---- misc ------------------------------------------------------------ */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.note { font-size: 13px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
