/* Vegas Buddy. Layout: a phone on the dash. A sign board on top (a purple marquee with a neon edge), the next
   landmark as the hero card, big left/right buttons, tabs at the bottom. Night theme = desert night (deep indigo,
   neon pink and amber); day theme = warm sand with the same sign.
   Module styles live in css/*.css and use only these tokens. */
@font-face{font-family:"Overpass";src:url(fonts/overpass.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Overpass Mono";src:url(fonts/overpass-mono.woff2) format("woff2");font-weight:300 700;font-display:swap}
/* Overpass draws the middle dot "·" with zero width; borrow it from a system font */
@font-face{font-family:"Overpass";src:local("Helvetica Neue"),local("HelveticaNeue"),local("Roboto"),local("Arial");unicode-range:U+00B7,U+2022;font-weight:100 900}

:root{
  /* night (default): a desert night. Deep indigo sky, a purple marquee for the sign, warm neon amber and pink. */
  --bg:#0e0a24; --surface:#1a1438; --surface-2:#261d4c; --line:#3b3168;
  --fg:#f7f1ff; --fg-2:#dcd2f2; --muted:#a99ecb;
  --sign:#3a1368; --sign-2:#5b2196; --sign-fg:#ffffff; --sign-edge:#ff6fb7;
  --accent:#ffb02e; --accent-fg:#22120a; --link:#ffb84a; --shield:#ff4fa3; --danger:#ff5a52; --ok:#4fd6a0;
  --farm:#b7d84a; --hist:#ff9a5c; --nature:#4fd0e0; --town:#e6d7c0; --stop:#b79cff; --odd:#ff6fb7;
  --st-ca:#ffb02e; --st-nv:#ff4fa3; --st-or:#4fd6a0; --st-wa:#4fd0e0; --on-cat:#150c26;
  --neon:#ff4fa3; --glow:0 0 0 1px rgba(255,111,183,.55),0 0 22px rgba(255,79,163,.35);
  --shadow:0 1px 0 rgba(255,255,255,.05),0 10px 26px rgba(4,2,16,.5);
  --display:"Overpass",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"Overpass Mono",ui-monospace,Menlo,monospace;
  --radius:14px;
  color-scheme:dark;
}
:root[data-theme="light"]{
  /* day: warm sand and sun, the same purple sign so it stays readable in direct sunlight */
  --bg:#fbf3ea; --surface:#ffffff; --surface-2:#f7ebdf; --line:#e4d4c5;
  --fg:#21123a; --fg-2:#3a2a55; --muted:#6c5f84;
  --sign:#3a1368; --sign-2:#5b2196; --sign-fg:#ffffff; --sign-edge:#ffd9ec;
  --accent:#ffab1f; --accent-fg:#22120a; --link:#a80f66; --shield:#c2306f; --danger:#c62f27; --ok:#167a52;
  --farm:#5f7d0e; --hist:#b5571a; --nature:#0f7f93; --town:#7a6a48; --stop:#6a4cb8; --odd:#c2306f;
  --st-ca:#c97a00; --st-nv:#c2306f; --st-or:#167a52; --st-wa:#0f7f93; --on-cat:#fff;
  --neon:#c2306f; --glow:0 0 0 1px rgba(194,48,111,.25),0 6px 18px rgba(194,48,111,.14);
  --shadow:0 1px 2px rgba(40,20,60,.08),0 6px 18px rgba(40,20,60,.09);
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{height:100%}
/* The top bar is taller by the top safe-area inset (it carries it, see .top), so whatever scrolls into view lands that
   much lower too: module scroll-margins (72 px and so on) are measured for the bar without it. 0 on most screens. */
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--display);font-size:16px;line-height:1.45;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit;cursor:pointer}
a{color:inherit}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:6px}
[hidden]{display:none!important}

