:root {
  --bg: #070b1a; --panel: #0e1430; --panel2: #18214a; --line: #2a3566;
  --text: #e8ecff; --muted: #8e98c7; --accent: #5ee6ff; --gold: #ffc24b; --danger: #ff5d73; --ok: #6df0a8;
  --card-w: min(80vw, 372px, 39dvh);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #03050d; color: var(--text); overscroll-behavior: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { display: flex; justify-content: center; }
button { font: inherit; color: inherit; cursor: pointer; }

#app { position: relative; width: 100%; max-width: 480px; height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(120% 55% at 50% -5%, #1b2666 0%, transparent 62%), radial-gradient(90% 45% at 85% 105%, #3a1650 0%, transparent 60%), var(--bg);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); user-select: none; -webkit-user-select: none; }
#stars { position: absolute; inset: 0; pointer-events: none; }
#stars i { position: absolute; border-radius: 50%; background: #fff; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }

/* ---------- Medidores ---------- */
#hud { position: relative; display: flex; justify-content: space-around; padding: 10px 10px 2px; }
.meter { position: relative; width: 70px; text-align: center; padding-top: 18px; }
.meter svg { width: 52px; height: 52px; display: block; margin: 0 auto; overflow: visible; }
.meter .track { fill: none; stroke: var(--line); stroke-width: 4; }
.meter .zone { fill: none; stroke: var(--danger); stroke-width: 4; opacity: .55; transform: rotate(-90deg); transform-origin: 50% 50%; }
.meter .fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1), stroke .3s; }
.meter .ico { fill: var(--text); transition: fill .3s; }
.meter small { display: block; margin-top: 3px; font: 600 9.500px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meter.warn .fill { stroke: var(--gold); }
.meter.crit .fill { stroke: var(--danger); animation: pulse .7s ease-in-out infinite; }
.meter.crit .ico { fill: var(--danger); }
.meter.up .fill { stroke: var(--ok); } .meter.up .ico { fill: var(--ok); }
.meter.down .fill { stroke: var(--danger); } .meter.down .ico { fill: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
/* Punto de previsión: dice qué se moverá antes de soltar la carta, pero no hacia dónde */
.meter .pv { position: absolute; top: 8px; left: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--text);
  box-shadow: 0 0 6px rgba(232, 236, 255, .7); opacity: 0; transform: scale(.3); transition: opacity .12s, transform .12s; }
.meter .pv.on { opacity: 1; transform: none; }
.meter .pv.big { transform: scale(1.900); }

/* Línea de consecuencia: por qué han cambiado los medidores */
#ticker { position: relative; min-height: 38px; margin: 2px 16px 0; padding: 5px 10px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  text-align: center; border-top: 1px solid rgba(94, 230, 255, .14); border-bottom: 1px solid rgba(94, 230, 255, .14); }
#tk-note { font-size: 12.500px; line-height: 1.250; color: #c5cdf2; text-wrap: balance; }
#tk-chips { font: 600 9.500px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#tk-chips b { margin: 0 5px; font-weight: 600; white-space: nowrap; }
#tk-chips .u { color: var(--ok); } #tk-chips .d { color: var(--danger); }
#ticker.flash { animation: tick .5s; }
@keyframes tick { from { background: rgba(94, 230, 255, .14); } }

/* ---------- Zona de juego ---------- */
#play { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px; }
#question { margin: 4px 0 10px; min-height: 4.800em; display: flex; align-items: center; text-align: center;
  font-size: clamp(14.500px, 4.200vw, 17.500px); line-height: 1.350; text-wrap: balance; }
#stage { position: relative; width: var(--card-w); aspect-ratio: 4 / 5; flex: none; }
#stage::before { content: ''; position: absolute; inset: -14% -22%; border-radius: 50%; border: 1px solid rgba(94, 230, 255, .08);
  box-shadow: 0 0 0 26px rgba(94, 230, 255, .025), 0 0 0 27px rgba(94, 230, 255, .06); pointer-events: none; }

