:root {
  --bg1: #1c1452; --bg2: #2d1b7a; --ink: #fff; --gold: #ffd23f; --gold2: #ff9f1c;
  --tile1: #3d7bff; --tile2: #1f45c9; --tile3: #142f8f;
  --green: #06d6a0; --red: #ff4d6d; --card: #ffffff; --cardInk: #22184f;
  --f-display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --f-body: 'Nunito', 'Arial Rounded MT Bold', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0d0930; overflow: hidden; color: var(--ink); font-family: var(--f-body); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }

#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  background: radial-gradient(1400px 900px at 50% 40%, var(--bg2), var(--bg1) 70%); }
#bgfx { position: absolute; inset: -200px; opacity: .14; pointer-events: none;
  background: repeating-linear-gradient(45deg, #fff 0 40px, transparent 40px 80px);
  animation: stripes 30s linear infinite; }
@keyframes stripes { to { transform: translate(113px, 0); } }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles i { position: absolute; width: 10px; height: 10px; background: #fff; border-radius: 50%; opacity: .0; animation: twinkle 4s infinite; box-shadow: 0 0 12px #fff; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) } 50% { opacity: .8; transform: scale(1) } }

/* Top bar */
#top { position: absolute; top: 0; left: 0; right: 0; height: 96px; display: flex; align-items: center; padding: 0 40px; gap: 24px; z-index: 5; }
#top .logo-s { font-family: var(--f-display); font-size: 44px; letter-spacing: 1px; color: var(--gold); -webkit-text-stroke: 2px #5a2a00; paint-order: stroke fill; text-shadow: 0 5px 0 #5a2a00; }
#top .round { font-family: var(--f-display); font-size: 30px; background: rgba(255,255,255,.12); padding: 8px 22px; border-radius: 40px; }
#top .spacer { flex: 1; }
#top .tbtn { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 54px; height: 54px; border-radius: 16px; font-size: 26px; opacity: .55; transition: .2s; }
#top .tbtn:hover { opacity: 1; background: rgba(255,255,255,.2); }
#conn { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
#conn.ok { background: var(--green); box-shadow: 0 0 10px var(--green); }

#main { position: absolute; top: 96px; left: 0; right: 0; bottom: 190px; padding: 10px 40px; }
#main.full { bottom: 0; }

/* Player bar */
#players { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; display: flex; justify-content: center; align-items: flex-end; gap: 16px; padding: 0 30px 22px; z-index: 4; }
#players.hide { display: none; }
.pcard { position: relative; flex: 0 1 220px; min-width: 120px; height: 140px; background: var(--card); color: var(--cardInk); border-radius: 26px; padding: 14px 14px 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  box-shadow: 0 8px 0 rgba(0,0,0,.35), inset 0 -6px 0 rgba(0,0,0,.08); transition: transform .3s cubic-bezier(.3,1.6,.5,1), filter .3s, opacity .3s; cursor: pointer; }
.pcard .band { position: absolute; top: 0; left: 0; right: 0; height: 18px; border-radius: 26px 26px 0 0; background: var(--pc); }
.pcard .av { position: absolute; top: -44px; width: 84px; height: 84px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 50px; border: 6px solid #fff; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.pcard .nm { font-weight: 900; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pcard .sc { font-family: var(--f-display); font-size: 40px; line-height: 1; color: var(--cardInk); }
.pcard .sc.neg { color: var(--red); }
.pcard.chooser { transform: translateY(-14px); }
.pcard.chooser::after { content: '👑'; position: absolute; top: -34px; right: 8px; font-size: 44px; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(8deg); } }
.pcard.buzzed { transform: translateY(-24px) scale(1.12); box-shadow: 0 0 0 8px var(--pc), 0 0 60px var(--pc), 0 8px 0 rgba(0,0,0,.35); z-index: 2; }
.pcard.locked { filter: grayscale(1) brightness(.6); }
.pcard.offline .av::after { content: '📵'; position: absolute; right: -10px; bottom: -6px; font-size: 26px; }
.pcard.voted .av::before { content: '✓'; position: absolute; left: -14px; bottom: -8px; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; font-size: 26px; font-weight: 900; display: grid; place-items: center; border: 4px solid #fff; animation: popin .4s cubic-bezier(.3,1.8,.5,1); }
.pcard.winner { box-shadow: 0 0 0 8px var(--gold), 0 0 50px var(--gold), 0 8px 0 rgba(0,0,0,.35); transform: translateY(-14px); }
.pcard .key { position: absolute; left: 10px; top: 22px; font-size: 14px; font-weight: 900; opacity: .35; }
.float { position: absolute; top: -40px; font-family: var(--f-display); font-size: 46px; pointer-events: none; animation: floatUp 1.8s ease-out forwards; -webkit-text-stroke: 3px rgba(0,0,0,.5); paint-order: stroke fill; z-index: 10; }
.float.plus { color: var(--gold); } .float.minus { color: var(--red); }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(20px) scale(.5) } 15% { opacity: 1; transform: translateY(0) scale(1.2) } 100% { opacity: 0; transform: translateY(-120px) scale(1) } }

