/* Estilos propios de ANICHOICE. Lo compartido (barra de arriba, botones, modales) está en /assets/base.css. */

.topbar-spacer { min-width: 44px; display: flex; justify-content: flex-end; }

/* ---------- inicio: compartido en /assets/base.css (.start-card, 25/10/2026) ---------- */

/* ---------- pregunta ---------- */
.prog { display: grid; gap: 4px; }
.prog i { height: 5px; border-radius: 3px; background: var(--chip); }
.prog i.ok { background: var(--ok); } .prog i.bad { background: var(--bad); } .prog i.now { background: var(--accent); }
.q-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.diff { font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px; }
.diff.l0 { background: #12302B; color: var(--ok); }
.diff.l1 { background: var(--close-bg); color: var(--close); }
.diff.l2 { background: #2E1A1C; color: var(--bad); }
.diff.l3 { background: #2E1520; color: #E2708F; }
.anime { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 0; }
.anime img { width: 132px; height: 188px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.anime-name { font-family: var(--font-title); font-weight: 700; font-size: 20px; text-align: center; line-height: 1.15; }
.anime-alt { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; margin-top: -6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.anime-alt:empty { display: none; }
.question { font-family: var(--font-title); font-weight: 800; font-size: 24px; line-height: 1.15; text-align: center; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  min-height: 52px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-align: left;
}
.opt:hover:not(:disabled) { border-color: var(--muted); }
.opt:disabled { cursor: default; opacity: 1; }
.opt .k {
  width: 24px; height: 24px; border-radius: 999px; background: var(--chip); color: var(--muted);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.opt .r { margin-left: auto; font-size: 13px; font-weight: 700; }
.opt.right { border-color: var(--ok); background: #12302B; }
.opt.right .k { background: var(--ok); color: var(--bg); } .opt.right .r { color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: #2E1A1C; }
.opt.wrong .k { background: var(--bad); color: var(--bg); } .opt.wrong .r { color: var(--bad); }
.opt.dim { opacity: 0.45; }
.fact { font-size: 13px; color: var(--text-2); line-height: 1.45; text-align: center; min-height: 19px; }

/* ---------- Villains y Lore (desde el #12, 2/11/2026; boceto mockups/anichoice/2026-10-31_2_villanos.html) ---------- */
.q-meta .tags { display: flex; gap: 6px; align-items: center; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px; }
.tag[hidden] { display: none; }
.tag.vil { background: #2E1A14; color: var(--accent); }
.tag.lore { background: #1B2633; color: #8EC5FF; }
/* Con caras: el anime en una tarjeta chica (portada a la izquierda) */
.with-faces .anime {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: 12px; row-gap: 2px;
  padding: 8px 12px 8px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.with-faces .anime img { width: 52px; height: 74px; border-radius: 6px; grid-row: 1 / 5; }
.with-faces .anime-name { font-size: 17px; text-align: left; grid-row: 2; grid-column: 2; }
.with-faces .anime-alt { text-align: left; margin-top: 0; grid-row: 3; grid-column: 2; }
.faces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.face {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-align: center; min-width: 0;
}
.face:hover:not(:disabled) { border-color: var(--muted); }
.face:disabled { cursor: default; opacity: 1; }
.face img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 7px; display: block; background: var(--surface-2); }
.face .k {
  position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 999px; background: rgba(14, 17, 22, 0.82);
  color: var(--text); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.face .nm { font-size: 14px; font-weight: 600; line-height: 1.2; min-height: 34px; display: flex; align-items: center; justify-content: center; overflow-wrap: anywhere; }
.face .al { font-size: 12px; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.face .r {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 999px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: var(--bg);
}
.face.right { border-color: var(--ok); background: #12302B; } .face.right .k { background: var(--ok); color: var(--bg); } .face.right .r { background: var(--ok); }
.face.wrong { border-color: var(--bad); background: #2E1A1C; } .face.wrong .k { background: var(--bad); color: var(--bg); } .face.wrong .r { background: var(--bad); }
.face.dim { opacity: 0.45; }
/* Celus bajos: las caras un poco más chicas para que entre todo (pregunta, caras, dato y botón) */
@media (max-height: 760px) and (max-width: 719px) {
  .with-faces .question { font-size: 21px; }
  .faces .face img { aspect-ratio: 4 / 5; }
}
.next-btn { margin-top: auto; }
.next-btn[hidden] { display: none; }

/* ---------- resultado ---------- */
.result-head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.result-line { font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.result-points { font-family: var(--font-title); font-weight: 800; font-size: 56px; line-height: 1; }
.result-points small { font-size: 24px; color: var(--muted); }
.result-calc { font-size: 12px; color: var(--muted); }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; gap: 10px; align-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); padding: 6px 10px 6px 6px; }
.row img { width: 38px; height: 54px; object-fit: cover; border-radius: 5px; flex: none; background: var(--surface-2); }
.row .b { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.row .qq { font-size: 12px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .alt { font-size: 12px; color: var(--muted); opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .a { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .y { font-size: 12px; color: var(--bad); text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; color: var(--bg); }
.row .s.ok { background: var(--ok); color: var(--bg); } .row .s.bad { background: var(--bad); color: var(--bg); }
.result-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Segunda ronda (días bonus, 29/10/2026): "Play 2nd round" va al lado de Share, para no sumar alto. */
#share-row { display: grid; gap: 8px; }
#share-row.two { grid-template-columns: 1fr 1fr; }
.round2-note { text-align: center; }
.round2-note[hidden], #round2-btn[hidden] { display: none; }
#round2-pill-start { align-self: flex-start; }
#round2-pill-start[hidden], #round2-pill-play[hidden] { display: none; }

/* ---------- estadísticas ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat-tiles div { border-radius: 10px; background: var(--surface-2); padding: 10px 2px; display: flex; flex-direction: column; align-items: center; }
.stat-tiles span { color: var(--muted); text-align: center; }
.stat-tiles b { font-family: var(--font-title); font-weight: 800; }
.stat-block { display: flex; flex-direction: column; gap: 8px; }
.bars { display: flex; flex-direction: column; gap: 5px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bar .k { width: 18px; text-align: right; color: var(--muted); flex: none; }
.bar i {
  height: 20px; border-radius: 4px; background: var(--border-strong); min-width: 22px; font-style: normal; font-weight: 700;
  font-size: 12px; display: flex; align-items: center; justify-content: flex-end; padding: 0 7px;
}
.bar i.today { background: var(--accent); color: var(--bg); }
.by-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.by-type > div { border-radius: 10px; background: var(--surface-2); padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; }
.by-type b { font-size: 13px; }
.by-type span { font-size: 12px; color: var(--muted); }
.meter { height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); }
.empty-note { font-size: 13px; color: var(--muted); }

/* ---------- resultado en el celu: una sola pantalla (Juan Cruz, 28/10/2026) ----------
   Tira de portadas con ✓ / ✕ y las respuestas en una ventana aparte ("See answers"). */
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid var(--bad); aspect-ratio: 3 / 4; background: var(--surface-2); }
.tile.ok { border-color: var(--ok); }
.strip.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; } /* Normal desde el #12: 6 preguntas */
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .m {
  position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 999px; display: flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--bad); color: var(--bg);
}
.tile.ok .m { background: var(--ok); }
#screen-result > .rows { display: none; }
#answers-modal .modal { max-width: 480px; }

/* ---------- resultado en la compu: todo en una pantalla (Juan Cruz, 28/10/2026) ----------
   Puntos y botones a la izquierda; las preguntas a la derecha (Hard: en 2 columnas de 5). */
@media (min-width: 720px) {
  .app:has(> #screen-result:not([hidden])) { max-width: 980px; }
  #screen-result:not([hidden]) {
    display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: 'head rows' 'actions rows'; gap: 16px 20px; align-items: start;
  }
  #screen-result .result-head { grid-area: head; padding-top: 8px; }
  #screen-result .rows { grid-area: rows; }
  #screen-result .result-actions { grid-area: actions; margin-top: 0; }
  .rows.many { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
}
@media (min-width: 720px) {
  .strip, .answers-btn { display: none; }
  #screen-result > .rows { display: flex; }
  #screen-result > .rows.many { display: grid; }
}

/* Celu (4/11/2026, Juan Cruz en el iPhone: "Next question" quedaba debajo del anuncio): la portada se achica según el
   alto de la pantalla (con las barras del navegador a la vista, svh) para que pregunta, opciones y Next entren. */
@media (max-width: 719px) {
  .anime img { height: clamp(90px, calc(100svh - 600px), 188px); width: auto; aspect-ratio: 132 / 188; }
}

/* Pregunta "Never got a TV anime" (4/11/2026): sin la tarjeta del anime (la portada sería la respuesta). */
#screen-play.no-anime .anime { display: none; }
