/* Travel Like a Nerd. Tokens from canvas/_kit/helmet.html: Midnight (dark) and Paper (light).
   Colour by PERSON, never by transport mode. Selected state is ink, never accent.
   --on-* is the text colour on a person or team fill: #0B0B10 wherever it reaches 4.5:1 (yellow, light
   blue, aqua, orange, pink, green and Midnight purple), white where dark would not (Paper blue, red,
   purple). tests/test_a11y.py checks every pair. */

:root, :root[data-theme="paper"] {
  color-scheme: light;
  --bg:#F2F1EE; --bg-soft:#E9E7E2; --card:#FFFFFF; --field:#F8F7F5;
  --border:rgba(26,29,59,.12); --rule:rgba(26,29,59,.16); --field-edge:#74768F; --chip:rgba(26,29,59,.04);
  --ink:#1A1D3B; --ink-body:#3A3C55; --dim:#545454; --faint:#686B83;
  --accent:#5B60BC; --accent-ink:#4A4FA6; --on-accent:#FFFFFF; --accent-soft:rgba(91,96,188,.10); --accent-line:rgba(91,96,188,.28);
  --pos:#17634F; --pos-soft:rgba(23,99,79,.09); --warn:#7A4A00; --warn-soft:rgba(122,74,0,.09);
  --danger:#9E2A48; --danger-soft:rgba(158,42,72,.08);
  --glass:rgba(255,255,255,.62); --scrim:rgba(4,5,9,.6);
  --shadow:0 1px 2px rgba(26,29,59,.05),0 18px 40px -24px rgba(26,29,59,.22);
  --shadow-up:0 1px 2px rgba(26,29,59,.06),0 26px 56px -26px rgba(26,29,59,.38);
  --p-phil:#1D4ED8; --p-leisis:#EC4899; --p-sophie:#EAB308; --p-jeremy:#16A34A; --p-joseph:#DC2626; --p-zenayda:#7C3AED; --p-guest:#6B7280;
  --x-phil:#1D4ED8; --x-leisis:#BE185D; --x-sophie:#854D0E; --x-jeremy:#166534; --x-joseph:#B91C1C; --x-zenayda:#7C3AED; --x-guest:#4B5563;
  --on-phil:#FFFFFF; --on-leisis:#0B0B10; --on-sophie:#0B0B10; --on-jeremy:#0B0B10; --on-joseph:#FFFFFF; --on-zenayda:#FFFFFF; --on-guest:#FFFFFF;
  --home:#008E97; --away:#FC4C02; --x-home:#007A82; --x-away:#C2410C; --on-home:#0B0B10; --on-away:#0B0B10;
  --ring-sophie:rgba(26,29,59,.28);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="paper"]) {
  color-scheme: dark;
  --bg:#0B0B10; --bg-soft:#23242C; --card:#15161F; --field:#0E0E12;
  --border:rgba(228,226,221,.12); --rule:rgba(228,226,221,.15); --field-edge:#7E8096; --chip:rgba(255,255,255,.05);
  --ink:#EEEDF3; --ink-body:#C9C9D3; --dim:#A2A3B5; --faint:#9294AC;
  --accent:#AC8EF9; --accent-ink:#AC8EF9; --on-accent:#0B0B10; --accent-soft:rgba(172,142,249,.14); --accent-line:rgba(172,142,249,.34);
  --pos:#7ADCB8; --pos-soft:rgba(122,220,184,.10); --warn:#F0C572; --warn-soft:rgba(240,197,114,.10);
  --danger:#FF9FB2; --danger-soft:rgba(255,159,178,.10);
  --glass:rgba(16,16,26,.62);
  --shadow:0 1px 0 rgba(255,255,255,.04) inset,0 24px 48px -28px rgba(0,0,0,.8);
  --shadow-up:0 1px 0 rgba(255,255,255,.06) inset,0 30px 60px -28px rgba(0,0,0,.9);
  --p-phil:#60A5FA; --p-zenayda:#A855F7; --p-guest:#9CA3AF;
  --x-phil:#60A5FA; --x-leisis:#F472B6; --x-sophie:#FACC15; --x-jeremy:#4ADE80; --x-joseph:#F87171; --x-zenayda:#A855F7; --x-guest:#9CA3AF;
  --on-phil:#0B0B10; --on-leisis:#0B0B10; --on-sophie:#0B0B10; --on-jeremy:#0B0B10; --on-joseph:#FFFFFF; --on-zenayda:#0B0B10; --on-guest:#0B0B10;
  --x-home:#22B8C2; --x-away:#FC4C02; --on-home:#0B0B10; --on-away:#0B0B10;
  --ring-sophie:rgba(255,255,255,0);
}}
:root[data-theme="midnight"] {
  color-scheme: dark;
  --bg:#0B0B10; --bg-soft:#23242C; --card:#15161F; --field:#0E0E12;
  --border:rgba(228,226,221,.12); --rule:rgba(228,226,221,.15); --field-edge:#7E8096; --chip:rgba(255,255,255,.05);
  --ink:#EEEDF3; --ink-body:#C9C9D3; --dim:#A2A3B5; --faint:#9294AC;
  --accent:#AC8EF9; --accent-ink:#AC8EF9; --on-accent:#0B0B10; --accent-soft:rgba(172,142,249,.14); --accent-line:rgba(172,142,249,.34);
  --pos:#7ADCB8; --pos-soft:rgba(122,220,184,.10); --warn:#F0C572; --warn-soft:rgba(240,197,114,.10);
  --danger:#FF9FB2; --danger-soft:rgba(255,159,178,.10);
  --glass:rgba(16,16,26,.62);
  --shadow:0 1px 0 rgba(255,255,255,.04) inset,0 24px 48px -28px rgba(0,0,0,.8);
  --shadow-up:0 1px 0 rgba(255,255,255,.06) inset,0 30px 60px -28px rgba(0,0,0,.9);
  --p-phil:#60A5FA; --p-zenayda:#A855F7; --p-guest:#9CA3AF;
  --x-phil:#60A5FA; --x-leisis:#F472B6; --x-sophie:#FACC15; --x-jeremy:#4ADE80; --x-joseph:#F87171; --x-zenayda:#A855F7; --x-guest:#9CA3AF;
  --on-phil:#0B0B10; --on-leisis:#0B0B10; --on-sophie:#0B0B10; --on-jeremy:#0B0B10; --on-joseph:#FFFFFF; --on-zenayda:#0B0B10; --on-guest:#0B0B10;
  --x-home:#22B8C2; --x-away:#FC4C02; --on-home:#0B0B10; --on-away:#0B0B10;
  --ring-sophie:rgba(255,255,255,0);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; }
