/* ── Totality · España 2026 ─────────────────────────────────────────── */
:root {
  --bg: #070a14;
  --ink: #e8ecf6;
  --ink-2: #9aa3bd;
  --ink-3: #7480a0;
  --gold: #ffd166;
  --gold-hi: #fff3c4;
  --danger: #ff5a4a;
  --ok: #59d99e;
  --glass: rgba(12, 16, 28, 0.74);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --font-d: "Space Grotesk", system-ui, sans-serif;
  --font-b: "Inter", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.hidden { display: none !important; }
#map { position: absolute; inset: 0; }
#map canvas { outline: none; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--glass-brd);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* ── intro veil ─────────────────────────────────────────────────────── */
#veil {
  position: absolute; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 42%,
    rgba(9, 12, 24, 0.72) 0%, rgba(5, 7, 15, 0.94) 62%, #03040a 100%);
  cursor: pointer;
  transition: opacity 1.1s ease, visibility 1.1s;
}
#veil.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.veil-inner { text-align: center; animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.veil-mark { width: 132px; filter: drop-shadow(0 0 34px rgba(255, 209, 102, 0.35)); }
.veil-title {
  font-family: var(--font-d); font-size: clamp(34px, 6vw, 64px);
  font-weight: 700; letter-spacing: 0.14em; margin-top: 18px;
}
.veil-title span { color: var(--gold); padding: 0 0.18em; }
.veil-sub {
  color: var(--ink-2); letter-spacing: 0.34em; font-size: clamp(9px, 1.4vw, 12px);
  margin-top: 12px;
}
.veil-hint {
  margin-top: 46px; color: var(--ink-3); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── HUD header ─────────────────────────────────────────────────────── */
#hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px; pointer-events: none;
}
#hud > * { pointer-events: auto; }
#brand { display: flex; gap: 13px; align-items: center; }
#brand svg { width: 44px; height: 44px; filter: drop-shadow(0 0 16px rgba(255,209,102,.3)); }
#brand h1 {
  font-family: var(--font-d); font-size: 21px; font-weight: 700;
  letter-spacing: 0.1em;
}
#brand h1 span { color: var(--gold); }
#brand p { color: var(--ink-2); font-size: 11.5px; margin-top: 2px; letter-spacing: 0.05em; }
#hud-right { display: flex; gap: 10px; align-items: center; }

.pill {
  padding: 9px 14px; border-radius: 999px; font-size: 12.5px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  backdrop-filter: blur(14px); color: var(--ink);
  box-shadow: var(--shadow);
}
button.pill, .chipset button { cursor: pointer; transition: all .18s ease; font-family: var(--font-b); }
.pill.ghost:hover { border-color: rgba(255, 209, 102, 0.5); color: var(--gold-hi); }
#countdown { color: var(--gold-hi); font-weight: 600; }
#countdown b { color: var(--ink-2); font-weight: 500; margin-right: 6px; }

#lang-pick {
  appearance: none; cursor: pointer; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa3bd' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px;
  font-size: 12px; color: var(--ink);
}
#lang-pick option { background: #10141f; color: var(--ink); }
#safety {
  position: absolute; left: 20px; bottom: 224px; z-index: 31;
  display: flex; gap: 8px; align-items: center;
  padding: 8px 13px; border-radius: 999px;
  font-size: 11.5px; color: var(--ink-2);
}
@media (max-width: 900px) { #safety { display: none; } }
.p-share {
  display: inline-grid; place-items: center; vertical-align: middle;
  width: 27px; height: 27px; margin-left: 8px; border-radius: 8px;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.05);
  color: var(--ink-2); cursor: pointer;
}
.p-share:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
.p-share svg { width: 13px; height: 13px; }
#safety-inline { color: var(--ink-3); font-size: 10.5px; margin-top: 10px; }
#finder { position: relative; display: flex; gap: 10px; align-items: center; }
#search-box { display: flex; align-items: center; gap: 8px; padding: 8px 14px; width: 218px; transition: box-shadow .18s; }
#search-box:focus-within { box-shadow: 0 0 0 1.5px rgba(255, 209, 102, 0.45), var(--shadow); }
#search-box svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
#search-box input {
  background: transparent; border: none; outline: none; width: 100%;
  color: var(--ink); font-family: var(--font-b); font-size: 12.5px;
}
#search-box input::placeholder { color: var(--ink-3); }
#btn-locate { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border-radius: 50%; cursor: pointer; }
#btn-locate svg { width: 17px; height: 17px; }
#btn-locate.busy svg { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#search-results {
  position: absolute; top: 46px; left: 0; width: 300px; z-index: 50;
  padding: 6px; border-radius: 12px; max-height: 300px; overflow-y: auto;
}
#search-results button {
  display: block; width: 100%; text-align: left; padding: 9px 11px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--ink); font-family: var(--font-b); font-size: 12.5px; cursor: pointer;
}
#search-results button:hover { background: rgba(255, 209, 102, 0.1); }
#search-results button small { display: block; color: var(--ink-3); font-size: 10.5px; margin-top: 1px; }
#search-results .sr-empty { padding: 10px 12px; color: var(--ink-3); font-size: 12px; }

