/* =====================================================================
   ARCANO · Estilos
   Tema: arcanos / tarot — índigo profundo, oro viejo, tipografía serif.
   ===================================================================== */

:root {
  --bg:        #0a0917;
  --bg-2:      #14112c;
  --panel:     #1b1740;
  --panel-2:   #221d49;
  --ink:       #f4eedd;
  --muted:     #a79dc4;
  --muted-2:   #7d749c;
  --gold:      #e8c06a;
  --gold-deep: #b88a35;
  --line:      rgba(232,192,106,0.16);
  --line-soft: rgba(255,255,255,0.07);
  --danger:    #e0607a;
  --ok:        #5bbd86;

  /* Colores de las 4 opciones (gemas) */
  --opt-a: #d24d6a;  /* rubí    */
  --opt-b: #4a78c9;  /* zafiro  */
  --opt-c: #e0a93c;  /* ámbar   */
  --opt-d: #9b6cc9;  /* amatista*/

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,0.7);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #2a2356 0%, transparent 60%),
    radial-gradient(900px 600px at 90% 110%, #1d2a5e 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Campo de estrellas tenue */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.2px 1.2px at 70% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.6px 1.6px at 40% 70%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.1px 1.1px at 85% 60%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1.3px 1.3px at 12% 85%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.1px 1.1px at 60% 90%, rgba(255,255,255,0.4), transparent);
  opacity: 0.6;
}

a { color: var(--gold); }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .5px; margin: 0; }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  opacity: .85;
}

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .sigil {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 20px;
  background: radial-gradient(circle at 30% 25%, rgba(232,192,106,.18), transparent 70%);
}
.brand .name { font-family: var(--serif); font-size: 24px; letter-spacing: 3px; }

/* ---------- Botones ---------- */
.btn {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #2a1d05; border: none;
  box-shadow: 0 10px 30px -12px rgba(232,192,106,.6);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: rgba(224,96,122,.35); background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 10px; }

input, select, textarea {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: rgba(0,0,0,.25);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 13px 15px;
  width: 100%;
}
input:focus, select, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
label { font-size: 13px; color: var(--muted); display: block; margin: 0 0 6px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #2a1f12; color: var(--ink);
  border: 1px solid var(--gold-deep);
  padding: 12px 18px; border-radius: 12px;
  font-size: 14px; z-index: 50; box-shadow: var(--shadow);
  max-width: 90vw; text-align: center;
}

/* =====================================================================
   JUGADOR (móvil)
   ===================================================================== */
.player-wrap {
  max-width: 460px; margin: 0 auto; padding: 22px 18px 40px;
  min-height: 100vh; display: flex; flex-direction: column;
}
.player-header { display:flex; justify-content:space-between; align-items:center; margin-bottom: 22px; }
.player-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.join-card { padding: 28px 22px; text-align: center; }
.join-card h1 { font-size: 34px; margin-bottom: 4px; }
.join-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 14px; text-align: left; }
#code-input { text-transform: uppercase; letter-spacing: .35em; text-align: center; font-size: 22px; font-weight: 700; }

.status-line { text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; min-height: 20px; }