a { color: var(--accent-ink); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 8px; }
svg.i { flex: none; }
.boot { padding: 40vh 16px 0; text-align: center; color: var(--faint); }

/* ------------------------------------------------------------------ layout */
.screen { max-width: 640px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 120px);
  display: flex; flex-direction: column; gap: 16px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 8px; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.title { font-size: 26px; letter-spacing: -.025em; line-height: 1.12; }
.h2 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
.h3 { font-size: 17px; letter-spacing: -.015em; line-height: 1.25; }
.sub { font-size: 13px; color: var(--dim); line-height: 1.45; }
.faint { color: var(--faint); }
.dim { color: var(--dim); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px -4px; }
.section-h a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.card.pad { padding: 16px; }
.list { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--rule); }

/* the one gradient band per screen */
.band { border-radius: 20px; padding: 20px; color: #FFF; border: 1px solid rgba(190,215,244,.16);
  background: radial-gradient(280px 180px at 100% 100%, rgba(172,142,249,.24) 0%, rgba(172,142,249,.10) 42%, rgba(172,142,249,0) 72%),
              linear-gradient(112deg, #14162E 0%, #1A1D3B 32%, #2E3270 66%, #4A4FA6 100%);
  box-shadow: 0 24px 48px -28px rgba(26,29,59,.55); }
.band .eyebrow { color: #BED7F4; }
.band .sub, .band .dim { color: rgba(255,255,255,.80); }
.band .pts { color: #C4ADFF; }
.band hr { border: 0; border-top: 1px solid rgba(255,255,255,.14); margin: 14px 0; }
.band .big { font-size: 54px; line-height: 1; letter-spacing: -.035em; font-weight: 600; }
.band .pillbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: #E4E2DD; color: #1A1D3B; font-size: 14px; font-weight: 600; }
.band .pdot { box-shadow: 0 0 0 2px #1A1D3B; }
.band .pdot.phil { background: #60A5FA; } .band .pdot.zenayda { background: #A855F7; }

/* ------------------------------------------------------------------ people */
.pdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--p-guest); }
.pdot.phil { background: var(--p-phil); } .pdot.leisis { background: var(--p-leisis); }
.pdot.sophie { background: var(--p-sophie); box-shadow: inset 0 0 0 1px var(--ring-sophie); }
.pdot.jeremy { background: var(--p-jeremy); } .pdot.joseph { background: var(--p-joseph); }
.pdot.zenayda { background: var(--p-zenayda); }
.pdot.home { background: var(--home); } .pdot.away { background: var(--away); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--p-guest); color: var(--on-guest); flex: none; }
.avatar.phil { background: var(--p-phil); color: var(--on-phil); } .avatar.leisis { background: var(--p-leisis); color: var(--on-leisis); }
.avatar.sophie { background: var(--p-sophie); color: var(--on-sophie); } .avatar.jeremy { background: var(--p-jeremy); color: var(--on-jeremy); }
.avatar.joseph { background: var(--p-joseph); color: var(--on-joseph); } .avatar.zenayda { background: var(--p-zenayda); color: var(--on-zenayda); }
.avatars { display: inline-flex; } .avatars .avatar { width: 26px; height: 26px; font-size: 11px; box-shadow: 0 0 0 2px var(--card); }
.avatars .avatar + .avatar { margin-left: -6px; }
.pname { font-weight: 600; } .pname.phil { color: var(--x-phil); } .pname.leisis { color: var(--x-leisis); }
.pname.sophie { color: var(--x-sophie); } .pname.jeremy { color: var(--x-jeremy); } .pname.joseph { color: var(--x-joseph); }
.pname.zenayda { color: var(--x-zenayda); }

/* a person bar: 4px, solid or stripes (set inline from person keys) */
.pbar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: var(--p-guest); }

/* ------------------------------------------------------------------ chips, pills, buttons */
/* the person filter row: scrolls sideways, arrows and edge fades show only where there is more */
.chiprow { position: relative; margin: 0 -16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; overscroll-behavior-x: contain;
  cursor: grab; -webkit-user-select: none; user-select: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.dragging { cursor: grabbing; }
.chips.dragging .chip { pointer-events: none; }
.chiprow.has-right .chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 52px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 52px), transparent); }
.chiprow.has-left .chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 52px); mask-image: linear-gradient(90deg, transparent, #000 52px); }
.chiprow.has-left.has-right .chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 52px, #000 calc(100% - 52px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 52px, #000 calc(100% - 52px), transparent); }
.chipnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); color: var(--ink); border: 1px solid var(--field-edge); box-shadow: var(--shadow); }
.chipnav[hidden] { display: none; }
.chipnav.prev { left: 8px; } .chipnav.next { right: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  background: var(--card); border: 1px solid var(--rule); font-size: 14px; font-weight: 600; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); white-space: nowrap; }
.pill.to_book { color: var(--danger); background: var(--danger-soft); }
.pill.to_decide { color: var(--warn); background: var(--warn-soft); }
.pill.need_doc { color: var(--accent-ink); background: var(--accent-soft); }
.pill.action { color: var(--ink); border-color: var(--field-edge); }
.pill.booked { color: var(--pos); background: var(--pos-soft); }
.pill.urgent { color: var(--danger); background: var(--danger-soft); }
.pill.points { color: var(--accent-ink); background: var(--chip); border-color: transparent; min-height: 24px; }
.band .pill.points { color: #C4ADFF; background: rgba(255,255,255,.08); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--field-edge); }
.btn.compact { min-height: 44px; border-radius: 12px; padding: 0 14px; font-size: 14px; background: var(--chip); color: var(--ink); border: 1px solid var(--field-edge); }
.btn.block { width: 100%; }
.btn[disabled] { background: transparent; color: var(--faint); border: 1.5px dashed var(--field-edge); cursor: default; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--chip); border: 1px solid var(--border); color: var(--ink); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--rule); }
.seg button { flex: 1; min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--dim); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.code { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  background: var(--chip); border: 1px solid var(--field-edge); font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--ink); }
.code .i { color: var(--faint); }