.chipset {
  display: flex; gap: 4px; padding: 4px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 999px; backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.chipset button {
  border: none; background: transparent; color: var(--ink-2);
  font-size: 12.5px; padding: 6px 13px; border-radius: 999px;
}
.chipset button:hover { color: var(--ink); }
.chipset button:disabled { opacity: 0.38; cursor: default; }
.chipset button:disabled:hover { color: var(--ink-2); }
.chipset button.on {
  background: linear-gradient(180deg, rgba(255,209,102,.22), rgba(255,209,102,.1));
  color: var(--gold-hi);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.35);
}

/* ── legend ─────────────────────────────────────────────────────────── */
#legend {
  position: absolute; left: 20px; bottom: 20px; z-index: 30;
  padding: 14px 16px; width: 272px;
}
#legend-title { font-family: var(--font-d); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
#legend-title span { color: var(--ink-3); font-family: var(--font-b); font-weight: 400; font-size: 11px; margin-left: 6px; }
#legend-ramp { width: 100%; height: 10px; border-radius: 5px; margin-top: 10px; }
#legend-ticks { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 10.5px; margin-top: 5px; }
#legend-op { display: flex; align-items: center; gap: 9px; margin-top: 9px; color: var(--ink-3); }
#legend-op svg { width: 14px; height: 14px; flex: none; }
#legend-op input { flex: 1; }
#legend-toggles { margin-top: 12px; display: grid; gap: 7px; border-top: 1px solid var(--glass-brd); padding-top: 11px; }
.plan-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.plan-row .pr-main { flex: 1; min-width: 0; }
.plan-row .pr-name { font-family: var(--font-d); font-size: 13.5px; font-weight: 600; }
.plan-row .pr-sub { color: var(--ink-2); font-size: 11.5px; margin-top: 2px; }
.plan-row .pr-drive { font-family: var(--font-d); font-size: 14px; color: var(--gold-hi); white-space: nowrap; }
.plan-row a, .plan-row button.pr-btn {
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.04);
  color: var(--ink-2); border-radius: 8px; padding: 5px 9px; font-size: 11px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.plan-row a:hover, .plan-row button.pr-btn:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
.p-slider { margin-top: 12px; display: grid; gap: 5px; }
.p-slider label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.p-slider label b { color: var(--ink); font-weight: 500; }
#legend-toggles label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; cursor: pointer; }
#legend-toggles label:hover { color: var(--ink); }
#legend-toggles input { accent-color: var(--gold); width: 13px; height: 13px; }

/* ── cursor card ────────────────────────────────────────────────────── */
#cursor-card {
  position: absolute; z-index: 40; pointer-events: none;
  padding: 10px 13px; min-width: 178px; border-radius: 11px;
  font-size: 12px; line-height: 1.55;
}
#cursor-card .cc-dur { font-family: var(--font-d); font-size: 19px; font-weight: 700; color: var(--gold-hi); }
#cursor-card .cc-dim { color: var(--ink-2); }
#cursor-card .cc-warn { color: var(--danger); }
#cursor-card .cc-ok { color: var(--ok); }

/* ── timeline ───────────────────────────────────────────────────────── */
#timeline {
  position: absolute; right: 20px; bottom: 20px; z-index: 30;
  display: flex; align-items: center; gap: 13px;
  padding: 12px 16px; width: 348px;
}
#tl-play {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  border: 1px solid rgba(255, 209, 102, 0.4);
  background: linear-gradient(180deg, rgba(255,209,102,.2), rgba(255,209,102,.06));
  color: var(--gold-hi); cursor: pointer; display: grid; place-items: center;
  transition: all .18s;
}
#tl-play:hover { box-shadow: 0 0 18px rgba(255, 209, 102, 0.35); }
#tl-play svg { width: 17px; height: 17px; }
#tl-track { flex: 1; }
#tl-label { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
#tl-clock { font-family: var(--font-d); font-size: 16px; font-weight: 600; color: var(--gold-hi); width: 66px; text-align: right; }
input[type="range"] {
  width: 100%; appearance: none; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #2a3350, #4a5578);
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); margin-top: -5px;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.6);
}

