/* Diorama page. Same tokens as the Atlas: warm near-black glass, cream type, one saffron accent. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--cream); font-family: var(--font-ui); }
#app { position: fixed; inset: 0; }
#gl { width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
[hidden] { display: none !important; }

.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 500 15px var(--font-ui); color: var(--muted); letter-spacing: .02em; }

.card { position: absolute; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px 22px;
  backdrop-filter: blur(10px); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.intro { left: var(--gutter); bottom: var(--gutter); width: min(460px, calc(100vw - 32px)); }
.arrive { left: var(--gutter); bottom: var(--gutter); width: min(460px, calc(100vw - 32px)); animation: rise .8s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.eyebrow { margin: 0 0 6px; font: 600 12px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--saffron); }
h1, h2 { margin: 0; font: 700 clamp(34px, 5vw, 46px)/1 var(--f-title); letter-spacing: .01em; }
h2 { font-size: 34px; }
.sub { margin: 6px 0 0; font: italic 500 21px var(--f-sub); color: var(--muted); }
.lede { margin: 14px 0 0; font: 400 15px/1.55 var(--font-text); color: var(--muted); }
.lede b { color: var(--cream); font-weight: 500; }
.fine { margin: 14px 0 0; font-size: 13px; color: var(--faint); }
.facts { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; gap: 2px; }
.facts b { font: 600 22px var(--font-ui); font-variant-numeric: tabular-nums; }
.facts small { font-size: 12px; font-weight: 500; margin-left: 2px; color: var(--muted); }
.facts span { font-size: 12px; color: var(--faint); line-height: 1.3; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--cream);
  font: 600 15px var(--font-ui); cursor: pointer; }
.btn:hover { border-color: var(--cream); }
.btn.primary { background: var(--saffron); border-color: var(--saffron); color: var(--on-saffron); }
.btn.primary:hover { filter: brightness(1.07); }
.link { background: none; border: 0; padding: 0; color: var(--cream); text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }

.dock { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 28px); }
.chip { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; background: var(--glass-soft);
  border: 1px solid var(--line); color: var(--cream); font: 500 14px var(--font-ui); cursor: pointer; backdrop-filter: blur(8px); }
.chip[aria-pressed="true"] { border-color: var(--saffron); color: var(--saffron); }
.chip.sun input { width: 110px; accent-color: var(--saffron); }
.chip.sun output { font-variant-numeric: tabular-nums; min-width: 3.2em; color: var(--muted); }
.drive-only { display: none !important; }
body.is-driving .drive-only { display: inline-flex !important; }
body.is-intro .not-intro { display: none; }

.hud { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 14px; display: grid; grid-template-columns: auto auto auto auto; gap: 6px 18px; align-items: end;
  padding: 14px 18px 12px; background: var(--glass-soft); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(8px); }
.gauge { display: flex; flex-direction: column; }
.gauge b { font: 600 22px var(--font-ui); font-variant-numeric: tabular-nums; line-height: 1; }
.gauge.big b { font-size: 40px; color: var(--saffron); }
.gauge small { font-size: 11px; color: var(--faint); margin-top: 4px; letter-spacing: .04em; }
.prof { grid-column: 1 / -1; width: 100%; height: 54px; }
#prof-fill { fill: rgba(233, 162, 59, .14); }
#prof-line { fill: none; stroke: var(--saffron); stroke-width: 1.6; }
#prof-dot { fill: var(--cream); stroke: var(--ink); stroke-width: 2; }

.hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--glass-soft);
  font-size: 13px; color: var(--muted); white-space: nowrap; }
.pedals { position: absolute; inset: auto 0 max(16px, env(safe-area-inset-bottom)) 0; padding: 0 16px; justify-content: space-between; pointer-events: none; }
.pedals > div { display: flex; gap: 10px; pointer-events: auto; }
.pedals button { width: 74px; height: 74px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--glass-soft); color: var(--cream);
  font: 600 15px var(--font-ui); touch-action: none; user-select: none; -webkit-user-select: none; }
.pedals button.on { background: var(--saffron); color: var(--on-saffron); border-color: var(--saffron); }
#p-gas { height: 100px; }
@media (pointer: fine) { body.is-driving .pedals { display: none !important; } }
@media (pointer: coarse) { body.is-driving .hint { display: none !important; } }

#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#labels .lbl { pointer-events: auto; cursor: pointer; border: 0; }
#labels .lbl:hover { filter: brightness(1.25); outline: 1px solid var(--line-2); }
#labels .lbl:focus-visible { outline: 2px solid var(--saffron); }
.lbl { position: absolute; left: 0; top: 0; padding: 4px 10px; border-radius: 999px; background: rgba(21, 18, 15, .72); color: var(--cream);
  font: 600 13px var(--font-ui); white-space: nowrap; transition: opacity .25s; will-change: transform; }
.lbl-lake { font: 700 18px var(--f-title); letter-spacing: .04em; color: var(--water); padding: 4px 12px; }
.lbl-start { color: var(--saffron); }
.lbl-river { font: italic 500 15px var(--f-sub); color: var(--water); background: none; text-shadow: 0 1px 6px #000; }
.lbl-road { font-weight: 500; color: var(--muted); background: none; text-shadow: 0 1px 6px #000; }

#flash { position: absolute; inset: 0; background: #fff3dc; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .9s ease; }
@keyframes flash { 0% { opacity: 0; } 35% { opacity: .85; } 100% { opacity: 0; } }

.about { max-width: min(620px, calc(100vw - 32px)); max-height: 86vh; background: var(--raise); color: var(--cream); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; }
.about::backdrop { background: rgba(0, 0, 0, .55); }
.about h3 { margin: 22px 0 8px; font: 600 13px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); }
.about p, .about li, .about dd { font: 400 14.5px/1.55 var(--font-text); color: var(--muted); }
.about dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.about dt { font-weight: 600; font-size: 14px; }
.about dd { margin: 0; }
.about ul { padding-left: 18px; margin: 0; }
.about li span { color: var(--faint); font-size: 13px; }
.about a { color: var(--cream); }
.about .btn { margin-top: 20px; }

@media (max-width: 640px) {
  .card { padding: 20px 18px 18px; border-radius: 16px; }
  .intro, .arrive { left: 16px; right: 16px; width: auto; bottom: 16px; transform: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .lede { font-size: 14px; }
  .dock { top: auto; bottom: auto; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; justify-content: flex-start; }
  body.is-driving .dock { top: auto; bottom: 120px; }
  .chip.sun input { width: 80px; }
  .hud { left: 10px; right: 10px; grid-template-columns: repeat(4, 1fr); gap: 4px 10px; padding: 10px 12px; }
  .gauge.big b { font-size: 30px; }
  .gauge b { font-size: 18px; }
  .prof { height: 40px; }
}

/* lake: shore walk, seasons, before you go */
.walkbar { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(560px, calc(100vw - 32px)); }
.walkbar .row { margin: 0; justify-content: center; }
.vp-name { margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--glass-soft); font: 700 18px var(--f-title); letter-spacing: .03em; }
.hint-walk { margin: 0; font-size: 12.5px; color: var(--muted); text-shadow: 0 1px 4px #000; }
@media (pointer: coarse) { .hint-walk { display: none; } }
body.is-walking .dock .drive-only { display: none !important; }
body.is-walking #btn-pace { display: inline-flex !important; }
.lbl-illus { font: italic 500 13px var(--font-text); color: var(--cream); background: rgba(21, 18, 15, .6); }
.lbl-vp { color: var(--saffron); }
.before { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.before summary { cursor: pointer; font: 600 12px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); }
.before dl { margin-top: 8px !important; }
.before dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.before dt { color: var(--faint); } .before dd { margin: 0; color: var(--cream); }
.before a { color: var(--muted); font-size: 12px; }
.season-note { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--glass-soft);
  font-size: 13px; color: var(--muted); white-space: nowrap; }

