/* Observatorio · Barcelona: Far from home — v3
   Distribución de apps conocidas en modo oscuro: buscador y ficha a la izquierda (Google Maps),
   indicadores en columna a la derecha y leyenda abajo (Windy), capas en un botón abajo a la izquierda. */
:root {
  --bg: #0e1116;
  --glass: rgba(24, 27, 33, 0.96); /* sin desenfoque de fondo: encima de un mapa que se repinta, obliga al navegador a desenfocar en cada fotograma */
  --solid: #1b1e24;
  --raise: #23272f;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #e8eaed;
  --muted: #9aa0a6;
  --faint: #6f757b;
  --accent: #8ab4f8;
  --hover: rgba(255, 255, 255, 0.06);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.42);
  --in: #4cc9f0;
  --out: #ff9f43;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 13px; -webkit-font-smoothing: antialiased; overflow: hidden; }
#map { position: absolute; inset: 0; }
button { font-family: inherit; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

/* ---------- Buscador y lugares ---------- */
.topbar { position: absolute; top: 12px; left: 12px; right: 236px; z-index: 5; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.searchbox { position: relative; width: 380px; flex: none; height: 48px; display: flex; align-items: center; gap: 4px; padding: 0 14px 0 6px;
  background: var(--solid); border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.searchbox:focus-within { border-color: rgba(138, 180, 248, .55); }
.logo-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.logo-btn:hover { background: var(--hover); }
.logo { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 210deg, #f26b6b, #f5a064, #7fc6a0, #6fd3c8, #8ab4f8, #f26b6b); }
.searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 15px Inter, sans-serif; }
.searchbox input::placeholder { color: var(--muted); }
.searchbox .lupa { color: var(--muted); flex: none; }
.results { list-style: none; margin: 0; padding: 6px; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; display: none; }
.results.open { display: block; }
.results li { padding: 9px 10px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.results li.active, .results li:hover { background: var(--hover); }
.results li small { color: var(--muted); margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.results .k { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, #888); }

.placechips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.placechips::-webkit-scrollbar { display: none; }
.pchip { flex: none; height: 34px; padding: 0 13px; border-radius: 17px; border: 1px solid var(--line); background: var(--solid); color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3); font: 500 13px Inter, sans-serif; cursor: pointer; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pchip:hover { background: var(--raise); }
.pchip.tour { background: #e8eaed; color: #111; border-color: transparent; font-weight: 600; }
.pchip.tour.on { background: var(--accent); }

/* ---------- Ficha lateral ---------- */
.sheet { position: absolute; z-index: 4; left: 12px; top: 72px; max-height: calc(100% - 176px); width: 380px; overflow: auto; overscroll-behavior: contain;
  background: var(--solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: slide .2s ease; }
@keyframes slide { from { opacity: 0; transform: translateX(-10px); } }
.sheet .hero { position: relative; padding: 18px 18px 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hc, #8ab4f8) 20%, transparent), transparent); }
.sheet .close { position: absolute; right: 10px; top: 10px; }
.sheet .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.sheet h2 { margin: 4px 40px 2px 0; font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; }
.sheet .sub { color: var(--muted); font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, .08); color: var(--ink); }
.badge.hot { background: rgba(228, 87, 46, .2); color: #ff9b7a; }
.badge.warm { background: rgba(243, 167, 18, .18); color: #f6c86b; }
.tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--solid); z-index: 1; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: 600 12.5px Inter, sans-serif; padding: 12px 4px 10px; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pane { padding: 14px 16px 18px; }
.pane[hidden] { display: none; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { padding: 10px 11px; border-radius: 12px; background: var(--raise); cursor: pointer; border: 1px solid transparent; text-align: left; color: var(--ink); font: inherit; }
.kpi:hover { border-color: var(--line); }
.kpi.on { border-color: rgba(138, 180, 248, .55); }
.kpi .l { font-size: 11.5px; color: var(--muted); }
.kpi .v { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .v small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.kpi .r { font-size: 11px; color: var(--faint); margin-top: 3px; }
.kpi .meter { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); margin-top: 6px; overflow: hidden; }
.kpi .meter i { display: block; height: 100%; border-radius: 2px; background: var(--mc, var(--accent)); }
.sheet h4 { margin: 18px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.sheet h4:first-child { margin-top: 2px; }
.sheet dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.note { color: var(--faint); font-size: 11.5px; line-height: 1.5; margin-top: 12px; }
.chart { width: 100%; display: block; margin-top: 4px; overflow: visible; }
.chart text { fill: var(--muted); font: 10px Inter, sans-serif; }
.pending { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px dashed rgba(138, 180, 248, .35); background: rgba(138, 180, 248, .06); }
.pending b { display: block; font-size: 12.5px; margin-bottom: 4px; color: var(--accent); }
.pending p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 12px; color: #fff; background: var(--c); }
.lines { line-height: 1.7; color: var(--ink); }
.legend2 { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.legend2 i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #f6c445, #f26b6b); }

/* ---------- Columna de indicadores ---------- */
.rail { position: absolute; z-index: 4; right: 12px; top: 12px; width: 212px; max-height: calc(100% - 330px); overflow: auto; scrollbar-width: thin;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; }
.rail-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 8px 8px 5px; }
.rail .sep { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.ind { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  font: 500 13px Inter, sans-serif; cursor: pointer; text-align: left; }
.ind:hover { background: var(--hover); }
.ind svg { flex: none; color: var(--muted); }
.ind.on { background: rgba(138, 180, 248, .16); color: #d2e3fc; }
.ind.on svg { color: var(--accent); }
.ind[disabled] { cursor: help; color: var(--faint); }
.ind[disabled]:hover { background: transparent; }
.ind .soon { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--faint); border: 1px solid var(--line); padding: 1px 6px; border-radius: 999px; }

/* ---------- Leyenda ---------- */
.legend { position: absolute; z-index: 4; right: 12px; bottom: 18px; width: 300px; max-height: calc(100% - 360px); overflow: auto; scrollbar-width: thin; padding: 12px 14px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.legend .t { font-weight: 700; font-size: 13px; }
.legend .d { color: var(--muted); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.legend .scale { display: flex; margin-top: 10px; height: 10px; border-radius: 5px; overflow: hidden; }
.legend .scale i { flex: 1; }
.legend .ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.legend .cats { display: grid; gap: 5px; margin-top: 10px; }
.legend .cats span { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend .cats i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.legend .src { color: var(--faint); font-size: 10.5px; margin-top: 8px; }
.legend .top { margin-top: 8px; display: grid; gap: 1px; }
.legend .top button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink); font: 500 12px Inter, sans-serif; padding: 4px 6px; border-radius: 7px; cursor: pointer; text-align: left; }
.legend .top button:hover { background: var(--hover); }
.legend .top button b { width: 16px; color: var(--faint); font-weight: 600; font-size: 11px; }
.legend .top button span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend .flowkey { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.legend .flowkey i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: 3px; margin-right: 6px; }
.legend .tg { padding: 2px 0; font-size: 12px; }
.legend .tg:hover { background: transparent; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 12px Inter, sans-serif; padding: 6px 4px; border-radius: 7px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #e8eaed; color: #111; }
.seg.mini button { padding: 4px 9px; font-size: 11.5px; }

/* ---------- Capas ---------- */
.layers-btn { position: absolute; z-index: 4; left: 12px; bottom: 18px; width: 76px; height: 76px; border-radius: 12px; border: 2px solid #fff; padding: 0; overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); background: #333; }
.layers-btn .thumb { position: absolute; inset: 0; }
.layers-btn b { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 0 5px; font: 600 11.5px Inter, sans-serif; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.layers-pop { position: absolute; z-index: 5; left: 98px; bottom: 18px; width: 430px; max-height: calc(100% - 110px); overflow: auto; padding: 14px 14px 10px;
  background: var(--solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: slide .15s ease; }
.lp-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 2px 8px; }
.lp-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.maptypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.maptypes button { border: 0; background: transparent; color: var(--muted); font: 600 12px Inter, sans-serif; cursor: pointer; display: grid; gap: 6px; justify-items: center; padding: 0; }
.maptypes button.on { color: var(--accent); }
.mt { display: block; width: 100%; height: 54px; border-radius: 10px; border: 2px solid transparent; }
.maptypes button.on .mt { border-color: var(--accent); }
.mt.day, .thumb.day { background: linear-gradient(135deg, #e8e4da 0 40%, #cfe3c4 40% 55%, #f2efe8 55% 70%, #a9cbe8 70%); }
.mt.night, .thumb.night { background: linear-gradient(135deg, #1d2330 0 40%, #2a3344 40% 55%, #141922 55% 70%, #0b1a2b 70%); }
.mt.satellite, .thumb.satellite { background: linear-gradient(135deg, #5d6b4f 0 30%, #8a8371 30% 50%, #4e5d48 50% 70%, #2f4e66 70%); }
.blegend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 2px 0; font-size: 11.5px; color: var(--muted); }
.blegend:empty { display: none; }
.blegend span { display: flex; align-items: center; gap: 6px; }
.blegend i { width: 11px; height: 11px; border-radius: 3px; }
.blegend .grad { flex-basis: 100%; height: 8px; border-radius: 4px; }
.blegend .gl { flex-basis: 100%; display: flex; justify-content: space-between; margin-top: -4px; font-size: 10.5px; }

.tg { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 8px; cursor: pointer; user-select: none; }
.tg:hover { background: var(--hover); }
.tg input { display: none; }
.tg .sw { width: 28px; height: 16px; border-radius: 10px; background: #3c4043; position: relative; flex: none; transition: background .15s; }
.tg .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #c4c7c5; transition: transform .15s, background .15s; }
.tg input:checked + .sw { background: rgba(138, 180, 248, 0.45); }
.tg input:checked + .sw::after { transform: translateX(12px); background: var(--accent); }
.tg em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 10px 2px color-mix(in srgb, var(--c) 70%, transparent); } }

/* ---------- Vista ---------- */
.view-tools { position: absolute; z-index: 4; right: 324px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.tool { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--solid); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer; font: 700 12px Inter, sans-serif; display: grid; place-items: center; }
.tool:hover { background: var(--raise); }
.tool.on { color: #111; background: var(--accent); border-color: transparent; }
.maplibregl-ctrl-bottom-right { right: 324px; bottom: 156px; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0; }
.maplibregl-ctrl-group { background: var(--solid) !important; border: 1px solid var(--line); border-radius: 12px !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-group button { width: 38px !important; height: 38px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }
.maplibregl-ctrl-scale { background: rgba(18, 21, 27, 0.7); color: var(--muted); border-color: var(--muted); }
.maplibregl-ctrl-attrib { display: none; }

/* ---------- Barra de tiempo ---------- */
.timebar { position: absolute; z-index: 4; left: 104px; right: 376px; bottom: 18px; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); }
.timebar .play { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #111; background: #e8eaed; }
.timebar .play .i-pause { display: none; }
.timebar.playing .play .i-pause { display: block; }
.timebar.playing .play .i-play { display: none; }
.timebar .clock { display: flex; flex-direction: column; line-height: 1.15; min-width: 92px; }
.timebar .clock b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timebar .clock span { font-size: 11px; color: var(--muted); }
.timebar .track { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.timebar input[type=range] { width: 100%; accent-color: #f6c445; height: 4px; }
.timebar .ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); padding: 0 2px; }
.timebar .speeds { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,0.05); }
.timebar .speeds button, .timebar .now { border: 0; background: transparent; color: var(--muted); font: 600 11.5px Inter, sans-serif; padding: 6px 7px; border-radius: 6px; cursor: pointer; }
.timebar .speeds button.on { background: rgba(255,255,255,0.14); color: var(--ink); }
.timebar .now { border: 1px solid var(--line); color: var(--ink); }

/* ---------- Sobre, tooltip, carga ---------- */
.about { position: absolute; z-index: 6; left: 12px; top: 72px; width: 380px; padding: 18px; background: var(--solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: slide .2s ease; }
.about .close { position: absolute; right: 10px; top: 10px; }
.about .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.about h2 { margin: 4px 0 8px; font-size: 21px; }
.about p { color: #c8ccd1; line-height: 1.55; margin: 0 0 12px; }
.about .foot { color: var(--faint); font-size: 11px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; }
.tip { position: absolute; pointer-events: none; z-index: 7; padding: 7px 10px; border-radius: 9px; background: rgba(12, 14, 18, 0.94); border: 1px solid var(--line);
  font-size: 12px; white-space: nowrap; transform: translate(14px, 14px); box-shadow: var(--shadow); }
.tip small { color: var(--muted); margin-left: 6px; }
.tip .tv { display: block; margin-top: 3px; font-weight: 700; color: var(--accent); }
.loading { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; background: var(--solid); border: 1px solid var(--line); font-size: 12px; color: var(--muted); transition: opacity .4s; }
.loading span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: #f6c445; animation: spin 0.8s linear infinite; }
.loading.done { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.loading.done span { animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pantallas estrechas ---------- */
@media (max-width: 1280px) { .timebar .speeds { display: none; } }
@media (max-width: 1000px) {
  .topbar { right: 12px; }
  .placechips { display: none; }
  .timebar { left: 12px; right: 12px; bottom: 12px; }
  .layers-btn { bottom: 84px; width: 60px; height: 60px; }
  .layers-pop { left: 12px; right: 12px; width: auto; bottom: 152px; }
  .legend { bottom: 84px; width: 270px; max-height: 200px; }
  .legend .top { display: none; }
  .rail { top: 72px; max-height: calc(100% - 380px); width: 200px; }
  .view-tools { right: 294px; bottom: 84px; }
  .maplibregl-ctrl-bottom-right { display: none; }
  .sheet { bottom: 84px; }
}
@media (max-width: 640px) {
  .searchbox { width: 100%; }
  .sheet, .about { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; max-height: 62%; z-index: 6; }
  .rail { display: flex; gap: 4px; left: 12px; right: 12px; width: auto; top: 68px; max-height: none; overflow-x: auto; padding: 4px; border-radius: 12px; }
  .rail .rail-h, .rail .sep { display: none; }
  .rail .ind { flex: none; width: auto; padding: 6px 10px; }
  .legend { left: 12px; right: 12px; width: auto; bottom: 84px; max-height: 140px; }
  .layers-btn { bottom: 236px; width: 52px; height: 52px; }
  .layers-pop { bottom: 12px; }
  .view-tools { right: 12px; bottom: auto; top: 118px; }
  .timebar .clock { min-width: 62px; }
  .timebar .now { display: none; }
}

/* ---------- Historia del proyecto ---------- */
.story { position: absolute; z-index: 6; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); padding: 14px 16px 12px;
  background: var(--solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.story .st-n { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.story p { margin: 4px 0 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.story .st-b { display: flex; gap: 6px; justify-content: flex-end; }
.story button { border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 12px Inter, sans-serif; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.story button.on { background: var(--accent); color: #111; border-color: transparent; }
.story button[disabled] { opacity: .35; cursor: default; }
.pchip.story-btn { background: var(--accent); color: #111; border-color: transparent; font-weight: 600; }

/* ---------- Medidor de rendimiento (?perf=1) ---------- */
.perf { position: absolute; z-index: 9; left: 100px; bottom: 100px; padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,.75); color: #9fe870;
  font: 600 12px ui-monospace, Consolas, monospace; pointer-events: none; }