.app{max-width:600px;margin:0 auto;min-height:100%;display:flex;flex-direction:column}
main{flex:1;padding-left:max(14px,env(safe-area-inset-left,0px));padding-right:max(14px,env(safe-area-inset-right,0px));padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
.view{display:grid;gap:14px;padding-block:6px 20px;min-width:0}
.view>*{min-width:0}

/* top bar. It carries the top safe-area inset itself, so when it sticks to the top of an installed app on a phone
   with a notch or Dynamic Island, its background covers the status bar and the title stays below it. */
.top{display:flex;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 8px max(14px,env(safe-area-inset-left,0px));position:sticky;top:0;z-index:12;background:var(--bg)}
.logo{width:34px;height:34px;flex:none;display:block}
.brand{display:grid;line-height:1.15;min-width:0;flex:1}
.brand b{font-weight:900;font-size:1.15rem;letter-spacing:.01em}
.brand span{color:var(--muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill{font-family:var(--mono);font-size:.72rem;font-weight:700;letter-spacing:.08em;padding:4px 8px;border-radius:99px;background:var(--surface-2);color:var(--muted);flex:none}
.pill[data-s="gps"]{background:var(--sign);color:#fff}
.pill[data-s="demo"]{background:var(--accent);color:var(--accent-fg)}
.pill[data-s="manual"]{background:var(--shield);color:#fff}
.pill[data-s="off-route"]{background:var(--danger);color:#fff}
.pill[data-s="wait"]{animation:blink 1s infinite}
@keyframes blink{50%{opacity:.4}}
.icon-btn{background:none;border:0;width:42px;height:42px;display:grid;place-items:center;color:var(--muted);border-radius:10px;flex:none}
.icon-btn svg{width:24px;height:24px}
.icon-btn:active{background:var(--surface-2)}

/* the highway sign */
.story-preview{isolation:isolate;position:relative;overflow:hidden;display:grid;align-content:end;
  min-height:166px;background:var(--sign);color:#fff;border-radius:var(--radius);box-shadow:var(--shadow)}
.story-preview .photo{position:absolute;inset:0;margin:0;z-index:-1}
.story-preview .photo img{object-position:50% 38%}
.story-preview .photo::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(8,24,21,.91),rgba(8,24,21,.72) 48%,rgba(8,24,21,.14))}
.story-preview .photo figcaption{z-index:1;left:auto;max-width:44%;padding:3px 8px;background:rgba(0,0,0,.76)}
.preview-copy{padding:16px 18px;pointer-events:none}
.preview-copy p{margin:0 0 5px;font-size:.83rem;font-weight:700}
.preview-copy h2{margin:0 0 10px;max-width:15ch;font:800 1.65rem/1.04 var(--display);text-wrap:balance}
#previewStory{pointer-events:auto;min-height:44px;padding:7px 13px;border:1px solid #fff;border-radius:999px;
  background:#fff;color:var(--sign);font:inherit;font-weight:800}
.preview-transcript{margin:0;padding:12px 18px;background:var(--surface);color:var(--fg);line-height:1.45}
.sign-board{background:linear-gradient(168deg,var(--sign-2),var(--sign) 58%);border-radius:var(--radius);padding:14px 16px 10px;color:var(--sign-fg);
  box-shadow:inset 0 0 0 3px var(--sign),inset 0 0 0 5px var(--sign-edge),var(--glow),var(--shadow);display:grid;gap:6px}
.sign-row{display:flex;align-items:center;gap:8px}
.dir-badge{font-weight:900;letter-spacing:.14em;font-size:1rem;background:#fff;color:var(--sign);padding:3px 10px 1px;border-radius:5px}
.state-badge{font-weight:900;letter-spacing:.1em;font-size:.82rem;border:2px solid rgba(255,255,255,.85);padding:1px 7px 0;border-radius:5px}
.speed{margin-left:auto;font-family:var(--mono);font-weight:700;font-size:1.3rem;font-variant-numeric:tabular-nums}
.speed small{font-size:.7rem;margin-left:3px;opacity:.8}
.mile-row{display:flex;gap:18px;align-items:flex-end}
.mile-row small{display:block;font-size:.66rem;letter-spacing:.16em;font-weight:700;opacity:.8}
.mile output{font-family:var(--mono);font-weight:700;font-size:3.2rem;line-height:.95;font-variant-numeric:tabular-nums}
.near{min-width:0;flex:1}
.near span{font-weight:800;font-size:1.22rem;line-height:1.15;display:block;text-wrap:balance;min-width:0;overflow-wrap:anywhere}
.sign-foot{display:flex;justify-content:space-between;gap:10px;font-family:var(--mono);font-size:.74rem;opacity:.85;min-height:1em}

/* route ribbon: one colored stretch per state in the data (California and Nevada; .seg-or and .seg-wa are the
   engine's, unused here) */
.ribbon{position:relative;height:30px;margin-top:2px}
.ribbon .track{position:absolute;left:0;right:0;top:12px;height:6px;border-radius:3px;overflow:hidden;background:rgba(255,255,255,.18)}
.ribbon .track>div{position:absolute;top:0;bottom:0;opacity:.45}
.ribbon .seg-ca{background:var(--st-ca)}.ribbon .seg-nv{background:var(--st-nv)}.ribbon .seg-or{background:var(--st-or)}.ribbon .seg-wa{background:var(--st-wa)}
.ribbon .done{position:absolute;left:0;top:12px;height:6px;border-radius:3px;background:#fff;opacity:.9}
.ribbon .tick{position:absolute;top:10px;width:1px;height:10px;background:rgba(255,255,255,.35)}
.ribbon .tick.got{background:var(--accent);width:2px}
.ribbon .lbl{position:absolute;top:21px;font-size:.58rem;font-weight:800;letter-spacing:.08em;opacity:.85;transform:translateX(-50%)}
.ribbon .you{position:absolute;top:6px;width:18px;height:18px;margin-left:-9px;border-radius:50%;background:var(--accent);border:3px solid #fff;box-shadow:0 0 0 4px rgba(0,0,0,.15)}

/* next landmark */
.next{background:var(--surface);border-radius:var(--radius);display:grid;overflow:hidden;border-top:5px solid var(--c,var(--line));box-shadow:var(--shadow)}
.next-body{padding:14px 16px 16px;display:grid;gap:8px;min-width:0}
.next.welcome{padding:16px;gap:10px;border-top-color:var(--accent)}
.next .meta{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.74rem;letter-spacing:.12em;font-weight:800;text-transform:uppercase;color:var(--c,var(--accent))}
.next .count{font-family:var(--display);font-size:2.5rem;font-weight:900;line-height:1;font-variant-numeric:tabular-nums;display:flex;align-items:baseline;gap:6px}
.next .count small{font-size:.85rem;color:var(--muted);font-weight:700}
.next .count .eta{font-family:var(--mono);font-weight:600}
.next .side{font-weight:900;font-size:1rem;color:var(--fg);letter-spacing:.04em;margin-left:4px}
.next h2{margin:0;font-size:1.5rem;line-height:1.15;font-weight:900;text-wrap:balance;cursor:pointer}
.next p{margin:0;color:var(--fg-2)}
.next .acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px;align-items:stretch}
.next .acts button{border:1px solid var(--line);background:var(--surface-2);border-radius:10px;padding:10px 14px;font-weight:800;min-height:44px}
.next .acts button:first-child{background:var(--c,var(--accent));color:var(--on-cat);border-color:transparent}
.next .acts button.ico{width:46px;padding:0;display:grid;place-items:center}
.next .acts button.ico svg{width:20px;height:20px}
.next .acts button.ico:nth-child(3){margin-left:auto}
.next.flash{animation:flash .9s ease}
@keyframes flash{0%{box-shadow:0 0 0 0 var(--c)}40%{box-shadow:0 0 0 6px var(--c)}100%{box-shadow:var(--shadow)}}
body.talking .next .count .n{color:var(--c,var(--accent))}
.welcome-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:4px}
.welcome-stats div{background:var(--surface-2);border-radius:10px;padding:10px;display:grid;gap:2px}
.welcome-stats b{font-family:var(--mono);font-size:1.25rem}
.welcome-stats span{font-size:.75rem;color:var(--muted);line-height:1.2}
/* install: the button (welcome card and Settings) */
.install-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.install-btn svg{width:20px;height:20px;flex:none;color:var(--link)}
.welcome-install{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.welcome-install .install-btn{min-height:46px;padding:10px 18px}
#installRow .install-btn{justify-self:start}
/* "Get the iPhone app" (main.js appStoreLink: the welcome card and Settings > About, in a browser on an iPhone or iPad):
   Apple's badge as it comes (44 px tall, never under Apple's 40), with a quarter of its height (11 px) clear on every
   side, then the words, all one link. Beside the badge the words wrap; on a very narrow screen they go under it. */
.get-app{display:flex;flex-wrap:wrap;align-items:center;gap:11px 12px;min-height:44px;color:var(--fg);text-decoration:none}
.get-app-badge{display:block;flex:none;height:44px;width:auto}
.get-app-text{flex:1 1 130px;min-width:0;display:grid;gap:1px;line-height:1.25}
.get-app-text b{font-weight:900}
.get-app-text small{color:var(--muted);font-size:.8rem;font-weight:600}
.welcome-install .get-app{flex:1 1 100%;margin-block:1px} /* + the card's 10 px gap = 11 px clear above and below the badge */
.get-app-row{gap:12px}
.farm{--c:var(--farm)}.hist{--c:var(--hist)}.nature{--c:var(--nature)}.town{--c:var(--town)}.stop{--c:var(--stop)}.odd{--c:var(--odd)}

/* photos */
.photo{margin:0;position:relative;background:var(--surface-2);overflow:hidden}
.photo img{display:block;width:100%;height:100%;object-fit:cover}
.photo.hero{aspect-ratio:16/9;max-height:240px}
.photo.full{aspect-ratio:4/3;border-radius:12px;max-height:340px}
.photo.thumb{width:72px;height:72px;border-radius:10px;flex:none}
.photo figcaption{position:absolute;right:0;bottom:0;left:0;padding:16px 10px 5px;font-size:.66rem;text-align:right;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.6))}
.photo figcaption a{text-decoration:none;opacity:.9}

.look{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.big-btn{min-height:72px;border-radius:var(--radius);border:2px solid var(--line);background:var(--surface);font-weight:800;font-size:1rem;line-height:1.2;padding:10px;display:flex;align-items:center;justify-content:center;gap:8px;text-align:center;box-shadow:var(--shadow)}
.big-btn:active{background:var(--surface-2);transform:translateY(1px)}
.big-btn .arrow{color:var(--link);font-size:1.2rem}

.controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.primary,.secondary{border-radius:12px;padding:14px;font-weight:800;font-size:1rem;border:2px solid transparent;min-height:50px}
.primary{background:var(--accent);color:var(--accent-fg)}
.secondary{background:var(--surface-2);border-color:var(--line)}
.secondary[aria-pressed="false"]{opacity:.65}
.primary:disabled,.secondary:disabled,.secondary[aria-disabled="true"]{opacity:.5}
.demo-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:.9rem}
.seg{display:inline-flex;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:3px;gap:3px}
.seg button{border:0;background:none;padding:8px 12px;border-radius:7px;font-weight:700;color:var(--muted);min-height:38px}
.seg button[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.seg.wide{display:flex}.seg.wide button{flex:1}
.link{background:none;border:0;color:var(--link);font-weight:800;padding:6px;min-height:36px}
.safety{color:var(--muted);font-size:.8rem;margin:0;text-align:center}
.sub{margin:6px 0 0;font-size:.74rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:800}

/* up next + services */
.upnext ol{list-style:none;margin:6px 0 0;padding:0;display:grid;background:var(--surface);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.upnext li{display:grid;grid-template-columns:46px 1fr 20px;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--line);cursor:pointer;border-left:4px solid var(--c)}
.upnext li:last-child{border-bottom:0}
.upnext .d{font-family:var(--mono);font-weight:700;text-align:right;font-variant-numeric:tabular-nums}
.upnext .nm{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upnext .sd{color:var(--link);font-size:.9rem}
/* a turn-off (a mission off I-15): "Detour: 5 mi east at exit 54" under its name */
.upnext .det{grid-column:2/4;margin-top:-8px;font-size:.78rem;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 2.6.0: "New in Vegas Buddy" (once, for returning users) and, in the iPhone app, "An update is ready in the App Store" */
.whats-new{margin-top:12px;background:var(--surface);border-radius:var(--radius);border-top:5px solid var(--hist);box-shadow:var(--shadow);padding:14px 16px;display:grid;gap:8px}
.whats-new .meta{font-size:.74rem;letter-spacing:.12em;font-weight:800;color:var(--hist)}
.whats-new h2{margin:0;font-size:1.25rem;line-height:1.2;font-weight:900;text-wrap:balance}
.whats-new p{margin:0;color:var(--fg-2);line-height:1.4}
.whats-new .acts{display:flex;gap:8px;flex-wrap:wrap}
.whats-new .acts button{flex:1 1 140px;min-height:48px;padding:10px}
.store-update{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-top:10px;padding:8px 12px;border-radius:12px;background:var(--surface);border-left:4px solid var(--accent);font-size:.9rem;font-weight:700}
.store-update span{flex:1 1 100%}
.store-update a,.store-update .link{min-height:44px;display:inline-flex;align-items:center;color:var(--link)}
.svc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:6px}
.svc-item{display:flex;gap:10px;align-items:flex-start;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;min-width:0}
.svc-item .ic{font-size:1.3rem;line-height:1.2}
.svc-item .tx{display:grid;min-width:0}
.svc-item b{font-family:var(--mono);font-size:1.05rem}
.svc-item small{color:var(--muted);font-size:.74rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis}
.svc-item small.brands{color:var(--fg-2)}

/* ahead */
.view-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.view-title{margin:4px 0 0;font-size:1.5rem;font-weight:900}
.lede{margin:0;color:var(--muted)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:99px;padding:7px 12px;font-size:.86rem;font-weight:700;display:inline-flex;align-items:center;gap:7px;min-height:36px}
.chip i{width:10px;height:10px;border-radius:50%;background:var(--c)}
.chip[aria-pressed="false"]{opacity:.4}
.ahead{list-style:none;margin:0;padding:0;display:grid}
.ahead li.row{display:grid;grid-template-columns:52px 1fr auto;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);cursor:pointer;align-items:start}
.ahead .state-sep{padding:14px 0 4px;font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;font-weight:900;color:var(--link)}
.ahead .d{font-family:var(--mono);font-weight:700;font-size:1.1rem;text-align:right;font-variant-numeric:tabular-nums}
.ahead .d small{display:block;font-size:.66rem;color:var(--muted)}
.ahead .body{min-width:0;display:grid;gap:3px}
.ahead .m{font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--c,var(--muted))}
.ahead b{font-size:1.05rem}
.ahead p{margin:0;color:var(--muted);font-size:.93rem}
.ahead p.rest-status{margin:0;color:var(--muted);font-size:.93rem} /* a Caltrans closure note on a rest-area row (3.0.8): the same look as the other stop notes */
.ahead .rowacts{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:.85rem}
.ahead .rowacts .link{padding:4px 0;margin-right:10px;min-height:32px}
.ahead .got{color:var(--ok);font-weight:800}
.ahead .stop-row{grid-template-columns:52px 1fr}
.more-btn{justify-self:center}
.empty{color:var(--muted);padding:20px 0}

/* tabs */
.tabs{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:center;background:var(--bg);background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid var(--line);
  padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));z-index:10}
.tabs button{flex:1;max-width:120px;background:none;border:0;display:grid;justify-items:center;gap:2px;font-size:.7rem;font-weight:800;color:var(--muted);padding:6px 0;min-height:48px}
.tabs svg{width:22px;height:22px}
.tabs button[aria-current="page"]{color:var(--link)}

/* sheets */
.sheet-back{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:20}
.sheet{position:fixed;left:0;right:0;bottom:0;max-width:600px;margin:0 auto;max-height:90vh;max-height:90svh;overflow:auto;overscroll-behavior:contain;background:var(--surface);border-radius:18px 18px 0 0;z-index:21;
  padding:14px max(18px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));display:grid;gap:14px;
  grid-auto-rows:max-content; /* a height-capped grid squeezes overflow:hidden rows (photos) to 0 px and they cover the text */box-shadow:0 -10px 40px rgba(0,0,0,.35)}
.sheet-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:1.2rem;position:sticky;top:-14px;background:var(--surface);padding:8px 0;z-index:1}
.sheet-head .link{min-height:44px;min-width:44px}
.field{display:grid;gap:8px;font-weight:700}
.field output{font-family:var(--mono);color:var(--link);font-weight:600;margin-left:6px}
/* width:100% and min-width:0: a select is as wide as its longest option ("Grandma (English (United Kingdom)) (en-GB)"),
   which otherwise widens the whole Settings sheet past a 360 to 390 px screen */
.field select{background:var(--surface-2);border:1px solid var(--line);color:var(--fg);border-radius:10px;padding:10px;font:inherit;font-weight:500;width:100%;min-width:0}
input[type=range]{width:100%;accent-color:var(--accent)}
.toggle{display:flex;gap:10px;align-items:center;font-weight:600}
.toggle input{width:22px;height:22px;accent-color:var(--accent);flex:none}
.hint{color:var(--muted);font-weight:500;font-size:.8rem}
.danger{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.fine{color:var(--muted);font-size:.8rem;margin:0}
.place-sheet .meta{font-size:.74rem;letter-spacing:.1em;font-weight:800;text-transform:uppercase;color:var(--c)}
.place-sheet p{margin:0;color:var(--fg-2)}
.place-sheet p.lead{font-size:1.05rem;color:var(--fg)}
.place-sheet .spot{background:var(--surface-2);border-radius:10px;padding:10px 12px;font-weight:700}
.place-sheet .acts{display:flex;gap:10px;flex-wrap:wrap}
.place-sheet .fine a{color:var(--link)}

.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(90px + env(safe-area-inset-bottom,0px));background:var(--fg);color:var(--bg);font-weight:800;padding:10px 16px;border-radius:22px;z-index:25;width:max-content;max-width:calc(100% - 32px);text-align:center;box-shadow:var(--shadow);pointer-events:none}
.update{position:fixed;left:50%;transform:translateX(-50%);top:calc(10px + env(safe-area-inset-top,0px));background:var(--shield);color:#fff;font-weight:700;padding:8px 8px 8px 16px;border-radius:99px;z-index:30;display:flex;align-items:center;gap:6px;box-shadow:var(--shadow);max-width:calc(100% - 24px)}
.update .link{color:#fff;text-decoration:underline}
.update span{line-height:1.3}

.glance-btn{background:rgba(255,255,255,.14);border:0;color:var(--sign-fg);width:36px;height:36px;border-radius:8px;display:grid;place-items:center;flex:none}
.glance-btn svg{width:20px;height:20px}
.glance-btn[aria-pressed="true"]{background:#fff;color:var(--sign)}
/* glance mode: only the sign, the next landmark and the two big buttons, in large type */
body.glance #upNext,body.glance #svcRow,body.glance #liveBlock,body.glance .safety,body.glance #spotCard,body.glance .next .photo,body.glance .next p,body.glance .demo-bar{display:none!important}
body.glance .mile output{font-size:4.2rem}
body.glance .near span{font-size:1.5rem}
body.glance .next .count{font-size:4rem}
body.glance .next h2{font-size:2rem}
body.glance .big-btn{min-height:96px;font-size:1.15rem}
@media (min-width:700px){ .next .count{font-size:2.8rem} }
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Dominares brand touches (brand kit: emerald #00B070 marks, #2FD394 text on dark, #007A4D text on light) */
:root{--dom:#2FD394;--dom-mark:#00B070}
:root[data-theme="light"]{--dom:#007A4D;--dom-mark:#00B070}
.byline{font-size:.75rem;color:var(--dom);text-decoration:none;letter-spacing:.02em}
.byline:hover{text-decoration:underline}
/* the welcome card's last row: the byline, then Privacy (privacy.html), each link 44 px tall; the negative margins
   keep the row about as tall as the byline alone was */
.byline-row{display:flex;flex-wrap:wrap;align-items:center;column-gap:6px;margin:-10px 0 -14px;font-size:.75rem;color:var(--dom)}
.byline-row a{display:inline-flex;align-items:center;min-height:44px}
/* Drive's last line: Privacy under the safety line, a 44 px target (the notice's link on every visit, not only the first) */
.safety-pv{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0 8px;color:var(--link);font-weight:800;text-underline-offset:2px}
/* About: the privacy notice (privacy.html, in a new tab), a whole-row link like the Send feedback button above it */
.privacy-row{gap:6px}
.privacy-open{display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none}
/* About: Made by Dominares, and under it the family's other product, each one link of at least 44 px */
.family{display:grid;gap:8px;margin:6px 0 10px}
.made-by{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#000;color:#fff;text-decoration:none}
.made-by .dom-mark{width:34px;height:30px;color:var(--dom-mark);flex:none}
.made-by span{display:grid;gap:2px}
.made-by b{font-size:.95rem;letter-spacing:.04em}
.made-by small{font-size:.78rem;color:#2FD394}
.also-from{display:flex;align-items:center;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;font-size:.88rem;line-height:1.35;color:var(--fg-2);text-decoration:none}
.also-from b{color:var(--dom);font-weight:800}
.moved{position:fixed;left:12px;right:12px;top:calc(env(safe-area-inset-top) + 8px);z-index:60;background:#000;color:#fff;border:1px solid #00B070;border-radius:12px;padding:12px 14px;font-size:.9rem;line-height:1.35}
.moved a{color:#2FD394;font-weight:700}
.whats-new .wn-list{margin:0;padding-left:1.1em;display:grid;gap:5px;color:var(--fg-2);line-height:1.4}

/* ---------- 3.0.1 ---------- */
/* notices on Drive: location off, Precise Location off, a drive to resume, the end of a demo, a trip saved */
.drive-notice{display:grid;gap:10px;margin:10px 0}
.notice{background:var(--card);border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:var(--radius);padding:12px 14px;box-shadow:var(--shadow)}
.notice b{display:block;font-size:1.02rem}
.notice p{margin:4px 0 0;color:var(--fg);line-height:1.4}
.notice .acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.notice .acts button{flex:1 1 auto;min-height:44px}
.notice-denied,.notice-precise{border-left-color:#d9822b}
/* GPS on, not on I-15 yet */
.next.not-on-road .acts{display:flex;flex-wrap:wrap;gap:8px}
.next.not-on-road .acts button{flex:1 1 auto;min-height:44px}
/* the status line may wrap to a second line instead of being cut ("Not on I-15 ri…") */
.brand span#statusText{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
/* captions: what Vegas Buddy is saying, above the tab bar on every tab, with Repeat and Stop */
.caption{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(66px + env(safe-area-inset-bottom,0px));z-index:24;width:calc(100% - 20px);max-width:580px;display:flex;align-items:center;gap:4px;background:var(--fg);color:var(--bg);border-radius:14px;padding:6px 6px 6px 14px;box-shadow:var(--shadow)}
.caption p{flex:1;margin:0;font-weight:700;font-size:.92rem;line-height:1.3;max-height:3.9em;overflow-y:auto;overscroll-behavior:contain}
.caption .icon-btn{color:var(--bg);flex:none;min-width:44px;min-height:44px}
body.captioned main{padding-bottom:calc(150px + env(safe-area-inset-bottom,0px))}
body.captioned .toast{bottom:calc(150px + env(safe-area-inset-bottom,0px))}
@media (prefers-reduced-motion:no-preference){.caption{animation:capIn .18s ease-out}@keyframes capIn{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}}
/* Help, Send feedback and the version in About; Rate in the iPhone app */
.safety-fb{min-height:44px;padding:0 8px;font-weight:800;font-size:inherit;color:var(--link)}
.app-version{margin:0 0 6px}
.help-row,#rateRow{gap:6px}
.help-open,.rate-open{display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none}
/* the end-of-the-road card keeps the same padding as the others */
.next.end-of-road .next-body{padding-top:14px}
/* ---------- 3.0.2 design pass (Joseph, 2026-11-18: "less congested, more organized, more user friendly and attractive";
   he picked "B · Focused"): calmer surfaces with soft shadows instead of borders, one big Start GPS with Demo drive as a
   link, no barcode of landmark ticks on the sign, one row of actions while driving (Where to? / Narration / End), and
   Drive shows only what matters now (the hills chart and the next stops moved to Ahead; index.html). ---------- */
:root{--radius:18px}
:root[data-theme="light"]{--shadow:0 1px 2px rgba(40,20,60,.05),0 12px 28px -14px rgba(40,20,60,.26)}
main{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.sign-board{border-radius:22px;padding:16px 18px 10px}
.ribbon .tick{display:none}
.ribbon .tick.got{display:block}
#startControls{grid-template-columns:1fr;gap:2px}
#startGps{min-height:58px;font-size:1.15rem;border-radius:16px;box-shadow:0 8px 18px -8px rgba(200,140,0,.7)}
#startDemo{background:none;border:0;box-shadow:none;min-height:44px;color:var(--link);padding:4px 16px;justify-self:center}
.secondary{border-color:transparent;background:var(--surface);box-shadow:var(--shadow)}
.big-btn{border:0;box-shadow:var(--shadow);min-height:60px}
.next.welcome{border-top:0;padding:20px 20px 16px}
.next.welcome h2{font-size:1.6rem}
.upnext ol,.svc-item{border:0;box-shadow:var(--shadow)}
.svc-item{border-radius:16px}
.tabs{border-top-color:transparent;box-shadow:0 -1px 0 var(--line)}
.caption{background:rgba(17,22,18,.94);color:#fff;border:1px solid rgba(255,255,255,.1);border-radius:18px;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.caption .icon-btn{color:#fff}
/* one row while a drive or demo runs: Where to? (nav.js puts it here), Narration, End */
#runControls.with-nav{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,.8fr);gap:8px}
#runControls.with-nav>#navSearch{display:grid;min-width:0}
#runControls.with-nav .nav-pill{min-height:52px;height:100%;padding:6px 10px 6px 6px;gap:8px;min-width:0}
#runControls.with-nav .nav-pill small{display:none}
#runControls.with-nav .nav-pill-ic{width:36px;height:36px}
#runControls.with-nav .nav-pill-tx b{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#runControls.with-nav .secondary{min-height:52px;padding:8px 6px;font-size:.92rem;line-height:1.15}
@media (max-width:379px){#runControls.with-nav .nav-pill-ic{display:none}#runControls.with-nav .nav-pill{padding-left:12px}}
/* Drive's last line: the way to the Ahead tab. Up next stays built but hidden (the Ahead list has the same places). */
.ahead-link{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 6px;min-height:48px;background:none;border:0;color:var(--muted);font-size:.92rem;font-weight:600;text-align:center}
.ahead-link b{color:var(--link);font-weight:800}
#view-drive #upNext{display:none!important}
#view-ahead[data-mode="stops"] #svcRow{display:none}
/* motion (3.0.4, "feels premium"): a tab fades up into place, sheets rise from the bottom, the dim behind them fades,
   and buttons give a little under a finger. Nothing moves with Reduce Motion on (the rule above turns it all off). */
@media (prefers-reduced-motion:no-preference){
  .view:not([hidden]){animation:viewIn .22s cubic-bezier(.2,.8,.3,1)}
  .sheet:not([hidden]){animation:sheetUp .26s cubic-bezier(.2,.8,.3,1)}
  .sheet-back:not([hidden]){animation:fadeIn .2s ease-out}
  .next{animation:cardIn .25s ease-out}
  .primary,.secondary,.big-btn,.nav-pill,.svc-item{transition:transform .12s ease,box-shadow .2s ease,background-color .15s ease}
  .primary:active,.secondary:active,.big-btn:active,.nav-pill:active,.svc-item:active{transform:scale(.97)}
  .tabs button svg{transition:transform .18s ease}
  .tabs button[aria-current="page"] svg{transform:translateY(-1px) scale(1.08)}
}
@keyframes viewIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes sheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes cardIn{from{opacity:.4}to{opacity:1}}

/* a phone held sideways in a dash mount: the sign on the left stays put, everything else scrolls on the right */
@media (orientation:landscape) and (max-height:540px) and (min-width:560px){
  .app{max-width:none}
  #view-drive:not([hidden]){display:grid;grid-template-columns:minmax(0,44%) minmax(0,1fr);column-gap:14px;align-items:start}
  #view-drive>*{grid-column:2;min-width:0}
  #view-drive>.sign-board,#view-drive>.story-preview{grid-column:1;grid-row:1 / span 40;position:sticky;top:calc(64px + env(safe-area-inset-top,0px))}
  #view-drive>.nv-safety-top{grid-column:1 / -1}
  .caption{max-width:none;width:calc(100% - 40px)}
}

/* ---- 3.1.2 app feel: the parts that still felt like a web page ---- */
/* Bars and buttons are not text: a long press must not select a label or pop the browser's callout. Stories, share
   text and anything typed stay selectable. */
.top,.tabs,button,.pill,summary{-webkit-user-select:none;user-select:none}
button,.top img,.tabs{-webkit-touch-callout:none}
/* A photo's box shows its place before the picture arrives, so nothing pops in from blank. */
.photo{background:var(--surface-2)}
/* The current tab gets a small bar that slides in, like a tab bar. */
.tabs button{position:relative}
.tabs button::before{content:"";position:absolute;top:-6px;left:50%;width:26px;height:3px;margin-left:-13px;border-radius:0 0 3px 3px;background:var(--link);transform:scaleX(0);opacity:0}
.tabs button[aria-current="page"]::before{transform:none;opacity:1}
@media (prefers-reduced-motion:no-preference){
  .tabs button::before{transition:transform .22s cubic-bezier(.2,.8,.3,1),opacity .18s ease}
  .tabs button{transition:color .15s ease}
  .tabs button:active svg{transform:scale(.88)}
  .icon-btn,.chip,.link{transition:opacity .12s ease,transform .12s ease,background-color .15s ease}
  .icon-btn:active,.chip:active{transform:scale(.92)}
  .link:active{opacity:.6}
  .toast:not([hidden]){animation:toastIn .2s cubic-bezier(.2,.8,.3,1)}
  /* Sheets slide away and the dim fades instead of vanishing. `hidden` is still set at once (the code and the tests
     see a closed sheet right away); only the picture lingers 0.18 s, and it takes no taps while it goes. */
  @supports (transition-behavior:allow-discrete){
    .sheet,.sheet-back{transition:opacity .18s ease,transform .18s ease,display .18s allow-discrete}
    .sheet[hidden]{opacity:0;transform:translateY(28px);pointer-events:none}
    .sheet-back[hidden]{opacity:0;pointer-events:none}
  }
}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}

/* ---- 3.1.3 app feel, part 2 ---- */
/* A grab handle on every sheet: it can be swiped down to close (main.js). */
.sheet::before{content:"";justify-self:center;width:38px;height:5px;border-radius:3px;background:var(--line);margin:-6px 0 -8px}
/* Installed to the Home Screen or inside the iPhone app, the whole page no longer rubber-bands like a web page. In a
   browser tab it still does, so pull-to-refresh keeps working there. */
@media (display-mode:standalone),(display-mode:fullscreen){html,body{overscroll-behavior-y:none}}
html.ios-app,html.ios-app body{overscroll-behavior-y:none}
/* A sideways tab slide must never give the page a sideways scroll. */
main{overflow-x:clip}
/* A photo still on its way: the box shimmers, then the picture fades in. Live cameras the same. */
.photo.loading img{opacity:0}
.photo.loading,.lv-cam-img:not(.got){background-image:linear-gradient(100deg,transparent 30%,color-mix(in srgb,var(--fg) 9%,transparent) 50%,transparent 70%);background-size:220% 100%;background-repeat:no-repeat}
.lv-cam.off .lv-cam-img{background-image:none;animation:none}
@media (prefers-reduced-motion:no-preference){
  .photo img{transition:opacity .28s ease}
  .photo.loading,.lv-cam-img:not(.got){animation:shimmer 1.3s linear infinite}
  html[data-nav="fwd"] .view:not([hidden]){animation-name:viewInR}
  html[data-nav="back"] .view:not([hidden]){animation-name:viewInL}
}
@keyframes shimmer{from{background-position:130% 0}to{background-position:-90% 0}}
@keyframes viewInR{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}
@keyframes viewInL{from{opacity:0;transform:translateX(-22px)}to{opacity:1;transform:none}}

/* ---- 3.1.7 tidy pass: the Ahead category chips in one swipeable row ---- */
#view-ahead #chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin-right:-16px;padding-right:16px}
#view-ahead #chips::-webkit-scrollbar{display:none}
#view-ahead #chips>*{flex:none}

/* "Where do you get on?" on the welcome card: San Diego, Los Angeles (where its freeways meet I-15) or Las Vegas */
.start-from{display:grid;gap:6px;margin-top:2px}
.start-from b{font-size:.95rem}
.start-from-row{display:flex;flex-wrap:wrap;gap:8px}
.start-from .chip{min-height:44px;padding:8px 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);font-weight:700}
.start-from .chip.la{border-color:var(--neon);box-shadow:var(--glow)}
.start-from .hint{color:var(--muted);line-height:1.4}

/* Nevada (the engine only knew CA, OR, WA): state colors for the trip log and passport (css/trip.css uses --c) */
.trip-st-nv,.pp-st-nv{--c:var(--st-nv)}
