/* Fiesta 35 · celular del invitado (mobile-first) */
body.guest { padding-bottom: calc(24px + var(--safe-b)); }
#app { max-width: 560px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 14px 0; }
main#view { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }

/* barra superior */
.topbar { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: .14em; font-size: 12px; color: var(--mut); }
.brand .b35 { font-size: 22px; letter-spacing: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.phase-name { flex: 1; text-align: right; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tablebar {
  --tc: var(--violet);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 6px;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 30%, transparent), rgba(255, 255, 255, .04));
}
.tb-emoji { font-size: 30px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
.tb-name { font-weight: 900; font-size: 17px; line-height: 1.1; }
.tb-sub { font-size: 12px; color: var(--mut); font-weight: 700; }
.tb-aura { text-align: right; }
.tb-aura b { font-size: 24px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; display: block; line-height: 1; }
.tb-aura small { font-size: 10px; letter-spacing: .16em; color: var(--mut); font-weight: 800; }
.tb-time { min-width: 62px; text-align: right; font-size: 20px; }
.stars-row { margin-top: 8px; }

/* registro */
.hero { text-align: center; padding: 18px 8px 6px; }
.hero35 { font-size: 112px; line-height: .9; font-weight: 900; background: linear-gradient(135deg, #ffd166, #ff3d9a 55%, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 30px rgba(255, 61, 154, .45)); animation: float 4s ease-in-out infinite; }
.hero h1 { font-size: 26px; font-weight: 900; margin-top: 4px; }
.hero p { color: var(--mut); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 14px; font-weight: 700; font-size: 14px;
  background: rgba(0, 0, 0, .28); border: 1.5px solid var(--line); transition: all .15s;
}
.opt.sel { border-color: var(--pink); background: rgba(255, 61, 154, .22); box-shadow: 0 0 0 3px rgba(255, 61, 154, .2); }
.opt i.sw { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); display: inline-block; }
.err { color: #ff8a96; font-weight: 700; font-size: 14px; margin-top: 10px; }
.link { color: var(--cyan); font-weight: 700; text-decoration: underline; background: none; padding: 8px; }

/* lobby */
.mates { display: flex; flex-wrap: wrap; gap: 8px; }
.mate { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; background: var(--card2); font-weight: 700; font-size: 14px; }
.mate.me { border: 1.5px solid var(--gold); }
.meter { height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--gold), var(--pink)); transition: width .1s; }
.big-emoji { font-size: 64px; text-align: center; animation: float 3s ease-in-out infinite; }
.note { font-size: 13px; color: var(--mut); }
.warnbox { background: rgba(255, 159, 28, .14); border: 1px solid rgba(255, 159, 28, .5); border-radius: 14px; padding: 12px; font-size: 13px; }

/* caja fuerte */
.vault { text-align: center; }
.vault-door { width: 150px; height: 150px; margin: 4px auto 14px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 30%, #5b5f7a, #23263a 70%); border: 6px solid #2f3350; box-shadow: inset 0 0 0 4px #7d83a8, 0 12px 40px rgba(0, 0, 0, .6); display: grid; place-items: center; font-size: 56px; }
.vault-door::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .25); animation: spin 18s linear infinite; }
.vault.open .vault-door { box-shadow: inset 0 0 0 4px var(--green), 0 0 60px rgba(52, 211, 153, .6); border-color: #14532d; }
.pin-display { display: flex; gap: 10px; justify-content: center; margin: 8px 0 14px; }
.pin-slot { width: 52px; height: 64px; border-radius: 12px; background: #04040c; border: 2px solid #2b2f4d; display: grid; place-items: center; font-family: var(--mono); font-size: 34px; font-weight: 800; color: var(--lime); text-shadow: 0 0 14px var(--lime); }
.pin-slot.fill { border-color: var(--lime); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
.key { min-height: 62px; border-radius: 16px; font-size: 26px; font-weight: 800; background: linear-gradient(180deg, #2a2d49, #1a1c30); border: 1px solid #3d4268; box-shadow: 0 5px 0 #0c0d1b; }
.key:active { transform: translateY(3px); box-shadow: 0 2px 0 #0c0d1b; }
.key.act { font-size: 18px; }

/* bomba */
.bomb-head { display: flex; align-items: center; gap: 12px; }
.led { font-family: var(--mono); font-size: 44px; font-weight: 800; color: #ff3b3b; text-shadow: 0 0 16px #ff3b3b; background: #120406; border: 2px solid #3a0c10; border-radius: 12px; padding: 4px 14px; letter-spacing: .06em; }
.led.warn { animation: blink 1s steps(2) infinite; }
.mod-leds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.mod-led { text-align: center; font-size: 11px; font-weight: 800; color: var(--mut); }
.mod-led i { display: block; width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 4px; background: #3a0c10; box-shadow: inset 0 0 0 2px #5a1a20; }
.mod-led.ok i { background: var(--green); box-shadow: 0 0 14px var(--green); }
.role-tag { display: inline-block; font-size: 11px; letter-spacing: .12em; font-weight: 900; padding: 4px 10px; border-radius: 99px; background: rgba(139, 92, 246, .3); border: 1px solid var(--violet); margin-bottom: 8px; }
.wire { display: flex; align-items: center; gap: 10px; padding: 8px 4px; width: 100%; text-align: left; border-radius: 10px; }
.wire .w-num { width: 24px; font-weight: 900; color: var(--mut); text-align: center; }
.wire .w-line { flex: 1; height: 14px; border-radius: 99px; background: var(--wc); box-shadow: 0 0 12px color-mix(in srgb, var(--wc) 70%, transparent), inset 0 -3px 0 rgba(0, 0, 0, .25); position: relative; }
.wire.cut .w-line { background: repeating-linear-gradient(90deg, var(--wc) 0 18%, transparent 18% 30%); box-shadow: none; opacity: .5; }
.wire.sel { background: rgba(255, 255, 255, .1); outline: 2px solid var(--gold); }
.serial { font-family: var(--mono); font-weight: 800; letter-spacing: .12em; background: #fff; color: #111; padding: 4px 10px; border-radius: 6px; display: inline-block; }
.rules { counter-reset: r; display: flex; flex-direction: column; gap: 8px; }
.rules li { list-style: none; counter-increment: r; padding: 10px 12px 10px 42px; position: relative; background: rgba(0, 0, 0, .25); border-radius: 12px; font-size: 14px; }
.rules li::before { content: counter(r); position: absolute; left: 10px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--violet); font-weight: 900; font-size: 13px; }
.bulb { width: 110px; height: 110px; border-radius: 50%; margin: 6px auto 14px; background: #2a2410; box-shadow: inset 0 0 0 4px #4a4018; transition: background .04s, box-shadow .04s; }
.bulb.on { background: radial-gradient(circle at 40% 35%, #fff9c4, #ffd54a 60%, #ff9f1c); box-shadow: 0 0 70px 20px rgba(255, 213, 74, .8); }
.code-input { text-align: center; font-family: var(--mono); font-size: 30px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.switch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sw-col { text-align: center; }
.lamp { width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 8px; background: #1b1d33; box-shadow: inset 0 0 0 2px #3b3f66; }
.lamp.on { background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.lamp.tgt { width: 14px; height: 14px; margin-bottom: 4px; background: transparent; box-shadow: inset 0 0 0 2px var(--gold); }
.lamp.tgt.on { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.toggle { width: 100%; height: 86px; border-radius: 14px; background: #14152a; border: 2px solid #343862; position: relative; }
.toggle::after { content: ""; position: absolute; left: 12%; right: 12%; height: 42%; border-radius: 9px; background: linear-gradient(180deg, #d6d9f5, #8b90c6); bottom: 8%; transition: all .18s; }
.toggle.on::after { bottom: 50%; background: linear-gradient(180deg, #7dfbff, #22d3ee); box-shadow: 0 0 20px var(--cyan); }
.frag { font-family: var(--mono); font-size: 30px; font-weight: 900; letter-spacing: .2em; color: var(--lime); text-shadow: 0 0 14px var(--lime); }
.banner-big { text-align: center; padding: 26px 14px; border-radius: 20px; font-weight: 900; font-size: 26px; }
.banner-big.good { background: linear-gradient(135deg, rgba(52, 211, 153, .35), rgba(52, 211, 153, .08)); border: 2px solid var(--green); }
.banner-big.bad { background: linear-gradient(135deg, rgba(255, 77, 94, .35), rgba(255, 77, 94, .08)); border: 2px solid var(--red); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 99px; background: var(--card2); font-weight: 800; font-size: 13px; }
.tab.sel { background: var(--grad); }
.morse-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; font-family: var(--mono); font-size: 14px; }
.morse-table b { color: var(--gold); display: inline-block; width: 1.4em; }

/* gianella */
.suspects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.suspect { text-align: left; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1.5px solid var(--line); position: relative; }
.suspect .em { font-size: 34px; }
.suspect b { display: block; font-size: 14px; margin-top: 4px; }
.suspect small { color: var(--mut); font-size: 12px; display: block; margin-top: 2px; }
.suspect.sel { border-color: var(--red); background: rgba(255, 77, 94, .2); }
.suspect .votes { position: absolute; top: 8px; right: 8px; display: flex; gap: 3px; }
.suspect .votes i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.clue { padding: 12px 14px; border-left: 4px solid var(--gold); background: rgba(255, 209, 102, .08); border-radius: 0 12px 12px 0; font-size: 14px; animation: rise .4s both; }
.clue.private { border-color: var(--cyan); background: rgba(34, 211, 238, .08); }
.alibi { border: 1.5px dashed var(--line); }
.alibi.false { border-color: var(--red); } .alibi.shaky { border-color: var(--orange); } .alibi.clean { border-color: var(--green); }
.tape span { background: #ffd23f; padding: 1px 10px; border-radius: 4px; }
.tape { background: repeating-linear-gradient(-45deg, #ffd23f 0 14px, #111 14px 28px); color: #111; font-weight: 900; letter-spacing: .2em; text-align: center; padding: 6px; font-size: 12px; border-radius: 6px; }

/* defib */
.defib-pad { min-height: 260px; border-radius: 26px; display: grid; place-items: center; text-align: center; user-select: none; -webkit-user-select: none; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(255, 61, 154, .35), rgba(139, 92, 246, .12) 65%); border: 2px solid rgba(255, 61, 154, .5); }
.defib-pad.live { animation: glow .5s infinite; border-color: var(--gold); }
.defib-pad .bolt { font-size: 96px; filter: drop-shadow(0 0 24px var(--gold)); }
.defib-pad.live .bolt { animation: pulse .25s infinite; }
.defib-pad .big { font-size: 30px; font-weight: 900; }
.tapbtn { min-height: 120px; font-size: 26px; }

/* kahoot */
.kahoot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.k-btn { min-height: 128px; border-radius: 18px; display: grid; place-items: center; position: relative; box-shadow: 0 7px 0 rgba(0, 0, 0, .35); transition: transform .08s, opacity .2s, filter .2s; }
.k-btn:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.k-btn svg { width: 56px; height: 56px; fill: #fff; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.k-btn .k-txt { position: absolute; bottom: 8px; left: 8px; right: 8px; font-size: 12px; font-weight: 800; text-align: center; opacity: .95; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); line-height: 1.15; }
.k0 { background: #e21b3c; } .k1 { background: #1368ce; } .k2 { background: #d89e00; } .k3 { background: #26890c; }
.k-btn.dim { opacity: .28; filter: grayscale(.6); pointer-events: none; }
.k-btn.picked { outline: 4px solid #fff; }
.k-q { font-size: 18px; font-weight: 800; text-align: center; }
.result-card { text-align: center; padding: 24px 12px; border-radius: 20px; }
.result-card .pts { font-size: 54px; font-weight: 900; line-height: 1; }
.result-card.good { background: linear-gradient(160deg, rgba(52, 211, 153, .35), rgba(52, 211, 153, .06)); border: 2px solid var(--green); }
.result-card.bad { background: linear-gradient(160deg, rgba(255, 77, 94, .35), rgba(255, 77, 94, .06)); border: 2px solid var(--red); }

/* aura */
.bet-grid { display: grid; gap: 10px; }
.bet { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 2px solid var(--line); font-weight: 800; font-size: 17px; text-align: left; width: 100%; }
.bet small { display: block; color: var(--mut); font-weight: 700; font-size: 12px; }
.bet b.amt { font-size: 22px; color: var(--gold); }
.bet.sel { border-color: var(--gold); background: rgba(255, 209, 102, .16); box-shadow: 0 0 0 4px rgba(255, 209, 102, .18); }
.bet.allin { background: linear-gradient(135deg, rgba(255, 61, 154, .3), rgba(255, 159, 28, .22)); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side { padding: 16px 10px; border-radius: 16px; font-weight: 900; text-align: center; background: rgba(0, 0, 0, .3); border: 2px solid var(--line); }
.side.sel { border-color: var(--cyan); background: rgba(34, 211, 238, .18); }
.side.c-ROJO.sel { border-color: #ff4d5e; background: rgba(255, 77, 94, .3); } .side.c-NEGRO.sel { border-color: #aaa; background: rgba(255, 255, 255, .18); } .side.c-VERDE.sel { border-color: var(--green); background: rgba(52, 211, 153, .3); }
.sides.three { grid-template-columns: repeat(3, 1fr); }

/* estatua */
body.guest.statue-live { background: #000; }
.statue-live .topbar, .statue-live .tablebar, .statue-live .stars-row { opacity: .15; }
.statue-card { text-align: center; padding: 40px 12px; }
.statue-card .big-emoji { font-size: 110px; }
.hold-btn { min-height: 190px; border-radius: 28px; font-size: 24px; font-weight: 900; background: radial-gradient(circle, rgba(34, 211, 238, .3), rgba(34, 211, 238, .08)); border: 3px solid var(--cyan); width: 100%; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold-btn.held { background: radial-gradient(circle, rgba(52, 211, 153, .5), rgba(52, 211, 153, .15)); border-color: var(--green); }

/* pixel */
.px-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1.5px solid var(--line); }
.px-card.done { opacity: .5; border-color: var(--green); }
.px-label { font-family: var(--mono); font-size: 36px; font-weight: 900; min-width: 76px; text-align: center; }
.px-sw { width: 40px; height: 40px; border-radius: 10px; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); flex: none; }
.minigrid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 2px; padding: 8px; background: rgba(0, 0, 0, .35); border-radius: 12px; }
.minigrid i { aspect-ratio: 1; border-radius: 3px; background: rgba(255, 255, 255, .09); font-size: 7px; display: grid; place-items: center; font-style: normal; }
.minigrid i.mine { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.minigrid i.done { background: var(--green); }

/* foto */
.mission { padding: 26px 18px; text-align: center; border-radius: 22px; background: linear-gradient(160deg, rgba(255, 61, 154, .32), rgba(139, 92, 246, .2)); border: 2px solid var(--pink); }
.mission .secret { font-size: 12px; letter-spacing: .24em; font-weight: 900; color: var(--gold); }
.mission p { font-size: 25px; font-weight: 900; line-height: 1.2; margin: 12px 0; }
.count-huge { font-size: 160px; font-weight: 900; text-align: center; line-height: 1; font-variant-numeric: tabular-nums; }
body.guest.photo-count { background: #000; }

/* fiesta */
.party { text-align: center; padding: 34px 10px; border-radius: 24px; background: linear-gradient(135deg, rgba(255, 61, 154, .3), rgba(34, 211, 238, .22), rgba(255, 209, 102, .22)); background-size: 300% 300%; animation: disco 6s ease infinite; border: 1px solid var(--line); }
.party .big-emoji { font-size: 90px; animation: spin 6s linear infinite; }
@keyframes disco { 50% { background-position: 100% 50%; } }

/* overlays */
#splash { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(10, 6, 24, .92); backdrop-filter: blur(8px); text-align: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
#splash.show { opacity: 1; }
#splash .s-ic { font-size: 110px; animation: pop .7s ease; }
#splash .s-t { font-size: 28px; font-weight: 900; padding: 0 20px; }
#banner { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 85; }
#banner .ann { background: var(--grad); border-radius: 16px; padding: 14px 16px; font-weight: 800; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: rise .4s both; text-align: center; }
#reconnect { position: fixed; top: 0; left: 0; right: 0; z-index: 99; background: var(--red); text-align: center; padding: 6px; font-size: 13px; font-weight: 800; transform: translateY(-100%); transition: transform .25s; padding-top: calc(6px + var(--safe-t)); }
#reconnect.show { transform: none; }

#resume { position: fixed; inset: 0; z-index: 97; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, .55), rgba(10, 6, 24, .97) 70%); text-align: center; padding: 24px; }
#resume[hidden] { display: none; }
#resume .r-ic { font-size: 96px; animation: float 3s ease-in-out infinite; }
#resume b { font-size: 26px; font-weight: 900; }
#resume small { color: var(--mut); font-size: 14px; }