/* ------------------------------------------------------------------ rows */
.item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 12px; width: 100%; text-align: left; }
.item .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--chip);
  border: 1px solid var(--border); color: var(--ink); flex: none; }
.item .t { font-size: 15px; font-weight: 500; line-height: 1.3; }
.item .s { font-size: 13px; color: var(--dim); line-height: 1.35; }
.item .r { margin-left: auto; text-align: right; font-size: 13px; color: var(--dim); flex: none; }
.item.ghost .ico { border-style: dashed; background: transparent; }
.dayhead { padding: 10px 14px 6px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em;
  border-top: 0 !important; background: var(--bg-soft); }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.callout.danger { background: var(--danger-soft); color: var(--ink); border: 1px solid var(--border); }
.callout.danger .i { color: var(--danger); }
.callout.info { background: var(--accent-soft); color: var(--ink); }
.callout.warn { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--border); }
.callout.warn .i { color: var(--warn); }
.ovl { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-weight: 600; }
.linkbtn { min-height: 44px; font-size: 14px; font-weight: 600; color: var(--accent-ink); text-align: center; }
.need { display: flex; gap: 12px; padding: 12px; min-height: 44px; border-radius: 14px; background: var(--chip); color: var(--ink); }
.need.urgent { background: var(--danger-soft); }
.need .t { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.foot { text-align: center; font-size: 12.5px; color: var(--faint); padding: 8px 0 0; }
.empty { padding: 28px 16px; text-align: center; color: var(--dim); }

/* ------------------------------------------------------------------ tab bar */
.tabbar { position: fixed; left: 18px; right: 18px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 64px; z-index: 20;
  max-width: 560px; margin: 0 auto; border-radius: 34px; overflow: hidden; border: 1px solid var(--border);
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 10px 24px rgba(11,11,16,.30); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--faint);
  font-size: 10.5px; position: relative; }