/* Opciones (cartas de respuesta) */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.opt {
  position: relative;
  border: none; border-radius: 14px;
  min-height: 96px; padding: 14px;
  color: #fff; font-size: 17px; font-weight: 600; text-align: left;
  cursor: pointer; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .1s ease, opacity .2s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.opt .glyph { font-size: 22px; opacity: .85; }
.opt:active { transform: scale(.97); }
.opt[data-i="0"] { background: linear-gradient(160deg, var(--opt-a), #9b2f4c); }
.opt[data-i="1"] { background: linear-gradient(160deg, var(--opt-b), #2f5396); }
.opt[data-i="2"] { background: linear-gradient(160deg, var(--opt-c), #ab7a1d); color:#231a05; }
.opt[data-i="3"] { background: linear-gradient(160deg, var(--opt-d), #6f47a0); }
.opt.dim { opacity: .28; filter: grayscale(.4); }
.opt.chosen { outline: 3px solid #fff; outline-offset: 2px; }
.opt.correct { outline: 3px solid var(--ok); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(91,189,134,.25); }
.opt.is-wrong { opacity: .4; }

.q-num { color: var(--gold); font-size: 13px; letter-spacing: .15em; text-transform: uppercase; }
.q-text { font-family: var(--serif); font-size: 26px; line-height: 1.2; margin: 8px 0 4px; text-align:center; }

/* Cronómetro circular */
.timer-ring { width: 64px; height: 64px; position: relative; }
.timer-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.timer-ring .track { stroke: rgba(255,255,255,.12); }
.timer-ring .bar { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer-ring .num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums;
}

.bigstate { text-align: center; padding: 30px 18px; }
.bigstate .icon { font-size: 54px; color: var(--gold); }
.bigstate h2 { font-size: 30px; margin: 12px 0 6px; }
.bigstate p { color: var(--muted); margin: 0; }
.score-pill {
  display:inline-flex; align-items:center; gap:8px;
  background: rgba(232,192,106,.12); border:1px solid var(--line);
  color: var(--gold); padding: 8px 16px; border-radius: 999px;
  font-weight: 700; font-size: 18px; margin-top: 14px;
}
.points-pop { font-family: var(--serif); font-size: 46px; color: var(--gold); margin: 6px 0; }

/* =====================================================================
   ORNAMENTOS · fantasía, juegos de mesa y rol
   Todo va en SVG embebido (sin peticiones externas, funciona sin internet).
   Criterio: ornamento generoso en la TV y el lobby, discreto en el celular
   —ahí el jugador tiene que leer y responder contrarreloj.
   ===================================================================== */

/* El logo sustituye al sigilo + wordmark en todos los encabezados.
   Se usa el PNG negativo con transparencia: a tamaños pequeños rinde mejor
   que el SVG (cuyos trazos interiores negros se empastan). */
.brand-logo {
  display: block; height: 52px; width: auto;
  filter: drop-shadow(0 0 14px rgba(232,192,106,.18));
}
.player-header .brand-logo { height: 54px; }
.screen-top .brand-logo { height: 68px; }
.host-top .brand-logo { height: 48px; }
@media (max-width: 380px) { .player-header .brand-logo { height: 46px; } }

.login-logo {
  display: block; margin: 0 auto 20px; width: 148px; height: auto;
  filter: drop-shadow(0 0 22px rgba(232,192,106,.18));
}

/* Logo principal, protagonista del lobby en la TV */
.lobby-logo {
  display: block; margin: 0 auto 10px;
  width: min(265px, 25.3vh); height: auto;   /* 15% mas grande que los 230px/22vh iniciales */
  filter: drop-shadow(0 0 26px rgba(232,192,106,.20));
  animation: sigil-breathe 6s ease-in-out infinite;
}
@keyframes sigil-breathe {
  0%, 100% { opacity: .92; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.015); }
}

/* Filigrana en las esquinas de cada carta (diagonal, para no recargar) */
.card { position: relative; }
.card::before, .card::after {
  content: ""; position: absolute; width: 22px; height: 22px;
  pointer-events: none; opacity: .5; background-repeat: no-repeat; background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8c06a' stroke-width='1.1'%3E%3Cpath d='M1 9V1h8'/%3E%3Cpath d='M4.5 12.5V4.5h8' opacity='.55'/%3E%3Ccircle cx='2.6' cy='2.6' r='1.3' fill='%23e8c06a' stroke='none'/%3E%3C/svg%3E");
}
.card::before { top: 7px; left: 7px; }
.card::after  { bottom: 7px; right: 7px; transform: rotate(180deg); }

/* Separador rúnico: línea con un dado en el centro */
.orn-div {
  height: 16px; margin: 16px 0; background-repeat: no-repeat; background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' fill='none' stroke='%23e8c06a'%3E%3Cpath d='M6 8h64M130 8h64' stroke-width='1' opacity='.35'/%3E%3Cpath d='M100 2.5 111 8.5v.5L100 14 89 9V8.5z' stroke-width='1.1' opacity='.75'/%3E%3Cpath d='M89 8.7h22M100 2.5v11.4' stroke-width='.8' opacity='.4'/%3E%3Ccircle cx='78' cy='8' r='1.6' fill='%23e8c06a' stroke='none' opacity='.5'/%3E%3Ccircle cx='122' cy='8' r='1.6' fill='%23e8c06a' stroke='none' opacity='.5'/%3E%3C/svg%3E");
}

/* Marca de agua arcana en la pantalla de TV: un d20 enorme y tenue */
.screen-wrap { position: relative; }
.screen-wrap::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .045; background-repeat: no-repeat; background-position: center 52%;
  background-size: min(62vh, 62vw);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23e8c06a' stroke-width='1.6'%3E%3Cpath d='M50 3 94 28v44L50 97 6 72V28z'/%3E%3Cpath d='M50 3 33 44h34zM6 28l27 16M94 28 67 44M50 97 33 56h34zM6 72l27-16M94 72 67 56'/%3E%3Cpath d='M33 44h34v12H33z'/%3E%3C/svg%3E");
}
.screen-top, .screen-body { position: relative; z-index: 1; }

/* Marco arcano alrededor de la pregunta en la TV */
.screen-q {
  position: relative; padding: 10px 26px 4px;
}
.screen-q::before, .screen-q::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background-repeat: no-repeat; background-position: center; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 10' fill='none' stroke='%23e8c06a' stroke-width='1'%3E%3Cpath d='M2 5h116M182 5h116' opacity='.4'/%3E%3Cpath d='M150 1 157 5l-7 4-7-4z' fill='%23e8c06a' stroke='none' opacity='.6'/%3E%3Cpath d='M128 5h10M162 5h10' opacity='.5'/%3E%3C/svg%3E");
}
.screen-q::before { top: -4px; }
.screen-q::after  { bottom: -6px; transform: rotate(180deg); }

/* Opciones con aire de gema tallada */
.opt, .screen-opt { position: relative; overflow: hidden; }
.opt::after, .screen-opt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 42%);
}
.opt .glyph, .screen-opt .glyph { text-shadow: 0 0 12px currentColor; }

/* Destello lento en el marcador y elementos dorados */
.score-pill { position: relative; overflow: hidden; }
.score-pill::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  animation: sheen 5.5s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -45%; } 55%, 100% { left: 115%; } }

/* El código de sala, como inscripción rúnica */
.code-display { position: relative; }
.code-display::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -14px; width: 78%; height: 10px;
  background-repeat: no-repeat; background-position: center; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' fill='none' stroke='%23e8c06a' stroke-width='1'%3E%3Cpath d='M4 5h74M122 5h74' opacity='.45'/%3E%3Cpath d='M100 1.5 105 5l-5 3.5L95 5z' fill='%23e8c06a' stroke='none' opacity='.7'/%3E%3C/svg%3E");
}

/* En el celular, el ornamento se modera para no competir con la lectura */
@media (max-width: 720px) {
  .card::before, .card::after { opacity: .32; width: 17px; height: 17px; }
  .opt::after { display: none; }
}
/* Respeta a quien pide menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .lobby-logo, .score-pill::after { animation: none; }
}

/* ---- Verdadero/falso ----
   Los colores de gema (rubí/zafiro) confunden aquí: un ✓ verde sobre fondo rojo
   se lee mal. En V/F el propio botón lleva el color del significado. */
.options-bool .opt, .screen-options.options-bool .screen-opt { font-size: 1.05em; }
.opt-bool .glyph { font-size: 1.35em; }
.opt.opt-bool[data-i="0"], .screen-opt.opt-bool[data-i="0"] {
  background: linear-gradient(160deg, #3f9e6e, #24704b) !important; color: #f2fbf6;
}
.opt.opt-bool[data-i="1"], .screen-opt.opt-bool[data-i="1"] {
  background: linear-gradient(160deg, #c9506b, #8e2a44) !important; color: #fdf1f4;
}
.opt-bool .glyph { color: rgba(255,255,255,.92); }
.tag-true  { background: var(--ok) !important; color:#08210f; display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.tag-false { background: var(--danger) !important; color:#2b0812; display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.bool-label { font-weight: 600; }

/* ---- Selector de tipo de pregunta ---- */
.kind-seg { display:flex; gap:8px; flex-wrap:wrap; }
.kind-btn {
  flex:1; min-width:150px; padding:10px 12px; border-radius:12px; cursor:pointer;
  background: rgba(255,255,255,.03); border:1px solid var(--line-soft);
  color: var(--muted); font-family: var(--sans); font-size:14px; font-weight:600;
}
.kind-btn.sel { background: rgba(232,192,106,.12); border-color: var(--line); color: var(--gold); }

/* ---- GIF / imagen de la pregunta ---- */
.media-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.media-row input[type=text], .media-row #f-media { flex:1; min-width:200px; }
.media-prev { margin-top:10px; }
.media-prev img { max-height:150px; max-width:100%; border-radius:12px; border:1px solid var(--line-soft); }
.qbadge {
  display:inline-block; font-size:11px; font-weight:700; letter-spacing:.04em;
  padding:2px 7px; border-radius:999px; margin-left:6px; vertical-align:middle;
  background: rgba(232,192,106,.14); border:1px solid var(--line); color: var(--gold);
}
/* En el celular el GIF es un apoyo; en la TV es protagonista. */
.q-media-sm { margin: 10px 0 14px; text-align:center; }
.q-media-sm img { max-height: 26vh; max-width:100%; border-radius:14px; border:1px solid var(--line-soft); }
.q-media-lg { margin: 12px 0 18px; text-align:center; }
.q-media-lg img { max-height: 34vh; max-width:80%; border-radius:18px; border:1px solid var(--line); }
.screen-q.has-media h2 { font-size: clamp(28px, 3.4vw, 52px); }

/* Encabezado del jugador: marcador + salida */
.hdr-right { display:flex; align-items:center; gap:10px; }
.hdr-right .score-pill { margin-top: 0; }
.exit-btn {
  display:inline-flex; align-items:center; justify-content:center;
  width: 38px; height: 38px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-soft);
  color: var(--muted-2); font-size: 18px; line-height: 1; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.exit-btn:hover, .exit-btn:focus-visible { color: var(--gold); border-color: var(--line); }

.mini-board { margin-top: 18px; text-align: left; }
.mini-board .row {
  display:flex; align-items:center; gap:12px;
  padding: 11px 14px; border-radius: 10px; background: rgba(255,255,255,.04);
  margin-bottom: 8px;
}
.mini-board .row.me { border: 1px solid var(--gold); }
.mini-board .rk { width: 24px; color: var(--gold); font-weight: 700; font-family: var(--serif); font-size: 18px; }
.mini-board .nm { flex: 1; font-weight: 600; }
.mini-board .sc { color: var(--muted); font-variant-numeric: tabular-nums; }

/* =====================================================================
   PANTALLA GRANDE (TV / proyector)
   ===================================================================== */
.screen-wrap { min-height: 100vh; padding: 4vh 5vw; display: flex; flex-direction: column; }
.screen-top { display:flex; justify-content: space-between; align-items: center; margin-bottom: 2vh; }
.screen-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.portal { text-align: center; }
.portal .eyebrow { margin-bottom: 10px; }
.portal h1 { font-size: clamp(36px, 6vw, 86px); line-height: 1; margin-bottom: 2vh; }
.join-row { display: flex; gap: clamp(20px, 5vw, 60px); align-items: center; justify-content: center; flex-wrap: wrap; }
.code-display {
  font-family: var(--serif);
  font-size: clamp(64px, 13vw, 180px);
  letter-spacing: .08em; line-height: 1; color: var(--gold);
  text-shadow: 0 0 40px rgba(232,192,106,.35);
}
.code-label { color: var(--muted); font-size: clamp(14px,1.4vw,20px); letter-spacing: .25em; text-transform: uppercase; }
.qr-box { background:#fff; padding: 18px; border-radius: 18px; box-shadow: var(--shadow); }
.qr-box svg, .qr-box img { display:block; width: clamp(150px, 18vw, 240px); height: auto; }
.join-hint { color: var(--muted); margin-top: 3vh; font-size: clamp(15px,1.6vw,22px); }

.lobby-players { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4vh; }
.chip {
  background: var(--panel); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
  font-size: clamp(14px,1.4vw,20px);
  animation: pop .3s ease;
}
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.screen-q { text-align: center; }
.screen-q .q-meta { color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: clamp(13px,1.3vw,18px); }
.screen-q h2 { font-size: clamp(30px, 4.6vw, 68px); line-height: 1.12; margin: 2vh auto; max-width: 22ch; }
.screen-options { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px,1.6vw,22px); max-width: 1100px; margin: 2vh auto 0; }
.screen-opt {
  display:flex; align-items:center; gap: 16px;
  border-radius: 16px; padding: clamp(14px,1.8vw,26px);
  font-size: clamp(18px,2.2vw,32px); font-weight: 600; color:#fff;
  position: relative; transition: opacity .3s, transform .3s;
}
.screen-opt .glyph { font-size: clamp(22px,2.6vw,40px); }
.screen-opt[data-i="0"] { background: linear-gradient(160deg, var(--opt-a), #9b2f4c); }
.screen-opt[data-i="1"] { background: linear-gradient(160deg, var(--opt-b), #2f5396); }
.screen-opt[data-i="2"] { background: linear-gradient(160deg, var(--opt-c), #ab7a1d); color:#231a05;}
.screen-opt[data-i="3"] { background: linear-gradient(160deg, var(--opt-d), #6f47a0); }
.screen-opt .cnt { margin-left:auto; font-variant-numeric: tabular-nums; opacity:.9; }
.screen-opt.dim { opacity: .25; }
.screen-opt.correct::after {
  content: "✓"; position:absolute; right: 18px; top:50%; transform: translateY(-50%);
  font-size: clamp(24px,3vw,44px); color:#fff;
}
.screen-timer {
  font-family: var(--serif); font-variant-numeric: tabular-nums;
  font-size: clamp(40px,6vw,90px); color: var(--gold);
}
.answered-tally { color: var(--muted); font-size: clamp(16px,1.8vw,26px); margin-top: 2vh; }

.board { max-width: 760px; margin: 0 auto; width: 100%; }
.board h2 { text-align:center; font-size: clamp(32px,5vw,64px); margin-bottom: 3vh; }
.board .row {
  display:flex; align-items:center; gap: 20px;
  padding: clamp(12px,1.6vw,20px) clamp(16px,2vw,28px);
  border-radius: 14px; background: var(--panel); border:1px solid var(--line-soft);
  margin-bottom: 12px; font-size: clamp(18px,2vw,28px);
  animation: slidein .4s ease backwards;
}
.board .row:nth-child(1){animation-delay:.05s} .board .row:nth-child(2){animation-delay:.1s}
.board .row:nth-child(3){animation-delay:.15s} .board .row:nth-child(4){animation-delay:.2s}
.board .row:nth-child(5){animation-delay:.25s}
@keyframes slidein { from { opacity:0; transform: translateX(-18px);} to {opacity:1; transform:none;} }
.board .row.top { border-color: var(--gold); background: linear-gradient(90deg, rgba(232,192,106,.14), transparent); }
.board .rk { font-family: var(--serif); font-size: 1.4em; color: var(--gold); width: 1.6em; }
.board .nm { flex:1; font-weight:600; }
.board .sc { font-variant-numeric: tabular-nums; color: var(--gold); font-weight:700; }

.podium { display:flex; justify-content:center; align-items:flex-end; gap: clamp(14px,2.5vw,40px); margin-bottom: 5vh; }
.podium .col { text-align:center; }
.podium .pdname { font-family: var(--serif); font-size: clamp(20px,2.4vw,34px); margin-bottom: 10px; }
.podium .pdscore { color: var(--gold); font-weight: 700; margin-bottom: 12px; font-variant-numeric: tabular-nums;}
.podium .block {
  width: clamp(80px,11vw,150px); border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border:1px solid var(--line); border-bottom: none;
  display:grid; place-items:center; font-family: var(--serif);
  font-size: clamp(40px,6vw,90px); color: var(--gold);
}
.podium .p1 .block { height: clamp(150px,22vh,240px); border-color: var(--gold); box-shadow: 0 0 50px -10px rgba(232,192,106,.4);}
.podium .p2 .block { height: clamp(110px,16vh,180px); }
.podium .p3 .block { height: clamp(85px,12vh,140px); }

/* =====================================================================
   ANFITRIÓN (panel de control)
   ===================================================================== */
.host-shell { max-width: 1080px; margin: 0 auto; padding: 22px 20px 60px; }
.host-top { display:flex; justify-content: space-between; align-items:center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px;}
.host-nav { display:flex; gap: 8px; }
.tab { background: transparent; border: 1px solid var(--line-soft); color: var(--muted);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight:600; font-size: 14px; }
.tab.active { color: var(--ink); border-color: var(--gold); background: rgba(232,192,106,.08); }

.login-wrap { max-width: 380px; margin: 14vh auto 0; }
.login-wrap .card { padding: 30px 26px; }

.quiz-title-input { font-family: var(--serif); font-size: 22px; max-width: 480px; }

.quiz-list { display: grid; gap: 12px; }
.quiz-item { display:flex; align-items:center; flex-wrap: wrap; gap: 14px; padding: 16px 18px; }
.quiz-item .qt { flex:1; }
.quiz-item .qt .t { font-family: var(--serif); font-size: 21px; }
.quiz-item .qt .m { color: var(--muted); font-size: 13px; margin-top: 2px;}

.q-editor { display: grid; gap: 14px; }
.q-row { padding: 16px 18px; }
.q-row .q-head { display:flex; align-items:flex-start; flex-wrap: wrap; gap: 12px; }
.q-row .drag { color: var(--muted-2); cursor: grab; font-size: 18px; padding-top: 4px;}
.q-row .q-body { flex: 1; }
.q-row .q-title { font-weight: 600; margin-bottom: 4px; }
.q-row .q-opts { color: var(--muted); font-size: 14px; }
.q-row .q-opts .c { color: var(--ok); }
.q-row .q-actions { display:flex; flex-wrap: wrap; gap: 8px; }

.editor-grid { display: grid; gap: 12px; }
.opt-edit { display:flex; align-items:center; gap: 10px; }
.opt-edit input[type=radio] { width: auto; }
.opt-edit .tag { width: 22px; height:22px; border-radius:6px; flex:none; }
.row-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.live-grid { display:grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
@media (max-width: 820px){ .live-grid { grid-template-columns: 1fr; } }
.live-panel { padding: 20px; }
.live-code { font-family: var(--serif); font-size: 40px; letter-spacing:.1em; color: var(--gold); }
.live-controls { display:grid; gap: 10px; margin-top: 8px;}
.live-stat { display:flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.live-stat b { color: var(--ink); }
.status-tag { display:inline-block; padding: 4px 12px; border-radius:999px; font-size:12px; font-weight:700;
  text-transform: uppercase; letter-spacing:.1em; border:1px solid var(--line); color: var(--gold);}

.row-flex { display:flex; flex-wrap: wrap; gap: 10px; align-items:center; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.center { text-align:center; }
.mt-2 { margin-top: 14px; } .mt-3 { margin-top: 22px; }
.hidden { display: none !important; }

/* =====================================================================
   EL ANFITRIÓN DESDE EL CELULAR
   El panel se lleva en la mano durante el evento: en pantallas angostas
   las filas se apilan en vez de apretarse.
   ===================================================================== */
@media (max-width: 640px) {
  .host-shell { padding: 18px 14px 60px; }
  .quiz-item .qt { flex: 1 0 100%; }
  .q-row .q-body { flex: 1 0 100%; }
  .quiz-title-input { flex: 1 0 100%; max-width: none; }
  .row-2 { grid-template-columns: 1fr; }
}
