/* VoiceOrch Tour: warm paper in light, warm charcoal in dark; made for a phone held in a car. */
:root {
  color-scheme: light dark;
  --bg: #FAF9F5; --surface: #FFFFFF; --text: #1F1E1D; --muted: #6B6862; --faint: #9A968E; --line: #E6E2D9;
  --accent: #C96442; --route: #3D6FA8; --route-2: #6B8E4E; --route-3: #8B5FA8; --done: #B8B3A8; --ok: #3F7D4E;
  --warn: #B7791F; --bad: #B03A2E; --shadow: 0 1px 3px rgba(0,0,0,.08);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #262624; --surface: #30302E; --text: #F2F0EA; --muted: #B5B1A8; --faint: #8A867E; --line: #44433F;
    --route: #7FA8DA; --route-2: #9BC27C; --route-3: #C49BDF; --done: #5E5C57; --shadow: none; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); display: grid; gap: 12px; background: var(--surface); padding: 24px; border-radius: 16px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: 22px; }
.login-card input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.error { color: var(--bad); min-height: 1em; margin: 0; }

.app { max-width: 720px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left)); display: grid; gap: 12px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.head h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.back { color: var(--accent); font-size: 16px; font-weight: 650; text-decoration: none; padding: 8px 12px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.foot-nav { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 8px 0 0; }
.foot-nav a { color: var(--accent); font-weight: 600; text-decoration: none; padding: 8px 4px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 14px; min-height: 36px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.card { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card h2 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.primary { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; min-height: 44px; font-weight: 600; }
.primary[aria-pressed="true"] { background: var(--ok); }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-height: 44px; }
.ghost[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }

.now-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.now-head h2 { margin: 0; }
.now-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status { margin: 10px 0 0; font-size: 16px; }
.next { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.next-label { margin: 0; font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.next-name { margin: 2px 0 0; font-size: 22px; font-weight: 650; line-height: 1.25; }
.next-meta { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.map-card { padding: 8px; }
.map { height: min(58vh, 520px); border-radius: 10px; overflow: hidden; background: var(--line); }
.map-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.small { min-height: 36px; padding: 4px 10px; font-size: 13px; }
.leaflet-container { font: inherit; }
.leaflet-popup-content { margin: 10px 12px; font-size: 14px; }
.stop-label { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12px; padding: 1px 6px; }
/* Drone availability where you are: from the airspace overlay, when there is one. */
.drone { display: flex; gap: 10px; align-items: center; margin: 2px 4px 8px; font-size: 15px; }
.drone-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--faint); }
.drone.green .drone-dot { background: var(--ok); } .drone.yellow .drone-dot { background: var(--warn); } .drone.red .drone-dot { background: var(--bad); }
.map-key { margin: 4px 8px 4px; font-size: 13px; color: var(--muted); }

/* Drone filming spots for the day: ranked road stretches, drawn on the map too. */
.spots-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.spots { list-style: none; margin: 8px 0 0; padding: 0; }
.spots li { padding: 10px 0; border-top: 1px solid var(--line); }
.spots li:first-child { border-top: 0; }
.spot-head { display: flex; gap: 8px; align-items: baseline; }
.spot-badge { flex: none; min-width: 24px; height: 24px; border-radius: 12px; display: inline-grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700; padding: 0 6px; background: var(--ok); }
.spot-badge.backup { background: var(--warn); } .spot-badge.avoid { background: var(--bad); }
.spot-name { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.3; }
.spot-when { margin: 2px 0 0 32px; font-weight: 600; }
.spot-facts { margin: 4px 0 0 32px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.spot-actions { display: flex; gap: 8px; margin: 8px 0 0 32px; flex-wrap: wrap; }
.spot-views { display: flex; gap: 14px; margin: 8px 0 0 32px; flex-wrap: wrap; align-items: baseline; font-size: 15px; }
.spot-views span { color: var(--muted); font-size: 14px; }
.spot-views a { color: var(--accent); font-weight: 600; padding: 4px 0; }

.ahead, .schedule { list-style: none; margin: 0; padding: 0; }
.ahead li, .schedule li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.ahead li:first-child, .schedule li:first-child { border-top: 0; }
.when { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.what { font-size: 15px; }
.what small { display: block; color: var(--muted); font-size: 13px; }
.kind-stop .what { font-weight: 650; }
.kind-note .what::before { content: "⚑ "; color: var(--warn); }
.kind-gas .what { color: var(--text); }
.schedule li.past { opacity: .5; }
.schedule li.next-up { background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.stage { padding: 10px 0; border-top: 1px solid var(--line); }
.stage:first-child { border-top: 0; padding-top: 0; }
.stage-title { margin: 0; font-weight: 650; }
.stage-meta { margin: 2px 0 6px; color: var(--muted); font-size: 14px; }
.stage a { color: var(--route); font-size: 14px; }
.foot { color: var(--faint); font-size: 12px; text-align: center; margin: 4px 0 0; }
.empty { color: var(--muted); }

/* The next turn, big enough to read at a glance from a phone mount. */
.turn { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--route) 12%, transparent); }
.turn-arrow { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px;
  background: var(--route); color: #fff; font-size: 34px; font-weight: 700; line-height: 1; }
.turn-dist { margin: 0; font-size: 26px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.turn-text { margin: 2px 0 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.turn-then { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.turn.soon { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.turn.soon .turn-arrow { background: var(--accent); }

/* Turn preview: one turn at a time, with Street View facing the way you will arrive. */
.preview { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.preview-where { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.preview-main { display: flex; gap: 12px; align-items: center; }
.preview-text { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.3; }
.preview-road { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.preview-actions { display: flex; gap: 8px; margin-top: 12px; }
.preview-actions .link { flex: 1; display: grid; place-items: center; text-decoration: none; text-align: center; }
.ghost.link { color: var(--text); }
.preview-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.preview-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.turns { list-style: none; margin: 0; padding: 0; }
.turns li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.turns li:first-child { border-top: 0; }
.turns li[aria-current="true"] { background: color-mix(in srgb, var(--route) 10%, transparent); border-radius: 8px; }
.turns .mini { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--route); color: #fff; font-weight: 700; }
.turns .stage-head { display: block; grid-template-columns: none; cursor: default; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding-top: 14px; }
.turns a { font-size: 13px; color: var(--route); white-space: nowrap; }

.keys { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.keys summary { cursor: pointer; color: var(--route); font-weight: 600; min-height: 32px; }
.keys p { color: var(--muted); }
.key-steps { padding-left: 20px; color: var(--muted); }
.key-steps a { color: var(--route); }
.key-form { display: flex; gap: 8px; }
.key-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.key-status { margin: 8px 0 0; }
.cf-form { display: grid; gap: 8px; margin: 12px 0; }
.cf-form input { min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.cf-form label { font-size: 13px; }
