/* Parking Vision Sevilla — tokens de diseño (claro / oscuro), accesible (WCAG AA), móvil primero */
:root {
  --bg: #0b1020; --bg-glow: #1b2a55;
  --surface: #141c33; --surface-2: #1b2542; --surface-3: #232f52; --line: #2a3658;
  --text: #eef2fa; --muted: #a9b5cf;
  --green: #22c55e; --on-green: #052e14; --green-soft: rgba(34, 197, 94, .16); --green-text: #86efac;
  --red: #f05252; --on-red: #ffffff; --red-soft: rgba(240, 82, 82, .16); --red-text: #fca5a5;
  --amber: #f59e0b; --amber-soft: rgba(245, 158, 11, .16); --amber-text: #fcd34d;
  --blue: #60a5fa; --focus: #93c5fd;
  --na: #475569; --on-na: #fff;
  --topbar: rgba(11, 16, 32, .86);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 18px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5fa; --bg-glow: #dfe8ff;
  --surface: #ffffff; --surface-2: #f1f4f9; --surface-3: #e6ebf3; --line: #d5dce8;
  --text: #0f172a; --muted: #475569;
  --green: #15803d; --on-green: #ffffff; --green-soft: #dcfce7; --green-text: #166534;
  --red: #c81e1e; --on-red: #ffffff; --red-soft: #fee2e2; --red-text: #991b1b;
  --amber: #b45309; --amber-soft: #fef3c7; --amber-text: #92400e;
  --blue: #1d4ed8; --focus: #1d4ed8;
  --na: #64748b; --on-na: #fff;
  --topbar: rgba(255, 255, 255, .9);
  --shadow: 0 6px 20px rgba(15, 23, 42, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f3f5fa; --bg-glow: #dfe8ff;
    --surface: #ffffff; --surface-2: #f1f4f9; --surface-3: #e6ebf3; --line: #d5dce8;
    --text: #0f172a; --muted: #475569;
    --green: #15803d; --on-green: #ffffff; --green-soft: #dcfce7; --green-text: #166534;
    --red: #c81e1e; --on-red: #ffffff; --red-soft: #fee2e2; --red-text: #991b1b;
    --amber: #b45309; --amber-soft: #fef3c7; --amber-text: #92400e;
    --blue: #1d4ed8; --focus: #1d4ed8;
    --na: #64748b; --on-na: #fff;
    --topbar: rgba(255, 255, 255, .9);
    --shadow: 0 6px 20px rgba(15, 23, 42, .08);
    color-scheme: light;
  }
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html.big { font-size: 19px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 1rem/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(1100px 520px at 85% -12%, var(--bg-glow) 0%, transparent 60%), var(--bg);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .8rem; }
.mono, .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

/* barra superior */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--topbar); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; white-space: nowrap; font-size: 1.05rem; }
.brand em { font-style: normal; color: var(--green); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { text-decoration: none; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.tabs a.on, .tabs a:hover { color: var(--text); background: var(--surface-2); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.live i { width: 10px; height: 10px; border-radius: 50%; background: var(--na); flex: none; }
.live.on i { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.bottom-tabs { display: none; }
.offline { background: var(--amber-soft); color: var(--amber-text); text-align: center; padding: 8px 12px; font-weight: 650; font-size: .9rem; border-bottom: 1px solid var(--line); }

.view { max-width: 1320px; margin: 0 auto; padding: 20px 16px 40px; }
footer.sign { max-width: 1320px; margin: 0 auto; padding: 8px 16px 120px; color: var(--muted); font-size: .85rem; display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
footer.sign b { color: var(--text); }

/* bloques */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.grid.cams { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface-2); padding: 10px 16px; border-radius: 14px; cursor: pointer; font-weight: 700;
  text-decoration: none; transition: background .15s, transform .05s; white-space: nowrap; font-size: .95rem; min-height: 44px;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--red-text); border-color: var(--red); background: var(--red-soft); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 8px 12px; font-size: .875rem; border-radius: 12px; min-height: 40px; }
.btn.big { min-height: 54px; font-size: 1.05rem; padding: 12px 20px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg, .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.green { color: var(--green-text); background: var(--green-soft); border-color: transparent; }
.chip.red { color: var(--red-text); background: var(--red-soft); border-color: transparent; }
.chip.amber { color: var(--amber-text); background: var(--amber-soft); border-color: transparent; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
input[type=text], input[type=url], input[type=number], input[type=search], input[type=password], input[type=time], select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; outline: none;
  font-size: 1rem; min-height: 46px;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
label.field { display: block; }
label.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-weight: 650; }
input[type=range] { width: 100%; accent-color: var(--green); min-height: 32px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; min-height: 44px; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 48px; height: 28px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 99px; position: relative; flex: none; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--green); border-color: var(--green); }
.switch input:checked + i::after { left: 23px; }
.switch input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 11px; cursor: pointer; font-weight: 700; color: var(--muted); min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* respuesta principal */
.answer { padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.answer > *, .stack > *, .list > * { min-width: 0; }
.answer .big-num { font-size: 3.2rem; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.answer .big-num.ok { color: var(--green); } .answer .big-num.no { color: var(--red); }
.spot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; }
.spot .grow { flex: 1; min-width: 0; }
.spot h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { min-width: 64px; text-align: center; border-radius: 14px; padding: 8px 6px; font-weight: 850; font-size: 1.35rem; line-height: 1.05; background: var(--na); color: var(--on-na); }
.count small { display: block; font-size: .68rem; font-weight: 700; opacity: .95; }
.count.ok { background: var(--green); color: var(--on-green); }
.count.no { background: var(--red); color: var(--on-red); }

/* tarjeta de cámara */
.cam-card { overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: transform .15s, border-color .15s; }
.cam-card:hover { transform: translateY(-2px); }
.shot { position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; }
.shot img, .shot canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.shot .badge { position: absolute; top: 10px; right: 10px; }
.shot .badge-l { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.cam-meta { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cam-meta h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.free-pill { font-weight: 800; font-size: .9rem; padding: 6px 11px; border-radius: 11px; background: var(--red); color: var(--on-red); box-shadow: 0 4px 12px rgba(0,0,0,.3); white-space: nowrap; }
.free-pill.ok { background: var(--green); color: var(--on-green); }
.free-pill.na { background: var(--na); color: var(--on-na); }
.shot .chip { background: rgba(0,0,0,.62); color: #fff; border-color: transparent; }
.add-card { display: grid; place-items: center; min-height: 230px; border: 2px dashed var(--line); background: transparent; box-shadow: none; color: var(--muted); text-decoration: none; font-weight: 750; }
.add-card:hover { border-color: var(--green); color: var(--green); }

/* detalle */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.detail .shot { border-radius: var(--radius); }
.below { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.below > *, .detail > *, .editor > *, #charts > * { min-width: 0; }
.zone-card { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.zone-card .big { font-size: 2.6rem; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.zone-card .big.ok { color: var(--green); } .zone-card .big.no { color: var(--red); }
.pred { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pred div { background: var(--surface-2); border-radius: 12px; padding: 8px; text-align: center; font-size: .8rem; color: var(--muted); }
.pred b { display: block; font-size: 1.05rem; color: var(--text); }
.filmstrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.filmstrip button { flex: none; width: 116px; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; position: relative; scroll-snap-align: start; }
.filmstrip button[aria-pressed="true"] { border-color: var(--green); }
.filmstrip img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.filmstrip span { position: absolute; bottom: 3px; left: 5px; font-size: .75rem; color: #fff; text-shadow: 0 1px 3px #000; font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.chart { width: 100%; height: 150px; display: block; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .7rem; color: var(--muted); overflow: hidden; }
.heat div { aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); }
.heat .lbl { background: none; aspect-ratio: auto; display: flex; align-items: center; }
.heat .hl { background: none; aspect-ratio: auto; text-align: center; white-space: nowrap; }
.scale { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.scale i { width: 90px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, hsl(0 70% 42%), hsl(45 80% 45%), hsl(130 60% 40%)); }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.editor .shot { border-radius: var(--radius); touch-action: none; cursor: crosshair; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.hint { font-size: .9rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); padding: 12px 14px; border-radius: 14px; }

/* listas */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.item .grow { flex: 1; min-width: 0; }
.item h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.bar.mid i { background: var(--amber); } .bar.low i { background: var(--red); }
.num { font-size: 1.4rem; font-weight: 850; min-width: 56px; text-align: right; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.thumb { overflow: hidden; }
.thumb .t { padding: 10px 12px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.thumb .t h3 { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* buscador */
.search { position: relative; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--blue); }
.search .icon { color: var(--muted); }
.search input { border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 54px; font-size: 1.05rem; padding-left: 10px; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; }
.sugg li { padding: 10px 12px; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; min-height: 44px; justify-content: center; }
.sugg li[aria-selected="true"], .sugg li:hover { background: var(--surface-2); }
.status-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--na); flex: none; box-shadow: 0 0 0 6px color-mix(in srgb, var(--na) 22%, transparent); }
.status-dot.ok { background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); }
.status-dot.mid { background: var(--amber); box-shadow: 0 0 0 6px var(--amber-soft); }
.status-dot.no { background: var(--red); box-shadow: 0 0 0 6px var(--red-soft); }
.dotline i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* mapa (MapLibre + OpenFreeMap) */
.map-wrap { position: relative; }
#map { height: calc(100dvh - 250px); min-height: 440px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: .82rem; font-weight: 650; }
.map-legend i { display: inline-block; width: 18px; height: 5px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; margin-right: 5px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.map-status { position: absolute; left: 10px; top: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.maplibregl-popup-content { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font: inherit; font-size: .92rem; }
.maplibregl-popup-content img { width: 100%; border-radius: 10px; display: block; margin-bottom: 8px; }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { width: 32px; height: 32px; font-size: 20px; color: var(--muted); }
.maplibregl-ctrl-group button { width: 40px; height: 40px; }

/* avisos, modales */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); animation: pop .25s ease-out; }
.toast.ok { border-left-color: var(--green); } .toast.err { border-left-color: var(--red); }
.toast b { display: block; }
.toast a { font-weight: 700; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 900; display: grid; place-items: end center; padding: 16px; }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
@media (min-width: 721px) { .modal-bg { place-items: center; } }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h2 { color: var(--text); margin-bottom: 8px; }
.empty p { max-width: 520px; margin: 0 auto 16px; }
.steps { counter-reset: s; display: grid; gap: 10px; text-align: left; max-width: 520px; margin: 0 auto 18px; }
.steps div { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.steps div::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; font-weight: 800; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-3) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 28px 0 12px; }
details > summary { cursor: pointer; color: var(--muted); font-weight: 700; min-height: 40px; display: flex; align-items: center; list-style: none; }
details > summary::before { content: "▸"; margin-right: 8px; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
details > summary::-webkit-details-marker { display: none; }
.kbd { font-family: ui-monospace, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .8rem; }
.notice { border-radius: 14px; padding: 12px 14px; background: var(--amber-soft); color: var(--amber-text); font-weight: 600; }
.notice.info { background: var(--surface-2); color: var(--text); font-weight: 500; }

@media (max-width: 980px) {
  .detail, .editor { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tabs { display: none; }
  .live { margin-left: auto; }
  .view { padding: 14px 12px 24px; }
  h1 { font-size: 1.35rem; }
  .bottom-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; justify-content: space-around; align-items: flex-end;
    background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 4px max(8px, env(safe-area-inset-bottom));
  }
  .bottom-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; text-decoration: none; color: var(--muted); padding: 4px 6px; font-weight: 700; min-width: 60px; min-height: 48px; justify-content: flex-end; }
  .bottom-tabs a.on { color: var(--green); }
  .bottom-tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-tabs a.fab svg { width: 28px; height: 28px; background: var(--green); border-radius: 18px; padding: 11px; box-sizing: content-box; margin-top: -28px; box-shadow: var(--shadow); stroke: var(--on-green); }
  .bottom-tabs a.fab { color: var(--text); }
  .toasts { bottom: calc(88px + env(safe-area-inset-bottom)); left: 12px; right: 12px; max-width: none; }
  #map { height: calc(100dvh - 300px); min-height: 380px; }
  .map-legend { font-size: .7rem; }
  .answer .big-num { font-size: 2.8rem; }
  .hide-m { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .free-pill, .count, .chip { border: 1px solid CanvasText; }
}

/* ---------- probabilidad, precio y previsión ---------- */
.notice.ok { background: var(--green-soft); color: var(--green-text); }
.notice.warn { background: var(--red-soft); color: var(--red-text); }
.pbadge, .gauge { display: grid; place-items: center; align-content: center; border-radius: 16px; background: var(--surface-2);
  color: var(--text); flex: none; font-variant-numeric: tabular-nums; border: 2px solid var(--line); }
.pbadge { width: 58px; height: 58px; }
.pbadge b { font-size: 1.35rem; line-height: 1; font-weight: 850; }
.pbadge span { font-size: .72rem; font-weight: 800; opacity: .8; }
.gauge { width: 92px; height: 92px; border-radius: 50%; border-width: 6px; }
.gauge b { font-size: 2.2rem; line-height: 1; font-weight: 850; }
.gauge span { font-size: .85rem; font-weight: 800; }
.pbadge.ok, .gauge.ok { border-color: var(--green); background: var(--green-soft); color: var(--green-text); }
.pbadge.mid, .gauge.mid { border-color: var(--amber); background: var(--amber-soft); color: var(--amber-text); }
.pbadge.no, .gauge.no { border-color: var(--red); background: var(--red-soft); color: var(--red-text); }
.opt h3 a { color: inherit; text-decoration: none; }
.opt h3 a:hover, .opt h3 a:focus-visible { text-decoration: underline; }
.tl { display: flex; align-items: flex-end; gap: 3px; height: 92px; padding-bottom: 18px; position: relative; }
.tlc { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 6px; }
.tlc i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: var(--na); }
.tlc i.ok { background: var(--green); } .tlc i.mid { background: var(--amber); } .tlc i.no { background: var(--red); }
.tlc span { position: absolute; bottom: -18px; font-size: .7rem; color: var(--muted); font-weight: 700; }
.lg-grad { display: inline-block; height: 10px; width: 140px; border-radius: 6px; background: linear-gradient(90deg, hsl(0 65% 42%), hsl(65 65% 42%), hsl(130 65% 42%)); }
@media (prefers-reduced-motion: no-preference) { .tlc i { transition: height .3s; } }
.pbadge.est { border-style: dashed; }  /* estimación: no lo ve una cámara */
