/* ============================================================
   Estudio de C · estilos
   Identidad visual: terminal/neón — fondo negro, fucsia y cian,
   texto blanco, superficies de vidrio oscuro con brillos sutiles.
   Tema único (oscuro). Se conservan todos los nombres de clases
   y variables para no romper el JS ni las vistas SVG.
   ============================================================ */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap; src: url("../fonts/caveat-latin-600-normal.woff2") format("woff2"); }

:root {
  /* superficies — paleta del tablero "Dame la Vida" */
  --bg: #0A0A0A;
  --bg2: #141414;
  --papel: #141414;
  --papel2: #1C1C1C;
  --tinta: #EDEDED;
  --tinta2: #A3A3A3;
  --linea: #262626;
  --linea2: #1C1C1C;

  /* acentos del tablero (sin neón) */
  --azul: #5B8DEF;
  --azul-claro: #9DB4CF;
  --azul-bg: rgba(91,141,239,.15);
  --cian: #9DB4CF;
  --cian-bg: rgba(157,180,207,.12);
  --verde: #7FB89A;
  --verde-bg: rgba(127,184,154,.14);
  --rojo: #E5484D;
  --rojo-bg: rgba(229,72,77,.14);
  --ambar: #E2A336;
  --ambar-bg: rgba(226,163,54,.14);
  --morado: #B79CC9;
  --morado-bg: rgba(183,156,201,.14);
  --gris: #6B6B6B;
  --gris-bg: #1C1C1C;

  --marca: rgba(212,212,212,.16);
  --marca-solida: #D4D4D4;

  --glow-f: 0 0 0 1px rgba(212,212,212,.28), 0 10px 30px -14px rgba(0,0,0,.8);
  --glow-c: 0 0 0 1px rgba(157,180,207,.30), 0 10px 30px -14px rgba(0,0,0,.8);
  --sombra: 0 6px 24px rgba(0,0,0,.45);

  --codigo-bg: #070707;
  --codigo-linea: #1C1C1C;
  --radio: 14px;
  --f-texto: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-display: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-mano: var(--f-display);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tinta);
  background-color: var(--bg);
  background-image: radial-gradient(1200px 500px at 15% -10%, rgba(255,255,255,.045), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
:focus-visible { outline: 2px solid var(--cian); outline-offset: 2px; border-radius: 4px; }
a { color: var(--cian); text-decoration-color: color-mix(in srgb, var(--cian) 45%, transparent); }
a:hover { color: var(--azul-claro); }
code, kbd, pre, samp { font-family: var(--f-mono); }
code { font-size: 0.88em; background: var(--azul-bg); color: var(--azul-claro); padding: 0.08em 0.4em; border-radius: 5px; white-space: normal; border: 1px solid color-mix(in srgb, var(--azul) 35%, transparent); }
.suave { color: var(--tinta2); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- estructura ---------- */
#app-raiz { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: 100vh; }
/* los items del grid no deben estirarse por su contenido (code/SVG anchos):
   así la columna respeta el ancho de pantalla y los paneles con scroll interno
   contienen lo que sobra, sin provocar scroll horizontal de toda la página */
#app-raiz > * { min-width: 0; }
.lateral {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(20, 26, 50, 0.92), rgba(9, 11, 22, 0.92));
  backdrop-filter: blur(6px);
  border-right: 1px solid var(--linea);
  padding: 18px 14px 28px; display: flex; flex-direction: column; gap: 14px;
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinta); padding: 4px 6px; }
.marca-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--azul), #3A6FD8);
  color: #0A0A0A;
  display: grid; place-items: center; font-family: var(--f-mono); font-weight: 600; font-size: 17px;
  box-shadow: 0 0 20px -3px rgba(91,141,239, 0.75);
}
.marca b { display: block; font-size: 17px; line-height: 1.15; }
.marca span { font-size: 12.5px; color: var(--tinta2); }
.grupo-nav h3 {
  margin: 10px 8px 4px; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tinta2); font-weight: 600;
}
.nav-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--tinta); font: inherit; font-size: 14.5px; padding: 7px 10px; border-radius: 9px; cursor: pointer; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--papel2); color: #fff; }
.nav-item[aria-current="page"] {
  background: var(--marca); color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--azul) 55%, transparent);
}
.nav-item .pt { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--linea); flex: none; display: grid; place-items: center; font-size: 11px; color: transparent; transition: all 0.2s; }
.nav-item.visto .pt { background: var(--verde); border-color: var(--verde); color: #0A0A0A; box-shadow: 0 0 10px -1px color-mix(in srgb, var(--verde) 70%, transparent); }
.nav-item.pronto { color: var(--tinta2); }
.nav-item .etq { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; background: var(--gris-bg); color: var(--tinta2); padding: 1px 7px; border-radius: 99px; border: 1px solid var(--linea); }
.lateral-pie { margin-top: auto; display: grid; gap: 8px; font-size: 13px; color: var(--tinta2); }

.btn {
  font: inherit; cursor: pointer; border: 1.5px solid var(--linea); background: var(--papel2); color: var(--tinta);
  border-radius: 10px; padding: 8px 15px; font-weight: 500; font-size: 14px;
  transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.btn:hover:not(:disabled) { border-color: var(--azul); box-shadow: var(--glow-f); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-azul { background: linear-gradient(135deg, var(--azul), #3A6FD8); color: #0A0A0A; border-color: transparent; font-weight: 600; box-shadow: 0 0 18px -4px rgba(91,141,239, 0.7); }
.btn-azul:hover:not(:disabled) { box-shadow: 0 0 26px -3px rgba(91,141,239, 0.9); }
.btn-chico { padding: 5px 11px; font-size: 13px; }

.barra-movil { display: none; }
.principal { min-width: 0; padding: 28px clamp(16px, 3vw, 44px) 80px; }
.contenedor { max-width: 1240px; margin: 0 auto; }

/* ---------- cabecera de tema ---------- */
.tema-cab { margin-bottom: 18px; }
.migas { font-size: 13px; color: var(--tinta2); margin-bottom: 4px; }
.tema-cab h1 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; margin: 0 0 6px; letter-spacing: -0.02em; }
.tema-cab h1 .sub { font-family: var(--f-mano); font-weight: 600; color: var(--cian); font-size: 0.62em; margin-left: 8px; white-space: nowrap; text-shadow: 0 0 14px rgba(157,180,207, 0.5); }
.tema-cab p { margin: 0; max-width: 78ch; color: var(--tinta2); font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-family: var(--f-mono); font-size: 12.5px; padding: 3px 11px; border-radius: 99px; background: var(--papel); border: 1px solid var(--linea); }
.chip b { color: var(--azul-claro); }

.pestanas { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--linea); margin: 20px 0 22px; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); padding-top: 6px; }
.pestana {
  font: inherit; font-size: 15px; font-weight: 500; border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--tinta2);
  padding: 9px 16px; border-radius: 10px 10px 0 0; cursor: pointer; position: relative; top: 1px; transition: color 0.15s, background 0.15s;
}
.pestana:hover { color: var(--tinta); background: var(--papel2); }
.pestana[aria-selected="true"] { color: #fff; background: var(--papel); border-color: var(--linea); border-bottom: 1px solid var(--papel); font-weight: 600; box-shadow: inset 0 2px 0 var(--azul); }
.pestana .ok { color: var(--verde); margin-left: 6px; font-size: 12px; }

/* ---------- prosa ---------- */
.prosa { max-width: 80ch; }
.prosa.ancha { max-width: none; }
.prosa h2 { font-size: 26px; margin: 42px 0 8px; letter-spacing: -0.01em; line-height: 1.2; }
.prosa h2:first-child { margin-top: 0; }
.prosa h2::before { content: "§"; color: var(--azul); margin-right: 8px; font-family: var(--f-mono); font-weight: 500; text-shadow: 0 0 12px rgba(91,141,239, 0.55); }
.prosa h3 { font-size: 19px; margin: 26px 0 6px; color: #fff; }
.prosa p { margin: 0 0 14px; }
.prosa ul, .prosa ol { padding-left: 22px; margin: 0 0 16px; }
.prosa li { margin: 4px 0; }
.prosa strong { font-weight: 600; color: #fff; }
.prosa mark { background: var(--marca); color: var(--azul-claro); padding: 0 4px; border-radius: 3px; font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--azul) 40%, transparent); }
.prosa table { border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; background: var(--papel); border-radius: 8px; overflow: hidden; }
.prosa th, .prosa td { border: 1px solid var(--linea); padding: 7px 12px; text-align: left; }
.prosa th { background: var(--papel2); font-weight: 600; color: #fff; }
.prosa td.num, .prosa th.num { text-align: right; font-family: var(--f-mono); }
.tabla-wrap { overflow-x: auto; }

.nota {
  margin: 18px 0; padding: 14px 18px 14px 20px; border-radius: var(--radio); background: var(--papel); border: 1px solid var(--linea);
  border-left: 5px solid var(--azul); box-shadow: var(--sombra); max-width: 80ch;
}
.nota > :last-child { margin-bottom: 0; }
.nota .nota-tit { font-family: var(--f-mano); font-size: 23px; line-height: 1; color: var(--azul-claro); display: block; margin-bottom: 4px; }
.nota.ojo { border-left-color: var(--rojo); } .nota.ojo .nota-tit { color: var(--rojo); }
.nota.idea { border-left-color: var(--verde); } .nota.idea .nota-tit { color: var(--verde); }
.nota.tip { border-left-color: var(--ambar); } .nota.tip .nota-tit { color: var(--ambar); }
.nota.ancha { max-width: none; }

.codigo-inline, .bloque {
  font-family: var(--f-mono); font-size: 13.5px; line-height: 1.55; background: var(--codigo-bg); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 12px 16px; overflow-x: auto; margin: 12px 0 18px; white-space: pre; max-width: 100%;
}
.codigo-inline code, .bloque code { background: none; padding: 0; font-size: inherit; border: 0; color: var(--tinta); white-space: inherit; }
.dos-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 14px 0 20px; align-items: start; }
.dos-col > * { min-width: 0; }
.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px 18px; box-shadow: var(--sombra); }
.tarjeta h3, .tarjeta h4 { margin-top: 0; }
.tarjeta > :last-child { margin-bottom: 0; }
.demo {
  margin: 18px 0 26px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden;
}
.demo-cab { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--linea); background: linear-gradient(90deg, rgba(91,141,239, 0.16), rgba(157,180,207, 0.08)); font-weight: 600; font-size: 14px; color: #fff; }
.demo-cab .demo-sello { font-family: var(--f-mano); font-size: 21px; font-weight: 600; line-height: 1; color: var(--azul-claro); }
.demo-cuerpo { padding: 12px; }
.demo-pie { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 14px 12px; }
.demo-texto { padding: 6px 14px 14px; min-height: 3.2em; font-size: 15px; }
.demo-texto .cuenta { font-family: var(--f-mono); font-size: 12.5px; color: var(--tinta2); margin-right: 8px; }

/* ---------- reproductor ---------- */
.jug { display: grid; gap: 14px; outline-offset: 4px; }
.jug-fila { display: grid; grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
.jug-izq, .jug-der { min-width: 0; }
.jug-der { display: grid; gap: 10px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px; box-shadow: var(--sombra); }
.jug-titulo { font-weight: 600; font-size: 15px; color: var(--azul-claro); }
.jug-escena { min-height: 200px; overflow: auto; }
.jug-nota {
  background: var(--papel2); border: 1px solid var(--linea); border-left: 5px solid var(--azul); border-radius: 10px; padding: 11px 14px; font-size: 15.5px; line-height: 1.5; min-height: 5.6em;
}
.jug-nota.cmp { border-left-color: var(--ambar); }
.jug-nota.swap { border-left-color: var(--morado); }
.jug-nota.ok { border-left-color: var(--verde); }
.jug-nota.err { border-left-color: var(--rojo); background: var(--rojo-bg); }
.jug-nota.alloc { border-left-color: var(--cian); }
.jug-nota.free { border-left-color: var(--gris); }
.jug-nota code { background: var(--azul-bg); }
.jug-ctrl { display: grid; gap: 8px; }
.ctl-fila { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ctl-opc { gap: 16px; font-size: 13.5px; color: var(--tinta2); }
.ctl {
  font: inherit; font-size: 15px; min-width: 42px; height: 38px; padding: 0 10px; cursor: pointer; border: 1.5px solid var(--linea); background: var(--papel2); color: var(--tinta);
  border-radius: 9px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.ctl:hover:not(:disabled) { border-color: var(--azul); box-shadow: var(--glow-f); }
.ctl:disabled { opacity: 0.3; cursor: default; }
.ctl-play { background: linear-gradient(135deg, var(--azul), #3A6FD8); color: #0A0A0A; border-color: transparent; min-width: 54px; font-weight: 600; box-shadow: 0 0 16px -4px rgba(91,141,239, 0.7); }
.ctl-play:hover:not(:disabled) { box-shadow: 0 0 24px -3px rgba(91,141,239, 0.9); }
.ctl-cuenta { font-family: var(--f-mono); font-size: 13px; margin-left: auto; color: var(--tinta2); }
.ctl-slider { width: 100%; accent-color: var(--azul); }
.ctl-sel, select, input[type="text"], input[type="number"], textarea {
  font: inherit; font-size: 14px; padding: 6px 9px; border: 1.5px solid var(--linea); border-radius: 8px; background: var(--codigo-bg); color: var(--tinta);
}
input[type="text"], textarea { font-family: var(--f-mono); }
input:focus, select:focus, textarea:focus { border-color: var(--cian); outline: none; box-shadow: 0 0 0 3px rgba(157,180,207, 0.18); }

.jug-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.caja { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 10px 14px 12px; min-width: 0; box-shadow: var(--sombra); }
.caja h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--tinta2); }
.vars-lista { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.var { display: inline-flex; border: 1px solid var(--linea); border-radius: 8px; overflow: hidden; font-family: var(--f-mono); font-size: 13.5px; transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.var-n { background: var(--papel2); padding: 2px 8px; color: var(--tinta2); }
.var-v { padding: 2px 9px; font-weight: 600; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.var.cambio { border-color: var(--ambar); background: var(--ambar-bg); animation: parpadeo 0.9s ease-out; }
@keyframes parpadeo { 0% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ambar) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.pila-lista { display: flex; flex-direction: column; gap: 4px; }
.marco { font-family: var(--f-mono); font-size: 13px; border: 1px solid var(--linea); background: var(--papel2); padding: 4px 9px; border-radius: 7px; word-break: break-word; }
.marco.arriba { border-color: var(--azul); background: var(--azul-bg); font-weight: 600; box-shadow: var(--glow-f); }
.cons {
  margin: 0; background: #050810; color: #d9e2f5; font-size: 13px; padding: 10px 12px; border-radius: 9px; min-height: 76px; max-height: 190px; overflow: auto; white-space: pre-wrap; word-break: break-word; line-height: 1.45; border: 1px solid var(--linea);
}
.cons .suave { color: #6b7391; }
.cons .c-in { color: var(--cian); }
.cons .c-in::before { content: "⏎ "; opacity: 0.6; }

.caja-tabla { grid-column: 1 / -1; }
.tabla-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tabla-cab h4 { margin: 0; }
.tabla-scroll { max-height: 340px; overflow: auto; border: 1px solid var(--linea); border-radius: 8px; }
.tabla-escritorio { border-collapse: collapse; width: 100%; font-family: var(--f-mono); font-size: 13px; }
.tabla-escritorio th { position: sticky; top: 0; background: var(--papel2); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--linea); font-weight: 600; font-size: 12px; z-index: 1; white-space: nowrap; color: #fff; }
.tabla-escritorio td { padding: 5px 10px; border-bottom: 1px solid var(--linea2); white-space: nowrap; }
.tabla-escritorio td.td-arr { white-space: normal; min-width: 22ch; }
.tabla-escritorio .td-n, .tabla-escritorio .th-n { color: var(--tinta2); width: 3em; }
.tabla-escritorio tr.ult td { background: var(--marca); color: #fff; }
.tabla-escritorio td.cambio { font-weight: 600; color: var(--cian); }
.tabla-escritorio tr:nth-child(even):not(.ult) td { background: rgba(255, 255, 255, 0.015); }

/* ---------- panel de codigo ---------- */
.codigo { border: 1px solid var(--linea); border-radius: var(--radio); background: var(--codigo-bg); overflow: hidden; box-shadow: var(--sombra); min-width: 0; }
.codigo-tabs { display: flex; background: var(--papel2); border-bottom: 1px solid var(--linea); overflow-x: auto; }
.codigo-tab { font: inherit; border: 0; border-right: 1px solid var(--linea); background: transparent; color: var(--tinta2); padding: 7px 12px; cursor: pointer; display: grid; text-align: left; white-space: nowrap; transition: color 0.15s, background 0.15s; }
.codigo-tab .tab-nombre { font-family: var(--f-mono); font-size: 12.5px; font-weight: 600; }
.codigo-tab .tab-rol { font-size: 11px; }
.codigo-tab.on { background: var(--codigo-bg); color: #fff; box-shadow: inset 0 -2px 0 var(--azul); }
.codigo-cuerpo { max-height: 520px; overflow: auto; position: relative; padding: 6px 0; }
.ln { display: flex; font-family: var(--f-mono); font-size: 13px; line-height: 1.7; border-left: 4px solid transparent; cursor: default; min-width: max-content; }
.ln-n { flex: none; width: 3.2em; text-align: right; padding-right: 12px; color: var(--gris); user-select: none; }
.ln-src { white-space: pre; padding-right: 20px; color: var(--tinta); }
.ln-com { white-space: pre; padding-right: 16px; font-style: italic; color: #7b9bd1; opacity: 0.92; }
.ln.con-com .ln-src { padding-right: 14px; }
.ln.act { background: var(--marca); border-left-color: var(--azul); box-shadow: inset 0 0 22px -8px rgba(91,141,239, 0.6); }
.ln.act .ln-n { color: var(--azul-claro); font-weight: 600; }
.ln.prev { background: rgba(91,141,239, 0.07); }
.ln.tiene-nota { cursor: pointer; }
.ln.tiene-nota .ln-n::after { content: "•"; color: var(--cian); margin-left: 3px; position: relative; right: -5px; }
.ln.tiene-nota:hover { background: var(--cian-bg); }
.t-kw { color: #C98BDF; font-weight: 500; } .t-ty { color: #9DB4CF; } .t-str { color: #7FB89A; } .t-num { color: #E2A336; }
.t-pre { color: #D9928B; } .t-fn { color: #B79CC9; } .t-cn { color: #5B8DEF; }
.codigo-pie { display: flex; gap: 12px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--linea); background: var(--papel2); font-size: 13px; }
.codigo-gh { color: var(--cian); }
.btn-mini { font: inherit; font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--linea); border-radius: 7px; background: var(--papel); color: var(--tinta); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.btn-mini:hover { border-color: var(--azul); box-shadow: var(--glow-f); }
.codigo-msg { color: var(--verde); font-size: 12.5px; }

/* ---------- codigo anotado ---------- */
.anotado { display: grid; grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr); gap: 18px; align-items: start; }
.anotado-info { margin-top: 12px; background: var(--papel); border: 1px solid var(--linea); border-left: 5px solid var(--cian); border-radius: 10px; padding: 12px 16px; min-height: 120px; box-shadow: var(--sombra); }
.anotado-info h4 { margin: 0 0 6px; font-size: 17px; color: #fff; }
.anotado-info p { margin: 0 0 10px; }
.anotado-linea { display: block; background: var(--codigo-bg); border: 1px dashed var(--linea); padding: 6px 10px; border-radius: 7px; white-space: pre-wrap; word-break: break-word; color: var(--cian); }
.anotado-col-lista h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tinta2); }
.anotado-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 640px; overflow: auto; }
.anotado-item { width: 100%; display: grid; gap: 1px; text-align: left; font: inherit; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); padding: 6px 10px; border-radius: 9px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.anotado-item:hover { border-color: var(--azul); }
.anotado-lista li.on .anotado-item { background: var(--marca); border-color: var(--azul); box-shadow: var(--glow-f); }
.anotado-ref { font-size: 11.5px; background: none; padding: 0; color: var(--tinta2); }
.anotado-titulo { font-size: 14.5px; font-weight: 500; }

/* ---------- escritorio / laboratorio ---------- */
.panel-ctl { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 16px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; box-shadow: var(--sombra); }
.panel-ctl label { display: grid; gap: 3px; font-size: 13px; color: var(--tinta2); }
.panel-ctl input[type="text"] { min-width: 28ch; }
.panel-ctl .grande { flex: 1 1 360px; }
.panel-ctl .grande input { width: 100%; }
.panel-ctl .aviso { flex: 1 1 100%; font-size: 13.5px; margin: 0; }
.aviso-err { color: var(--rojo); font-weight: 500; }
.preajustes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 16px; box-shadow: var(--sombra); }
.lab-ops .grupo { display: inline-flex; gap: 6px; align-items: center; padding-right: 12px; margin-right: 4px; border-right: 1px dashed var(--linea); }
.lab-ops .grupo:last-child { border-right: 0; }
.lab-ops input[type="number"] { width: 5.4em; }
.lab-estado { font-family: var(--f-mono); font-size: 13px; color: var(--cian); margin-left: auto; }
.lab-llamada { font-family: var(--f-mono); font-size: 14px; background: var(--codigo-bg); border: 1px dashed var(--linea); padding: 8px 12px; border-radius: 9px; margin-bottom: 12px; white-space: pre-wrap; color: var(--azul-claro); }

/* ---------- quiz ---------- */
.quiz { display: grid; gap: 16px; max-width: 78ch; }
.preg { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px 18px; box-shadow: var(--sombra); }
.preg h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.4; color: #fff; }
.preg h3 .n { font-family: var(--f-mono); color: var(--azul-claro); margin-right: 8px; }
.preg pre { margin: 0 0 12px; font-family: var(--f-mono); font-size: 13.5px; background: var(--codigo-bg); border: 1px solid var(--linea); border-radius: 8px; padding: 10px 14px; overflow-x: auto; }
.opciones { display: grid; gap: 7px; }
.opcion { text-align: left; font: inherit; padding: 9px 14px; border: 1.5px solid var(--linea); border-radius: 10px; background: var(--papel2); color: var(--tinta); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.opcion:hover:not(:disabled) { border-color: var(--azul); }
.opcion:disabled { cursor: default; }
.opcion.bien { border-color: var(--verde); background: var(--verde-bg); color: #fff; box-shadow: 0 0 16px -5px color-mix(in srgb, var(--verde) 80%, transparent); }
.opcion.mal { border-color: var(--rojo); background: var(--rojo-bg); color: #fff; }
.porque { margin-top: 10px; font-size: 15px; padding: 10px 14px; border-radius: 9px; background: var(--papel2); border-left: 4px solid var(--cian); }
.quiz-res { font-family: var(--f-mano); font-size: 28px; color: var(--cian); text-shadow: 0 0 14px rgba(157,180,207, 0.5); }

/* ---------- inicio ---------- */
.hero { padding: 10px 0 8px; max-width: 76ch; }
.hero h1 { font-size: clamp(36px, 6vw, 62px); line-height: 1.02; margin: 0 0 12px; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--azul); text-shadow: 0 0 26px rgba(91,141,239, 0.55); }
.hero p { font-size: 19px; color: var(--tinta2); margin: 0 0 14px; }
.mapa { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin: 26px 0 10px; }
.mapa-grupo h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tinta2); margin: 0 0 8px; }
.mapa-grupo { display: grid; align-content: start; gap: 10px; }
.mapa-tarjeta {
  text-align: left; font: inherit; color: var(--tinta); text-decoration: none; display: grid; gap: 4px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 13px 16px;
  cursor: pointer; transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
}
.mapa-tarjeta:hover { transform: translateY(-3px); border-color: var(--azul); box-shadow: var(--glow-f); }
.mapa-tarjeta b { font-size: 18px; color: #fff; }
.mapa-tarjeta span { font-size: 14px; color: var(--tinta2); }
.mapa-tarjeta .prog { height: 6px; background: var(--gris-bg); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.mapa-tarjeta .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--verde), var(--cian)); box-shadow: 0 0 10px -1px color-mix(in srgb, var(--verde) 70%, transparent); }
.mapa-tarjeta.pronto { border-style: dashed; opacity: 0.72; }
.mapa-tarjeta.pronto:hover { border-color: var(--linea); box-shadow: none; transform: none; }
.como-usar { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 14px 0 6px; }
.como-usar .tarjeta h3 { font-size: 16px; margin-bottom: 4px; color: var(--cian); }
.como-usar .tarjeta p { font-size: 14.5px; margin: 0; color: var(--tinta2); }

/* ---------- vistas: barras ---------- */
.vb { display: grid; gap: 8px; }
.vb-svg { width: 100%; height: auto; display: block; font-family: var(--f-mono); }
.vb-svg .bar rect { fill: var(--azul); fill-opacity: 0.22; stroke: var(--azul); stroke-width: 1.5; transition: y 0.35s ease, height 0.35s ease, fill 0.25s, fill-opacity 0.25s, stroke 0.25s; }
.bar-v { font-size: 12.5px; font-weight: 600; fill: var(--tinta); }
.bar-i { font-size: 11px; fill: var(--tinta2); }
.bar.m-cmp rect { fill: var(--ambar); fill-opacity: 0.4; stroke: var(--ambar); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--ambar) 55%, transparent)); }
.bar.m-swap rect { fill: var(--morado); fill-opacity: 0.5; stroke: var(--morado); filter: drop-shadow(0 0 7px color-mix(in srgb, var(--morado) 65%, transparent)); }
.bar.m-sorted rect { fill: var(--verde); fill-opacity: 0.42; stroke: var(--verde); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--verde) 55%, transparent)); }
.bar.m-min rect { fill: var(--rojo); fill-opacity: 0.45; stroke: var(--rojo); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rojo) 55%, transparent)); }
.bar.m-key rect { fill: var(--cian); fill-opacity: 0.45; stroke: var(--cian); filter: drop-shadow(0 0 7px color-mix(in srgb, var(--cian) 60%, transparent)); }
.bar.m-fuera rect { fill: var(--gris); fill-opacity: 0.1; stroke: var(--gris); stroke-dasharray: 3 3; }
.bar.m-fuera text { opacity: 0.5; }
.bar.m-izq rect { fill: var(--azul); fill-opacity: 0.45; }
.bar.m-der rect { fill: var(--cian); fill-opacity: 0.45; stroke: var(--cian); }
.bar.m-hecho rect { fill: var(--verde); fill-opacity: 0.42; stroke: var(--verde); }
.bar.m-hechoFuera rect { fill: var(--verde); fill-opacity: 0.14; stroke: var(--verde); stroke-dasharray: 3 3; }
.rango-caja { fill: var(--marca-solida); fill-opacity: 0.1; stroke: var(--cian); stroke-width: 1.5; stroke-dasharray: 5 4; transition: opacity 0.25s; }
.flecha-p { fill: var(--tinta); }
.ptr-et { font-size: 12.5px; font-weight: 600; fill: var(--azul-claro); }
.aux-r { fill: var(--papel2); stroke: var(--linea); stroke-width: 1.5; }
.aux-t { font-size: 14px; font-weight: 600; fill: var(--tinta); }
.vb-svg .cont { font-size: 12.5px; fill: var(--tinta2); }
.ex-et { font-size: 13px; font-weight: 600; fill: var(--tinta2); }
.ex-c { fill: var(--papel2); stroke: var(--linea); stroke-width: 1.5; }
.ex-c.usado { fill: var(--gris-bg); }
.ex-c.act { fill: var(--ambar-bg); stroke: var(--ambar); stroke-width: 2.5; }
.ex-c.nuevo { fill: var(--verde-bg); stroke: var(--verde); stroke-width: 2.5; }
.ex-v { font-size: 13px; font-weight: 600; fill: var(--tinta); }
.ex-i { font-size: 11px; fill: var(--tinta2); }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--tinta2); padding: 0 4px; }
.ley { display: inline-flex; align-items: center; gap: 6px; }
.ley-c { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--azul); opacity: 0.75; }
.ley-c.m-cmp { background: var(--ambar); } .ley-c.m-swap { background: var(--morado); } .ley-c.m-sorted, .ley-c.m-hecho { background: var(--verde); }
.ley-c.m-min { background: var(--rojo); } .ley-c.m-key { background: var(--cian); } .ley-c.m-fuera { background: var(--gris); opacity: 0.4; }
.ley-c.m-izq { background: var(--azul); } .ley-c.m-der { background: var(--cian); }