.card { position: absolute; inset: 0; --accent: #5ee6ff; --cut: 20px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .6)); }
.card-in, .card-body { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.card-in { position: absolute; inset: 0; padding: 1.500px; display: flex;
  background: linear-gradient(155deg, var(--accent), color-mix(in srgb, var(--accent) 22%, #0b1028) 45%, color-mix(in srgb, var(--accent) 55%, #0b1028)); }
.card-body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: #0a0f25; }
.card.ghost { transform: scale(.94) translateY(13px); opacity: .45; filter: none; --accent: #33407a; }
.card.ghost .card-body { background: repeating-linear-gradient(135deg, #0c1230 0 9px, #10183a 9px 18px); }

.card-head { flex: none; height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 0 24px;
  font: 600 8.500px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.card-head .link { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.card-head .link i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.card-head .link b { font-weight: 600; }
#c-place, .card-head .place { color: color-mix(in srgb, var(--accent) 60%, #8e98c7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holo .card-head .link i { animation: pulse 1.400s steps(2) infinite; }

.scene { position: relative; flex: 1; min-height: 0; overflow: hidden; color: var(--accent); }
.scene > * { position: absolute; inset: 0; }
.scene svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.live .scene { background: linear-gradient(color-mix(in srgb, var(--accent) 26%, #0b1028), #0a0f25 85%); }
.holo .scene { background: radial-gradient(90% 70% at 50% 42%, color-mix(in srgb, var(--accent) 16%, #070b1a), #060915 80%); }
.live .bust { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
/* Holograma sutil: algo menos de color, tinte del canal, líneas de barrido y pie que se desvanece */
.holo .bust { filter: saturate(.72) brightness(1.120); opacity: .95; animation: flicker 7s steps(1) infinite;
  -webkit-mask-image: linear-gradient(#000 88%, rgba(0,0,0,.25)); mask-image: linear-gradient(#000 88%, rgba(0,0,0,.25)); }
.holo .tint { background: var(--accent); mix-blend-mode: color; opacity: .13; }
.holo .scan { background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .075) 0 1px, transparent 1px 4px); mix-blend-mode: screen; overflow: hidden; }
.holo .scan::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 26%;
  background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 16%, transparent), transparent); animation: sweep 5.500s linear infinite; }
.holo .emitter { inset: auto 14% 2.500% 14%; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 85%, #fff), transparent); opacity: .7; }
@keyframes sweep { from { transform: translateY(-110%); } to { transform: translateY(420%); } }
@keyframes flicker { 0%, 100% { opacity: .94; transform: none; } 46% { opacity: .8; transform: translateX(1.500px); } 47% { opacity: .94; transform: none; } 81% { opacity: .86; } 82% { opacity: .94; } }
.spin, .spin-rev { transform-box: view-box; transform-origin: 50% 43.080%; animation: spin 26s linear infinite; }
.spin-rev { animation-duration: 17s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.card-foot { flex: none; position: relative; padding: 8px 40px 10px 16px; border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, #0a0f25), #0a0f25 70%); }
.card-foot::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 11px; width: 3px; background: var(--accent); }
.card-foot b { display: block; font-size: 15.500px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot span { display: block; margin-top: 1px; font: 9.500px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Icono del medidor que defiende el personaje: discreto, en la esquina */
.c-meter { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; display: block; opacity: .55; }
.c-meter svg { width: 100%; height: 100%; display: block; fill: var(--accent); }

#card { touch-action: none; cursor: grab; will-change: transform; outline: none; }
#card.settle { transition: transform .28s cubic-bezier(.2, 1.300, .4, 1); }
#card.fly { transition: transform .3s ease-in, opacity .3s ease-in; opacity: 0; }
#card.enter { animation: enter .34s cubic-bezier(.2, .9, .3, 1.150); }
@keyframes enter { from { transform: scale(.92) translateY(14px); opacity: 0; } }
#card:focus-visible .card-in { background: var(--gold); }
#choice { position: absolute; left: 0; right: 0; top: 27px; padding: 14px 16px 34px; font-weight: 700; font-size: clamp(15px, 4.600vw, 19px); line-height: 1.200;
  background: linear-gradient(rgba(5, 8, 22, .94) 30%, rgba(5, 8, 22, 0)); opacity: 0; pointer-events: none; text-wrap: balance; z-index: 5; }
#choice.left { text-align: right; } #choice.right { text-align: left; }
#choice.armed { color: var(--gold); }
#hint { margin-top: 12px; font: 11px var(--mono); letter-spacing: .2em; color: var(--accent); animation: pulse 1.600s ease-in-out infinite; }
#hint.hide { visibility: hidden; }

#status { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 14px 10px; }
#regent { flex: 1; text-align: center; min-width: 0; background: none; border: 0; padding: 4px 0; border-radius: 10px; }
#regent:active { background: rgba(94, 230, 255, .08); }
#regent:focus-visible { outline: 1px solid var(--accent); }
#regent b { display: block; font-size: 15px; letter-spacing: .04em; }
#regent span { font: 10.500px var(--mono); color: var(--muted); }
#regent span.old { color: var(--gold); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(16, 23, 51, .7); font-size: 17px; flex: none; }
.icon-btn.off { opacity: .4; text-decoration: line-through; }

#toast { position: absolute; left: 50%; bottom: 76px; transform: translate(-50%, 20px); width: max-content; max-width: 92%; padding: 13px 18px; text-align: center;
  background: var(--panel2); border: 1px solid var(--accent); font-size: 16px; line-height: 1.35; box-shadow: 0 6px 24px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 6;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pantallas ---------- */
.overlay { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; overflow-y: auto;
  padding: calc(22px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom)); text-align: center;
  background: rgba(5, 8, 22, .95); backdrop-filter: blur(6px); animation: fade .25s; }
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.overlay .grow { flex: 1; min-height: 12px; }
.tag { font: 600 10.500px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.tag.red { color: var(--danger); } .tag.gold { color: var(--gold); }
.overlay h1 { margin: 12px 0 6px; font-size: clamp(36px, 11.500vw, 50px); line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.overlay h1 em { display: block; font-style: normal; color: var(--accent); }
.overlay h2 { margin: 10px 0 8px; font-size: clamp(25px, 7.600vw, 33px); line-height: 1.100; text-wrap: balance; }
.overlay p { margin: 6px 0; max-width: 34ch; line-height: 1.450; color: #cfd5f5; }
.sub { color: var(--muted) !important; font-size: 13.500px; }
.gold-t { color: var(--gold) !important; }
.epitaph { margin: 14px 0 4px; font: 12.500px var(--mono); color: var(--gold); }
.box { width: 100%; max-width: 360px; margin: 10px 0 0; padding: 11px 14px; background: var(--panel); border: 1px solid var(--line); text-align: left;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.box small { display: block; font: 600 9.500px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.box b { display: block; margin-bottom: 2px; }
.box p { margin: 0; max-width: none; font-size: 13.500px; }
.box.gold { border-color: rgba(255, 194, 75, .55); } .box.gold small { color: var(--gold); }
.btn { width: 100%; max-width: 360px; min-height: 52px; margin-top: 10px; padding: 12px 16px; border: 0; font-weight: 700; font-size: 16.500px; flex: none;
  background: var(--accent); color: #04121a;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.btn:active { filter: brightness(.85); }
.btn.alt { background: var(--panel2); color: var(--text); font-weight: 600; min-height: 46px; font-size: 15px; }
.btn.small { min-height: 34px; font-size: 12px; color: var(--muted); background: transparent; }
.cause { position: relative; width: 92px; height: 92px; margin: 12px 0 4px; border-radius: 50%; border: 2px solid var(--danger); display: grid; place-items: center; flex: none;
  box-shadow: 0 0 0 7px rgba(255, 93, 115, .08); }
.cause svg { width: 46px; height: 46px; fill: var(--danger); }
.cause i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 22px; color: var(--danger); }
.stats { display: flex; gap: 20px; justify-content: center; margin: 14px 0; font: 11px var(--mono); color: var(--muted); }
.stats b { display: block; font-size: 20px; color: var(--text); }

/* Led de alerta: parpadea en cualquier medidor que esté en rojo */
.meter .led { position: absolute; top: 19px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); opacity: 0; transition: opacity .2s; }
.meter.crit .led { opacity: 1; box-shadow: 0 0 6px var(--danger), 0 0 2px #fff inset; animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .15; } }
/* Energía baja: los iconos se apagan un instante y los hologramas fallan más */
.meter.dim .ico { opacity: .2; transition: none; }
.lowpower .holo .bust { animation-duration: 2.200s; }
.lowpower .holo .scan { opacity: .75; }
#card.glitch .scene { filter: brightness(1.600) hue-rotate(-20deg); transform: translateX(2px); }
#card.glitch .bust { opacity: .55; }
/* Deslizar hacia arriba: delegar en VESTA */
#choice.up { text-align: center; color: #5ee6ff; }
#choice.up.armed { color: var(--gold); }

/* Telépata: el punto se convierte en flecha */
.meter .pv.dir { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: none; box-shadow: none; font-size: 11px; line-height: 14px; text-align: center; }
.meter .pv.dir.up { color: var(--ok); } .meter .pv.dir.down { color: var(--danger); }
.meter .pv.dir.big { transform: scale(1.400); }

/* Lealtad junto al nombre */
.card-foot .loy { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 0 6px; padding: 0; vertical-align: 2px; overflow: visible; }
.loy i { width: 3px; height: 9px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.loy i.on { background: var(--accent); }
.loy i.bad { background: var(--danger); }
.loy .fav { display: inline-block; width: 7px; height: 7px; margin-left: 3px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 6px rgba(255, 194, 75, .8); }

/* Poderes del clon bajo la carta */
#powers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 28px; margin-top: 6px; }
.pw { padding: 5px 11px; border: 1px solid var(--line); background: rgba(16, 23, 51, .75); font: 600 10.500px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.pw:not(:disabled):active { filter: brightness(1.300); }
.pw:disabled { opacity: .5; cursor: default; }
.pw.fav { border-color: rgba(255, 194, 75, .55); color: var(--gold); }
.pw.on { background: rgba(255, 194, 75, .16); border-color: var(--gold); color: var(--gold); }

/* Sala de cubas */
.vesta { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 380px; margin: 6px 0 4px; text-align: left; }
.vesta .who { flex: none; width: 58px; height: 63px; overflow: hidden; color: #5ee6ff; opacity: .9; }
.vesta .who svg { width: 100%; height: 100%; display: block; }
.vesta p { margin: 0; font-size: 13.500px; color: #c5cdf2; }
.cubas { width: 100%; max-width: 380px; display: grid; gap: 10px; margin-top: 10px; }
.btn.cuba { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; text-align: left; font-weight: 400; font-size: 13px; line-height: 1.350;
  background: var(--panel); color: #c5cdf2; border: 1px solid var(--line); --c: var(--accent); }
.btn.cuba.mut { --c: var(--ok); }
.btn.cuba svg { flex: none; width: 44px; height: 68px; color: var(--c); }
.btn.cuba small { display: block; font: 600 9.500px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.btn.cuba b { display: block; margin: 1px 0 2px; font-size: 16px; color: var(--text); }
.btn.cuba em { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.btn.cuba:hover, .btn.cuba:focus-visible { background: var(--panel2); outline: none; }

/* Ventana de la dinastía */
.overlay.pop { justify-content: center; background: rgba(3, 5, 13, .72); }
.dlg { width: 100%; max-width: 380px; max-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 18px 16px 14px;
  background: var(--panel); border: 1px solid var(--line); animation: rise .25s cubic-bezier(.2, .9, .3, 1.100);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.dlg .sub { margin: 10px 0 4px; font-size: 13px; }
.pods { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; max-width: 300px; }
.pods i { width: 11px; height: 24px; border-radius: 6px; border: 1px solid var(--accent);
  background: linear-gradient(color-mix(in srgb, var(--accent) 55%, transparent), color-mix(in srgb, var(--accent) 20%, transparent)); box-shadow: 0 0 6px rgba(94, 230, 255, .35); }
.pods i.gone { border-color: var(--line); background: transparent; box-shadow: none; opacity: .6; }
.pods i.now { border-color: var(--gold); background: linear-gradient(rgba(255, 194, 75, .85), rgba(255, 194, 75, .3)); box-shadow: 0 0 9px rgba(255, 194, 75, .6); }
.reigns { list-style: none; margin: 10px 0 0; padding: 0; width: 100%; display: grid; gap: 5px; overflow-y: auto; min-height: 0; text-align: left; }
.reigns li { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px 9px; background: #0b1128; border: 1px solid var(--line); overflow: hidden; }
.reigns li div { flex: 1; min-width: 0; }
.reigns b { display: block; font-size: 13.500px; }
.reigns span { display: block; font-size: 11.500px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reigns em { font: 600 11.500px var(--mono); font-style: normal; color: var(--text); white-space: nowrap; }
.reigns u { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); opacity: .5; }
.reigns li.now { border-color: rgba(255, 194, 75, .55); } .reigns li.now u { background: var(--gold); opacity: .8; } .reigns li.now em { color: var(--gold); }

/* Ayuda */
.help { width: 100%; max-width: 380px; text-align: left; display: grid; gap: 8px; margin-top: 12px; }
.help .row { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); }
.help svg { width: 26px; height: 26px; fill: var(--accent); justify-self: center; }
.help b { display: block; font-size: 14.500px; }
.help span { display: block; font-size: 12.500px; line-height: 1.300; color: #c5cdf2; }
.help em { font-style: normal; color: var(--danger); }
.help .tip { grid-template-columns: 1fr; border-color: rgba(255, 194, 75, .5); }
.htabs { width: 100%; max-width: 380px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.htabs button { min-height: 34px; padding: 6px 4px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 10.500px var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.htabs button.on { border-color: var(--accent); color: var(--accent); background: var(--panel2); }
.htabs button:focus-visible { outline: 1px solid var(--accent); }

/* Archivo */
.gal { width: 100%; max-width: 380px; text-align: left; }
.gal h3 { margin: 20px 0 8px; font: 600 11.500px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); display: flex; justify-content: space-between; }
.gal h3 span { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grid figure { margin: 0; text-align: center; }
.grid figure div { overflow: hidden; border: 1px solid var(--line); aspect-ratio: 12 / 13; background: #0c1230;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.grid figure div.q { display: grid; place-items: center; font: 700 28px var(--mono); color: #2c3765; }
.grid svg { width: 100%; height: 100%; display: block; }
.grid figcaption { margin-top: 3px; font-size: 10px; line-height: 1.150; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list li { padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; line-height: 1.350; }
.list li b { display: block; }
.list li.locked { color: var(--muted); border-style: dashed; background: transparent; }
.list li span { color: var(--muted); }

/* Hoja de retratos para desarrollo (#retratos) */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; width: 100%; }
.sheet .slot { position: relative; aspect-ratio: 4 / 5; }
#app.wide { max-width: 1100px; }

@media (max-height: 640px) { .meter svg { width: 42px; height: 42px; } .meter { padding-top: 15px; } #question { min-height: 3.800em; margin: 2px 0 6px; } #hint { margin-top: 5px; } #ticker { min-height: 32px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
