/* JRNY Live Pickups. Layout: phone-first single column per view; demo shows three device panes side by side. */
:root {
  --bg: #F3F5F4;
  --surface: #FFFFFF;
  --surface-2: #EAEEEC;
  --fg: #0D0D0D;
  --muted: #56615C;
  --line: #D8DFDB;
  --accent: #1DB86A;          /* JRNY green */
  --accent-fg: #062B17;       /* text on accent fills */
  --accent-ink: #0E7A44;      /* accent as text on surface */
  --warn: #B86E00;
  --warn-bg: #FFF1D6;
  --bad: #C0392B;
  --bad-bg: #FDE7E4;
  --map-bg: #E4EAE7;
  --map-grid: #D3DBD7;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1110; --surface: #171B19; --surface-2: #202623; --fg: #EEF2F0; --muted: #9AA6A0;
    --line: #2B322F; --accent-ink: #4FD88F; --warn: #F2B24A; --warn-bg: #3A2B0C; --bad: #FF7A6B;
    --bad-bg: #3B1814; --map-bg: #141917; --map-grid: #222925; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1110; --surface: #171B19; --surface-2: #202623; --fg: #EEF2F0; --muted: #9AA6A0;
  --line: #2B322F; --accent-ink: #4FD88F; --warn: #F2B24A; --warn-bg: #3A2B0C; --bad: #FF7A6B;
  --bad-bg: #3B1814; --map-bg: #141917; --map-grid: #222925; color-scheme: dark;
}
/* Guest pages carry Pineapple Tours gold instead of JRNY green. */
.v-guest { --accent: #F2B705; --accent-fg: #2E2200; --accent-ink: #8A6400; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-guest { --accent-ink: #F5C842; } }
:root[data-theme="dark"] .v-guest { --accent-ink: #F5C842; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: 15px;
       line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.15; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ------------------------------------------------ view shell */
.view { max-width: 460px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.view.wide { max-width: 1100px; container-type: inline-size; }
.brandbar { display: flex; align-items: center; gap: 10px; }
.brandmark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-fg);
             display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -.02em; }
.brandname { font-weight: 700; font-size: 15px; }
.brandsub { font-size: 12px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px;
        border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--accent-ink); }
.pill.live .dot { animation: pulse 1.6s ease-in-out infinite; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.ok { color: var(--accent-ink); }
@keyframes pulse { 50% { opacity: .35; } }

/* ------------------------------------------------ guest */
.hero { padding: 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.hero .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 8vw, 38px);
             letter-spacing: -.02em; line-height: 1.02; }
.hero .sub { font-size: 16px; }
.countdown { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--accent-ink); }
.banner { border-radius: var(--r); padding: 12px 14px; background: var(--warn-bg); color: var(--warn);
          display: flex; flex-direction: column; gap: 2px; }
.banner strong { font-size: 15px; }
.banner span { color: var(--fg); opacity: .8; font-size: 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 7px 0;
               position: relative; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .node { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
                  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); z-index: 1; }
