:root{font-family:Arial,Helvetica,sans-serif;color:#17335d;background:#eef1f7;font-synthesis:none;--blue:#315eea;--border:#d6dfee;--ink:#17335d;--muted:#657895}*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden}button,input,select{font:inherit}button,.button{border:1px solid var(--border);border-radius:12px;padding:11px 17px;background:white;color:var(--ink);font-weight:750;cursor:pointer;text-decoration:none}button:hover,.button:hover{border-color:#91a9ee;background:#f2f5ff}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f5b735;outline-offset:3px}button:disabled{cursor:default;opacity:.5}button.primary{background:var(--blue);color:white;border-color:var(--blue);box-shadow:0 4px 0 #2445b5}button.primary:hover{background:#254fd0}.primary span{float:right}.topbar{height:64px;border-bottom:1px solid var(--border);background:white;display:flex;align-items:center;gap:20px;padding:10px 30px}.brand img{width:150px;max-height:43px;object-fit:contain}.preview-label{font-size:10px;letter-spacing:1.5px;color:var(--muted);font-weight:800}.tools{margin-left:auto;display:flex;gap:8px}.tools button{padding:7px 10px;font-size:12px}#app{height:calc(100dvh - 64px);padding:18px 26px;max-width:1300px;margin:auto}.screen{height:100%;min-height:0}[hidden]{display:none!important}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:850;color:var(--blue)}h1{font-size:clamp(25px,4vw,48px);letter-spacing:-1.7px;margin:14px 0}p{line-height:1.55;color:var(--muted)}.menu-screen{display:grid;grid-template-columns:1.2fr 1fr;grid-template-rows:1fr 1fr 25px;gap:10px 60px;align-content:center;align-items:center;max-width:980px;margin:auto}.menu-heading{align-self:end}.menu-heading h1{font-size:clamp(38px,5.5vw,70px);line-height:1;margin:16px 0}.menu-heading p{font-size:18px}.menu-card{grid-column:2;grid-row:1/3;background:white;border:1px solid var(--border);border-radius:26px;padding:32px;box-shadow:0 16px 40px #1835590b;display:grid;gap:20px}.field-label{font-size:13px;font-weight:800}.menu-card select,select{border:1px solid var(--border);background:#f6f8fd;border-radius:10px;padding:12px;color:var(--ink);font-weight:700;max-width:100%}.menu-card .primary{padding:19px}.class-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.menu-note{font-size:11px;text-align:center;color:var(--muted)}.menu-art{align-self:start;padding-top:10px}.art-road{height:90px;border:1px solid var(--border);border-radius:50px;background:white;position:relative;overflow:hidden}.art-road:before{content:'';position:absolute;inset:44px 0 auto;border-top:2px dashed #d4ddec}.art-road i{position:absolute;right:35px;height:100%;width:8px;background:repeating-conic-gradient(#17335d 0% 25%,white 0% 50%) 0/8px 8px}.art-road #heroAvatar{position:absolute;left:22%;top:5px;width:80px;height:80px;z-index:2}.start-lights{display:flex;gap:7px;margin:15px 0;justify-content:center}.start-lights b{width:10px;height:10px;border-radius:50%;background:#c6d2e6}.start-lights b:last-child{background:#4dc68a;box-shadow:0 0 0 4px #4dc68a19}.game-brand{grid-column:1/3;text-align:center;color:var(--muted);font-size:11px}.avatar{position:relative;width:100%;height:100%;aspect-ratio:1}.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.avatar img:last-child{z-index:2}.centered{display:flex;align-items:center;justify-content:center}.panel{background:white;border:1px solid var(--border);border-radius:25px;padding:30px;text-align:center;width:min(100%,560px)}.join-panel h1{font-size:35px}.join-panel form{display:grid;gap:10px}.code-wrap{position:relative;margin:16px auto 0;width:100%}#codeBoxes{display:flex;align-items:center;justify-content:center;gap:7px}#codeBoxes span{width:48px;height:60px;border:2px solid #d8e0f1;border-radius:10px;background:#f7f9fd;display:grid;place-items:center;font-size:27px;font-weight:850}#codeBoxes span.active{border-color:var(--blue);box-shadow:0 0 0 3px #315eea10}#codeBoxes b{color:#93a3ba}#code{position:absolute;inset:0;width:100%;height:100%;opacity:.01;cursor:text;font-size:20px;letter-spacing:20px}.text-button{border:0;background:transparent;box-shadow:none;font-size:12px}.muted{font-size:12px;color:var(--muted)}.danger{color:#bb354f}.room-screen{display:flex;flex-direction:column;gap:12px}.room-heading{display:flex;justify-content:space-between;align-items:center}.room-heading h1{font-size:30px;margin:6px 0}.room-code{font-size:30px;letter-spacing:4px;font-weight:850;background:white;border:1px solid var(--border);padding:12px 20px;border-radius:14px}.room-meta{display:flex;align-items:center;gap:15px;color:var(--muted);font-size:12px}.room-meta button{font-size:11px;padding:7px 10px}.room-meta #copy{margin-left:auto}.roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(65px,1fr));grid-auto-rows:minmax(50px,1fr);gap:7px;flex:1;min-height:0;overflow:auto}.roster-cell{position:relative;border:1px solid var(--border);border-radius:14px;background:white;display:flex;align-items:center;justify-content:center;min-height:0}.roster-cell .avatar{height:75%;width:auto;max-width:90%;aspect-ratio:1}.roster-cell small{position:absolute;bottom:3px;font-size:9px;color:var(--muted)}.roster-cell button{position:absolute;right:2px;top:2px;padding:1px 5px;font-size:11px;background:#ffffffcc}.roster-cell.self{border:2px solid var(--blue);background:#eff4ff}.host-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.host-controls label{font-size:12px}.host-controls select,.host-controls button{font-size:12px;padding:9px 12px}#waitingNote{margin:0}.race-screen{display:flex;flex-direction:column;gap:10px}.race-hud{display:flex;align-items:center;gap:20px;min-height:50px}.race-hud>div:first-child{display:grid;gap:5px}.race-hud strong{font-size:14px}.timer{margin:auto;font-size:35px;font-weight:900;font-variant-numeric:tabular-nums;color:var(--blue)}#personalRank{font-size:12px;width:160px;text-align:right}.track-wrap{position:relative;flex:1;min-height:0;border-radius:18px;background:white;border:1px solid var(--border);padding:9px 10px 19px;overflow:hidden}.race-track{display:flex;flex-direction:column;height:100%;gap:var(--lane-gap,4px)}.race-lane{position:relative;flex:1;min-height:0;max-height:85px;background:#edf2f8;border-radius:100px;overflow:hidden;border:1px solid #e1e7ef}.race-lane.self{background:#e1eaff;border-color:#7f9ff4}.race-lane:after{content:'';position:absolute;right:6%;top:0;bottom:0;width:3px;background:repeating-linear-gradient(#536581 0 3px,white 3px 6px)}.racer{position:absolute;top:0;bottom:0;width:auto;aspect-ratio:1;left:0;transition:left .24s linear;z-index:2}.racer .avatar{height:100%}.lane-marker{position:absolute;left:7px;top:50%;transform:translateY(-50%);font-size:clamp(5px,var(--label-size,10px),10px);font-weight:800;color:#7185a4}.lane-finish{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:clamp(6px,var(--label-size,10px),12px);font-weight:800}.race-lane.disconnected{opacity:.4}.track-brand{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);font-size:9px;color:#8091ab}.question-panel{background:white;border:1px solid var(--border);border-radius:18px;padding:12px 18px 9px}.question-text{font-size:clamp(24px,3vw,38px);font-weight:900;text-align:center;min-height:1.2em;margin-bottom:9px}.answer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.answer-btn{font-size:26px;font-weight:850;padding:13px;border:2px solid #c7d2fe;background:linear-gradient(#eef2ff,#e0e7ff);color:#1e3a8a;box-shadow:0 3px 0 #17335d15}.answer-btn:active{transform:translateY(2px)}.feedback{display:block;text-align:center;font-size:11px;min-height:16px;margin-top:9px;color:var(--muted)}.feedback.good{color:#188053}.feedback.bad{color:#b53752}.countdown{position:absolute;inset:0;background:#ffffffde;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:4}.countdown span{font-size:clamp(55px,12vh,100px);font-weight:900;color:var(--blue)}.countdown small{font-size:16px}.results-panel{width:min(100%,650px)}.results-panel h1{font-size:32px;margin:10px}.podium{display:flex;align-items:flex-end;justify-content:center;gap:12px;height:190px;margin:15px auto}.podium-place{width:27%;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.podium-place:nth-child(1){order:2}.podium-place:nth-child(2){order:1}.podium-place:nth-child(3){order:3}.podium-avatar{width:65px;height:65px;max-height:40%}.podium-block{width:100%;border-radius:10px 10px 0 0;display:grid;place-content:center;font-weight:900;font-size:26px;background:#f5d46d;height:85px}.podium-place:nth-child(2) .podium-block{background:#d4dfed;height:64px}.podium-place:nth-child(3) .podium-block{background:#e8b08b;height:48px}.podium-place small{font-size:10px;margin:4px}.result-stats{display:flex;justify-content:center;gap:25px;font-size:13px;color:var(--muted);margin:15px}.results-actions{display:flex;justify-content:center;gap:10px}.more-link{display:block;font-size:12px;color:var(--blue);margin-top:18px}.results-panel h2{font-size:22px;margin:10px}#notice{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#17335d;color:white;padding:12px 20px;border-radius:12px;font-size:13px;z-index:10;max-width:90%;text-align:center}#offline{position:fixed;top:0;left:0;right:0;background:#fff0bf;color:#573d09;padding:12px;text-align:center;font-size:13px;z-index:20}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:650px){.topbar{height:52px;padding:8px 14px;gap:8px}.brand img{width:110px;max-height:33px}.preview-label{display:none}#app{height:calc(100dvh - 52px);padding:12px}.menu-screen{display:flex;flex-direction:column;gap:12px;justify-content:center}.menu-heading{align-self:center;text-align:center}.menu-heading h1{font-size:42px;margin:10px}.menu-heading p{font-size:14px;margin:10px}.menu-art{width:85%;height:75px;align-self:center;padding:0}.art-road{height:60px}.art-road #heroAvatar{height:55px;width:55px}.start-lights{display:none}.art-road:before{top:29px}.menu-card{width:100%;padding:20px;gap:13px;border-radius:20px}.menu-card .primary{padding:14px}.game-brand{font-size:10px}.eyebrow{font-size:9px;letter-spacing:1.5px}.panel{padding:22px 15px}.join-panel h1{font-size:28px}#codeBoxes{gap:5px}#codeBoxes span{width:37px;height:49px;font-size:24px}.room-heading h1{font-size:23px}.room-code{font-size:21px;padding:10px;letter-spacing:2px}.room-meta{gap:6px;font-size:10px}.host-controls{gap:6px}.host-controls label{width:100%}.host-controls select,.host-controls button{padding:8px;font-size:11px}.race-hud{gap:8px;min-height:43px}.race-hud strong{font-size:12px}#personalRank{font-size:10px;width:90px}.timer{font-size:29px}.race-screen{gap:7px}.track-wrap{padding:5px 5px 16px;border-radius:12px}.question-panel{padding:9px;border-radius:12px}.answer-grid{grid-template-columns:repeat(2,1fr);gap:8px}.answer-btn{font-size:24px;padding:10px}.question-text{font-size:27px;margin-bottom:7px}.feedback{font-size:9px;margin-top:7px}.results-panel h1{font-size:28px}.podium{height:160px;margin:10px auto}.results-panel .muted{margin-bottom:0}}
@media(max-height:500px){.topbar{height:40px}.brand img{max-height:28px}#app{height:calc(100dvh - 40px);padding:7px 15px}.menu-screen{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr 12px;gap:4px 25px}.menu-heading{text-align:left}.menu-heading h1{font-size:37px;margin:8px 0}.menu-heading p{font-size:12px;margin:5px 0}.menu-card{grid-column:2;grid-row:1/3;padding:15px;gap:9px}.menu-card select{padding:8px}.menu-card .primary{padding:10px}.menu-card button{font-size:12px;padding:8px}.menu-art{width:100%;height:50px}.art-road{height:48px}.art-road #heroAvatar{height:44px;width:44px}.start-lights{display:none}.race-hud{min-height:32px}.race-hud strong{font-size:11px}.timer{font-size:26px}.question-panel{padding:6px 10px}.question-text{font-size:23px;margin-bottom:5px}.answer-grid{grid-template-columns:repeat(4,1fr);gap:7px}.answer-btn{padding:7px;font-size:21px}.feedback{font-size:9px;margin-top:4px;min-height:12px}.race-screen{gap:5px}.room-heading h1{font-size:22px;margin:2px}.room-code{font-size:22px;padding:7px}.room-screen{gap:6px}.host-controls label{width:auto}.host-controls button,.host-controls select{padding:6px}.roster{grid-auto-rows:minmax(28px,1fr)}.panel{padding:12px 20px}.join-panel h1{margin:5px;font-size:24px}.join-panel p{margin:6px}#codeBoxes span{height:40px;width:37px}.code-wrap{margin-top:5px}.results-panel{display:grid;grid-template-columns:1fr 1fr;column-gap:15px;align-items:center}.results-panel>.eyebrow,.results-panel>h1{grid-column:1}.results-panel h1{font-size:23px}.podium{grid-column:2;grid-row:1/6;height:160px;width:100%;margin:0}.results-panel h2{font-size:18px}.result-stats{font-size:11px;gap:10px;margin:7px}.results-actions button,.results-actions a{padding:8px;font-size:12px}.more-link{margin-top:9px}.results-panel>.muted{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.results-panel{max-width:650px}.digit-number{display:inline-flex;align-items:center;vertical-align:middle}.digit-sprite{display:inline-block;width:.85em;height:.85em;background-repeat:no-repeat}.timer .digit-sprite{width:.9em;height:.9em}.answer-btn .digit-sprite{width:.9em;height:.9em}
@media(max-height:350px){.join-panel{padding:8px 18px}.join-panel h1{font-size:22px;margin:4px}.join-panel p{font-size:11px;margin:4px}.join-panel form{gap:5px}.join-panel button{padding:8px 12px}.join-panel .text-button{padding:5px}.code-wrap{margin-top:3px}#codeBoxes span{height:36px}.join-panel .eyebrow{font-size:8px}}

.host-race-actions{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:var(--muted)}.host-race-actions button{padding:3px 8px}

/* Names stay inside each scaled lane; answer controls retain their size. */
.lane-marker{left:var(--name-left,30px);font-size:var(--label-size,10px);line-height:1;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.roster-cell small,.podium-place small{max-width:95%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Local ad placement preview only: no ad scripts or network requests. */
#results{display:block;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
.results-layout{width:min(100%,1000px);min-height:100%;margin:0 auto;display:grid;grid-template-columns:minmax(0,650px) 300px;gap:24px;align-items:center;align-content:center;padding:8px 0 12px}
.results-layout>.results-panel{width:100%;min-width:0;justify-self:center}
.results-ad{width:100%;max-width:300px;justify-self:center;text-align:center;padding:0 0 6px}
.ad-label{display:block;font-size:10px;letter-spacing:.8px;color:var(--muted);margin-bottom:10px}
.ad-placeholder{height:250px;width:100%;display:grid;place-items:center;background:#f7f9fc;border:1px dashed #b8c5d9;border-radius:10px;color:#8899b2;font-size:13px}
@media(max-width:999px){.results-layout{grid-template-columns:minmax(0,1fr);gap:26px;width:min(100%,650px)}.results-ad{margin-top:0}.results-layout>.results-panel{box-shadow:0 10px 25px #17335d14}}

/* Avatar-first main menu. Math remains a compact selector pending final design. */
#menu{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;width:min(100%,400px);max-width:400px;margin:auto}
.menu-avatar-stage{position:relative;width:100%;height:clamp(130px,32vh,270px);display:grid;place-items:center;flex-shrink:1;min-height:90px}
.menu-avatar-stage:after{content:'';position:absolute;bottom:5%;left:20%;right:20%;height:10%;border-radius:50%;background:radial-gradient(ellipse,#9fb4d15c,transparent 70%)}
.menu-avatar-stage #heroAvatar{position:relative;z-index:1;width:clamp(130px,27vh,230px);height:clamp(130px,27vh,230px);max-width:75%;max-height:100%;aspect-ratio:1}
.menu-math{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;font-size:12px;color:var(--muted);font-weight:750}
.menu-math select{padding:10px 34px 10px 13px;min-width:165px;background:#fff}
#quick.play-button{width:100%;min-height:66px;padding:13px 25px;border-radius:17px;border:2px solid #e8ad21;background:linear-gradient(#ffdf59,#ffc533);color:#493308;font-size:30px;font-weight:900;box-shadow:0 5px 0 #d79819,0 9px 18px #d798191c;letter-spacing:.3px}
#quick.play-button:hover{background:linear-gradient(#ffe777,#ffd047);border-color:#d79819}
#quick.play-button:active{transform:translateY(3px);box-shadow:0 2px 0 #d79819}
#showParty.party-button{width:84%;min-height:49px;margin-top:6px;padding:11px 20px;border-radius:14px;background:#315eea;border:2px solid #284fc9;color:#fff;box-shadow:0 3px 0 #2445b5;font-size:17px;font-weight:850}
#showParty.party-button:hover{background:#254fd0}
#menu .game-brand{margin-top:10px;font-size:10px}
.party-panel{width:min(100%,440px)}.party-panel h1{font-size:34px;margin:14px 0 27px}.party-actions{display:grid;gap:14px;margin-bottom:20px}.party-actions button{min-height:58px;font-size:19px}.party-actions #showJoin{background:#edf2ff;border:2px solid #c7d2fe;color:#284fc9}.party-panel .text-button{font-size:13px}
@media(max-width:650px){#menu{max-width:330px;gap:13px}.menu-avatar-stage{height:clamp(120px,29vh,230px)}#quick.play-button{min-height:62px;font-size:28px}#showParty.party-button{font-size:16px}.party-panel h1{font-size:28px}}
@media(max-height:500px){#menu{max-width:300px;gap:7px}.menu-avatar-stage{height:clamp(65px,27vh,120px);min-height:60px}.menu-avatar-stage #heroAvatar{height:100%;width:auto;max-width:75%}.menu-math select{padding:6px 25px 6px 10px;font-size:12px}#quick.play-button{min-height:43px;padding:6px 18px;font-size:24px;border-radius:12px}#showParty.party-button{min-height:35px;padding:6px 14px;font-size:14px;margin-top:3px}#menu .game-brand{margin-top:5px;font-size:9px}.party-panel h1{font-size:26px;margin:8px 0 17px}.party-actions{gap:11px;margin-bottom:10px}.party-actions button{min-height:45px;font-size:17px}}

/* Compact versions of the original race's glossy colored math buttons. */
.math-choices{display:grid;grid-template-columns:repeat(4,66px);gap:14px;padding:6px}
.math-choice{--math-color:#22c55e;position:relative;isolation:isolate;width:66px;height:66px;min-width:0;padding:0;display:grid;place-items:center;border:3px solid transparent;border-radius:17px;background:var(--math-color);color:#fff;font-size:39px;font-weight:900;line-height:1;box-shadow:inset 0 1px 0 #ffffff61,inset 0 -7px 13px #0000001a,0 7px 14px #0f172a1f}
.math-choice[data-math-mode="sub"]{--math-color:#ef4444}.math-choice[data-math-mode="mul"]{--math-color:#3b82f6}.math-choice[data-math-mode="div"]{--math-color:#d946ef}
.math-choice:before{content:'';position:absolute;left:12%;right:12%;top:10%;height:28%;border-radius:999px;background:linear-gradient(#ffffff7a,#ffffff00);pointer-events:none}
.math-choice span{position:relative;z-index:1}
.math-choice:hover{background:var(--math-color);border-color:#ffffff88;transform:translateY(-1px)}
.math-choice[aria-checked="true"]{border-color:#17335d;outline:2px solid #fff;outline-offset:1px;box-shadow:inset 0 1px 0 #ffffff61,inset 0 -7px 13px #0000001a,0 0 0 4px #17335d,0 7px 14px #0f172a1f}
.math-choice:focus-visible{outline:3px solid #f5b735;outline-offset:6px}
@media(max-width:650px){.math-choices{grid-template-columns:repeat(4,58px);gap:13px}.math-choice{width:58px;height:58px;border-radius:15px;font-size:35px}}
@media(max-height:500px){.math-choices{grid-template-columns:repeat(4,42px);gap:14px;padding:5px}.math-choice{width:42px;height:42px;border-radius:12px;font-size:28px;border-width:2px}.math-choice[aria-checked="true"]{box-shadow:inset 0 1px 0 #ffffff61,inset 0 -5px 10px #0000001a,0 0 0 3px #17335d,0 4px 8px #0f172a1f}}

/* Class settings apply to the entire room; choices sit directly above Start. */
#hostControls{flex-direction:column;align-items:stretch;gap:10px}
.host-settings{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}
.host-start-controls{display:flex;flex-direction:column;align-items:center;gap:9px}
.class-math-choices{grid-template-columns:repeat(4,52px);gap:12px;padding:5px}
.host-controls .class-math-choices .math-choice{width:52px;height:52px;padding:0;font-size:33px;border-radius:14px}
.host-start-controls #start{width:min(100%,300px);min-height:42px;font-size:15px}
@media(max-width:650px){.host-settings label{width:auto;font-size:10px}.host-settings{gap:6px}.room-meta{flex-wrap:wrap}#roomMode{font-weight:750;color:var(--blue)}}
@media(max-height:500px){#hostControls{gap:5px}.host-start-controls{gap:5px}.class-math-choices{grid-template-columns:repeat(4,34px);gap:10px;padding:4px}.host-controls .class-math-choices .math-choice{width:34px;height:34px;font-size:23px;border-radius:10px}.host-start-controls #start{min-height:30px;padding:5px 12px;font-size:12px}.host-settings button,.host-settings select{padding:5px 8px}.host-settings{gap:6px}.host-settings label{font-size:10px}}

/* Original race category palette: saturated surround, pale lanes and tinted answers. */
body[data-race-mode="add"]{--race-color:#22c55e;--race-surface:#dcfce7;--race-strong:#bbf7d0;--race-ink:#14532d}
body[data-race-mode="sub"]{--race-color:#ef4444;--race-surface:#fee2e2;--race-strong:#fecaca;--race-ink:#7f1d1d}
body[data-race-mode="mul"]{--race-color:#3b82f6;--race-surface:#dbeafe;--race-strong:#bfdbfe;--race-ink:#1e3a8a}
body[data-race-mode="div"]{--race-color:#d946ef;--race-surface:#f3e8ff;--race-strong:#e9d5ff;--race-ink:#701a75}
body[data-race-mode]{background:var(--race-color)}
body[data-race-mode] .race-hud{background:#ffffffed;border-radius:13px;padding:6px 12px;color:var(--race-ink)}
body[data-race-mode] .race-hud .eyebrow{color:var(--race-ink)}
body[data-race-mode] .host-race-actions{background:#ffffffed;border-radius:8px;padding:3px 8px;color:var(--race-ink)}
body[data-race-mode] .track-wrap,body[data-race-mode] .question-panel{border-color:var(--race-ink)}
body[data-race-mode] .race-lane{background:#f1f5f9}
body[data-race-mode] .race-lane.self{background:var(--race-surface);border-color:var(--race-ink)}
body[data-race-mode] .race-lane.self .lane-marker{color:var(--race-ink)}
body[data-race-mode] .answer-btn{background:linear-gradient(180deg,var(--race-surface),var(--race-strong));border-color:var(--race-color);color:var(--race-ink)}
body[data-race-mode] .answer-btn:hover{background:var(--race-strong);border-color:var(--race-ink)}
body[data-race-mode] .question-text,body[data-race-mode] .countdown span{color:var(--race-ink)}
@media(max-height:500px){body[data-race-mode] .race-hud{padding:3px 9px}body[data-race-mode] .host-race-actions{padding:1px 7px}}
body[data-race-mode] .lane-marker,body[data-race-mode] .lane-finish{color:var(--race-ink)}

/* Ready to Race shares the room's math palette, including live host changes. */
body[data-race-mode] .room-heading .eyebrow,body[data-race-mode] .room-heading h1{color:var(--race-ink)}
body[data-race-mode] .room-heading{background:#ffffffed;border-radius:14px;padding:10px 12px}
body[data-race-mode] .room-code{color:var(--race-ink);border-color:var(--race-color)}
body[data-race-mode] .room-meta{background:#ffffffed;border-radius:10px;padding:6px 10px;color:var(--race-ink)}
body[data-race-mode] #roomMode{color:var(--race-ink)}
body[data-race-mode] .roster-cell{background:var(--race-surface);border-color:var(--race-color)}
body[data-race-mode] .roster-cell.self{background:var(--race-strong);border-color:var(--race-ink)}
body[data-race-mode] .roster-cell small{color:var(--race-ink)}
body[data-race-mode] #hostControls{background:#ffffffed;border-radius:14px;padding:10px}
body[data-race-mode] .host-start-controls #start{background:var(--race-color);border-color:var(--race-ink);color:var(--race-ink);box-shadow:0 3px 0 var(--race-ink)}
body[data-race-mode] .host-start-controls #start:hover{background:var(--race-strong)}
body[data-race-mode] #waitingNote{background:#ffffffed;border-radius:8px;padding:7px 10px;color:var(--race-ink)}
@media(max-width:650px){body[data-race-mode] .room-heading{padding:7px 9px}body[data-race-mode] .room-meta{padding:5px 7px}body[data-race-mode] #hostControls{padding:8px}}
@media(max-height:500px){body[data-race-mode] .room-heading{padding:3px 8px}body[data-race-mode] .room-meta{padding:3px 6px}body[data-race-mode] #hostControls{padding:5px}body[data-race-mode] #waitingNote{padding:3px 7px}}
body[data-race-mode] .roster-cell{background:#ffffffed;border-color:var(--race-surface)}
body[data-race-mode] .roster-cell.self{background:var(--race-surface);border-color:var(--race-ink)}

/* Shared graphic Home action occupies the results panel's top-right corner. */
.results-panel>.results-home-btn{top:12px;right:12px}
.results-panel>.eyebrow{display:block;min-height:32px;padding:5px 48px 0}
.podium-avatar{max-width:100%}
@media(max-width:650px){.results-panel>.results-home-icon{width:44px;height:44px;padding:6px}.results-panel>.results-home-icon img{width:30px;height:30px}.results-panel>.eyebrow{min-height:32px;padding-top:2px}}
@media(max-height:500px){.results-panel>.results-home-icon{width:40px;height:40px;top:8px;right:8px;padding:5px}.results-panel>.results-home-icon img{width:28px;height:28px}.results-panel>.eyebrow{min-height:18px;padding:0}.results-panel .podium{padding-right:30px}}