/* ---------- vistas: pila / cola (SVG) ---------- */
.vp, .vc, .vm { width: 100%; }
.vp-s, .vc-s, .vm-s { width: 100%; height: auto; display: block; font-family: var(--f-mono); }
.vp { display: grid; gap: 6px; justify-items: center; }
.vp-svg { width: 100%; max-width: 560px; }
.vp-entrada { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 14px; }
.chip-ch { font-family: var(--f-mono); font-size: 16px; font-weight: 600; width: 28px; height: 32px; display: inline-grid; place-items: center; border: 1.5px solid var(--linea); border-radius: 7px; background: var(--papel2); }
.chip-ch.act { background: var(--marca); border-color: var(--azul); transform: translateY(-3px); box-shadow: var(--glow-f); }
.chip-ch.hecho { opacity: 0.4; }
.v-tit { font-size: 13px; font-weight: 600; fill: var(--tinta2); font-family: var(--f-texto); }
.celda { fill: var(--papel2); stroke: var(--linea); stroke-width: 2; transition: fill 0.3s, stroke 0.3s; }
.celda.viva { fill: var(--azul-bg); stroke: var(--azul); }
.celda.residuo { fill: var(--gris-bg); stroke: var(--gris); stroke-dasharray: 4 3; }
.celda.sin-dato { fill: transparent; stroke: var(--linea); stroke-dasharray: 2 4; }
.celda.nuevo { fill: var(--verde-bg); stroke: var(--verde); stroke-width: 3; animation: aparece 0.5s ease-out; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--verde) 60%, transparent)); }
@keyframes aparece { 0% { transform: scale(0.92); opacity: 0.2; } 100% { transform: scale(1); opacity: 1; } }
.celda-v { font-size: 16px; font-weight: 600; fill: var(--tinta); }
.celda-v.res, .celda-v.pq { fill: var(--tinta); }
.celda-v.res { fill: var(--tinta2); font-weight: 400; }
.celda-i { font-size: 12px; fill: var(--tinta2); }
.flecha-tope { stroke: var(--rojo); stroke-width: 3; fill: none; }
.punta-tope { fill: var(--rojo); }
.tope-et { font-size: 14px; font-weight: 600; fill: var(--rojo); }
.base { stroke: var(--tinta2); stroke-width: 3; }
.mk-et { font-size: 13px; font-weight: 600; }
.mk-frente { fill: var(--rojo); } .mk-frente-p { fill: var(--rojo); }
.mk-final { fill: var(--cian); } .mk-final-p { fill: var(--cian); }
.cant { font-size: 13px; font-weight: 600; fill: var(--tinta2); }
.anillo { fill: none; stroke: var(--linea); stroke-width: 2; stroke-dasharray: 5 5; }
.nodo-a { stroke-width: 2.5; transition: fill 0.3s; }
.nodo-a.viva { fill: var(--azul-bg); stroke: var(--azul); }
.nodo-a.libre { fill: transparent; stroke: var(--linea); stroke-dasharray: 3 3; }