/* ── site tooltip (map-anchored) ───────────────────────────────────── */
.site-tip {
  position: absolute; z-index: 35; pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
  padding: 11px 14px; width: 218px; border-radius: 12px;
}
.site-tip h3 { font-family: var(--font-d); font-size: 14px; font-weight: 600; }
.site-tip .st-region { color: var(--ink-3); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; margin: 1px 0 8px; }
.site-tip .st-rows { display: grid; gap: 3px; font-size: 11.5px; }
.site-tip .st-rows div { display: flex; justify-content: space-between; }
.site-tip .st-rows dt { color: var(--ink-2); }
.site-tip .st-rows dd { font-variant-numeric: tabular-nums; }
.site-tip .st-dur { color: var(--gold-hi); font-weight: 600; }
.site-tip .st-hint { margin-top: 8px; font-size: 10px; color: var(--ink-3); letter-spacing: .05em; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
}
.badge.ok { background: rgba(89, 217, 158, 0.14); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(89,217,158,.3); }
.badge.warn { background: rgba(255, 170, 80, 0.14); color: #ffbe70; box-shadow: inset 0 0 0 1px rgba(255,170,80,.3); }
.badge.bad { background: rgba(255, 90, 74, 0.15); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,90,74,.35); }

/* ── side panel ─────────────────────────────────────────────────────── */
#panel {
  position: absolute; top: 84px; right: 20px; bottom: 20px; z-index: 45;
  width: 400px; max-width: calc(100vw - 40px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 20px 24px;
  animation: slidein .32s cubic-bezier(.2,.8,.25,1);
}
@keyframes slidein { from { opacity: 0; transform: translateX(26px); } }
#panel::-webkit-scrollbar { width: 8px; }
#panel::-webkit-scrollbar-thumb { background: #232c44; border-radius: 4px; }
#panel-close, #about-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.04);
  color: var(--ink-2); font-size: 17px; cursor: pointer;
}
#panel-close:hover, #about-close:hover { color: var(--ink); border-color: rgba(255,255,255,.25); }
.p-kicker { color: var(--ink-3); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.p-title { font-family: var(--font-d); font-size: 22px; font-weight: 700; margin-top: 3px; }
.p-sub { color: var(--ink-2); font-size: 12px; margin-top: 3px; }
.p-verdict { margin-top: 14px; padding: 12px 14px; border-radius: 11px; font-size: 12.5px; line-height: 1.5; }
.p-verdict.ok { background: rgba(89, 217, 158, 0.09); box-shadow: inset 0 0 0 1px rgba(89,217,158,.25); }
.p-verdict.warn { background: rgba(255, 170, 80, 0.09); box-shadow: inset 0 0 0 1px rgba(255,170,80,.28); }
.p-verdict.bad { background: rgba(255, 90, 74, 0.09); box-shadow: inset 0 0 0 1px rgba(255,90,74,.3); }
.p-verdict b { font-family: var(--font-d); }
.p-hero { display: flex; gap: 20px; margin-top: 16px; align-items: baseline; }
.p-hero .ph-main { font-family: var(--font-d); font-size: 40px; font-weight: 700; color: var(--gold-hi); }
.p-hero .ph-main small { font-size: 16px; color: var(--ink-2); font-weight: 500; }
.p-hero .ph-side { color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.p-times { margin-top: 16px; border-top: 1px solid var(--glass-brd); }
.p-times div { display: flex; justify-content: space-between; padding: 7.5px 2px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12.5px; }
.p-times dt { color: var(--ink-2); }
.p-times dd { font-variant-numeric: tabular-nums; }
.p-times .hl dd, .p-times .hl dt { color: var(--gold-hi); font-weight: 600; }
.p-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.p-chip { background: rgba(255,255,255,.045); border: 1px solid var(--glass-brd); border-radius: 9px; padding: 7px 11px; font-size: 11.5px; }
.p-chip b { display: block; font-family: var(--font-d); font-size: 14px; margin-top: 1px; }
.p-note { margin-top: 13px; color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.p-note em { color: var(--ink); font-style: normal; }
.p-section { font-family: var(--font-d); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 9px; }
#pano-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-brd); }
#pano { display: block; width: 100%; }
#pano-busy {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(7, 10, 20, 0.72); font-size: 12px; color: var(--ink-2);
}
.p-scrub { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.p-scrub button {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 1px solid rgba(255,209,102,.4); color: var(--gold-hi);
  background: rgba(255,209,102,.08); cursor: pointer; display: grid; place-items: center;
}
.p-scrub button svg { width: 13px; height: 13px; }
.p-scrub .ps-clock { font-family: var(--font-d); font-size: 13px; color: var(--gold-hi); width: 62px; text-align: right; }
.p-slider { margin-top: 12px; display: grid; gap: 5px; }
.p-slider label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.p-slider label b { color: var(--ink); font-weight: 500; }

/* ── fullscreen simulation ──────────────────────────────────────────── */
#sim-full {
  position: absolute; inset: 0; z-index: 65;
  display: flex; flex-direction: column;
  background: #04050c;
  animation: simfade .3s ease;
}
@keyframes simfade { from { opacity: 0; } }
#sim-full-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; flex: none;
}
#sim-full-title { font-family: var(--font-d); font-size: 16px; font-weight: 600; letter-spacing: .04em; }
#sim-full-title span { color: var(--ink-3); font-family: var(--font-b); font-weight: 400; font-size: 12px; margin-left: 10px; }
#sim-full-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.05);
  color: var(--ink-2); font-size: 19px; cursor: pointer;
}
#sim-full-close:hover { color: var(--ink); }
#sim-full-stage { flex: 1; min-height: 0; padding: 0 22px; }
#sim-full-stage canvas { display: block; width: 100%; height: 100%; border-radius: 14px; }
#sim-full-controls { flex: none; padding: 10px 22px 18px; max-width: 900px; margin: 0 auto; width: 100%; }
#pano-expand {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--glass-brd); background: rgba(7,10,20,.65);
  color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