.timeline li.done .node { background: var(--surface-2); border-color: var(--surface-2); }
.timeline li.done .name { color: var(--muted); }
.timeline li.next .node { border-color: var(--accent); color: var(--fg); }
.timeline li.mine .node { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.timeline li.mine .name { font-weight: 700; }
.timeline .when { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------ map */
.map { position: relative; border-radius: var(--r); overflow: hidden; background: var(--map-bg);
       border: 1px solid var(--line); aspect-ratio: 16 / 11; max-width: 100%; }
.map svg { display: block; width: 100%; height: 100%; }
.map .leaflet-container { width: 100%; height: 100%; background: var(--map-bg); }
.map-note { position: absolute; right: 6px; top: 6px; font-size: 10px; color: var(--muted); background: var(--surface); padding: 2px 6px; border-radius: 6px; opacity: .9; }
.bus-pulse { animation: buspulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes buspulse { from { transform: scale(1); opacity: .5; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bus-pulse, .pill.live .dot { animation: none; } }

/* ------------------------------------------------ driver */
.v-driver .view { gap: 12px; }
.btn { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.huge { width: 100%; min-height: 76px; font-size: 20px; border-radius: 16px; display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 2px; }
.btn.huge small { font-weight: 500; font-size: 13px; opacity: .8; }
.stopcard .stopname { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.guestrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0;
            border-top: 1px solid var(--line); }
.guestrow:first-child { border-top: 0; }
.guestrow .who { min-width: 0; }
.guestrow .who b { font-size: 16px; }
.seg { display: inline-flex; gap: 6px; }
.seg .btn { padding: 10px 12px; font-size: 14px; }
.seg .btn.on { background: var(--accent); color: var(--accent-fg); }
.seg .btn.on.danger { background: var(--bad); color: var(--surface); }
.upnext { font-size: 13px; }
.upnext li { padding: 3px 0; }
.upnext ol { margin: 0; padding-left: 18px; }

/* ------------------------------------------------ admin */
.admin-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
@container (max-width: 760px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.runlist { display: flex; flex-direction: column; gap: 8px; }
.runitem { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
           padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.runitem.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.runitem .t { font-weight: 700; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.delaybox { display: flex; flex-direction: column; gap: 10px; }
.delayval { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.field { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.stoptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.stoptable td, .stoptable th { padding: 8px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.stoptable th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.stoptable .btn { padding: 6px 10px; font-size: 12px; }
.tablewrap { overflow-x: auto; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
         background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
         z-index: 50; }

/* ------------------------------------------------ sign in */
.signin { max-width: 360px; margin: 10vh auto 0; }

/* ------------------------------------------------ demo shell */
.demo { padding-block: 16px; padding-inline: 16px; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.demo-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; }
.demo-head h1 { font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; }
.demo-head p { margin: 4px 0 0; color: var(--muted); max-width: 62ch; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface);
            border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.controls .clock { font-weight: 700; padding: 0 6px; }
.panes { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.pane { background: var(--bg); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; min-width: 0; }
.pane-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface);
          border-bottom: 1px solid var(--line); }
.pane .view { padding: 14px; max-width: none; }
.pane-body { max-height: 820px; overflow-y: auto; }
.tabs { display: none; gap: 6px; }
.tabs .btn.on { background: var(--fg); color: var(--bg); }
@media (max-width: 1100px) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: flex; }
  .pane:not(.show) { display: none; }
  .pane-body { max-height: none; }
}

#a-map { aspect-ratio: auto; height: clamp(220px, 34vw, 320px); }

/* ------------------------------------------------ v2: guest */
.stack.tight { gap: 4px; }
.pickup { border: 2px solid var(--accent); }
.pickup-time { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -.01em; line-height: 1; }
.pickup-name { font-size: 18px; font-weight: 700; }
.instructions { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.instructions p { margin: 2px 0 0; }
.faq { border-top: 1px solid var(--line); padding: 10px 0; }
.faq:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq p { margin: 6px 0 0; color: var(--muted); }
.timeline li.dest .node.flag { background: var(--fg); border-color: var(--fg); border-radius: 5px; }
.timeline li.dest::before { display: none; }
.banner.neutral { background: var(--surface-2); color: var(--fg); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; color: var(--fg); }
.powered { display: flex; align-items: center; justify-content: center; gap: 6px; padding-block: 6px 2px;
           color: var(--muted); text-decoration: none; font-size: 12px; }
.powered .jrny-word { font-weight: 800; letter-spacing: .06em; color: var(--fg); background: #1DB86A; color: #062B17;
                      padding: 2px 7px; border-radius: 6px; font-size: 12px; }

/* ------------------------------------------------ v2: driver */
.seg.wrap { flex-wrap: wrap; }
.sheet { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sheet li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.sheet li:first-child { border-top: 0; }
.sheet .t { font-weight: 700; }
.sheet li.dest { color: var(--fg); }
.upnext .destli { list-style: none; margin-left: -18px; padding-top: 6px; }

/* ------------------------------------------------ v2: office */
.officetabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; }
.planbar { gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 520px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.planstops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.planstop { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.planstop:first-child { border-top: 0; }
.ord { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.seqn { font-weight: 800; }
.btn.sm { padding: 2px 8px; font-size: 13px; border-radius: 8px; }
.field.time { width: auto; padding: 6px 8px; }
.flagmark { width: 18px; height: 18px; border-radius: 5px; background: var(--fg); margin-top: 22px; }
.preview { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.preview summary { cursor: pointer; font-weight: 600; }
.msg { padding-top: 8px; }
.msg p { margin: 4px 0 0; background: var(--surface-2); border-radius: 12px 12px 12px 4px; padding: 10px 12px; font-size: 14px; }
.outbox ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.outbox li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 560px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-family: var(--font-display); font-size: 26px; }
.ticket .q { margin: 0; font-size: 16px; font-weight: 600; }
.destrow td { border-top: 2px solid var(--line); }

/* ------------------------------------------------ v3 */
.langsel { width: auto; padding: 6px 8px; font-size: 13px; }
.review { border: 2px solid var(--accent); }
.revtitle { font-family: var(--font-display); font-size: 24px; letter-spacing: -.01em; }
.bussel { width: auto; padding: 4px 8px; font-size: 13px; }
.deadline { gap: 10px; }
.evidence { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: grid; place-items: center;
            padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.evcard { width: min(680px, 100%); max-height: 100%; overflow: auto; }
.evtext { white-space: pre-wrap; font: 14px/1.55 var(--font-ui); background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin: 0; }
@media print {
  body * { visibility: hidden; }
  .evidence, .evidence * { visibility: visible; }
  .evidence { position: absolute; inset: 0; background: none; }
  .evidence .btn { display: none; }
}

/* ------------------------------------------------ v4 */
.sel { user-select: all; -webkit-user-select: all; }
.contact-rows { display: flex; flex-direction: column; }
.crow { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: baseline; }
.crow:first-child { border-top: 0; }
.crow a { color: var(--fg); font-weight: 600; overflow-wrap: anywhere; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.confirm { border-style: dashed; }
.err { color: var(--bad); }
.bookings summary { cursor: pointer; font-size: 13px; }
.brow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--line); }
.skipped { border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.addstop { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.pane-body { overflow-anchor: none; }

/* ------------------------------------------------ go-live: lock-down */
.navbtn { justify-content: center; min-height: 48px; font-size: 16px; }
details.qa > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.qa > summary::after { content: '+'; font-size: 16px; color: var(--muted); }
details.qa[open] > summary::after { content: '\2212'; }
.solo .demo-head, .solo .tabs, .solo .pane-h { display: none; }
.solo .panes { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin: 0 auto; }
.solo .pane { border: 0; border-radius: 0; background: transparent; }
.solo .pane:not(.show) { display: none; }
.solo .pane-body { max-height: none; }
.solo.demo, .solo .demo { padding-inline: 0; }
.seg .chip { padding: 6px 12px; font-size: 13px; border-radius: 999px; }

.tagline { margin: 2px 0 10px; font-size: 12.5px; letter-spacing: .01em; color: var(--muted, #8b949e); }