/* ---------- vistas: memoria ---------- */
.vm-s { min-width: 640px; }
.vm { overflow-x: auto; }
.frame-r { fill: var(--papel2); stroke: var(--linea); stroke-width: 2; }
.frame.activo .frame-r { stroke: var(--azul); stroke-width: 3; fill: color-mix(in srgb, var(--azul-bg) 55%, var(--papel)); }
.frame-fn { font-size: 14px; font-weight: 600; fill: var(--tinta); }
.v-nom { font-size: 14px; font-weight: 600; fill: var(--tinta); }
.v-tip { font-size: 11.5px; fill: var(--tinta2); }
.v-dir { font-size: 10.5px; fill: var(--tinta2); }
.v-caja { fill: var(--papel); stroke: var(--tinta2); stroke-width: 1.5; }
.v-caja.unk { fill: var(--gris-bg); stroke-dasharray: 3 3; }
.v-caja.nulo { fill: var(--papel2); }
.v-caja.ptr { stroke: var(--rojo); }
.v-val { font-size: 13px; font-weight: 600; fill: var(--tinta); }
.v-val.mono-p { fill: var(--rojo); font-size: 12px; }
.fila.foco .v-caja { fill: var(--marca); stroke: var(--azul); stroke-width: 2.5; }
.fila.foco .v-nom { fill: var(--azul-claro); }
.nodo-r { fill: var(--papel); stroke: var(--tinta2); stroke-width: 2; transition: fill 0.3s, stroke 0.3s; }
.nodo.nuevo .nodo-r { fill: var(--verde-bg); stroke: var(--verde); stroke-width: 3; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--verde) 55%, transparent)); }
.nodo.libre .nodo-r { fill: var(--gris-bg); stroke: var(--gris); stroke-dasharray: 5 4; }
.nodo.libre text { opacity: 0.5; }
.nodo.fuga .nodo-r { fill: var(--rojo-bg); stroke: var(--rojo); stroke-width: 3; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--rojo) 55%, transparent)); }
.nodo.foco .nodo-r { stroke: var(--azul); stroke-width: 3.5; fill: var(--azul-bg); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--azul) 55%, transparent)); }
.nodo-dir { font-size: 10.5px; fill: var(--tinta2); }
.nodo-l { stroke: var(--tinta2); stroke-width: 1.2; }
.nodo-et { font-size: 10px; fill: var(--tinta2); }
.nodo-v { font-size: 15px; font-weight: 600; fill: var(--tinta); }
.nodo-v.nulo { fill: var(--gris); font-size: 12.5px; }
.nodo-free { font-size: 11.5px; fill: var(--tinta2); font-weight: 600; }
.nodo-fuga { font-size: 11.5px; fill: var(--rojo); font-weight: 600; }
.flecha { fill: none; stroke: var(--rojo); stroke-width: 2.2; }
.flecha.entre-nodos { stroke: var(--cian); }
.flecha.foco { stroke-width: 3.6; stroke: var(--morado); }
.flecha.a-var { stroke: var(--morado); stroke-dasharray: 6 4; }
.punta { fill: var(--rojo); fill: context-stroke; }

