/* SANDORITHM arena: original branding, local Manrope/Inter, mobile-first. */
.nav{grid-template-columns:repeat(9,minmax(0,1fr))}
.battle-shell{max-width:1100px;margin:auto;color:#163c5b}
.battle-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px;border-radius:22px;background:linear-gradient(125deg,#07365f,#125b91);color:white;margin-bottom:18px;box-shadow:0 12px 30px #07365f20}
.battle-hero h2{color:white;margin:6px 0 10px;font-size:clamp(1.65rem,1.3rem + 1.3vw,2.2rem)}
.battle-hero p{color:#e1effa;margin:0;max-width:620px;font-size:1rem;line-height:1.65}
.battle-kicker{font-size:.75rem;font-weight:750;letter-spacing:.12em;color:#ffe293}
.battle-emblem{flex-shrink:0;display:grid;place-items:center;width:94px;height:94px;border-radius:24px;border:1px solid #ffffff50;background:#ffffff12;font-family:var(--font-heading);font-size:2.1rem;font-weight:800;color:#ffe293;transform:rotate(-6deg)}
.battle-card{padding:22px;border:1px solid #d5e3ee;border-radius:20px;background:#fff;box-shadow:0 5px 22px #153e5d08;margin-bottom:18px}
.battle-card h3{margin:0 0 10px;color:#123957}
.battle-note{color:#516d83;font-size:.9375rem;line-height:1.7;margin:8px 0 16px}
.battle-modes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0}
.battle-mode{display:flex;flex-direction:column;gap:3px;align-items:center;border:1px solid #c5d7e5;border-radius:14px;background:#f5f9fc;color:#234e70;padding:14px 6px;min-height:76px;cursor:pointer}
.battle-mode strong{font-family:var(--font-heading);font-size:1.25rem;line-height:1.35}
.battle-mode small{font-size:.75rem;color:#526e85}
.battle-mode[aria-pressed=true]{color:#07365f;background:#fff2bd;border:2px solid #b58209;padding:13px 5px;box-shadow:0 3px 12px #e6b74625}
.battle-mode:disabled{opacity:.65;cursor:default}
.battle-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.battle-settings label{display:block;font-size:.875rem;font-weight:650;color:#34556e;margin-bottom:5px}
.battle-settings select{width:100%;min-width:0;min-height:46px;font-size:1rem;color:#214665;background:#f7fafc;border:1px solid #c7d9e7;border-radius:10px;padding:10px}
.battle-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}
.battle-status{display:flex;align-items:center;gap:9px;font-size:.9375rem;font-weight:650;color:#31556f;line-height:1.6;margin-bottom:12px;overflow-wrap:anywhere}
.battle-status-dot{width:9px;height:9px;flex-shrink:0;border-radius:50%;background:#168462}
.battle-status.offline .battle-status-dot{background:#ac6c09}
.battle-queue{text-align:center;padding:22px 10px}
.battle-queue-count{font-family:var(--font-heading);font-size:2.5rem;font-weight:800;line-height:1.2;color:#0b5c96;margin:12px 0}
.battle-wait-bar{height:8px;background:#e7eff5;border-radius:20px;max-width:380px;margin:18px auto;overflow:hidden}
.battle-wait-bar span{display:block;height:100%;background:linear-gradient(90deg,#1678b8,#e1ac21);transition:width .4s}
.battle-live-meta{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin:0 0 16px;color:#466780;font-size:.875rem}
.battle-scoreboard{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:stretch;margin-bottom:18px}
.battle-team{min-width:0;background:#f1f7fc;border:1px solid #bbd5e8;border-radius:18px;padding:16px}
.battle-team.team-b{background:#fff8ed;border-color:#ead7ad}
.battle-team-head{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}
.battle-team-head h3{font-size:1rem;margin:0;color:#1d506f}
.team-b .battle-team-head h3{color:#735519}
.battle-team-total{font-family:var(--font-heading);font-size:1.7rem;font-weight:800;color:#104a74;line-height:1.2;white-space:nowrap}
.team-b .battle-team-total{color:#735519}
.battle-player{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #c8ddec;font-size:.875rem;line-height:1.5}
.team-b .battle-player{border-color:#eadcbf}
.battle-player-name{overflow-wrap:anywhere;font-weight:650}
.battle-player small{display:block;font-weight:400;color:#587387;font-size:.75rem}
.battle-player b{font-size:1rem;white-space:nowrap}
.battle-roster summary{font-size:.8125rem;color:#3c607a;cursor:pointer;min-height:36px;line-height:1.6;padding:7px 0}
.team-b .battle-roster summary{color:#735519}
.battle-roster summary:focus-visible{outline:3px solid #126aa6;outline-offset:3px;border-radius:5px}
.battle-vs{display:grid;align-content:center;font-family:var(--font-heading);font-weight:800;color:#49677f;font-size:.875rem}
.battle-round-head{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:.9375rem;font-weight:650;color:#416780}
.battle-clock{display:inline-flex;align-items:center;justify-content:center;min-width:62px;min-height:44px;border-radius:12px;background:#e6f2fb;color:#0a5288;font-variant-numeric:tabular-nums;font-size:1.25rem;font-weight:800}
.battle-clock.urgent{background:#fff0de;color:#9c5208}
.battle-question{font-family:var(--font-heading);font-size:clamp(1.375rem,1.15rem + 1vw,1.75rem);line-height:1.5;font-weight:650;color:#153e5d;margin:20px 0;overflow-wrap:anywhere}
.battle-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.battle-choice{display:flex;align-items:flex-start;text-align:left;gap:12px;padding:15px;border:1px solid #bdd4e5;border-radius:14px;background:#f8fbfd;color:#163d5b;font-size:1rem;line-height:1.6;min-height:56px;overflow-wrap:anywhere;cursor:pointer}
.battle-choice-letter{display:grid;place-items:center;background:#e4eef6;border-radius:8px;color:#315c7e;width:28px;height:28px;flex-shrink:0;font-size:.875rem;font-weight:750}
.battle-choice:disabled{cursor:default;opacity:.8}
.battle-choice.selected{background:#fff2bf;border:2px solid #b88818;padding:14px;color:#513e15;opacity:1}
.battle-choice:focus-visible,.battle-mode:focus-visible{outline:3px solid #126aa6;outline-offset:3px}
.battle-feedback{min-height:24px;color:#486a83;font-size:.9375rem;line-height:1.6;margin-top:16px}
.battle-review{background:#f4f8fb;border-radius:14px;padding:16px;margin-top:20px;border:1px solid #d4e3ee;color:#375b76;font-size:.9375rem;line-height:1.7;overflow-wrap:anywhere}
.battle-review p{margin:6px 0}
.battle-countdown{text-align:center;padding:24px 10px}
.battle-countdown strong{display:block;font-family:var(--font-heading);font-size:3.5rem;color:#0e6197;line-height:1.2;margin:12px}
.battle-result-banner{text-align:center;padding:20px 10px}
.battle-result-banner h3{font-size:2rem;margin:8px 0;color:#125a88}
.battle-result-score{font-family:var(--font-heading);font-size:2.5rem;font-weight:800;color:#1e527a}
.battle-review-list details{border-top:1px solid #dbe6ee;padding:14px 0;font-size:.9375rem;line-height:1.7;color:#365a75;overflow-wrap:anywhere}
.battle-review-list summary{cursor:pointer;font-weight:650;min-height:32px}
.battle-review-list p{margin:8px 0}
.battle-nav-badge{display:inline-block;width:6px;height:6px;background:#d79808;border-radius:50%;vertical-align:middle;margin-left:4px}
.battle-confirm{display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#fff4dc;border:1px solid #e8cc90;padding:14px;border-radius:12px;margin-top:12px;color:#674d19;font-size:.9375rem;line-height:1.6}
.battle-confirm span{flex:1 1 240px}
.battle-shell [hidden]{display:none!important}
@media(min-width:900px){
  .battle-playing{display:grid;grid-template-columns:minmax(280px,.75fr) minmax(0,1.25fr);gap:18px;align-items:start}
  .battle-playing .battle-live-meta{grid-column:1/-1;margin:0}
  .battle-playing .battle-scoreboard{grid-column:1;grid-row:2;margin:0}
  .battle-playing #battleQuestionCard{grid-column:2;grid-row:2;margin:0}
  .battle-playing>.battle-actions,.battle-playing>.battle-confirm{grid-column:2;margin:0}
}
@media(max-width:1100px) and (min-width:601px){.nav{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:600px){
  .battle-hero{padding:20px;gap:12px}.battle-emblem{width:58px;height:68px;border-radius:16px;font-size:1.5rem}
  .battle-card{padding:18px 14px}.battle-settings{grid-template-columns:1fr;gap:12px}
  .battle-modes{gap:5px}.battle-mode{padding:12px 2px;min-height:68px}.battle-mode[aria-pressed=true]{padding:11px 1px}
  .battle-mode strong{font-size:1rem}.battle-mode small{font-size:.6875rem}
  .battle-scoreboard{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.battle-vs{display:none}
  .battle-team{padding:12px 9px;border-radius:14px}.battle-team-head{align-items:flex-start;flex-direction:column;gap:5px}
  .battle-team-head h3{font-size:.875rem}.battle-team-total{font-size:1.5rem}
  .battle-player{gap:5px;grid-template-columns:minmax(0,1fr) auto}.battle-player-name{font-size:.8125rem}.battle-player b{font-size:.875rem}
  .battle-choices{grid-template-columns:1fr}.battle-hero h2{font-size:1.5rem}.battle-hero p{font-size:.9375rem}
  .battle-actions .btn{flex:1 1 140px}.battle-confirm .btn{flex:1}
  .in-match .battle-hero{padding:14px 18px;gap:10px}
  .in-match .battle-hero p{display:none}
  .in-match .battle-hero h2{font-size:1.25rem;margin:5px 0 0}
  .in-match .battle-kicker{font-size:.625rem;letter-spacing:.07em}
  .in-match .battle-emblem{width:44px;height:44px;font-size:1.125rem;border-radius:12px}
}

/* Direct-entry answers use readable text and keep units outside the field. */
.battle-supply{display:grid;gap:10px;min-width:0}
.battle-supply label{font-weight:650;font-size:1rem;color:#214e70;overflow-wrap:anywhere}
.battle-supply input{box-sizing:border-box;width:100%;min-width:0;min-height:52px;padding:12px 14px;font-family:var(--font-body);font-size:1rem;line-height:1.6;border:1px solid #bdd4e5;border-radius:12px;background:#f8fbfd;color:#163d5b}
.battle-supply input:focus-visible{outline:3px solid #126aa6;outline-offset:2px}
.battle-supply input:disabled{opacity:.8}
.battle-supply .btn{justify-self:start;min-height:46px}
.battle-supply small{font-size:.875rem;line-height:1.6;color:#516d83}
.battle-question-type{font-size:.8125rem;font-weight:700;color:#476982;margin-top:12px}
@media(max-width:600px){.battle-supply .btn{width:100%}}
