/* Pantalla del celu (mobile first). */
body { font-size: 17px; min-height: 100vh; min-height: 100dvh; }
#app { max-width: 520px; margin: 0 auto; padding: 16px 16px calc(110px + env(safe-area-inset-bottom)); }

h2 { margin: 0; font-size: 24px; }
p { line-height: 1.4; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Entrar ---------- */
.p-join { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.p-join .logo { font-size: 64px; text-align: center; }
.p-join form { display: flex; flex-direction: column; gap: 16px; }
label.f { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 15px; }
input {
  font: inherit; font-size: 20px; color: var(--ink);
  background: var(--bg-2); border: 2px solid var(--line); border-radius: 14px;
  padding: 12px 14px; width: 100%; outline: none;
}
input:focus { border-color: var(--gold-ink); }
input:disabled { opacity: 0.6; }
#code { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 700; }
.p-join .btn { font-size: 20px; padding: 14px; }
.err { color: var(--bad); min-height: 1.4em; margin: 0; text-align: center; }

/* ---------- Lobby ---------- */
.p-lobby { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; }
.p-lobby .logo { font-size: 40px; }
.hello { font-size: 22px; margin: 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--bg-3); border-radius: 10px; padding: 6px 12px; font-weight: 600; }
.chips li.me { background: var(--picante); }
.chips li.off { opacity: 0.4; }
.vip { background: var(--bg-2); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.vip h3 { margin: 0; font-size: 16px; color: var(--gold-ink); }
.seg { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 8px 4px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--ink); color: var(--card-ink); }
.vip .btn { font-size: 20px; padding: 14px; }
.waiting { color: var(--muted); animation: pulse 2s infinite; margin: 0; }

/* ---------- Juego ---------- */
.p-top {
  position: sticky; top: 0; z-index: 5; margin: -16px -16px 0; padding: 12px 16px;
  background: var(--bg); display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line);
}
.p-letter {
  width: 60px; height: 60px; flex: none; border-radius: 50%; background: var(--gold); color: var(--card-ink);
  display: grid; place-items: center; font-size: 38px; font-weight: 700;
}
.p-time { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.p-time span { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-bar { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.p-bar i { display: block; height: 100%; width: 100%; background: var(--good); transition: width 0.25s linear; }
.p-time.hurry span { color: var(--bad); }
.p-time.hurry i { background: var(--bad); }
.p-picante { margin: 12px 0; background: var(--picante); border-radius: 12px; padding: 8px 12px; font-size: 14px; }

.p-fields { display: flex; flex-direction: column; gap: 12px; }
.p-field { display: flex; flex-direction: column; gap: 4px; border-left: 6px solid var(--c); padding-left: 10px; }
.p-cat { font-size: 13px; font-weight: 700; color: var(--c); letter-spacing: 0.02em; }
.p-cat em { font-style: normal; background: var(--picante); color: #fff; border-radius: 6px; padding: 0 5px; margin-left: 4px; }

.p-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%);
  display: flex; gap: 10px; justify-content: center;
}
.p-dock .btn { flex: 1; max-width: 488px; font-size: 20px; padding: 16px; }
.btn.tutifru { background: var(--gold); color: var(--card-ink); box-shadow: 0 4px 0 #b88a1a; font-size: 24px; letter-spacing: 0.04em; }

.p-cover {
  position: fixed; inset: 0; z-index: 20; background: #170f30f2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px;
}
.p-cover[hidden] { display: none; }
.p-cover .big { font-size: 96px; font-weight: 700; color: var(--gold-ink); }
.p-cover .title { font-size: 28px; font-weight: 700; }

/* ---------- Revisión ---------- */
.p-head { padding: 12px 0 4px; }
.p-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.rv-col { margin-top: 18px; }
.rv-col h3 { margin: 0 0 8px; font-size: 14px; color: var(--c); }
.rv-row { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.rv-row .who { width: 72px; flex: none; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-row .w { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.rv-row .w small { display: block; font-weight: 400; color: var(--bad); font-size: 13px; }
.rv-row.bad .w s { color: var(--muted); }
.rv-row.empty .w { color: var(--muted); font-weight: 400; }
.rv-row.mine { box-shadow: inset 0 0 0 2px var(--line); }
.rv-row .w small { color: var(--bad); }
.rv-row.bad { background: #ff5a5f1f; }
.rv-row .x, .rv-row .poll {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line);
  background: none; font-size: 18px; font-weight: 700; display: grid; place-items: center; padding: 0;
}
.rv-row .x.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.rv-row .poll { border-color: var(--gold-ink); }
.rv-row button:disabled { opacity: 0.35; }
.rv-row .st { flex: none; font-weight: 700; color: var(--good); }
.rv-row.bad .st { color: var(--bad); }

/* Votación general */
.vote-cover { gap: 12px; }
.vote-cover p { margin: 0; }
.vote-word { font-size: 44px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.1; }
.ballot { display: flex; gap: 16px; margin: 12px 0; }
.ballot button { width: 120px; height: 120px; border-radius: 28px; border: 0; background: var(--bg-3); font-size: 60px; }
.ballot button:active { transform: scale(0.95); }
.ballot.small button { width: 72px; height: 72px; font-size: 34px; border-radius: 18px; opacity: 0.5; }
.ballot.small button.on { opacity: 1; box-shadow: 0 0 0 3px var(--gold); }
.voted { font-size: 26px; font-weight: 700; }
.tally { display: flex; gap: 28px; font-size: 40px; font-weight: 700; margin: 8px 0; }
.result { font-size: 22px; font-weight: 700; color: var(--good); }
.result.res-invalida, .result.res-empate { color: var(--bad); }

/* ---------- Bombas ---------- */
.bomb-card { background: var(--bg-2); border-radius: 18px; padding: 20px; text-align: center; margin-top: 24px; }
.bomb-card .emoji { font-size: 64px; }
.victims { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.victims .btn { padding: 14px 8px; }

/* ---------- Resultados ---------- */
.res-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.res-list li { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border-radius: 12px; padding: 10px 12px; border-left: 5px solid var(--c, var(--s)); }
.res-list .cat { font-size: 12px; color: var(--muted); display: block; }
.res-list .w { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.res-list .pts { font-weight: 700; color: var(--s); white-space: nowrap; text-align: right; font-size: 15px; }
.res-list .pts small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sum { display: flex; justify-content: space-between; font-size: 18px; margin-top: 14px; padding: 0 4px; }
.sum b { color: var(--gold-ink); font-size: 26px; }
.rank { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: flex; gap: 10px; background: var(--bg-2); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.rank li.me { background: var(--bg-3); box-shadow: inset 0 0 0 2px var(--gold); }
.rank li span:last-child { margin-left: auto; color: var(--gold-ink); }
.big-pos { font-size: 72px; font-weight: 700; text-align: center; margin: 24px 0 0; line-height: 1; }

/* ---------- Repetida (≈) ---------- */
.rv-row .rep { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: none; font-size: 20px; font-weight: 700; display: grid; place-items: center; padding: 0; }
.rv-row .rep.on { background: var(--celeste); border-color: var(--celeste); color: var(--card-ink); }
.rv-row .w .rep-note { color: var(--celeste); }

/* ---------- Tienda (modo estratégico) ---------- */
.p-prep { display: flex; flex-direction: column; gap: 12px; }
.coins-big { margin: 4px 0 0; font-size: 28px; font-weight: 700; color: var(--gold-ink); }
.prep-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prep-cats li { background: var(--c); color: var(--card-ink); border-radius: 12px; padding: 10px; font-weight: 700; font-size: 13px; text-align: center; display: flex; align-items: center; justify-content: center; min-height: 56px; }
.prep-cats li em { font-style: normal; background: var(--picante); color: #fff; border-radius: 6px; padding: 0 5px; margin-left: 4px; }
.p-prep h3 { margin: 8px 0 0; font-size: 14px; }
.my-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; font-size: 13px; }
.my-items span { background: var(--bg-3); border-radius: 999px; padding: 4px 10px; }
.my-items small { color: var(--muted); }
.p-dock .shop-btn { background: var(--gold); color: var(--card-ink); box-shadow: 0 4px 0 #b88a1a; }
.p-dock .small { flex: none; padding: 16px 12px; font-size: 14px; }

.shop-cover { justify-content: flex-start; overflow-y: auto; padding: 16px; background: var(--bg); }
.shop-panel { width: 100%; max-width: 488px; display: flex; flex-direction: column; gap: 10px; text-align: left; padding-bottom: 24px; }
.shop-panel h2 { margin: 0; }
.shop-panel h3 { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.shop-panel p { margin: 0; }
.shop-head { display: flex; justify-content: space-between; align-items: center; }
.shop-head .coins-big { margin: 0; }
.offer { display: flex; gap: 10px; align-items: center; background: var(--bg-2); border-radius: 14px; padding: 12px; }
.offer > div { flex: 1; }
.offer p { font-size: 13px; color: var(--muted); margin-top: 2px !important; }
.offer .btn { flex: none; padding: 10px 14px; font-size: 15px; white-space: nowrap; }
.offer .btn s { opacity: 0.6; font-weight: 400; margin-left: 4px; }
.offer.owned { box-shadow: inset 0 0 0 2px var(--good); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick .btn { padding: 12px 8px; }
.pick .btn.on { box-shadow: 0 0 0 3px var(--gold); }
.pick .cat-pick, .pick .color-pick { background: var(--c); color: var(--card-ink); font-size: 13px; }
.sum.small { font-size: 15px; margin-top: 6px; }
.sum.small b { font-size: 18px; }

@keyframes pulse { 50% { opacity: 0.45; } }

.p-picante.kids { background: var(--amarillo); color: var(--card-ink); }

/* "Me quedé sin ideas" */
.p-dock .noideas { flex: 0 0 34%; background: var(--bg-3); font-size: 15px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.p-dock .noideas small { font-size: 11px; font-weight: 400; color: var(--muted); }
.p-dock .noideas.on { background: var(--celeste); color: var(--card-ink); }
.p-dock .noideas.on small { color: var(--card-ink); }

/* Últimos 30 segundos: el fondo titila (la velocidad la pone play.js en --blink) */
body::before { content: ''; position: fixed; inset: 0; background: var(--bad); opacity: 0; pointer-events: none; z-index: 0; }
body.blink::before { animation: blink var(--blink, 1.6s) ease-in-out infinite; }
#app { position: relative; z-index: 1; }
@keyframes blink { 50% { opacity: 0.28; } }

/* ⚙️ de 👑 */
#vip-menu { position: fixed; top: 10px; right: 10px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-3); font-size: 20px; box-shadow: 0 2px 8px #0006; }
#vip-menu[hidden] { display: none; }

/* Reglas */
#rules-btn { margin-top: 8px; }
.rules-cover { justify-content: flex-start; overflow-y: auto; background: var(--bg); text-align: left; }
.rules-cover .rules-panel { width: 100%; max-width: 488px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.rules-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.rules-tabs button { border: 0; background: var(--bg-3); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-weight: 600; }
.rules-tabs button.on { background: var(--ink); color: var(--card-ink); }
.rules-body { font-size: 15px; line-height: 1.45; }
.rules-body h3 { margin: 16px 0 4px; font-size: 17px; color: var(--gold-ink); }
.rules-body p, .rules-body ul { margin: 0 0 8px; }
.rules-body ul { padding-left: 20px; }
.rules-body li { margin-bottom: 4px; }
body.has-vip .p-top { padding-right: 64px; }

/* Selfie */
.selfie-btn { display: block; text-align: center; font-size: 16px; padding: 12px; }
.selfie-prev { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto; display: block; box-shadow: 0 0 0 3px var(--gold); }
.selfie-prev[hidden] { display: none; }
.me-row { display: flex; align-items: center; gap: 14px; }
.me-row .av-xl { font-size: 16px; }
.me-row .hello { margin: 0 0 6px; }
.me-row .selfie-btn { padding: 8px 12px; font-size: 14px; }
.small-link { padding: 6px 10px; font-size: 13px; margin-top: 4px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; }
.rank li .av, .victims .av, .pick .av { font-size: 14px; }

/* ⚙️ de 👑 */
.kick-row { display: flex; align-items: center; gap: 8px; }
.btn.danger { border-color: var(--bad); color: var(--bad); }

/* Votación de Carta Picante */
.pic-vote { display: flex; flex-direction: column; gap: 10px; }
.pic-btn { border: 0; border-radius: 16px; background: var(--picante); color: #fff; text-align: left; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; opacity: 0.85; }
.pic-btn b { font-size: 18px; }
.pic-btn small { font-size: 14px; opacity: 0.9; }
.pic-btn em { font-style: normal; font-weight: 700; color: var(--gold-ink); }
.pic-btn.on { opacity: 1; box-shadow: 0 0 0 4px var(--gold); }

/* Timba */
.p-dock .timba-btn { background: var(--celeste); color: var(--card-ink); box-shadow: 0 4px 0 #2a8fbf; }
.p-prep .p-dock { flex-wrap: wrap; }
.p-prep .p-dock .btn { padding: 14px 8px; font-size: 16px; }
.bet-now { background: var(--bg-2); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.bet-amount { font-size: 18px; }
.bet-amount b { font-size: 34px; color: var(--gold-ink); margin-right: 6px; }
.pick.four { grid-template-columns: repeat(4, 1fr); }
body.has-vip .shop-head { padding-right: 56px; }

/* Entrar: crear sala y otras opciones */
.p-join form a.btn { display: block; text-align: center; text-decoration: none; color: var(--muted); }
.create-btn { background: var(--gold); color: var(--card-ink); box-shadow: 0 4px 0 #b88a1a; font-size: 18px; padding: 14px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 4px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.small { font-size: 13px; margin: 0; }

/* Lobby: tarjeta de la sala */
.room-card { background: var(--bg-2); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.code-big { display: block; font-size: 40px; letter-spacing: 0.25em; color: var(--gold-ink); line-height: 1.1; }
.rc-qr { background: #fff; padding: 6px; border-radius: 10px; width: 92px; height: 92px; flex: none; }
.rc-qr img, .rc-qr canvas { width: 80px !important; height: 80px !important; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tv-link { flex: 1; font-size: 13px; overflow-wrap: anywhere; color: var(--muted); }

/* Reparto sin pantalla principal: el aviso va abajo y deja ver las categorías */
.p-cover.soft { inset: auto 0 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #170f30f2; border-top: 2px solid var(--gold); flex-direction: row; gap: 14px; justify-content: center; }
.p-cover.soft .big { font-size: 48px; }
.p-cover.soft .title { font-size: 20px; }
.p-cover.soft p { margin: 0; max-width: 180px; text-align: left; }

/* Tabla completa de la ronda */
.rt-totals { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-totals span { background: var(--bg-2); border-radius: 999px; padding: 4px 10px 4px 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rt-totals b { color: var(--gold-ink); }
.rt-col h3 { color: var(--c) !important; }
.rt-row { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border-radius: 10px; padding: 8px 10px; margin-bottom: 4px; border-left: 4px solid var(--s); font-size: 14px; }
.rt-row .who { width: 70px; flex: none; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-row .w { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.rt-row .pts { color: var(--s); font-weight: 700; text-align: right; white-space: nowrap; }
.rt-row .pts small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }

/* Idioma del celu (pantalla de entrar) */
.lang-toggle { align-self: flex-end; display: flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-toggle button { border: 0; background: none; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.lang-toggle button.on { background: var(--ink); color: var(--card-ink); }


/* Cuenta (Entrar con Google) */
.account { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; background: var(--bg-2); border-radius: 14px; padding: 10px; }
.account:empty { display: none; }
.account .acc-name { font-weight: 600; }
.account small { width: 100%; text-align: center; }
.acc-google { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; }

/* Mis cartas */
.mc-card { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border-radius: 10px; padding: 10px 12px; border-left: 5px solid var(--c, var(--line)); font-weight: 600; font-size: 14px; }
.mc-card input { width: 20px; height: 20px; flex: none; accent-color: var(--picante); }
.mc-card.blocked { opacity: 0.45; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin: 0 3px 0 8px; vertical-align: middle; }
.mc-msg { background: var(--bg-3); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.mc-help summary { color: var(--muted); cursor: pointer; }
.mc-help pre { background: var(--bg); border-radius: 10px; padding: 10px; font-size: 13px; white-space: pre-wrap; }
#mycards input#mc-text { text-transform: uppercase; }
.account a { color: var(--celeste); }
body.has-vip .shop-cover { padding-top: 64px; }

#sound-btn { top: 10px; right: 10px; width: 44px; height: 44px; font-size: 20px; background: var(--bg-3); box-shadow: 0 2px 8px #0006; }
body.has-vip #sound-btn { right: 62px; }
body.has-sound .p-top { padding-right: 56px; }
body.has-sound.has-vip .p-top { padding-right: 112px; }
body.has-sound .shop-head { padding-right: 52px; }
body.has-sound.has-vip .shop-head { padding-right: 108px; }
body.has-sound .shop-cover { padding-top: 64px; }
body.has-sound .p-head > h2:first-child { padding-right: 52px; }
body.has-sound.has-vip .p-head > h2:first-child { padding-right: 106px; }

/* Pantalla principal desde el celu: pide el código de la sala. */
.tv-box { display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); border-radius: 14px; padding: 12px; }
.tv-box[hidden] { display: none; }
.tv-box p { margin: 0; }
.tv-box .small-link { text-align: center; color: var(--muted); }

/* ---------- Poderes (modo estratégico) ---------- */
.p-top { flex-wrap: wrap; }
.p-top .p-powers { flex-basis: 100%; }
.p-powers { display: flex; gap: 10px; flex-wrap: wrap; }
.p-powers[hidden] { display: none; }
.pw {
  width: 54px; height: 54px; flex: none; border-radius: 12px; border: 2px solid var(--line); background: var(--bg-3);
  font-size: 28px; line-height: 1; display: grid; place-items: center; padding: 0; color: var(--ink); cursor: pointer;
}
.pw.letter, .pw-icon.letter, .pw-big.letter { font-weight: 700; color: var(--gold-ink); font-family: inherit; }
.pw.sabotaje { border-color: var(--picante); }
.pw.escudo { border-color: var(--celeste); }
.pw.espia { border-color: var(--verde); }
.pw.pasivo { border-color: var(--gold-ink); }
.pw.off { opacity: 0.35; }
.pw.on { box-shadow: 0 0 14px 3px var(--celeste); animation: pulse 1.4s infinite; }
.pw-icon {
  width: 52px; height: 52px; flex: none; border-radius: 12px; background: var(--bg-3); font-size: 28px;
  display: grid; place-items: center;
}
.offer .tag { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.offer .small { font-size: 12px; }
.pw-sheet { position: fixed; inset: 0; z-index: 260; background: #170f30d9; display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: pwIn 0.15s ease-out; }
@keyframes pwIn { from { opacity: 0; } }
.pw-card { width: 100%; max-width: 488px; background: var(--bg-2); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.pw-card h3 { margin: 0; font-size: 22px; }
.pw-card p { margin: 0; }
.pw-card .pick .btn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pw-big { font-size: 56px; line-height: 1.1; }
.pw-status { color: var(--gold-ink); font-weight: 600; }

/* Carta Picante de la ronda: aparece dándose vuelta. */
.p-picante.pic-reveal { font-size: 18px; padding: 22px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; animation: picFlip 0.9s cubic-bezier(.2,1.4,.4,1) both; }
.p-picante.pic-reveal .pic-ico { font-size: 54px; }
.p-picante.pic-reveal b { font-size: 24px; }
@keyframes picFlip { 0% { transform: perspective(600px) rotateY(90deg) scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- Efectos de los sabotajes ---------- */
/* Todos bien grandes y animados: no se pueden pasar por alto. */
.fx { position: fixed; z-index: 240; pointer-events: none; }

/* Entrada: estallido de color + emoji gigante + título. */
.fx-intro { inset: 0; z-index: 280; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px; animation: introOut 1.7s ease-in forwards; }
.fx-intro .burst { position: absolute; inset: -20%; background: radial-gradient(circle, var(--c) 0%, color-mix(in srgb, var(--c) 70%, transparent) 35%, #000c 75%); animation: burst 0.6s cubic-bezier(.2,1.4,.4,1) both; }
.fx-intro b { position: relative; font-size: 150px; line-height: 1; animation: introPop 0.7s cubic-bezier(.2,1.6,.4,1) both, wiggle 0.25s 0.7s ease-in-out 4 alternate; filter: drop-shadow(0 8px 24px #000a); }
.fx-intro strong { position: relative; font-size: 34px; font-weight: 700; color: #fff; text-shadow: 0 4px 0 #0008, 0 0 20px var(--c); animation: introPop 0.6s 0.15s cubic-bezier(.2,1.6,.4,1) both; letter-spacing: 0.02em; }
.fx-intro small { position: relative; font-size: 18px; color: #fff; opacity: 0.9; animation: introPop 0.5s 0.3s both; }
@keyframes burst { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes introPop { from { transform: scale(0) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wiggle { from { transform: rotate(-12deg) scale(1.05); } to { transform: rotate(12deg) scale(1.1); } }
@keyframes introOut { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* 🌑 Apagón: las luces parpadean y se apagan; queda una luna tenue latiendo. */
.fx-black { inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; animation: lightsOut 0.9s linear both; }
.fx-black span { font-size: 90px; opacity: 0.18; animation: pulse 1.6s infinite; }
.fx-black small { color: #333; font-size: 22px; font-weight: 700; letter-spacing: 0.3em; }
@keyframes lightsOut { 0% { opacity: 0; } 10% { opacity: 1; } 20% { opacity: 0.2; } 35% { opacity: 1; } 45% { opacity: 0.4; } 60%, 100% { opacity: 1; } }

/* 🐈 Gato: camina de punta a punta, deja huellas y maúlla. */
.fx-cat { inset: 0; overflow: hidden; }
.fx-cat .walker { position: absolute; bottom: 90px; left: 0; font-size: 110px; animation: catWalk 3.2s linear infinite, catBob 0.32s ease-in-out infinite alternate; filter: drop-shadow(0 6px 10px #000a); }
.fx-cat .walker.back { bottom: auto; top: 38%; font-size: 90px; animation: catWalkBack 4s linear infinite, catBob 0.3s ease-in-out infinite alternate; animation-delay: -1.5s, 0s; }
@keyframes catWalk { from { translate: -140px 0; } to { translate: calc(100vw + 20px) 0; } }
@keyframes catWalkBack { from { translate: calc(100vw + 20px) 0; transform: scaleX(-1); } to { translate: -140px 0; transform: scaleX(-1); } }
@keyframes catBob { from { margin-bottom: 0; } to { margin-bottom: 10px; } }
.fx-cat i { position: absolute; font-style: normal; font-size: 34px; rotate: var(--r); animation: pawFade 1.5s ease-out forwards; }
@keyframes pawFade { from { opacity: 0.95; scale: 1.2; } to { opacity: 0; scale: 0.8; } }
.fx-cat em { position: absolute; font-style: normal; font-weight: 700; font-size: 30px; color: #fff; background: #ff9f1c; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 12px #0008; animation: meow 0.9s ease-out forwards; }
@keyframes meow { from { transform: scale(0.3) rotate(-10deg); opacity: 0; } 30% { transform: scale(1.2) rotate(5deg); opacity: 1; } to { transform: translateY(-40px); opacity: 0; } }
.fx-cat .tag, .fx-flash .tag { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); background: #ff9f1c; color: #1b1238; font-weight: 700; padding: 8px 18px; border-radius: 999px; font-size: 20px; white-space: nowrap; animation: tagPulse 0.6s ease-in-out infinite alternate; }
@keyframes tagPulse { to { transform: translateX(-50%) scale(1.08); } }

/* 🙃 Mundo del revés: gira de golpe con rebote y al terminar vuelve girando. */
html.fx-flip #app { transform: rotate(180deg); transform-origin: 50% var(--fx-oy, 50%); animation: flipIn 0.9s cubic-bezier(.3,1.5,.5,1); }
html.fx-unflip #app { transform-origin: 50% var(--fx-oy, 50%); animation: flipOut 0.9s cubic-bezier(.3,1.5,.5,1); }
@keyframes flipIn { from { transform: rotate(0); } to { transform: rotate(180deg); } }
@keyframes flipOut { from { transform: rotate(180deg); } to { transform: rotate(360deg); } }

/* 🌫️ Niebla: nubes enormes que pasan y todo borroso. */
html.fx-fog #app { animation: fog var(--fog-ms, 15000ms) ease-in forwards; }
@keyframes fog { 0% { filter: blur(16px) brightness(1.3); } 70% { filter: blur(8px) brightness(1.15); } 100% { filter: blur(0); } }
.fx-clouds { inset: 0; overflow: hidden; background: linear-gradient(#e6eef7aa, #c9d6e3cc); animation: fogFade var(--fog-ms, 15000ms) ease-in forwards; }
.fx-clouds span { position: absolute; left: 0; animation: cloud 6s linear infinite; opacity: 0.95; }
@keyframes cloud { from { translate: -60vw 0; } to { translate: 110vw 0; } }
@keyframes fogFade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* 📳 Terremoto: tiembla fuerte y la pantalla titila en rojo y blanco. */
html.fx-quake #app { animation: quake 0.11s linear infinite; }
@keyframes quake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-12px, 6px) rotate(-2.5deg); } 50% { transform: translate(10px, -8px) rotate(2deg); } 75% { transform: translate(-8px, -5px) rotate(-1deg); } 100% { transform: translate(0, 0); } }
.fx-flash { inset: 0; animation: flash 0.3s steps(1) infinite; }
.fx-flash .tag { background: var(--bad); color: #fff; }
@keyframes flash { 0% { background: #ff5a5f88; } 50% { background: #ffffff66; } }

/* ❄️ Freezer: escarcha desde los bordes, copos cayendo y un copo gigante. */
.fx-ice { inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: radial-gradient(circle at 50% 45%, #bfe9ff44, #7fd3ffbb); animation: frost 1s ease-out both; }
.fx-ice b { font-size: 130px; animation: spinSlow 6s linear infinite; filter: drop-shadow(0 0 20px #fff); }
.fx-ice strong { font-size: 32px; color: #fff; text-shadow: 0 0 12px #4fc3f7, 0 3px 0 #0006; letter-spacing: 0.05em; }
.fx-ice i { position: absolute; top: -40px; font-style: normal; animation: snow 4s linear infinite; }
@keyframes frost { from { box-shadow: inset 0 0 0 0 #ffffff00; opacity: 0; } to { box-shadow: inset 0 0 90px 40px #e8f8ffee; opacity: 1; } }
@keyframes snow { to { translate: 0 110vh; rotate: 360deg; } }
@keyframes spinSlow { to { rotate: 360deg; } }

/* 🔀 Licuadora: una licuadora gira enorme cada vez que mezcla y las tarjetas bailan. */
.fx-blender { inset: 0; display: grid; place-items: center; background: radial-gradient(circle, #4fd18b66, transparent 70%); }
.fx-blender b { font-size: 160px; animation: blendSpin 1.2s cubic-bezier(.4,0,.2,1) both; filter: drop-shadow(0 8px 20px #000a); }
@keyframes blendSpin { from { transform: scale(0) rotate(0); } 40% { transform: scale(1.2) rotate(360deg); } to { transform: scale(0) rotate(1080deg); opacity: 0; } }
.p-field.shuffled { animation: shuffled 0.8s cubic-bezier(.3,1.6,.5,1); }
@keyframes shuffled { 0% { transform: scale(0.6) rotate(-8deg); opacity: 0.2; } 60% { transform: scale(1.05) rotate(3deg); opacity: 1; } 100% { transform: none; } }

/* 🚫 Sin vocal: la vocal gigante tachada y un cartel que salta si la intentás usar. */
.fx-vowel { inset: 0; display: grid; place-items: center; }
.fx-vowel b { position: relative; font-size: 220px; line-height: 1; color: #fff; text-shadow: 0 0 30px var(--picante); animation: introPop 0.6s cubic-bezier(.2,1.6,.4,1) both, introOut 1.8s ease-in forwards; }
.fx-vowel b::after { content: ''; position: absolute; left: -10%; right: -10%; top: 50%; height: 22px; background: var(--bad); border-radius: 12px; transform: rotate(-35deg); box-shadow: 0 0 20px var(--bad); }
.fx-badge { top: 84px; left: 50%; transform: translateX(-50%); background: var(--picante); color: #fff; font-weight: 700; padding: 10px 20px; border-radius: 999px; font-size: 22px; white-space: nowrap; box-shadow: 0 4px 16px #0008; animation: tagPulse 0.7s ease-in-out infinite alternate; }
.fx-badge.blend-badge { top: auto; bottom: 96px; background: var(--verde); color: var(--card-ink); }
.fx-badge.nope { animation: nope 0.4s; background: var(--bad); }
@keyframes nope { 20%, 60% { transform: translateX(-60%) scale(1.15); } 40%, 80% { transform: translateX(-40%) scale(1.15); } }

/* 🌶️ Lluvia de picantes: caen desde arriba rebotando y se mueven; tocándolos explotan. */
.fx-rain { inset: 0; }
.fx-rain span { position: absolute; pointer-events: auto; cursor: pointer; rotate: var(--r); animation: chiliDrop 0.6s cubic-bezier(.3,1.5,.5,1) both, chiliWobble 0.5s ease-in-out infinite alternate; filter: drop-shadow(0 6px 8px #000a); }
.fx-rain span.gone { transition: transform 0.25s, opacity 0.25s; transform: scale(2) !important; opacity: 0; }
@keyframes chiliDrop { from { translate: 0 -110vh; } }
@keyframes chiliWobble { from { transform: rotate(-12deg); } to { transform: rotate(12deg) scale(1.08); } }

/* Reloj trucho: alarma para todos. */
.fx-alarm b { animation: introPop 0.6s cubic-bezier(.2,1.6,.4,1) both, ring 0.08s 0.6s linear infinite; }
@keyframes ring { 0% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }

.fx-spy { top: 30%; left: 16px; right: 16px; margin: 0 auto; max-width: 420px; background: var(--bg-2); border: 3px solid var(--verde); border-radius: 18px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; animation: introPop 0.4s cubic-bezier(.2,1.6,.4,1) both; }
.fx-spy small { color: var(--muted); font-size: 15px; }
.fx-spy b { font-size: 30px; }
/* Escudo activo: la pantalla brilla, sin tapar nada. */
html.fx-shield body::after { content: ''; position: fixed; inset: 0; z-index: 230; pointer-events: none; border-radius: 6px; box-shadow: inset 0 0 22px 6px #4fc3f7aa, inset 0 0 60px 10px #ffd16644; animation: shieldGlow 1.6s ease-in-out infinite; }
@keyframes shieldGlow { 50% { box-shadow: inset 0 0 34px 10px #4fc3f7dd, inset 0 0 80px 18px #ffd16666; } }

/* Poderes de los demás (se ven qué tiene cada uno). */
.picons { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.pico { font-size: 18px; line-height: 1; background: var(--bg-3); border: 0; border-radius: 6px; padding: 3px 4px; color: var(--gold-ink); font-weight: 700; font-family: inherit; }
.others-pw { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.others-pw li { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border-radius: 12px; padding: 6px 10px; }
.others-pw li > span:first-of-type { font-weight: 600; }
.others-pw .picons { margin-left: auto; }
.others-pw .pico { font-size: 22px; padding: 4px 6px; }

/* Modo personalizado: colores del juego que se suman al mazo. */
.personal { display: flex; flex-direction: column; }
.deck-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.deck-colors button { background: var(--bg-3); color: var(--ink); }
.deck-colors button.on { background: var(--c); color: var(--card-ink); }

.p-round { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: -4px; }

/* ---------- Equipos (lobby) ---------- */
.teams-box { margin: 14px 0; }
.teams-box h3 { margin: 0 0 4px; }
.team-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.team-card { background: var(--c-tinte); border: var(--borde); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.team-card.mine { background: var(--c); color: var(--c-ink); box-shadow: var(--sombra); }
.team-card .tc-head { display: flex; align-items: center; gap: 6px; min-height: 32px; }
.team-card .tc-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.team-card .tc-edit { padding: 2px 8px; font-size: 14px; }
.team-card ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.team-card .btn { padding: 6px 10px; font-size: 14px; }
.team-card .tc-mine { font-weight: 700; }
.tc-rename { display: flex; gap: 4px; width: 100%; }
.tc-rename input { flex: 1; min-width: 0; padding: 4px 8px; font-size: 15px; }
.tc-rename .btn { padding: 4px 8px; font-size: 13px; }

/* ---------- Elegir ítems (Poderoso) ---------- */
.draft-title { font-weight: 700; font-size: 17px; text-align: center; margin: 6px 0 10px; }
.draft-offers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.draft-offer { width: 100%; text-align: left; border: var(--borde); font: inherit; color: var(--tinta); cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; }
.draft-offer.sel {
  background: var(--tinte-amarillo); transform: scale(1.02);
  box-shadow: 0 0 0 4px var(--amarillo), 0 0 22px 8px rgba(255, 201, 60, 0.85);
  animation: draft-glow 1.2s ease-in-out infinite alternate;
}
@keyframes draft-glow { from { box-shadow: 0 0 0 4px var(--amarillo), 0 0 10px 3px rgba(255, 201, 60, 0.6); } to { box-shadow: 0 0 0 4px var(--amarillo), 0 0 26px 10px rgba(255, 201, 60, 0.95); } }
.offer .pw-icon { width: 64px; height: 64px; font-size: 34px; }

/* ---------- Tarjetas de ítems (SHOP y elegir ítems): dibujo grande arriba, texto corto abajo ---------- */
.offer-grid, .draft-offers { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
.offer.offer-card { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; text-align: center; }
.offer-card .oc-img { aspect-ratio: 1 / 1; width: 100%; display: grid; place-items: center; background: #fff; border-radius: 12px; font-size: 96px; line-height: 1; }
.offer-card .oc-img img.pimg { width: 100%; height: 100%; }
.offer-card .oc-img.letter { font-weight: 700; color: var(--gold-ink); }
.offer-card .oc-txt { flex: none; }
.offer-card .oc-txt .tag { font-size: 10px; }
.offer-card .oc-txt b { display: block; font-size: 15px; line-height: 1.15; }
.offer-card .oc-txt p { font-size: 11.5px; line-height: 1.25; margin-top: 2px !important; }
.offer-card > .btn { width: 100%; padding: 8px; font-size: 15px; }
