:root {
  /* Colores de Steph Visuales */
  --brand: #af1d45;      /* bordó del logo */
  --brand-dark: #7d1231;
  --accent: #f7c300;     /* amarillo del logo */
  --ink: #10191d;        /* texto oscuro de los posteos */
  --gray: #474647;       /* gris de "Agencia de marketing y diseño" */
  --bg: #1a0b12;
  --bg2: #26101a;
  --card: #361723;
  --line: #5a2539;
  --text: #fff7f9;
  --muted: #cfa9b8;
  --ok: #2bd96b;
  --bad: #ff3b5c;
  --r: 18px;
  --display: "Poppins", "Arial Black", system-ui, -apple-system, sans-serif;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  background: var(--bg);
  overscroll-behavior: none;
}
h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.15; }
h2 { font-size: 1.2rem; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 800; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea {
  font: inherit; color: var(--text); background: #0f0b1f; border: 2px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
kbd {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 4px; margin-right: 6px;
  font: 700 .75rem/1 system-ui; border-radius: 6px; background: rgba(255,255,255,.12); border-bottom: 2px solid rgba(0,0,0,.4);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row.between { justify-content: space-between; margin-top: 0; }
.row.center { justify-content: center; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 16px 0; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 14px; background: var(--card); border: 2px solid var(--line);
  font-weight: 800; font-size: 1rem; transition: transform .08s, filter .15s; user-select: none; text-align: center;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px) scale(.98); }
.btn.primary { background: var(--accent); color: var(--ink); border-color: transparent; box-shadow: 0 4px 0 #a88400; }
.btn.ok { background: var(--ok); color: #05210e; border-color: transparent; box-shadow: 0 4px 0 #168a42; }
.btn.bad { background: var(--bad); color: #fff; border-color: transparent; box-shadow: 0 4px 0 #9c1530; }
.btn.ghost { background: transparent; }
.btn.big { font-size: 1.2rem; padding: 17px 26px; }
.btn.small { font-size: .875rem; padding: 8px 12px; border-radius: 10px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .35; pointer-events: none; }
.x { width: 36px; height: 36px; border-radius: 10px; color: var(--muted); flex: none; }
.x:hover { background: rgba(255,255,255,.08); color: var(--text); }

/* Puntos de color */
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); font-weight: 700; }
.chip.off { opacity: .45; }

/* Avisos */
#toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #fff; color: var(--ink); padding: 12px 16px; border-radius: 14px; font-weight: 700;  animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s; text-align: center; }
.toast.out { opacity: 0; transform: translateY(10px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

.modal-back { position: fixed; inset: 0; background: rgba(26,11,18,.92); display: grid; place-items: center; z-index: 50; padding: 16px;  }
.modal { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 24px; width: min(640px, 100%); max-height: 90vh; overflow: auto; animation: pop .25s; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.08); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

/* ---------- Menú ---------- */
.hero { text-align: center; padding: 26px 0 8px; }
.brandmark { display: grid; justify-items: center; gap: 2px; }
.logo {
  font-family: var(--display); font-weight: 900; font-size: clamp(3.4rem, 15vw, 6.2rem); letter-spacing: -.01em; line-height: .95;
  color: var(--accent); text-shadow: 0 6px 0 var(--brand);
}
.by { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.by span { font-weight: 600; font-style: italic; color: var(--muted); font-size: 1.1rem; }
.sv-logo {
  display: block; width: clamp(150px, 42vw, 230px); aspect-ratio: 162.38 / 92.94; background: #fff;
  -webkit-mask: url(../icons/steph-visuales.svg) center / contain no-repeat; mask: url(../icons/steph-visuales.svg) center / contain no-repeat;
}
.brandmark.small .logo { font-size: 2.8rem; }
.brandmark.small .sv-logo { width: 130px; }
.brandmark.small { margin: 8px 0 18px; }
.hero p { margin: 14px 0 0; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.game-card {
  text-align: left; padding: 22px; border-radius: 22px; display: grid; gap: 6px; min-height: 170px; align-content: end;
  border: 2px solid rgba(255,255,255,.12); box-shadow: 0 8px 0 rgba(0,0,0,.35); transition: transform .12s;
}
.game-card:hover { transform: translateY(-3px); }
.game-card:active { transform: translateY(3px); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.game-card.un { background: var(--brand); color: #fff; box-shadow: 0 8px 0 var(--brand-dark); }
.game-card.sv { background: var(--accent); color: var(--ink); box-shadow: 0 8px 0 #b08b00; }
.game-card b { font-family: var(--display); font-weight: 900; font-size: 1.7rem; }
.game-card .gc-emoji { font-size: 2.6rem; }
.game-card span:last-child { font-weight: 600; opacity: .92; }

.room-block { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { background: #fff; padding: 8px; border-radius: 16px; width: 190px; height: 190px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.room-info { flex: 1; min-width: 220px; display: grid; gap: 10px; }
.code { display: flex; gap: 8px; }
.code span { font-family: var(--display); font-weight: 900; font-size: 2.6rem; width: 1.35em; text-align: center; background: #0f0b1f; border: 2px solid var(--line); border-radius: 12px; padding: 4px 0; color: var(--accent); }
.url { font-family: ui-monospace, monospace; font-size: .8rem; color: var(--muted); word-break: break-all; }
.room-status { font-weight: 700; color: var(--accent); }
.room-status.ok { color: var(--ok); }

.plist { display: grid; gap: 8px; margin-bottom: 12px; }
.prow { display: grid; grid-template-columns: 40px 1fr auto 80px auto 36px; gap: 8px; align-items: center; }
.prow .pname { border-color: color-mix(in srgb, var(--c) 50%, var(--line)); font-weight: 700; }
.prow .pscore { text-align: center; padding: 12px 6px; }
.prow kbd.empty { visibility: hidden; }
.swatch { width: 40px; height: 40px; border-radius: 50%; background: var(--c); box-shadow: 0 3px 0 var(--cd); border: 3px solid transparent; }
.swatch.on { border-color: #fff; transform: scale(1.1); }
.colors { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 18px; }
.colors .swatch { width: 48px; height: 48px; }
.net { opacity: .25; filter: grayscale(1); font-size: .9rem; }
.net.on { opacity: 1; filter: none; }

/* ---------- Barra superior ---------- */
.topbar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.topbar h1 { font-family: var(--display); font-weight: 900; font-size: clamp(1rem, 3.5vw, 1.5rem); margin: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.room-chip { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: .85rem; white-space: nowrap; }
.room-chip b { color: var(--accent); letter-spacing: .08em; }

/* ---------- Configuración ---------- */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: grid; gap: 6px; padding: 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.choice input { display: none; }
.choice.on { border-color: var(--accent); }
.choice span { color: var(--muted); font-size: .9rem; }
.files-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.file-btn { cursor: pointer; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.seg span { color: var(--muted); margin-right: 4px; }
.seg button { padding: 9px 14px; border-radius: 999px; border: 2px solid var(--line); font-weight: 700; }
.seg button.on { background: var(--accent); color: var(--ink); border-color: transparent; }
.cta-row { display: flex; justify-content: center; margin: 22px 0 8px; }

.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lv { text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); display: grid; gap: 2px; }
.lv b { font-size: .85rem; }
.lv span { color: var(--accent); font-weight: 800; font-size: .95rem; }
.lv.cur { border-color: var(--accent); background: var(--accent); color: var(--ink); transform: scale(1.05); }
.lv.cur span { color: var(--brand); }
.lv.past { opacity: .35; }

.decks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.deck {
  position: relative; text-align: left; display: grid; gap: 4px; padding: 16px; border-radius: 18px; background: var(--card);
  border: 2px solid var(--line); opacity: .55; transition: .15s;
}
.deck.on { opacity: 1; border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.deck .deck-emoji { font-size: 1.8rem; }
.deck b { font-size: 1.1rem; }
.deck span { color: var(--muted); font-size: .9rem; }
.deck small { color: var(--c); font-weight: 700; }
.deck .tick { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-weight: 900; }
.deck.on .tick { background: var(--c); border-color: var(--c); color: #111; }
.add-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.add-card textarea { grid-column: 1 / -1; resize: vertical; }
.add-card .btn { grid-column: 1 / -1; }
#pl-add select { grid-column: 1 / -1; }
.custom-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.custom-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card); border-radius: 12px; }
.custom-list li span { flex: 1; }
.custom-list em { color: var(--muted); }

/* ---------- Una Nota (anfitrión) ---------- */
.game { max-width: 1200px; margin: 0 auto; padding: 14px; padding-top: max(14px, env(safe-area-inset-top)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.un-grid { display: grid; grid-template-columns: 1fr 280px; gap: 16px; flex: 1; }
.un-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stage { flex: 1; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 18px; border-radius: 24px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.stage-icon { font-size: 4.5rem; }
.stage-icon.pulse { animation: ring .9s ease-in-out infinite; }
.stage-title { font-family: var(--display); font-weight: 900; font-size: clamp(1.8rem, 5vw, 3.2rem); }
.stage-sub { color: var(--muted); font-size: 1.15rem; }
.stage-sub b { color: var(--accent); }
.bigname {
  font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 13vw, 9rem); line-height: 1; color: var(--c); word-break: break-word;
  text-shadow: 0 6px 0 var(--cd);
}
.bigname.pop { animation: bigpop .45s cubic-bezier(.2, 1.6, .4, 1); }
.song-title { font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 5vw, 3.2rem); color: var(--accent); animation: bigpop .45s; }
.result { font-size: 1.4rem; font-weight: 800; padding: 10px 18px; border-radius: 14px; background: rgba(255,255,255,.08); }
.result.ok { background: var(--c); color: #111; text-shadow: none; }
.outs { color: var(--muted); font-weight: 600; }
.outs span { color: var(--c); text-decoration: line-through; margin: 0 4px; }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.progress.run i { animation: fill var(--dur, 1s) linear forwards; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.scores { margin: 0; align-self: start; }
.score-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; font-weight: 700; transition: .2s; }
.score-row b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; color: var(--c); }
.score-row.hot { background: color-mix(in srgb, var(--c) 30%, transparent); transform: scale(1.03); }
.score-row.out .nm { text-decoration: line-through; opacity: .5; }
.score-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pads { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 16px; }
.pad { display: grid; justify-items: center; gap: 8px; padding: 8px; touch-action: manipulation; }
.pad-cap {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 8px 0 var(--cd);
  transform: translateY(-6px); transition: transform .05s, box-shadow .05s;
}
.pad:active .pad-cap, .pad.hot .pad-cap { transform: translateY(0); box-shadow: 0 2px 0 var(--cd), 0 0 0 6px var(--bg), 0 0 0 10px var(--c); }
.pad.out .pad-cap { filter: grayscale(1) brightness(.5); }
.pad-name { font-weight: 700; font-size: .9rem; }
.pads-toggle { text-align: center; margin-top: 8px; }
.phase-buzzed .stage { background: var(--card); }

/* ---------- Sin Vueltas ---------- */
.sv-main { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 6px 0 20px; }
.sv-card { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sv-side { display: flex; flex-direction: column; gap: 16px; width: min(100%, 640px); }
@media (min-width: 900px) {
  .sv-main { flex-direction: row; justify-content: center; align-items: center; gap: 40px; flex: 1; }
  .sv-side { width: 420px; }
  .sv .card3d { width: min(440px, calc(70vh * 5 / 7)); }
}
.tie { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 24px; }
.tie .bigname { font-size: clamp(2.4rem, 9vw, 6rem); }
.tie .amp { font-size: 2rem; color: var(--muted); }
.turn { font-size: 1.3rem; padding: 10px 20px; border-radius: 999px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid var(--c); }
.turn b { color: var(--c); }
.card3d { perspective: 1400px; width: min(86vw, 440px, calc(56vh * 5 / 7)); aspect-ratio: 5 / 7; }
.card3d .inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2, .8, .25, 1); }
.card3d.flipped .inner { transform: rotateY(180deg); }
.card3d.instant .inner { transition: none; }
.card3d.deal { animation: deal .38s ease-out; }
.face { position: absolute; inset: 0; border-radius: 26px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.face.back {
  display: grid; place-items: center; border: 8px solid #fff;
  background: var(--c);
}
.back-logo { font-family: var(--display); font-weight: 900; font-size: 2.3rem; text-align: center; line-height: 1; background: #fff; color: var(--cd); padding: 16px 18px; border-radius: 16px; transform: rotate(-6deg); }
.face.front {
  transform: rotateY(180deg); background: #fff; color: var(--ink); display: flex; flex-direction: column; padding: 22px;
  border-top: 14px solid var(--c);
}
.card-deck { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--cd); }
.card-text { flex: 1; display: flex; align-items: center; font-weight: 800; line-height: 1.22; }
.card-text.xl { font-size: clamp(1.5rem, 6.5vw, 2.15rem); }
.card-text.l { font-size: clamp(1.3rem, 5.4vw, 1.75rem); }
.card-text.m { font-size: clamp(1.1rem, 4.6vw, 1.45rem); }
.card-author { font-size: .85rem; color: var(--gray); font-style: italic; min-height: 1em; padding-right: 72px; }
.card-brand { position: absolute; right: 18px; bottom: 16px; width: 64px; aspect-ratio: 162.38 / 92.94; background: var(--brand);
  -webkit-mask: url(../icons/steph-visuales.svg) center / contain no-repeat; mask: url(../icons/steph-visuales.svg) center / contain no-repeat; }
.debate { width: 100%; display: grid; gap: 12px; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side { padding: 12px; border-radius: 16px; background: var(--card); display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.side h4 { width: 100%; margin: 0 0 4px; }
.side.f { border: 2px solid var(--ok); }
.side.c { border: 2px solid var(--bad); }
.votes { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 1.05rem; }
.vote-result { display: grid; gap: 8px; }
.vbar { display: flex; height: 26px; border-radius: 99px; overflow: hidden; background: var(--card); }
.vbar i { display: block; height: 100%; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.vbar .f { background: var(--ok); }
.vbar .c { background: var(--bad); }
.vlabels { display: flex; justify-content: space-between; font-weight: 700; }

/* ---------- Ganador ---------- */
.final { text-align: center; }
.winner { padding: 20px 0 8px; }
.crown { font-size: 4rem; animation: float 2s ease-in-out infinite; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; max-width: 560px; margin: 24px auto; }
.pod { display: grid; gap: 6px; }
.pod-name { font-weight: 800; color: var(--c); overflow: hidden; text-overflow: ellipsis; }
.pod-pts { font-family: var(--display); font-weight: 900; font-size: 1.4rem; }
.pod-col { background: var(--c); border-radius: 14px 14px 4px 4px; font-family: var(--display); font-weight: 900; font-size: 2.2rem; color: rgba(0,0,0,.45); display: grid; place-items: center; animation: rise .8s cubic-bezier(.2, 1.3, .4, 1) both; }
.pod.p1 .pod-col { height: 170px; animation-delay: .6s; }
.pod.p2 .pod-col { height: 120px; animation-delay: .3s; }
.pod.p3 .pod-col { height: 90px; }
.ranking { max-width: 460px; margin: 0 auto 20px; padding: 0; list-style: none; display: grid; gap: 6px; text-align: left; }
.ranking li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--card); border-radius: 12px; font-weight: 700; }
.ranking li span { flex: 1; }
.ranking li b { color: var(--c); }

/* ---------- Jugador (celu) ---------- */
.join form { display: grid; gap: 14px; }
.join label { display: grid; gap: 6px; font-weight: 700; }
.join .lbl { font-weight: 700; margin-bottom: -6px; }
.code-input { font-family: var(--display); font-weight: 900; font-size: 2.2rem; letter-spacing: .4em; text-align: center; text-transform: uppercase; color: var(--accent); }
.join h2 { text-align: center; }
.join { max-width: 460px; }
.error { background: var(--bad); color: #fff; padding: 12px 14px; border-radius: 12px; font-weight: 700; margin-bottom: 12px; }
.center-screen { min-height: 80vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 6px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }

.pl { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); user-select: none; -webkit-user-select: none; }
.pl-top { display: flex; align-items: center; gap: 10px; font-size: 1rem; padding: 4px 2px; }
.pl-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-score { font-weight: 800; color: var(--c); }
.pl-menu { font-size: 1.4rem; width: 40px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); }
.netbar { display: none; background: var(--bad); color: #fff; border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-weight: 700; text-align: center; font-size: .9rem; }
.netbar.show { display: block; }
.pl-msg { text-align: center; font-family: var(--display); font-weight: 900; font-size: clamp(1.3rem, 6.5vw, 2rem); min-height: 1.4em; margin-top: 10px; }
.pl-hint { text-align: center; color: var(--muted); min-height: 1.4em; font-weight: 600; padding: 0 10px; }
.who { color: var(--c); }
.buzzer-stage { flex: 1; display: grid; place-items: center; padding: 10px 0; }

/* El pulsador: base negra, capuchón con relieve y brillo, se hunde al apretar. */
.buzzer {
  position: relative; width: min(86vw, 58vh, 520px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 6px var(--ink);
  touch-action: none; -webkit-touch-callout: none; transition: filter .25s;
}
.buzzer::before { /* aro */
  content: ""; position: absolute; inset: 3.2%; border-radius: 50%; background: var(--gray);
}
.buzzer::after { /* onda que late cuando está abierto */
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 8px solid var(--c); opacity: 0; pointer-events: none;
}
.buzzer .cap {
  position: absolute; inset: 7.5%; border-radius: 50%; display: grid; place-items: center;
  background: var(--c);
  box-shadow: 0 16px 0 var(--cd);
  transform: translateY(-16px);
  transition: transform .06s ease-out, box-shadow .06s ease-out, filter .25s;
}
.buzzer .lbl { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 13vw, 4.2rem); color: #fff; text-shadow: 0 3px 0 var(--cd); letter-spacing: .02em; transform: translateY(6%); }
.buzzer.down .cap { transform: translateY(-2px); box-shadow: 0 3px 0 var(--cd); }
.buzzer.s-waiting .cap { filter: saturate(.3) brightness(.45); }
.buzzer.s-waiting .lbl { font-size: clamp(1.4rem, 9vw, 2.6rem); opacity: .8; }
.buzzer.s-open::after { animation: wave 1.3s ease-out infinite; }
.buzzer.s-open .cap { animation: breathe 1.3s ease-in-out infinite; }
.buzzer.s-open.down .cap { animation: none; }
.buzzer.s-locked .cap, .buzzer.s-out .cap, .buzzer.s-result .cap { filter: grayscale(1) brightness(.5); }
.buzzer.s-won .cap, .buzzer.s-correct .cap { filter: brightness(1.15); }
.buzzer.shake { animation: shake .3s; }

.celebrate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--c); overflow: hidden; animation: celIn .35s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; }
.celebrate .rays { display: none; }
.cel-text { position: relative; background: var(--ink); border-radius: 30px; margin: 0 16px; font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 14vw, 6rem); line-height: 1; text-align: center; color: #fff; text-shadow: none; padding: 24px; animation: bigpop .5s cubic-bezier(.2, 1.6, .4, 1); }
.cel-text small { display: block; font-family: system-ui, sans-serif; font-weight: 800; font-size: 1.1rem; letter-spacing: .05em; margin: 14px 0; text-shadow: none; opacity: .95; }

.lobby { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; }
.big-hello { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 10vw, 3.5rem); }
.big-hello span { color: var(--c); }
.sv-pl { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; }
.sv-pl .card3d { width: min(84vw, calc(48vh * 5 / 7)); }
.sv-pl .turn { font-size: 1.05rem; }
.my-side { padding: 10px 16px; border-radius: 14px; font-size: 1.05rem; text-align: center; }
.my-side.favor { background: rgba(43,217,107,.18); border: 2px solid var(--ok); }
.my-side.contra { background: rgba(255,59,92,.18); border: 2px solid var(--bad); }
.vote-slot { width: 100%; max-width: 440px; display: grid; gap: 10px; }
.vote-q { text-align: center; font-weight: 800; }
.vote-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vote { padding: 16px 8px; border-radius: 18px; font-size: 2rem; display: grid; gap: 4px; border: 3px solid var(--line); background: var(--card); transition: transform .08s; }
.vote span { font-size: 1rem; font-weight: 800; }
.vote:active { transform: scale(.96); }
.vote.f.on { background: var(--ok); border-color: #fff; color: #05210e; }
.vote.c.on { background: var(--bad); border-color: #fff; }
.final-pl { text-align: center; }
.trophy { font-size: 5rem; animation: float 2s ease-in-out infinite; }

/* ---------- Animaciones ---------- */
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes bigpop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fill { from { width: 0; } to { width: 100%; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@keyframes breathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
@keyframes wave { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes celIn { from { clip-path: circle(0% at 50% 55%); } to { clip-path: circle(150% at 50% 55%); } }
@keyframes deal { from { transform: translateY(40px) rotate(-8deg) scale(.9); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes rise { from { height: 0; } }

@media (max-width: 760px) {
  .un-grid { grid-template-columns: 1fr; }
  .scores { order: 2; }
  .choice-grid, .decks, .games { grid-template-columns: 1fr; }
  .game-card { min-height: 130px; }
  .levels { gap: 4px; }
  .lv { padding: 8px 2px; }
  .lv b { font-size: .7rem; }
  .prow { grid-template-columns: 40px 1fr auto 64px 36px; }
  .prow kbd { display: none; }
  .qr { width: 150px; height: 150px; }
  .code span { font-size: 2rem; }
  .topbar .btn.small { padding: 8px 9px; }
  .stage { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* =========================================================
   Panel "pro": inicio, sala y animaciones (todo en colores planos)
   ========================================================= */
.view-enter { animation: viewIn .4s cubic-bezier(.2, .9, .3, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes chipIn { from { transform: scale(0); opacity: 0; } }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 0; } }
@keyframes logoIn { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Inicio */
.hero .logo { animation: logoIn .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.hero .by { animation: fadeUp .5s .35s both; }
.start { display: grid; gap: 14px; margin-top: 26px; }
.big-choice {
  display: flex; gap: 16px; align-items: center; text-align: left; padding: 22px; border-radius: 22px;
  text-decoration: none; animation: fadeUp .5s both; transition: transform .1s, box-shadow .1s;
}
.big-choice:nth-child(1) { animation-delay: .45s; }
.big-choice:nth-child(2) { animation-delay: .55s; }
.big-choice.host { background: var(--accent); color: var(--ink); box-shadow: 0 8px 0 #b08b00; }
.big-choice.join { background: var(--brand); color: #fff; box-shadow: 0 8px 0 var(--brand-dark); }
.big-choice:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.bc-icon { font-size: 2.2rem; flex: none; width: 64px; height: 64px; display: grid; place-items: center; background: rgba(255,255,255,.28); border-radius: 18px; }
.bc-text { display: grid; gap: 4px; }
.bc-text b { font-size: 1.5rem; font-weight: 900; }
.bc-text span { font-weight: 600; opacity: .85; line-height: 1.35; }
.how { display: grid; gap: 10px; margin: 24px 0; }
.step { display: flex; gap: 12px; align-items: center; background: var(--bg2); border-radius: 16px; padding: 12px 14px; animation: fadeUp .5s both; font-weight: 600; }
.step:nth-child(1) { animation-delay: .7s; }
.step:nth-child(2) { animation-delay: .8s; }
.step:nth-child(3) { animation-delay: .9s; }
.step i { font-style: normal; font-weight: 900; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.section-title { margin: 24px 0 0; text-align: center; font-size: 1.3rem; }
.games .game-card { animation: fadeUp .5s both; }
.games .game-card:nth-child(2) { animation-delay: .1s; }
.game-card .gc-emoji { display: inline-block; animation: float 2.4s ease-in-out infinite; }

/* Sala */
.room-panel .qr { animation: fadeUp .5s both; }
.code span { animation: flipIn .5s both; }
.code span:nth-child(2) { animation-delay: .08s; }
.code span:nth-child(3) { animation-delay: .16s; }
.code span:nth-child(4) { animation-delay: .24s; }
.room-count { font-weight: 700; color: var(--muted); }
.room-count b { color: var(--ok); font-size: 1.3rem; }
.chip.pop-in { animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.kick { margin-left: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: .7rem; line-height: 1; }
.waiting-dots i, .dots i { font-style: normal; animation: blink 1.2s infinite; }
.waiting-dots i:nth-child(2), .dots i:nth-child(2) { animation-delay: .2s; }
.waiting-dots i:nth-child(3), .dots i:nth-child(3) { animation-delay: .4s; }

/* Una Nota: panel */
.stage { position: relative; transition: background .2s, border-color .2s; }
.stage-icon.float { animation: float 2s ease-in-out infinite; }
.stage.counting { background: var(--brand); border-color: var(--brand); }
.count-num { font-family: var(--display); font-weight: 900; font-size: clamp(6rem, 30vw, 12rem); line-height: 1; color: var(--accent); animation: countPop .75s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes countPop { 0% { transform: scale(2.2); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .9; } }
.open-title { color: var(--accent); animation: openPulse .7s ease-in-out infinite alternate; }
@keyframes openPulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.eq { display: flex; gap: 6px; align-items: flex-end; height: 72px; }
.eq i { width: 12px; height: 12px; border-radius: 6px; background: var(--accent); animation: eq .45s ease-in-out infinite alternate paused; }
.eq i:nth-child(even) { background: #fff; }
.eq i:nth-child(3n) { animation-duration: .35s; }
.eq i:nth-child(4n) { animation-duration: .55s; }
.eq i:nth-child(5n) { animation-duration: .3s; }
.stage.playing .eq i, .stage.manual .eq i { animation-play-state: running; }
@keyframes eq { from { height: 10px; } to { height: 72px; } }
.stage.hit { background: var(--c); border-color: var(--c); animation: hitIn .35s cubic-bezier(.2, 1.4, .4, 1); }
.stage.hit .bigname { color: #fff; text-shadow: 0 6px 0 var(--cd); }
.stage.hit .stage-sub, .stage.hit .stage-sub b { color: #fff; }
.hit-label { font-weight: 900; letter-spacing: .25em; color: #fff; opacity: .85; animation: fadeUp .3s both; }
.bigname.slam, .song-title { animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes slam { 0% { transform: scale(3); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1); } }
@keyframes hitIn { 0% { transform: scale(.96); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
.result { animation: fadeUp .4s .2s both; }
.floater { position: absolute; top: 38%; left: 50%; font-family: var(--display); font-weight: 900; font-size: 4.5rem; color: var(--ok); animation: floatUp 1.5s ease-out forwards; pointer-events: none; }
@keyframes floatUp { 0% { transform: translate(-50%, 20px) scale(.6); opacity: 0; } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.2); } 100% { transform: translate(-50%, -130px) scale(1); opacity: 0; } }
.wrong-x { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10rem; color: var(--bad); font-weight: 900; animation: xOut .9s ease-out forwards; pointer-events: none; }
@keyframes xOut { 0% { transform: scale(.4); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.stage.shake { animation: shake .4s; }
.lv.cur { animation: chipIn .4s cubic-bezier(.2, 1.6, .4, 1); }
.btn.grow { flex: 1 1 auto; }
.scores { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.score-row { grid-template-columns: 22px 12px 1fr auto; }
.score-row .pos { font-weight: 900; color: var(--muted); }
.score-row.offline { opacity: .45; }
.score-row.bump { animation: bump .7s cubic-bezier(.2, 1.6, .4, 1); background: color-mix(in srgb, var(--c) 30%, transparent); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Una Nota: celu del jugador */
.buzzer.s-count .cap { filter: saturate(.5) brightness(.6); }
.buzzer.s-count .lbl { font-size: clamp(5rem, 32vw, 9rem); }
.buzzer .lbl.pop { animation: countPop .7s both; }
.buzzer.s-open .lbl { animation: openPulse .6s ease-in-out infinite alternate; }
.pl-msg.pop { animation: msgPop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes msgPop { from { transform: scale(.6); opacity: 0; } }

/* Suspenso antes del ganador */
.suspense { min-height: 80vh; display: grid; place-content: center; text-align: center; gap: 24px; }
.suspense-text { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 8vw, 4rem); color: var(--accent); animation: fadeUp .5s both; }
.drum { font-size: 5rem; animation: drum .1s infinite alternate; }
@keyframes drum { from { transform: rotate(-8deg); } to { transform: rotate(8deg) scale(1.08); } }

/* Sin Vueltas */
.turn.turn-in { animation: turnIn .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes turnIn { from { transform: translateY(-20px) scale(.8); opacity: 0; } }
@keyframes deal { from { transform: translateX(-60%) rotate(-18deg) scale(.85); opacity: 0; } }

/* Panel en el celu del anfitrión */
@media (max-width: 760px) {
  .un .stage { min-height: 44vh; }
  .un .controls { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: 10px 0 max(10px, env(safe-area-inset-bottom)); }
  .un .controls .btn.grow { flex: 1 1 100%; }
  .un.phase-buzzed .controls .btn.grow { flex: 1 1 40%; }
  .un .lv b { font-size: .62rem; }
  .bc-text b { font-size: 1.3rem; }
}

/* Íconos planos */
.bc-icon svg, .gc-emoji svg { width: 40px; height: 40px; display: block; }
.big-choice.host .bc-icon { color: var(--ink); --icon-bg: var(--accent); background: rgba(255,255,255,.35); }
.big-choice.join .bc-icon { color: #fff; background: rgba(255,255,255,.18); }
.game-card .gc-emoji { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.2); }
.game-card .gc-emoji svg { width: 34px; height: 34px; }

/* Ajustes 3 */
.btn.small { white-space: nowrap; }
.stage-icon svg { width: 84px; height: 84px; color: var(--accent); }
.crown { color: var(--accent); }
.crown svg { width: 84px; height: 84px; }
.trophy svg { width: 110px; height: 110px; }
.trophy.gold { color: var(--accent); }
.trophy .place { display: inline-grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 900; font-size: 3rem; }
.bounce { display: flex; gap: 14px; justify-content: center; }
.bounce i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); animation: bounce .6s ease-in-out infinite alternate; }
.bounce i:nth-child(2) { background: var(--brand); animation-delay: .15s; }
.bounce i:nth-child(3) { background: #fff; animation-delay: .3s; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-26px); } }
.lbl-icon { display: block; width: 32%; margin: 0 auto; color: #fff; font-style: normal; }
.lbl-icon svg { width: 100%; height: auto; display: block; }
.vote-mark { font-style: normal; font-weight: 900; font-size: 2.2rem; line-height: 1; }
.deck-emoji { width: 28px; height: 28px; border-radius: 8px; background: var(--c); display: block; }
.lobby .brandmark.small { margin-bottom: 10px; }
/* Estados del pulsador en colores planos (sin filtros borrosos) */
.buzzer.s-waiting .cap, .buzzer.s-count .cap { filter: none; background: var(--cd); box-shadow: 0 16px 0 #0b0f12; }
.buzzer.s-waiting .lbl { opacity: 1; color: rgba(255,255,255,.75); text-shadow: none; }
.buzzer.s-count .lbl { color: #fff; text-shadow: none; }
.buzzer.s-locked .cap, .buzzer.s-out .cap, .buzzer.s-result .cap { filter: none; background: #4a4a4c; box-shadow: 0 16px 0 #2a2a2b; }
.buzzer.s-locked .lbl, .buzzer.s-out .lbl, .buzzer.s-result .lbl { color: #fff; text-shadow: none; }
.buzzer.s-won .cap, .buzzer.s-correct .cap { filter: none; }
@media (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr auto; row-gap: 8px; }
  .topbar h1 { grid-column: 1 / -1; grid-row: 2; font-size: 1.3rem; }
  .topbar .top-right { grid-column: 3; grid-row: 1; }
  .room-block { justify-content: center; }
}
/* Ajustes 4 */
.floater { top: 6%; }
.cel-text small { font-family: inherit; }
.final-pl .ranking { width: 100%; }
@media (max-width: 760px) {
  .room-info { justify-items: center; text-align: center; }
  .room-info .chips { justify-content: center; }
}

/* =========================================================
   Pantalla de carga épica + logo (pulsador con rayo)
   ========================================================= */
#splash {
  position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden; color: var(--text);
}
.no-splash #splash { display: none; }
#splash.out { animation: spOut .6s cubic-bezier(.6, 0, .4, 1) forwards; }
@keyframes spOut { to { opacity: 0; transform: scale(1.25); visibility: hidden; } }
.sp-flash { position: absolute; inset: 0; background: var(--accent); opacity: 0; pointer-events: none; animation: spFlash .5s .62s ease-out; }
@keyframes spFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
.sp-center { display: grid; justify-items: center; gap: 6px; animation: spShake .4s .62s; }
@keyframes spShake { 0%, 100% { transform: none; } 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); } }
#splash .mark { width: min(46vw, 230px); height: auto; overflow: visible; }

/* Partes del logo (sirven para el splash y para la versión chica) */
.mark .mk-badge { transform-origin: 100px 105px; }
.mark .mk-bolt { transform-origin: 100px 100px; }
.mark .mk-rings circle { fill: none; stroke: var(--accent); stroke-width: 6; transform-origin: 100px 100px; opacity: 0; }
.mark .mk-rings circle:nth-child(2) { stroke: var(--brand); }
.mark .mk-spark path { transform-box: fill-box; transform-origin: center; }

#splash .mk-badge { animation: mkBadgeIn .55s cubic-bezier(.2, 1.6, .4, 1) both; }
#splash .mk-bolt { animation: mkStrike .32s .3s cubic-bezier(.7, 0, .9, .5) both, mkZap 1.4s 1.2s ease-in-out infinite; }
#splash .mk-rings circle { animation: mkRing 1.6s .62s ease-out infinite; }
#splash .mk-rings circle:nth-child(2) { animation-delay: 1.1s; }
#splash .mk-rings circle:nth-child(3) { animation-delay: 1.6s; }
#splash .mk-spark path { animation: mkSpark 1.2s .7s ease-in-out infinite both; }
#splash .mk-spark path:nth-child(2) { animation-delay: .95s; }
#splash .mk-spark path:nth-child(3) { animation-delay: 1.2s; }
@keyframes mkBadgeIn { 0% { transform: scale(0) rotate(-140deg); } 100% { transform: none; } }
@keyframes mkStrike { 0% { transform: translate(60px, -260px) scale(1.4); opacity: 0; } 70% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes mkZap { 0%, 100% { transform: none; } 46% { transform: none; } 50% { transform: scale(1.08) rotate(-4deg); } 54% { transform: none; } }
@keyframes mkRing { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes mkSpark { 0%, 100% { transform: scale(0) rotate(0); } 50% { transform: scale(1.2) rotate(90deg); } }

.sp-title { display: flex; gap: 2px; margin-top: 18px; font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 15vw, 5.6rem); line-height: 1; color: var(--accent); text-shadow: 0 6px 0 var(--brand); }
.sp-title span { display: inline-block; animation: spLetter .55s cubic-bezier(.2, 1.7, .4, 1) both; }
.sp-title span:nth-child(1) { animation-delay: .85s; }
.sp-title span:nth-child(2) { animation-delay: .93s; }
.sp-title span:nth-child(3) { animation-delay: 1.01s; }
.sp-title span:nth-child(4) { animation-delay: 1.09s; }
.sp-title span:nth-child(5) { animation-delay: 1.17s; }
.sp-title span:nth-child(6) { animation-delay: 1.25s; }
@keyframes spLetter { 0% { transform: translateY(-120px) rotate(-20deg) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sp-by { display: flex; align-items: center; gap: 10px; animation: fadeUp .5s 1.45s both; }
.sp-by span { font-weight: 600; font-style: italic; color: var(--muted); }
.sp-by .sv-logo { width: 170px; }
.sp-bottom { position: absolute; bottom: max(40px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(70vw, 320px); display: grid; gap: 10px; text-align: center; animation: fadeUp .4s .5s both; }
.sp-bar { height: 10px; border-radius: 99px; background: var(--card); overflow: hidden; }
.sp-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; animation: spBar 2.4s .3s cubic-bezier(.3, .1, .3, 1) forwards; }
@keyframes spBar { 0% { width: 0; } 60% { width: 72%; } 100% { width: 100%; } }
.sp-tip { color: var(--muted); font-weight: 600; font-size: .95rem; }

/* Logo chico en el inicio y en la espera: siempre vivo */
.mark-mini { width: 92px; height: 92px; overflow: visible; margin-bottom: 4px; }
.mark-mini .mk-badge { animation: mkBadgeIn .6s cubic-bezier(.2, 1.6, .4, 1) both, float 3s .6s ease-in-out infinite; }
.mark-mini .mk-bolt { animation: mkStrike .3s .35s cubic-bezier(.7, 0, .9, .5) both, mkZap 2.2s 1s ease-in-out infinite; }
.mark-mini .mk-rings circle { animation: mkRing 2.4s .7s ease-out infinite; }
.mark-mini .mk-rings circle:nth-child(2) { animation-delay: 1.5s; }
.mark-mini .mk-rings circle:nth-child(3) { display: none; }
.mark-mini .mk-spark path { animation: mkSpark 1.6s .8s ease-in-out infinite both; }
.mark-mini .mk-spark path:nth-child(2) { animation-delay: 1.3s; }
.mark-mini .mk-spark path:nth-child(3) { animation-delay: 1.8s; }
.brandmark.small .mark-mini { width: 64px; height: 64px; }

/* Avatares */
.avatar { --size: 28px; width: var(--size); height: var(--size); border-radius: 50%; background: var(--c); display: inline-grid; place-items: center; overflow: hidden; flex: none; color: #fff; font-weight: 900; font-size: calc(var(--size) * .48); line-height: 1; box-shadow: 0 0 0 3px var(--bg); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar b { text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.avatar.xs { --size: 22px; box-shadow: none; }
.avatar.sm { --size: 30px; }
.avatar.md { --size: 48px; }
.avatar.lg { --size: 96px; box-shadow: 0 0 0 5px var(--c); }
.avatar.xl { --size: 140px; box-shadow: 0 0 0 6px #fff; animation: avPop .55s cubic-bezier(.2, 1.7, .4, 1) both; }
@keyframes avPop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: none; } }
.chip .avatar.xs { margin-left: -4px; }
.colors .av-pick { border-radius: 50%; padding: 3px; border: 3px solid transparent; transition: transform .12s; }
.colors .av-pick.on { border-color: #fff; transform: scale(1.12); }
.colors .av-pick .avatar { --size: 52px; box-shadow: none; }
.stage.hit .avatar.xl { margin-bottom: 6px; }
.cel-text .avatar.xl { display: grid; margin: 0 auto 12px; }
.lobby .avatar.lg { animation: avPop .6s cubic-bezier(.2, 1.7, .4, 1) both, float 3s .6s ease-in-out infinite; }
.pod .avatar { justify-self: center; }
.turn { display: inline-flex; align-items: center; gap: 10px; }

/* Vos también jugás (Sin Vueltas) */
.host-play { display: grid; gap: 12px; }
.host-play .row { margin-top: 0; }
.toggle { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.toggle input { display: none; }
.toggle .sw { width: 52px; height: 30px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); position: relative; transition: background .15s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + .sw { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .sw::after { transform: translateX(22px); background: var(--ink); }
.host-vote { display: grid; gap: 8px; }
.host-vote .vote-btns .vote { padding: 10px 8px; font-size: 1.4rem; }

.score-row { grid-template-columns: 22px 26px 1fr auto; }
.pl-av { display: inline-flex; }
.me-av { display: grid; place-items: center; min-height: 100px; }
.pl-msg .avatar { vertical-align: middle; }

.avatar b { color: #fff !important; }

/* =========================================================
   Opciones, Fondo Blanco, ruleta, equipos, TV y noche
   ========================================================= */
.opt-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 12px 0; }
.opt-row > span { color: var(--muted); font-weight: 600; min-width: 150px; }
.opt-row .seg { width: auto; }

/* Interruptor Fondo Blanco en el menú */
.fb-toggle {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 18px; margin: 16px 0;
  border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 8px 0 #c9c3c6; transition: transform .1s;
}
.fb-toggle:active { transform: translateY(5px); box-shadow: 0 3px 0 #c9c3c6; }
.fb-toggle .fb-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.fb-toggle .fb-ico svg { width: 34px; height: 34px; }
.fb-toggle .bc-text { flex: 1; }
.fb-toggle .bc-text span { opacity: .75; }
.sw-big { width: 62px; height: 36px; border-radius: 99px; background: #d9d4d6; position: relative; flex: none; transition: background .15s; }
.sw-big::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.15); transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.fb-toggle.on { background: var(--ink); color: #fff; box-shadow: 0 8px 0 #000; }
.fb-toggle.on .fb-ico { background: #fff; color: var(--ink); }
.fb-toggle.on .sw-big { background: var(--accent); }
.fb-toggle.on .sw-big::after { transform: translateX(26px); }
.age-gate { text-align: center; display: grid; gap: 10px; }
.age-ico { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.age-ico svg { width: 50px; height: 50px; }

.fb-tag { display: inline-block; font-weight: 900; letter-spacing: .14em; font-size: .72rem; padding: 4px 10px; border-radius: 99px; background: #fff; color: var(--ink); }
.fb-mini { display: inline-block; vertical-align: middle; margin-left: 8px; font-size: .6rem; letter-spacing: .12em; font-family: system-ui, sans-serif; padding: 3px 8px; border-radius: 99px; background: #fff; color: var(--ink); }
.fb-badge { font-weight: 900; font-size: .75rem; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--ink); }
.fb-badge.soft { background: var(--card); color: var(--accent); }
.fb-badge.sudden, .sudden-banner { background: var(--bad); color: #fff; }
.sudden-banner { font-weight: 900; letter-spacing: .08em; padding: 8px 16px; border-radius: 12px; animation: openPulse .6s ease-in-out infinite alternate; text-align: center; margin: 6px auto; width: fit-content; }
.card-count { text-align: center; color: var(--muted); font-weight: 700; }
.fb-rules-panel ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.fb-rules-panel h2 { display: flex; gap: 10px; align-items: center; }

/* Marcador de shots */
.fb-board { margin-top: 16px; background: #fff; color: var(--ink); border-radius: var(--r); padding: 14px; }
.fb-board-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.fb-board-head .fb-tag { background: var(--ink); color: #fff; }
.fb-board-head .btn { margin-left: auto; background: var(--ink); color: #fff; border-color: transparent; }
.fb-board .muted { color: #6c6468; }
.fb-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.fb-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #f4f1f2; }
.fb-row .avatar { box-shadow: none; }
.fb-row .nm { flex: 1; font-weight: 800; line-height: 1.1; min-width: 0; }
.fb-row .nm small { display: block; font-weight: 600; color: #7a7276; font-size: .72rem; }
.fb-n { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--brand); }
.fb-shield { background: var(--ink); color: #fff; font-weight: 900; font-size: .75rem; border-radius: 8px; padding: 2px 6px; }
.fb-shield::before { content: "ESC "; letter-spacing: .05em; opacity: .7; }
.fb-rules { margin-top: 10px; display: grid; gap: 6px; }
.fb-rulei { background: var(--accent); border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.fb-rulei b { margin-right: 6px; }

/* Overlay de Fondo Blanco (elegir, ruleta, evento) */
.fb-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(16,25,29,.88); display: grid; place-items: center; padding: 16px; overflow: auto; animation: fadeUp .25s; }
.fb-card { width: min(560px, 100%); background: var(--bg2); border: 2px solid #fff; border-radius: 26px; padding: 22px; text-align: center; display: grid; gap: 14px; justify-items: center; animation: chipIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.fb-card h2 { margin: 0; font-size: 1.4rem; }
.ev-name { font-family: var(--display); font-weight: 900; font-size: clamp(1.8rem, 7vw, 3rem); color: var(--accent); line-height: 1; animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.ev-prot { display: flex; align-items: center; gap: 8px; }
.ev-text { margin: 0; font-size: 1.15rem; font-weight: 600; }
.ev-summary { background: var(--accent); color: var(--ink); font-weight: 900; padding: 10px 16px; border-radius: 14px; animation: chipIn .35s cubic-bezier(.2, 1.6, .4, 1); }
.fb-reto { background: #fff; color: var(--ink); font-weight: 800; padding: 12px 16px; border-radius: 14px; font-size: 1.1rem; }
.fb-pick { display: grid; gap: 10px; width: 100%; }
.fb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; width: 100%; }
.fb-opt { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--card); border: 3px solid transparent; font-weight: 800; transition: transform .1s; }
.fb-opt:active { transform: scale(.95); }
.fb-opt.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, var(--card)); }
.fb-wait { display: flex; gap: 10px; align-items: center; color: var(--muted); font-weight: 700; }
.fb-rule { display: flex; gap: 8px; width: 100%; }
.fb-duel { display: flex; align-items: center; gap: 14px; }
.fb-duel .vs { font-family: var(--display); font-weight: 900; font-size: 2rem; color: var(--accent); }
.fb-duel-msg { font-weight: 800; }
.fb-duel-msg.s-open { font-family: var(--display); font-size: 3rem; color: var(--accent); animation: openPulse .3s ease-in-out infinite alternate; }

/* Ruleta */
.roulette { gap: 6px; }
.wheel-wrap { position: relative; width: min(78vw, 360px); aspect-ratio: 1; margin: 6px auto; }
.wheel-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid #fff; z-index: 2; }
.wheel { position: absolute; inset: 0; border-radius: 50%; border: 8px solid #fff; animation: spinW var(--dur) cubic-bezier(.12, .7, .15, 1) both; transform: rotate(var(--end)); }
@keyframes spinW { from { transform: rotate(0deg); } to { transform: rotate(var(--end)); } }
.wl { position: absolute; left: 50%; top: 0; height: 50%; width: 0; transform-origin: bottom center; display: flex; justify-content: center; }
.wl i { font-style: normal; font-weight: 900; font-size: clamp(.55rem, 2.2vw, .8rem); color: #fff; writing-mode: vertical-rl; transform: rotate(180deg); margin-top: 14px; max-height: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl.dark i { color: var(--ink); }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--ink); border: 5px solid #fff; }

/* Avisos flotantes (shots) */
#fx { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(94vw, 460px); pointer-events: none; }
.fx-banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: #fff; color: var(--ink); border-left: 10px solid var(--c); animation: fxIn .45s cubic-bezier(.2, 1.6, .4, 1); transition: opacity .35s, transform .35s; }
.fx-banner > div { flex: 1; display: grid; }
.fx-banner b { font-size: 1.05rem; }
.fx-banner small { color: #6c6468; font-weight: 600; }
.fx-banner .avatar { box-shadow: none; }
.fx-ico svg { width: 30px; height: 30px; color: var(--ink); }
.fx-banner.out { opacity: 0; transform: translateY(-14px); }
@keyframes fxIn { from { transform: translateY(-30px) scale(.8); opacity: 0; } }

/* Celu: ¡SHOT! a pantalla completa */
.shot-hit { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: #fff; color: var(--ink); animation: celIn .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .35s; }
.shot-hit.shield { background: var(--accent); }
.shot-hit.out { opacity: 0; }
.sh-inner { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 20px; }
.sh-ico svg { width: 110px; height: 110px; animation: shotShake .5s ease-in-out infinite alternate; }
@keyframes shotShake { from { transform: rotate(-10deg); } to { transform: rotate(10deg) scale(1.06); } }
.sh-big { font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 14vw, 5rem); line-height: 1; color: var(--brand); animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.shield .sh-big { color: var(--ink); }
.sh-why { font-weight: 800; font-size: 1.1rem; }

/* Celu: capa de Fondo Blanco (elegir, duelo, ruleta) */
#fb-layer { position: fixed; inset: 0; z-index: 110; background: rgba(16,25,29,.94); display: grid; place-items: center; padding: 16px; overflow: auto; }
.fbl-card { width: min(460px, 100%); background: var(--bg2); border: 2px solid #fff; border-radius: 24px; padding: 20px; display: grid; gap: 12px; justify-items: center; text-align: center; animation: chipIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.fbl-card h2 { margin: 0; }
.fbl-card .buzzer { width: min(70vw, 300px); }
.spin-ico .mark-mini { width: 120px; height: 120px; animation: spin 1s linear infinite; }

/* Tiempo para responder */
.answer-timer { display: grid; justify-items: center; gap: 2px; color: #fff; }
.answer-timer b { font-family: var(--display); font-weight: 900; font-size: 3rem; line-height: 1; }
.answer-timer span { font-weight: 700; opacity: .9; }
.at-bar { width: min(280px, 70%); height: 10px; border-radius: 99px; background: rgba(0,0,0,.25); overflow: hidden; margin-top: 4px; }
.at-bar i { display: block; height: 100%; width: 100%; background: #fff; transition: width .1s linear; }
.answer-timer.urgent b { animation: openPulse .25s ease-in-out infinite alternate; }
.cel-timer { position: absolute; bottom: 12%; left: 0; right: 0; text-align: center; font-family: var(--display); font-weight: 900; font-size: 2rem; color: #fff; }
.cel-timer.urgent { color: var(--ink); }

/* Equipos */
.team-row { border-radius: 14px; padding: 10px; margin-bottom: 8px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.team-row.out { opacity: .45; }
.team-head { display: flex; align-items: center; gap: 8px; }
.team-name { flex: 1; font-size: 1.1rem; }
.team-pts { font-family: var(--display); font-size: 1.5rem; color: var(--c); }
.team-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tm { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; padding: 3px 8px 3px 3px; border-radius: 99px; background: rgba(255,255,255,.07); }
.tm.hot { background: var(--c); color: #111; }
.tm small { color: var(--muted); }
.team-tag { font-weight: 900; padding: 6px 14px; border-radius: 99px; background: #fff; color: var(--ink); border: 3px solid var(--c); }
.pl-team { color: var(--c); font-weight: 900; }

/* Pulsador propio del anfitrión */
.host-pad { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px; border-radius: 20px; background: var(--bg2); border: 2px dashed var(--c); }
.hp-label { font-weight: 800; color: var(--c); }
.buzzer.mini { width: 120px; }
.buzzer.mini .lbl { font-size: 1.2rem; }
.buzzer.mini .cap { transform: translateY(-8px); box-shadow: 0 8px 0 var(--cd); }
.buzzer.mini.down .cap { transform: translateY(-1px); box-shadow: 0 2px 0 var(--cd); }

/* Vista privada */
.private-view { position: fixed; inset: 0; z-index: 150; background: var(--ink); display: grid; place-items: center; padding: 20px; animation: celIn .3s ease-out; transition: opacity .25s; }
.private-view.out { opacity: 0; }
.pv-inner { width: min(460px, 100%); display: grid; gap: 14px; text-align: center; }
.pv-head { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--accent); font-weight: 800; }
.pv-head svg { width: 22px; height: 22px; }
.pv-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 18px; font-weight: 800; font-size: 1.2rem; margin: 0; }
.private-btn { width: 100%; background: var(--ink); border-color: var(--accent); }

/* Menú: TV y noche */
.big-choice.tvc { background: #fff; color: var(--ink); box-shadow: 0 8px 0 #c9c3c6; }
.big-choice.tvc .bc-icon { background: var(--ink); color: #fff; }
.big-choice:nth-child(3) { animation-delay: .65s; }
.tv-hint { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--card); font-size: .9rem; }
.tv-hint svg { width: 28px; height: 28px; flex: none; color: var(--accent); }
.night-panel h2 { margin: 0; }
.night-rank { max-width: none; margin: 10px 0 0; }
.shots-mini { color: var(--muted); font-weight: 700; margin-right: 8px; }
.night .winner .avatar.xl, .final .winner .avatar.xl { margin: 0 auto 8px; display: grid; }
.night-head { text-align: center; margin: 10px 0; }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.award { display: grid; justify-items: center; gap: 6px; padding: 16px 10px; border-radius: 18px; background: var(--card); border: 3px solid var(--c); text-align: center; animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i, 0) * 120ms + .3s); }
.award-title { font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.award small { color: var(--muted); font-weight: 700; }
.center-chips { justify-content: center; margin-top: 10px; }
.night-pl { text-align: center; }
.pl-shots { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; }
.pl-shots svg { width: 18px; height: 18px; color: #fff; }
.pl-shield { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; color: var(--accent); }
.pl-shield svg { color: var(--accent); width: 16px; height: 16px; }
.fb-on-tag { display: inline-block; margin: 14px auto; font-weight: 900; letter-spacing: .12em; padding: 8px 16px; border-radius: 99px; background: #fff; color: var(--ink); }

/* ---------- Pantalla de TV ---------- */
html:has(body.tv-mode) { font-size: clamp(16px, 1.3vw, 30px); }
.tv-mode #app { min-height: 100vh; }
.tv-root { min-height: 100vh; padding: 2vh 2.5vw; position: relative; }
.tv-status { position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); color: var(--muted); font-weight: 700; }
.tv-unlock { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--ink); font-weight: 900; padding: 14px 22px; border-radius: 99px; z-index: 5; animation: openPulse .8s ease-in-out infinite alternate; }
.tv-wait, .tv-lobby { min-height: 92vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px; }
.tv-lobby .room-block { justify-content: center; }
.tv-lobby .qr { width: 26vh; height: 26vh; }
.tv-lobby .code span { font-size: 3.4rem; }
.night-mini { width: min(700px, 90vw); }
.tv-head { display: flex; align-items: center; gap: 16px; margin-bottom: 1.5vh; font-size: 1.3rem; }
.tv-head b { font-family: var(--display); font-weight: 900; color: var(--accent); font-size: 1.8rem; }
.tv-head .card-count, .tv-head .sudden-banner { margin: 0; }
.tv-un .un-grid { grid-template-columns: 1fr 32%; }
.tv-un .stage { min-height: 60vh; }
.tv-un .bigname { font-size: 8rem; }
.tv-sv .card3d { width: min(32vw, calc(70vh * 5 / 7)); }
.tv-final, .tv-night { max-width: 1400px; }

/* Elegir avatar */
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px; border-radius: 14px; background: #0f0b1f; }
.av-opt { aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid transparent; padding: 0; transition: transform .12s; }
.av-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-opt.on { border-color: var(--accent); transform: scale(1.08); box-shadow: 0 0 0 3px var(--bg); }
.host-play .lbl { font-weight: 700; margin-top: 4px; }
.colors .av-pick .avatar { --size: 40px; }
.colors { gap: 8px; }
.avatar { box-shadow: 0 0 0 2px var(--c); }
.avatar.xl { box-shadow: 0 0 0 6px var(--c); }
.avatar.lg { box-shadow: 0 0 0 5px var(--c); }
.colors .av-pick .avatar { box-shadow: none; }
.av-grid { grid-template-columns: repeat(auto-fill, 56px); grid-auto-rows: 56px; justify-content: center; align-content: start; }
.av-opt { width: 56px; height: 56px; aspect-ratio: auto; }

.login form.shake { animation: shake .4s; }
.landing .section-title { margin-top: 18px; }
/* Ranking: el avatar no se estira y la lista ocupa todo el ancho en el celu */
.ranking li .avatar { flex: none; }
.ranking li > span:not(.avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking li { gap: 12px; padding: 12px 14px; font-size: 1.05rem; }
.ranking li .avatar.xs { --size: 34px; }
.ranking li b { font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.ranking li.me { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, var(--card)); }
.pl > .wrap { width: 100%; }
.final-pl .ranking, .night-pl .ranking { width: 100%; max-width: 460px; }
.final-pl h2, .night-pl h2 { margin: 10px 0 16px; }

.fb-help { margin: 0; color: var(--muted); font-weight: 600; font-size: .95rem; max-width: 380px; }

/* =========== Minijuegos de Sin Vueltas =========== */
.mini { width: min(640px, 100%); margin: 10px auto; background: var(--bg2); border: 2px solid var(--accent); border-radius: 26px; padding: 20px; display: grid; gap: 12px; justify-items: center; text-align: center; animation: chipIn .45s cubic-bezier(.2, 1.4, .4, 1); }
.mini-name { font-family: var(--display); font-weight: 900; font-size: clamp(1.8rem, 8vw, 2.8rem); color: var(--accent); line-height: 1; animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.mini-topic { font-family: var(--display); font-weight: 900; font-size: clamp(1.3rem, 6vw, 2rem); background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 16px; }
.mini-q { font-weight: 800; font-size: 1.25rem; background: #fff; color: var(--ink); padding: 14px 16px; border-radius: 16px; width: 100%; }
.mini-prot { display: flex; align-items: center; gap: 10px; font-weight: 700; flex-wrap: wrap; justify-content: center; }
.mini-prot.big { flex-direction: column; font-size: 1.5rem; }
.mini-count { font-family: var(--display); font-weight: 900; font-size: 3.5rem; color: var(--accent); line-height: 1; }
.bomb svg { width: 140px; height: 140px; animation: bombShake .25s ease-in-out infinite alternate; }
.bomb.b2 svg { animation-duration: .18s; }
.bomb .spark { animation: blink .3s infinite; }
@keyframes bombShake { from { transform: rotate(-6deg); } to { transform: rotate(6deg) scale(1.04); } }
.bomb-btn { display: grid; justify-items: center; gap: 4px; background: var(--bad); color: #fff; border-radius: 30px; padding: 16px 30px; box-shadow: 0 10px 0 #9c1530; animation: openPulse .5s ease-in-out infinite alternate; }
.bomb-btn:active { transform: translateY(6px); box-shadow: 0 4px 0 #9c1530; }
.bomb-btn b { font-family: var(--display); font-size: 2.2rem; }
.boom { font-family: var(--display); font-weight: 900; font-size: clamp(4rem, 22vw, 7rem); color: var(--bad); line-height: 1; animation: slam .45s cubic-bezier(.2, 1.6, .4, 1) both, shake .4s .45s; text-shadow: 0 8px 0 #10191d; }
.wild-card { display: grid; gap: 6px; padding: 18px 22px; border-radius: 20px; background: var(--accent); color: var(--ink); width: min(320px, 100%); transform: rotate(-3deg); animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.wild-card small { font-weight: 900; letter-spacing: .2em; }
.wild-card b { font-family: var(--display); font-size: 1.6rem; }
.vote-list { display: grid; gap: 6px; width: 100%; }
.vl { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--card); font-weight: 700; }
.vl span { flex: 1; text-align: left; }
.vl b { color: var(--c); font-size: 1.3rem; }
.cara-p { display: grid; justify-items: center; gap: 4px; }
.cara-p small { color: var(--muted); font-weight: 700; }
.wilds { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 2px dashed var(--accent); }
.wilds .fb-opts { width: 100%; }
.mini-slot { width: 100%; }
.sv-pl .mini { margin-top: 0; }

/* Prendas */
.fx-banner.prenda { border-left-color: var(--accent); }
.fx-prenda { color: var(--ink) !important; font-weight: 800 !important; }
.shot-hit.prenda { background: var(--accent); }
.sh-prenda { background: #fff; color: var(--ink); font-weight: 800; font-size: 1.2rem; padding: 14px 18px; border-radius: 16px; max-width: 420px; }
.prenda .sh-big { color: var(--ink); }
.floater.minus { color: var(--bad); top: 60%; }

/* =========== Teléfono Descompuesto =========== */
.game-card.td { background: #fff; color: var(--ink); box-shadow: 0 8px 0 #c9c3c6; }
.game-card.td .gc-emoji { background: var(--ink); color: #fff; }
.games .game-card:nth-child(3) { animation-delay: .2s; }
.td-how ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.td-stage { display: grid; gap: 12px; justify-items: center; text-align: center; margin: 12px 0; }
.td-title { font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 7vw, 2.6rem); color: var(--accent); line-height: 1.05; }
.td-title.small { font-size: 1.4rem; color: var(--text); }
.td-clock { font-family: var(--display); font-weight: 900; font-size: 4rem; line-height: 1; }
.td-clock.urgent { color: var(--bad); animation: openPulse .3s ease-in-out infinite alternate; }
.td-progress { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.td-progress .chip.done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.td-chain { display: grid; gap: 10px; width: min(560px, 100%); margin: 0 auto; }
.td-chain-head { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 1.2rem; font-weight: 800; }
.td-step { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: grid; gap: 8px; justify-items: center; animation: fadeUp .45s both; }
.td-step-who { display: flex; align-items: center; gap: 8px; }
.td-step-img { width: min(100%, 360px); aspect-ratio: 1; border-radius: 14px; background: #fff; object-fit: contain; }
.td-step-text { font-family: var(--display); font-weight: 900; font-size: 1.4rem; text-align: center; color: var(--accent); }
.td-missing { color: var(--muted); font-style: italic; font-weight: 700; }
.td-num { font-family: var(--display); font-weight: 900; background: var(--accent); color: var(--ink); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; justify-self: center; flex: none; }
.td-results { display: grid; gap: 14px; justify-items: center; margin: 12px 0; }
.td-award { background: var(--bg2); border: 2px solid var(--accent); border-radius: 20px; padding: 16px; display: grid; gap: 10px; justify-items: center; text-align: center; width: min(560px, 100%); animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.td-award.fb { border-color: #fff; }
.td-award > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.td-best { width: min(100%, 340px); aspect-ratio: 1; border-radius: 16px; background: #fff; }
.td-compare { display: grid !important; gap: 6px; font-weight: 700; }
/* La parte de cada jugador */
.td-pl { display: grid; gap: 10px; }
.td-head { display: flex; justify-content: space-between; align-items: center; }
.td-timer { font-family: var(--display); font-weight: 900; font-size: 1.6rem; }
.td-timer.urgent { color: var(--bad); }
.td-ask { font-weight: 800; color: var(--muted); }
.td-prompt { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--accent); line-height: 1.15; }
.td-canvas-wrap { width: 100%; max-width: 420px; margin: 0 auto; }
.td-canvas { width: 100%; aspect-ratio: 1; display: block; background: #fff; border-radius: 16px; touch-action: none; }
.td-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.td-ink { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; }
.td-ink.on { border-color: #fff; transform: scale(1.12); }
.td-size, .td-tool { padding: 8px 12px; border-radius: 10px; background: var(--card); border: 2px solid var(--line); font-weight: 800; }
.td-size.on { background: var(--accent); color: var(--ink); border-color: transparent; }
.td-img { width: 100%; max-width: 420px; aspect-ratio: 1; border-radius: 16px; background: #fff; margin: 0 auto; display: block; }
.td-noimg { padding: 30px; border-radius: 16px; background: var(--card); text-align: center; color: var(--muted); font-weight: 700; }
.td-text { font-size: 1.2rem; }
.td-wait { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 20px 0; }
.td-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.td-thumb { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #fff; border: 4px solid transparent; padding: 0; }
.td-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-thumb.on { border-color: var(--accent); transform: scale(1.05); }
.td-thumb.big { width: min(70vw, 260px); }
.td-break-list { display: grid; gap: 8px; width: 100%; }
.td-break-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); font-weight: 700; }
.td-break-opt img { width: 64px; height: 64px; border-radius: 10px; background: #fff; }
.tv-td .td-step-img { width: min(100%, 300px); }
.tv-td .td-chain { width: min(1100px, 100%); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tv-td .td-chain-head { grid-column: 1 / -1; }
.tv-td .td-num { display: none; }

.prenda-box { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--accent); color: var(--ink); border-radius: 16px; padding: 10px 14px; width: min(100%, 460px); animation: chipIn .45s cubic-bezier(.2, 1.6, .4, 1); }
.prenda-box > div { display: grid; gap: 2px; }
.prenda-box b { font-size: 1rem; }
.prenda-box span { font-weight: 700; }


/* ===== Playlist Culpable ===== */
.game-card.pc { background: var(--gray); color: #fff; box-shadow: 0 8px 0 #2a292a; }
.game-card.pc .gc-emoji { background: var(--accent); color: var(--ink); }
.pc-sit { display: grid; gap: 8px; justify-items: center; text-align: center; margin: 10px auto 14px; max-width: 760px; }
.pc-sit-text { font-family: var(--display); font-weight: 900; font-size: clamp(1.35rem, 4.5vw, 2.4rem); line-height: 1.15; background: var(--bg2); border-radius: 22px; padding: 18px 20px; border: 3px solid var(--accent); animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.tv-pc .pc-sit-text { font-size: 3rem; }
.pc-now { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 20px; border-radius: 24px; background: var(--card); margin: 0 auto 14px; max-width: 760px; }
.pc-song { font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 6vw, 3.2rem); line-height: 1.05; }
.pc-song.small, .pc-now.small .pc-song { font-size: 1.5rem; }
.pc-artist { font-weight: 700; font-size: 1.2rem; opacity: .8; }
.tv-pc .pc-song { font-size: 4.4rem; }
.tv-pc .pc-artist { font-size: 2rem; }
.eq { display: flex; gap: 5px; align-items: flex-end; height: 40px; }
.eq i { width: 8px; border-radius: 4px; background: var(--accent); animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2n) { animation-duration: .7s; background: var(--brand); }
.eq i:nth-child(3n) { animation-duration: 1.1s; }
.eq i:nth-child(4n) { animation-delay: -.4s; }
@keyframes eq { from { height: 8px; } to { height: 40px; } }
.pc-reveal { display: grid; gap: 8px; justify-items: center; animation: chipIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.pc-reveal .who { font-size: 1.5rem; }
.pc-mine { text-align: center; padding: 18px; border-radius: 20px; background: var(--accent); color: #10191d; animation: openPulse .6s ease-in-out infinite alternate; }
.pc-mine .muted { color: #10191d; opacity: .75; }
.pc-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; width: 100%; }
.pc-sp { background: #1db954 !important; color: #fff !important; }
.pc-yt { background: #ff0033 !important; color: #fff !important; }
.pc-form { display: grid; gap: 10px; justify-items: stretch; }
.pc-form input, .pv-body input { font-size: 1.1rem; padding: 14px; border-radius: 14px; }
.pc-clock { font-family: var(--display); font-weight: 900; font-size: 2.6rem; text-align: center; }
.pc-clock.urgent { color: var(--bad); }
.pc-opts { display: grid; gap: 10px; width: 100%; }
.pc-opt { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 3px solid transparent; font-size: 1.05rem; }
.pc-opt span { opacity: .7; font-size: .9rem; }
.pc-opt:active { transform: scale(.97); border-color: var(--accent); }
.pc-list { display: grid; gap: 8px; text-align: left; padding-left: 22px; margin: 0; width: 100%; }
.pc-list li small { display: block; opacity: .65; font-size: .8rem; }
.pc-list li.best b::after { content: ' ★'; color: var(--accent); }
.pc-pre { white-space: pre-wrap; background: var(--bg2); border-radius: 14px; padding: 12px; font-family: inherit; font-size: .9rem; max-height: 40vh; overflow: auto; text-align: left; }
.pc-copy { width: 100%; }
.host-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.host-row > span { flex: 1 1 200px; }
.host-row > .avatar { flex: none; }

/* ===== Rankings ===== */
.rk-link { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 16px 18px; border-radius: 20px; background: var(--card); margin: 12px 0; }
.rk-link svg { width: 40px; height: 40px; flex: none; color: var(--accent); }
.rk-link > span { display: grid; gap: 2px; }
.rk-link > span span { opacity: .7; font-size: .9rem; }
.rk-tabs { margin: 8px auto 14px; display: flex; justify-content: center; }
.rk-head { display: grid; justify-items: center; gap: 4px; margin-bottom: 10px; text-align: center; }
.rk-ses { background: var(--bg2); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
.rk-ses summary { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; cursor: pointer; list-style: none; }
.rk-ses summary::-webkit-details-marker { display: none; }
.rk-when { opacity: .7; font-size: .9rem; }
.rk-champ { margin-left: auto; display: flex; align-items: center; gap: 6px; font-weight: 800; }
.rk-champ .avatar { flex: none; }
.rk-ses .ranking { margin: 10px 0 6px; }
.rk-ses-actions { margin-top: 8px; }
.rk-top { margin-bottom: 12px; }
.tv-rk .rk-tabs { display: none; }
.tv-rk { max-width: 1100px; }
.pc-pl > .fb-tag { display: table; margin: 0 auto 8px; }
.rk .rk-top, .tv-rk .rk-top { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 16px; border-radius: 22px; background: var(--bg2); border: 3px solid var(--c); max-width: 520px; margin: 0 auto 14px; }
.rk-top .crown svg { width: 40px; height: 40px; color: var(--accent); }
.rk-top .bigname { font-family: var(--display); font-weight: 900; font-size: 2.2rem; color: var(--c); line-height: 1; }
.rk .ranking { max-width: 640px; margin-inline: auto; }

/* ===== ¿Quién lo dijo? ===== */
.game-card.qd { background: var(--card); color: #fff; box-shadow: 0 8px 0 var(--line); border: 3px solid var(--accent); }
.game-card.qd .gc-emoji { background: var(--brand); color: #fff; }
.qd-answer { font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 5vw, 2.6rem); line-height: 1.15; }
.qd-answer.small, .pc-now.small .qd-answer { font-size: 1.35rem; }
.tv-pc .qd-answer { font-size: 3.6rem; }
.pc-form textarea, .pv-body textarea { font: inherit; font-size: 1.1rem; padding: 14px; border-radius: 14px; width: 100%; resize: none; }
.qd-pl > .fb-tag { display: table; margin: 0 auto 8px; }

/* Paleta y grosores del dibujo */
.td-inks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; width: 100%; margin: 4px 0 8px; }
.td-inks .td-ink { width: 34px; height: 34px; max-width: 100%; aspect-ratio: 1; height: auto; justify-self: center; border: 3px solid rgba(255,255,255,.25); }
.td-inks .td-ink.on { border-color: var(--accent); transform: scale(1.15); box-shadow: 0 0 0 2px var(--bg); }
.td-size { display: inline-flex; align-items: center; gap: 6px; }
.td-size i { display: inline-block; border-radius: 50%; background: currentColor; }

/* ===== El Impostor ===== */
.game-card.imp { background: var(--ink); color: #fff; box-shadow: 0 8px 0 #000; border: 3px solid var(--brand); }
.game-card.imp .gc-emoji { background: var(--brand); color: #fff; }
.imp-cat { font-size: 1.2rem; }
.tv-pc .imp-cat { font-size: 2rem; }
.imp-mask { font-family: var(--display); font-weight: 900; font-size: 5rem; width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); margin: 6px auto; animation: openPulse .8s ease-in-out infinite alternate; }
.imp-now { display: grid; justify-items: center; gap: 6px; }
.imp-now .who { font-size: 2rem; }
.tv-pc .imp-now .who { font-size: 3.4rem; }
.imp-next { font-weight: 700; }
.imp-card { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px 16px; border-radius: 22px; background: #fff; color: var(--ink); }
.imp-card small { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.imp-card b { font-family: var(--display); font-weight: 900; font-size: 2.3rem; line-height: 1.05; }
.imp-card.imp-bad { background: var(--brand); color: #fff; }
.imp-card.imp-bad b { font-size: 2.8rem; }
.imp-peek { position: relative; display: block; width: 100%; min-height: 170px; border-radius: 22px; padding: 0; background: var(--card); border: 3px dashed var(--line); user-select: none; -webkit-user-select: none; touch-action: none; margin: 10px 0; }
.imp-peek-cover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 14px; }
.imp-peek-cover svg { width: 46px; height: 46px; color: var(--accent); }
.imp-peek-in { display: block; visibility: hidden; }
.imp-peek.on .imp-peek-cover { visibility: hidden; }
.imp-peek.on .imp-peek-in { visibility: visible; }
.imp-peek.on { border-style: solid; border-color: var(--accent); }
.imp-turn { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 16px; border-radius: 22px; background: var(--bg2); }
.imp-turn.mine { background: var(--accent); color: var(--ink); animation: openPulse .6s ease-in-out infinite alternate; }
.imp-turn.mine h2 { font-family: var(--display); font-weight: 900; font-size: 2.2rem; margin: 0; }
.imp-word { font-size: 1.3rem; }
.imp-word b { font-family: var(--display); font-weight: 900; color: var(--accent); }
.imp-votes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.imp-votes .chip.done { border-color: var(--ok); }
.imp-pl > .fb-tag { display: table; margin: 0 auto 8px; }
.tv-pc .imp-word { font-size: 2.4rem; }
.tv-pc .td-award .who { font-size: 2.2rem; }

.pc-votes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; width: min(520px, 100%); }
.pc-votes li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--bg2); text-align: left; animation: chipIn .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.pc-votes li .avatar { flex: none; }
.pc-votes li span { flex: 1; opacity: .8; }
.pc-votes li i { font-style: normal; font-weight: 900; font-size: 1.3rem; }
.pc-votes li.ok { box-shadow: inset 0 0 0 2px var(--ok); }
.pc-votes li.ok i { color: var(--ok); }
.pc-votes li.bad { box-shadow: inset 0 0 0 2px var(--bad); }
.pc-votes li.bad i { color: var(--bad); }
.pc-votes li:nth-child(2) { animation-delay: .1s; } .pc-votes li:nth-child(3) { animation-delay: .2s; } .pc-votes li:nth-child(4) { animation-delay: .3s; } .pc-votes li:nth-child(5) { animation-delay: .4s; } .pc-votes li:nth-child(n+6) { animation-delay: .5s; }
.tv-pc .pc-votes { width: min(900px, 100%); font-size: 1.4rem; }
.pc-rv-in { display: grid; gap: 12px; justify-items: center; width: 100%; }
.pc-rv-l { display: grid; gap: 6px; justify-items: center; }
.tv-pc .pc-rv { max-width: 1300px; }
.tv-pc .pc-rv-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 30px; }
.tv-pc .pc-rv .pc-song { font-size: 3rem; }
.update-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 16px; background: var(--accent); color: var(--ink); box-shadow: 0 8px 30px rgba(0,0,0,.4); font-size: .95rem; }
.update-bar .btn { background: var(--ink); color: #fff; flex: none; }

/* ===== Dibujo en el celu ===== */
.td-canvas-wrap { margin: 8px -4px; }
.td-canvas { border-radius: 16px; box-shadow: 0 0 0 3px var(--accent); }
.td-toolbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 6px; }
.td-tbtn { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); color: var(--text); }
.td-tbtn span { font-size: 1.5rem; line-height: 1; }
.td-tbtn small { font-size: .68rem; font-weight: 800; }
.td-tbtn.on { background: var(--accent); color: var(--ink); border-color: var(--accent); transform: translateY(-2px); }
.td-sizes { display: flex; gap: 10px; justify-content: center; margin: 4px 0; }
.td-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); }
.td-dot i { display: block; border-radius: 50%; background: #fff; }
.td-dot.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.td-done { position: sticky; bottom: 10px; z-index: 5; width: 100%; margin-top: 12px; padding: 18px 16px; border-radius: 20px; background: var(--ok); color: #06210f; font-family: var(--display); font-weight: 900; font-size: 1.35rem; letter-spacing: .02em; box-shadow: 0 7px 0 #149447, 0 12px 24px rgba(0,0,0,.4); animation: donePulse 1.6s ease-in-out infinite; display: flex; align-items: center; justify-content: center; gap: 10px; }
.td-done span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ok); font-size: 1.2rem; }
.td-done:active { transform: translateY(5px); box-shadow: 0 2px 0 #149447; }
@keyframes donePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.pc-song-clock { font-size: 2rem; margin-top: 4px; }
.pc-clock.urgent { animation: openPulse .3s ease-in-out infinite alternate; }
.pc-votes li.me { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* ===== Resumen: quién votó a quién ===== */
.pc-score-line { font-weight: 800; font-size: 1.1rem; margin-top: 6px; }
.sum { display: grid; gap: 10px; justify-items: center; width: min(900px, 100%); margin: 0 auto; }
.sum-item { width: 100%; background: var(--bg2); border-radius: 18px; padding: 12px 14px; display: grid; gap: 8px; animation: chipIn .45s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * .12s); }
.sum-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.sum-label { font-weight: 800; }
.sum-author { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--c); color: #fff; }
.sum-author .avatar { flex: none; }
.sum-votes { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-v { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--card); font-size: .88rem; font-weight: 700; }
.sum-v .avatar { flex: none; }
.sum-v i { font-style: normal; opacity: .9; }
.sum-v.ok { box-shadow: inset 0 0 0 2px var(--ok); }
.sum-v.ok i { color: var(--ok); }
.sum-v.bad { box-shadow: inset 0 0 0 2px var(--bad); }
.sum-v.bad i { color: var(--bad); }
.sum-v.me { outline: 2px dashed var(--accent); outline-offset: 1px; }
.tv-pc .sum-v { font-size: 1.2rem; }
.tv-pc .sum-label { font-size: 1.4rem; }

/* Dibujo estable en el celu */
html, body.player-mode { overscroll-behavior: none; }
.td-pl { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.td-pl textarea, .td-pl input { -webkit-user-select: text; user-select: text; }
.td-canvas-wrap { margin: 8px auto; padding: 0 10px; max-width: 440px; }
.td-canvas { touch-action: none; -webkit-user-select: none; user-select: none; }
.td-pl button, .pl button { touch-action: manipulation; }

/* ===== Dibujo v3: pantalla completa en el celu (todo entra sin scroll) ===== */
body.td-drawing { overflow: hidden; }
.td-draw { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); background: var(--bg); --ink: #10191d; -webkit-user-select: none; user-select: none; animation: celIn .25s ease-out; }
.td-dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.td-dprompt { display: grid; gap: 2px; min-width: 0; }
.td-dprompt small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.td-dprompt b { font-family: var(--display); font-weight: 900; font-size: clamp(1.05rem, 4.6vw, 1.5rem); line-height: 1.15; color: var(--accent); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.td-step { background: var(--card); color: var(--text); padding: 1px 8px; border-radius: 99px; }
.td-draw .td-timer, .td-write .td-timer { flex: none; min-width: 58px; text-align: center; font-family: var(--display); font-weight: 900; font-size: 1.25rem; padding: 6px 10px; border-radius: 14px; background: var(--card); }
.td-timer.urgent { background: var(--bad); color: #fff; animation: openPulse .35s ease-in-out infinite alternate; }
.td-stage-c { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
.td-draw .td-canvas { width: min(100%, 52dvh); height: auto; aspect-ratio: 1; max-width: 520px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 3px var(--accent); touch-action: none; display: block; }
@supports (width: 1cqh) { .td-draw .td-canvas { width: min(100cqw, 100cqh, 560px); } }
.td-tools { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 4px; flex: none; }
.td-tools::-webkit-scrollbar { display: none; }
.td-tool { flex: 1 0 52px; display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); color: var(--text); touch-action: manipulation; transition: transform .12s, background .12s; }
.td-tool span { font-size: 1.3rem; line-height: 1.1; }
.td-tool small { font-size: .62rem; font-weight: 800; white-space: nowrap; }
.td-tool.on { background: var(--accent); color: var(--ink); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 3px 0 #b08b00; }
.td-tool:disabled { opacity: .35; }
.td-tool:active { transform: scale(.92); }
.td-props { display: flex; gap: 10px; align-items: center; flex: none; min-width: 0; }
.td-draw .td-sizes { display: flex; gap: 6px; flex: none; margin: 0; }
.td-draw .td-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); }
.td-draw .td-dot i { display: block; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.td-draw .td-dot.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.td-draw .td-inks { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; margin: 0; flex: 1; min-width: 0; grid-template-columns: none; }
.td-draw .td-inks::-webkit-scrollbar { display: none; }
.td-draw .td-ink { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); justify-self: auto; aspect-ratio: auto; }
.td-draw .td-ink.on { border-color: var(--accent); transform: scale(1.15); box-shadow: 0 0 0 2px var(--bg); }
.td-ink-more { position: relative; display: grid; place-items: center; font-weight: 900; color: #fff; background: conic-gradient(#e53935, #f7c300, #2bd96b, #18c5ff, #8e44ad, #e53935); overflow: hidden; }
.td-ink-more input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.td-draw .td-done, .td-write .td-done { position: static; flex: none; margin: 0; padding: 14px; font-size: 1.15rem; }
.td-sheet { position: absolute; inset: 0; z-index: 5; display: grid; place-items: end center; background: rgba(0,0,0,.55); padding: 16px; animation: celIn .2s ease-out; }
.td-sheet-in { width: min(420px, 100%); background: var(--bg2); border-radius: 20px; padding: 18px; display: grid; gap: 14px; text-align: center; border: 2px solid var(--line); }
.td-sheet-in p { margin: 0; font-weight: 800; font-size: 1.1rem; }
.td-sheet-in small { font-weight: 600; color: var(--muted); font-size: .85rem; }
.td-sheet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-height: 760px) { .td-tool { padding: 8px 2px 7px; } .td-tool span { font-size: 1.5rem; } }
@media (max-height: 600px) { .td-tool small { display: none; } .td-dprompt b { -webkit-line-clamp: 1; } }
/* Escribir / adivinar */
.td-write { display: grid; gap: 12px; }
.td-explain { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.35; }
.td-write .td-img { width: min(100%, 360px); justify-self: center; border-radius: 14px; box-shadow: 0 0 0 3px var(--accent); }
.td-write textarea { font-size: 1.1rem; padding: 14px; border-radius: 14px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.td-sheet[hidden] { display: none; }
.td-draw .td-tools { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; flex-wrap: nowrap; }
.td-draw .td-tool { flex: none; min-width: 0; }
.td-dprompt small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.td-dprompt .td-step { display: inline-block; width: auto; flex: none; font-size: .75rem; }

/* ===== Claridad: botones que parecen botones, tarjetas que parecen tarjetas ===== */
.btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; min-height: 44px; }
.btn.ghost { border: 2px solid var(--line); }
.btn:not(:disabled):active { filter: brightness(.95); }
.game-card { position: relative; padding-bottom: 58px; }
.gc-cta { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: rgba(0,0,0,.28); color: #fff; font-weight: 900; font-size: .95rem; opacity: 1 !important; }
.game-card.sv .gc-cta, .game-card.pc .gc-cta { background: var(--ink); }
.big-choice { position: relative; padding-right: 46px !important; }
.big-choice::after { content: '›'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; font-weight: 900; opacity: .7; }
.rk-link { position: relative; padding-right: 40px; }
.rk-link::after { content: '›'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; font-weight: 900; opacity: .6; }
/* Opciones elegibles (votos): círculo de "tocá para elegir" */
.pc-opt { position: relative; padding-left: 48px; }
.pc-opt::before { content: ''; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 3px solid var(--accent); }
.pc-opt:active::before { background: var(--accent); }
.fb-opt { box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.fb-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
/* Contenido (no se toca): sin sombra de botón */
.panel, .pc-sit-text, .imp-card, .sum-item { box-shadow: none; }

/* ===== Celu: barra de arriba, ayuda y "¿qué hago ahora?" ===== */
.pl-help, .pl-menu { width: 40px; height: 40px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); color: var(--text); font-weight: 900; font-size: 1.15rem; display: grid; place-items: center; flex: none; }
.pl-help { color: var(--accent); }
.pl-hint { margin: 6px 12px 0; padding: 10px 14px; border-radius: 14px; background: var(--accent); color: var(--ink); font-weight: 800; font-size: .98rem; line-height: 1.3; display: flex; gap: 8px; align-items: flex-start; box-shadow: 0 4px 0 #b08b00; }
.pl-hint[hidden] { display: none; }
.pl-hint.pop { animation: hintPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes hintPop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.55); display: grid; align-items: end; animation: celIn .2s ease-out; }
.sheet.out { opacity: 0; transition: opacity .2s; }
.sheet-in { background: var(--bg2); border-radius: 22px 22px 0 0; padding: 20px 16px max(16px, env(safe-area-inset-bottom)); display: grid; gap: 10px; max-height: 85dvh; overflow: auto; animation: sheetUp .28s cubic-bezier(.2, 1.2, .4, 1); }
.sheet-in h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 900; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-btn { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); color: var(--text); }
.sheet-btn span { grid-row: span 2; font-size: 1.5rem; }
.sheet-btn small { color: var(--muted); font-weight: 600; }
.sheet-btn.danger b { color: var(--bad); }
.rules-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 1.02rem; line-height: 1.4; }
/* Puntos que vuelan */
.pl-score { position: relative; }
.pl-score.bump { animation: bump .5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bump { 40% { transform: scale(1.35); } }
.score-fly { position: absolute; right: 0; top: 0; font-family: var(--display); font-weight: 900; font-size: 1.4rem; pointer-events: none; animation: fly 1.2s ease-out forwards; }
.score-fly.up { color: var(--ok); }
.score-fly.down { color: var(--bad); }
@keyframes fly { from { transform: translateY(0) scale(.8); opacity: 1; } to { transform: translateY(46px) scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pl-hint.pop, .pl-score.bump, .score-fly, .sheet-in { animation: none; } }
.vstep { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: .9rem; margin-right: 6px; vertical-align: 2px; }
.td-thumb, .fb-opt { position: relative; }
.td-thumb.on, .fb-opt.on { outline: 4px solid var(--ok); outline-offset: 2px; }
.td-thumb.on::after, .fb-opt.on::after { content: '✓'; position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #05210e; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); animation: bump .35s; }
.td-pl > .fb-tag, .td-wait > .fb-tag { display: table; margin: 0 auto 10px; }
.td-draw { align-items: center; }
.td-draw > :not(.td-sheet) { width: min(100%, 620px); }
.td-draw > .td-stage-c { width: 100%; }
.loader { width: 44px; height: 44px; margin: 10px auto; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--accent); animation: spin360 .8s linear infinite; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.demo { display: grid; gap: 14px; padding-bottom: 30px; }
.demo .demo-hint { margin: 0; }
.demo-btn { width: 100%; text-align: left; }
.demo-img { width: min(100%, 360px); justify-self: center; border-radius: 14px; box-shadow: 0 0 0 3px var(--accent); }

/* =====================================================================
   SISTEMA DE DISEÑO v2 — parejo en toda la plataforma (pensado para celu)
   ===================================================================== */
:root {
  --muted: #e2c3cf;            /* más contraste para leer con poca luz */
  --fs-s: .92rem; --fs-m: 1.08rem; --fs-l: clamp(1.35rem, 5vw, 1.9rem);
  --radius: 18px;
  --game: var(--accent);
}
body { font-size: 16.5px; line-height: 1.4; }
h1 { font-size: var(--fs-l); } h2 { font-size: calc(var(--fs-l) * .82); } h3 { font-size: var(--fs-m); }
.muted { color: var(--muted); }
small, .small { font-size: var(--fs-s); }
/* Un solo estilo de tarjeta de contenido */
.panel, .td-award, .sum-item, .pc-now, .rk-ses { border-radius: var(--radius); }
/* Botones: forma y "hundido" iguales en todos lados */
.btn { border-radius: 14px; font-weight: 800; letter-spacing: .01em; }
.btn.primary, .btn.ok, .btn.bad { transition: transform .08s, box-shadow .08s; }
.btn.primary:active, .btn.ok:active, .btn.bad:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }

/* Color de cada juego (barra de arriba, ayuda, relojes) */
body[data-game="un"] { --game: #e0245e; }
body[data-game="sv"] { --game: #f7c300; }
body[data-game="td"] { --game: #18c5ff; }
body[data-game="pc"] { --game: #2bd96b; }
body[data-game="qd"] { --game: #ff5fa2; }
body[data-game="imp"] { --game: #b06ce0; }
body[data-game] .pl-top { box-shadow: inset 0 -4px 0 var(--game); }
body[data-game] .topbar { box-shadow: inset 0 -4px 0 var(--game); }
body[data-game] .pl-hint { border-left: 8px solid var(--game); }
body[data-game] .td-clock, body[data-game] .pc-clock { color: var(--game); }
body[data-game] .td-clock.urgent, body[data-game] .pc-clock.urgent { color: var(--bad); }

/* Botón principal SIEMPRE abajo, al alcance del pulgar */
.pl .btn.primary.big.full, .pl [data-send], .pl .td-write .td-done, #pc-send, #qd-send, #imp-gs {
  position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 6; box-shadow: 0 4px 0 #a88400, 0 10px 24px rgba(0,0,0,.45);
}
@media (max-width: 700px) {
  .game > .controls { position: sticky; bottom: 0; z-index: 6; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
}

/* Esperas: quién falta, latiendo */
.wait-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; }
.wait-chip { padding: 6px 12px; border-radius: 99px; background: var(--card); border: 2px solid var(--game); font-weight: 800; animation: waitPulse 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * .2s); }
@keyframes waitPulse { 50% { transform: scale(1.08); } }
.wait-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.wait-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--game); animation: dotUp .9s ease-in-out infinite; }
.wait-dots i:nth-child(2) { animation-delay: .15s; } .wait-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotUp { 50% { transform: translateY(-8px); opacity: .5; } }

/* ===== Animación de etapa / "¡ES TU TURNO!" ===== */
.stage-splash { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(16, 6, 12, .88); overflow: hidden; animation: ssIn .25s ease-out; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.stage-splash.out { opacity: 0; transition: opacity .35s; }
.ss-burst { position: absolute; width: 220vmax; height: 220vmax; background: repeating-conic-gradient(var(--game) 0 10deg, transparent 10deg 20deg); opacity: .16; animation: ssSpin 6s linear infinite; }
.stage-splash.turn .ss-burst { background: repeating-conic-gradient(var(--c, var(--accent)) 0 10deg, transparent 10deg 20deg); opacity: .3; }
.ss-in { position: relative; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 20px; }
.ss-icon { font-size: 4.5rem; animation: ssPop .55s cubic-bezier(.2, 1.8, .4, 1) both; }
.ss-who { animation: ssPop .55s cubic-bezier(.2, 1.8, .4, 1) both; margin-bottom: 14px; }
.ss-who .avatar { transform: scale(1.4); box-shadow: 0 0 0 6px var(--c, var(--accent)), 0 0 40px var(--c, var(--accent)); }
.ss-text { font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 13vw, 6rem); line-height: 1; color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.35); display: flex; flex-wrap: wrap; justify-content: center; }
.ss-text span { display: inline-block; animation: ssLetter .5s cubic-bezier(.2, 1.8, .4, 1) both; animation-delay: calc(.1s + var(--i) * .04s); }
.stage-splash.turn .ss-text { color: var(--accent); }
.ss-sub { font-weight: 800; font-size: var(--fs-m); color: var(--muted); animation: fadeUp .4s .5s both; }
@keyframes ssIn { from { opacity: 0; } }
@keyframes ssSpin { to { transform: rotate(360deg); } }
@keyframes ssPop { from { transform: scale(0) rotate(-20deg); } }
@keyframes ssLetter { from { transform: translateY(60px) scale(.3); opacity: 0; } }

/* ===== Podio animado ===== */
.podium2 { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; width: min(520px, 100%); margin: 14px auto 6px; min-height: 250px; }
.pd2-slot { display: grid; justify-items: center; align-content: end; gap: 6px; min-width: 0; }
.pd2-who { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 0; max-width: 100%; animation: pdDrop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.pd2-who .avatar { flex: none; }
.pd2-who b { font-size: var(--fs-m); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd2-who small { color: var(--muted); font-weight: 700; }
.pd2-crown { font-size: 2rem; animation: crownBob 1.2s ease-in-out infinite; }
.pd2-col { width: 100%; border-radius: 14px 14px 4px 4px; background: var(--c); display: grid; place-items: start center; padding-top: 8px; font-family: var(--display); font-weight: 900; font-size: 2rem; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); transform-origin: bottom; animation: pdRise .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.pd2-slot.p1 .pd2-col { height: 130px; } .pd2-slot.p2 .pd2-col { height: 95px; } .pd2-slot.p3 .pd2-col { height: 65px; }
.pd2-slot.p3 .pd2-col, .pd2-slot.p3 .pd2-who { animation-delay: .3s; }
.pd2-slot.p2 .pd2-col, .pd2-slot.p2 .pd2-who { animation-delay: 1.1s; }
.pd2-slot.p1 .pd2-col, .pd2-slot.p1 .pd2-who { animation-delay: 2s; }
@keyframes pdRise { from { transform: scaleY(0); } }
@keyframes pdDrop { from { transform: translateY(-80px); opacity: 0; } }
@keyframes crownBob { 50% { transform: translateY(-6px) rotate(-8deg); } }
.podium-wrap { width: min(620px, 100%); }
.tv-pc .podium2 { min-height: 380px; } .tv-pc .pd2-slot.p1 .pd2-col { height: 200px; } .tv-pc .pd2-slot.p2 .pd2-col { height: 150px; } .tv-pc .pd2-slot.p3 .pd2-col { height: 100px; }

/* ===== Insignias y rachas ===== */
.bdgs { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.bdg { font-size: .95rem; position: relative; }
.bdg i { font-style: normal; font-size: .62rem; font-weight: 900; position: absolute; right: -6px; bottom: -4px; background: var(--accent); color: var(--ink); border-radius: 99px; padding: 0 3px; }
.pl-streak { font-weight: 900; color: #ff8a00; display: inline-flex; align-items: center; gap: 1px; }
.pl-streak.bump { animation: bump .5s cubic-bezier(.2, 1.8, .4, 1); }

/* ===== Tele: hecha para verse de lejos ===== */
.tv-root { font-size: clamp(18px, 1.45vw, 36px); }
.tv-root .muted { color: #f0d6df; }
.tv-root .ranking li { font-size: 1.2em; }

@media (prefers-reduced-motion: reduce) {
  .stage-splash, .ss-burst, .ss-text span, .ss-icon, .ss-who, .pd2-col, .pd2-who, .pd2-crown, .wait-chip, .wait-dots i { animation: none !important; }
}
.ss-text { gap: 0 .28em; }
.ss-word { display: inline-flex; white-space: nowrap; }
.ss-text .ss-word { display: inline-flex; white-space: nowrap; animation: none; }