.wx { margin: 12px 0 0; font-size: 13.5px; color: var(--cream); }
.wx small { color: var(--faint); }
.walk-hold { display: none; }
@media (pointer: coarse) { .walk-hold { display: inline-flex; touch-action: none; user-select: none; -webkit-user-select: none; } .walk-hold.on { background: var(--saffron); color: var(--on-saffron); } }
.chip[aria-pressed="true"] { border-color: var(--saffron); color: var(--saffron); }
.photo { position: absolute; left: 16px; bottom: 16px; width: min(300px, 42vw); background: var(--glass); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: rise .5s ease both; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--raise); }
.photo-cap { margin: 10px 12px 2px; font: 600 14px var(--font-ui); }
.photo-credit { margin: 0 12px 10px; font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.photo-credit a { color: var(--muted); }
@media (max-width: 640px) {
  .intro .lede, .intro .fine, .arrive .fine { display: none; }
  .intro h1 { font-size: 30px; } .facts { gap: 6px; margin-top: 12px; padding-top: 10px; } .facts b { font-size: 18px; }
  .dock { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .dock::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 38px; padding: 0 12px; font-size: 13px; }
  .photo { left: 10px; top: 60px; bottom: auto; width: 44vw; }
  .walkbar { bottom: 10px; } .vp-name { font-size: 15px; }
  .arrive .row .btn { flex: 1 1 40%; padding: 0 12px; }
}
.wx a { color: var(--muted); }
@media (max-width: 640px) { body:not(.is-walking) .lbl-illus { display: none; } }

.lbl-cam { background: rgba(233, 162, 59, .92); color: var(--on-saffron); font: 600 12.5px var(--font-ui); padding: 5px 10px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.lbl-cam::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; background: currentColor;   /* camera icon (no emoji) */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 7.5h4l2-3h6l2 3h4V19H3z'/%3E%3Ccircle cx='12' cy='12.8' r='3.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 7.5h4l2-3h6l2 3h4V19H3z'/%3E%3Ccircle cx='12' cy='12.8' r='3.6'/%3E%3C/svg%3E") center / contain no-repeat; }
.lbl-cam::after { content: ""; position: absolute; left: 50%; bottom: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: rgba(233, 162, 59, .92); transform: translateX(-50%); }
.places { position: absolute; top: 64px; right: 14px; bottom: 14px; width: min(360px, calc(100vw - 28px)); overflow: auto; background: var(--glass); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 16px 8px; box-shadow: 0 24px 60px rgba(0,0,0,.45); z-index: 5; }
.places header { display: flex; align-items: center; justify-content: space-between; }
.places h2 { font-size: 26px; }
.places h3 { margin: 16px 0 6px; font: 600 12px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); }
.places h3 small { color: var(--faint); letter-spacing: 0; }
.places ul { list-style: none; margin: 0; padding: 0; }
.place { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 10px; background: none;
  color: var(--cream); text-align: left; font: 500 14px var(--font-ui); cursor: pointer; }
.place:hover, .place:focus-visible { background: rgba(243, 235, 221, .08); }
.place img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; background: var(--raise); }
.place span { display: flex; flex-direction: column; }
.place small { color: var(--faint); font-size: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); margin: 0 6px; }
.dot-vp, .dot-start { background: var(--saffron); } .dot-lake, .dot-river { background: var(--water); } .dot-illus { background: var(--cream); }
.lightbox { max-width: min(980px, calc(100vw - 24px)); padding: 0; background: var(--raise); color: var(--cream); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lightbox::backdrop { background: rgba(0,0,0,.7); }
.lightbox img { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.lb-text { padding: 12px 16px 0; }
.lb-cap { margin: 0; font: 600 16px var(--font-ui); }
.lb-credit { margin: 4px 0 0; font-size: 13px; color: var(--faint); } .lb-credit a { color: var(--muted); }
.lightbox .btn { margin: 12px 16px 16px; }
@media (max-width: 640px) { .places { top: auto; left: 10px; right: 10px; width: auto; max-height: 70vh; } }

/* road rules hint (traffic) */
.roadtip { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); margin: 0; padding: 7px 14px; border-radius: 999px;
  background: rgba(196, 96, 42, 0.92); color: #fff; font: 600 14px/1.3 system-ui, sans-serif; z-index: 6; pointer-events: none; white-space: nowrap; }
@media (max-width: 640px) { .roadtip { bottom: 168px; font-size: 13px; } }

/* ---- driving layout v2: the view first. A small dash top-left, options top-right in one row, thumbs at the bottom. */
body.is-driving .hud { grid-template-columns: auto auto auto auto auto; gap: 2px 14px; padding: 8px 12px 6px; border-radius: 14px; right: auto; }
body.is-driving .gauge.big b { font-size: 28px; }
body.is-driving .gauge b { font-size: 16px; }
body.is-driving .gauge small { font-size: 10px; margin-top: 2px; }
body.is-driving .prof { height: 22px; }
.gauge.rides { display: none; }
body.has-riders .gauge.rides { display: flex; }
body.is-driving .dock { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: min(720px, 60vw); }
body.is-driving .dock::-webkit-scrollbar { display: none; }
body.is-driving .dock .chip { min-height: 36px; padding: 0 12px; font-size: 13px; flex: none; }
body.is-driving:not(.more) .dock .extra { display: none !important; }
.more-btn { display: none; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.pedals button.small { height: 44px; font-size: 13px; }
.pedals button { width: 66px; height: 66px; background: rgba(20, 18, 15, .38); }
#p-gas { height: 118px; }
.toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); margin: 0; padding: 9px 16px; border-radius: 12px; background: var(--glass-soft);
  border: 1px solid var(--line); color: var(--cream); font: 500 14px/1.35 var(--font-ui); z-index: 7; max-width: min(420px, calc(100vw - 32px)); text-align: center;
  backdrop-filter: blur(8px); transition: opacity .4s; }
.toast[hidden] { display: block; opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  body.is-driving .hud { left: 10px; right: auto; grid-template-columns: auto auto; padding: 7px 10px 5px; }
  body.is-driving .gauge.alt, body.is-driving .gauge:nth-child(4) { display: none; }
  body.is-driving .prof { width: 150px; height: 18px; }
  body.is-driving .dock { top: calc(max(10px, env(safe-area-inset-top)) + 90px); bottom: auto; left: 10px; right: auto; max-width: calc(100vw - 20px); justify-content: flex-start; }   /* own row under the gauges: More and Whole model were scrolled out of a 176 px strip */
  body.is-driving.more .dock { flex-wrap: wrap; max-width: calc(100vw - 20px); left: 10px; top: 92px; justify-content: flex-start; }
  .roadtip { bottom: 150px; }
  .toast { top: auto; bottom: 200px; }
}
body.is-driving .roadtip[hidden] { display: none !important; }

/* ---- back to the map, close buttons, the More sheet */
.back { position: absolute; left: 14px; top: max(14px, env(safe-area-inset-top)); z-index: 5; min-height: 36px; display: inline-flex; align-items: center;
  padding: 0 12px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--line); color: var(--cream); text-decoration: none;
  font: 600 13px var(--font-ui); backdrop-filter: blur(8px); }
