/* Escaque — estilo «CÓMIC» (23/10/2026): página de noche azul tinta con trama de puntos; viñetas de papel con tinta
   gruesa y sombra dura; títulos en Bangers, texto en Nunito, cifras en JetBrains Mono. Las fuentes de cómic y las
   piezas .c-titulo/.vineta/.cartela/.globo/.boton están en comic.css (se carga antes que este fichero).
   Truco del sistema: fuera de las viñetas el texto es claro (sobre la noche); dentro de .tarjeta, .modal, .mesa-lado,
   .vineta… las variables se redefinen para papel y tinta, así que cualquier componente funciona en los dos sitios. */

@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fuentes/jetbrains-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --tinta: #15110e;
  --papel: #fff8e8;
  --fondo: #1b2046;
  --fondo-2: #20275a;
  --barra: #10132e;
  --panel: #262e66;
  --panel-2: #2f3878;
  --panel-3: #3a448c;
  --borde: #3b4588;
  --borde-2: #5662b4;
  --texto: #f6f2e8;
  --texto-2: #c9cdf3;
  --texto-3: #959bd0;
  --acento: #ffd23f;
  --acento-2: #ffe27d;
  --acento-osc: #c99a00;
  --acento-txt: #15110e;
  --verde: #4cc26b;
  --verde-osc: #2c8546;
  --rojo: #ef4136;
  --rojo-osc: #b3241b;
  --azul: #2f80ed;
  --morado: #8b6fd6;
  --turquesa: #3ed3e0;
  /* Clasificación de jugadas (revisión) */
  --j-brillante: #1fb5ad;
  --j-genial: #4f86e0;
  --j-mejor: #4cc26b;
  --j-excelente: #6fbf55;
  --j-buena: #93ae6a;
  --j-libro: #b5875a;
  --j-imprecision: #f5c400;
  --j-error: #f28c28;
  --j-fallo: #e8676a;
  --j-garrafal: #ef4136;
  --radio: 6px;
  --radio-s: 4px;
  --sombra: 6px 6px 0 var(--tinta);
  --sombra-s: 3px 3px 0 var(--tinta);
  --f-titulo: 'Bangers', Impact, sans-serif;
  --f-texto: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ancho-barra: 210px;
  color-scheme: dark;
}
/* Tema «Día»: página de papel en vez de noche */
:root[data-tema="claro"] {
  --fondo: #f1e6cc;
  --fondo-2: #fffaf0;
  --panel: #fff3d9;
  --panel-2: #f3e5c3;
  --panel-3: #e8d6ad;
  --borde: rgba(21, 17, 14, .2);
  --borde-2: rgba(21, 17, 14, .4);
  --texto: #15110e;
  --texto-2: #4a4258;
  --texto-3: #7a7088;
  color-scheme: light;
}
/* Dentro de las viñetas de papel, tinta sobre papel */
.tarjeta, .modal, .mesa-lado, .vineta, .aviso, .nav .sub, .menu-movil > div, .papel {
  --panel: #fff8e8;
  --panel-2: #f5ebd2;
  --panel-3: #eadcb9;
  --fondo-2: #fffdf7;
  --borde: rgba(21, 17, 14, .18);
  --borde-2: rgba(21, 17, 14, .38);
  --texto: #15110e;
  --texto-2: #4b4459;
  --texto-3: #7d7488;
  color-scheme: light;
  color: var(--texto);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--texto); font: 600 15.5px/1.5 var(--f-texto); min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .06) 1.5px, transparent 1.7px) 0 0 / 12px 12px,
    radial-gradient(ellipse at 70% -10%, #2c3680 0%, rgba(44, 54, 128, 0) 60%),
    var(--fondo);
  background-attachment: fixed;
}
:root[data-tema="claro"] body { background: radial-gradient(circle, rgba(21, 17, 14, .07) 1.5px, transparent 1.7px) 0 0 / 12px 12px, var(--fondo); }
a { color: var(--acento); text-decoration: none; font-weight: 800; }
.tarjeta a:not(.btn):not(.boton):not(.elem):not(.tarjeta), .modal a:not(.btn):not(.boton), .mesa-lado a:not(.btn):not(.boton):not(.elem) { color: #1f63c9; }
:root[data-tema="claro"] a { color: #1f63c9; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-titulo); font-weight: 400; line-height: 1.05; margin: 0 0 .45em; letter-spacing: .035em; }
h1 {
  font-size: clamp(36px, 5vw, 58px); color: var(--acento); -webkit-text-stroke: 2px var(--tinta); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--tinta); transform: rotate(-1.2deg); transform-origin: left center;
}
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.mono { font-family: var(--f-mono); }
.suave { color: var(--texto-2); }
.tenue { color: var(--texto-3); }
.oculto { display: none !important; }
.centro { text-align: center; }
.fila { display: flex; align-items: center; gap: 10px; }
.fila.envolver { flex-wrap: wrap; }
.fila.entre { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.crece { flex: 1 1 auto; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--acento); color: var(--tinta); }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }

