/* Estilos compartidos de Anigrid. Paleta y tipografías: ver CLAUDE.md / mockups. */

:root {
  --bg: #0E1116;
  --bg-deep: #07090C;
  --surface: #181D25;
  --surface-2: #232A35;
  --chip: #2F3743;
  --border: #2A313C;
  --border-strong: #3A4250;
  --text: #F2F0EA;
  --text-2: #C9CED6;
  --muted: #9AA3AE;
  --accent: #FF5A36;
  --link: #FF7A5C;
  --ok: #3CCFB4;
  --bad: #FF7B7B;
  --close: #F2B33D;
  --close-bg: #2B2414;
  --close-text: #E8C987;
  --font-title: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: #FF9A82; }

button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }

.app {
  max-width: 420px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.logo { font-family: var(--font-title); font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.label { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }

.pill {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}

.icon-btn {
  width: 44px; height: 44px; padding: 0; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}

.btn {
  height: 46px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
}
.btn-primary { border: none; background: var(--accent); color: var(--bg); font-weight: 700; }
.btn-lg { height: 48px; font-size: 15px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7, 9, 12, 0.85);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%; max-width: 390px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 16px; display: flex; flex-direction: column; gap: 18px;
  /* Siempre entra en la pantalla (Juan Cruz, 28/10/2026: el How to play de la Grid no entraba). El body tiene zoom en
     la compu (fit.js), así que el alto disponible se divide por el zoom. */
  max-height: calc((100dvh - 32px) / var(--zoom, 1)); overflow-y: auto;
}
/* Ventana de stats: mismo tamaño y letra legible en todos los juegos (Juan Cruz, 28/10/2026). Los juegos ponen sus
   números en .stat-tiles; acá se fija el tamaño para todos. */
#stats-modal .modal { max-width: 420px; }
#stats-modal .stat-tiles b { font-size: 26px; }
#stats-modal .stat-tiles span { font-size: 12px; line-height: 1.25; }
#stats-modal .modal-title { font-size: 22px; }
@media (min-width: 1040px) {
  #stats-modal .modal { max-width: 480px; padding: 22px 22px; }
  /* How to play más grande y centrado en la compu (Juan Cruz, 28/10/2026). */
  .howto .modal { max-width: 560px; padding: 24px 26px; }
  .howto-list { font-size: 15.5px; }
  .howto-scoring p { font-size: 14px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; z-index: 20;
}
.toast[hidden] { display: none; }

/* ---------- barra de arriba, pantallas, buscador y modales (compartido por los juegos) ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topbar-left { display: flex; gap: 6px; align-items: center; }
.record { font-size: 13px; font-weight: 700; padding: 6px 10px; white-space: nowrap; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.brand { display: flex; align-items: baseline; gap: 6px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.number { font-size: 12px; color: var(--muted); }
#mode-pill { min-width: 52px; text-align: center; }
.screen { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.screen[hidden] { display: none; }
.loading { color: var(--muted); text-align: center; }
.search { position: relative; }
.search input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--accent); }
/* iPhone (2/11/2026): los cuadros de escribir son type="search" (así iOS no ofrece contraseña / tarjeta / ubicación)
   pero se ven como antes; y en el celu van a 16 px (con menos, Safari hace un zoom que no vuelve). */
input[type='search'] { -webkit-appearance: none; appearance: none; }
input[type='search']::-webkit-search-cancel-button, input[type='search']::-webkit-search-decoration { -webkit-appearance: none; display: none; }
@media (max-width: 1039px), (hover: none) {
  .search input, .text-input, .fb-field input, .fb-field textarea { font-size: 16px; }
}
.suggestions {
  position: absolute; bottom: 52px; left: 0; right: 0; margin: 0; padding: 0; list-style: none;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px;
  overflow: hidden; max-height: 320px; overflow-y: auto; z-index: 5;
}
.suggestions li {
  padding: 9px 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; cursor: pointer;
}
.suggestions li:last-child { border-bottom: none; }
.suggestions li.active, .suggestions li:hover { background: var(--chip); }
.suggestions li.used { opacity: 0.4; cursor: not-allowed; }
.suggestions .main { font-size: 14px; font-weight: 600; }
.suggestions .alt { font-size: 11px; color: var(--muted); }
.suggestions .empty { color: var(--muted); font-size: 13px; cursor: default; }
.back-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.back-btn:hover { color: var(--text); border-color: var(--muted); }
.countdown { text-align: center; font-size: 12px; color: var(--muted); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-family: var(--font-title); font-weight: 800; font-size: 22px; }

/* ---------- How to play (assets/howto.js) ---------- */
.howto { z-index: 15; }
.howto-list { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.howto-list li::marker { color: var(--accent); }
.howto-list b { color: var(--text); }
.howto-scoring { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 14px; }
.howto-scoring p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }

/* En la compu se agranda todo con zoom (lo calcula /assets/fit.js para que entre en la pantalla); "una pantalla de
   alto" se compensa con el mismo zoom. */
.app { min-height: calc(100dvh / var(--zoom, 1)); }

/* ---------- Pantalla de inicio común (25/10/2026, Juan Cruz: todos los juegos igual, como el Statdle de Futbol 11) ----------
   Una tarjeta: miniatura del tablero (.start-preview) + cuerpo (.start-body) en este orden: h1 · cómo se juega ·
   resumen de dificultades · filas de chips (.option: Difficulty, después las demás) · aviso de "una partida por día" ·
   botón Start. En la compu (≥720 px) van en dos columnas; en el celu, la miniatura arriba y chiquita. */
.start-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 18px; margin-top: 4px;
}
.start-preview {
  display: flex; align-items: center; justify-content: center; max-height: 180px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px; font-size: 7px;
}
.start-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.start-body h1 { font-family: var(--font-title); font-weight: 800; font-size: 30px; line-height: 1.05; margin: 0; }
.start-body p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.start-body p b { color: var(--text); }
.start-body p.start-modes { color: var(--muted); font-size: 13px; }
.option { display: flex; flex-direction: column; gap: 8px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text); font-weight: 600; font-size: 14px;
}
.chip-btn:hover { border-color: var(--muted); }
.chip-btn[aria-pressed='true'] { border-color: transparent; background: var(--accent); color: var(--bg); }
.option-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.option-hint.center { text-align: center; }
.btn-start { width: 100%; height: 50px; font-size: 16px; }
.start-body .option-hint.center { margin-top: 4px; margin-bottom: -4px; }

