/* V15 Neon Glass: shared by Studio and the standalone player. */
:root{--bg:#090b20;--surface:rgba(25,29,61,.78);--surface-strong:#181d3d;--line:#333a68;--line-strong:#465080;--ink:#edf3ff;--muted:#a7b0d5;--primary:#63f4d3;--accent:#ee74dc;--key:#5e4079;--shadow:0 20px 70px #0007}
body,body[data-theme]{background:#090b20;color:var(--ink);font-family:'Segoe UI',Arial,sans-serif}
body:before{content:'';position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 10% 0%,#51328e35,transparent 45%),radial-gradient(ellipse at 95% 80%,#16697830,transparent 45%)}
.topbar{background:#11152be8;border-bottom:1px solid #7485d529;backdrop-filter:blur(12px);height:76px;padding:12px 24px}
.brand-mark{background:linear-gradient(140deg,#8869f5,#3eeac0);color:#fff;box-shadow:0 0 25px #9470ff55;border:1px solid #c6b5ff77}
.brand-name{font-size:18px;letter-spacing:.09em}.brand-sub{color:#8ae7d7;letter-spacing:.12em;font-size:10px}
.btn,.btn.ghost,.icon-btn{background:linear-gradient(160deg,#343858c4,#1b2146da);color:#e8efff;border:1px solid #8793dd45;border-radius:13px;box-shadow:inset 0 1px #ffffff16,0 4px 0 #070b20,0 6px 16px #0002;transition:transform .18s,border-color .18s,box-shadow .18s}
.btn:hover,.icon-btn:hover{transform:translateY(-2px);border-color:#89c4ed;box-shadow:inset 0 1px #fff2,0 4px 0 #070b20,0 0 18px #5edbd933}.btn:active{transform:translateY(1px);box-shadow:none}
.btn.primary,.welcome-actions .btn.primary{background:linear-gradient(125deg,#62f3d3,#54bddd);color:#082235;border:1px solid #adffe8;box-shadow:0 4px 0 #1a6578,0 0 24px #52edcc30}
.btn.accent{background:linear-gradient(120deg,#ae75f2,#e979d2);color:#fff;border-color:#d8aaff99}.btn.selected{background:#5d468e;color:#fff;border-color:#baa1ff}
.btn-wrong{background:#71314c80;color:#ffb6d1;border-color:#fa7dab77}.btn-correct{background:#205c5280;color:#a0ffe5;border-color:#58dfb777}
.workspace{grid-template-columns:minmax(530px,1.3fr) minmax(380px,1fr)}
.editor{background:#11152beb;border-color:#7485d529;backdrop-filter:none}.editor-scroll{padding:20px 22px}.sticky-head{background:linear-gradient(#11152b,#11152bf2);top:-20px;padding-top:20px}.panel-head h2{font-size:24px;letter-spacing:-.04em}.eyebrow,.section-mini-title{color:#82eed6;letter-spacing:.1em}.editor-nav{background:#11152b;top:76px}.control-section{background:linear-gradient(135deg,#ffffff09,#ffffff03);border:1px solid #8793dd33;border-radius:20px;padding:20px;box-shadow:inset 0 1px #ffffff0a,0 12px 25px #0001}
.field span,.pair-no,.number-style-card span{color:#d7e2ff}.field input[type=text],.field textarea,.field select,.field input[type=file],input[type=number],#keywordGuessInput,#bulkText{background:#0e142edb;color:#f2f5ff;border:1px solid #8793dd45;border-radius:12px;box-shadow:inset 0 2px 5px #0003;padding:11px}
.field input:focus,.field textarea:focus,.field select:focus{border-color:#7debd4;box-shadow:0 0 0 3px #63f4d318}select option{background:#18213f;color:white}input[type=range]{accent-color:#70eacf}
.status-pill,.keyword-info.ok{background:#29685650;border-color:#51d4ad50;color:#9ff8d7}.status-pill.dirty,.keyword-info.warn{background:#6d4c3044;color:#ffe19b;border-color:#d39a3755}
.keyword-info,.help-note{background:#1c254450;border-color:#8793dd35;color:#b8c8e7}.pair-card{background:#192140a8;border-color:#8493dd44;box-shadow:inset 0 1px #fff1}.pair-feedback-box,.pair-feedback-box.wrong{background:#29375970;border-color:#637bb655;color:#e5efff}.pair-feedback-box.wrong{background:#61344444;border-color:#ad5b7755}.pair-media-summary{color:#c4d3ee}.number-style-card{background:#202a4c;border-color:#6678ad33}.number-style-card.active{border-color:#67eecf;box-shadow:0 0 0 2px #67eecf24}.pair-drag{color:#c4d3ee}
.stage-wrap{background:transparent;padding:20px;gap:12px}.stage-toolbar,.stage-toolbar:after{color:#b2bedb}.stage{background:radial-gradient(ellipse at 5% 5%,#38265580,transparent 50%),radial-gradient(ellipse at 100% 100%,#155a6366,transparent 55%),#0e142d!important;border:1px solid #8b87d244;border-radius:24px;box-shadow:inset 0 1px #fff1,0 20px 65px #0005;perspective:1000px}
.stage::before{opacity:.3;background:linear-gradient(#9d91df0e 1px,transparent 1px),linear-gradient(90deg,#9d91df0e 1px,transparent 1px);background-size:44px 44px}.decor{display:none}.stage-title{color:#e5ebff;text-shadow:0 0 25px #9d72ee80;font-size:20px;letter-spacing:.04em}
.board-panel{border:0;background:transparent;box-shadow:none}.game-area{position:relative}.cell{border:1px solid #7bb9c458;background:linear-gradient(135deg,#c6dcff20,#44599115);color:#fff;border-radius:7px;margin:0;box-shadow:inset 0 1px #b1d5ff20,0 3px 0 #050b1b;transition:background .2s,box-shadow .2s}
.cell:hover{background:#6ce5d32e;box-shadow:0 0 20px #4dddc333;transform:translateY(-2px)}.cell.key-cell,.cell.keyword-only{background:linear-gradient(135deg,#c868e84a,#bd65ab26);border-color:#e98ddb8c;box-shadow:inset 0 1px #ffd3ff33,0 0 18px #d175ed16}.cell.key-cell::after{border:0}.cell.selected-row{background:#55dac733;border-color:#70f2d4}.cell.revealed{background:linear-gradient(135deg,#329e9155,#346e9670);color:#caffef;text-shadow:0 0 14px #66ffd688}.cell.key-cell.revealed{background:#9554bb77;color:white}.crossword-grid{gap:2px}.keyword-star{color:#f9d38a;filter:drop-shadow(0 0 13px #ffc66c88)}.row-badge.active{filter:drop-shadow(0 0 10px #79ffd6)}
.question-card{background:linear-gradient(120deg,#ffffff17,#ffffff06),#121b39e8;backdrop-filter:blur(10px);border:1px solid #bb9de45e;box-shadow:inset 0 1px #ffffff35,0 0 35px #8e65d222,0 18px 55px #0007;animation:neonFly .55s cubic-bezier(.16,1,.3,1) both;transform-origin:bottom center;border-radius:24px}
.question-ornament{color:#93dbeb!important;opacity:.65}.question-number{background:linear-gradient(125deg,#54b6d84d,#9975e659);color:#fff;border:1px solid #7ddbcc77;box-shadow:0 0 25px #9c78eb33}.question-text{color:#f6f5ff;font-weight:650}.question-label{color:#79edd4;letter-spacing:.15em}.answer-feedback{color:#b8cee9}.answer-feedback.ok{color:#7df6c5}.answer-feedback.error{color:#ffb0c8}.turn-controls{background:#20284aab;color:#b7ccea;border:1px solid #8793dd30}.turn-controls strong{color:#ffd58f}.turn-controls .timer-volume{color:#c6d7ee}
.team-card{background:linear-gradient(145deg,#4c346077,#1a375766);border:1px solid #bf91e663;color:#edf2ff;box-shadow:inset 0 1px #ffffff20,0 10px 30px #0003;border-radius:20px}.team-card.active{border-color:#71f6d6;box-shadow:0 0 28px #4fe6bb25}.team-score{font-size:clamp(34px,4vw,65px);color:#c2ffe9;text-shadow:0 0 20px #5af3c377}.team-name{color:#eef5ff}.team-card small{color:#b5c7e9}
.welcome-screen{justify-content:center;background:#090b20;perspective:1100px}.welcome-screen:before{background:radial-gradient(ellipse at 5% 25%,#6741b366,transparent 52%),radial-gradient(ellipse at 96% 73%,#086d7055,transparent 48%),linear-gradient(125deg,#10132d,#0a0e21);filter:none;transform:none;animation:none}.welcome-overlay{background:linear-gradient(90deg,#070b1d77,transparent,#070b1d44)}.welcome-screen:after{content:'';position:absolute;inset:-30%;background:linear-gradient(transparent 49%,#b794ff12 50%,transparent 51%);transform:rotate(-25deg);pointer-events:none}
.welcome-content,.welcome-content.poster-mode{position:relative;z-index:3;width:min(960px,82vw);margin:0;padding:35px 40px;border:1px solid #b7a5ef30;background:linear-gradient(130deg,#ffffff0d,#ffffff02);border-radius:36px;box-shadow:inset 0 1px #ffffff22,0 30px 100px #0004;backdrop-filter:blur(4px);text-align:center;animation:heroArrive .85s cubic-bezier(.16,1,.3,1) both}
.welcome-kicker{font-size:12px;letter-spacing:.24em;color:#8eedda;margin:0 0 18px}.welcome-badge{display:inline-block;background:#9374dc18;border:1px solid #c3a6ff55;border-radius:30px;padding:8px 18px;color:#d8c6ff;font-size:11px;letter-spacing:.14em}
.welcome-content h1{font-size:clamp(34px,4.7vw,70px);font-weight:850;letter-spacing:-.035em;line-height:1.14;margin:28px auto 20px;color:#fff;background:linear-gradient(110deg,#b8fff0 10%,#d1c1ff 52%,#ffb6e8 85%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-shadow:0 0 55px #ae88ff30;max-width:850px}
.welcome-sub{font-size:16px;line-height:1.7;color:#b6c4e5;margin:0 auto 24px;max-width:640px}.hero-tiles{justify-content:center;gap:12px;margin:23px 0 30px}.hero-tiles span{width:58px;height:62px;font-size:28px;background:linear-gradient(135deg,#bce3ff20,#9375ec30);color:#f0edff;border:1px solid #d4bdff66;border-radius:13px;box-shadow:inset 0 1px #fff3,0 6px 0 #070c20,0 0 25px #a17df326;transform:rotate(-4deg);animation:tileFloat 5s ease-in-out infinite}.hero-tiles span:nth-child(even){animation-delay:-2s;transform:rotate(5deg)}.hero-tiles i{color:#ffdc98;filter:drop-shadow(0 0 14px #ffcf6166);font-size:42px}.welcome-actions{justify-content:center;gap:12px;flex-wrap:wrap}.welcome-actions .btn{font-size:14px;height:50px;padding:0 22px}.intro-controls{z-index:8;background:#171e3a99;color:#cdd9f0;border:1px solid #8793dd33;border-radius:18px;backdrop-filter:blur(8px);bottom:22px;right:22px}.welcome-particles{display:none}.welcome-guide{max-height:43vh;overflow:auto}.welcome-card{background:#181f3a;border:1px solid #86cfcf55;color:#edf3ff;text-align:left}.welcome-card h3,.welcome-card ol{color:#dce7ff}
.neon-orbit{position:absolute;z-index:2;width:320px;height:320px;border:1px solid #c07df444;border-radius:50%;pointer-events:none;box-shadow:0 0 45px #9a61e514,inset 0 0 50px #4ee9cf10;transform:rotateX(50deg) rotateZ(-25deg);left:-120px;top:15%;animation:orbitTurn 18s linear infinite}.neon-orbit.two{left:auto;right:-110px;top:auto;bottom:5%;border-color:#60e5c755;animation-direction:reverse}.floating-crossword{position:absolute;right:2%;top:10%;display:grid;grid-template-columns:repeat(3,52px);gap:7px;transform:rotate(12deg);opacity:.35;pointer-events:none;z-index:2}.floating-crossword span{width:52px;height:52px;border:1px solid #a4d9e977;border-radius:10px;display:grid;place-items:center;background:#b6baff13;color:#cbcbff;font-size:25px}.floating-crossword span:nth-child(3n+2){background:#d38ef52a;color:#ffe1ff}
.keyword-reveal{background:radial-gradient(ellipse at 20% 20%,#6b3bb855,transparent 55%),radial-gradient(ellipse at 85% 85%,#137e7244,transparent 50%),#0b1027ed!important;backdrop-filter:blur(8px);border:1px solid #d0b8ff44;animation:heroArrive .7s cubic-bezier(.16,1,.3,1) both;perspective:1000px;overflow:auto}.victory-scenery{background:none!important;opacity:1}.victory-scenery:before{content:'';position:absolute;width:380px;height:380px;left:calc(50% - 190px);top:calc(50% - 190px);border:1px solid #ab85ea66;border-radius:50%;box-shadow:0 0 80px #ba80ee22,inset 0 0 50px #67edcf11;transform:rotateX(45deg);animation:orbitTurn 15s linear infinite}.victory-scenery:after{content:'✦';position:absolute;left:50%;top:40%;font-size:380px;line-height:1;transform:translate(-50%,-50%);color:#dbaaff0c;filter:none}.keyword-caption{color:#95f4d9;letter-spacing:.2em;font-size:13px}.keyword-congrats{color:#c6b9e9}.mini-star{color:#ffde90;text-shadow:0 0 30px #ffe09e77}.key-tile{background:linear-gradient(130deg,#cd92ff2e,#5a91d326)!important;color:#efffff!important;border:1px solid #b0eae466!important;box-shadow:inset 0 1px #ffffff40,0 8px 0 #090e27,0 0 30px #ca83fc30!important;text-shadow:0 0 20px #72f6d999!important}
.victory-teams{color:#e6f4ff}.victory-teams table{background:#ffffff0b;border-color:#8dace333}.victory-teams th,.victory-teams td{border-color:#899fdb22!important;color:#e3eeff}.champion-title{color:#ffe398!important}.victory-teams tr.winner{background:#5bd6b522;color:#ddffe9}.result-pop-card{background:linear-gradient(130deg,#eefbff19,#b59afa12),#162443dd;color:#e9f4ff;border:1px solid #abebe466;backdrop-filter:blur(10px);box-shadow:0 0 40px #79e9d333;animation:neonFly .5s cubic-bezier(.16,1,.3,1)}
#neonFireworks{position:fixed;inset:0;z-index:230;pointer-events:none;width:100%;height:100%}
dialog,dialog.studio-dialog,#mediaDialog,#donateDialog{background:linear-gradient(130deg,#ffffff0e,#ffffff03),#141b36;color:#e8efff;border:1px solid #bca6eb66;border-radius:24px;box-shadow:0 0 50px #b18be62a,0 25px 100px #0008;backdrop-filter:blur(12px);animation:neonFly .45s cubic-bezier(.16,1,.3,1)}dialog::backdrop{background:#05091bbc;backdrop-filter:blur(5px)}dialog p,dialog h2,dialog label,dialog small,#mediaPreviewLabel{color:#d4ddf2}#mediaGrid{background:transparent}.media-card{background:#ffffff0c;border-color:#8397cb44;color:#e5edff}.donate-details>div,.donate-details>button{background:#283353!important;color:#e6eeff!important;border-color:#8397cb44!important}.donate-details strong{color:#e6eeff!important}.donate-thanks{color:#b4f6df!important}.toast{background:#192b47;color:#d7fff1;border-color:#76d9c666}.toast.warn{background:#443629;color:#ffe4b7}.toast.error{background:#4b2438;color:#ffc1d9}
body.play-mode .topbar{background:#10162cd9;position:relative;flex-shrink:0;pointer-events:auto;height:76px;border-bottom:1px solid #617ca533}body.play-mode .brand{opacity:1}body.play-mode .stage-title{padding-top:24px;font-size:clamp(24px,2.4vw,42px)}body.play-mode .stage-wrap{padding:12px}body.play-mode .stage{border-radius:22px;border:1px solid #819ace30}body.play-mode .workspace{grid-template-columns:1fr}body.play-mode .player-shell{height:calc(100dvh - 76px);padding:12px}body.play-mode .player-shell .stage{min-height:0;height:100%;width:100%}
#offlineDialog progress{width:100%;accent-color:#70f1ce;height:12px}#offlineStatus{line-height:1.6}#offlineDialog{width:min(570px,92vw)}
@keyframes neonFly{from{opacity:0;transform:perspective(1000px) translate3d(70px,65px,-110px) rotateX(8deg) rotateY(-8deg) scale(.94)}to{opacity:1;transform:perspective(1000px) translate3d(0,0,0) rotateX(0) rotateY(0) scale(1)}}
@keyframes heroArrive{from{opacity:0;transform:translateY(45px) rotateX(7deg) scale(.96)}to{opacity:1;transform:translateY(0) rotateX(0) scale(1)}}
@keyframes tileFloat{0%,100%{translate:0 0}50%{translate:0 -7px}}
@keyframes orbitTurn{from{transform:rotateX(55deg) rotateZ(-25deg)}to{transform:rotateX(55deg) rotateZ(335deg)}}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(460px,1.3fr) minmax(320px,1fr)}.editor-scroll{padding:15px}.top-actions{gap:6px}.topbar{padding:12px}.top-actions .btn{padding:0 9px;font-size:12px}.floating-crossword{opacity:.18}}
@media(max-width:800px){.workspace{display:flex;flex-direction:column}.stage-wrap{min-height:400px}.topbar{height:auto;min-height:76px;flex-wrap:wrap;gap:12px}.welcome-content,.welcome-content.poster-mode{width:90vw;padding:28px 22px}.welcome-content h1{font-size:40px}.welcome-kicker{letter-spacing:.1em;font-size:10px}.welcome-sub{font-size:14px}.intro-controls{bottom:10px;right:10px;left:10px;justify-content:center}.question-card{left:10px;right:10px;bottom:10px;padding:12px}.question-card-top{grid-template-columns:45px 1fr 36px;gap:10px}.question-text{font-size:19px}.floating-crossword{display:none}.welcome-actions{flex-direction:row}.team-score{font-size:36px}body.play-mode .stage-wrap{min-height:calc(100dvh - 130px)}body.play-mode .player-shell{height:auto;min-height:calc(100dvh - 130px)}body.play-mode .player-shell .stage{min-height:600px}.keyword-caption{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.team-chip,.stage-wrap .team-chip,body.play-mode .team-chip{background:linear-gradient(145deg,#5f397b55,#204c6344);border:1px solid #b394df66;color:#e6edff;box-shadow:inset 0 1px #fff2,0 5px 0 #090c23,0 10px 25px #0004}.team-chip:after{border-color:#acbcea20}.team-chip b{color:#c0ffe7;text-shadow:0 0 20px #6affcc50}.team-chip.active{background:linear-gradient(145deg,#4ba58d44,#395c8355);border-color:#7ffbdc;box-shadow:inset 0 1px #fff2,0 5px 0 #102c36,0 0 24px #73e8cc30}.team-chip.active b{text-shadow:0 0 25px #69f4c56b}.team-ornament,.team-chip.active .team-ornament{color:#c4a0f4}#turnStatus{color:#9ceedd}.team-chip small{color:#b9cbe1}
.crossword-grid{gap:0}.cell{border-radius:6px;outline:1px solid #090f24;outline-offset:-1px}
body[data-theme=music]{--primary:#c2a0ff;--accent:#70e5d5}body[data-theme=minimal]{--primary:#7fbce9;--accent:#ada7ff}
.question-card{left:50%;right:auto;width:min(1100px,94%);translate:-50% 0;transform:none;max-height:62%;overflow:auto}.question-card:before{border-color:#8bd8d644}.question-card:after{border-color:#b596ff10}.answer-workflow{background:#0f173270;border:1px solid #829ad433}.question-card input{background:#0b1530;color:#e5eeff;border-color:#8ac7da44;box-shadow:inset 0 2px 5px #0003}.question-card .icon-btn{background:#ffffff0b;color:#d2ddfa;border-color:#adbcdf44}
.team-chip.active:after{content:''}.team-chip{overflow:hidden}body.play-mode .stage.question-open .team-board{bottom:350px}
@media(max-width:800px){.question-card{width:95%;max-height:65%;left:50%;right:auto;translate:-50% 0}.welcome-content,.welcome-content.poster-mode{padding-bottom:28px!important}.welcome-content h1{font-size:clamp(28px,7vw,42px)}}
/* Decorative children and focused controls must not scroll the welcome overlay. */
.welcome-screen{overflow:clip}.welcome-content,.welcome-content.poster-mode{flex:0 0 auto}
@media(max-width:800px){.welcome-content,.welcome-content.poster-mode{margin:0;max-height:calc(100dvh - 130px);overflow:auto}.welcome-actions .btn{padding:0 15px}.hero-tiles{gap:8px}.hero-tiles span{width:48px;height:52px}.intro-controls{gap:7px;padding:10px}.intro-controls input{width:100px}}