body.is-driving .back { display: none; }
.x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20,18,15,.7);
  color: var(--cream); font: 600 20px/1 var(--font-ui); cursor: pointer; z-index: 2; }
.photo { position: absolute; }
.lightbox { position: fixed; }
/* More: a sheet with every option, never clipped */
body.is-driving.more .dock { position: fixed; left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); flex-wrap: wrap; justify-content: center;
  overflow: auto; max-width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 140px); padding: 16px; gap: 10px; background: var(--glass);
  border: 1px solid var(--line); border-radius: 18px; z-index: 9; backdrop-filter: blur(12px); }
body.is-driving.more .dock .chip { min-height: 44px; }
body.is-driving.more .pedals, body.is-driving.more .roadtip { visibility: hidden; }
@media (max-width: 640px) {
  body.is-driving.more .dock { top: 50%; left: 50%; max-width: calc(100vw - 24px); }
  .back { left: 10px; top: max(10px, env(safe-area-inset-top)); }
}

@media (max-width: 640px) {
  body:not(.is-driving) .dock { left: 84px; right: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  body:not(.is-driving) .dock::-webkit-scrollbar { display: none; }
  body:not(.is-driving) .dock .chip { flex: none; }
}
@media (min-width: 641px) { body:not(.is-driving) .dock { left: 100px; } }
/* photos of the place without a location: a credited strip under "Before you go" */
.photo-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; }
.photo-strip img { height: 72px; width: auto; border-radius: 6px; display: block; }
/* touch: every control is at least 44 px (the compact desktop chips stay compact for a mouse) */
@media (pointer: coarse) {
  .chip, body.is-driving .dock .chip, .back { min-height: 44px; }
  .chip.sun input { height: 44px; margin: 0; }
  .x { width: 44px; height: 44px; }
}
