*{box-sizing:border-box}
:root{color-scheme:light;--bg:#f4f6fc;--panel:#fff;--ink:#182540;--muted:#58647c;--line:#dce3ef;--accent:#473cc4;--accent2:#362ca0;--tint:#eeecff;--error:#972946;--danger-bg:#ffedf2;--sidebar:#151f37;--shadow:0 12px 32px #253f7710;font:15px/1.5 'Segoe UI',system-ui,sans-serif}
:root[data-theme=dark]{color-scheme:dark;--bg:#11182a;--panel:#1b2540;--ink:#f1f4ff;--muted:#b3bed7;--line:#344261;--accent:#a89aff;--accent2:#c6b9ff;--tint:#342c65;--error:#ffc2d0;--danger-bg:#54243c;--sidebar:#0b1121;--shadow:0 12px 32px #0003}
body{margin:0;background:var(--bg);color:var(--ink);min-height:100vh}
button,input,textarea,select{font:inherit}button,summary{cursor:pointer}button:disabled{cursor:default;opacity:.56}
a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
h1,h2,h3,p{margin:0}h1{font-size:clamp(2rem,4.3vw,3.4rem);line-height:1.05;letter-spacing:-.055em}h2{letter-spacing:-.035em;line-height:1.18}h3{line-height:1.25;letter-spacing:-.02em}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:10px;padding:10px 12px;min-width:0}
input:focus,textarea:focus,select:focus,button:focus-visible,a:focus-visible{outline:3px solid #8178ef;outline-offset:2px}
label{display:grid;gap:6px;font-weight:650}textarea{min-height:90px;resize:vertical}.check{display:flex;align-items:center;gap:8px}.check input{accent-color:#473cc4;width:17px;height:17px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.spread{justify-content:space-between}.stack{display:grid;gap:18px;align-content:start}.muted,small{color:var(--muted)}.eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.12em}.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);min-width:0}
.button{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 13px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:10px;font-weight:700;text-decoration:none;line-height:1.25;transition:transform .14s,box-shadow .14s}
.button:hover:not(:disabled){border-color:var(--accent);transform:translateY(-1px);text-decoration:none}
.primary{background:#4f42d5;color:white;border-color:#4f42d5;box-shadow:0 3px 8px #453dc52c}.primary:hover{background:#3f32ba}.selected{background:var(--tint);border-color:var(--accent);color:var(--accent)}.icon{min-width:40px;padding:5px 8px;font-size:19px}.danger{color:var(--error)!important}.alert{border:1px solid #e68ba8;background:var(--danger-bg);color:var(--error);padding:10px 15px;border-radius:10px}
.layout{min-height:100vh;display:grid;grid-template-columns:235px minmax(0,1fr)}.sidebar{background:var(--sidebar);color:#f3f5ff;display:flex;flex-direction:column;gap:24px;padding:24px 15px 16px;height:100vh;position:sticky;top:0;overflow:auto}.brand{display:flex;gap:10px;align-items:center;font-size:26px;font-weight:850;letter-spacing:-.055em;line-height:1}.brand small{display:block;letter-spacing:.16em;font-size:.51rem;font-weight:800;margin-top:5px;color:inherit;opacity:.74}.brand-icon{border-radius:12px;background:#8572f3;color:#fff;display:grid;place-items:center;width:40px;height:40px;box-shadow:inset 0 -4px #4538a95a;transform:rotate(-5deg);font-size:24px;letter-spacing:0}.sidebar .brand{padding:0 7px}.sidebar-label{color:#aab7da;margin:4px 8px -13px}.sidebar nav{display:grid;gap:3px}.sidebar button,.sidebar a{background:transparent;color:#d5def5;border:0;padding:9px 10px;border-radius:9px;text-align:left;font-size:13px;font-weight:650;text-decoration:none}.sidebar nav span{display:inline-block;width:24px;font-size:16px}.sidebar button:hover,.sidebar a:hover{background:#253353;color:white}.sidebar .nav-active{background:#33346a;color:#fff}.nav-active span{color:#c3b6ff}.sidebar-foot{display:grid;gap:4px;margin-top:auto;border-top:1px solid #35435f;padding-top:12px}
.topbar{background:var(--panel);padding:12px clamp(14px,3vw,35px);border-bottom:1px solid var(--line);min-height:62px}.crumb{color:var(--muted);font-size:.86rem}.crumb b{color:var(--ink)}.avatar{display:grid;place-items:center;background:var(--tint);color:var(--accent);width:36px;height:36px;border-radius:50%;font-weight:850}.mobile-menu{display:none}.workspace-body{max-width:1440px;margin:auto;padding:25px clamp(14px,3vw,35px) 48px}.heading{display:grid;gap:8px}.heading .eyebrow{color:var(--accent)}
.hero{position:relative;overflow:hidden;border-radius:23px;background:linear-gradient(110deg,#25215b,#3e2d94 70%,#5b46ad);color:#fff;min-height:228px;padding:26px clamp(20px,4vw,38px);display:grid;align-items:center;box-shadow:0 12px 35px #4a3c9a2d}.hero>div:first-child{position:relative;z-index:1}.hero .eyebrow{color:#ded3ff}.hero .eyebrow b{color:#ffe087}.hero h1{margin:10px 0}.hero p{max-width:435px;color:#efeaff;margin-bottom:15px}.hero .primary{background:#e7dcff;color:#281d6b;border-color:#e7dcff}.hero .primary:hover{background:white}.hero-art{position:absolute;width:330px;height:260px;right:3%;top:-6px;opacity:.93;background:repeating-radial-gradient(circle at 70% 45%,transparent 0 27px,#ffffff13 28px 29px,transparent 30px 49px)}.hero-art span,.hero-art i,.hero-art b{position:absolute;display:grid;place-items:center;box-shadow:0 12px 35px #09052652}.hero-art span{left:64px;top:70px;width:117px;height:117px;border-radius:28px;background:#baffcd;color:#273c3f;transform:rotate(-17deg);font-size:60px;font-weight:900}.hero-art i{left:167px;top:35px;width:86px;height:86px;border-radius:22px;background:#ffe198;color:#542f73;transform:rotate(13deg);font-size:48px;font-style:normal;font-weight:850}.hero-art b{left:208px;top:143px;width:68px;height:68px;border-radius:17px;background:#ccbcff;color:#493b98;transform:rotate(15deg);font-size:35px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.stats .panel{padding:14px 17px;display:grid;gap:4px}.stats span{color:var(--muted);font-size:.85rem}.stats strong{font-size:1.65rem;line-height:1.1}.toolbar input{flex:1;min-width:160px!important}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:16px}.quiz-card{display:grid;grid-template-rows:125px 1fr}.cover{position:relative;border-radius:17px 17px 0 0;background:linear-gradient(135deg,#ded4ff,#b4adff);overflow:hidden}.cover-1{background:linear-gradient(135deg,#b1f4dc,#b5ebed)}.cover-2{background:linear-gradient(135deg,#ffe0ae,#ffbaac)}.cover-3{background:linear-gradient(135deg,#e1eeff,#b3ccff)}.cover img{width:100%;height:100%;object-fit:cover}.cover .badge{position:absolute;right:11px;top:11px}.cover-mark{height:100%;background:repeating-radial-gradient(circle at 50%,transparent 0 17px,#fff6 18px 19px,transparent 20px 33px);display:grid;place-items:center;position:relative}.cover-mark span{font-size:44px;font-weight:900;color:#4b36a0;background:#fff8;width:68px;height:68px;border-radius:16px;display:grid;place-items:center;transform:rotate(-11deg);box-shadow:0 12px 25px #352c7522}.cover-mark i{position:absolute;left:25%;top:20%;border:2px solid #6255b9;border-radius:7px;width:20px;height:20px;transform:rotate(-18deg)}.cover-mark b{position:absolute;right:25%;bottom:18%;font-size:24px;color:#5a48b4}.badge{display:inline-flex;background:var(--tint);color:var(--accent);border-radius:999px;padding:4px 9px;font-size:.72rem;font-weight:800;white-space:nowrap}.cover .badge{background:#fff;color:#483a99}.card-body{padding:14px;display:grid;gap:7px}.card-body .eyebrow{color:var(--accent)}.card-body p{color:var(--muted);font-size:.87rem}.card-actions{gap:6px;margin-top:6px}.card-actions .button{font-size:.8rem;padding:6px 9px}.card-actions details{position:relative}.card-actions summary{list-style:none}.menu{position:absolute;top:100%;right:0;background:var(--panel);box-shadow:var(--shadow);border:1px solid var(--line);padding:4px;border-radius:10px;z-index:3;min-width:140px}.menu button{display:block;text-align:left;width:100%;color:var(--ink);background:transparent;border:0;border-radius:6px;padding:6px}.menu button:hover{background:var(--tint)}
.empty{text-align:center;padding:35px;display:grid;justify-items:center;gap:8px;color:var(--muted)}.empty strong{color:var(--ink);font-size:1.05rem}.section{padding:20px}.section>.button{justify-self:start}.table-wrap{overflow:auto}.table-wrap small,.list-line small{display:block}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:11px 14px;border-bottom:1px solid var(--line)}th{font-size:.76rem;color:var(--muted);white-space:nowrap}tr:last-child td{border-bottom:0}.list-line{border-bottom:1px solid var(--line);padding:10px 0}.list-line:last-child{border-bottom:0}.list-line p{color:var(--muted)}progress{accent-color:#5547d9}
.overlay{position:fixed;inset:0;background:#10152abd;display:grid;place-items:center;padding:15px;z-index:10}.dialog{width:min(100%,540px);padding:23px;max-height:94vh;overflow:auto;gap:11px}.mode-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.auth{max-width:1250px;margin:auto;padding:20px clamp(15px,4vw,44px)}.auth-wrap{margin:clamp(20px,8vh,110px) auto 0;display:grid;grid-template-columns:1fr minmax(300px,385px);max-width:960px;gap:20px}.auth-art{position:relative;min-height:410px;background:#272056;color:white;border-radius:22px;padding:27px;overflow:hidden}.auth-art h1{margin:10px 0 15px}.auth-art p{max-width:340px;color:#eee9ff}.auth-form{align-self:center;padding:27px;gap:13px}.auth-form a{font-weight:700}.auth-form .eyebrow{color:var(--accent)}.tiles{position:absolute;bottom:-13px;right:5%;display:flex;gap:10px;transform:rotate(-8deg)}.tiles i{font-style:normal;border-radius:14px;display:grid;place-items:center;width:70px;height:76px;background:#ae9cf5;color:#282052;font-size:36px;font-weight:900}.tiles i:nth-child(2){background:#ffe1a0}.tiles i:nth-child(3){background:#aef8c9}.tiles i:nth-child(4){background:#ffd2dc}.student-top{padding:14px max(16px,calc((100% - 1120px)/2));background:var(--panel);border-bottom:1px solid var(--line)}.student-top>a{color:var(--ink)}
[data-theme=dark] .qe-shell,[data-theme=dark] .game-shell{color-scheme:dark}
@media(max-width:900px){.hero-art{right:-65px;opacity:.6}.layout{grid-template-columns:195px minmax(0,1fr)}}
@media(max-width:720px){.layout{display:block}.sidebar{position:fixed;left:0;top:0;z-index:7;width:240px;display:none}.sidebar-open{display:flex;height:calc(100dvh - 61px);top:61px}.mobile-menu{display:inline-flex}.workspace-body{padding-top:16px}.stats{gap:6px}.stats .panel{padding:10px}.hero-art{opacity:.31;right:-125px}.auth-wrap{grid-template-columns:1fr;margin-top:20px}.auth-art{min-height:250px}.tiles{display:none}.table-wrap td,.table-wrap th{padding:8px}.hero p{max-width:340px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0.01ms!important;transition-duration:0.01ms!important}}
.editor-grid{display:grid;grid-template-columns:minmax(165px,.35fr) minmax(0,1fr);gap:16px;align-items:start}.editor-grid aside{gap:7px}.editor-tab{justify-content:flex-start;text-align:left}.editor-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px}.editor-choice input:not([type=checkbox]):not([type=radio]){flex:1}.editor-media{max-height:300px;max-width:100%;border-radius:12px}.editor-grid details .editor-fields{margin-top:12px}@media(max-width:700px){.editor-grid{grid-template-columns:1fr}.editor-grid aside{max-height:245px;overflow:auto}}
.formula-block{display:block;overflow:auto}.game-shell .game-card{background:var(--panel);border-color:var(--line);color:var(--ink)}.game-shell .game-muted{color:var(--muted)}.game-shell .game-player,.game-shell .game-option,.game-shell .game-answer{border-color:var(--line)}.game-shell .game-answer:has(input:checked){background:var(--tint);color:var(--ink)}.game-shell .game-pill{background:var(--tint);color:var(--accent)}.game-shell .game-input{background:var(--panel);color:var(--ink)}.game-join{width:min(calc(100% - 24px),640px)}.game-draw{border:1px solid var(--line);background:var(--panel);border-radius:10px;width:100%;touch-action:none}.game-answer{min-height:50px}.game-success{animation:answer-in .24s ease-out}@keyframes answer-in{from{transform:translateY(6px);opacity:.35}to{transform:translateY(0);opacity:1}}
.image-map{position:relative;width:fit-content;max-width:100%;cursor:crosshair}.image-map img{display:block;max-width:100%;max-height:360px;border-radius:10px}.image-pin{pointer-events:none;position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;background:#19223c;color:#fff;border:2px solid #fff;width:27px;height:27px;border-radius:50%;font-weight:800}.layout:fullscreen .sidebar,.layout:fullscreen .topbar{display:none}:root:fullscreen .layout{display:block}:root:fullscreen .sidebar,:root:fullscreen .topbar{display:none}
.image-answer{display:grid;gap:6px;align-items:start;min-width:0}.image-answer img{display:block;max-width:100%;max-height:210px;object-fit:contain;object-position:left;background:#fff;border-radius:7px}.image-answer span{font-size:.86rem;color:var(--muted)}.editor-option-image{width:58px;height:44px;object-fit:contain;background:white;border-radius:5px}
/* Game arena */
.game-arena{max-width:840px;margin:25px auto 55px}
.game-arena>.game-card,.game-shell .game-host{padding:clamp(15px,3vw,26px);border-radius:26px;box-shadow:0 14px 55px #32207922}
.game-banner,.question-stage,.game-shell .game-host>div:first-child{position:relative;overflow:hidden;color:#fff;background:radial-gradient(circle at 95% 4%,#ad83fc 0,transparent 45%),linear-gradient(130deg,#302166,#6242bb 70%,#7750cb);border-radius:19px;padding:clamp(16px,3vw,26px);isolation:isolate}
.game-banner::after,.question-stage::after{content:"";z-index:-1;position:absolute;top:-90px;right:-60px;width:270px;aspect-ratio:1;border-radius:50%;background:repeating-radial-gradient(circle,#ffffff20 0 1px,transparent 2px 18px)}
.game-banner h1{font-size:clamp(1.75rem,5vw,3rem);margin:7px 0}
.game-banner p,.game-banner .eyebrow{color:#f1eaff}
.question-stage{margin:14px 0;min-height:105px;display:grid;align-content:center}
.game-arena .question-stage .game-question{font-size:clamp(1.3rem,3.2vw,2rem);margin:0}
.game-arena .choice-tile{--choice:#5533ab;--tile:#eee6ff;background:var(--tile);border:2px solid transparent;color:#22183b;border-radius:14px;padding:12px;min-height:62px;gap:10px;transition:transform .15s,border-color .15s}
.game-arena .choice-tile:nth-child(2){--choice:#12685e;--tile:#d8f4e9}
.game-arena .choice-tile:nth-child(3){--choice:#854413;--tile:#fff0cc}
.game-arena .choice-tile:nth-child(4){--choice:#a33558;--tile:#ffe3ed}
.game-arena .choice-tile:hover{transform:translateY(-1px)}
.game-arena .choice-tile:has(input:checked){background:var(--tile);color:#22183b;border-color:var(--choice);box-shadow:0 0 0 2px var(--panel),0 0 0 4px var(--choice)}
.choice-tile input{accent-color:var(--choice,#5533ab);margin:0}
.choice-letter{width:29px;height:29px;flex:0 0 29px;display:grid;place-items:center;border-radius:8px;color:white;background:var(--choice,#5533ab);font-weight:850}
.game-arena .choice-tile .image-answer span{color:#443755}
.boost-tray{display:flex;gap:8px;flex-wrap:wrap}
.boost-chip{display:flex;align-items:center;gap:8px;text-align:left;border:1px solid var(--line);color:var(--ink);background:var(--panel);border-radius:13px;padding:6px 10px;font:inherit}
.boost-chip strong{display:grid;place-items:center;min-width:45px;height:39px;padding:0 4px;border-radius:8px;background:#ffdf80;color:#492e15;font-weight:900}
.boost-chip:nth-child(2) strong{background:#bfadff;color:#33226b}
.boost-chip small,.bonus-setting small{display:block}
.boost-chip:not(:disabled):hover,.boost-chip.boost-active{border-color:#8561d7}
.boost-chip.boost-active{opacity:1}
.game-arena .feedback-right,.game-arena .feedback-wrong{border-radius:14px;font-weight:800;font-size:1.14rem}
.game-arena .feedback-wrong{background:#ffe4eb;color:#91213f}
.score-pop{display:inline-block;margin-left:10px;padding:2px 8px;border-radius:999px;background:#c2f2cf;color:#21572d}
.game-arena .submit-answer{margin-top:8px;min-height:47px}
.game-shell .game-host>div:first-child .game-muted{color:#e9dcff}
.game-shell .game-host>div:first-child .button{background:white;color:#34226f}
.game-shell .game-players .game-player{background:var(--bg);justify-content:space-between;width:100%}
.bonus-setting{background:var(--tint);border-radius:12px;padding:8px 10px}

/* Full-screen play surface */
.student-world {
  --arena-surface:#211739;
  --arena-line:#493962;
  min-height:100dvh;
  overflow:auto;
  background:radial-gradient(ellipse at 50% -15%,#603c9a 0%,#30204e 39%,#170f29 74%);
  color:#fff;
}
.student-world .student-top {
  background:#1b122d;
  border-color:#45345e;
}
.student-world .student-top>a {color:#f7f2ff}
.student-world .student-top .button,
.student-world .arena-top .button {
  color:#f6efff;
  background:#372850;
  border-color:#58446f;
}
.student-world .game-arena {width:min(calc(100% - 32px),980px);max-width:none;margin:24px auto 48px}
.student-world .game-arena>.game-card {
  color:#f8f3ff;
  background:transparent;
  border:0;
  padding:0;
  box-shadow:none;
}
.student-world .game-arena>form {width:min(100%,510px);margin:auto}
.student-world .game-muted {color:#ded1f3}
.arena-top {justify-content:space-between;align-items:center;padding:0 2px 12px;border-bottom:1px solid #ffffff29}
.arena-top h1 {font-size:clamp(1.5rem,4vw,2.4rem);letter-spacing:-.025em}
.arena-round {display:grid;gap:10px}
.round-meta,.round-clock {display:flex;align-items:center;justify-content:space-between;gap:12px}
.round-meta {color:#e5d7fa;font-size:.8rem;font-weight:750;letter-spacing:.035em}
.round-meta i {color:#c2addd;font-style:normal}
.round-clock .game-progress {flex:1;background:#ffffff20}
.round-clock .game-progress>span {background:linear-gradient(90deg,#b78bff,#e5d0ff)}
.round-clock b {min-width:54px;text-align:center;padding:5px 8px;border-radius:9px;background:#493764;font-variant-numeric:tabular-nums}
.round-content {display:grid;gap:12px}
.round-content[inert] {opacity:.38;transition:opacity .16s}
.student-world .question-stage {
  margin:0;
  min-height:clamp(88px,16vh,150px);
  place-items:center;
  text-align:center;
  background:radial-gradient(ellipse at 100% 0,#4e3678,transparent 68%),var(--arena-surface);
  border:1px solid #72599b;
  padding:clamp(11px,2vw,20px);
}
.student-world .question-stage .game-question {font-size:clamp(1.08rem,2.6vw,1.7rem);line-height:1.22}
.student-world .choice-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.student-world .choice-tile {
  --choice:#5b45ac;
  --tile:#a98bff;
  margin:0;
  color:#160f2d;
  border-radius:16px;
  min-height:clamp(58px,9vh,92px);
  padding:clamp(8px,1.5vw,13px);
  font-size:clamp(.94rem,2vw,1.17rem);
  font-weight:800;
  overflow-wrap:anywhere;
}
.student-world .choice-tile:nth-child(2) {--choice:#126351;--tile:#75dfc2}
.student-world .choice-tile:nth-child(3) {--choice:#885018;--tile:#ffc674}
.student-world .choice-tile:nth-child(4) {--choice:#84264d;--tile:#f39dc2}
.student-world .choice-tile:has(input:checked),
.student-world .choice-tile:has(input:focus-visible) {
  color:#160f2d;
  background:var(--tile);
  box-shadow:0 0 0 2px #fff;
}
.student-world .choice-tile input {position:absolute;opacity:0}
.student-world .choice-letter {color:#fff;background:#231746;border-radius:10px}
.student-world .choice-tile .image-answer span {color:#20183d}
.student-world .boost-chip {background:#2e2147;border-color:#624c81;color:#fbf7ff}
.student-world .boost-chip small {color:#e0cef6}
.student-world .boost-chip.boost-active {border-color:#d2aaff}
.student-world .submit-answer {margin:0;background:#d7b8ff;color:#21103c;border-color:#d7b8ff;min-height:48px}
.student-world .arena-score {justify-self:start;padding:7px 12px;background:#382650;border-radius:10px;color:#f6eaff;font-size:1rem}
.student-world .game-option,.student-world .game-player {border-color:var(--arena-line)}
.pause-screen {
  display:flex;align-items:center;gap:14px;padding:clamp(14px,3vw,22px);border-radius:16px;
  color:#201535;background:#eddbff;border:1px solid #e2c5ff;
}
.pause-screen h2 {margin:0 0 4px;font-size:clamp(1.2rem,3vw,1.65rem)}
.pause-screen p {margin:0}
.pause-symbol {display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:14px;background:#553788;color:#fff;font-size:1.5rem;font-weight:900}
.host-studio .host-toolbar {position:sticky;top:0;z-index:4;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:12px 16px}
.host-studio .pause-control {background:#7047cb;border-color:#7047cb;color:white;font-weight:800}
.host-studio .pause-control.is-paused {background:#14735e;border-color:#14735e}
.host-pause {background:#eee1ff;color:#392466;padding:12px;border-radius:12px;font-weight:800}
.host-studio .game-host .game-question {font-size:clamp(1.35rem,2.4vw,2rem)}
@media(max-width:460px) {
  .student-world .choice-grid:has(.image-answer) {grid-template-columns:1fr}
  .student-world .choice-tile {align-items:flex-start;gap:8px}
  .student-world .choice-letter {width:23px;height:23px;flex-basis:23px}
}
.student-world .choice-tile{position:relative}.student-world .choice-tile input{inset:0;width:100%;height:100%;cursor:pointer}
.boost-dock{position:sticky;bottom:8px;z-index:20;padding:7px 9px;background:#211735ee;backdrop-filter:blur(9px);border:1px solid #503b6c;border-radius:14px;display:grid;gap:5px}
.boost-dock-title{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#f0e4ff}
.boost-dock-title small{color:#ddc5ff;text-align:right}
.bonus-icon-chip{min-width:68px;padding:6px 8px}.bonus-icon-chip strong{font-size:1.15rem}.bonus-icon-chip span{font-size:.78rem}.bonus-icon-chip small{font-size:.64rem}
.boost-chip:nth-child(3) strong{background:#a7efcc;color:#173e32}
.final-stage{width:min(100%,970px);margin-inline:auto;display:grid;gap:12px}
.podium{text-align:center;padding:clamp(18px,5vw,45px);border-radius:25px;color:#fff;background:radial-gradient(ellipse at 50% 0%,#7451b0,#322154 54%,#1c142e);overflow:hidden}
.podium-heading h2{font-size:clamp(2rem,5vw,3.8rem);margin:7px 0 25px}
.podium-heading .eyebrow{color:#f2d399}
.podium-places{display:flex;justify-content:center;align-items:end;gap:clamp(5px,2vw,16px);list-style:none;padding:0;margin:0}
.podium-place{display:grid;align-content:center;justify-items:center;gap:6px;min-width:0;width:min(31%,220px);min-height:135px;padding:10px 5px;border-radius:16px 16px 7px 7px;background:#5c417f;overflow-wrap:anywhere;animation:podium-in .45s both}
.podium-place strong{max-width:100%}
.podium-place>span:last-child{font-size:.88rem;color:#f3e8ff}
.podium-place.place-1{min-height:190px;background:#6d4791}
.podium-place.place-2{order:-1;min-height:155px;animation-delay:.09s}
.podium-place.place-3{animation-delay:.16s}
.podium-medal{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#d5dcf1;color:#271837;font-size:1.35rem;font-weight:900}
.place-1 .podium-medal{background:#ffda7c}
.place-3 .podium-medal{background:#e9b28e}
.final-summary,.final-rank-toggle{padding:12px 16px}
@keyframes podium-in{from{transform:translateY(26px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.podium-place{animation:none}}
.duel-panel{display:grid;gap:8px;background:#30204b;border:1px solid #8868bc;color:#f7ecff;border-radius:15px;padding:12px 14px}.duel-header{display:flex;justify-content:space-between;align-items:center}.duel-header strong{color:#f6d88e}.duel-header b{font-variant-numeric:tabular-nums;font-size:1.2rem}.duel-panel p{margin:0}.duel-panel .stack{gap:8px}.duel-panel select{max-width:100%}
.safe-panel{display:grid;gap:9px;background:#17372f;border:1px solid #5fc69d;color:#effff8;border-radius:15px;padding:13px 14px}.safe-panel>strong{color:#a7ffd0}.safe-panel p{margin:0}.safe-panel select{max-width:100%}.safe-digits{display:flex;justify-content:center;gap:12px}.safe-digits b{display:grid;place-items:center;width:54px;height:64px;border:2px solid #5fc69d;border-radius:12px;background:#102a24;font-size:2rem;color:#d8ffea}
.slot-machine{display:grid;gap:8px;padding:12px 14px;border:1px solid #81609e;border-radius:16px;background:linear-gradient(150deg,#35204f,#21162f);color:#fff1d5}
.slot-machine small{color:#e8d5fa}
.slot-machine.slot-ready{border-color:#ffd77e;box-shadow:0 0 16px #f8be5044}
.slot-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.slot-heading strong{color:#ffe098;font-size:1.13rem}
.slot-meter{display:flex;align-items:center;gap:7px;font-variant-numeric:tabular-nums}
.slot-meter progress{width:clamp(76px,21vw,150px);height:12px;accent-color:#ffd77e}
.slot-reels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.slot-reels span{display:grid;place-items:center;min-height:43px;background:#f1dcf8;color:#301541;border-radius:9px;overflow:hidden}
.slot-reels b{font-size:1.5rem}
.slot-rolling b{animation:slot-roll .15s linear infinite}
.slot-rolling span:nth-child(2) b{animation-delay:.05s}
.slot-rolling span:nth-child(3) b{animation-delay:.09s}
.case-window{position:relative;overflow:hidden;min-width:0;height:78px;border:1px solid #765a91;border-radius:10px;background:#160f23}.case-window::before,.case-window::after{content:"";position:absolute;z-index:3;top:0;bottom:0;width:22%;pointer-events:none}.case-window::before{left:0;background:linear-gradient(90deg,#160f23,transparent)}.case-window::after{right:0;background:linear-gradient(-90deg,#160f23,transparent)}.case-marker{position:absolute;z-index:4;left:50%;top:0;bottom:0;width:3px;translate:-50% 0;background:#ffd77e;box-shadow:0 0 10px #ffd77e}.case-strip{display:flex;gap:8px;width:max-content;padding:6px;position:relative;left:50%;transform:translateX(-50px)}.case-strip span{display:grid;grid-template-rows:34px 1fr;place-items:center;width:88px;height:64px;flex:none;border-radius:8px;background:linear-gradient(145deg,#ead8f4,#bfa5d4);color:#2d173b;overflow:hidden}.case-strip b{font-size:1.45rem}.case-strip small{width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:.64rem;font-weight:800}.case-strip.case-rolling{animation:case-roll 9s cubic-bezier(.08,.7,.06,1) both}@keyframes case-roll{0%{transform:translateX(-50px)}72%{transform:translateX(-3295px)}100%{transform:translateX(-3506px)}}
.case-strip .slot-winner{outline:3px solid #ffe17d;box-shadow:0 0 22px #ffd75c;background:linear-gradient(145deg,#fff4b8,#e2bd5e)}
.answer-good{background:#daf6e5;color:#17623b}.answer-bad{background:#ffe2e2;color:#8b2929}
.team-red{color:#b72f43}.team-blue{color:#2869b8}.robot-secret-banner{margin:6px 0;padding:8px 12px;border:1px solid #59d8bd;border-radius:10px;background:#153f3a;color:#c6fff2;font-weight:700}
.student-leaderboard{position:fixed;z-index:12;right:12px;top:110px;width:220px;max-height:calc(100vh - 140px);overflow:auto;padding:10px;border:1px solid #684e88;border-radius:14px;background:#211735ee;backdrop-filter:blur(10px);color:#f8f2ff;box-shadow:0 12px 35px #10091f55}.student-leaderboard small{color:#cdb9e6}.student-leaderboard ol{display:grid;gap:4px;list-style:none;margin:8px 0 0;padding:0}.student-leaderboard li{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:6px;align-items:center;padding:6px 7px;border-radius:8px;background:#ffffff0a;font-size:.84rem}.student-leaderboard li>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.student-leaderboard li>strong{font-variant-numeric:tabular-nums}.student-leaderboard li.is-me{background:#6845a5;color:#fff}.student-leaderboard li.is-me span{font-weight:800}@media(max-width:1220px){.student-leaderboard{position:static;width:auto;max-height:190px}.student-leaderboard ol{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}
.freeze-lock{position:fixed;z-index:110;inset:0;display:grid;place-items:center;background:#102942d9;backdrop-filter:blur(8px);color:#edfbff;text-align:center}.freeze-lock>div{width:min(88vw,420px);padding:28px;border:2px solid #9cecff;border-radius:24px;background:radial-gradient(circle at 50% 0,#315f86,#152b4b 70%);box-shadow:0 20px 70px #081525}.freeze-lock span{font-size:4rem}.freeze-lock h2{margin:4px 0;font-size:2rem}.freeze-lock p{margin:6px 0 14px}.freeze-lock b{display:grid;place-items:center;width:70px;height:70px;margin:auto;border-radius:50%;background:#c7f6ff;color:#173b5c;font-size:2rem}
.fortune-button{border-color:#e6b953;color:#5a3a00;background:#fff0bd}.fortune-points{display:flex;align-items:center;gap:6px;padding:4px 6px 4px 10px;border:1px solid #e6b953;border-radius:12px;background:#fff8dc;color:#5a3a00;font-size:.78rem;font-weight:800}.fortune-points input{width:76px;padding:7px;border:1px solid #d6ba72;border-radius:8px;background:#fff;color:#3c2c0c}@media(prefers-reduced-motion:reduce){.case-strip.case-rolling{animation-duration:.01s}}
.game-mode-menu{display:flex;flex-wrap:wrap;gap:7px}.invite-dock{position:fixed;z-index:92;left:50%;bottom:18px;translate:-50% 0;display:flex;gap:10px;max-width:calc(100vw - 24px)}.invite-dock button{display:grid;grid-template-columns:42px auto;grid-template-rows:auto auto;align-items:center;column-gap:9px;min-width:190px;padding:9px 14px 9px 9px;border:1px solid #8f73bd;border-radius:16px;background:#24183aee;color:#fff;box-shadow:0 12px 35px #10091f66;backdrop-filter:blur(10px);text-align:left}.invite-dock button>span{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#7653a4;font-size:1.25rem}.invite-dock b{font-size:.82rem}.invite-dock small{color:#d9caed}.race-finished{padding:12px 15px;border:1px solid #73e0bc;border-radius:14px;background:#173f38;color:#c6ffeb;font-weight:900}.race-podium{display:flex;flex-wrap:wrap;gap:7px}.race-podium b{padding:7px 10px;border-radius:10px;background:#ffe4a1;color:#513d0d}@media(max-width:640px){.invite-dock{width:calc(100vw - 24px);flex-direction:column}.invite-dock button{width:100%}}
.host-slot{padding:10px 12px}
@keyframes slot-roll{from{transform:translateY(-27px);opacity:.25}to{transform:translateY(27px);opacity:1}}
@media(prefers-reduced-motion:reduce){.slot-rolling b{animation:none}}
.boss-panel{display:grid;gap:9px;padding:14px 16px;border:1px solid #cc82a0;border-radius:17px;background:radial-gradient(ellipse at 95% 0,#712b4d,#321d43 68%);color:#fff0f8}
.boss-top,.boss-health{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.boss-top h2{margin:1px 0;font-size:clamp(1.2rem,3vw,1.8rem)}
.boss-top>strong{margin-left:auto;color:#ffe6a4;font-variant-numeric:tabular-nums}
.boss-icon{display:grid;place-items:center;width:45px;height:45px;border-radius:12px;background:#a44b78;color:#fff2c8;font-size:1.8rem}
.boss-panel p{margin:0}.boss-panel small{color:#f4cce2}
.boss-health progress{accent-color:#ff9fbd;flex:1;min-width:90px}
.boss-panel .boss-join{justify-self:start;background:#ffd6e5;color:#4c1d3c;border-color:#ffd6e5}
.boss-won{border-color:#93deaa;background:linear-gradient(140deg,#255947,#211a3e)}
.boss-lost{border-color:#ff8db6}
.robot-arena{width:min(94vw,920px);margin:20px auto 42px;display:grid;gap:12px;color:#fff}
.robot-arena-header{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.robot-arena-header h1{margin:2px 0;font-size:clamp(1.7rem,5vw,3rem)}
.robot-arena-header .eyebrow{color:#ffd48c}
.robot-arena p{margin:0;color:#eddbfb}
.robot-hud{display:flex;gap:7px;flex-wrap:wrap}
.robot-hud b{padding:6px 9px;border-radius:9px;background:#503a70;color:#ffebbe;font-variant-numeric:tabular-nums}
.robot-field{display:block;width:100%;border:1px solid #9574bb;border-radius:15px;cursor:crosshair;touch-action:none}
.robot-unit{transition:transform .1s linear}
.robot-unit text{font-size:12px;paint-order:stroke;stroke:#1a1328;stroke-width:4px}
.robot-dpad{display:flex;gap:7px;justify-content:center}
.robot-dpad .button{touch-action:none;user-select:none;min-width:49px}
.arena-results{display:grid;gap:5px;border-radius:13px;padding:9px 13px;background:#37264f;color:#fff2dd}
.arena-results p{margin:0}.arena-results ol{margin:0;padding-left:21px}.arena-results li b{margin-left:6px;color:#ffd58b}
@media(pointer:fine){.robot-dpad{display:none}}
@media(prefers-reduced-motion:reduce){.robot-unit{transition:none}}
.arena-minimap{display:block;width:min(190px,40vw);justify-self:end;background:#221831;border:1px solid #73568f;border-radius:8px}
.robot-ice .robot-field{border-color:#a7eeff;box-shadow:0 0 22px #a7eeff55}.robot-arena .robot-ice-banner{padding:8px 12px;border-radius:10px;background:#b4effa;color:#133449;font-weight:800}.host-studio .ice-control{border-color:#8fd9eb;color:#166783;background:#e8fbff}

/* Teacher workspace */
.teacher-studio{
  --bg:#f7f6f2;
  --ink:#27213a;
  --muted:#625c70;
  --line:#e5e1e9;
  --accent:#6042bd;
  --tint:#f0eaff;
  --shadow:0 5px 18px #23183c0a;
  background:var(--bg);
  color:var(--ink);
}
[data-theme=dark] .teacher-studio{
  --bg:#171421;
  --panel:#211c31;
  --ink:#f6efff;
  --muted:#c6bad4;
  --line:#3e3551;
  --accent:#c8b2ff;
  --tint:#352650;
}
.teacher-studio .sidebar{
  background:#211933;
  border-right:1px solid #352949;
  padding:22px 13px 16px;
  gap:21px;
}
.teacher-studio .sidebar .brand-icon{background:#d8f487;color:#221933;box-shadow:none;transform:none}
.teacher-studio .sidebar .brand small{color:#c9b7e7}
.teacher-studio .sidebar-label{color:#c0aedf;margin-bottom:-10px}
.teacher-studio .sidebar nav{gap:4px}
.teacher-studio .sidebar nav button{display:flex;align-items:center;gap:9px;padding:7px 9px;min-height:43px}
.teacher-studio .sidebar nav button span{width:25px;height:25px;flex:none;display:grid;place-items:center;background:#382a4e;border-radius:7px;color:#dfd0f9;line-height:1}
.teacher-studio .sidebar nav .nav-active{background:#443266;color:#fff}
.teacher-studio .sidebar nav .nav-active span{background:#d8f487;color:#251c39}
.teacher-studio .sidebar button:hover,.teacher-studio .sidebar a:hover{background:#4b3863}
.teacher-studio .sidebar-foot{border-color:#473958}
.teacher-studio .workspace{min-width:0}
.teacher-studio .topbar{min-height:68px}
.teacher-studio .crumb{display:grid;line-height:1.25;gap:3px;font-size:.72rem}
.teacher-studio .crumb b{font-size:.9rem}
.teacher-studio .avatar{background:#e7f4bd;color:#304013}
.teacher-studio .hero{
  min-height:228px;
  background:#eee8ff;
  border:1px solid #dcd0f7;
  color:#291b4b;
  box-shadow:none;
}
.teacher-studio .hero-kicker{color:#5c418e}
.teacher-studio .hero p{color:#4d4263}
.teacher-studio .hero .primary{background:#30204e;border-color:#30204e;color:#fff;box-shadow:none}
.teacher-studio .hero .primary:hover{background:#49326d}
.teacher-studio .hero-illustration{position:absolute;right:clamp(-12px,4vw,55px);top:50%;transform:translateY(-50%);width:min(44%,390px);height:auto;pointer-events:none}
.teacher-studio .hero>div:first-child{max-width:56%}
.teacher-studio .hero h1{font-size:clamp(2.35rem,5vw,3.9rem);letter-spacing:-.06em}
.teacher-studio .stats .stat-card{display:flex;align-items:center;gap:12px}
.teacher-studio .stat-card i{width:40px;height:40px;display:grid;place-items:center;flex:none;border-radius:11px;background:#ede4ff;color:#6644a3;font-size:1.16rem;font-style:normal;font-weight:850}
.teacher-studio .stat-card:nth-child(2) i{background:#dcf3e4;color:#1e6242}
.teacher-studio .stat-card:nth-child(3) i{background:#ffead7;color:#8a471f}
.teacher-studio .stat-card div{display:grid;gap:5px;min-width:0}
.teacher-studio .stat-card strong{font-variant-numeric:tabular-nums}
.teacher-studio .toolbar{background:var(--panel);border:1px solid var(--line);padding:9px;border-radius:14px}
.teacher-studio .quiz-card{grid-template-rows:150px 1fr}
.teacher-studio .card-body{padding:16px;grid-template-rows:auto auto 1fr auto}
.teacher-studio .card-body h3{font-size:1.12rem}
.teacher-studio .card-actions{padding-top:11px;border-top:1px solid var(--line)}
.teacher-studio .session-list thead{background:var(--tint)}
.teacher-studio .session-list td{padding-block:14px}
.teacher-studio .session-list code{padding:4px 7px;background:var(--bg);border:1px solid var(--line);border-radius:6px;font-variant-numeric:tabular-nums}
.teacher-studio .session-count-label{display:none}
.teacher-studio .session-status .badge[data-status="active"]{color:#19583b;background:#dbf6e6}
.teacher-studio .session-status .badge[data-status="paused"]{color:#75430c;background:#ffedcb}
@media(max-width:720px){
  .teacher-studio .hero{min-height:210px}
  .teacher-studio .hero-illustration{right:-26px;width:51%;opacity:.85}
  .teacher-studio .hero>div:first-child{max-width:70%}
  .teacher-studio .stats .stat-card{align-items:flex-start;flex-direction:column;gap:7px}
  .teacher-studio .stat-card i{width:28px;height:28px;border-radius:8px;font-size:.95rem}
  .teacher-studio .stat-card span{font-size:.73rem;line-height:1.25}
  .teacher-studio .stat-card strong{font-size:1.35rem}
  .teacher-studio .session-list thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
  .teacher-studio .session-list tbody{display:grid;gap:10px}
  .teacher-studio .session-list tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;padding:12px;border:1px solid var(--line);background:var(--panel);border-radius:14px}
  .teacher-studio .session-list{background:transparent;border:0;box-shadow:none}
  .teacher-studio .session-list td{display:block;border:0;padding:0;overflow-wrap:anywhere}
  .teacher-studio .session-list td:first-child,.teacher-studio .session-action{grid-column:1/-1}
  .teacher-studio .session-count-label{display:inline}
  .teacher-studio .session-action .button{width:100%}
}
.teacher-studio .quiz-card{grid-template-columns:minmax(0,1fr)}.teacher-studio .cover,.teacher-studio .card-body{min-width:0}.teacher-studio .card-body p,.teacher-studio .card-body h3{overflow-wrap:anywhere}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.settings-grid label{display:grid;gap:6px}

/* Visual refresh · classroom arcade */
:root{
  --radius-sm:12px;
  --radius-md:18px;
  --radius-lg:26px;
  --ease-out:cubic-bezier(.2,.8,.2,1);
}
.button{border-radius:12px;transition:transform .18s var(--ease-out),border-color .18s,background .18s,box-shadow .18s}
.button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 20px #24174116}
.button:active:not(:disabled){transform:translateY(0) scale(.98)}
.primary{background:linear-gradient(135deg,#6348e7,#4c36ce);border-color:#6b50eb;box-shadow:0 7px 18px #4834c83b}
.panel{border-radius:var(--radius-md)}

/* Student lobby */
.student-world{
  position:relative;
  isolation:isolate;
  background:
    radial-gradient(circle at 50% -10%,#6e4fb0 0,transparent 37%),
    radial-gradient(circle at -5% 76%,#173c59 0,transparent 34%),
    linear-gradient(145deg,#181129,#120d20 70%);
}
.student-world::before{
  content:"";position:fixed;z-index:-2;inset:0;pointer-events:none;opacity:.42;
  background-image:linear-gradient(#ffffff09 1px,transparent 1px),linear-gradient(90deg,#ffffff09 1px,transparent 1px);
  background-size:44px 44px;
  -webkit-mask-image:linear-gradient(to bottom,#000,transparent 78%);mask-image:linear-gradient(to bottom,#000,transparent 78%);
}
.student-world::after{
  content:"";position:fixed;z-index:-1;left:50%;top:17%;width:min(80vw,820px);aspect-ratio:1;translate:-50% -50%;pointer-events:none;
  border:1px solid #b898ff1f;border-radius:50%;box-shadow:0 0 0 95px #b898ff0b,0 0 0 190px #b898ff08;
}
.student-entry{position:relative;min-height:calc(100dvh - 55px);display:grid;place-items:center;padding:38px 12px;overflow:hidden}
.student-entry .game-join-form{
  position:relative;z-index:2;width:min(100%,560px);gap:18px;padding:12px 12px 18px;
  border:1px solid #ffffff38;border-radius:30px;background:#faf9ffed;color:#251d39;
  box-shadow:0 32px 90px #07040e80,0 0 0 7px #ffffff0c;
  backdrop-filter:blur(18px);
}
.student-entry .game-banner{
  display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px;min-height:154px;margin:0;
  border:1px solid #ffffff25;border-radius:21px;padding:24px;
  background:radial-gradient(circle at 92% 5%,#c3a5ff99 0,transparent 35%),linear-gradient(135deg,#32205f,#7652db);
  box-shadow:inset 0 1px #ffffff32,0 12px 28px #3e268642;
}
.student-entry .game-banner::before{content:"";position:absolute;inset:auto 18px 16px auto;width:90px;height:90px;border:1px solid #fff3;border-radius:50%;box-shadow:0 0 0 18px #fff1,0 0 0 36px #fff1}
.student-entry .game-banner::after{width:210px;top:-72px;right:-42px;background:repeating-radial-gradient(circle,#ffffff26 0 1px,transparent 2px 13px)}
.join-mark{position:relative;z-index:1;display:grid;place-items:center;width:72px;height:72px;flex:none;border-radius:22px;background:#d9f58d;color:#28203f;font-size:1.9rem;font-weight:950;letter-spacing:-.08em;box-shadow:inset 0 -6px #8eae3f42,0 11px 25px #21123f55;transform:rotate(-5deg)}
.student-entry .game-banner h1{font-size:clamp(1.8rem,7vw,3rem);line-height:1;letter-spacing:-.055em;margin:7px 0}
.student-entry .game-banner p{margin:0;color:#eee7ff}
.student-entry .game-banner .eyebrow{color:#d9f58d}
.game-join-form>label,.game-join-form>.row,.game-join-form>.game-error{margin-inline:12px}
.game-join-form .game-label{font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:#665c78}
.game-join-form .game-input{
  min-height:62px;border:2px solid #d9d2e6;border-radius:16px;background:#fff;color:#241a39;
  font-size:1.55rem;font-weight:900;text-align:center;letter-spacing:.3em;font-variant-numeric:tabular-nums;
  box-shadow:inset 0 2px 5px #24133a0b;
}
.game-join-form .game-input:focus{border-color:#7453df;outline:4px solid #7353df20}
.game-join-form .join-submit{margin-inline:12px;min-height:58px;border-radius:16px;font-size:1rem;justify-content:space-between;padding-inline:20px}
.join-submit span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#ffffff20;font-size:1.2rem}
.join-hint{display:flex;align-items:center;justify-content:center;gap:7px;color:#776d87;font-size:.76rem}
.join-hint span{color:#43a573;font-size:.6rem;filter:drop-shadow(0 0 4px #43a573)}
.student-entry-orbit{position:absolute;z-index:0;inset:50% auto auto 50%;width:min(94vw,840px);aspect-ratio:1;translate:-50% -50%;border:1px solid #aa8af62b;border-radius:50%;pointer-events:none}
.student-entry-orbit i{position:absolute;inset:12%;border:1px dashed #b89cff22;border-radius:50%}.student-entry-orbit i:nth-child(2){inset:27%}.student-entry-orbit i:nth-child(3){inset:41%}
.student-entry-orbit b{position:absolute;display:grid;place-items:center;width:54px;height:54px;border:1px solid #ffffff26;border-radius:17px;background:#342454b8;color:#e7dcff;font-size:1.35rem;box-shadow:0 15px 35px #08040f66;transform:rotate(-8deg)}
.student-entry-orbit b:nth-of-type(1){left:3%;top:22%}.student-entry-orbit b:nth-of-type(2){right:2%;top:29%;background:#294c4b;color:#bffbe1;transform:rotate(9deg)}.student-entry-orbit b:nth-of-type(3){right:15%;bottom:8%;background:#60491f;color:#ffe7a1;transform:rotate(-5deg)}

/* Question screen */
.student-world .game-arena{width:min(calc(100% - 32px),1040px)}
.student-world .game-arena>section.game-card{position:relative;gap:14px}
.arena-top{padding:9px 10px 16px;border-color:#ffffff24}
.arena-title{display:flex;align-items:center;gap:12px;min-width:0}.arena-title>div{min-width:0}.arena-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arena-live-dot{width:12px;height:12px;flex:none;border-radius:50%;background:#79edb7;box-shadow:0 0 0 5px #79edb71c,0 0 14px #79edb7}
.arena-actions .button{border-color:#ffffff24;background:#ffffff0d;color:#f8f1ff;backdrop-filter:blur(8px)}
.round-meta{padding-inline:4px;color:#e8dbf9}.round-meta>span:first-child{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;border:1px solid #ffffff20;border-radius:999px;background:#ffffff0b}
.round-clock{padding:5px 7px 5px 13px;border:1px solid #ffffff18;border-radius:14px;background:#0d091755}.round-clock .game-progress{height:10px}.round-clock .game-progress>span{background:linear-gradient(90deg,#75e2be,#d8f58c);box-shadow:0 0 16px #9eeeb8}
.round-clock b{background:#ffffff10;border:1px solid #ffffff14}
.student-world .question-stage{
  position:relative;min-height:clamp(116px,19vh,180px);border-color:#8f73ba;border-radius:22px;
  background:radial-gradient(circle at 94% 3%,#7653aa66,transparent 37%),linear-gradient(145deg,#2a1e43,#1c172f 65%,#17263a);
  box-shadow:inset 0 1px #ffffff18,0 18px 42px #0905104d;
}
.question-stage::before{content:attr(data-question);position:absolute;right:18px;bottom:-24px;color:#ffffff08;font-size:9rem;font-weight:950;line-height:1;letter-spacing:-.1em}
.question-kicker{position:relative;z-index:1;display:inline-flex;margin-bottom:8px;color:#d9f58d;font-size:.65rem;font-weight:900;letter-spacing:.18em}
.student-world .question-stage .game-question{position:relative;z-index:1;max-width:820px;font-weight:850;letter-spacing:-.025em}
.student-world .choice-grid{gap:12px}
.student-world .choice-tile{
  position:relative;border:1px solid #ffffff1c;border-bottom-width:4px;border-color:#00000024;border-radius:18px;
  box-shadow:0 12px 24px #09051033,inset 0 1px #ffffff50;
  transition:transform .18s var(--ease-out),filter .18s,box-shadow .18s;
}
.student-world .choice-tile:hover{transform:translateY(-3px);filter:saturate(1.08) brightness(1.04);box-shadow:0 17px 30px #0905104c,inset 0 1px #ffffff60}
.student-world .choice-tile:active{transform:translateY(0)}
.student-world .choice-letter{width:34px;height:34px;flex-basis:34px;border-radius:11px;background:#201634dd;box-shadow:inset 0 1px #ffffff24}
.student-world .choice-tile:has(input:checked){transform:translateY(-2px);box-shadow:0 0 0 3px #fff,0 14px 32px #08050e66}
.student-world .submit-answer{border-radius:15px;background:linear-gradient(135deg,#d9f58d,#aee66d);border-color:#d9f58d;color:#26340f;box-shadow:0 9px 22px #8fbd4c35;font-weight:900}
.student-world .feedback-right{border:1px solid #71d9a1;background:linear-gradient(135deg,#daf7e7,#b9efd1);color:#175333}.student-world .feedback-wrong{border:1px solid #ec8eac;background:linear-gradient(135deg,#ffe5ed,#f7bed1);color:#76223e}
.student-world .arena-score{position:sticky;bottom:8px;z-index:19;justify-self:end;border:1px solid #ffffff24;background:#221731e8;box-shadow:0 12px 30px #08040f66;backdrop-filter:blur(12px)}
.boost-dock{border-color:#715493;background:#1b132be8;border-radius:18px;box-shadow:0 16px 38px #08040f66}
.boost-chip{border-radius:14px;background:#2a1e40;border-color:#5d4778}.boost-chip strong{border-radius:10px}.boost-chip:not(:disabled):hover{transform:translateY(-2px);background:#36254f;box-shadow:0 8px 18px #08040f55}
.student-leaderboard{border-color:#8060a7;border-radius:18px;background:#1c142be8;box-shadow:0 20px 45px #08040f77,inset 0 1px #ffffff13}.student-leaderboard li{border:1px solid #ffffff08}.student-leaderboard li.is-me{background:linear-gradient(100deg,#6a48aa,#4e3980);border-color:#a88bdb}

/* Robot arenas */
.robot-arena{width:min(95vw,1120px);gap:14px;padding:22px;border:1px solid #72578f;border-radius:28px;background:linear-gradient(150deg,#20162fdd,#13101ddd);box-shadow:0 28px 80px #07040db3,inset 0 1px #ffffff19;backdrop-filter:blur(14px)}
.robot-arena-header{align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #ffffff1c}
.robot-mode-title{display:flex;align-items:center;gap:13px}.robot-mode-title .eyebrow{color:#d9f58d}.robot-mode-icon{display:grid;place-items:center;width:58px;height:58px;flex:none;border:1px solid #a483d2;border-radius:17px;background:linear-gradient(145deg,#6f4b9b,#3c2957);color:#fff0b7;font-size:1.7rem;box-shadow:inset 0 1px #ffffff2c,0 12px 25px #08040f55}
.robot-arena-header h1{margin:2px 0;letter-spacing:-.05em}.robot-arena>p{padding:0 4px;color:#cdbce0;font-size:.88rem}
.robot-hud{justify-content:flex-end}.robot-hud b{display:grid;gap:1px;min-width:76px;padding:7px 10px;border:1px solid #ffffff12;border-radius:11px;background:#302342;color:#fff3c8;line-height:1.2;box-shadow:inset 0 1px #ffffff10}.robot-hud small{color:#af9bc4;font-size:.53rem;letter-spacing:.09em}.robot-hud .hud-time{background:#493264;color:#fff}.robot-hud .hud-health{background:#473040;color:#ffb7ca}.robot-hud .hud-shield{background:#1d4055;color:#a9efff}
.robot-field{border:2px solid #9e7aca;border-radius:20px;background:#171223;box-shadow:0 18px 55px #08040f99,inset 0 0 35px #8a65c028;overflow:hidden}
canvas.robot-field{height:auto;aspect-ratio:840 / 510}
@media (max-width:1530px){.student-leaderboard{position:static;width:auto;max-height:190px}.student-leaderboard ol{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}}
.robot-field:focus{outline:3px solid #d9f58d;outline-offset:4px}.arena-minimap{border:1px solid #8a6aaa;border-radius:12px;background:#161020;box-shadow:0 10px 25px #08040f66}
.robot-dpad .button{min-width:54px;min-height:48px;border-color:#786093;background:#302343;color:#fff;font-size:1.15rem}
.boss-health{padding:8px 11px;border:1px solid #ffffff18;border-radius:12px;background:#25182f}.boss-health progress{height:12px}
.arena-connection{display:flex;align-items:center;justify-content:center;gap:9px;padding:11px 14px!important;border:1px solid #cda85a;border-radius:13px;background:#4a391fd9;color:#fff2bd!important;font-weight:800}.arena-connection span{font-size:1.3rem;animation:connection-spin 1.1s linear infinite}.app-loading{min-height:100dvh}.app-loading b{font-size:2rem;color:var(--accent)}@keyframes connection-spin{to{transform:rotate(1turn)}}

/* Teacher UI polish */
.teacher-studio{--shadow:0 10px 30px #23183c0d}
.teacher-studio .topbar{position:sticky;z-index:5;top:0;background:color-mix(in srgb,var(--panel) 90%,transparent);backdrop-filter:blur(15px)}
.teacher-studio .workspace-body{padding-top:30px}
.teacher-studio .hero{border-radius:28px;background:radial-gradient(circle at 82% 18%,#ffffffaa 0,transparent 25%),linear-gradient(135deg,#f0eaff,#e6dcff 68%,#e2f3b6);box-shadow:0 18px 45px #4d30751c,inset 0 1px #fff}
.teacher-studio .quiz-card{border:1px solid #dfd8e8;box-shadow:0 10px 24px #291a3d0c;transition:transform .2s var(--ease-out),box-shadow .2s}.teacher-studio .quiz-card:hover{transform:translateY(-4px);box-shadow:0 18px 36px #291a3d1b}
.teacher-studio .cover{border-radius:17px 17px 0 0}.teacher-studio .stat-card{border:1px solid #e3dce9;box-shadow:0 9px 24px #2416390b}.teacher-studio .sidebar{box-shadow:9px 0 35px #160d2319}.teacher-studio .sidebar nav button{transition:background .16s,transform .16s}.teacher-studio .sidebar nav button:hover{transform:translateX(2px)}

@media(max-width:700px){
  .student-entry{padding-block:18px}.student-entry-orbit{width:135vw}.student-entry-orbit b{display:none}
  .student-entry .game-join-form{border-radius:24px}.student-entry .game-banner{grid-template-columns:1fr;padding:19px;min-height:170px}.join-mark{width:52px;height:52px;border-radius:16px;font-size:1.35rem}
  .student-entry .game-banner h1{font-size:2rem}.game-join-form .game-input{min-height:56px;font-size:1.3rem}
  .arena-top{align-items:flex-start}.arena-actions{width:100%}.arena-actions .button{flex:1;font-size:.74rem;padding-inline:7px}.arena-live-dot{display:none}
  .student-world .question-stage{min-height:112px}.question-stage::before{font-size:6rem;bottom:-15px}.student-world .choice-grid{gap:8px}.student-world .choice-tile{min-height:62px;border-radius:15px}
  .robot-arena{width:100%;min-height:100dvh;margin:0;padding:12px;border:0;border-radius:0}.robot-mode-icon{width:45px;height:45px;border-radius:13px;font-size:1.25rem}.robot-hud{justify-content:flex-start}.robot-hud b{min-width:68px;font-size:.75rem}.robot-field{border-radius:13px}.arena-minimap{justify-self:center}
}
@media(prefers-reduced-motion:no-preference){
  .arena-live-dot{animation:live-pulse 1.7s ease-in-out infinite}.student-entry-orbit{animation:orbit-drift 18s ease-in-out infinite alternate}
  @keyframes live-pulse{50%{box-shadow:0 0 0 8px #79edb708,0 0 18px #79edb7;filter:brightness(1.15)}}
  @keyframes orbit-drift{to{transform:rotate(3deg) scale(1.025)}}
}