@media (min-width: 720px) {
  .app:has(> #screen-start:not([hidden])) { max-width: 800px; }
  .start-card { flex-direction: row; align-items: stretch; gap: 24px; padding: 24px; }
  .start-preview { flex: 0 0 40%; max-height: none; font-size: 10.5px; padding: 18px 10px; }
  .start-body { flex: 1; }
}

/* Miniaturas (todo en em: crecen con el font-size de .start-preview) */
.pv { display: flex; gap: 0.8em; color: var(--text); font-family: var(--font-body); line-height: 1.15; }
.pv-col { display: flex; flex-direction: column; gap: 0.5em; }
.pv-t { background: var(--surface-2); border: 1px solid var(--border); border-radius: 0.5em; }
.pv-t.dash { background: transparent; border: 1px dashed #4A5363; }
.pv-t.ok { background: #12302B; border-color: var(--ok); }
.pv-t.acc { background: #2B1712; border-color: var(--accent); }
.pv-t.bad { background: #301A1C; border-color: var(--bad); }
.pv-t.chip { background: var(--chip); border-color: var(--chip); }
.pv-l { display: block; font-size: 0.85em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pv-v { display: block; font-size: 1.15em; font-weight: 600; white-space: nowrap; }
.pv-q { display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 800; color: var(--accent); }
.pv-bar { display: block; height: 0.7em; border-radius: 0.35em; background: var(--border-strong); }
.pv-num { color: var(--muted); font-size: 1em; font-weight: 600; width: 1.4em; text-align: right; flex: none; }
/* Anistat y ANICHARACTER: portada "?" + ficha */
.pv-cover { width: 6.4em; height: 9em; flex: none; font-size: 1em; }
.pv-cover b { font-size: 3.4em; }
.pv-sheet { display: grid; grid-template-columns: repeat(2, 8.8em); gap: 0.45em; align-content: center; }
.pv-sheet .pv-t { padding: 0.45em 0.6em; height: 2.9em; }
/* Grid */
.pv-grid { display: grid; grid-template-columns: repeat(4, 4.8em); grid-auto-rows: 4.8em; gap: 0.4em; }
.pv-grid .pv-t { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.9em; font-weight: 600; }
.pv-grid .corner { background: transparent; border: none; }
.pv-grid .ok { background: linear-gradient(160deg, #2C5F57, #12302B); }
/* Impostor */
.pv-shelf { display: flex; justify-content: center; gap: 0.5em; padding-bottom: 0.45em; border-bottom: 0.25em solid var(--border-strong); }
.pv-shelf .pv-t { width: 3.4em; height: 4.8em; }
/* ANILINKS */
.pv-links { display: grid; grid-template-columns: repeat(4, 5em); grid-auto-rows: 3.4em; gap: 0.4em; }
.pv-links .solved {
  grid-column: 1 / -1; background: var(--accent); border-color: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: 0.08em; font-size: 0.95em;
}
/* Name 10 */
.pv-list { display: flex; flex-direction: column; gap: 0.35em; width: 17em; }
.pv-row { display: flex; align-items: center; gap: 0.5em; height: 1.45em; }
.pv-row .pv-t { flex: 1; height: 100%; display: flex; align-items: center; padding: 0 0.5em; }
.pv-row .pv-bar { width: 60%; height: 0.5em; background: var(--ok); opacity: 0.7; }
/* ANICHOICE */
.pv-quiz { display: flex; flex-direction: column; gap: 0.5em; width: 18em; }
.pv-quiz-head { display: flex; gap: 0.7em; align-items: center; margin-bottom: 0.3em; }
.pv-quiz-head .pv-t { width: 4.6em; height: 6.4em; flex: none; }
.pv-opt { display: flex; align-items: center; gap: 0.6em; height: 2.5em; padding: 0 0.7em; }
.pv-opt .pv-bar { width: 55%; }
.pv-opt.ok .pv-bar { background: var(--ok); }
/* ANICHARACTER: líneas de pistas */
.pv-facts { display: flex; flex-direction: column; gap: 0.5em; justify-content: center; width: 13em; }
.pv-fact { display: flex; align-items: center; gap: 0.5em; height: 1.9em; padding: 0 0.6em; }
.pv-fact .pv-num { width: auto; color: var(--accent); }

/* ANIBOOM: consigna, mecha, foto y 3 opciones */
.pv-boom { display: flex; flex-direction: column; gap: 0.6em; width: 17em; }
.pv-boom-q { font-family: var(--font-title); font-weight: 800; font-size: 1.6em; color: var(--accent); text-align: center; }
.pv-boom-fuse { display: flex; align-items: center; gap: 0.3em; }
.pv-boom-bomb { width: 1.8em; height: 1.8em; border-radius: 999px; background: var(--chip); border: 0.2em solid var(--text); flex: none; }
.pv-boom-fuse i { flex: 1; height: 0.4em; border-radius: 0.2em; background: var(--close); }
.pv-boom-fuse b { width: 0.9em; height: 0.9em; border-radius: 999px; background: #FFD36A; box-shadow: 0 0 0.8em var(--accent); margin-left: -0.6em; }
.pv-boom-pic { width: 5.4em; height: 7em; margin: 0 auto 0.2em; }
.pv-boom .pv-opt { height: 2.2em; }

/* Día bonus: segunda ronda (Juan Cruz, 29/10/2026). Botón en el resultado de la 1.ª ronda y pastilla mientras se juega la 2.ª. */
.round2-btn { border: 1.5px solid #3CCFB4; background: rgba(60, 207, 180, 0.12); color: #3CCFB4; font-weight: 700; }
.round2-btn:hover { background: #3CCFB4; color: var(--bg); }
.round2-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(60, 207, 180, 0.15); color: #3CCFB4; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.round2-note { font-size: 12px; color: var(--muted, #9AA3AE); }
.round2-pill[hidden], .round2-btn[hidden], .round2-note[hidden] { display: none; }

/* Botón ⓘ de categorías (Juan Cruz, 29/10/2026; boceto mockups/varios/2026-10-29_1_boton_info_categorias.html).
   Lo pone /assets/info.js. Ícono fino gris de 13–14 px, naranja al pasar el mouse o abierto; la zona tocable es
   invisible y más grande (~35 px). El globito va pegado al body (position: fixed) y la capa .cat-info-catcher
   atrapa el primer toque afuera para que solo cierre. */
.cat-info {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 13px; height: 13px; padding: 0; margin: 0 0 0 5px; border: 0; background: none; color: var(--muted);
  vertical-align: -0.1em; line-height: 0; cursor: pointer; transition: color .12s; -webkit-tap-highlight-color: transparent;
}
.cat-info svg, .head .k .cat-info svg { width: 100%; height: 100%; display: block; }
.cat-info::after { content: ""; position: absolute; inset: -11px; }
.cat-info:hover, .cat-info.open { color: var(--accent); }
.cat-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }
.cat-info.dark { color: rgba(14, 17, 22, 0.6); }
.cat-info.dark:hover, .cat-info.dark.open { color: var(--bg); }
@media (min-width: 1040px) { .cat-info { width: 14px; height: 14px; margin-left: 6px; } }
.cat-info-catcher { position: fixed; inset: 0; z-index: 1000; background: transparent; }
.cat-info-bubble {
  position: fixed; z-index: 1001; max-width: 220px; width: max-content; padding: 8px 10px; border-radius: 10px;
  background: #232A35; border: 1px solid #3A4250; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  font-family: var(--font-body, 'IBM Plex Sans', system-ui, sans-serif); font-size: 12.5px; font-weight: 400;
  line-height: 1.4; letter-spacing: 0; text-transform: none; text-align: left; color: #C9CED6;
  animation: cat-info-pop .12s ease-out;
}
.cat-info-bubble b { color: var(--text); font-weight: 600; }
.cat-info-bubble .cat-info-rule { display: block; margin-top: 4px; color: var(--muted); }
.cat-info-bubble .arrow { position: absolute; width: 10px; height: 10px; background: #232A35; border: 1px solid #3A4250; transform: rotate(45deg); }
.cat-info-bubble.pos-below .arrow { top: -6px; border-right: none; border-bottom: none; }
.cat-info-bubble.pos-above .arrow { bottom: -6px; border-left: none; border-top: none; }
@keyframes cat-info-pop { from { opacity: 0; } to { opacity: 1; } }
/* Una pantalla escondida queda escondida aunque el CSS del juego le ponga display (29/10/2026: en la compu el tablero de
   AniBingo se veía debajo de la pantalla de inicio). */
.screen[hidden] { display: none !important; }

/* ---------- Menú: cuenta regresiva + Your stats + Settings (Juan Cruz, 29/10/2026; bocetos mockups/menu/2026-10-29_1 y _2) ----------
   assets/settings.js (ventana de ajustes, 'settings:names') y assets/stats-panel.js (panel "Your stats"). */
.menu-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-tools .btns { display: flex; gap: 8px; }
.countdown-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--muted); white-space: nowrap; }
.countdown-pill b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .3px; }
.menu-tools .icon-btn { width: 40px; height: 40px; cursor: pointer; }
.menu-tools .icon-btn:hover { border-color: var(--muted); }
#stats-btn { color: var(--accent); border-color: rgba(255, 90, 54, .45); }
#stats-btn:hover { border-color: var(--accent); background: rgba(255, 90, 54, .08); }
@media (max-width: 719px) { .menu-tools { margin-bottom: -10px; } }
@media (min-width: 1040px) {
  .app.has-mochi-side > .menu-tools { grid-column: 3; grid-row: 1; align-self: start; justify-self: end; margin-top: 2px; }
  .app.has-mochi-side:has(> .menu-tools) > .otaku { height: calc(100% - 52px); }
}
/* Ajustes */
.settings-modal { max-width: 420px; }
@media (min-width: 1040px) { .settings-modal { max-width: 480px; padding: 22px; } }
.set-sec { display: flex; flex-direction: column; gap: 10px; }
.set-sec h3 { margin: 0; font: 700 16px var(--font-title); }
.set-sec .chip-btn { cursor: pointer; }
.name-preview { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.name-preview .cover { width: 44px; height: 62px; flex: none; border-radius: 6px; background: linear-gradient(160deg, #6B4A3A, #2B1C17); border: 1px solid var(--border-strong); display: flex; align-items: flex-end; justify-content: center; font: 800 9px var(--font-title); color: #F2F0EA; padding-bottom: 4px; }
.name-preview .main { font-weight: 700; font-size: 16px; line-height: 1.2; }
.name-preview .alt { font-size: 12px; color: var(--muted); margin-top: 3px; }
/* Panel "Your stats" (todo adentro de .sp para no chocar con clases de los juegos) */
.sp-wrap { align-items: center; }
.sp { position: relative; width: min(1180px, 100%); max-height: calc((100dvh - 32px) / var(--zoom, 1)); overflow-y: auto; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 18px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.sp [hidden] { display: none !important; }
.sp-close { position: absolute; top: 14px; right: 14px; cursor: pointer; }
.sp-head { display: flex; align-items: center; gap: 12px; padding-right: 52px; }
.sp-head img { height: 58px; width: auto; margin: -6px -4px -4px -6px; }
.sp-head .t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.sp-head .t small { color: var(--muted); font-size: 12.5px; }
.sp-bubble { font: 700 13px/1.2 var(--font-title); background: #fff; color: #0E1116; border: 2px solid #0E1116; border-radius: 16px; padding: 5px 11px; box-shadow: 3px 3px 0 1px var(--accent); rotate: -2deg; max-width: 260px; }
.sp .label { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.sp .kpis { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 10px; }
.sp .kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sp .kpi b { font: 800 26px/1.1 var(--font-title); }
.sp .kpi b.acc { color: var(--accent); }
.sp .kpi span.s { font-size: 12px; color: var(--muted); }
.sp-empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 14px; font-size: 14px; color: var(--text-2); text-align: center; }
.sp .facts { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--text-2); }
.sp .fact { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.sp .fact b { color: var(--text); }
.sp .fact .logo { font-size: 13px; }
.sp-main { display: grid; grid-template-columns: 392px minmax(0, 1fr); gap: 12px; align-items: start; }
.sp-left { display: flex; flex-direction: column; gap: 12px; }
.sp .box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sp .box-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sp .box-h small { color: var(--muted); font-size: 12px; }
.sp .heat { display: grid; grid-template-columns: 26px repeat(9, 1fr); grid-template-rows: 14px repeat(7, 15px); gap: 4px; }
.sp .heat .mo { font-size: 11px; color: var(--muted); grid-row: 1; white-space: nowrap; }
.sp .heat .wd { font-size: 10.5px; color: var(--muted); grid-column: 1; align-self: center; }
.sp .heat i { display: block; height: 15px; border-radius: 4px; background: var(--surface-2); }
.sp .heat i.fut { background: transparent; border: 1px dashed var(--border); }
.sp .heat i.now { outline: 2px solid var(--text); outline-offset: 1px; }
.sp i.l1 { background: #4A2A22; } .sp i.l2 { background: #7A3627; } .sp i.l3 { background: #B6442B; } .sp i.l4 { background: #FF5A36; }
.sp .legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); justify-content: flex-end; }
.sp .legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sp .trend svg { width: 100%; height: 92px; display: block; overflow: visible; }
.sp .trend .note { font-size: 12.5px; color: var(--text-2); }
.sp .trend .note b { color: var(--ok); }
.sp .trend .wait { font-size: 13px; color: var(--muted); padding: 22px 0; text-align: center; }
.sp .gcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp .gc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.sp .gc-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sp .gc-h .logo { font-size: 17px; white-space: nowrap; }
.sp .streak { font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.sp .streak.hot { color: var(--accent); }
.sp .gnums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sp .gnums div { display: flex; flex-direction: column; }
.sp .gnums b { font: 800 18px/1.15 var(--font-title); }
.sp .gnums span { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.sp .spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.sp .spark i { flex: 1; border-radius: 2px 2px 0 0; background: var(--accent); opacity: .8; min-height: 2px; }
.sp .spark i:not([style]) { background: var(--chip); opacity: 1; }
.sp .gc .empty { font-size: 12.5px; color: var(--muted); }
.sp .gc .empty a { font-weight: 600; text-decoration: none; color: var(--link); }
.sp-foot { font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 719px) {
  .sp-wrap { padding: 0; align-items: stretch; }
  .sp { width: 100%; max-height: none; height: 100dvh; border-radius: 0; border: 0; padding: 14px 12px 24px; }
  .sp-head img { height: 52px; }
  .sp-bubble { display: none; }
  .sp .kpis { grid-template-columns: repeat(2, 1fr); }
  .sp .kpis .kpi:first-child { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; }
  .sp .kpi b { font-size: 28px; }
  .sp .kpi span.s, .sp .label { font-size: 12px; }
  .sp .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; font-size: 13.5px; }
  .sp .fact { height: auto; min-height: 30px; white-space: normal; padding: 4px 11px; border-radius: 12px; flex-wrap: wrap; }
  .sp-main { grid-template-columns: 1fr; }
  .sp .gcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sp .gc { padding: 10px; }
  .sp .gc-h { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sp .gc-h .logo { font-size: 16px; }
  .sp .gnums { grid-template-columns: repeat(2, 1fr); row-gap: 6px; }
  .sp .gnums b { font-size: 19px; } .sp .gnums span { font-size: 11px; }
  .sp .heat { grid-template-rows: 14px repeat(7, 26px); } .sp .heat i { height: 26px; }
  .sp .trend svg { height: 118px; }
}
@media (min-width: 720px) and (max-width: 1039px) { .sp-main { grid-template-columns: 1fr; } .sp .gcards { grid-template-columns: repeat(2, 1fr); } }

/* Stats en la ronda 2 de un día bonus (30/10/2026): línea chica debajo del título (la pone statsRoundNote de common.js). */
#stats-modal .stats-round-note { margin: -12px 0 -4px; font-size: 12px; font-weight: 600; color: #3CCFB4; }
#stats-modal .stats-round-note[hidden] { display: none; }

/* ---------- Lugares de publicidad (assets/ads.js, 30/10/2026; interruptor ADS_MODE arriba de ads.js) ----------
   Con ADS_MODE 'off' no se aplica nada de esto: no está la clase .ads-on ni las variables --ad-b / --ad-side, y las
   cajas .ad-rect del resultado quedan escondidas. Las cajas tienen alto fijo (nada salta) y anulan el zoom de la
   compu (fit.js) para medir lo mismo que el anuncio real. */
.ads-on body {
  padding-bottom: calc(var(--ad-b, 0px) / var(--zoom, 1));
  padding-left: calc(var(--ad-side, 0px) / var(--zoom, 1));
  padding-right: calc(var(--ad-side, 0px) / var(--zoom, 1));
}
.ads-on .app { min-height: calc((100dvh - var(--ad-b, 0px)) / var(--zoom, 1)); }
.ads-on .toast { bottom: calc(24px + var(--ad-b, 0px) / var(--zoom, 1)); }
/* Al enfocar un botón (ANICHOICE enfoca "Next question") el navegador lo trae a la vista: que no quede detrás de la barra. */
html.ads-on { scroll-padding-bottom: calc(var(--ad-b, 0px) + 8px); }
.ad-slot {
  display: flex; align-items: center; justify-content: center; flex: none;
  border: 1px dashed var(--border-strong); border-radius: 6px; background: var(--bg);
  color: var(--muted); font: 600 11px var(--font-body); letter-spacing: 1px; text-transform: uppercase; overflow: hidden;
}
.ads-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; zoom: calc(1 / var(--zoom, 1));
  display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); pointer-events: none;
}
.ads-bar-in { position: relative; pointer-events: auto; }
.ads-bar .ad-slot { width: 320px; height: 50px; }
[data-ad-bar="728"] .ads-bar .ad-slot { width: 728px; height: 90px; }
.ads-x {
  position: absolute; top: 50%; left: calc(100% + 6px); transform: translateY(-50%);
  width: 26px; height: 26px; padding: 0; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-2); display: flex; align-items: center; justify-content: center;
}
.ads-x:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 379px) { .ads-x { left: auto; right: 2px; top: 2px; transform: none; width: 22px; height: 22px; } }
.ads-side {
  position: fixed; z-index: 8; zoom: calc(1 / var(--zoom, 1));
  top: max(8px, calc((100dvh - var(--ad-b, 0px) - 600px) / 2)); left: var(--ad-gap, 12px);
}
.ads-side.right { left: auto; right: var(--ad-gap, 12px); }
.ads-side .ad-slot { width: 160px; height: 600px; }
[data-ad-side="300"] .ads-side .ad-slot { width: 300px; }
[data-ad-side="0"] .ads-side { display: none; }
.ad-rect { display: none; }
.ads-on .ad-rect {
  display: flex; justify-content: center; flex: none; align-self: center; width: 100%;
  margin: 10px auto 0; zoom: calc(1 / var(--zoom, 1)); grid-column: 1 / -1; order: 99;
}
.ads-on .ad-rect .ad-slot { width: 300px; height: 250px; }
/* fit.js mide sin el rectángulo del resultado: puede quedar debajo de la primera pantalla (se ve deslizando). */
.ads-measuring .ad-rect { display: none !important; }
/* Teclado abierto en el celu, o una ventana abierta (How to play, Stats, ajustes): sin publicidad a la vista. */
.ads-kb .ads-bar { visibility: hidden; }
:root:has(.modal-backdrop:not([hidden])) :is(.ads-bar, .ads-side) { display: none; }
/* Celu con la barra de abajo: la pantalla de inicio se compacta un poco (miniatura más chica, menos aire) para que
   Start siga entrando en 390×750 sin que la barra lo tape. Con ADS_MODE 'off' no cambia nada. */
@media (max-width: 719px) {
  .ads-on .start-card { padding: 16px; gap: 14px; }
  .ads-on .start-preview { font-size: 5.6px; padding: 10px; }
  .ads-on .start-body { gap: 10px; }
}

/* ---------- Sugerencias (assets/feedback.js, 1/11/2026): ventana, link del How to play y del resultado ---------- */
.fb-modal { max-width: 420px; gap: 14px; margin: 0; }
@media (min-width: 1040px) { .fb-modal { max-width: 480px; padding: 22px; } }
.fb-intro { margin: -6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.fb-field { display: flex; flex-direction: column; gap: 6px; }
.fb-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2, var(--muted)); }
.fb-label i { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.fb-count { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.fb-field input, .fb-field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: 16px/1.4 var(--font-body, inherit);
}
.fb-field input { height: 44px; }
.fb-field textarea { resize: none; min-height: 92px; }
.fb-field input:focus, .fb-field textarea:focus { outline: none; border-color: var(--accent); }
.fb-select {
  width: 100%; height: 44px; padding: 0 40px 0 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239AA3AE' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text); font: 16px/1.4 var(--font-body, inherit); appearance: none; -webkit-appearance: none; cursor: pointer;
}
.fb-select:focus { outline: none; border-color: var(--accent); }
.fb-select option { background: var(--surface, #181D25); color: var(--text); }
.fb-hint { font-size: 12px; color: var(--muted); }
.fb-hint[hidden] { display: none; }
.fb-status { margin: 0; font-size: 13px; font-weight: 600; text-align: center; }
.fb-status[hidden] { display: none; }
.fb-status.ok { color: var(--ok); }
.fb-status.bad { color: var(--bad); }
#fb-send:disabled { opacity: 0.45; cursor: default; }
/* Pastilla "Something wrong? [Suggestions]" (2/11/2026; como el "Missing player? Report here" de Futbol 11). */
.fb-pill-row { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-2, var(--muted)); line-height: 1.2; }
.fb-pill {
  border: none; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12px; font-weight: 700;
  background: #7CCBF2; color: #0E1116; cursor: pointer; letter-spacing: 0.2px;
}
.fb-pill:hover { background: #A3DBF7; }
.fb-pill:focus-visible { outline: 2px solid #A3DBF7; outline-offset: 2px; }
/* "☕ Donate" al lado (4/11/2026): misma pastilla, en el naranja de la marca; abre Ko-fi. */
.fb-pill.fb-donate { background: var(--accent, #FF5A36); color: #0E1116; text-decoration: none; display: inline-block; }
.fb-pill.fb-donate:hover { background: #FF7A5C; }
.fb-pill.fb-donate:focus-visible { outline-color: #FF7A5C; }
.fb-howto { margin: -12px 0 -8px; text-align: center; flex: none; }
.fb-howto .fb-pill { padding: 3px 10px; }
/* En pantallas bajas el How to play hace scroll adentro: el "Got it" no se aplasta (2/11/2026). */
.modal > .btn-lg { flex-shrink: 0; }
/* Debajo de los botones del resultado, antes del .ad-rect. fit.js mide sin él (como sin el rectángulo). */
.fb-result { margin: 4px 0 0; text-align: center; flex: none; align-self: center; width: 100%; grid-column: 1 / -1; order: 98; }
.ads-measuring .fb-result { display: none !important; }
#result-buttons[hidden] ~ .fb-result { display: none; }

/* Imagen propia que no cargó (common.js): tarjeta de texto en los colores de Anigrid, con el tamaño de la imagen. */
.noimg {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #232A35; border: 1px dashed #3A4250; color: #9AA3AE;
  font: 600 11px/1.2 'IBM Plex Sans', sans-serif; padding: 4px; overflow: hidden; box-sizing: border-box;
}

/* ⓘ de nombres (info.js namesButton, 3/11/2026): cada nombre en su renglón con la etiqueta en gris. */
.cat-info-name { display: block; margin-top: 4px; font-weight: 500; }
.cat-info-name i { display: block; font-style: normal; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted, #9AA3AE); }
.name-info { cursor: pointer; flex: none; }

/* Your stats: con 2 columnas (celu y tablet) el 9.º juego quedaba solo; en el hueco va "You know best": los 5 animes
   que más acertaste (3/11/2026). En la compu (3 columnas) no hay hueco. */
.sp .gc.gc-all { display: none; }
@media (max-width: 1039px) {
  .sp .gc.gc-all { display: flex; border-color: var(--accent); }
  .sp .gc-all .kb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; counter-reset: kb; }
  .sp .gc-all .kb-list li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; counter-increment: kb; }
  .sp .gc-all .kb-list li::before { content: counter(kb); color: var(--accent); font-weight: 800; width: 12px; flex: none; }
  .sp .gc-all .kb-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .sp .gc-all .kb-list b { margin-left: auto; color: var(--ok); font-variant-numeric: tabular-nums; }
}

/* ⓘ de las opciones de inicio (start-info.js): un renglón por opción. */
.cat-info-line { display: block; margin-top: 4px; }
.start-card .option .label .cat-info { margin-left: 6px; vertical-align: -2px; }

/* Teclado del celu (4/11/2026; common.js pone .kb-open, --vvh, --kbh, --kb-acc y --kb-sug): la página suma abajo el alto
   del teclado para poder acomodar el buscador pegado arriba de él, y las sugerencias se abren hacia arriba. */
@media (max-width: 1039px) {
  .kb-open [data-kb-fit] .suggestions { top: auto !important; bottom: 52px !important; max-height: min(220px, calc(var(--vvh, 400px) - 150px)) !important; }
}

/* Póster grande (assets/poster-zoom.js, 4/11/2026): botón ⤢ sobre el póster y la ventana. Debajo del globito ⓘ (1000). */
.poster-zoom, .cover-name-info {
  position: absolute; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(14, 17, 22, 0.82); border: 1px solid rgba(255, 255, 255, 0.25); color: var(--text); cursor: pointer;
}
.poster-zoom { top: 4px; right: 4px; }
.poster-zoom svg { width: 13px; height: 13px; }
.cover-name-info { bottom: 4px; right: 4px; margin: 0 !important; }
.pz-back { position: fixed; inset: 0; z-index: 900; background: rgba(8, 10, 13, 0.88); display: grid; place-items: center; padding: 24px; }
.pz-card { position: relative; width: min(320px, 82vw, calc((100svh - 190px) * 0.75)); text-align: center; }
.pz-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.pz-name { margin-top: 12px; font: 800 20px/1.2 var(--font-title); display: inline-flex; align-items: center; gap: 8px; }
.pz-name .cat-info { flex: none; }
.pz-close { position: absolute; top: -12px; right: -12px; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.pz-select { margin-top: 14px; width: 100%; height: 46px; }
