/* Audio vodič: premium dark theme. All colours, radii and sizes come from the tokens below. */
:root {
  /* colour */
  --c-bg: #07090f; --c-bg-2: #0c1019; --c-surface: #121826; --c-surface-2: #1a2235; --c-line: #ffffff1a;
  --c-text: #f5f7fb; --c-text-2: #c3cbdb; --c-muted: #98a3ba;            /* 18:1 · 11:1 · 7:1 on --c-bg */
  --c-accent: #ffb547; --c-accent-2: #ff7a3d; --c-on-accent: #1b1004;    /* amber → sunset */
  --c-teal: #3fd6c1; --c-warn: #f2a33a;
  --g-accent: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-2) 100%);
  --g-shade: linear-gradient(180deg, #07090fcc 0%, #07090f00 22%, #07090f00 45%, #07090fe6 88%, #07090f 100%);
  /* type */
  --f-sans: "Inter", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: max(14px, .8rem); --fs-sm: max(15px, .9rem); --fs-md: max(16px, 1rem); --fs-lg: max(18px, 1.2rem);
  --fs-xl: clamp(26px, 2.2rem, 46px); --fs-hero: clamp(30px, 2.6rem, 56px);
  /* shape & space */
  --r-sm: 12px; --r-md: 18px; --r-lg: 28px; --sp: max(12px, .9rem);
  --ctl-h: 88px;                               /* Pause/Next: ≥64 px phone, ≥88 px Tesla */
  --shadow: 0 18px 50px #00000080, 0 2px 0 #ffffff08 inset;
  --t-calm: 320ms ease;
  font-size: 16px; color-scheme: dark;
}
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) { :root { font-size: 19px; --ctl-h: 112px; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--c-bg); color: var(--c-text); font-family: var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: var(--c-text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.screen { height: 100vh; height: 100dvh; }

/* ---------- start ---------- */
#start { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--sp); overflow: hidden; }
.start-bg { position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60% 50% at 75% 15%, #ff7a3d33, transparent 70%), radial-gradient(55% 45% at 15% 85%, #3fd6c126, transparent 70%),
              radial-gradient(80% 60% at 50% 50%, #1a2235, var(--c-bg) 75%); }
.start-card { position: relative; z-index: 1; width: min(560px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: clamp(24px, 2.4rem, 48px) clamp(20px, 2rem, 44px); background: #121826b3; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.logo { width: 64px; height: 64px; color: var(--c-accent); }
.logo svg { width: 100%; height: 100%; }
h1 { font-size: var(--fs-hero); letter-spacing: -.02em; margin: 0; background: linear-gradient(180deg, #fff, #d9dfeb); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--c-text-2); margin: 0; font-size: var(--fs-lg); line-height: 1.4; }
.hint, .free { color: var(--c-muted); font-size: var(--fs-xs); margin: 0; }
button.primary { width: 100%; min-height: 88px; border: 0; border-radius: var(--r-md); background: var(--g-accent); color: var(--c-on-accent);
  font-size: var(--fs-xl); font-weight: 800; letter-spacing: .01em; box-shadow: 0 12px 34px #ff7a3d55; }
.field { display: flex; align-items: center; justify-content: center; gap: .75rem; font-size: var(--fs-md); color: var(--c-text-2); flex-wrap: wrap; }
select, input[type=number] { font: inherit; font-size: var(--fs-md); min-height: 48px; background: var(--c-surface-2); color: var(--c-text); border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: .4rem .8rem; }
#start > .attrib { position: relative; z-index: 1; margin-top: 1rem; }

/* ---------- drive ---------- */
#drive { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: var(--sp); padding: var(--sp);
  padding-bottom: max(var(--sp), env(safe-area-inset-bottom));
  background: radial-gradient(70% 60% at 30% 0%, #1a223566, transparent 70%), var(--c-bg); }
@media (min-aspect-ratio: 1/1) { #drive { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) clamp(340px, 34vw, 460px); } }

.hero { position: relative; min-height: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface); box-shadow: var(--shadow); isolation: isolate; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity var(--t-calm); }
.hero img.on { opacity: 1; }
.hero-fallback { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center;
  background: radial-gradient(80% 70% at 80% 10%, hsl(var(--hue, 28) 90% 58% / .75), transparent 65%),
              radial-gradient(70% 60% at 10% 90%, hsl(calc(var(--hue, 28) + 150) 70% 45% / .55), transparent 65%),
              linear-gradient(160deg, var(--c-surface-2), var(--c-bg-2)); }
.hero-fallback span { font-size: clamp(110px, 22vmin, 260px); font-weight: 800; line-height: 1; color: #ffffff1f; letter-spacing: -.04em; user-select: none; }
.hero-shade { position: absolute; inset: 0; z-index: 1; background: var(--g-shade); pointer-events: none; }
.topbar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: .6rem; padding: var(--sp); }
.status { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.badge { background: var(--c-warn); color: #1b1004; border-radius: 8px; padding: 4px 10px; font-size: var(--fs-xs); font-weight: 800; }
.chip { min-height: 48px; padding: 0 18px; border-radius: 999px; background: #0c1019b3; border: 1px solid var(--c-line); font-size: var(--fs-sm); backdrop-filter: blur(10px); }
#map { position: absolute; z-index: 2; right: var(--sp); top: calc(var(--sp) + 60px); width: clamp(96px, 16vmin, 168px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #1a2235e6, #07090fe6 72%); border: 1px solid var(--c-line); }
.hero-title { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: calc(var(--sp) * 1.4); display: flex; flex-direction: column; gap: .35rem; }
.kicker { margin: 0; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); min-height: 1.2em; text-shadow: 0 1px 12px #000c; }
#storyTitle { margin: 0; font-size: var(--fs-hero); line-height: 1.08; letter-spacing: -.02em; text-shadow: 0 2px 24px #000a;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.credit { margin: .2rem 0 0; font-size: var(--fs-xs); color: var(--c-text-2); line-height: 1.35; overflow-wrap: anywhere; }
.credit a { color: var(--c-text); text-underline-offset: 3px; }

.panel { min-height: 0; display: flex; flex-direction: column; gap: var(--sp); }
.now { display: flex; align-items: center; gap: .75rem; padding: 0 .25rem; }
.now-state { margin: 0; font-size: var(--fs-md); color: var(--c-text-2); font-weight: 600; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.eq i { width: 4px; height: 40%; background: var(--c-accent); border-radius: 2px; }
.eq i:nth-child(2) { height: 80%; } .eq i:nth-child(3) { height: 60%; } .eq i:nth-child(4) { height: 30%; }
body.paused .eq i, body.idle .eq i { background: var(--c-muted); height: 25%; }
.progress { height: 6px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; }
#progressBar { height: 100%; width: 0; background: var(--g-accent); }
body.loading #progressBar { width: 35%; background: var(--c-teal); }
.detail { flex: 1; min-height: 0; overflow: auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: calc(var(--sp) * 1.2); }
.detail p { margin: 0 0 .8rem; font-size: var(--fs-md); line-height: 1.6; color: var(--c-text-2); }
.src { font-size: var(--fs-xs) !important; color: var(--c-muted) !important; } .src a { color: var(--c-text-2); }
.upnext { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); padding: 0 .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext b { color: var(--c-teal); font-weight: 700; }
.controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp); margin-top: auto; }
.ctl { min-height: var(--ctl-h); border-radius: var(--r-md); border: 1px solid var(--c-line); background: var(--c-surface-2);
  display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: var(--fs-lg); font-weight: 700; }
.ctl .ico { width: 34px; height: 34px; fill: currentColor; flex: none; }
#btnPause { background: var(--g-accent); color: var(--c-on-accent); border: 0; box-shadow: 0 10px 30px #ff7a3d40; }
.ctl:active { transform: scale(.98); }
.attrib { text-align: center; font-size: var(--fs-xs); color: var(--c-muted); margin: 0; line-height: 1.4; }
.attrib a { color: var(--c-text-2); }

/* Driving: audio only. No story text, no motion, nothing to read beyond the place name. */
body.driving .detail { display: none; }
body.driving .panel { justify-content: flex-end; }
body.driving *, body.driving *::before, body.driving *::after { transition: none !important; animation: none !important; }
/* Parked: gentle motion allowed (unless the user asked for reduced motion). */
@media (prefers-reduced-motion: no-preference) {
  body:not(.driving).playing .eq i { animation: eq 1.4s ease-in-out infinite alternate; }
  body:not(.driving).playing .eq i:nth-child(2) { animation-delay: -.4s; } body:not(.driving).playing .eq i:nth-child(3) { animation-delay: -.8s; }
  body:not(.driving).playing .eq i:nth-child(4) { animation-delay: -1.1s; }
}
@keyframes eq { from { height: 20%; } to { height: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Phone / portrait */
@media (max-aspect-ratio: 1/1) {
  #drive { grid-template-rows: minmax(0, 1fr) auto; }
  .panel { gap: .7rem; }
  body:not(.driving) #drive { grid-template-rows: minmax(0, 44fr) minmax(0, 56fr); }
  body:not(.driving) #map { display: none; }
  .ctl .ico { width: 28px; height: 28px; }
}

dialog { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 1.5rem; max-width: 32rem; width: 90%; box-shadow: var(--shadow); }
dialog h2 { margin-top: 0; font-size: var(--fs-xl); }
dialog label { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: .8rem 0; font-size: var(--fs-md); min-height: 48px; }
dialog input[type=checkbox] { width: 28px; height: 28px; accent-color: var(--c-accent); }
dialog .big { width: 100%; min-height: 64px; border-radius: var(--r-md); border: 0; background: var(--g-accent); color: var(--c-on-accent); font-size: var(--fs-lg); font-weight: 700; }
dialog::backdrop { background: #000c; }

/* Vožnja na Tesla (landscape): "Sljedeće" kao velika kartica koja popunjava desni panel */
@media (min-aspect-ratio: 1/1) {
  body.driving .upnext { white-space: normal; font-size: var(--fs-lg, 1.35rem); line-height: 1.3; color: var(--c-text, #eef2f8);
    padding: 1.25rem 1.4rem; border-radius: 22px; border: 1px solid var(--c-line); min-height: 9rem;
    display: flex; flex-direction: column; justify-content: center; gap: .35rem;
    background: radial-gradient(90% 80% at 100% 0%, #3fd6c11f, transparent 70%), var(--c-surface-2, #141a28); }
  body.driving .upnext b { font-size: 1.15em; }
}
.langpick { flex-direction: column; gap: .5rem; }
.seg { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.seg button { font: inherit; font-size: var(--fs-md); min-height: 56px; padding: .4rem 1.2rem; border-radius: 999px; background: var(--c-surface-2); color: var(--c-text); border: 1px solid var(--c-line); cursor: pointer; }
.seg button.on { background: #ffb547; color: #111; border-color: #ffb547; font-weight: 700; }

/* Nearby */
.nearby-btn { width: 100%; background: var(--c-surface-2); }
.nearby-btn .ico { fill: var(--c-teal, #3fd6c1); }
.overlay { position: fixed; inset: 0; z-index: 50; background: #07090f; display: flex; flex-direction: column; gap: .8rem; padding: calc(var(--sp) * 1.2); overflow: hidden; }
.overlay.hidden { display: none; }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ov-head h2 { margin: 0; font-size: var(--fs-xl); }
.big-x { min-height: 60px; min-width: 8rem; font-size: var(--fs-md); font-weight: 700; }
.filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; }
.filters button { flex: none; }
.cards { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--sp); align-content: start; grid-auto-rows: max-content; }
.card { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; cursor: pointer; }
.card-ph { position: relative; flex: none; height: 150px; display: grid; place-items: center; background: radial-gradient(120% 120% at 20% 0%, hsl(var(--hue, 200) 60% 30%), #0d1220 75%); }
.card-ph svg { width: 56px; height: 56px; fill: #ffffff55; }
.card-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card.k-charger .card-ph svg { fill: #3fd6c1cc; }
.card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card h3 { margin: 0; font-size: var(--fs-lg); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { margin: 0; font-size: var(--fs-sm); color: var(--c-accent); font-weight: 700; }
.card-why { margin: 0; font-size: var(--fs-sm); color: var(--c-text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: auto; padding-top: .4rem; }
.cbtn { min-height: 60px; border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-text); font: inherit; font-size: var(--fs-md); font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; }
.cbtn svg { width: 24px; height: 24px; fill: currentColor; }
.cbtn.listen { background: var(--g-accent); color: var(--c-on-accent); border: 0; }
.cbtn.listen.on { outline: 3px solid var(--c-teal, #3fd6c1); }
@media (max-aspect-ratio: 1/1) { .cards { grid-template-columns: 1fr; } .card-ph { height: 120px; } }
.upnext b + span::before { content: ' · '; color: var(--c-muted); }
@media (min-aspect-ratio: 1/1) { body.driving .upnext b + span::before { content: none; } }

/* Navigation: Back + Stop */
.ico-s { width: 26px; height: 26px; fill: currentColor; flex: none; }
.back-btn, .stop-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 64px; padding: 0 22px 0 16px; font-size: var(--fs-md); font-weight: 700; color: var(--c-text); }
.stop-btn { background: #3a1416d9; border-color: #ff6b6b66; color: #ffd9d9; }
.ov-head { justify-content: flex-start; }
.dlg-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.dlg-head h2 { margin: 0; }
@media (max-width: 480px) { .stop-btn span { font-size: var(--fs-sm); } .stop-btn, .back-btn { padding: 0 14px 0 10px; } }
/* tap-to-play fallback when the browser blocks autoplay */
.tap-play { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 96px; margin: 10px 0; border: 0; border-radius: 22px;
  background: #e8f0ff; color: #0b1220; font-size: 1.5rem; font-weight: 700; box-shadow: 0 0 0 4px rgba(62,130,247,.45); animation: tapPulse 1.6s ease-in-out infinite; cursor: pointer; }
.tap-play .ico { width: 44px; height: 44px; fill: currentColor; }
.tap-play.hidden { display: none; }
@keyframes tapPulse { 50% { box-shadow: 0 0 0 12px rgba(62,130,247,.15); } }
/* always-visible Settings on the driving screen */
.topbar .status { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 64px; min-width: 64px; padding: 0 22px 0 16px; margin-left: auto; font-size: var(--fs-md); font-weight: 700; color: var(--c-text); flex: 0 0 auto; }
.set-btn .ico-s { width: 28px; height: 28px; fill: currentColor; }
.topbar .stop-btn { flex: 0 0 auto; }
#settings select, #settings input[type=number] { min-height: 60px; font-size: var(--fs-md); padding: 0 12px; }
#settings input[type=checkbox] { width: 32px; height: 32px; }
#settings { max-height: 96vh; overflow: auto; }
@media (max-width: 820px) { .stop-btn span { font-size: var(--fs-sm); } .set-btn { padding: 0 14px; } .set-btn span { display: none; } }
@media (max-width: 480px) { .set-btn { padding: 0 14px; } .set-btn span { display: none; } }

/* ---------- mini map + relative direction (driving screen) ---------- */
.mini { position: relative; display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--c-line); background: var(--c-surface-2); box-shadow: var(--shadow); }
.dir { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 84px; flex: none;
  background: radial-gradient(120% 140% at 0% 0%, #ffb5471c, transparent 60%), linear-gradient(180deg, #1a2235, #141a28); border-bottom: 1px solid var(--c-line); }
.dir-badge { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--g-accent);
  box-shadow: 0 6px 22px #ff7a3d55, 0 0 0 4px #ffb5471f; }
.dir-arrow { width: 40px; height: 40px; fill: var(--c-on-accent); }
.mini:not(.has-target) .dir-badge { background: var(--c-surface); box-shadow: none; opacity: .5; }
.mini:not(.has-target) .dir-arrow { fill: var(--c-muted); }
.mini.north-up .dir-badge { background: linear-gradient(135deg, #3fd6c1, #2a9d8f); box-shadow: 0 6px 22px #3fd6c144; }
.dir-body { min-width: 0; flex: 1; }
.dir-line { margin: 0; display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; line-height: 1.15; }
.dir-txt { font-size: clamp(20px, 1.5rem, 32px); font-weight: 800; letter-spacing: -.01em; color: var(--c-text); }
.dir-dist { font-size: clamp(18px, 1.25rem, 28px); font-weight: 800; color: var(--c-teal); font-variant-numeric: tabular-nums; }
.dir-place { margin: .2rem 0 0; font-size: var(--fs-sm); color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0b0e15; }
.mm-view::after { content: ''; position: absolute; inset: 0; z-index: 450; pointer-events: none; box-shadow: inset 0 0 40px 10px #07090fcc; }
.mm-rot { position: absolute; transform-origin: 50% 50%; }
.mm-map, .mm-view .leaflet-container { width: 100%; height: 100%; background: #0b0e15; }
.mm-attr { position: absolute; right: 8px; bottom: 6px; z-index: 500; font-size: 11px; line-height: 1.3; color: #a9b3c7; background: #07090fcc; padding: 2px 7px; border-radius: 6px; }
.mm-attr a { color: inherit; text-decoration: none; }
.mm-car svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px #000c); }
.mm-car .halo { fill: #3fd6c12e; stroke: #3fd6c1; stroke-width: 2; }
.mm-car .arr { fill: #f5f7fb; stroke: #07090f; stroke-width: 1.5; stroke-linejoin: round; }
.mm-car.nohead .arr { display: none; }
.mm-car.nohead .halo { fill: #3fd6c1; transform: scale(.45); transform-origin: 22px 22px; }
.mm-place i { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c-accent); border: 5px solid #1b1004;
  box-shadow: 0 0 0 6px #ffb54755, 0 0 26px #ffb547aa; }
.mini.no-map { flex: none; }
.mini.no-map .mm-view { display: none; }
/* landscape (Tesla): compact "up next" line so the map gets the free space in the right panel */
@media (min-aspect-ratio: 1/1) {
  body.driving .upnext { min-height: 0; padding: .55rem 1rem; font-size: var(--fs-md); white-space: nowrap; flex-direction: row; align-items: center; justify-content: flex-start; gap: .5rem; }
  body.driving .upnext b { font-size: 1em; flex: none; }
  body.driving .upnext span { overflow: hidden; text-overflow: ellipsis; }
  body.driving .upnext b + span::before { content: ' · '; }
  .mini { min-height: 190px; }
  body:not(.driving) .mini { min-height: 150px; }
}
@media (min-aspect-ratio: 1/1) and (max-height: 700px) { :root { --ctl-h: 72px; } .dir { min-height: 72px; padding: 8px 12px; } .dir-badge { width: 54px; height: 54px; } .dir-arrow { width: 34px; height: 34px; } }
/* portrait (phone): direction on the left, square map on the right */
@media (max-aspect-ratio: 1/1) {
  .mini { flex: none; flex-direction: row; height: 150px; }
  .dir { flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; border-bottom: 0; border-right: 1px solid var(--c-line); padding: 10px 12px; }
  .dir-badge { width: 52px; height: 52px; } .dir-arrow { width: 32px; height: 32px; }
  .dir-txt { font-size: 20px; } .dir-dist { font-size: 18px; }
  .mm-view { flex: 0 0 150px; }
  .mm-attr { font-size: 9px; right: 4px; bottom: 3px; padding: 1px 4px; }
  body:not(.driving) .mini { display: none; }
}
/* dark "night" look for the free OSM raster tiles */
.mm-view .mm-tiles { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92) saturate(.55); }

/* ---------- paywall (free preview ended) ---------- */
.paywall { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; overflow: auto;
  background: radial-gradient(90% 70% at 50% 0%, #ff7a3d2e, transparent 60%), #07090ff2; }
.paywall.hidden { display: none; }
.pw-card { width: min(560px, 100%); text-align: center; padding: clamp(20px, 4vmin, 40px); border-radius: 28px; border: 1px solid var(--c-line);
  background: linear-gradient(180deg, #1a2235, #121826); box-shadow: var(--shadow), 0 0 0 1px #ffb54714; }
.pw-icon { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--g-accent); box-shadow: 0 10px 30px #ff7a3d55; }
.pw-icon svg { width: 36px; height: 36px; fill: var(--c-on-accent); }
.pw-card h2 { margin: 0 0 .4rem; font-size: clamp(24px, 2rem, 40px); letter-spacing: -.01em; }
.pw-sub { margin: 0 0 1rem; color: var(--c-text-2); font-size: var(--fs-md); }
.pw-list { list-style: none; padding: 0; margin: 0 auto 1.2rem; display: grid; gap: .45rem; text-align: left; width: fit-content; max-width: 100%; font-size: var(--fs-md); }
.pw-list li::before { content: '✓'; color: var(--c-teal); font-weight: 800; margin-right: .6rem; }
.pw-unlock { width: 100%; min-height: 72px; border: 0; border-radius: 18px; background: var(--g-accent); color: var(--c-on-accent); font-size: var(--fs-lg); font-weight: 800; cursor: pointer; box-shadow: 0 10px 30px #ff7a3d44; }
.pw-note { margin: .8rem 0 0; color: var(--c-teal); font-size: var(--fs-md); }
.pw-row { display: flex; gap: 10px; margin-top: 12px; }
.pw-sec { flex: 1; min-height: 56px; border-radius: 14px; border: 1px solid var(--c-line); background: var(--c-surface-2); color: var(--c-text); font-size: var(--fs-md); font-weight: 700; cursor: pointer; padding: 0 1rem; }
.pw-code { display: flex; gap: 10px; margin-top: 10px; }
.pw-code input { flex: 2; min-width: 0; min-height: 56px; border-radius: 14px; border: 1px solid var(--c-line); background: #0b0e15; color: var(--c-text); font-size: var(--fs-md); padding: 0 1rem; }
.pw-err { margin: .6rem 0 0; color: #ff8a7a; }
@media (max-height: 640px) { .pw-list { display: none; } .pw-icon { width: 56px; height: 56px; margin-bottom: 6px; } .pw-unlock { min-height: 60px; } }
