/* Small local display subsets; question text and math retain their readable fonts. */
@font-face{font-family:"Zakkerha Arena";font-style:normal;font-weight:700 900;font-display:swap;src:url("../fonts/arena/arena-arabic-heavy.woff") format("woff");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Zakkerha Arena";font-style:normal;font-weight:700 900;font-display:swap;src:url("../fonts/arena/arena-latin-heavy.woff") format("woff");unicode-range:U+0020-024F,U+2000-206F}
/* A fixed dark-crimson arena. Static gloss, no animation or saved-theme changes. */
html:has(>body.duel-shell){background:#23050b;color-scheme:dark!important}
html[data-theme] body.duel-shell{
 --bg:#23050b;--card:#270d16;--soft:#371420;--text:#fff2f4;--heading:#fff7f8;--muted:#ddbdc5;--line:#64313e;
 --brand:#a2d2ff;--on-brand:#11283f;--accent:#a2d2ff;--arena-blue:#a2d2ff;--arena-ink:#11283f;--arena-red:#b5122e;--arena-logo-blue:#2563eb;
 color-scheme:dark;color:var(--text);background:linear-gradient(118deg,#ffffff0a,transparent 28%,#ffb2c00a 48%,transparent 68%),radial-gradient(ellipse at 85% 0%,#ba163e80,transparent 52%),radial-gradient(ellipse at 0% 40%,#920d3540,transparent 55%),linear-gradient(155deg,#1b080f,#490a1d 38%,#290610 72%,#16080d);
 grid-template-rows:auto 1fr auto;align-content:start;
}
html[data-theme] body.duel-shell>.app-viewport-content{grid-row:2}
html[data-theme] body.duel-shell>.site-footer{grid-row:3}
html[data-theme] body.duel-shell>.site-academic-pattern{color:#ffb9c9;opacity:.045;filter:none}
/* A quiet, two-item navbar: back on the physical left, brand on the right. */
html[data-theme] body.duel-shell>header.topbar.container.student-mobile-topbar{
 position:relative;inset:auto;grid-row:1;display:grid;grid-template-columns:1fr 1fr;direction:ltr;align-items:center;
 width:min(1060px,calc(100% - 48px));height:88px;min-height:88px;margin:20px auto 0;padding:10px 20px;
 background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;backdrop-filter:none;
}
html[data-theme] body.duel-shell>header.topbar::after{display:none}
html[data-theme] body.duel-shell>header.topbar .site-brand{grid-column:2;grid-row:1;justify-self:end;position:static;margin:0;padding:0;transform:none;background:none;border:0;border-radius:0;box-shadow:none}
html[data-theme] body.duel-shell>header.topbar .site-brand-copy :is(strong,small){color:var(--text)}
html[data-theme] body.duel-shell>header.topbar .topbar-student-back{grid-column:1;grid-row:1;justify-self:start;position:static;margin:0;width:44px;height:44px;background:var(--card);border:1px solid var(--line);border-radius:14px;color:var(--arena-blue);box-shadow:none;transform:none}
html[data-theme] body.duel-shell>header.topbar .topbar-back-icon{transform:none;stroke:currentColor}
html[data-theme] body.duel-shell .duel-page{
 --duel-accent:#a2d2ff;--duel-deep:#bde0fe;--duel-indigo:#8fbde8;--duel-desk:#74a5d1;
 --duel-good:#319c76;--duel-bad:#c65c7e;--duel-accent-text:#a2d2ff;--duel-indigo-text:#bde0fe;--duel-good-text:#9be2bf;--duel-bad-text:#ffb6cf;
 color:var(--text);
}
html[data-theme] body.duel-shell :is(.duel-panel,.duel-flow-card,.dq-panel){background:var(--card);border:1px solid var(--line);border-radius:22px;color:var(--text);box-shadow:0 15px 32px #0002;filter:none}
html[data-theme] body.duel-shell :is(.duel-flow-card--english,.duel-flow-card--join){background:var(--card);--choice-color:#a2d2ff}
html[data-theme] body.duel-shell .duel-page .duel-button--primary,html[data-theme] body.duel-shell .dq-primary{background:var(--arena-blue);color:var(--arena-ink);border:1px solid var(--arena-blue);box-shadow:none;font-weight:800}
html[data-theme] body.duel-shell .duel-page .duel-button--primary:not(:disabled):hover,html[data-theme] body.duel-shell .dq-primary:not(:disabled):hover{background:#bde0fe;border-color:#bde0fe;color:var(--arena-ink)}
html[data-theme] body.duel-shell :is(.duel-button--secondary,.duel-page .duel-leave,.dq-secondary){background:var(--soft);border:1px solid var(--line);color:var(--text);box-shadow:none}
html[data-theme] body.duel-shell .duel-page .duel-form :is(input,select){background:#210b13;border-color:var(--line);color:var(--text)}
html[data-theme] body.duel-shell :is(.duel-page .duel-pick,.duel-duration-options label>span,.duel-segment-options span){background:#210b13;border:1px solid var(--line);color:var(--text);box-shadow:none}
html[data-theme] body.duel-shell :is(.duel-page .duel-pick[aria-pressed=true],.duel-duration-options input:checked+span,.duel-segment-options input:checked+span){background:var(--arena-blue);color:var(--arena-ink);border-color:var(--arena-blue);box-shadow:none}
html[data-theme] body.duel-shell :is(.duel-pick-symbol,.duel-page .duel-pick[aria-pressed=true] .duel-pick-symbol){color:inherit}
html[data-theme] body.duel-shell :is(.duel-language-glyph,.duel-mode-art,.duel-eyebrow,.duel-flow-card-arrow,.duel-card-index,.duel-choice-kicker){color:var(--arena-blue)}
html[data-theme] body.duel-shell .duel-flow-card-copy small,html[data-theme] body.duel-shell .duel-game-facts{color:var(--muted)}
html[data-theme] body.duel-shell .duel-create-panel::before{background:var(--arena-blue)}
html[data-theme] body.duel-shell :is(.duel-arena-mark b,.duel-panel-icon,.duel-stage-symbol,.duel-flow-card-arrow){background:#1c3550;border-color:#3b6085;color:var(--arena-blue)}
html[data-theme] body.duel-shell :is(.duel-guide,.duel-guide-dialog,.duel-guide-close){background:var(--card);border-color:var(--line);color:var(--text);box-shadow:none}
html[data-theme] body.duel-shell :is(.duel-guide-content,.duel-guide-number){border-color:var(--line)}
html[data-theme] body.duel-shell :is(.duel-guide-mark,.duel-guide-number){background:#1c3550;color:var(--arena-blue)}
html[data-theme] body.duel-shell :is(.duel-guide-dialog header p,.duel-guide-video-note){color:var(--muted)}
/* Hub: shared round settings, followed by exactly three ways to play. */
html[data-theme] body.duel-shell .duel-hub{max-width:1060px;width:calc(100% - 48px);padding:0;margin:30px auto 60px;font-family:"Segoe UI Variable Text","Segoe UI",Tahoma,Arial,sans-serif}
html[data-theme] body.duel-shell :is(.arena-heading h1,.arena-mode-card h2,.arena-button,.duel-room-heading h1,.duel-result-hero h2,.duel-stage h2){font-family:"Zakkerha Arena","Segoe UI",Tahoma,sans-serif;font-weight:900}
.arena-heading{--arena-title-size:clamp(32px,3vw,40px);display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);direction:ltr;align-items:center;gap:20px;margin-bottom:30px}
.arena-title{grid-column:2;grid-row:1;display:grid;justify-items:center;gap:6px;min-width:0;text-align:center}
.arena-eyebrow{display:block;color:#8fbde8;font-size:11px;font-weight:800;letter-spacing:.12em;line-height:1.8}
/* Same typography on both lines; a static blue extrusion echoes the cap logo. */
html[data-theme] body.duel-shell .arena-title>:is(.arena-eyebrow,h1){margin:0;padding:0 4px 8px;font-family:"Zakkerha Arena","Segoe UI",Tahoma,sans-serif;font-size:var(--arena-title-size);line-height:1.35;font-weight:900;font-style:normal;letter-spacing:0;color:#f5f9ff;text-align:center;text-wrap:balance;text-shadow:0 1px 0 #bfdbfe,0 2px 0 #60a5fa,0 3px 0 var(--arena-logo-blue),0 4px 0 #1d4ed8,0 5px 0 #153f9a,0 7px 2px #050b1c8c,0 12px 18px #0005}
.arena-languages{grid-column:1;grid-row:1;justify-self:start;display:flex;align-items:center;gap:6px;flex-shrink:0}
html[dir=rtl] .arena-languages{direction:rtl}
.arena-languages a{min-height:40px;display:grid;place-items:center;padding:8px 13px;border:1px solid transparent;border-radius:11px;color:var(--muted);font-size:13px;font-weight:700;text-decoration:none}
.arena-languages a[aria-current=page]{background:#46202e;border-color:#895163;color:var(--text)}
.arena-settings{display:grid;grid-template-columns:1.2fr 1fr;align-items:end;gap:24px;margin-bottom:26px;padding-bottom:26px;border-bottom:1px solid var(--line)}
.arena-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;min-width:0}
.arena-fields label{display:grid;gap:9px;color:var(--muted);font-size:13px;font-weight:700;min-width:0}
.arena-fields select{width:100%;height:48px;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#270d16;color:var(--text);font:inherit;font-size:14px}
.arena-duration{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border:0;margin:0;padding:0;min-width:0}
.arena-duration legend{margin-bottom:9px;color:var(--muted);font-size:13px;font-weight:700}
.arena-duration label{position:relative;cursor:pointer}
.arena-duration input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.arena-duration span{display:flex;justify-content:center;align-items:center;gap:6px;min-height:48px;padding:8px;border:1px solid var(--line);border-radius:12px;background:#270d16;color:var(--muted);font-size:12px;font-weight:600}
.arena-duration b{font-size:18px;color:var(--text);font-variant-numeric:tabular-nums}
.arena-duration input:checked+span{background:var(--arena-blue);color:var(--arena-ink);border-color:var(--arena-blue)}
.arena-duration input:checked+span b{color:var(--arena-ink)}
.arena-duration input:focus-visible+span{outline:3px solid #d9ecff;outline-offset:4px}
.arena-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.arena-mode-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:26px 22px 22px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,#fff9 0%,#ffffff08 1%,transparent 30%),linear-gradient(155deg,#381421,#210c14 72%);box-shadow:0 16px 36px #0003,inset 0 1px #ffffff0d;overflow:hidden}
.arena-mode-card--bot{border-color:#a44960;background:linear-gradient(145deg,#ffffff12,transparent 35%),linear-gradient(155deg,#58172b,#250b15 78%)}
.arena-mode-card::before{content:"";position:absolute;top:0;inset-inline:24px;height:3px;background:var(--arena-logo-blue);border-radius:0 0 3px 3px;opacity:1;box-shadow:0 0 10px #2563eb55;pointer-events:none}
.arena-card-icon{display:grid;place-items:center;width:58px;height:58px;margin-bottom:22px;border:1px solid #8f4057;border-radius:18px;background:linear-gradient(145deg,#74213b,#411125);color:#ffd2de}
.arena-card-icon svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.arena-card-kicker{margin-bottom:8px;font-size:10px;font-weight:800;letter-spacing:.04em;color:#f1b0c2;line-height:1.8}
html[data-theme] body.duel-shell .arena-mode-card h2{font-size:22px;line-height:1.7;font-weight:900;color:var(--heading);margin:0 0 10px;text-wrap:balance}
html[data-theme] body.duel-shell .arena-mode-card p{font-size:13px;line-height:1.9;color:var(--muted);margin:0 0 24px;text-wrap:pretty}
.arena-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:48px;padding:11px 14px;border:1px solid #e34560;border-radius:13px;background:linear-gradient(180deg,#c81938,var(--arena-red));color:#fff;font:inherit;font-size:14px;line-height:1.6;font-weight:900;text-decoration:none;cursor:pointer;box-shadow:inset 0 1px #ffffff30,0 5px 15px #9d09282e}
.arena-mode-card>.arena-button{margin-top:auto}
.arena-button svg,.arena-resume svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
html[dir=rtl] .arena-button svg,html[dir=rtl] .arena-resume svg{transform:rotate(180deg)}
.arena-button:not(:disabled):hover{background:linear-gradient(180deg,#dc2447,#bd1633);border-color:#ff718b}
.arena-button:disabled{background:#65152b;border-color:#813046;color:#fff;opacity:1;cursor:not-allowed;box-shadow:inset 0 1px #ffffff0a}
.arena-join-form{display:grid;gap:10px;width:100%;margin-top:auto}
.arena-code-label{font-size:11px;font-weight:700;color:var(--muted)}
.arena-code-input{width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:#1c0911;color:var(--text);font:inherit;font-size:15px;letter-spacing:.12em;text-transform:uppercase;text-align:center;box-shadow:none}
.arena-code-input::placeholder{color:#bf94a1;opacity:1}
.arena-resume{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px;padding:14px 18px;border:1px solid #965166;border-radius:14px;background:#4b192b;color:#ffcfdb;font-size:14px;font-weight:700;text-decoration:none}
.arena-profile{max-width:580px;margin-inline:auto}
/* Live rooms and review retain the same blue controls and dark surfaces. */
html[data-theme] body.duel-shell .duel-player{--player-accent:#f2a6bc;background:#361422;border-color:#814357;box-shadow:none}
html[data-theme] body.duel-shell .duel-player.is-me{--player-accent:#a2d2ff;background:#322133;border-color:#766086}
html[data-theme] body.duel-shell .duel-player-avatar{background:#210b13;border-color:var(--line);color:var(--text)}
html[data-theme] body.duel-shell .duel-match-vs{background:var(--arena-blue);color:var(--arena-ink);border-color:var(--bg)}
html[data-theme] body.duel-shell :is(.duel-meta-chip,.duel-round-bar){background:var(--card);border-color:var(--line);color:var(--text)}
html[data-theme] body.duel-shell .duel-invite{background:#361422;border-color:#814357}
html[data-theme] body.duel-shell .duel-page .duel-choice{background:#210b13;border-color:var(--line);color:var(--text);box-shadow:none}
html[data-theme] body.duel-shell .duel-page .duel-choice.is-selected{background:#244c6e;border-color:var(--arena-blue);color:var(--text)}
html[data-theme] body.duel-shell .duel-choice-letter{background:#223b55;color:var(--arena-blue)}
html[data-theme] body.duel-shell .duel-choice.is-selected .duel-choice-letter{background:var(--arena-blue);color:var(--arena-ink)}
html[data-theme] body.duel-shell .duel-countdown [data-duel-countdown-value]{background:#1c3550;color:var(--arena-blue);border-color:#527ea6}
html[data-theme] body.duel-shell .duel-clock{background:#182f48;border-color:#42678b}
html[data-theme] body.duel-shell .duel-clock.is-urgent{background:#3a2231;border-color:#ac5874}
html[data-theme] body.duel-shell .duel-result-scores strong{color:var(--arena-blue)}
html[data-theme] body.duel-shell .duel-result-emblem{background:#1c3550;border-color:#42678b;color:var(--arena-blue)}
html[data-theme] body.duel-shell .duel-result-scores>div{background:#361422;border-color:var(--line)}
html[data-theme] body.duel-shell .duel-result-scores>div.is-winner{background:#1b354e;border-color:#78a9d4}
html[data-theme] body.duel-shell .dq-toast{background:#361422;color:var(--text);border:1px solid #965166;box-shadow:0 12px 35px #0005}
html[data-theme] body.duel-shell .dq-toast :is(a,button){background:var(--arena-blue);color:var(--arena-ink)}
html[data-theme] body.duel-shell .dq-toast.is-matched{border-color:var(--arena-blue)}
html[data-theme] body.duel-shell :is(button,a,input,select,summary):focus-visible{outline:3px solid #c8e5ff;outline-offset:4px}
html[data-theme] body.duel-shell .site-footer{--footer-ink:#f3dae2;--footer-muted:#cda7b3;--footer-line:#64313e;--footer-surface:#23050b;--footer-accent:#a2d2ff;color:#cda7b3}
html[data-theme] body.duel-shell .site-footer a{color:#cda7b3}
html[data-theme] body.duel-shell .site-footer__surface::before{background:linear-gradient(90deg,transparent,#527ea6,transparent)}
@media(max-width:760px){
 html[data-theme] body.duel-shell>header.topbar.container.student-mobile-topbar{width:calc(100% - 32px);height:76px;min-height:76px;margin-top:8px;padding:8px 0}
 html[data-theme] body.duel-shell .duel-hub{width:calc(100% - 32px);margin-top:22px;margin-bottom:42px}
 .arena-heading{--arena-title-size:clamp(26px,7.5vw,32px);grid-template-columns:minmax(0,1fr);gap:16px;align-items:center;margin-bottom:24px}
 .arena-title{grid-column:1;grid-row:1}
 .arena-languages{grid-column:1;grid-row:2;justify-self:center;gap:2px}.arena-languages a{min-height:36px;padding:7px 9px;font-size:11px;border-radius:10px}
 .arena-settings{grid-template-columns:1fr;gap:18px;padding-bottom:22px;margin-bottom:22px}
 .arena-fields{gap:10px}.arena-fields label{font-size:12px}.arena-fields select{font-size:13px;padding-inline:9px}
 .arena-duration span{min-height:44px}
 .arena-modes{grid-template-columns:1fr;gap:16px}
 .arena-mode-card{padding:22px;border-radius:20px}
 .arena-card-icon{width:50px;height:50px;margin-bottom:16px;border-radius:15px}
 .arena-card-icon svg{width:26px;height:26px}
 html[data-theme] body.duel-shell .arena-mode-card h2{font-size:22px}
 html[data-theme] body.duel-shell .arena-mode-card p{margin-bottom:20px}
 .arena-card-kicker{font-size:10px}
}
@media(max-width:350px){.arena-fields{grid-template-columns:1fr}}
@media(forced-colors:active){html[data-theme] body.duel-shell .arena-title>:is(.arena-eyebrow,h1){color:CanvasText;text-shadow:none}.arena-mode-card::before{background:LinkText;box-shadow:none}}
