/* ==========================================================================
   THE MAJORITY SHOW — styles
   Design canvas is 400px wide; app.js scales it to the device and sets --h.
   ========================================================================== */
:root {
  --bg0: #12063a; --bg1: #22097a; --bg2: #3a12c9; --panel: #1c0d5c; --panel2: #2a1491;
  --pink: #ff3ea5; --cyan: #23e0ff; --orange: #ff8a1f; --gold: #ffc93c; --violet: #8b5cff; --lime: #5cff8d; --red: #ff4d6a;
  --ink: #fff; --ink2: #c9bfff; --ink3: #8f84d6;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --h: 860px;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0a0326; color: var(--ink); font-family: var(--ui); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; }
img { display: block; }

#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 20%, #3b14b8 0%, #1a0760 45%, #0a0326 100%); }
#viewport::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255,255,255,.035) 0 6deg, transparent 6deg 12deg); pointer-events: none; }
#app { position: relative; width: 400px; height: var(--h); transform-origin: center center; overflow: hidden; flex: none;
  background: radial-gradient(ellipse at 50% -10%, #4a1bd8 0%, #2a0c9a 38%, #1a0866 70%, #2b0a57 100%);
  display: flex; flex-direction: column; }
body.framed #app { border-radius: 34px; box-shadow: 0 0 0 10px #0d0430, 0 0 0 12px #3b1fb0, 0 30px 80px rgba(0,0,0,.6), 0 0 120px rgba(124,77,255,.35); }

/* ---------- top bar ---------- */
.topbar { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; position: relative; z-index: 20; }
.ic-btn { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); flex: none; }
.ic-btn svg { width: 18px; height: 18px; }
.ic-btn:active { transform: scale(.92); }
.ic-btn.off { opacity: .5; }
.topbar .logo { height: 40px; margin-right: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.pill { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px 0 6px; border-radius: 15px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); font-weight: 900; font-size: 13px; white-space: nowrap; }
.pill .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #3a1d00; background: radial-gradient(circle at 35% 30%, #fff6c4, var(--gold) 50%, #d48a00); }
.pill .dot.star { background: radial-gradient(circle at 35% 30%, #ffd7f0, var(--pink) 55%, #a1005a); color: #fff; }

main { flex: 1; position: relative; min-height: 0; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: scrIn .35s ease; }
@keyframes scrIn { from { opacity: 0; transform: translateY(10px); } }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 14px 18px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ---------- tab bar ---------- */
.tabbar { height: 64px; flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px 10px; gap: 6px; background: linear-gradient(180deg, rgba(10,3,38,0), rgba(10,3,38,.85) 30%); position: relative; z-index: 10; }
.tabbar button { border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; color: var(--ink3); }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.on { color: var(--gold); background: rgba(255,201,60,.1); box-shadow: inset 0 0 0 1px rgba(255,201,60,.35); }
body.in-show .tabbar { display: none; }

/* ---------- generic cards / buttons ---------- */
.h-sec { font-family: var(--display); font-size: 17px; letter-spacing: .03em; margin: 16px 2px 8px; display: flex; align-items: center; gap: 8px; color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.h-sec small { font-family: var(--ui); font-size: 11px; font-weight: 800; color: var(--ink3); letter-spacing: 0; margin-left: auto; text-shadow: none; }
.card { background: linear-gradient(180deg, rgba(64,32,190,.65), rgba(30,12,100,.75)); border: 1px solid rgba(160,130,255,.28); border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12); }
.btn { height: 46px; border-radius: 16px; padding: 0 18px; font-family: var(--display); font-size: 18px; letter-spacing: .04em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; color: #2d1200;
  background: linear-gradient(180deg, #ffe58a, var(--gold) 45%, #ff9d1c); box-shadow: 0 5px 0 #b45d00, 0 10px 22px rgba(255,140,0,.35), inset 0 2px 0 rgba(255,255,255,.7); text-shadow: 0 1px 0 rgba(255,255,255,.5); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b45d00, 0 4px 10px rgba(255,140,0,.3), inset 0 2px 0 rgba(255,255,255,.7); }
.btn.pink { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); background: linear-gradient(180deg, #ff8ccd, var(--pink) 50%, #c4006a); box-shadow: 0 5px 0 #7d0045, 0 10px 22px rgba(255,62,165,.35), inset 0 2px 0 rgba(255,255,255,.5); }
.btn.cyan { color: #00303b; background: linear-gradient(180deg, #b2f6ff, var(--cyan) 50%, #0098c7); box-shadow: 0 5px 0 #006180, 0 10px 22px rgba(35,224,255,.3), inset 0 2px 0 rgba(255,255,255,.6); text-shadow: none; }
.btn.ghost { color: var(--ink); background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); text-shadow: none; }
.btn.small { height: 34px; font-size: 15px; padding: 0 14px; border-radius: 12px; box-shadow: 0 3px 0 #b45d00, inset 0 2px 0 rgba(255,255,255,.7); }
.btn.small.pink { box-shadow: 0 3px 0 #7d0045, inset 0 2px 0 rgba(255,255,255,.5); }
.btn.small.cyan { box-shadow: 0 3px 0 #006180, inset 0 2px 0 rgba(255,255,255,.6); }
.btn[disabled] { filter: grayscale(.8) brightness(.7); pointer-events: none; }
.btn.block { width: 100%; }

/* ---------- lobby ---------- */
.hero { text-align: center; padding: 6px 0 0; position: relative; }
.hero .biglogo { width: 230px; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(255,180,40,.35)); animation: logoFloat 4s ease-in-out infinite; }
@keyframes logoFloat { 50% { transform: translateY(-4px) rotate(-1deg); } }
.live-strip { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; font-weight: 900; color: var(--ink2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255,77,106,.7); animation: livePulse 1.4s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(255,77,106,0); } }
.main-card { margin-top: 12px; padding: 16px; position: relative; overflow: hidden; background: linear-gradient(135deg, #ff3ea5 0%, #8b2bff 48%, #2a2ff0 100%); border: 0; }
.main-card::after { content: ''; position: absolute; top: -40%; left: -60%; width: 50%; height: 180%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); transform: rotate(20deg); animation: sheen 3.8s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.main-card .tag { font-size: 10.5px; font-weight: 900; letter-spacing: .12em; background: rgba(0,0,0,.25); padding: 4px 8px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center; }
.main-card h2 { font-family: var(--display); font-size: 28px; margin: 8px 0 2px; letter-spacing: .02em; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.main-card .sub { font-size: 12.5px; font-weight: 700; opacity: .9; }
.main-card .stats { display: flex; gap: 8px; margin: 12px 0; }
.stat { flex: 1; background: rgba(0,0,0,.22); border-radius: 12px; padding: 7px 8px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 19px; letter-spacing: .02em; }
.stat span { font-size: 10px; font-weight: 900; letter-spacing: .08em; opacity: .8; }
.stat.pot b { color: #fff3a6; }
.room { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; margin-bottom: 8px; }
.room .ri { flex: 1; min-width: 0; }
.room .rn { font-weight: 900; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .rm { font-size: 11.5px; color: var(--ink2); font-weight: 700; margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.seats { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.seat { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px dashed rgba(255,255,255,.25); overflow: hidden; }
.seat img { width: 100%; height: 100%; }
.seat.full { border: 1.5px solid var(--gold); }
.room .pot { text-align: right; flex: none; }
.room .pot b { display: block; font-family: var(--display); font-size: 17px; color: var(--pink); text-shadow: 0 0 12px rgba(255,62,165,.4); }
.room .pot span { font-size: 10px; font-weight: 900; color: var(--ink3); letter-spacing: .08em; }
.room.live { opacity: .55; }
.room .status-live { font-size: 10px; font-weight: 900; color: var(--red); letter-spacing: .08em; }
.duels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.duel { padding: 10px 4px; text-align: center; border-radius: 14px; }
.duel b { display: block; font-family: var(--display); font-size: 20px; color: var(--cyan); }
.duel span { font-size: 10px; font-weight: 900; color: var(--ink3); letter-spacing: .06em; }
.duel:active, .room:active { transform: scale(.98); }
.create-row { display: flex; gap: 8px; margin-top: 10px; }
.mode-chip { font-size: 10px; font-weight: 900; letter-spacing: .08em; padding: 3px 7px; border-radius: 8px; background: rgba(35,224,255,.12); color: var(--cyan); }

/* ---------- show screen ---------- */
.showbar { height: 36px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.qdots { display: flex; gap: 4px; align-items: center; font-family: var(--display); font-size: 14px; letter-spacing: .03em; }
.qdots i { width: 20px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); }
.qdots i.done { background: var(--lime); } .qdots i.now { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.chip { height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 9px; border-radius: 13px; background: rgba(0,0,0,.28); font-weight: 900; font-size: 12px; white-space: nowrap; }
.chip.score b { font-family: var(--display); font-size: 15px; color: var(--gold); font-weight: 400; letter-spacing: .03em; }
.chip.pot b { color: var(--pink); }
.chip.btnlike { background: rgba(255,201,60,.14); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255,201,60,.35); }
.showbar .sp { flex: 1; }

.stage { flex: 1; min-height: 150px; position: relative; overflow: hidden; }
.stage .back { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 90% at 70% 100%, rgba(255,62,165,.35), transparent 60%), radial-gradient(ellipse 80% 70% at 30% 0%, rgba(35,224,255,.18), transparent 60%); }
.beam { position: absolute; top: -20%; width: 120px; height: 140%; background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 80%); filter: blur(4px); transform-origin: top center; mix-blend-mode: screen; }
.beam.b1 { left: 8%; animation: beamA 7s ease-in-out infinite; }
.beam.b2 { right: 4%; animation: beamB 9s ease-in-out infinite; background: linear-gradient(180deg, rgba(255,62,165,.3), transparent 80%); }
.beam.b3 { left: 45%; animation: beamA 11s ease-in-out infinite reverse; background: linear-gradient(180deg, rgba(35,224,255,.25), transparent 80%); }
@keyframes beamA { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(18deg); } }
@keyframes beamB { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(-14deg); } }
.stage.hot .beam { animation-duration: 1.4s; }
.arch { position: absolute; left: 50%; bottom: -60%; width: 150%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 3px dotted rgba(255,213,110,.65); box-shadow: 0 0 30px rgba(255,190,60,.2), inset 0 0 30px rgba(255,190,60,.15); animation: archSpin 40s linear infinite; }
.arch.a2 { width: 120%; border-color: rgba(35,224,255,.4); animation-direction: reverse; animation-duration: 60s; }
@keyframes archSpin { to { transform: translateX(-50%) rotate(360deg); } }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: radial-gradient(ellipse 60% 70% at 72% 100%, rgba(255,210,120,.35), transparent 70%); }
.host { position: absolute; bottom: -2px; right: -8px; height: 100%; aspect-ratio: 1; transform: scaleX(-1); }
.host-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.audience { position: absolute; left: 0; right: 0; bottom: -2px; height: 34px; pointer-events: none; }
.bubble { position: absolute; left: 10px; top: 10px; width: 54%; padding: 10px 12px; border-radius: 16px 16px 4px 16px; background: rgba(255,255,255,.96); color: #1c0d5c; font-weight: 800; font-size: 14px; line-height: 1.3;
  box-shadow: 0 8px 22px rgba(0,0,0,.35); opacity: 0; transform: scale(.85) translateY(6px); transform-origin: 100% 100%; transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.6,1); z-index: 3; }
.bubble.show { opacity: 1; transform: none; }
.bubble::after { content: ''; position: absolute; right: -9px; bottom: 6px; border: 8px solid transparent; border-left-color: rgba(255,255,255,.96); border-right: 0; }
.bubble b { color: #d4007a; } .bubble i { color: #5a2fd6; font-style: normal; }
.host-name { position: absolute; right: 8px; bottom: 6px; z-index: 3; font-family: var(--display); font-size: 11px; letter-spacing: .1em; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.45); color: var(--gold); }
.react-btn { position: absolute; left: 10px; bottom: 8px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2); font-size: 18px; display: grid; place-items: center; }
.react-tray { position: absolute; left: 52px; bottom: 8px; z-index: 4; display: none; gap: 4px; padding: 4px; border-radius: 20px; background: rgba(0,0,0,.55); }
.react-tray.open { display: flex; animation: scrIn .2s; }
.react-tray button { width: 30px; height: 30px; font-size: 18px; border-radius: 50%; }
.react-tray button:active { background: rgba(255,255,255,.2); }
.floater { position: absolute; z-index: 5; pointer-events: none; display: flex; align-items: center; gap: 4px; font-size: 22px; animation: floatUp 2.6s ease-out forwards; }
.floater span { font-size: 9.5px; font-weight: 900; background: rgba(0,0,0,.5); padding: 2px 5px; border-radius: 6px; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-110px) scale(1); } }

/* panel under stage */
.panel { flex: none; padding: 0 12px 10px; position: relative; }
.qcard { padding: 10px 12px 10px; position: relative; overflow: hidden; }
.qcat { display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); background: rgba(35,224,255,.12); padding: 3px 8px; border-radius: 7px; }
.qtext { font-family: var(--display); font-size: 20px; line-height: 1.12; letter-spacing: .01em; margin-top: 6px; min-height: 44px; display: flex; align-items: center; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.qtext.long { font-size: 17.5px; }
.phase-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 8px; }
.slots { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.slot { height: 40px; border-radius: 12px; display: flex; align-items: center; gap: 6px; padding: 0 7px; background: rgba(0,0,0,.25); border: 1.5px solid rgba(255,255,255,.1); transition: all .25s; position: relative; }
.slot .medal { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-size: 12px; color: #3a1d00; }
.slot[data-r="0"] .medal { background: radial-gradient(circle at 35% 30%, #fff6c4, var(--gold) 55%, #c07800); }
.slot[data-r="1"] .medal { background: radial-gradient(circle at 35% 30%, #fff, #c9d2e6 55%, #7d8aa8); }
.slot[data-r="2"] .medal { background: radial-gradient(circle at 35% 30%, #ffe0c4, #e08a4a 55%, #8a4a1a); }
.slot .sv { font-size: 10px; font-weight: 900; letter-spacing: .04em; line-height: 1.05; color: var(--ink3); min-width: 0; overflow: hidden; }
.slot .sv b { display: block; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.slot.active { border-color: var(--gold); background: rgba(255,201,60,.14); box-shadow: 0 0 16px rgba(255,201,60,.35); animation: slotPulse 1s ease-in-out infinite; }
@keyframes slotPulse { 50% { box-shadow: 0 0 4px rgba(255,201,60,.2); } }
.slot.filled { border-color: rgba(255,255,255,.3); }
.slot .res { position: absolute; right: -4px; top: -7px; font-size: 10px; font-weight: 900; padding: 1px 5px; border-radius: 7px; display: none; }
.slot.ok .res { display: block; background: var(--lime); color: #003311; }
.slot.no .res { display: block; background: var(--red); color: #fff; }
.slot.ok { border-color: var(--lime); box-shadow: 0 0 14px rgba(92,255,141,.4); }
.slot.no { border-color: rgba(255,77,106,.6); }
.timer { width: 48px; height: 48px; flex: none; position: relative; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .tr-bg { stroke: rgba(255,255,255,.12); }
.timer .tr { stroke: var(--gold); stroke-linecap: round; transition: stroke .3s; filter: drop-shadow(0 0 4px rgba(255,201,60,.8)); }
.timer.urgent .tr { stroke: var(--red); filter: drop-shadow(0 0 6px rgba(255,77,106,.9)); }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 20px; }
.timer.urgent b { color: var(--red); animation: tUrgent .5s ease-in-out infinite; }
@keyframes tUrgent { 50% { transform: scale(1.18); } }
.prompt { font-size: 12.5px; font-weight: 900; text-align: center; color: var(--ink2); letter-spacing: .02em; height: 18px; margin-bottom: 6px; }
.prompt b { color: var(--gold); font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .04em; }
.prompt.pop { animation: promptPop .45s cubic-bezier(.3,1.6,.6,1); }
@keyframes promptPop { from { transform: scale(.6); opacity: 0; } }

.answers { display: grid; gap: 7px; }
.ans { --c1: #ff7cc6; --c2: var(--pink); --c3: #b0005d; --cs: #6e003a;
  height: 52px; border-radius: 16px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 6px; position: relative; overflow: hidden; text-align: left;
  background: linear-gradient(180deg, var(--c1), var(--c2) 48%, var(--c3)); box-shadow: 0 4px 0 var(--cs), 0 8px 18px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.45);
  transition: transform .1s, box-shadow .1s, filter .25s, opacity .25s; opacity: 0; transform: translateX(-30px); }
.ans.in { opacity: 1; transform: none; transition: transform .4s cubic-bezier(.3,1.5,.6,1), opacity .3s, filter .25s, box-shadow .1s; }
.ans[data-c="1"] { --c1: #9df4ff; --c2: #1fc8f0; --c3: #0083b8; --cs: #004a6e; }
.ans[data-c="2"] { --c1: #ffc27a; --c2: var(--orange); --c3: #d45400; --cs: #7a2f00; }
.ans[data-c="3"] { --c1: #c3a6ff; --c2: var(--violet); --c3: #5226d6; --cs: #2a0f80; }
.ans::before { content: ''; position: absolute; left: 6px; right: 6px; top: 3px; height: 40%; border-radius: 12px 12px 30px 30px; background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0)); pointer-events: none; }
.ans .let { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-size: 20px; background: rgba(0,0,0,.22); box-shadow: inset 0 2px 4px rgba(0,0,0,.25); position: relative; z-index: 2; }
.ans .at { flex: 1; font-weight: 900; font-size: 16px; line-height: 1.12; text-shadow: 0 1px 2px rgba(0,0,0,.35); position: relative; z-index: 2; }
.ans .pk { flex: none; font-family: var(--display); font-size: 12px; letter-spacing: .04em; padding: 4px 8px; border-radius: 9px; background: rgba(0,0,0,.35); display: none; position: relative; z-index: 2; }
.ans.picked .pk { display: block; animation: promptPop .35s; }
.ans.picked { filter: saturate(.55) brightness(.75); }
.ans.picked.justnow { filter: none; animation: pickBoom .5s ease; }
@keyframes pickBoom { 30% { transform: scale(1.04); box-shadow: 0 0 0 4px #fff, 0 0 30px #fff; } }
.answers.live .ans:not(.picked):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cs), inset 0 2px 0 rgba(255,255,255,.45); }
.answers:not(.live) .ans { pointer-events: none; }
.answers.locked .ans:not(.picked) { filter: saturate(.7) brightness(.85); }
/* reveal */
.ans .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.28); transition: width 1.1s cubic-bezier(.2,.8,.2,1); z-index: 1; }
.ans .pct { flex: none; font-family: var(--display); font-size: 21px; position: relative; z-index: 2; display: none; text-shadow: 0 2px 0 rgba(0,0,0,.3); min-width: 46px; text-align: right; }
.ans.rev .pct { display: block; }
.ans.rev { filter: none !important; }
.ans.rev .let { background: #fff; color: #1c0d5c; }
.ans.rev.r1 .let { background: radial-gradient(circle at 35% 30%, #fff6c4, var(--gold) 55%, #c07800); color: #3a1d00; }
.ans.rev.r2 .let { background: radial-gradient(circle at 35% 30%, #fff, #c9d2e6 55%, #7d8aa8); }
.ans.rev.r3 .let { background: radial-gradient(circle at 35% 30%, #ffe0c4, #e08a4a 55%, #8a4a1a); color: #fff; }
.ans.rev.r4 { filter: grayscale(.6) brightness(.7) !important; }
.ans.dim { filter: brightness(.45) saturate(.5) !important; }
.ans.scan { animation: scan .38s ease-in-out infinite alternate; }
@keyframes scan { to { filter: brightness(1.35) saturate(1.2); box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(255,255,255,.8); } }
.ans.boom { animation: boom .8s ease; }
@keyframes boom { 0% { transform: scale(1); } 25% { transform: scale(1.06); box-shadow: 0 0 0 4px var(--gold), 0 0 50px var(--gold); } 100% { transform: scale(1); } }
.ans.r1.rev { box-shadow: 0 4px 0 var(--cs), 0 0 0 3px var(--gold), 0 0 28px rgba(255,201,60,.6), inset 0 2px 0 rgba(255,255,255,.45); }

.miniboard { height: 40px; margin-top: 8px; border-radius: 14px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.1); font-size: 12px; font-weight: 800; width: 100%; }
.miniboard img { width: 24px; height: 24px; border-radius: 50%; }
.miniboard .mb-l { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.miniboard .mb-l span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miniboard b { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 14px; }
.miniboard .me { color: var(--cyan); }
.miniboard .sep { width: 1px; height: 22px; background: rgba(255,255,255,.15); }
.lockcount { position: absolute; left: 50%; top: -2px; transform: translate(-50%, -100%); font-size: 10.5px; font-weight: 900; color: var(--ink2); background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 10px; white-space: nowrap; z-index: 4; }

.float-pts { position: absolute; z-index: 30; font-family: var(--display); font-size: 26px; color: var(--lime); text-shadow: 0 2px 0 rgba(0,0,0,.4), 0 0 12px rgba(92,255,141,.7); pointer-events: none; transition: all .9s cubic-bezier(.5,-0.3,.6,1); }

/* waiting room */
.wait { padding: 12px; text-align: center; }
.wait h3 { font-family: var(--display); font-size: 22px; margin: 2px 0 2px; color: var(--gold); letter-spacing: .04em; }
.wait .wsub { font-size: 12.5px; font-weight: 800; color: var(--ink2); margin-bottom: 10px; }
.wseats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.wseat { width: 62px; text-align: center; font-size: 10.5px; font-weight: 800; color: var(--ink2); }
.wseat .wav { width: 54px; height: 54px; margin: 0 auto 4px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); display: grid; place-items: center; overflow: hidden; background: rgba(0,0,0,.2); }
.wseat .wav img { width: 100%; height: 100%; }
.wseat.on .wav { border: 2.5px solid var(--gold); animation: seatIn .5s cubic-bezier(.3,1.6,.6,1); }
.wseat .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wseat.me .nm { color: var(--cyan); }
@keyframes seatIn { from { transform: scale(.3); } }
.spinner { width: 46px; height: 46px; margin: 8px auto; position: relative; }
.spinner i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--gold); animation: spin 1.2s linear infinite; }
@keyframes spin { 0% { opacity: 1; } 100% { opacity: .15; } }
.vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 12px; }
.vs .wseat { width: 96px; } .vs .wseat .wav { width: 86px; height: 86px; }
.vs .vsb { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 22px; color: var(--gold); border: 3px solid var(--gold); background: rgba(0,0,0,.3); box-shadow: 0 0 20px rgba(255,201,60,.4); animation: vsPulse 1s infinite; }
@keyframes vsPulse { 50% { transform: scale(1.1); } }
.count-big { font-family: var(--display); font-size: 64px; color: var(--gold); text-shadow: 0 4px 0 #b45d00, 0 0 30px rgba(255,201,60,.6); animation: cnt .9s ease; }
@keyframes cnt { from { transform: scale(2); opacity: 0; } 40% { transform: scale(1); opacity: 1; } }

/* final */
.final { padding: 2px 0 0; }
.winner-card { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; background: linear-gradient(135deg, #ffcf4a, #ff8a1f 60%, #ff3ea5); color: #2d1200; border: 0; }
.winner-card .wa { width: 58px; height: 58px; border-radius: 50%; border: 3px solid #fff; flex: none; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.winner-card .wa img { width: 100%; height: 100%; }
.winner-card .wl { font-size: 10.5px; font-weight: 900; letter-spacing: .12em; opacity: .8; }
.winner-card .wn { font-family: var(--display); font-size: 23px; letter-spacing: .02em; line-height: 1.05; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.winner-card .wp { font-family: var(--display); font-size: 26px; margin-left: auto; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); text-align: right; line-height: 1; }
.winner-card .wp small { display: block; font-family: var(--ui); font-size: 10px; font-weight: 900; letter-spacing: .08em; opacity: .85; }
.you-card { padding: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 10px; }
.you-card div b { display: block; font-family: var(--display); font-size: 22px; color: var(--gold); letter-spacing: .02em; }
.you-card div span { font-size: 10px; font-weight: 900; color: var(--ink2); letter-spacing: .06em; }
.you-card .won b { color: var(--lime); }
.final .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }

/* overlays */
.overlay { position: absolute; inset: 0; z-index: 40; display: none; flex-direction: column; background: rgba(10,3,38,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay.open { display: flex; animation: scrIn .25s; }
.ov-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px; }
.ov-head h3 { font-family: var(--display); font-size: 22px; margin: 0; color: var(--gold); letter-spacing: .04em; flex: 1; }
.tabs { display: flex; gap: 6px; padding: 4px 14px 8px; }
.tabs button { flex: 1; height: 34px; border-radius: 11px; font-weight: 900; font-size: 12.5px; background: rgba(255,255,255,.07); color: var(--ink2); }
.tabs button.on { background: var(--gold); color: #2d1200; }
.board { flex: 1; position: relative; overflow-y: auto; margin: 0 12px; scrollbar-width: none; }
.board::-webkit-scrollbar { display: none; }
.brow { position: absolute; left: 0; right: 0; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 12px; transition: top .9s cubic-bezier(.3,1.2,.5,1), opacity .4s; background: rgba(255,255,255,.04); }
.brow:nth-child(even) { background: rgba(255,255,255,.07); }
.brow .rk { width: 30px; font-family: var(--display); font-size: 16px; text-align: center; color: var(--ink2); flex: none; }
.brow.top1 .rk { color: var(--gold); } .brow.top2 .rk { color: #dfe6f5; } .brow.top3 .rk { color: #f0a46a; }
.brow img { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.brow .nm { flex: 1; font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .nm small { font-size: 10px; color: var(--ink3); font-weight: 800; margin-left: 4px; }
.brow .mv { width: 34px; font-size: 11px; font-weight: 900; text-align: right; flex: none; }
.brow .mv.up { color: var(--lime); } .brow .mv.dn { color: var(--red); }
.brow .sc { width: 50px; text-align: right; font-family: var(--display); font-size: 17px; color: var(--gold); flex: none; }
.brow .prz { font-size: 10.5px; font-weight: 900; color: var(--lime); margin-left: 4px; }
.brow.me { background: linear-gradient(90deg, rgba(35,224,255,.35), rgba(35,224,255,.1)) !important; box-shadow: inset 0 0 0 1.5px var(--cyan); }
.brow.gap { background: none !important; justify-content: center; color: var(--ink3); font-weight: 900; height: 20px; }
.ov-foot { padding: 10px 14px 14px; display: flex; gap: 8px; align-items: center; }
.autobar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; margin: 0 14px; }
.autobar i { display: block; height: 100%; width: 0; background: var(--gold); }

.modal { margin: auto 14px; padding: 16px; }
.modal h3 { font-family: var(--display); font-size: 22px; margin: 0 0 10px; color: var(--gold); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--ink2); margin-bottom: 6px; }
.field input { width: 100%; height: 42px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.2); background: rgba(0,0,0,.3); color: #fff; padding: 0 12px; font-weight: 800; outline: none; }
.field input:focus { border-color: var(--gold); }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opts button { flex: 1; min-width: 50px; height: 38px; border-radius: 11px; font-weight: 900; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.15); }
.opts button.on { background: rgba(255,201,60,.2); border-color: var(--gold); color: var(--gold); }
.modal .potline { text-align: center; font-weight: 800; font-size: 13px; color: var(--ink2); margin: 4px 0 12px; }
.modal .potline b { color: var(--pink); font-family: var(--display); font-weight: 400; font-size: 18px; }

#toast { position: absolute; left: 50%; top: 60px; transform: translate(-50%, -20px); z-index: 60; padding: 10px 16px; border-radius: 14px; background: #fff; color: #1c0d5c; font-weight: 900; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: all .3s; max-width: 340px; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* confetti */
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- shop / missions / profile ---------- */
.seg { display: flex; gap: 6px; margin: 4px 0 12px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; font-weight: 900; font-size: 12.5px; background: rgba(255,255,255,.07); color: var(--ink2); }
.seg button.on { background: var(--pink); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item { padding: 12px 10px 10px; text-align: center; position: relative; }
.item .iv { height: 74px; display: grid; place-items: center; font-size: 42px; margin-bottom: 6px; }
.item .iv img { width: 68px; height: 68px; border-radius: 50%; }
.item .in { font-weight: 900; font-size: 13.5px; }
.item .id { font-size: 11px; color: var(--ink3); font-weight: 700; min-height: 15px; margin: 2px 0 8px; }
.item .btn { width: 100%; }
.item.owned::after { content: 'OWNED'; position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 900; letter-spacing: .08em; color: var(--lime); }
.item.eq::after { content: 'EQUIPPED'; color: var(--gold); }
.mission { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; }
.mission .mi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: rgba(0,0,0,.25); flex: none; }
.mission .mt { flex: 1; min-width: 0; }
.mission .mt b { font-size: 14px; display: block; }
.mission .prog { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); margin-top: 6px; overflow: hidden; }
.mission .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); border-radius: 4px; }
.mission .mt span { font-size: 11px; color: var(--ink3); font-weight: 800; }
.mission.done { opacity: .55; }
.reward { font-family: var(--display); font-size: 14px; color: var(--pink); white-space: nowrap; }
.prof-top { text-align: center; padding-top: 8px; }
.prof-av { width: 110px; height: 110px; margin: 0 auto; border-radius: 50%; position: relative; }
.prof-av img { width: 100%; height: 100%; border-radius: 50%; }
.prof-name { font-family: var(--display); font-size: 28px; margin: 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.prof-name button { font-size: 14px; opacity: .7; }
.prof-title { font-size: 12px; font-weight: 900; color: var(--gold); letter-spacing: .06em; min-height: 16px; }
.lvl { margin: 10px auto 0; max-width: 260px; }
.lvl .lb { display: flex; justify-content: space-between; font-size: 11px; font-weight: 900; color: var(--ink2); margin-bottom: 4px; }
.lvl .lbar { height: 9px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; }
.lvl .lbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 14px; overflow: hidden; padding: 0; }
.pstats div { padding: 10px 4px; text-align: center; background: rgba(0,0,0,.15); }
.pstats b { display: block; font-family: var(--display); font-size: 21px; color: var(--gold); }
.pstats span { font-size: 10px; font-weight: 900; color: var(--ink2); letter-spacing: .05em; }
.achs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach { text-align: center; padding: 8px 2px; border-radius: 14px; background: rgba(0,0,0,.2); }
.ach .ai { font-size: 26px; height: 34px; display: grid; place-items: center; }
.ach span { font-size: 9.5px; font-weight: 900; color: var(--ink2); display: block; line-height: 1.1; margin-top: 3px; }
.ach.lock { opacity: .35; filter: grayscale(1); }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px; margin-bottom: 8px; font-weight: 900; font-size: 14px; }
.settings-row small { display: block; font-size: 11px; color: var(--ink3); font-weight: 700; }
.toggle { width: 48px; height: 28px; border-radius: 14px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle.on { background: var(--lime); } .toggle.on::after { left: 23px; }

/* avatar frames (shop) */
.fr { position: relative; border-radius: 50%; }
.fr-gold { box-shadow: 0 0 0 3px #ffc93c, 0 0 12px rgba(255,201,60,.7); }
.fr-neon { box-shadow: 0 0 0 3px #23e0ff, 0 0 14px #23e0ff, 0 0 4px #ff3ea5 inset; }
.fr-diamond { box-shadow: 0 0 0 3px #e6f6ff, 0 0 0 5px #9fd8ff, 0 0 18px rgba(160,220,255,.9); }
.fr-fire { box-shadow: 0 0 0 3px #ff6a00, 0 0 16px #ff3c00, 0 0 28px rgba(255,180,0,.6); animation: fire 1.2s ease-in-out infinite alternate; }
@keyframes fire { to { box-shadow: 0 0 0 3px #ffb300, 0 0 22px #ff6a00, 0 0 34px rgba(255,80,0,.6); } }

/* live rooms */
.mode-chip.ok { background: rgba(92,255,141,.14); color: var(--lime); }
.mode-chip.off { background: rgba(255,255,255,.08); color: var(--ink3); }
.mode-chip.pvpchip { background: rgba(255,62,165,.18); color: #ff8ccd; }
.h-sec .mode-chip { font-family: var(--ui); text-shadow: none; letter-spacing: .06em; }
.empty-live { padding: 12px 14px; font-size: 12.5px; font-weight: 800; color: var(--ink2); line-height: 1.4; }
.empty-live code { font-size: 11.5px; color: var(--cyan); }
.room.pvp { border-color: rgba(255,62,165,.45); }
.opts button[disabled] { opacity: .35; pointer-events: none; }
.mode-note { font-size: 11px; font-weight: 700; color: var(--ink3); margin-top: 6px; line-height: 1.35; }
.answers.live .ans.rev { pointer-events: none; }