#pano-expand:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
#pano-expand svg { width: 14px; height: 14px; }

/* ── about modal ────────────────────────────────────────────────────── */
#about {
  position: absolute; inset: 0; z-index: 55;
  display: grid; place-items: center;
  background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(6px);
}
#about-card {
  position: relative; width: min(660px, calc(100vw - 48px));
  max-height: min(78vh, 820px); overflow-y: auto; padding: 28px 30px;
}
#about-card h2 { font-family: var(--font-d); font-size: 21px; margin-bottom: 4px; }
#about-card h3 { font-family: var(--font-d); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 20px 0 7px; }
#about-card p, #about-card li { color: var(--ink-2); font-size: 13px; line-height: 1.65; }
#about-card ul { padding-left: 18px; }
#about-card table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
#about-card th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 5px 8px 5px 0; border-bottom: 1px solid var(--glass-brd); }
#about-card td { padding: 5px 8px 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-variant-numeric: tabular-nums; }
#about-card td:first-child { color: var(--ink); }

/* ── support + ads ──────────────────────────────────────────────────── */
#support { position: absolute; left: 20px; bottom: 218px; z-index: 29; padding: 0; border-radius: 999px; }
#support a { display: block; padding: 8px 14px; color: var(--ink-2); font-size: 12px; text-decoration: none; transition: color .18s; }
#support a:hover { color: var(--gold-hi); }
#ad-slot { position: absolute; right: 20px; top: 84px; z-index: 28; width: 300px; min-height: 100px; border-radius: 12px; overflow: hidden; }

/* ── maplibre cleanup ───────────────────────────────────────────────── */
.maplibregl-ctrl-attrib {
  background: rgba(7, 10, 20, 0.6) !important; color: var(--ink-3);
  font-size: 10px; border-radius: 8px 0 0 0;
}
.maplibregl-ctrl-attrib a { color: var(--ink-3) !important; }
.maplibregl-ctrl-group { background: var(--glass) !important; border-radius: 10px !important; box-shadow: var(--shadow) !important; border: 1px solid var(--glass-brd); }
.maplibregl-ctrl-group button { background: transparent !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(0.82); }