/* ---------- vistas: infija ---------- */
.vi { display: grid; gap: 12px; }
.vi-expr { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.vi-etq { font-weight: 600; margin-right: 6px; color: var(--tinta2); }
.vi-ch { position: relative; width: 32px; height: 40px; display: inline-grid; place-items: center; font-family: var(--f-mono); font-size: 19px; font-weight: 600; border: 1.5px solid var(--linea); border-radius: 8px; background: var(--papel2); }
.vi-ch small { position: absolute; bottom: -17px; font-size: 10px; font-weight: 400; color: var(--tinta2); }
.vi-ch.act { background: var(--marca); border-color: var(--azul); transform: translateY(-4px); box-shadow: var(--glow-f); }
.vi-ch.hecho { opacity: 0.4; }
.vi-expr { padding-bottom: 18px; }
.vi-cuerpo { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: 14px; }
.vi-pila, .vi-sal { border: 1px solid var(--linea); border-radius: 10px; padding: 8px 12px 12px; background: var(--papel2); min-height: 150px; }
.vi-tit { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tinta2); margin-bottom: 8px; font-weight: 600; }
.vi-pila-items { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.vi-nodo { position: relative; width: 120px; display: flex; justify-content: space-between; align-items: center; border: 1.5px solid var(--azul); background: var(--azul-bg); border-radius: 8px; padding: 3px 10px; }
.vi-nodo b { font-family: var(--f-mono); font-size: 20px; color: #fff; }
.vi-nodo small { font-family: var(--f-mono); font-size: 10.5px; color: var(--tinta2); }
.vi-nodo.nuevo { background: var(--verde-bg); border-color: var(--verde); animation: aparece 0.5s ease-out; box-shadow: 0 0 14px -4px color-mix(in srgb, var(--verde) 70%, transparent); }
.vi-tope { position: absolute; right: -52px; font-family: var(--f-mano); font-size: 20px; color: var(--rojo); }
.vi-vacia { color: var(--tinta2); font-size: 14px; padding: 12px 0; }
.vi-sal-items { display: flex; flex-wrap: wrap; gap: 6px; }
.vi-tok { font-family: var(--f-mono); font-size: 20px; font-weight: 600; min-width: 34px; text-align: center; border: 1.5px solid var(--verde); background: var(--verde-bg); border-radius: 8px; padding: 2px 8px; color: #fff; }
.vi-tok.nuevo { background: var(--marca); border-color: var(--azul); animation: aparece 0.5s ease-out; box-shadow: var(--glow-f); }
.vi-estado { font-family: var(--f-mono); font-size: 13.5px; color: var(--tinta2); min-height: 1.6em; }

/* ---------- varios ---------- */
.pronto-caja { max-width: 70ch; text-align: left; }
.pronto-caja h2 { font-family: var(--f-mano); font-size: 44px; color: var(--cian); margin: 0 0 6px; line-height: 1; text-shadow: 0 0 20px rgba(157,180,207, 0.45); }
.pronto-caja h2::before { content: none; }
.comp-tabla { width: 100%; }
.barra-h { height: 12px; background: var(--azul); border-radius: 99px; min-width: 3px; box-shadow: 0 0 10px -2px color-mix(in srgb, var(--azul) 70%, transparent); }
.barra-h.v { background: var(--morado); box-shadow: 0 0 10px -2px color-mix(in srgb, var(--morado) 70%, transparent); }
.pie-pagina { margin-top: 60px; padding-top: 14px; border-top: 1px dashed var(--linea); font-size: 13.5px; color: var(--tinta2); }

/* ---------- cajón móvil (backdrop) ---------- */
.lateral-backdrop { display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1080px) {
  .jug-fila { grid-template-columns: minmax(0, 1fr); }
  .anotado { grid-template-columns: minmax(0, 1fr); }
  .anotado-lista { max-height: none; }
  .vi-cuerpo { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 108px; }
  #app-raiz { grid-template-columns: 1fr; }

  /* el fondo fijo causa saltos en móvil: lo dejamos correr con el scroll */
  body { background-attachment: scroll, scroll, scroll, scroll; }
  body.menu-abierto { overflow: hidden; }

  .lateral {
    position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(86vw, 330px);
    transform: translateX(-102%); transition: transform 0.24s ease;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.7); will-change: transform;
  }
  .lateral.abierto { transform: none; }
  .lateral-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(3, 4, 10, 0.6); backdrop-filter: blur(2px);
  }

  .barra-movil {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
    min-height: 54px; background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); padding: 8px 14px;
  }
  .barra-movil b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-menu { flex: none; }

  .principal { padding: 16px 14px 64px; }

  /* barra de pestañas: una sola fila deslizable en vez de apilarse */
  .pestanas {
    top: 54px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 2px;
  }
  .pestanas::-webkit-scrollbar { display: none; }
  .pestana { padding: 10px 13px; font-size: 14px; white-space: nowrap; top: 0; border-radius: 10px; }
  .pestana[aria-selected="true"] { border-bottom-color: var(--linea); }

  /* objetivos táctiles más cómodos */
  .nav-item { padding: 11px 12px; font-size: 15px; }
  .ctl { height: 42px; min-width: 46px; }
  .btn, .btn-chico { padding: 9px 15px; }
  .btn-mini { padding: 6px 12px; }
  .opcion { padding: 12px 14px; }

  /* títulos y textos */
  .tema-cab h1 .sub { display: block; margin-left: 0; margin-top: 2px; font-size: 20px; }
  .tema-cab p { font-size: 16px; }
  .prosa { max-width: none; }
  .prosa h2 { margin: 32px 0 8px; font-size: 23px; }
  .prosa h3 { margin: 22px 0 6px; }
  .quiz { max-width: none; }

  /* que ningún control fuerce ancho de más */
  .panel-ctl, .lab-ops { padding: 12px 13px; }
  .panel-ctl input[type="text"] { min-width: 0; width: 100%; }
  .panel-ctl .grande { flex: 1 1 100%; }
  .lab-ops .grupo { flex-wrap: wrap; }
  .lab-estado { margin-left: 0; width: 100%; }
  .anotado-info { min-height: 0; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero p { font-size: 17px; }
  .chips { gap: 6px; }
  .chip { font-size: 12px; }
  /* en pantallas muy angostas, los controles del reproductor reparten el ancho */
  .ctl-fila { gap: 5px; }
  .ctl-fila .ctl { flex: 1 1 auto; }
  .ctl-cuenta { flex-basis: 100%; text-align: right; margin-left: 0; }
  .lab-ops .grupo { border-right: 0; padding-right: 0; margin-right: 0; }
  .lab-ops { gap: 7px; }
}

@media print {
  .lateral, .barra-movil, .pestanas, .jug-ctrl, .lateral-backdrop { display: none !important; }
  #app-raiz { display: block; }
  body { background: #fff; color: #000; }
}


/* ============================================================
   Identidad del tablero: Montserrat para títulos + fondo de partículas.
   (reskin — no cambia la lógica ni los nombres de clase)
   ============================================================ */
h1, h2, h3, .tema-cab h1, .hero h1, .marca-logo, .pronto-caja h2 { font-family: var(--f-display); font-weight: 800; letter-spacing: -.01em; }
.tema-cab h1 .sub, .nota-tit, .demo-sello, .jug-titulo, .quiz-res { font-family: var(--f-display); font-weight: 700; }
.quiz-res, .pronto-caja h2, .tema-cab h1 .sub, .hero h1 em { text-shadow: none; }
canvas#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
#app-raiz { position: relative; z-index: 1; }