.tabbar a[aria-current="page"] { color: var(--accent-ink); font-weight: 600; }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: var(--bg); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
body.sheet-open .tabbar { display: none; }

/* ------------------------------------------------------------------ calendar */
.cal { padding: 0; overflow: hidden; }
.cal .wk { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; font-weight: 600; color: var(--faint);
  text-align: center; padding: 8px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.cal .week { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--rule); }
.cal .day { position: relative; height: 100%; padding-top: 4px; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.cal .day .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12.5px; font-weight: 600; }
.cal .day.out .n { color: var(--faint); opacity: .55; }
.cal .day.today .n { box-shadow: inset 0 0 0 1.5px var(--accent-ink); color: var(--accent-ink); }
.cal .day[aria-pressed="true"] .n { background: var(--ink); color: var(--bg); box-shadow: none; }
.cal .bar { position: absolute; height: 14px; border-radius: 4px; font-size: 9.5px; font-weight: 700; line-height: 14px; padding: 0 4px;
  overflow: hidden; white-space: nowrap; text-overflow: clip; pointer-events: none; display: flex; align-items: center; gap: 3px; }
.cal .bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal .bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal .bar.stripe { padding: 0 2px; }
.cal .bar .lbl { display: flex; align-items: center; gap: 3px; height: 12px; line-height: 12px; padding: 0 3px; border-radius: 3px; max-width: 100%;
  overflow: hidden; white-space: nowrap; background: var(--card); color: var(--ink); }
.cal .day .wm { position: absolute; top: 5px; right: 3px; display: flex; color: var(--warn); }
.wm-sw { display: inline-flex; color: var(--warn); }
.cal .bar.ghost { background: transparent !important; border: 1px dashed var(--field-edge); color: var(--dim); }
.cal .more { position: absolute; font-size: 10px; font-weight: 700; color: var(--dim); pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------------ sheet */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; animation: fade .15s ease-out; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: calc(100vh - env(safe-area-inset-top) - 40px);
  max-width: 640px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-bottom: 0;
  border-radius: 24px 24px 0 0; box-shadow: var(--shadow-up); overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 24px); animation: rise .2s ease-out; }
