/* Comparative Showdown v3 — restrained classroom arcade */
:root{
 color-scheme:light;
 --bg:#f3f5f8;--paper:#ffffff;--ink:#172136;--muted:#57657b;
 --line:#d8e0eb;--accent:#2054c7;--accent-hover:#173f9d;
 --accent-wash:#eaf0ff;--navy:#1b273c;--navy2:#293954;
 --gold:#dfb44e;--success:#126447;--error:#a62835;
 --shadow:0 16px 48px rgba(24,39,64,.07);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;scroll-behavior:smooth}
body{margin:0;color:var(--ink);background:var(--bg);min-height:100vh;line-height:1.5}
a{color:var(--accent)}
button,input,select{font:inherit}
button{cursor:pointer;border:0;border-radius:10px;padding:12px 18px;min-height:48px;font-size:14px;font-weight:800;transition:background .15s,transform .1s}
button:active:not(:disabled){transform:translateY(1px)}
button:disabled{opacity:.42;cursor:not-allowed;box-shadow:none!important}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #88a8ff;outline-offset:3px}
input,select{width:100%;display:block;background:#fff;color:var(--ink);border:1.5px solid #b8c5d6;border-radius:10px;padding:13px 15px;min-height:52px;font-size:16px}
input:focus,select:focus{border-color:var(--accent)}
input::placeholder{color:#7e8da2}
label{display:flex;gap:10px;justify-content:space-between;align-items:baseline;margin:18px 0 7px;font-size:12px;font-weight:850;letter-spacing:.06em;color:var(--ink)}
p{margin:8px 0}
.shell{width:min(1130px,100%);margin:auto;padding:18px 22px 46px}
.top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px}
.brand{font-size:17px;letter-spacing:.07em;text-decoration:none;font-weight:950;color:var(--ink)}
.brand span{color:var(--accent)}
.role-chip{display:inline-flex;align-items:center;background:#e4ecff;border:1px solid #c4d4fa;padding:6px 11px;border-radius:30px;letter-spacing:.07em;font-weight:850;color:#224c9e;font-size:11px}
.role-chip.teacher-role{background:#e9edf3;border-color:#cbd3df;color:#35465f}
.hero{border-radius:22px;background:var(--navy);color:white;padding:clamp(24px,4.4vw,42px) clamp(22px,5vw,52px);display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative;overflow:hidden}
.hero::before{content:"";position:absolute;left:0;top:0;width:7px;height:100%;background:var(--gold)}
.hero .intro{position:relative;z-index:1;min-width:0}
.eyebrow{font-size:11px;font-weight:850;letter-spacing:.18em;color:#c7d9ff;margin:0}
.hero h1{font-weight:920;font-size:clamp(33px,5vw,61px);letter-spacing:-.052em;line-height:1.05;margin:12px 0}
.hero h1 em{font-style:normal;color:#f4d17b}
.sub{font-size:clamp(15px,1.8vw,17px);max-width:680px;color:#d5deec;margin:0 0 17px;line-height:1.5}
.chips{display:flex;gap:7px;flex-wrap:wrap}
.chips span{font-size:11px;font-weight:750;letter-spacing:.015em;border:1px solid #72809a;background:#ffffff0e;border-radius:30px;padding:5px 10px;color:#ebf0f8}
.hero-mark{flex-shrink:0;display:flex;align-items:center;justify-content:center;border:1px solid #68748b;border-radius:17px;min-width:136px;height:120px;font-weight:1000;font-size:43px;letter-spacing:-.05em;background:#fff0;color:#fff}
.hero-mark span{font-size:14px;font-weight:950;color:#f4d17b;letter-spacing:0;margin:0 8px}
.section-label{font-size:11px;font-weight:850;letter-spacing:.115em;color:#2355bd;margin:0}
.entry-grid{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:22px;align-items:start;max-width:1040px;margin:24px auto}
.panel{border:1px solid var(--line);background:var(--paper);border-radius:18px;padding:clamp(18px,2.5vw,28px);min-width:0;box-shadow:var(--shadow)}
.panel h2,.guide h2{font-size:clamp(24px,3vw,29px);letter-spacing:-.035em;line-height:1.16;margin:8px 0 10px}
.intro-copy{color:var(--muted);font-size:15px}
.entry-panel{border-top:4px solid var(--accent)}
.entry-panel .primary{margin-top:20px}
.field-note{font-weight:650;color:var(--muted);letter-spacing:0}
.field-helper{color:var(--muted);font-size:12px;line-height:1.45;margin:8px 0 4px}
.primary{background:var(--accent);color:#fff;box-shadow:0 3px 0 #103687;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:12px}
.primary:hover:not(:disabled){background:var(--accent-hover)}
.secondary{background:#edf1f7;color:#26344b;border:1px solid #c7d0df}
.secondary:hover:not(:disabled){background:#e2e9f3}
.danger{background:#fff0f1;color:#8b2230;border:1px solid #e6afb5}
.wide{width:100%;justify-content:space-between;padding-inline:19px;font-size:15px}
.help{color:var(--error);font-size:13px;min-height:22px;overflow-wrap:anywhere;margin-top:12px}
.guide{padding:26px 18px 14px;min-width:0}
.steps{list-style:none;margin:19px 0;padding:0;display:grid;gap:0}
.steps li{display:flex;gap:15px;padding:15px 0;border-bottom:1px solid #dce3ed;align-items:flex-start}
.steps li:first-child{padding-top:6px}
.step-num{flex:0 0 39px;height:39px;display:flex;align-items:center;justify-content:center;background:#dfe8fa;color:#204b9c;border-radius:11px;font-weight:900;font-size:13px}
.steps strong{font-size:15px}
.steps p{color:var(--muted);font-size:13px;line-height:1.45;margin:4px 0}
.guide-note{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:13px 15px;font-size:13px;color:#526075;margin-top:18px}
.guide-note strong{color:var(--ink)}
footer{margin-top:35px;text-align:center;font-size:12px;color:#67758a}
.student-header{display:flex;justify-content:space-between;align-items:center;gap:20px;background:#fff;border:1px solid var(--line);border-radius:18px;margin:23px auto;padding:20px 24px;max-width:930px}
.student-header h2{font-size:28px;margin:4px 0}
.student-header h2 strong{color:var(--accent);font-variant-numeric:tabular-nums;letter-spacing:.07em}
.student-header>div>p:not(.section-label){color:var(--muted)}
.lobby-note{font-size:12px!important}
.student-stats{display:flex;align-items:center;gap:10px}
.student-stats>div{background:#eaf0ff;padding:9px 14px;border-radius:12px;min-width:98px;text-align:center}
.student-stats small{font-size:10px;letter-spacing:.08em;color:#526685;display:block}
.student-stats strong{display:block;color:#1a438f;font-size:26px;white-space:nowrap}
.dashboard{margin-top:22px}
.room-head{display:grid;grid-template-columns:.74fr 1.26fr;gap:24px;align-items:center;border:1px solid #bac9dd;background:#fff;border-radius:18px;padding:24px;box-shadow:var(--shadow)}
.code-line{display:flex;gap:13px;align-items:baseline;flex-wrap:wrap}
.code-line span{font-size:12px;font-weight:850;letter-spacing:.07em;color:var(--muted)}
.code-line strong{font-size:clamp(31px,4.2vw,48px);letter-spacing:.13em;color:#193d83;font-variant-numeric:tabular-nums;line-height:1.3}
.room-code-block>p:last-child{font-size:12px;color:var(--muted)}
.share-section{padding-left:22px;border-left:1px solid var(--line);min-width:0}
.share{background:#eef2f8;border:1px solid #dce3ed;border-radius:9px;color:#30415d;padding:11px;font-size:12px;overflow-wrap:anywhere;line-height:1.5;margin:7px 0 10px;user-select:all}
.room-actions{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:9px}
.room-actions button{font-size:12px}
.host-layout{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:18px;margin-top:18px;align-items:start}
.host-layout .panel h2{font-size:25px}
.session-status{color:#3e526c;font-size:14px;margin:6px 0 14px}
.join-state{display:flex;align-items:center;gap:10px;padding:10px;background:#f0f4fa;border-radius:10px;font-size:14px;font-weight:700;flex-wrap:wrap}
.badge{border-radius:30px;background:#e5f4eb;color:#15603b;border:1px solid #a9d1b8;padding:5px 9px;font-size:10px;font-weight:850;letter-spacing:.05em}
.badge.offline{background:#e8edf3;border-color:#c7d3df;color:#53627a}
.round-flag{background:#f8f9fb;border:1px solid #dce3ec;border-radius:12px;padding:13px 15px;margin:16px 0}
.round-flag span,.round-flag small{display:block;font-size:11px;color:#60728a}
.round-flag span{letter-spacing:.07em;font-weight:900}
.round-flag b{font-size:29px;color:#234a9b;line-height:1.5}
.control-buttons{display:grid;grid-template-columns:1fr;gap:9px}
.control-buttons .danger{margin-top:8px}
.hint{color:#62718a;font-size:12px;line-height:1.6;margin:13px 0}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:17px 0}
.stat-grid>div{background:#f1f4f8;border:1px solid #e0e5ec;border-radius:10px;padding:12px;min-width:0}
.stat-grid small{display:block;font-size:10px;font-weight:800;color:#62718a;letter-spacing:.05em}
.stat-grid strong{display:block;font-size:22px;color:#1d2c47;overflow-wrap:anywhere}
.feed{border-left:4px solid #4e7bc6;background:#f4f7fb;padding:13px 16px;border-radius:9px;margin:15px 0;min-height:99px}
.feed p{font-size:14px;color:#46546c}
.answer-line{font-size:13px;font-weight:750;color:#174ca7;overflow-wrap:anywhere}
.duel-board{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:13px;align-items:center;border-radius:14px;background:var(--navy);color:#fff;padding:17px}
.duel-board>div{display:flex;min-width:0;flex-direction:column}
.duel-board>div:last-child{text-align:right}
.duel-board>div>span{font-weight:850;overflow-wrap:anywhere}
.duel-board strong{font-size:34px;line-height:1.25;font-variant-numeric:tabular-nums;color:#fff}
.duel-board small{font-size:10px;letter-spacing:.07em;color:#b8c7df}
.versus{font-size:14px;font-weight:950;color:#f0c869}
.play-wrap{max-width:860px;margin:24px auto 0}
.teacher-play{max-width:none;border-top:2px solid #d8e0eb;padding-top:24px}
.play-heading{background:white;border:1px solid var(--line);border-radius:14px;padding:19px 22px;margin-bottom:16px}
.play-heading h2{font-size:22px;line-height:1.2;margin:6px 0}
.play-heading p:last-child{font-size:13px;color:var(--muted)}
.play-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 10px}
.level{display:inline-flex;background:#dfe8fa;color:#21468f;font-size:11px;font-weight:900;letter-spacing:.05em;border-radius:8px;padding:7px 11px}
.timer{color:#4e5f78;font-weight:850;font-size:13px;font-variant-numeric:tabular-nums}
.progress-track{height:7px;background:#d7dfeb;border-radius:20px;overflow:hidden;margin-bottom:13px}
.progress-track>div{width:0;height:100%;background:#3a66c3;transition:width .3s}
.play-card{border:1px solid var(--line);border-radius:18px;background:white;padding:clamp(19px,4vw,31px);box-shadow:var(--shadow)}
.play-card .section-label{color:#466da5}
.play-card h2{font-size:clamp(22px,3.1vw,29px);letter-spacing:-.02em;line-height:1.3;margin:12px 0}
.play-card>p:not(.section-label){font-size:14px;color:#576780;margin:7px 0 17px}
.play-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.play-controls .primary{padding-inline:27px}
.feedback-box{margin-top:14px;min-height:21px;font-weight:720;font-size:13px;color:#56657b;white-space:pre-line}
.feedback-box.correct{color:var(--success)}
.feedback-box.wrong{color:var(--error)}
.tokens,.answer-slots{display:flex;gap:8px;flex-wrap:wrap;padding:12px;border-radius:11px;background:#f1f4f9;min-height:63px;align-items:center}
.tokens{padding:10px 0;background:transparent}
.answer-slots{border:2px dashed #b8c6dd}
.answer-slots strong{color:#64758c;font-weight:600;font-size:13px}
.answer-slots .word{display:inline-block;background:#dce8ff;color:#193c7b;border-radius:7px;padding:7px 10px;font-size:13px;font-weight:800}
.token{padding:8px 12px;min-height:43px;background:#253752;color:white;border:1px solid #50617b;border-radius:9px;box-shadow:none;font-size:14px}
.token.used{opacity:.28}
.wait-box{background:#edf3ff;color:#29497e;border-radius:10px;padding:12px;font-size:13px;margin-top:13px}
.solution{background:#eaf4ef;border:1px solid #b4d5c2;border-radius:12px;padding:16px 20px;margin-top:14px}
.solution .section-label{color:#176040}
.solution p{font-size:21px;font-weight:850;color:#124c34;margin:8px 0}
.solution small{color:#436653}
.star-board{border-collapse:collapse;width:100%;background:white;color:#27364e;margin:14px 0 20px;table-layout:fixed;font-size:12px}
.star-board th,.star-board td{border:1px solid #cad2df;padding:8px 5px;text-align:center;overflow-wrap:anywhere}
.star-board th:first-child,.star-board td:first-child{width:34%;text-align:left;font-weight:700}
.star-board th{background:#eef2f9}
.star-board td:not(:first-child){color:#966a1b;font-weight:800;letter-spacing:.06em}
.end-screen{max-width:760px;margin:24px auto;padding:32px;border:1px solid var(--line);border-radius:18px;background:#fff;text-align:center}
.end-screen h2{font-size:clamp(27px,5vw,42px);margin:9px 0}
.end-screen #endScores{font-size:clamp(22px,3.3vw,32px);font-weight:900;color:var(--ink)}
.end-screen #endMessage{color:var(--muted)}
.new-game{display:inline-flex;margin-top:13px}
@media(max-width:860px){
 .hero-mark{display:none}
 .host-layout,.room-head{grid-template-columns:1fr}
 .share-section{border-left:0;border-top:1px solid var(--line);padding:17px 0 0}
}
@media(max-width:710px){
 .shell{padding:13px 13px 30px}
 .hero{padding:24px 20px}
 .hero h1{font-size:clamp(32px,8vw,45px)}
 .entry-grid{grid-template-columns:1fr;gap:11px;margin-top:14px}
 .guide{padding:19px 9px}
 .panel{padding:20px}
 .student-header{display:block;padding:18px}
 .student-stats{margin-top:14px}
 .student-stats>div{flex:1}
 .room-head{padding:18px}
 .room-actions>button{flex:1 1 160px}
 .stat-grid{gap:6px}
 .stat-grid>div{padding:10px}
 .stat-grid strong{font-size:17px}
 .duel-board strong{font-size:28px}
 .play-controls button{flex:1 1 130px}
 .role-chip{font-size:10px}
 .code-line strong{font-size:32px}
 .host-layout{gap:14px}
}
@media(max-width:390px){
 .hero h1{font-size:33px}
 .star-board{font-size:10px}
 .star-board th,.star-board td{padding:6px 3px}
 .room-actions>button{width:100%}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
\n.jump-link{display:flex;align-items:center;justify-content:center;min-height:49px;text-align:center;font-weight:850;text-decoration:none;font-size:13px;border-radius:10px;}\n