/* generic */
.h1 { font-family: var(--f-display); font-size: 110px; line-height: 1; color: var(--gold); -webkit-text-stroke: 5px #5a2a00; paint-order: stroke fill; text-shadow: 0 10px 0 #5a2a00, 0 20px 40px rgba(0,0,0,.4); margin: 0; }
.hint { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 24px; font-weight: 800; opacity: .6; }
#main:not(.full) .hint { bottom: 40px; }
.kbd { display: inline-block; background: rgba(255,255,255,.18); border-radius: 8px; padding: 0 10px; margin: 0 4px; font-family: var(--f-display); }
.pop { animation: popin .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes popin { from { opacity: 0; transform: scale(.4) } }
.slideup { animation: slideup .6s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes slideup { from { opacity: 0; transform: translateY(80px) } }
.btn { background: linear-gradient(#ffe066, var(--gold2)); color: #4a2100; border: 0; border-radius: 22px; padding: 16px 30px; font-family: var(--f-display); font-size: 28px; box-shadow: 0 6px 0 #a35200; transition: transform .1s; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a35200; }
.btn.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.3); }

/* Lobby */
.lobby { display: grid; grid-template-columns: 620px 1fr; gap: 60px; height: 100%; align-items: center; padding: 0 40px 60px; }
.joincard { background: #fff; color: var(--cardInk); border-radius: 40px; padding: 36px; text-align: center; box-shadow: 0 14px 0 rgba(0,0,0,.35); }
.joincard h2 { font-family: var(--f-display); font-size: 64px; margin: 0 0 16px; color: #ff4d6d; }
#qr { width: 420px; height: 420px; margin: 0 auto; display: grid; place-items: center; }
#qr img, #qr canvas { width: 420px !important; height: 420px !important; image-rendering: pixelated; }
.joincard .url { font-family: var(--f-display); font-size: 34px; margin-top: 18px; word-break: break-all; color: #3a86ff; }
.joincard p { font-size: 22px; font-weight: 700; margin: 8px 0 0; opacity: .7; }
.lobby-right { display: flex; flex-direction: column; align-items: center; gap: 30px; height: 100%; justify-content: center; }
.logo { font-family: var(--f-display); font-size: 150px; line-height: .9; text-align: center; margin: 0; color: var(--gold); -webkit-text-stroke: 7px #5a2a00; paint-order: stroke fill; text-shadow: 0 14px 0 #5a2a00, 0 30px 60px rgba(0,0,0,.5); transform: rotate(-3deg); animation: logo 3s ease-in-out infinite; }
.logo .pre { display: block; font-size: .5em; letter-spacing: 6px; margin-bottom: 6px; }
.logo small { display: block; font-size: 56px; color: #fff; -webkit-text-stroke: 4px #2d1b7a; text-shadow: 0 6px 0 #2d1b7a; margin-top: 8px; }
@keyframes logo { 50% { transform: rotate(2deg) scale(1.03); } }
.lobby-players { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; max-width: 1100px; min-height: 180px; align-content: flex-start; }
.lp { position: relative; width: 150px; text-align: center; animation: popin .6s cubic-bezier(.3,1.8,.5,1) both; }
.lp .av { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 70px; border: 7px solid #fff; box-shadow: 0 8px 0 rgba(0,0,0,.3); animation: hop 1.6s ease-in-out infinite; animation-delay: var(--d); }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) } 30% { transform: translateY(-18px) } }
.lp .nm { font-weight: 900; font-size: 26px; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp .x { position: absolute; top: -6px; right: 4px; background: var(--red); border: 3px solid #fff; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-weight: 900; display: none; }
.lp:hover .x { display: block; }
.lobby-empty { font-size: 34px; font-weight: 800; opacity: .6; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .25 } }
.lobby-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
#modqr { max-width: 360px; position: absolute; right: 40px; top: 10px; background: #fff; color: #22184f; padding: 20px; border-radius: 24px; text-align: center; font-weight: 800; z-index: 20; box-shadow: 0 10px 0 rgba(0,0,0,.4); }

/* Dice */
.dice-wrap { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 50px; }
.dice-grid { display: flex; flex-wrap: wrap; gap: 50px 40px; justify-content: center; max-width: 1700px; }
.dcard { width: 190px; text-align: center; position: relative; }
.block { width: 150px; height: 150px; margin: 0 auto 26px; border-radius: 24px; background: linear-gradient(#ffd23f, #ff9f1c); border: 6px solid #7a3d00; display: grid; place-items: center; font-family: var(--f-display); font-size: 96px; color: #fff; -webkit-text-stroke: 4px #7a3d00; paint-order: stroke fill; box-shadow: inset 0 -12px 0 rgba(0,0,0,.18), 0 10px 0 rgba(0,0,0,.35); position: relative; }
.block::before, .block::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #7a3d00; top: 10px; left: 10px; box-shadow: 104px 0 #7a3d00, 0 104px #7a3d00, 104px 104px #7a3d00; }
.block::after { display: none; }
.block.idle { animation: blockbob 1.2s ease-in-out infinite; }
@keyframes blockbob { 50% { transform: translateY(-14px) } }
.block.rolling { animation: shake .1s linear infinite; }
@keyframes shake { 25% { transform: translate(-4px, 2px) rotate(-3deg) } 75% { transform: translate(4px, -2px) rotate(3deg) } }
.block.hit { animation: hit .5s cubic-bezier(.3,1.8,.5,1); background: linear-gradient(#fff, #ffd23f); color: #ff4d6d; }
@keyframes hit { 0% { transform: translateY(-30px) scale(1.2) } }
.dcard .av { width: 90px; height: 90px; margin: 0 auto; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 54px; border: 5px solid #fff; }
.dcard .nm { font-weight: 900; font-size: 26px; margin-top: 8px; }
.dcard .rank { position: absolute; top: -30px; right: 0; font-family: var(--f-display); font-size: 48px; color: var(--gold); -webkit-text-stroke: 3px #5a2a00; paint-order: stroke fill; animation: popin .5s both; }

/* Board */
.board-wrap { height: 100%; display: flex; flex-direction: column; gap: 14px; }
.board { flex: 1; display: grid; gap: 14px; grid-template-rows: 1fr; min-height: 0; }
.bcol { display: grid; gap: 14px; min-height: 0; }
.btiles { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.btiles .tile { flex: 1; min-height: 0; }
.tile.game .ty { font-size: 40px; }
.cat { background: var(--cc); border-radius: 22px; display: grid; place-items: center; text-align: center; padding: 8px 14px; font-family: var(--f-display); font-size: 32px; line-height: 1.05; text-shadow: 0 3px 0 rgba(0,0,0,.3); box-shadow: inset 0 -8px 0 rgba(0,0,0,.2), 0 6px 0 rgba(0,0,0,.3); overflow-wrap: anywhere; }
.tile { position: relative; border: 0; border-radius: 22px; background: linear-gradient(180deg, var(--tile1), var(--tile2)); box-shadow: inset 0 -10px 0 var(--tile3), inset 0 4px 0 rgba(255,255,255,.3), 0 6px 0 rgba(0,0,0,.35);
  font-family: var(--f-display); font-size: 64px; color: var(--gold); -webkit-text-stroke: 3px #5a2a00; paint-order: stroke fill; text-shadow: 0 5px 0 #5a2a00; transition: transform .15s, filter .15s; animation: tileIn .5s cubic-bezier(.3,1.6,.5,1) both; }
.tile:hover { transform: scale(1.05) rotate(-1deg); filter: brightness(1.15); }
.tile.used { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 3px rgba(255,255,255,.08); color: transparent; -webkit-text-stroke: 0; text-shadow: none; pointer-events: none; animation: none; }
.tile .ty { position: absolute; right: 12px; bottom: 12px; font-size: 22px; -webkit-text-stroke: 0; text-shadow: none; opacity: .8; }
@keyframes tileIn { from { opacity: 0; transform: scale(.3) rotate(-10deg) } }
.choose-banner { text-align: center; font-family: var(--f-display); font-size: 36px; }
.choose-banner b { color: var(--gold); }

/* Question */
.q-screen { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; position: relative; }
.q-head { display: flex; gap: 18px; align-items: center; }
.q-cat { background: rgba(255,255,255,.14); padding: 10px 28px; border-radius: 40px; font-family: var(--f-display); font-size: 34px; }
.q-val { background: linear-gradient(#ffe066, var(--gold2)); color: #4a2100; padding: 10px 28px; border-radius: 40px; font-family: var(--f-display); font-size: 38px; box-shadow: 0 5px 0 #a35200; }
.q-sp { background: var(--red); padding: 10px 24px; border-radius: 40px; font-family: var(--f-display); font-size: 32px; box-shadow: 0 5px 0 #8c1530; animation: wiggle 1s ease-in-out infinite; }
@keyframes wiggle { 25% { transform: rotate(-4deg) } 75% { transform: rotate(4deg) } }
.q-card { width: 100%; flex: 1; min-height: 0; background: #fff; color: var(--cardInk); border-radius: 40px; padding: 40px 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; box-shadow: 0 14px 0 rgba(0,0,0,.35); position: relative; }
.q-card.enter { animation: cardIn .7s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes cardIn { from { opacity: 0; transform: scale(.2) rotate(-8deg) } }
.q-text { font-weight: 900; font-size: 64px; line-height: 1.15; text-align: center; max-width: 1600px; }
.q-text.long { font-size: 48px; }
.q-desc { font-size: 36px; font-weight: 700; text-align: center; opacity: .8; max-width: 1500px; }
.q-img { max-height: 380px; max-width: 80%; border-radius: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.25); object-fit: contain; }
.q-card.hasimg .q-text { font-size: 46px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; width: 100%; max-width: 1650px; }
.opt { position: relative; border-radius: 26px; padding: 22px 30px 22px 100px; font-size: 40px; font-weight: 900; color: #fff; background: var(--oc); box-shadow: inset 0 -8px 0 rgba(0,0,0,.2), 0 6px 0 rgba(0,0,0,.25); min-height: 104px; display: flex; align-items: center; transition: .4s; }
.opt .l { position: absolute; left: 22px; width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.3); display: grid; place-items: center; font-family: var(--f-display); font-size: 38px; }
.opt .cnt { margin-left: auto; padding-left: 20px; display: flex; gap: 4px; align-items: center; font-size: 34px; }
.opt.wrong { opacity: .45; filter: grayscale(.8); transform: scale(.96); }
.opt.right { transform: scale(1.04); box-shadow: 0 0 0 8px var(--gold), 0 0 50px var(--gold), inset 0 -8px 0 rgba(0,0,0,.2); }
.q-status { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 24px; font-family: var(--f-display); font-size: 48px; text-align: center; }
.status-ready { opacity: .8; animation: pulse 1.2s infinite; }
.status-open { color: var(--green); font-size: 80px; -webkit-text-stroke: 4px #035c45; paint-order: stroke fill; text-shadow: 0 7px 0 #035c45; animation: flash .5s ease-in-out infinite alternate; }
@keyframes flash { to { transform: scale(1.08); } }
.buzzer-who { display: flex; align-items: center; gap: 26px; animation: popin .5s cubic-bezier(.3,1.8,.5,1); }
.buzzer-who .av { width: 110px; height: 110px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 66px; border: 6px solid #fff; box-shadow: 0 0 40px var(--pc); }
.buzzer-who .t { font-size: 64px; }
.ring { width: 110px; height: 110px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; }
.timer { width: 100%; height: 22px; background: rgba(255,255,255,.12); border-radius: 20px; overflow: hidden; }
.timer > div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 20px; transform-origin: left; }
.timer.low > div { background: var(--red); }
.timer.hidden { visibility: hidden; }
#answerBox:empty { display: none; }
.answer { position: relative; margin-top: -60px; background: linear-gradient(#ffe066, var(--gold2)); color: #4a2100; padding: 22px 50px; border-radius: 30px; font-family: var(--f-display); font-size: 58px; box-shadow: 0 10px 0 #a35200, 0 20px 50px rgba(0,0,0,.4); text-align: center; max-width: 90%; animation: popin .6s cubic-bezier(.3,1.6,.5,1) both; z-index: 3; }
.answer small { display: block; font-family: var(--f-body); font-weight: 800; font-size: 26px; opacity: .7; }
.results { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.res { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.15); border-radius: 40px; padding: 8px 22px 8px 8px; font-size: 32px; animation: popin .5s both; }
.res .av { width: 54px; height: 54px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 32px; }
.res .d { font-family: var(--f-display); }
.res.ok .d { color: var(--gold); } .res.bad .d { color: var(--red); }
.ranking { display: flex; flex-direction: column; gap: 8px; width: 900px; }
.rk { display: flex; align-items: center; gap: 16px; background: #f1edff; border-radius: 20px; padding: 8px 20px; font-size: 32px; font-weight: 900; animation: slideup .5s both; }
.rk.best { background: linear-gradient(#ffe066, var(--gold2)); }
.rk .av { width: 50px; height: 50px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 30px; }
.rk .v { margin-left: auto; font-family: var(--f-display); }
.rk .dd { width: 180px; text-align: right; opacity: .55; font-size: 26px; }
.big-target { font-family: var(--f-display); font-size: 90px; line-height: 1; color: #ff4d6d; text-align: center; margin-bottom: 14px; }
.q-card.compact { gap: 14px; padding: 24px 60px; }
.q-card.compact .q-text { font-size: 40px; }
.q-card { overflow: hidden; }
.answer { min-width: 420px; }

/* Special */
.special { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.sunburst { position: absolute; left: 50%; top: 50%; width: 2600px; height: 2600px; margin: -1300px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,210,63,.18) 0 10deg, transparent 10deg 20deg); animation: spin 20s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg) } }
.sp-title { font-family: var(--f-display); font-size: 190px; line-height: 1; color: #fff; -webkit-text-stroke: 8px #b0102f; paint-order: stroke fill; text-shadow: 0 16px 0 #b0102f, 0 30px 60px rgba(0,0,0,.5); animation: zoomRot 1s cubic-bezier(.3,1.6,.5,1) both; text-align: center; position: relative; }
@keyframes zoomRot { from { transform: scale(0) rotate(-30deg) } }
.sp-sub { font-size: 50px; font-weight: 900; margin-top: 40px; text-align: center; position: relative; animation: slideup .6s .5s both; }
.sp-sub b { color: var(--gold); }
.wager { font-family: var(--f-display); font-size: 140px; color: var(--gold); -webkit-text-stroke: 5px #5a2a00; paint-order: stroke fill; text-shadow: 0 10px 0 #5a2a00; position: relative; margin-top: 20px; }

/* Wheel */
.wheel-screen { height: 100%; display: flex; align-items: center; justify-content: center; gap: 80px; }
.wheel-wrap { position: relative; width: 680px; height: 680px; margin-top: 20px; }
.wheel-wrap svg.wheel { width: 100%; height: 100%; filter: drop-shadow(0 16px 0 rgba(0,0,0,.35)); }
#wheelRot { transform-origin: 380px 380px; }
.wheel-wrap svg.pointer { position: absolute; left: 50%; top: -30px; margin-left: -36px; width: 72px; height: 90px; z-index: 2; filter: drop-shadow(0 6px 0 rgba(0,0,0,.4)); }
.wheel-side { width: 720px; text-align: center; }
.wheel-res { font-family: var(--f-display); font-size: 90px; color: var(--gold); -webkit-text-stroke: 4px #5a2a00; paint-order: stroke fill; text-shadow: 0 8px 0 #5a2a00; animation: popin .6s cubic-bezier(.3,1.8,.5,1) both; margin-top: 30px; }
.wheel-txt { font-size: 42px; font-weight: 900; margin-top: 20px; animation: slideup .5s both; }

/* Round end / Final */
.center { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; position: relative; }
.standings { display: flex; flex-direction: column; gap: 12px; width: 1100px; }
.st { display: flex; align-items: center; gap: 20px; background: #fff; color: var(--cardInk); border-radius: 26px; padding: 10px 26px; font-size: 38px; font-weight: 900; box-shadow: 0 6px 0 rgba(0,0,0,.3); animation: slideup .5s both; }
.st .pl { font-family: var(--f-display); width: 60px; }
.st .av { width: 64px; height: 64px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 38px; }
.st .s { margin-left: auto; font-family: var(--f-display); }
.award { background: #fff; color: var(--cardInk); border-radius: 50px; padding: 30px 90px 24px; text-align: center; box-shadow: 0 16px 0 rgba(0,0,0,.35); position: relative; animation: cardIn .8s cubic-bezier(.2,1.3,.4,1) both; }
.award .ic { font-size: 100px; line-height: 1; }
.award h2 { font-family: var(--f-display); font-size: 84px; margin: 4px 0 0; color: #ff4d6d; line-height: 1; }
.award p { font-size: 32px; font-weight: 800; margin: 6px 0 20px; opacity: .7; }
.award .who { display: flex; gap: 30px; justify-content: center; }
.award .who > div { text-align: center; font-weight: 900; font-size: 34px; }
.award .bonus { line-height: 1; }
.award .who .av { width: 110px; height: 110px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 80px; border: 7px solid #fff; box-shadow: 0 0 0 6px var(--pc); margin: 0 auto 10px; }
.award .bonus { font-family: var(--f-display); font-size: 70px; color: var(--gold2); margin-top: 20px; }
.podium { display: flex; align-items: flex-end; gap: 30px; margin-top: 40px; }
.pod { width: 320px; text-align: center; }
.pod .av { width: 150px; height: 150px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 92px; border: 8px solid #fff; margin: 0 auto 12px; animation: hop 1.4s ease-in-out infinite; }
.pod .nm { font-weight: 900; font-size: 38px; }
.pod .sc { font-family: var(--f-display); font-size: 44px; color: var(--gold); }
.pod .base { margin-top: 14px; border-radius: 24px 24px 0 0; font-family: var(--f-display); font-size: 120px; color: #fff; -webkit-text-stroke: 4px rgba(0,0,0,.3); paint-order: stroke fill; display: grid; place-items: center; box-shadow: inset 0 -14px 0 rgba(0,0,0,.2); animation: rise 1s cubic-bezier(.2,1.2,.4,1) both; transform-origin: bottom; }
@keyframes rise { from { transform: scaleY(0) } }
.pod.p1 .base { height: 340px; background: linear-gradient(#ffe066, #ff9f1c); animation-delay: 1.6s; }
.pod.p2 .base { height: 240px; background: linear-gradient(#e0e6f5, #9aa6c4); animation-delay: .8s; }
.pod.p3 .base { height: 170px; background: linear-gradient(#ffb380, #c4622d); }
.pod.p1 > :not(.base) { animation: popin .6s 2.4s both; } .pod.p2 > :not(.base) { animation: popin .6s 1.6s both; } .pod.p3 > :not(.base) { animation: popin .6s .8s both; }
.pod.p1 .av { width: 190px; height: 190px; font-size: 120px; box-shadow: 0 0 60px var(--gold); }
.rest { max-width: 1700px; row-gap: 6px; display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; font-size: 28px; font-weight: 800; opacity: .8; }

/* Popover & help */
#menu { position: absolute; z-index: 30; background: #fff; color: var(--cardInk); border-radius: 24px; padding: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.5); display: none; width: 360px; }
#menu h3 { margin: 0 0 10px; font-family: var(--f-display); font-size: 30px; }
#menu .row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
#menu button { flex: 1; border: 0; border-radius: 14px; padding: 12px 8px; font-weight: 900; font-size: 22px; background: #eee9ff; color: var(--cardInk); }
#menu button.p { background: #c8f7e6; } #menu button.m { background: #ffd6de; }
#help { position: absolute; inset: 0; background: rgba(10,6,40,.92); z-index: 40; display: none; place-items: center; }
#help.show { display: grid; }
#help .box { background: #fff; color: var(--cardInk); border-radius: 40px; padding: 40px 60px; font-size: 30px; max-width: 1300px; }
#help h2 { font-family: var(--f-display); font-size: 60px; margin: 0 0 20px; color: #ff4d6d; }
#help table td { padding: 6px 18px; }
#help .kbd { background: #eee9ff; }
#fxcanvas { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
#flash { position: absolute; inset: 0; pointer-events: none; z-index: 45; opacity: 0; }
#flash.go { animation: scrflash .6s ease-out; }
@keyframes scrflash { 0% { opacity: .55 } 100% { opacity: 0 } }
#startOverlay { position: absolute; inset: 0; z-index: 60; background: rgba(10,6,40,.85); display: grid; place-items: center; cursor: pointer; }
#startOverlay div { font-family: var(--f-display); font-size: 80px; color: var(--gold); text-align: center; }
#startOverlay small { display: block; font-family: var(--f-body); font-size: 30px; color: #fff; opacity: .7; margin-top: 20px; }

/* Minispiele */
.q-text.small { font-size: 46px; }
.g-panel { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.g-panel:empty { display: none; }
.teams { display: flex; gap: 30px; justify-content: center; width: 100%; flex-wrap: wrap; }
.team { flex: 1; max-width: 760px; min-width: 380px; background: color-mix(in srgb, var(--tc) 14%, #fff); border: 6px solid var(--tc); border-radius: 30px; padding: 16px 22px; transition: .3s; }
.team h3 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 400; font-size: 44px; color: var(--tc); display: flex; align-items: center; gap: 16px; }
.team h3 b { margin-left: auto; font-weight: 400; color: var(--cardInk); }
.team h3 .kbd { font-size: 22px; }
.team .mem { display: flex; flex-wrap: wrap; gap: 10px; }
.team .mem span { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 40px; padding: 4px 16px 4px 4px; font-size: 26px; font-weight: 900; }
.team .mem i { font-style: normal; width: 42px; height: 42px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 24px; }
.team.active { transform: scale(1.04); box-shadow: 0 0 0 6px #fff, 0 0 40px var(--tc); }
.team.win { background: linear-gradient(#ffe066, var(--gold2)); box-shadow: 0 0 0 6px var(--gold), 0 0 50px var(--gold); transform: scale(1.04); }
.team[data-team] { cursor: pointer; }
.tchip { display: inline-block; background: var(--tc); color: #fff; padding: 6px 24px; border-radius: 40px; font-family: var(--f-display); text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.g-next { font-family: var(--f-display); font-size: 40px; display: flex; gap: 16px; align-items: center; }
.secret { background: #22184f; color: #fff; border-radius: 30px; padding: 22px 50px; font-family: var(--f-display); font-size: 60px; display: flex; gap: 20px; align-items: center; }
.secret span { font-size: 40px; opacity: .85; }
.counter { font-family: var(--f-display); font-size: 48px; display: flex; gap: 16px; align-items: center; }
.counter b { font-weight: 400; font-size: 110px; line-height: 1; color: var(--green); -webkit-text-stroke: 4px #035c45; paint-order: stroke fill; }
.wchips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 1600px; }
.wchip { padding: 8px 22px; border-radius: 40px; font-size: 30px; font-weight: 900; animation: popin .4s both; }
.wchip.ok { background: #d5f7ea; color: #035c45; }
.wchip.no { background: #eee; color: #888; text-decoration: line-through; }
.wchip.open { background: #fff1c2; color: #7a5200; }
.timeup { font-family: var(--f-display); font-size: 110px; color: #ff4d6d; -webkit-text-stroke: 5px #7a0f24; paint-order: stroke fill; animation: popin .5s cubic-bezier(.3,1.8,.5,1); }
.bigtime { font-family: var(--f-display); font-size: 260px; line-height: 1; color: #3a86ff; -webkit-text-stroke: 8px #1a3a80; paint-order: stroke fill; }
.bigtime.low { color: #ff4d6d; -webkit-text-stroke-color: #7a0f24; animation: flash .5s ease-in-out infinite alternate; }
.q-card.drawing { padding: 20px; }
.g-draw { display: flex; gap: 24px; width: 100%; height: 100%; min-height: 0; align-items: stretch; }
.g-canvas { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.g-canvas canvas { max-width: 100%; max-height: 100%; aspect-ratio: 4 / 3; height: 100%; border-radius: 20px; box-shadow: inset 0 0 0 4px #e6e1ff, 0 0 0 4px #e6e1ff; background: #fff; }
.g-side { width: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.g-side .counter { flex-direction: column; gap: 0; }
.g-side .wchips { flex-direction: column; align-items: center; }
.g-side .g-next { flex-direction: column; font-size: 32px; }

/* Automatisch verkleinern statt abschneiden */
.fit { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 26px; transform-origin: center center; flex-shrink: 0; }
.q-card.compact .fit { gap: 14px; }

.standings.two { display: grid; grid-auto-flow: column; grid-template-columns: 1fr 1fr; column-gap: 30px; width: 1700px; }
.center > .fit { gap: 20px; }

/* Intro */
.intro { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; position: relative; text-align: center; }
.intro .rays { position: absolute; left: 50%; top: 50%; width: 2600px; height: 2600px; margin: -1300px 0 0 -1300px; background: repeating-conic-gradient(rgba(255,255,255,.07) 0 10deg, transparent 10deg 20deg); animation: spin 30s linear infinite; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.i-pre, .i-title, .i-go { font-family: var(--f-display); color: var(--gold); -webkit-text-stroke: 8px #5a2a00; paint-order: stroke fill; text-shadow: 0 16px 0 #5a2a00, 0 30px 60px rgba(0,0,0,.5); margin: 0; line-height: .95; }
.i-pre { font-size: 110px; letter-spacing: 10px; }
.i-title { font-size: 230px; }
.i-go { font-size: 260px; animation: goPop 1s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes goPop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
.ltr { display: inline-block; animation: ltrDrop .7s cubic-bezier(.3,1.7,.5,1) both; }
.sp { display: inline-block; width: .3em; }
@keyframes ltrDrop { from { transform: translateY(-600px) rotate(-30deg) scale(.4); opacity: 0; } }
.i-sub { font-family: var(--f-display); font-size: 80px; color: #fff; -webkit-text-stroke: 4px #2d1b7a; paint-order: stroke fill; text-shadow: 0 7px 0 #2d1b7a; animation: fadeUp .8s both; }
@keyframes fadeUp { from { transform: translateY(60px); opacity: 0; } }
.i-head { font-size: 110px; animation: fadeUp .6s both; }
.i-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 34px 40px; max-width: 1700px; }
.ip { width: 220px; animation: popin .6s cubic-bezier(.3,1.8,.5,1) both; }
.ip .av { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 90px; border: 8px solid #fff; box-shadow: 0 10px 0 rgba(0,0,0,.3), 0 0 40px var(--pc); }
.ip .nm { font-family: var(--f-display); font-size: 40px; margin-top: 12px; text-shadow: 0 4px 0 rgba(0,0,0,.35); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i-cats { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; max-width: 1800px; }
.icat { width: 320px; height: 260px; border-radius: 36px; background: var(--cc); display: grid; place-items: center; padding: 20px; font-family: var(--f-display); font-size: 50px; line-height: 1.05; text-shadow: 0 4px 0 rgba(0,0,0,.3); box-shadow: inset 0 -14px 0 rgba(0,0,0,.2), 0 12px 0 rgba(0,0,0,.35); animation: cardFlip .8s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes cardFlip { from { transform: perspective(900px) rotateY(-100deg) translateY(200px) scale(.4); opacity: 0; } }
.i-note { font-family: var(--f-display); font-size: 54px; color: var(--gold); text-shadow: 0 5px 0 #5a2a00; animation: fadeUp .7s both; }
.i-rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; max-width: 1800px; }
.ir { background: #fff; color: var(--cardInk); border-radius: 36px; padding: 34px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 12px 0 rgba(0,0,0,.35); animation: popin .6s cubic-bezier(.3,1.8,.5,1) both; }
.ir .ic { font-size: 110px; line-height: 1; }
.ir b { font-family: var(--f-display); font-weight: 400; font-size: 56px; }
.ir span { font-size: 30px; font-weight: 800; opacity: .75; }

/* Team-Reihenfolge */
.lp .ord { position: absolute; top: -8px; left: 6px; font-family: var(--f-display); font-size: 34px; color: var(--gold); -webkit-text-stroke: 2px #5a2a00; paint-order: stroke fill; z-index: 2; }
.lp .mv { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.lp .mv button, .lp .mv span { width: 44px; height: 36px; }
.lp .mv button { border: 0; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; cursor: pointer; }
.lp .mv button:hover { background: rgba(255,255,255,.35); }
.ip { position: relative; }
.ipn { position: absolute; top: -14px; left: 18px; font-family: var(--f-display); font-size: 54px; color: var(--gold); -webkit-text-stroke: 3px #5a2a00; paint-order: stroke fill; z-index: 2; }