.sheet .grab { width: 38px; height: 4px; border-radius: 2px; background: var(--faint); margin: 0 auto 8px; opacity: .6; }
.sheet .shead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim { animation: none; } }

.board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.board .code3 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.board .time { font-size: 17px; font-weight: 600; margin-top: 4px; }
.board .mid { text-align: center; font-size: 12px; color: rgba(255,255,255,.75); }
.board .end { text-align: right; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 10px 12px; font-size: 14px; padding: 14px 16px; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.cost { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.cost .v { text-align: right; font-weight: 600; }
.cost .pts { color: var(--accent-ink); }
.note { font-size: 14px; color: var(--ink-body); white-space: pre-wrap; }

/* ------------------------------------------------------------------ sign in */
.signin { min-height: 100vh; padding: calc(env(safe-area-inset-top) + 48px) 16px calc(env(safe-area-inset-bottom) + 28px);
  background: linear-gradient(135deg, #AC8EF9 0%, #5B60BC 38%, #1A1D3B 78%, #0B0B10 100%); color: #FFF;
  display: flex; flex-direction: column; align-items: center; gap: 22px; }
.signin .brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 360px; }
.signin .brand img { width: 88px; height: 88px; border-radius: 19px; }
.signin h1 { font-size: 30px; letter-spacing: -.025em; }
.signin .tag { font-size: 17px; color: rgba(255,255,255,.9); }
.signin .caps { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.signin form { width: 100%; max-width: 380px; background: var(--card); color: var(--ink); border-radius: 24px; box-shadow: var(--shadow-up);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.signin form h2 { font-size: 22px; }
.signin .lock { font-size: 12px; color: rgba(255,255,255,.78); display: flex; align-items: center; gap: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.field input { min-height: 52px; border-radius: 14px; background: var(--field); border: 1.5px solid var(--field-edge); color: var(--ink);
  font: 600 16px/1.2 system-ui, -apple-system, sans-serif; padding: 0 14px; width: 100%; }
.field input:focus { outline: 2px solid var(--accent-ink); outline-offset: 1px; box-shadow: 0 0 0 4px var(--accent-line); }
.formerr { color: var(--danger); font-size: 13.5px; min-height: 1em; }
.help { font-size: 13px; color: var(--dim); line-height: 1.45; }

/* ------------------------------------------------------------------ toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-up); animation: fade .15s ease-out; }

/* ------------------------------------------------------------------ trip in progress and flight day */
.prog { display: flex; align-items: flex-start; gap: 6px; }
.prog .ph { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.prog .ticks { display: flex; align-items: center; gap: 3px; height: 10px; }
.prog .tk { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); }
.prog .tk.done { background: rgba(190,215,244,.6); }
.prog .tk.now { height: 10px; background: #FFF; }
.prog .lab { font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.72); }
.prog .ph.cur .lab { color: #FFF; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.tile .v { font-size: 20px; font-weight: 600; line-height: 1.15; }
.tile .nf { font-size: 14px; font-weight: 600; line-height: 1.65; color: rgba(255,255,255,.88); }
.tile .note2 { font-size: 11px; line-height: 1.35; color: rgba(255,255,255,.72); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: flex; gap: 12px; position: relative; }
.tl li::before { content: ""; position: absolute; left: 8px; top: 22px; bottom: -2px; width: 2px; background: var(--rule); }
.tl li:last-child::before { display: none; }
.tl li.gone::before { background: var(--pos); }
.tl .dot { width: 18px; height: 18px; flex: none; margin-top: 12px; border-radius: 50%; border: 2px solid var(--field-edge); background: var(--card);
  display: grid; place-items: center; position: relative; z-index: 1; }
.tl .dot.done { background: var(--pos); border-color: var(--pos); color: var(--bg); }
.tl .dot.now { border-color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl .dot.now span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }
.tl .dot.dashed { border-style: dashed; }
.tl li.conn .dot { margin-top: 6px; }
.tl .body { flex: 1; min-width: 0; padding-bottom: 12px; }
.tl li.conn .body { padding-bottom: 14px; }
.tl .tlbtn { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; min-height: 44px; justify-content: center; }
.tl .t { font-size: 15px; font-weight: 600; }
.tl li.gone .t { color: var(--dim); font-weight: 500; }
.tl .s { font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.tl .when { font-size: 12.5px; font-weight: 600; color: var(--dim); }

/* ------------------------------------------------------------------ first-run setup */
.onb .help { font-size: 14px; }
.onb .feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.onb .feat li { display: flex; gap: 12px; align-items: flex-start; }
.onb .feat .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); }
.onb .how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onb .how li { display: flex; gap: 12px; align-items: center; padding: 12px; min-height: 64px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.onb .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; }
.onb .shareico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; border: 1px solid var(--field-edge); background: var(--chip); color: var(--accent-ink); }
.sdots { display: flex; align-items: center; gap: 6px; }
.sd { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.sd.done { background: var(--faint); }
.sd.on { width: 22px; border-radius: 4px; background: var(--ink); }
body.no-chrome .tabbar, body.no-chrome .side { display: none; }

/* ------------------------------------------------------------------ desktop: sidebar, two months, detail panel */
.side { display: none; }
@media (min-width: 1024px) {
  body:not(.no-chrome) #app { padding-left: 264px; }
  .tabbar { display: none; }
  .screen { max-width: 980px; padding: 32px 32px 56px; }
  .screen.wide { max-width: 1560px; }
  .side { display: flex; flex-direction: column; gap: 22px; position: fixed; left: 0; top: 0; bottom: 0; width: 264px; padding: 22px 14px;
    overflow-y: auto; background: var(--card); border-right: 1px solid var(--border); z-index: 10; }
  body.no-chrome .side { display: none; }
  .side .brand { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
  .side .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--dim); font-size: 15px; font-weight: 500; }
  .side nav a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; }
  .side .badge { min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: var(--bg); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
  .side .eyebrow { margin: 0 6px 6px; }
  .sidetrip { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 12px; color: var(--ink); font-size: 13.5px; line-height: 1.3; }
  .sidetrip:hover, .side nav a:hover { background: var(--chip); }
  .side nav a[aria-current="page"]:hover { background: var(--ink); }
  .sidefoot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .sidefoot .seg button { font-size: 12px; padding: 0 6px; min-height: 36px; white-space: nowrap; }
  .sidefoot .seg button:first-child { flex: 1.6; }
  .screen > .row > .seg.grow { flex: none; width: 280px; }
  .cal-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cal-wide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toast { left: calc(50% + 132px); }
}
@media (min-width: 1280px) {
  .cal-wide { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .cal-panel { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
}
@media print { .side, .tabbar { display: none; } body #app { padding-left: 0; } }

/* ------------------------------------------------------------------ month at a glance (Today) */
.minical .mc-head, .minical .mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.minical .mc-head { margin-top: 8px; font-size: 11px; font-weight: 600; color: var(--faint); text-align: center; letter-spacing: .06em; }
.minical .mc-day { position: relative; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 3px; gap: 2px; }
.minical .mc-day::before { content: ""; position: absolute; inset: -2px 0; }   /* 44px to tap, 40px to draw */
.minical .mc-day .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12.5px; font-weight: 600; }
.minical .mc-day.today .n { box-shadow: inset 0 0 0 1.5px var(--accent-ink); color: var(--accent-ink); }
.minical .mc-day[aria-pressed="true"] .n { background: var(--ink); color: var(--bg); box-shadow: none; }
.minical .mc-dots { display: flex; align-items: center; justify-content: center; gap: 2px; height: 6px; }
.minical .mc-dots .pdot { width: 6px; height: 6px; }
.minical .mc-more { font-size: 9px; font-weight: 700; line-height: 6px; color: var(--dim); }
@media (min-width: 1024px) { .minical { max-width: 560px; } }
.minical .mc-day.today[aria-pressed="true"] .n { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent-ink); }