/* ── selection callout (anchored to the exact point) ────────────────── */
#callout {
  position: absolute; z-index: 44; width: 274px;
  padding: 12px 14px 12px; border-radius: 13px;
  transform: translate(-50%, calc(-100% - 15px));
}
#callout-arrow {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  width: 16px; height: 8px; overflow: hidden;
}
#callout-arrow::after {
  content: ""; position: absolute; left: 3px; top: -6px;
  width: 11px; height: 11px; transform: rotate(45deg);
  background: var(--glass); border: 1px solid var(--glass-brd);
}
#callout.flip { transform: translate(-50%, 15px); }
#callout.flip #callout-arrow { bottom: auto; top: -8px; }
#callout.flip #callout-arrow::after { top: 3px; }
#callout-close {
  position: absolute; top: 6px; right: 8px; width: 26px; height: 26px;
  border-radius: 50%; border: none; background: transparent;
  color: var(--ink-3); font-size: 16px; cursor: pointer;
}
.co-name { font-family: var(--font-d); font-size: 14px; font-weight: 600; padding-right: 20px; }
.co-sub { color: var(--ink-3); font-size: 10.5px; margin-top: 1px; }
.co-hero { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; }
.co-hero b { font-family: var(--font-d); font-size: 24px; color: var(--gold-hi); }
.co-hero span { color: var(--ink-2); font-size: 11px; }
.co-line { color: var(--ink-2); font-size: 11.5px; margin-top: 4px; }
.co-actions { display: flex; gap: 8px; margin-top: 10px; }
.co-actions button, .co-actions a {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 9px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.1); color: var(--gold-hi);
  font-size: 12px; cursor: pointer; text-decoration: none; font-family: var(--font-b);
}
.co-actions a { border-color: var(--glass-brd); background: rgba(255,255,255,.05); color: var(--ink-2); }

/* ── search modes + travel controls ─────────────────────────────────── */
#search-modes { padding: 3px; flex: none; }
#search-modes button { padding: 5px 11px; font-size: 11.5px; }
#trip-controls {
  position: absolute; top: 46px; left: 0; width: 300px; z-index: 50;
  padding: 13px 14px; border-radius: 12px; display: grid; gap: 9px;
}
#trip-controls label { display: grid; grid-template-columns: 86px 1fr 52px; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-2); }
#trip-controls label b { text-align: right; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
#trip-controls .tc-note { color: var(--ink-3); font-size: 10.5px; }
#trip-go { text-align: center; cursor: pointer; }
#btn-plan { display: none; } /* travel mode in search replaces it */

/* ── mobile-first (most users) ──────────────────────────────────────── */
@media (max-width: 900px) {
  #hud { flex-direction: column; gap: 8px; padding: 10px 12px; pointer-events: none; }
  #brand { gap: 8px; }
  #brand svg { width: 30px; height: 30px; }
  #brand h1 { font-size: 14.5px; letter-spacing: 0.08em; }
  #brand p { display: none; }
  #hud-right { width: 100%; gap: 6px; align-items: center; }
  #countdown { font-size: 9.5px; padding: 5px 8px; order: -1; }
  #lang-pick { font-size: 10px; padding: 5px 20px 5px 8px; background-position: right 8px center; }
  #btn-about { width: 33px; height: 33px; padding: 0; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
  #modes {
    position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
    z-index: 33; pointer-events: auto; white-space: nowrap;
  }
  #modes button { white-space: nowrap; }
  #btn-about { padding: 7px 10px; font-size: 11px; white-space: nowrap; }
  #finder { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  #search-box { flex: 1; min-width: 0; width: auto; padding: 7px 11px; }
  #search-modes { order: -1; }
  #btn-locate { width: 33px; height: 33px; }
  #search-results, #trip-controls { position: fixed; left: 12px; right: 12px; top: 108px; width: auto; max-height: 52vh; }
  #legend { left: 12px; right: 12px; bottom: 64px; width: auto; padding: 9px 12px 8px; }
  #legend-title { font-size: 11.5px; }
  #legend-title span { display: none; }
  #legend-ramp { height: 7px; margin-top: 6px; }
  #legend-ticks { font-size: 9px; margin-top: 3px; }
  #legend-op { margin-top: 6px; }
  #legend-toggles, #timeline, #support, #safety, #ad-slot, .site-tip, #cursor-card { display: none !important; }
  #panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%;
    max-height: 86vh; border-radius: 18px 18px 0 0;
    padding: 16px 16px 26px; animation: sheetup .3s cubic-bezier(.2,.8,.25,1);
  }
  @keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }
  .p-title { font-size: 19px; }
  .p-hero .ph-main { font-size: 33px; }
  #sim-full-stage { padding: 0 8px; }
  #sim-full-controls { padding: 8px 12px 14px; }
  #callout { width: min(274px, calc(100vw - 28px)); }
  .plan-row { flex-wrap: wrap; gap: 5px 10px; }
  .plan-row .pr-main { flex: 1 1 100%; }
  .plan-row .pr-name { font-size: 13px; }
  #finder[data-mode="trip"] #btn-locate { display: none; }
  #about-card { padding: 20px 18px; }
  .veil-title { letter-spacing: 0.09em; }
}