/* ——— Armazón ——— */
#app { display: grid; grid-template-columns: var(--ancho-barra) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
#barra {
  position: sticky; top: 0; height: 100vh; height: 100dvh; color: #eef0ff; z-index: 30; overflow: visible;
  display: flex; flex-direction: column; padding: 14px 0 10px; border-right: 4px solid var(--tinta);
  background: radial-gradient(circle, rgba(255, 255, 255, .05) 1.4px, transparent 1.6px) 0 0 / 10px 10px, var(--barra);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 16px 18px; color: #fff; text-decoration: none !important; }
.logo svg { width: 36px; height: 36px; flex: 0 0 auto; filter: drop-shadow(2px 2px 0 #000); }
.logo b { font: 400 34px/1 var(--f-titulo); letter-spacing: .04em; color: var(--acento); -webkit-text-stroke: 1.5px var(--tinta); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--tinta); transform: rotate(-2deg); display: inline-block; }
.logo small { display: block; font: 800 10px/1.2 var(--f-texto); color: #9aa1db; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.nav { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 4px; }
.nav > li { position: relative; }
.nav a.item, .nav button.item {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 7px; border-radius: 5px; color: #eef0ff; border: 2.5px solid transparent;
  font: 400 22px/1 var(--f-titulo); letter-spacing: .05em; text-decoration: none; background: none; width: 100%; cursor: pointer; text-align: left;
  transition: transform .1s, background .1s;
}
.nav a.item svg, .nav button.item svg { width: 24px; height: 24px; flex: 0 0 auto; }
.nav a.item:hover, .nav button.item:hover, .nav li:hover > a.item { background: rgba(255, 255, 255, .08); transform: translateX(2px); }
.nav a.item.activo { background: var(--acento); color: var(--tinta); border-color: var(--tinta); box-shadow: 3px 3px 0 #000; transform: rotate(-1.2deg); }
.nav .sub {
  position: absolute; left: calc(100% + 12px); top: -8px; min-width: 270px; background: var(--papel); border: 3px solid var(--tinta);
  border-radius: 4px; padding: 8px; box-shadow: var(--sombra); display: none; z-index: 40;
}
.nav .sub::before { content: ''; position: absolute; left: -18px; top: 0; bottom: 0; width: 18px; }
.nav li:hover > .sub, .nav li:focus-within > .sub { display: block; animation: aparece-vineta .18s cubic-bezier(.2, 1.5, .4, 1); }
.nav .sub a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 4px; color: var(--tinta); font-weight: 800; text-decoration: none; }
.nav .sub a svg { width: 22px; height: 22px; color: #6b6380; }
.nav .sub a:hover { background: var(--acento); }
.nav .sub a:hover svg { color: var(--tinta); }
.nav .sub a small { display: block; color: #6b6380; font-weight: 700; font-size: 12px; line-height: 1.25; }
.barra-pie { margin-top: auto; padding: 10px 10px 0; display: flex; flex-direction: column; gap: 8px; }
.barra-pie .btn { justify-content: center; }
.yo-mini { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 5px; color: #eef0ff; text-decoration: none !important; border: 2.5px solid transparent; }
.yo-mini:hover { background: rgba(255, 255, 255, .08); }
.yo-mini .nombre { font: 400 19px/1 var(--f-titulo); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yo-mini small { display: block; color: #9aa1db; font-size: 12px; font-weight: 700; }
.en-linea-mini { font: 800 11px/1.3 var(--f-texto); color: #9aa1db; padding: 6px 18px 0; letter-spacing: .04em; text-transform: uppercase; }
.en-linea-mini i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--verde); margin-right: 6px; border: 2px solid var(--tinta); }

#vista { min-width: 0; padding: 26px clamp(14px, 2.4vw, 38px) 44px; }
.pagina { max-width: 1240px; margin: 0 auto; }
.pagina.estrecha { max-width: 780px; }
.cabecera-pag { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cabecera-pag h1 { margin: 0; }
.cabecera-pag .icono-pag { width: 42px; height: 42px; color: var(--acento); }

#tope { display: none; }
#abajo { display: none; }
@media (max-width: 1100px) {
  :root { --ancho-barra: 78px; }
  .logo b, .logo small, .nav a.item span, .nav button.item span, .yo-mini > div, .en-linea-mini span, .barra-pie .btn span { display: none; }
  .logo { padding: 2px 0 18px; justify-content: center; }
  .nav a.item, .nav button.item { justify-content: center; padding: 10px 0; }
  .yo-mini { justify-content: center; }
  .en-linea-mini { text-align: center; padding: 6px 0 0; }
  .barra-pie .btn { padding: 8px 0; }
}
@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  #barra { display: none; }
  #tope {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 56px; color: #fff; padding: 0 12px;
    background: var(--barra); border-bottom: 4px solid var(--tinta); grid-column: 1;
  }
  #tope .logo { padding: 0; }
  #tope .logo b { display: inline-block; font-size: 27px; }
  #tope .logo svg { width: 30px; height: 30px; }
  #tope .crece { flex: 1; }
  #abajo {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--barra); border-top: 4px solid var(--tinta); padding-bottom: env(safe-area-inset-bottom);
  }
  #abajo a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; color: #b8bdf0; font: 400 15px/1 var(--f-titulo); letter-spacing: .05em; text-decoration: none; }
  #abajo a svg { width: 24px; height: 24px; }
  #abajo a.activo { color: var(--acento); }
  #abajo a.activo svg { filter: drop-shadow(2px 2px 0 #000); }
  #vista { padding: 16px 12px 30px; }
}
.menu-movil { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 30, .6); display: flex; justify-content: flex-end; }
.menu-movil > div { width: min(340px, 88vw); height: 100%; overflow: auto; background: var(--papel); border-left: 4px solid var(--tinta); padding: 16px; animation: entra-lado .2s ease-out; }
@keyframes entra-lado { from { transform: translateX(40px); opacity: 0; } }
.menu-movil h4 { font: 400 22px/1 var(--f-titulo); color: var(--rojo); letter-spacing: .05em; margin: 18px 6px 8px; }
.menu-movil a { display: flex; align-items: center; gap: 12px; padding: 10px 6px; color: var(--tinta); font-weight: 800; border-radius: 4px; }
.menu-movil a:hover { background: var(--acento); text-decoration: none; }
.menu-movil a svg { width: 22px; height: 22px; color: #6b6380; }

/* ——— Botones ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: var(--radio-s);
  border: 2.5px solid var(--tinta); background: var(--papel); color: var(--tinta); font: 800 15px/1.2 var(--f-texto); cursor: pointer;
  text-decoration: none !important; box-shadow: var(--sombra-s); transition: transform .08s, box-shadow .08s, filter .1s; white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--tinta); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tinta); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: var(--sombra-s); }
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn.primario { background: var(--acento); color: var(--tinta); }
.btn.verde { background: var(--verde); color: var(--tinta); }
.btn.peligro { background: var(--rojo); color: #fff; }
.btn.fantasma { background: transparent; box-shadow: none; border-color: transparent; color: var(--texto-2); }
.btn.fantasma:hover { background: var(--panel-2); color: var(--texto); transform: none; box-shadow: none; }
.btn.borde { background: transparent; color: var(--texto); border-color: currentColor; box-shadow: none; }
.btn.borde:hover { background: var(--panel-2); }
.btn.grande { font: 400 24px/1.05 var(--f-titulo); letter-spacing: .05em; padding: 13px 20px 12px; border-width: 3px; box-shadow: 5px 5px 0 var(--tinta); }
.btn.grande small { font-family: var(--f-texto); letter-spacing: 0; }
.btn.grande svg { width: 30px; height: 30px; }
.btn.pequeno { padding: 5px 10px; font-size: 13px; box-shadow: 2px 2px 0 var(--tinta); }
.btn.icono { padding: 7px; }
.btn.bloque { width: 100%; }
.btn-grupo { display: flex; gap: 8px; flex-wrap: wrap; }

/* ——— Viñetas (tarjetas), paneles ——— */
.tarjeta {
  background: var(--papel); border-radius: 4px; padding: 16px 18px; border: 3px solid var(--tinta); box-shadow: var(--sombra);
}
.tarjeta.enlace { display: block; color: var(--tinta); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.tarjeta.enlace:hover { text-decoration: none; transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 8px 8px 0 var(--tinta); }
.tarjeta h3 { margin-bottom: 6px; }
.tarjeta-titulo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.tarjeta-titulo h3 { margin: 0; font-size: 22px; }
.rejilla { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.seccion { margin-top: 34px; }
.seccion > h2, .seccion > .tarjeta-titulo h2 { color: #fff; -webkit-text-stroke: 1.5px var(--tinta); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--tinta); }
:root[data-tema="claro"] .seccion > h2 { color: var(--tinta); -webkit-text-stroke: 0; text-shadow: none; }
.separador { height: 0; border: 0; border-top: 2.5px dashed var(--borde-2); margin: 14px 0; }

/* ——— Formularios ——— */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo > span, .campo > label { font-weight: 900; font-size: 13px; color: var(--texto-2); text-transform: uppercase; letter-spacing: .04em; }
input[type=text], input[type=password], input[type=search], input[type=email], input[type=number], select, textarea {
  background: var(--fondo-2); border: 2.5px solid var(--tinta); border-radius: var(--radio-s); padding: 9px 12px; width: 100%;
  color: var(--texto); outline: none; transition: box-shadow .12s; font-weight: 700;
}
input:focus, select:focus, textarea:focus { box-shadow: 3px 3px 0 var(--acento-osc); }
textarea { resize: vertical; min-height: 90px; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; }
.interruptor input { appearance: none; width: 46px; height: 26px; border-radius: 99px; background: #d9cfba; border: 2.5px solid var(--tinta); position: relative; cursor: pointer; flex: 0 0 auto; transition: background .15s; }
.interruptor input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 2px solid var(--tinta); transition: transform .18s cubic-bezier(.2, 1.5, .4, 1); }
.interruptor input:checked { background: var(--verde); }
.interruptor input:checked::after { transform: translateX(19px); }
.error-form { color: var(--rojo); font-weight: 800; font-size: 14px; min-height: 1.4em; }

.opciones { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.opcion {
  background: var(--panel); border: 2.5px solid var(--tinta); border-radius: 4px; padding: 10px 6px; cursor: pointer; text-align: center;
  font-weight: 900; color: var(--texto); box-shadow: var(--sombra-s); transition: transform .08s, background .1s;
}
.opcion:hover { transform: translate(-1px, -1px); background: var(--panel-2); }
.opcion.elegida { background: var(--acento); color: var(--tinta); transform: rotate(-1deg); }
.opcion small { display: block; font-weight: 700; color: var(--texto-3); font-size: 12px; }
.opcion.elegida small { color: #4b4459; }

.pestanas { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 8px; }
.pestanas button, .pestanas a {
  background: var(--panel); border: 2.5px solid var(--tinta); padding: 8px 14px 6px; color: var(--texto-2); cursor: pointer; border-radius: 4px;
  font: 400 19px/1 var(--f-titulo); letter-spacing: .05em; white-space: nowrap; display: flex; align-items: center; gap: 7px; text-decoration: none;
  box-shadow: 2px 2px 0 var(--tinta);
}
.pestanas button svg, .pestanas a svg { width: 18px; height: 18px; }
.pestanas .activa { background: var(--acento); color: var(--tinta); transform: rotate(-1.5deg); box-shadow: 3px 3px 0 var(--tinta); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; background: var(--panel-2); border: 2px solid var(--tinta); font-size: 12px; font-weight: 900; color: var(--texto); }
.chip.acento { background: var(--acento); color: var(--tinta); }
.chip.verde { background: var(--verde); color: var(--tinta); }
.chip.rojo { background: var(--rojo); color: #fff; }
.titulo-j { background: var(--rojo); color: #fff; font: 400 13px/1 var(--f-titulo); letter-spacing: .06em; padding: 3px 5px 2px; border-radius: 3px; border: 2px solid var(--tinta); }
.titulo-j.bot { background: var(--azul); }
.punto-linea { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); border: 2px solid var(--tinta); display: inline-block; }

.avatar { width: 40px; height: 40px; border-radius: 5px; flex: 0 0 auto; overflow: hidden; background: var(--panel-3); border: 2.5px solid var(--tinta); box-shadow: 2px 2px 0 var(--tinta); }
.avatar.peq { width: 30px; height: 30px; border-width: 2px; box-shadow: none; }
.avatar.gran { width: 104px; height: 104px; border-width: 4px; box-shadow: var(--sombra); transform: rotate(-2deg); }
.avatar svg, .avatar img { width: 100%; height: 100%; }

.lista { display: flex; flex-direction: column; }
.lista > .elem { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 2px dashed var(--borde); color: inherit; text-decoration: none; }
.lista > .elem:last-child { border-bottom: 0; }
a.elem:hover { background: var(--panel-2); text-decoration: none; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font: 400 16px/1 var(--f-titulo); letter-spacing: .05em; color: var(--texto-3); padding: 8px; border-bottom: 2.5px solid var(--tinta); }
.tabla td { padding: 9px 8px; border-bottom: 2px dashed var(--borde); }
.tabla tr.enlace { cursor: pointer; }
.tabla tr.enlace:hover td { background: var(--panel-2); }
.vacio { padding: 26px 14px; text-align: center; color: var(--texto-3); }
.vacio svg { width: 54px; height: 54px; margin: 0 auto 10px; opacity: .7; }

/* ——— Avisos y diálogos ——— */
#avisos { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.aviso {
  background: var(--papel); color: var(--tinta); border: 3px solid var(--tinta); border-left: 12px solid var(--acento); padding: 11px 14px;
  border-radius: 4px; box-shadow: var(--sombra); font-weight: 800; animation: aparece-vineta .25s cubic-bezier(.2, 1.5, .4, 1);
  display: flex; gap: 10px; align-items: flex-start;
}
.aviso.error { border-left-color: var(--rojo); }
.aviso.bien { border-left-color: var(--verde); }
.aviso button { margin-left: auto; }
@media (max-width: 760px) { #avisos { bottom: calc(80px + env(safe-area-inset-bottom)); right: 10px; left: 10px; max-width: none; } }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes aparece-vineta { from { opacity: 0; transform: scale(.85) rotate(-3deg); } }
.modal-fondo {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; animation: entra .15s;
  background: radial-gradient(circle, rgba(10, 12, 30, .3) 2px, transparent 2.3px) 0 0 / 10px 10px, rgba(10, 12, 30, .62);
}
.modal {
  background: var(--papel); border-radius: 4px; width: min(500px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  border: 4px solid var(--tinta); box-shadow: 10px 10px 0 var(--tinta); animation: aparece-vineta .28s cubic-bezier(.2, 1.5, .4, 1);
}
.modal.ancho { width: min(780px, 100%); }
.modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.modal-cab h3 { margin: 0; font-size: 30px; color: var(--rojo); -webkit-text-stroke: 1px var(--tinta); paint-order: stroke fill; }
.modal-cuerpo { padding: 8px 18px 16px; }
.modal-pie { display: flex; gap: 10px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }

.cargando { display: grid; place-items: center; padding: 40px; color: var(--texto-3); }
.cargando::before {
  content: ''; width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--tinta); border-top-color: var(--acento);
  border-right-color: var(--rojo); animation: gira .7s linear infinite; box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
}
@keyframes gira { to { transform: rotate(360deg); } }

/* ——— Mesa de juego: tablero + panel lateral ——— */
.mesa {
  --lado: 400px;
  --tam: min(calc(100vh - 150px), calc(100vw - var(--ancho-barra) - var(--lado) - 110px), 860px);
  display: grid; grid-template-columns: auto var(--lado); gap: 24px; justify-content: center; align-items: start; max-width: 1400px; margin: 0 auto;
}
.mesa-centro { display: flex; gap: 10px; width: calc(var(--tam) + 32px); }
.mesa-centro.sin-barra { width: var(--tam); }
.mesa-tablero { width: var(--tam); display: flex; flex-direction: column; gap: 8px; }
.mesa-tablero > .tablero, .mesa-tablero > .t3d { border: 4px solid var(--tinta); box-shadow: var(--sombra); border-radius: 4px; }
.mesa-tablero > .t3d { width: 100%; aspect-ratio: 1 / 1; }
.mesa-lado {
  background: var(--papel); border-radius: 4px; height: calc(var(--tam) + 116px); max-height: calc(100vh - 44px);
  display: flex; flex-direction: column; overflow: hidden; border: 3px solid var(--tinta); box-shadow: var(--sombra); position: sticky; top: 22px;
}
.mesa-lado .lado-cab { padding: 14px 16px 10px; border-bottom: 3px solid var(--tinta); }
.mesa-lado .lado-cuerpo { flex: 1 1 auto; overflow: auto; padding: 12px 16px; }
.mesa-lado .lado-pie { padding: 10px 12px; border-top: 3px solid var(--tinta); background: var(--panel-2); }
@media (max-width: 1100px) { .mesa { --lado: 340px; } }
@media (max-width: 900px) {
  .mesa { grid-template-columns: 1fr; --tam: min(calc(100vw - 24px), calc(100vh - 190px), 640px); justify-items: center; }
  .mesa-lado { height: auto; max-height: none; width: 100%; max-width: 640px; position: static; }
  .mesa-centro.con-barra { width: calc(var(--tam) + 20px); }
}
@media (max-width: 760px) {
  .mesa { --tam: min(calc(100vw - 24px), 640px); gap: 14px; }
  .mesa-centro .barra-eval { width: 12px; }
  .mesa-centro.con-barra { --tam: calc(100vw - 24px - 20px); }
}

/* Barra de jugador (arriba y abajo del tablero) */
.jugador { display: flex; align-items: center; gap: 10px; min-height: 46px; }
.jugador .avatar { width: 40px; height: 40px; }
.jugador .quien { min-width: 0; flex: 1 1 auto; }
.jugador .quien .nombre { font: 400 20px/1.1 var(--f-titulo); letter-spacing: .04em; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jugador .quien .nombre a { color: inherit; }
.jugador .quien .nombre .val { color: var(--texto-3); font: 800 13px var(--f-texto); letter-spacing: 0; }
.jugador .capturas { display: flex; align-items: center; height: 18px; gap: 0; color: var(--texto-3); font: 800 12px/1 var(--f-mono); }
.jugador .capturas i { width: 17px; height: 17px; margin-right: -6px; background-size: contain; background-repeat: no-repeat; }
.jugador .capturas b { margin-left: 9px; font-weight: 800; }
.reloj {
  font: 700 24px/1 var(--f-mono); padding: 7px 12px; border-radius: 4px; background: var(--panel); color: var(--texto-3); border: 2.5px solid var(--tinta);
  min-width: 118px; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 8px; letter-spacing: -.02em; box-shadow: var(--sombra-s);
}
.reloj.activo { background: var(--papel); color: var(--tinta); transform: rotate(-1deg); }
.reloj.poco.activo { background: var(--rojo); color: #fff; animation: latido .8s ease-in-out infinite; }
@keyframes latido { 50% { transform: rotate(-1deg) scale(1.05); } }
.reloj svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .reloj { font-size: 20px; min-width: 96px; padding: 6px 9px; } }

/* Lista de jugadas */
.jugadas { display: grid; grid-template-columns: 44px 1fr 1fr; font-size: 14px; align-content: start; }
.jugadas .num { color: var(--texto-3); padding: 5px 8px; font: 700 13px/1.6 var(--f-mono); }
.jugadas .j { padding: 3px 8px; cursor: pointer; font-weight: 900; border-radius: 4px; display: flex; align-items: center; gap: 4px; line-height: 1.6; }
.jugadas .j:hover { background: var(--panel-2); }
.jugadas .j.actual { background: var(--acento); box-shadow: 2px 2px 0 var(--tinta); }
.jugadas .j .ic { width: 16px; height: 16px; flex: 0 0 auto; }
.jugadas .j .t { margin-left: auto; color: var(--texto-3); font: 600 11px/1 var(--f-mono); }
.controles-nav { display: flex; gap: 6px; }
.controles-nav .btn { flex: 1; padding: 8px 0; }

.fig { font-family: var(--f-texto); }

/* Insignias de clasificación */
.clase { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #fff; font: 900 11px/1 var(--f-texto); flex: 0 0 auto; border: 2px solid var(--tinta); }
.clase.brillante { background: var(--j-brillante); }
.clase.genial { background: var(--j-genial); }
.clase.mejor { background: var(--j-mejor); }
.clase.excelente { background: var(--j-excelente); }
.clase.buena { background: var(--j-buena); }
.clase.libro { background: var(--j-libro); }
.clase.imprecision { background: var(--j-imprecision); color: var(--tinta); }
.clase.error { background: var(--j-error); }
.clase.fallo { background: var(--j-fallo); }
.clase.garrafal { background: var(--j-garrafal); }
.clase.forzada { background: #8a8296; }

/* Bocadillo (bots, narrador) */
.bocadillo {
  position: relative; background: #fff; color: var(--tinta); border: 3px solid var(--tinta); border-radius: 22px; padding: 10px 15px;
  font: 700 16px/1.35 var(--f-globo); box-shadow: 4px 4px 0 rgba(0, 0, 0, .3); animation: aparece-vineta .3s cubic-bezier(.2, 1.6, .4, 1);
}
.bocadillo::before {
  content: ''; position: absolute; left: 28px; top: -13px; width: 20px; height: 20px; background: #fff;
  border-left: 3px solid var(--tinta); border-top: 3px solid var(--tinta); transform: skewX(-30deg) rotate(45deg);
}

/* Portada */
.heroe { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 52px); align-items: center; margin: 4px 0 34px; }
.heroe h1 { font-size: clamp(44px, 6.4vw, 92px); line-height: .95; }
.heroe h1 em { font-style: normal; color: var(--rojo); display: inline-block; transform: rotate(2deg); }
.heroe p.entrada { font-size: 18px; color: var(--texto-2); max-width: 34em; }
.heroe .acciones { display: flex; flex-direction: column; gap: 14px; max-width: 440px; margin-top: 24px; }
.heroe .acciones .btn { justify-content: flex-start; text-align: left; }
.heroe .acciones .btn small { display: block; font-size: 13px; font-weight: 800; opacity: .75; margin-top: 3px; }
.heroe .acciones .btn span { text-align: left; }
@media (max-width: 900px) { .heroe { grid-template-columns: 1fr; } }
.cifras { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 20px; font: 800 13px/1.3 var(--f-texto); color: var(--texto-3); text-transform: uppercase; letter-spacing: .04em; }
.cifras b { display: block; font: 400 34px/1 var(--f-titulo); color: var(--acento); letter-spacing: .03em; -webkit-text-stroke: 1px var(--tinta); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--tinta); }

.icono-tarjeta { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--acento); color: var(--tinta); margin-bottom: 10px; border: 3px solid var(--tinta); box-shadow: var(--sombra-s); }
.icono-tarjeta svg { width: 28px; height: 28px; }

.pie { margin-top: 54px; padding-top: 18px; border-top: 3px dashed var(--borde-2); color: var(--texto-3); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }
.pie a { color: var(--texto-2); }

/* Portada en cómic */
.portada { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(22px, 3.5vw, 50px); align-items: center; margin: 0 0 40px; }
.portada-caja { position: relative; padding-bottom: 26px; }
.portada-escena { aspect-ratio: 5 / 4.4; border: 4px solid var(--tinta); box-shadow: 9px 9px 0 var(--tinta); border-radius: 4px; transform: rotate(-.8deg); }
.portada-escena.tablero { aspect-ratio: 1 / 1; }
.portada-nota { position: absolute; left: 18px; right: 34px; bottom: 0; transform: rotate(1deg); font-size: 15px; z-index: 5; }
.portada-nota.entra { animation: aparece-vineta .35s cubic-bezier(.2, 1.5, .4, 1); }
.portada-texto > .cartela { transform: rotate(-2deg); margin-bottom: 14px; }
.portada-texto h1 { font-size: clamp(46px, 6vw, 84px); line-height: .95; margin-bottom: 18px; }
.portada-texto h1 em { font-style: normal; color: var(--rojo); display: inline-block; transform: rotate(2deg); }
.portada-texto p.entrada { font-size: 17.5px; color: var(--texto-2); max-width: 34em; }
.portada-texto .acciones { display: flex; flex-direction: column; gap: 14px; max-width: 460px; margin-top: 22px; }
.portada-texto .acciones .btn { justify-content: flex-start; text-align: left; }
.portada-texto .acciones .btn small { display: block; font-size: 13px; font-weight: 800; opacity: .78; margin-top: 3px; }
.portada-duelo { margin: 18px 0 0; }
.portada-duelo a { display: inline-flex; align-items: center; gap: 8px; color: var(--acento); }
.portada-duelo a svg { width: 22px; height: 22px; }
.ritmos-rapidos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ritmo-cifra { font: 400 34px/1 var(--f-titulo); letter-spacing: .04em; }
@media (max-width: 900px) { .portada { grid-template-columns: 1fr; } .portada-escena { aspect-ratio: 1 / 1; } }
