:root {
  --bg1: #1b0a3f; --bg2: #3a1380; --bg3: #5b21b6;
  --pink: #ff3d81; --cyan: #19d3ff; --yellow: #ffd23f; --green: #2ee59d; --purple: #7b2ff7; --orange: #ff8a3d;
  --ink: #12123a; --card: rgba(255,255,255,.1); --card-solid: #2b1163; --line: rgba(255,255,255,.18);
  --text: #fff; --muted: rgba(255,255,255,.7);
  --shadow: 0 6px 0 rgba(0,0,0,.28);
  --font: "Fredoka", "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--text); font-weight: 500;
  background: linear-gradient(160deg, var(--bg1), var(--bg2) 55%, var(--bg3));
  background-attachment: fixed; overflow-x: hidden; touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
input, button { font-family: inherit; }
input { user-select: text; -webkit-user-select: text; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---- fondo animado ---- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.bg i:nth-child(1) { width: 46vmax; height: 46vmax; background: var(--pink); left: -15vmax; top: -10vmax; opacity: .35; }
.bg i:nth-child(2) { width: 40vmax; height: 40vmax; background: var(--cyan); right: -14vmax; top: 18vh; opacity: .28; animation-delay: -6s; }
.bg i:nth-child(3) { width: 36vmax; height: 36vmax; background: var(--yellow); left: 10vw; bottom: -18vmax; opacity: .2; animation-delay: -3s; }
.bg i:nth-child(4) { width: 30vmax; height: 30vmax; background: var(--green); right: 5vw; bottom: -12vmax; opacity: .22; animation-delay: -9s; }
@keyframes float { to { transform: translate(6vmax, 5vmax) scale(1.15); } }

/* ---- estructura ---- */
#top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 14px 0; max-width: 1100px; margin: 0 auto; min-height: 44px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 10px 14px calc(28px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .wrap { max-width: 1000px; } }
.enter > * { animation: pop .38s cubic-bezier(.2,1.4,.4,1) both; }
.enter > *:nth-child(2) { animation-delay: .05s; } .enter > *:nth-child(3) { animation-delay: .1s; }
.enter > *:nth-child(4) { animation-delay: .15s; } .enter > *:nth-child(5) { animation-delay: .2s; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1.5px solid var(--line); padding: 5px 11px; border-radius: 99px; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.chip.c { background: color-mix(in srgb, var(--c) 30%, transparent); border-color: var(--c); }
.iconbtn { background: var(--card); border: 1.5px solid var(--line); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.mini-logo { font-weight: 700; letter-spacing: .5px; font-size: 1.05rem; }
.mini-logo b { color: var(--yellow); }

.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 16px; backdrop-filter: blur(6px); margin-bottom: 14px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
.sec-title { font-size: .85rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 14px 2px 8px; font-weight: 600; }

/* ---- botones ---- */
.btn { display: block; width: 100%; border: 0; border-radius: 18px; padding: 15px 18px; font-size: 1.15rem; font-weight: 700; color: var(--ink); background: var(--yellow); box-shadow: 0 6px 0 #c79a00; cursor: pointer; transition: transform .08s, box-shadow .08s; text-align: center; }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #c79a00; }
.btn.pink { background: var(--pink); color: #fff; box-shadow: 0 6px 0 #b3184f; } .btn.pink:active { box-shadow: 0 1px 0 #b3184f; }
.btn.cyan { background: var(--cyan); box-shadow: 0 6px 0 #0a8fb3; } .btn.cyan:active { box-shadow: 0 1px 0 #0a8fb3; }
.btn.green { background: var(--green); box-shadow: 0 6px 0 #14a06b; } .btn.green:active { box-shadow: 0 1px 0 #14a06b; }
.btn.ghost { background: var(--card); color: #fff; border: 1.5px solid var(--line); box-shadow: none; }
.btn.small { padding: 9px 14px; font-size: .95rem; width: auto; display: inline-block; box-shadow: 0 4px 0 #c79a00; border-radius: 14px; }
.btn.big { font-size: 1.5rem; padding: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; } .row > * { flex: 1; }
.row.wrapr { flex-wrap: wrap; } .row.wrapr > * { flex: 0 0 auto; }
.stack > * + * { margin-top: 12px; }

input.field { width: 100%; background: rgba(0,0,0,.28); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; color: #fff; font-size: 1.2rem; font-weight: 600; outline: none; }
input.field:focus { border-color: var(--cyan); }
input.code-in { text-align: center; letter-spacing: 10px; text-transform: uppercase; font-size: 1.6rem; font-weight: 700; }

/* ---- home ---- */
.logo { text-align: center; font-size: clamp(2.6rem, 14vw, 4.2rem); font-weight: 700; line-height: .95; margin: 14px 0 4px; letter-spacing: -1px; text-shadow: 0 5px 0 rgba(0,0,0,.3); }
.logo span { color: var(--yellow); display: inline-block; transform: rotate(-4deg); }
.logo em { font-style: normal; display: block; font-size: .42em; letter-spacing: 3px; color: var(--cyan); margin-top: 6px; }
.tagline { text-align: center; color: var(--muted); margin: 0 0 16px; }
.shapes { display: flex; justify-content: center; gap: 12px; margin: 10px 0 18px; }
.shapes b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; box-shadow: 0 4px 0 rgba(0,0,0,.25); font-size: 1.1rem; color: var(--ink); animation: bob 2.4s ease-in-out infinite; }
.shapes b:nth-child(2) { animation-delay: .2s; } .shapes b:nth-child(3) { animation-delay: .4s; } .shapes b:nth-child(4) { animation-delay: .6s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(6deg); } }
.avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatars button { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; background: rgba(0,0,0,.25); font-size: 1.4rem; cursor: pointer; }
.avatars button.on { border-color: var(--yellow); background: rgba(255,210,63,.25); transform: scale(1.08); }
.links { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.links button { background: none; border: 0; color: var(--muted); font-size: .95rem; text-decoration: underline; cursor: pointer; }

/* ---- crear partida ---- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { text-align: left; border: 2.5px solid var(--line); background: var(--card); border-radius: 18px; padding: 12px; color: #fff; cursor: pointer; }
.mode b { font-size: 1.05rem; display: block; } .mode small { color: var(--muted); line-height: 1.2; display: block; margin-top: 3px; }
.mode.on { border-color: var(--yellow); background: rgba(255,210,63,.18); box-shadow: 0 0 0 3px rgba(255,210,63,.2); }
.mode .em { font-size: 1.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gchip { border: 2px solid var(--c); background: transparent; color: #fff; padding: 7px 12px; border-radius: 99px; font-weight: 600; cursor: pointer; opacity: .55; font-size: .92rem; }
.gchip.on { background: var(--c); color: var(--ink); opacity: 1; }
.seg { display: flex; background: rgba(0,0,0,.28); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; color: #fff; padding: 10px 4px; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: .95rem; }
.seg button.on { background: var(--cyan); color: var(--ink); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; cursor: pointer; }
.toggle .sw { width: 52px; height: 30px; border-radius: 99px; background: rgba(0,0,0,.35); position: relative; flex: none; transition: background .2s; }
.toggle .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on .sw { background: var(--green); } .toggle.on .sw::after { transform: translateX(22px); }

/* ---- lobby ---- */
.code-card { text-align: center; }
.code { display: flex; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.code b { width: clamp(52px, 17vw, 92px); aspect-ratio: .85; display: grid; place-items: center; font-size: clamp(2.2rem, 10vw, 4.4rem); border-radius: 16px; color: var(--ink); box-shadow: var(--shadow); }
.code b:nth-child(1) { background: var(--pink); color: #fff; } .code b:nth-child(2) { background: var(--cyan); }
.code b:nth-child(3) { background: var(--yellow); } .code b:nth-child(4) { background: var(--green); }
.qr { width: min(200px, 56vw); background: #fff; border-radius: 16px; padding: 6px; margin: 4px auto 10px; display: block; }
.link-row { display: flex; gap: 8px; } .link-row input { flex: 1; min-width: 0; font-size: .85rem; padding: 10px 12px; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.pl { position: relative; text-align: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 10px 4px 8px; animation: pop .35s both; }
.pl .av { font-size: 2rem; } .pl .nm { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.pl.off { opacity: .45; } .pl .x { position: absolute; top: 2px; right: 4px; background: none; border: 0; color: #fff; opacity: .6; font-size: 1rem; cursor: pointer; }
.pl.t-A { border-color: var(--pink); background: rgba(255,61,129,.18); } .pl.t-B { border-color: var(--cyan); background: rgba(25,211,255,.16); }
.pl.me { box-shadow: 0 0 0 3px var(--yellow); }
.inv { display: flex; gap: 8px; flex-wrap: wrap; }
.inv .pu { display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.28); border-radius: 12px; padding: 6px 10px; font-weight: 600; }
.inv .pu.zero { opacity: .35; }
.pulse { animation: pulse 1.6s ease-in-out infinite; } @keyframes pulse { 50% { transform: scale(1.035); } }

/* ---- cuenta atrás ---- */
.cd { text-align: center; padding-top: 6vh; }
.cd .rd { display: inline-block; font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 700; padding: 8px 22px; border-radius: 20px; background: var(--pink); box-shadow: var(--shadow); transform: rotate(-2deg); }
.cd .rd.lightning { background: var(--yellow); color: var(--ink); } .cd .rd.final { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.cd .num { font-size: clamp(7rem, 40vw, 14rem); font-weight: 700; line-height: 1; animation: zoom 1s infinite; text-shadow: 0 8px 0 rgba(0,0,0,.3); }
@keyframes zoom { 0% { transform: scale(1.4); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(.9); } }

/* ---- pregunta ---- */
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.qhead .sp { flex: 1; }
.round { padding: 5px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; background: var(--purple); }
.round.lightning { background: var(--yellow); color: var(--ink); } .round.final { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.timer { position: relative; height: 22px; border-radius: 99px; background: rgba(0,0,0,.35); overflow: hidden; margin-bottom: 12px; }
.timer #tbar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); border-radius: 99px; }
.timer #tbar[data-low="1"] { background: linear-gradient(90deg, var(--pink), var(--orange)); animation: blink .5s infinite alternate; }
@keyframes blink { to { filter: brightness(1.4); } }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .9rem; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.qtext { font-size: clamp(1.25rem, 5.4vw, 2rem); line-height: 1.2; text-align: center; margin: 4px 0 16px; text-wrap: balance; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ans { position: relative; border: 0; border-radius: 20px; min-height: clamp(96px, 22vh, 150px); padding: 12px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: clamp(1rem, 4.2vw, 1.4rem); line-height: 1.15; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s, opacity .2s, filter .2s; text-wrap: balance; }
.ans i { font-style: normal; font-size: 1.6rem; opacity: .85; }
.ans:active:not([disabled]) { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0,0,0,.28); }
.ans.a0 { background: var(--pink); color: #fff; } .ans.a1 { background: var(--cyan); } .ans.a2 { background: var(--yellow); } .ans.a3 { background: var(--green); }
.ans.gone { visibility: hidden; } .ans.dim { opacity: .3; filter: grayscale(.6); }
.ans.picked { outline: 5px solid #fff; outline-offset: 2px; }
.ans.right { outline: 5px solid #fff; outline-offset: 2px; animation: pulse .8s infinite; box-shadow: 0 0 30px 6px rgba(255,255,255,.55), var(--shadow); }
.ans[disabled] { cursor: default; }
.ans .spy { position: absolute; top: 6px; right: 8px; font-size: 1.4rem; animation: bob 1s infinite; }
.answers.static .ans { cursor: default; }
.status { text-align: center; padding: 12px; font-weight: 600; color: var(--muted); }
.allin { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 2.5px dashed var(--orange); background: transparent; color: #fff; border-radius: 16px; padding: 9px; font-weight: 700; margin-bottom: 12px; cursor: pointer; }
.allin.on { background: var(--orange); color: var(--ink); border-style: solid; animation: pulse .9s infinite; }
.pubar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; margin-top: 14px; }
.pub { position: relative; border: 2px solid var(--c); background: rgba(0,0,0,.3); color: #fff; border-radius: 16px; padding: 8px 0 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pub .e { font-size: 1.5rem; line-height: 1.1; } .pub small { font-size: .62rem; font-weight: 600; opacity: .85; }
.pub .n { position: absolute; top: -8px; right: -5px; min-width: 22px; height: 22px; border-radius: 99px; background: var(--c); color: var(--ink); font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.pub.zero { opacity: .45; } .pub.used { background: var(--c); color: var(--ink); } .pub[disabled] { opacity: .3; pointer-events: none; }
.mebar { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.3); border-radius: 18px; padding: 8px 12px; margin-top: 14px; }
.mebar .av { font-size: 1.6rem; } .mebar .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mebar .pts { font-weight: 700; color: var(--yellow); }
.who-answered { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; min-height: 40px; }
.who-answered span { font-size: 1.5rem; opacity: .3; transition: all .25s; } .who-answered span.ok { opacity: 1; transform: scale(1.15); }
.hostbar { display: flex; gap: 10px; margin-top: 14px; } .hostbar .btn { flex: 1; }

/* ---- reveal ---- */
.meme { position: relative; border-radius: 24px; overflow: hidden; text-align: center; padding: 14px 10px 16px; box-shadow: var(--shadow); background: linear-gradient(160deg, var(--purple), var(--pink)); }
.meme.m-win, .meme.m-streak { background: linear-gradient(160deg, #14a06b, var(--green) 60%, var(--yellow)); color: var(--ink); }
.meme.m-fail { background: linear-gradient(160deg, #6a1f8f, var(--pink)); } .meme.m-sleep { background: linear-gradient(160deg, #26356e, #4a5bb0); }
.meme.m-shield { background: linear-gradient(160deg, var(--purple), var(--cyan)); }
.meme-emoji { font-size: clamp(5rem, 26vw, 8rem); line-height: 1.1; display: inline-block; animation: wiggle 1.3s ease-in-out infinite; }
.m-win .meme-emoji, .m-streak .meme-emoji { animation: jump .8s ease-in-out infinite; } .m-sleep .meme-emoji { animation: sway 2s ease-in-out infinite; }
@keyframes wiggle { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.1); } }
@keyframes jump { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.12); } }
@keyframes sway { 0%,100% { transform: translateX(-10px) rotate(-6deg); } 50% { transform: translateX(10px) rotate(6deg); } }
.meme img, .meme video { max-height: 220px; max-width: 100%; border-radius: 16px; display: block; margin: 0 auto; }
.meme-cap { font-family: Impact, "Arial Black", var(--font); font-size: clamp(1.3rem, 6vw, 2rem); text-transform: uppercase; color: #fff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 3px 0 #000; margin-top: 6px; line-height: 1.05; letter-spacing: .5px; }
.res-line { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; align-items: center; }
.pts { font-size: 2.6rem; font-weight: 700; line-height: 1; } .pts.pos { color: var(--green); } .pts.neg { color: var(--pink); } .pts.zero { color: var(--muted); }
.correct-banner { background: rgba(255,255,255,.14); border-radius: 18px; padding: 10px 14px; text-align: center; font-weight: 600; }
.correct-banner b { display: block; font-size: 1.25rem; color: var(--green); }
.bars { display: grid; gap: 8px; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar .l { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: var(--ink); flex: none; }
.bar .track { flex: 1; height: 30px; background: rgba(0,0,0,.28); border-radius: 10px; overflow: hidden; position: relative; }
.bar .fill { height: 100%; border-radius: 10px; transform-origin: left; animation: grow .7s cubic-bezier(.2,1,.3,1) both; min-width: 6px; }
.bar .track span { position: absolute; left: 10px; top: 0; bottom: 0; display: flex; align-items: center; font-size: .85rem; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap; max-width: calc(100% - 50px); overflow: hidden; }
.bar .ct { width: 28px; text-align: right; font-weight: 700; }
.bar.right .l::after { content: "✓"; position: absolute; } .bar.right .track { box-shadow: 0 0 0 3px #fff; } .bar.dim { opacity: .45; }
@keyframes grow { from { transform: scaleX(0); } }
.bg0 { background: var(--pink); color: #fff; } .bg1 { background: var(--cyan); } .bg2 { background: var(--yellow); } .bg3 { background: var(--green); }
.lb { display: grid; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 8px 12px; animation: pop .4s both; animation-delay: calc(var(--i) * .06s); }
.lb-row.me { background: rgba(255,210,63,.22); border-color: var(--yellow); }
.lb-row .rk { width: 26px; text-align: center; font-weight: 700; font-size: 1.15rem; }
.lb-row .av { font-size: 1.5rem; } .lb-row .nm { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .sc { font-weight: 700; font-variant-numeric: tabular-nums; } .lb-row .dl { font-size: .8rem; font-weight: 700; color: var(--green); min-width: 52px; text-align: right; }
.lb-row .dl.neg { color: var(--pink); } .lb-row .hearts { font-size: .8rem; letter-spacing: -1px; }
.lb-row.dead { opacity: .5; } .teamdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cols { display: grid; gap: 14px; } @media (min-width: 900px) { .cols.two { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---- minijuegos ---- */
.mgbox { text-align: center; padding-top: 3vh; }
.mgbox h1 { font-size: clamp(2.2rem, 10vw, 3.4rem); text-shadow: 0 5px 0 rgba(0,0,0,.3); } .mgbox p { color: var(--muted); font-size: 1.1rem; }
.tapbtn { width: min(78vw, 360px); aspect-ratio: 1; border-radius: 50%; border: 0; margin: 14px auto; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ff8fb8, var(--pink) 55%, #b3184f); color: #fff; font-size: 3rem; font-weight: 700; box-shadow: 0 10px 0 #7a1036, 0 0 50px rgba(255,61,129,.6); cursor: pointer; touch-action: manipulation; }
.tapbtn:active { transform: translateY(7px) scale(.97); box-shadow: 0 3px 0 #7a1036; }
.tapbtn small { font-size: 1.4rem; display: block; }
.reflex { border-radius: 28px; min-height: 52vh; display: grid; place-items: center; font-size: clamp(2rem, 10vw, 3.4rem); font-weight: 700; text-align: center; margin-top: 14px; cursor: pointer; box-shadow: var(--shadow); padding: 16px; }
.reflex.wait { background: var(--pink); } .reflex.go { background: var(--green); color: var(--ink); animation: pulse .3s infinite; } .reflex.done { background: var(--card-solid); }
.bignum { font-size: 5rem; font-weight: 700; line-height: 1; }

/* ---- final ---- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 18px 0 22px; min-height: 240px; }
.pod { flex: 1; max-width: 160px; text-align: center; }
.pod .av { font-size: clamp(2.4rem, 12vw, 3.6rem); display: block; animation: jump 1.2s infinite; }
.pod .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pod .sc { color: var(--yellow); font-weight: 700; }
.pod .blk { margin-top: 6px; border-radius: 16px 16px 0 0; display: grid; place-items: start center; padding-top: 8px; font-size: 2.2rem; font-weight: 700; color: var(--ink); animation: rise .8s cubic-bezier(.2,1.2,.3,1) both; }
.pod.p1 .blk { height: 150px; background: var(--yellow); } .pod.p2 .blk { height: 108px; background: #dfe6ff; animation-delay: .15s; } .pod.p3 .blk { height: 80px; background: var(--orange); animation-delay: .3s; }
@keyframes rise { from { height: 0; } }
.crown { font-size: 2rem; display: block; }
.teambar { display: flex; height: 54px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); font-weight: 700; font-size: 1.1rem; }
.teambar > div { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); transition: flex .6s; }

/* ---- overlays ---- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10,4,30,.75); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); }
@media (min-width: 700px) { .modal { align-items: center; } }
.sheet { background: linear-gradient(170deg, #34146f, var(--bg1)); width: min(560px, 100%); max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); border: 1.5px solid var(--line); animation: slide .3s cubic-bezier(.2,1.2,.4,1); }
@media (min-width: 700px) { .sheet { border-radius: 26px; } }
@keyframes slide { from { transform: translateY(60px); opacity: 0; } }
.sheet h2 { margin-bottom: 4px; } .sheet .close { float: right; }
.shop-item { display: grid; grid-template-columns: 54px 1fr; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shop-item:last-child { border: 0; }
.shop-item .e { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: color-mix(in srgb, var(--c) 35%, transparent); border: 2px solid var(--c); }
.shop-item .d small { display: block; color: var(--muted); line-height: 1.2; } .shop-item b { font-size: 1.05rem; }
.shop-item .buy { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; }
.buybtn { border: 0; border-radius: 14px; padding: 10px 6px; font-weight: 700; font-size: .98rem; cursor: pointer; background: var(--cyan); color: var(--ink); box-shadow: 0 4px 0 #0a8fb3; position: relative; }
.buybtn.best { background: var(--yellow); box-shadow: 0 4px 0 #c79a00; } .buybtn:active { transform: translateY(3px); box-shadow: none; }
.buybtn em { position: absolute; top: -9px; right: 8px; background: var(--pink); color: #fff; font-style: normal; font-size: .65rem; padding: 2px 7px; border-radius: 99px; }
.demo { background: rgba(255,138,61,.2); border: 1.5px dashed var(--orange); border-radius: 14px; padding: 8px 12px; font-size: .85rem; margin: 8px 0; }
.howto li { margin: 8px 0; line-height: 1.3; } .howto { padding-left: 20px; }
.bomb { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; text-align: center; background: repeating-linear-gradient(45deg, #ff3d81, #ff3d81 30px, #ffd23f 30px, #ffd23f 60px); animation: blink .25s infinite alternate; }
.bomb .em { font-size: 40vmin; animation: wiggle .3s infinite; } .bomb .cap { font-family: Impact, "Arial Black", sans-serif; font-size: 8vmin; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-transform: uppercase; padding: 0 16px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); background: #fff; color: var(--ink); padding: 11px 18px; border-radius: 99px; font-weight: 700; z-index: 90; transition: transform .3s cubic-bezier(.2,1.4,.4,1); max-width: 92vw; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.show { transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }
#reactions { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.fl { position: absolute; bottom: -40px; font-size: 2.4rem; animation: fly 3s ease-out forwards; text-align: center; }
.fl small { display: block; font-size: .7rem; background: rgba(0,0,0,.5); border-radius: 99px; padding: 1px 8px; }
@keyframes fly { to { transform: translateY(-85vh) rotate(18deg); opacity: 0; } }
.reactbar { display: flex; justify-content: space-between; gap: 4px; margin-top: 14px; background: rgba(0,0,0,.28); border-radius: 99px; padding: 5px 8px; }
.reactbar button { background: none; border: 0; font-size: 1.5rem; padding: 4px; cursor: pointer; } .reactbar button:active { transform: scale(1.4); }

/* ================= v2: avatares con foto, equipos, ataques, final ================= */
img.ph { width: 1.15em; height: 1.15em; border-radius: 50%; object-fit: cover; vertical-align: -.2em; background: rgba(255,255,255,.15); }
.av { display: inline-grid; place-items: center; line-height: 1; }
.pl .av, .pod .av { display: grid; }
.avatars { grid-template-columns: repeat(8, 1fr); }
.avatars button, .photo-tile { aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; border: 2px solid transparent; background: rgba(0,0,0,.25); font-size: 1.4rem; cursor: pointer; overflow: hidden; padding: 0; }
.photo-tile { border: 2px dashed var(--cyan); background: rgba(25,211,255,.15); }
.avatars button img.ph { width: 100%; height: 100%; border-radius: 12px; }
.career { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.modeline { text-align: center; font-size: .8rem; margin-top: 14px; }
.daily { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; }
.daily .gift { font-size: 2rem; } .daily > div { flex: 1; } .daily small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.2; }
.daily.ready { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,229,157,.25); animation: pulse 1.8s infinite; }
.daily .btn.small { box-shadow: none; }

/* equipos en el lobby */
.teams-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .teams-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .teams-grid { grid-template-columns: repeat(3, 1fr); } }
.team-box { border: 2.5px solid var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border-radius: 20px; padding: 10px; }
.team-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 1.3rem; }
.team-head b, .team-head input { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 700; }
.tname { background: rgba(0,0,0,.28); border: 2px dashed var(--tc); border-radius: 12px; padding: 7px 10px; color: #fff; font-family: inherit; outline: none; }
.tname:focus { border-style: solid; }
.team-head small { background: var(--tc); color: var(--ink); border-radius: 99px; padding: 1px 9px; font-weight: 700; }
.team-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.team-members .pl { padding: 8px 2px 6px; }
.pl small { display: block; font-size: .65rem; color: var(--muted); }
.pl.t-on { border-color: var(--tc); }
.pl { cursor: default; } .pl[data-act] { cursor: pointer; }
.teamboard { display: grid; gap: 8px; }
.tb-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 56px 34px; align-items: center; gap: 8px; }
.tb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-track { height: 20px; background: rgba(0,0,0,.28); border-radius: 99px; overflow: hidden; }
.tb-fill { height: 100%; border-radius: 99px; transition: width .6s; }
.tb-row small { color: var(--muted); font-size: .7rem; }

/* comodines (8) y ataques */
.pubar { grid-template-columns: repeat(4, 1fr); }
.pub.atk { border-style: dashed; background: rgba(255,61,61,.12); }
.pub.atk::after { content: "🎯"; position: absolute; bottom: -7px; right: -4px; font-size: .8rem; }
.status.warn { color: #fff; background: rgba(255,77,77,.35); border-radius: 14px; }
.targets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.target { position: relative; border: 2.5px solid var(--tc, var(--line)); background: rgba(255,255,255,.08); color: #fff; border-radius: 18px; padding: 14px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-family: inherit; }
.target:active { transform: scale(.96); background: rgba(255,77,77,.35); }
.target .av { font-size: 2.4rem; } .target b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; } .target small { color: var(--muted); }
.target em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--yellow); color: var(--ink); font-style: normal; font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.bomb.ice { background: repeating-linear-gradient(45deg, #1d4ed8, #1d4ed8 30px, #60a5fa 30px, #60a5fa 60px); animation: none; }
.bomb .cap.sm { font-size: 4vmin; margin-top: 8px; }
.shake { animation: shake .5s; } @keyframes shake { 20% { transform: translateX(-12px); } 40% { transform: translateX(12px); } 60% { transform: translateX(-8px); } 80% { transform: translateX(8px); } }

/* final */
.final-title { text-align: center; font-size: 2rem; margin: 6px 0; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.chest { width: 100%; border: 3px dashed var(--yellow); background: rgba(255,210,63,.15); color: #fff; border-radius: 22px; padding: 16px; display: grid; gap: 2px; justify-items: center; cursor: pointer; font-family: inherit; }
.chest span { font-size: 3.4rem; } .chest b { font-size: 1.25rem; } .chest small { color: var(--muted); }
.loot { text-align: center; } .loot-items { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.loot-item { display: flex; flex-direction: column; align-items: center; gap: 2px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 2px solid var(--c); border-radius: 16px; padding: 10px 14px; font-weight: 700; font-size: .85rem; animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.loot-item em { font-style: normal; font-size: 2rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 4px; text-align: center; }
.tile b { font-size: 1.3rem; display: block; } .tile small { color: var(--muted); font-size: .72rem; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 700px) { .awards { grid-template-columns: repeat(3, 1fr); } }
.award { background: linear-gradient(160deg, rgba(255,210,63,.18), rgba(255,61,129,.12)); border: 1.5px solid rgba(255,210,63,.5); border-radius: 16px; padding: 10px 8px; text-align: center; display: grid; gap: 2px; }
.award .ae { font-size: 2rem; } .award small { color: var(--muted); } .award .aw { font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: .8rem; }
.legend i { display: inline-block; width: 12px; height: 4px; border-radius: 4px; margin-right: 4px; vertical-align: middle; }
.stat-table { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
.st-head, .st-row { display: grid; grid-template-columns: 30px 1fr 52px 48px 34px 56px; gap: 4px; align-items: center; padding: 8px 10px; font-size: .88rem; }
.st-head { background: rgba(0,0,0,.3); font-weight: 700; color: var(--muted); }
.st-row + .st-row { border-top: 1px solid var(--line); } .st-row.me { background: rgba(255,210,63,.18); }
.st-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
