/* CHEETAHS / Robot Game: black + copper / final overrides
   Loaded LAST, scoped to body.tools-page .game-rebuild.
   Do not remove the original scoring or timer JavaScript. */
:root { --rg-bg:#0e0b09; --rg-panel:#17110e; --rg-card:#201814; --rg-card2:#261b15; --rg-line:#493226; --rg-soft:#c5ac99; --rg-ink:#fff2e4; --rg-orange:#e99545; --rg-orange-bright:#ffb15d; }
body.tools-page { background:var(--rg-bg); color:var(--rg-ink); }
body.tools-page .tool-main { background:linear-gradient(180deg,#120e0b 0%,#0d0a08 45%,#100c09 100%); }
body.tools-page .tool-hero { background:radial-gradient(ellipse at 70% 0,#352013 0%,#100b08 70%);border-color:#3d281a; }
body.tools-page .tool-hero .display-heading i { color:var(--rg-orange-bright); }
body.tools-page .tool-layout.game-rebuild {
  display:grid; grid-template-columns:minmax(268px,340px) minmax(0,1fr);
  gap:clamp(16px,2vw,28px);align-items:start;
  max-width:1440px;margin-top:30px;
}
body.tools-page .game-rebuild .game-left,body.tools-page .game-rebuild .game-right,
body.tools-page .game-rebuild .mission-panel,body.tools-page .game-rebuild .missions-list {width:100%;max-width:100%;min-width:0;box-sizing:border-box;}
body.tools-page .game-rebuild .game-left {position:sticky;top:94px;align-self:start;}
body.tools-page .game-rebuild .game-right {position:static;}
body.tools-page .game-rebuild .game-left .timer-card,
body.tools-page .game-rebuild .game-left .score-card {
  background:var(--rg-panel); color:var(--rg-ink);border:1px solid var(--rg-line);
  border-radius:20px;box-shadow:none;margin:0 0 16px;padding:22px 20px;
  overflow:hidden;box-sizing:border-box;min-width:0;
}
body.tools-page .game-rebuild .tool-card-heading {color:#b5997f;letter-spacing:1.2px;line-height:1.4;}
body.tools-page .game-rebuild .timer-card .status-dot {color:var(--rg-orange-bright);}
/* The clock must fit INSIDE its own circle and inside the sidebar at every breakpoint. */
body.tools-page .game-rebuild .timer-card .timer-display {
  display:flex;align-items:center;justify-content:center;
  box-sizing:border-box;width:min(100%,212px);height:auto;aspect-ratio:1;
  margin:25px auto 19px;padding:0 9px;
  overflow:hidden;white-space:nowrap;
  border:10px solid #cb7937;border-radius:50%;
  background:radial-gradient(circle at 50% 42%,#2e2018 0%,#1a120e 72%);
  box-shadow:inset 0 0 0 1px #60402a,0 0 0 5px #261a13;
  color:var(--rg-orange-bright);
  font:800 clamp(36px,4vw,53px)/1 'Arial Narrow','Segoe UI',Arial,sans-serif;
  letter-spacing:-2.2px;font-variant-numeric:tabular-nums;
  text-align:center;flex-shrink:0;
}
body.tools-page .game-rebuild .timer-card .timer-display.timer-ended {border-color:#ba5740;color:#ffcbb9;}
body.tools-page .game-rebuild .timer-progress {width:100%;max-width:212px;margin:16px auto 10px;background:#39291f;height:5px;border-radius:10px;}
body.tools-page .game-rebuild .timer-progress div {background:var(--rg-orange);border-radius:10px;}
body.tools-page .game-rebuild .timer-hint {color:#d0b6a0;text-align:center;font-size:13px;line-height:1.55;margin:10px 0 15px;}
body.tools-page .game-rebuild .timer-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0 12px;}
body.tools-page .game-rebuild .timer-actions .btn {
  min-width:0;min-height:43px;display:flex;align-items:center;justify-content:center;
  padding:11px 8px;border-radius:10px;font:700 12px/1.25 'Segoe UI',Arial,sans-serif;
  white-space:normal;box-shadow:none;
}
body.tools-page .game-rebuild .timer-actions #timerPlay {grid-column:span 2;background:var(--rg-orange);border-color:var(--rg-orange);color:#221207;font-size:14px;}
body.tools-page .game-rebuild .timer-actions .btn-dark {background:#2a201b;border:1px solid #654632;color:#ffe9d5;}
body.tools-page .game-rebuild .timer-actions .btn-dark:hover {background:#3a281e;border-color:#a36a42;}
body.tools-page .game-rebuild .timer-actions .btn[aria-pressed="true"] {color:#241208;background:#efae67;border-color:#efae67;}
body.tools-page .game-rebuild .timer-keys {color:#987e6a;font-size:10px;line-height:1.7;text-align:center;margin:12px 0 0;}
body.tools-page .game-rebuild .score-card .score-caption {color:#c9af96;margin:18px 0 0;font-size:11px;}
body.tools-page .game-rebuild .score-card .big-score {display:flex;gap:9px;align-items:baseline;border-color:#594130;}
body.tools-page .game-rebuild .score-card .big-score output {font:900 clamp(67px,7vw,92px)/1 Impact,'Arial Narrow',sans-serif;color:var(--rg-orange-bright);letter-spacing:-2px;}
body.tools-page .game-rebuild .score-card .big-score span {font-size:13px;color:#b39a83;}
body.tools-page .game-rebuild .score-card .score-meter {background:#362920;margin:20px 0;}
body.tools-page .game-rebuild .score-card .score-meter span {background:var(--rg-orange);}
body.tools-page .game-rebuild .score-card .score-breakdown div {border-color:#3b2b24;}
body.tools-page .game-rebuild .score-card .score-breakdown span {color:#bea48f;}
body.tools-page .game-rebuild .score-card .score-breakdown strong {color:#fff3e5;}
body.tools-page .game-rebuild .score-card .score-buttons {display:grid;grid-template-columns:1fr;gap:9px;margin-top:20px;}
body.tools-page .game-rebuild .score-card .score-buttons .btn {min-width:0;width:100%;justify-content:center;border-radius:10px;min-height:42px;padding:10px;}
body.tools-page .game-rebuild .score-card .score-buttons #saveRun {background:var(--rg-orange);border-color:var(--rg-orange);color:#21130c;}
body.tools-page .game-rebuild .score-card .score-buttons #copyScore {background:#2b201b;border:1px solid #63412d;color:#ffe3ca;}
body.tools-page .game-rebuild .rule-note {background:#211710;border:1px solid #4b3022;color:#d3b7a0;border-radius:14px;padding:17px;}
body.tools-page .game-rebuild .rule-note p {color:#bca18b;}
body.tools-page .game-rebuild .rule-note a {color:#ffb15d;}
/* One consistent dark surface for the calculator — never the white paper override. */
body.tools-page .game-rebuild .mission-panel {
  background:#16100d;border:1px solid #4b3023;color:var(--rg-ink);
  border-radius:21px;box-shadow:none;padding:clamp(16px,2.3vw,27px);margin:0;
}
body.tools-page .game-rebuild .mission-panel .tool-card-heading {color:#aa8368;}
body.tools-page .game-rebuild .mission-panel .mission-heading {gap:15px;}
body.tools-page .game-rebuild .mission-panel .mission-heading h2 {color:var(--rg-ink);font-size:clamp(21px,2.3vw,27px);line-height:1.2;}
body.tools-page .game-rebuild .mission-panel .mission-heading p {color:#bda492;font-size:14px;line-height:1.55;}
body.tools-page .game-rebuild .mission-panel .outline-button {color:#eaba89;background:#281b14;border:1px solid #63432e;border-radius:10px;min-height:40px;padding:10px 14px;}
body.tools-page .game-rebuild .mission-panel .outline-button:hover {border-color:#e99545;background:#422b1b;}
body.tools-page .game-rebuild .game-extras {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:20px 0 22px;}
body.tools-page .game-rebuild .game-extra-box {background:var(--rg-card);color:var(--rg-ink);border:1px solid #503627;border-radius:16px;padding:19px;min-width:0;}
body.tools-page .game-rebuild .game-extra-box b {color:#fff0de;font-size:15px;line-height:1.45;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;}
body.tools-page .game-rebuild .game-extra-box output {color:var(--rg-orange-bright);font-size:14px;font-weight:800;}
body.tools-page .game-rebuild .game-extra-box p {color:#ceb49f;font-size:13px;line-height:1.5;margin:12px 0 15px;min-height:0;}
/* Segmented answer controls in both equipment and tokens boxes. */
body.tools-page .game-rebuild .game-extra-box .choice-group {display:flex;flex-wrap:wrap;gap:7px;align-items:center;}
body.tools-page .game-rebuild .game-extra-box .choice-group button {
  appearance:none;-webkit-appearance:none;cursor:pointer;position:relative;
  min-height:43px;min-width:48px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #60412e;border-radius:10px;background:#2e2119;color:#f4dfcc;
  padding:9px 15px;font:750 14px/1.25 'Segoe UI',Arial,sans-serif;
  transition:background .15s,border-color .15s,transform .15s;box-shadow:none;
}
body.tools-page .game-rebuild .game-extra-box .choice-group button:hover {border-color:#de9755;background:#432b1d;transform:translateY(-1px);}
body.tools-page .game-rebuild .game-extra-box .choice-group button.selected,
body.tools-page .game-rebuild .game-extra-box .choice-group button[aria-pressed="true"] {background:var(--rg-orange);border-color:#f7ad65;color:#201006;box-shadow:0 0 0 2px #d8853929;}
body.tools-page .game-rebuild #tokenChoices {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;}
body.tools-page .game-rebuild #tokenChoices button {min-width:0;min-height:42px;padding:6px 0;font-variant-numeric:tabular-nums;}
body.tools-page .game-rebuild #equipmentChoices button {flex:1 1 74px;}
body.tools-page .game-rebuild .mission-jump {display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 12px;}
body.tools-page .game-rebuild .mission-jump button {background:#241914;color:#e8c7aa;border:1px solid #5a3b29;border-radius:8px;font:800 11px Consolas,monospace;min-height:37px;min-width:42px;padding:6px 8px;}
body.tools-page .game-rebuild .mission-jump button:hover {background:#50331e;border-color:var(--rg-orange);color:#fff0de;}
body.tools-page .game-rebuild .mission-toolbar {color:#b5a091;line-height:1.5;margin:12px 0 16px;gap:15px;}
body.tools-page .game-rebuild .mission-toolbar button {color:var(--rg-orange-bright);}
body.tools-page .game-rebuild #missionList {display:grid;gap:12px;}
body.tools-page .game-rebuild #missionList .mission-row.mission-card {background:#211813;border:1px solid #553927;border-radius:16px;box-shadow:none;color:#fff0df;overflow:hidden;}
body.tools-page .game-rebuild #missionList .mission-row.mission-card.is-expanded,
body.tools-page .game-rebuild #missionList .mission-row.mission-card.has-score {border-color:#a36a39;}
body.tools-page .game-rebuild #missionList .mission-card .mission-toggle {color:#fff0df;min-height:83px;padding:12px 14px;gap:12px;}
body.tools-page .game-rebuild #missionList .mission-card .mission-toggle:hover {background:#322116;}
body.tools-page .game-rebuild #missionList .mission-card .mission-thumb {background:#29311e;border:1px solid #5a4f31;border-radius:10px;width:68px;height:60px;flex-basis:68px;}
body.tools-page .game-rebuild #missionList .mission-card .mission-text strong {color:#fff3e3;font-size:clamp(14px,1.6vw,17px);}
body.tools-page .game-rebuild #missionList .mission-card .mission-text small {color:#a9917b;font-size:11px;}
body.tools-page .game-rebuild #missionList .mission-card .mission-code {color:var(--rg-orange-bright);}
body.tools-page .game-rebuild #missionList .mission-card .mission-points {color:var(--rg-orange-bright);}
body.tools-page .game-rebuild #missionList .mission-card .mission-chevron {color:var(--rg-orange-bright);}
body.tools-page .game-rebuild #missionList .mission-card .mission-details {display:block;background:#17110e;border-top:1px solid #513727;padding:20px clamp(14px,2.4vw,27px) 26px;}
body.tools-page .game-rebuild #missionList .mission-card .mission-details[hidden] {display:none!important;}
body.tools-page .game-rebuild #missionList .mission-card .mission-figure {display:block;width:100%;margin:0 0 21px;background:#dbeebc;border:1px solid #584b2c;border-radius:13px;overflow:hidden;}
body.tools-page .game-rebuild #missionList .mission-card .mission-figure img {background:#dfeebc;width:100%;height:auto;max-height:460px;object-fit:contain;}
body.tools-page .game-rebuild #missionList .mission-description {color:#baa18d;font-size:14px;line-height:1.55;margin-bottom:15px;}
body.tools-page .game-rebuild #missionList .mission-questions {display:block;width:100%;min-width:0;padding:0;}
body.tools-page .game-rebuild #missionList .question-block {
  display:block!important;box-sizing:border-box;width:100%;min-width:0;margin:0 0 12px!important;
  padding:17px 18px!important;background:#261c16!important;
  border:1px solid #4e3729!important;border-radius:14px!important;
  color:#f5e5d4;
}
body.tools-page .game-rebuild #missionList .question-block .question-title {color:#f7e9d9;font:750 15px/1.55 'Segoe UI',Arial,sans-serif;gap:11px;margin:0 0 13px;}
body.tools-page .game-rebuild #missionList .question-block .question-number {background:#50301b;color:#ffbe77;border-radius:7px;min-width:28px;min-height:26px;}
body.tools-page .game-rebuild #missionList .question-block .choice-group {display:flex!important;flex-flow:row wrap!important;gap:9px!important;align-items:center;}
body.tools-page .game-rebuild #missionList .question-block .choice-group button {
  appearance:none;-webkit-appearance:none;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;
  min-width:66px;min-height:42px;padding:10px 17px!important;
  color:#efdfcc!important;background:#35271e!important;
  border:1px solid #745038!important;border-radius:9px!important;
  font:750 14px/1.25 'Segoe UI',Arial,sans-serif;
  box-shadow:none!important;transition:background .15s,border-color .15s,transform .15s;
}
body.tools-page .game-rebuild #missionList .question-block .choice-group button:hover {background:#503522!important;border-color:#dd9351!important;transform:translateY(-1px);}
body.tools-page .game-rebuild #missionList .question-block .choice-group button.selected,
body.tools-page .game-rebuild #missionList .question-block .choice-group button[aria-pressed="true"] {background:#e99545!important;color:#23130a!important;border-color:#f0a359!important;box-shadow:0 0 0 2px #e9954521!important;}
body.tools-page .game-rebuild #missionList .question-block .choice-group button.selected::before {content:'✓';font-weight:900;margin-right:6px;}
body.tools-page .game-rebuild #missionList .question-note {color:#b99c82;font-size:12px;}
body.tools-page .game-rebuild #missionList .manual-entry {color:#ffefdc;flex-wrap:wrap;}
body.tools-page .game-rebuild #missionList .manual-entry input {border-radius:8px;background:#35271d;color:#ffefd9;border:1px solid #a16a42;}
body.tools-page .saved-runs .run-row {background:#211713;border-color:#513626;}
body.tools-page .saved-runs .empty-state {color:#c6ae98;}
body.tools-page button:focus-visible {outline:2px solid #ffb35f;outline-offset:3px;}
@media(max-width:1120px){
  body.tools-page .tool-layout.game-rebuild {grid-template-columns:minmax(248px,294px) minmax(0,1fr);gap:16px;}
  body.tools-page .game-rebuild .timer-card .timer-display {width:min(100%,192px);font-size:45px;}
  body.tools-page .game-rebuild .game-extras {grid-template-columns:1fr;}
}
@media(max-width:840px){
  body.tools-page .tool-layout.game-rebuild {display:flex;flex-direction:column;gap:15px;}
  body.tools-page .game-rebuild .game-left {position:static;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:13px;align-items:stretch;}
  body.tools-page .game-rebuild .game-left .timer-card,body.tools-page .game-rebuild .game-left .score-card{margin-bottom:0;}
  body.tools-page .game-rebuild .rule-note {grid-column:1/-1;}
  body.tools-page .game-rebuild .game-extras {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:610px){
  body.tools-page .game-rebuild .game-left {display:flex;flex-direction:column;gap:0;}
  body.tools-page .game-rebuild .game-left .timer-card,body.tools-page .game-rebuild .game-left .score-card {margin-bottom:14px;}
  body.tools-page .game-rebuild .timer-card .timer-display {width:min(100%,212px);font-size:48px;}
  body.tools-page .game-rebuild .mission-panel {padding:15px;border-radius:16px;}
  body.tools-page .game-rebuild .game-extras {grid-template-columns:1fr;}
  body.tools-page .game-rebuild .mission-panel .mission-heading{align-items:start;flex-direction:column;}
  body.tools-page .game-rebuild #missionList .mission-card .mission-toggle{padding:11px 9px;gap:7px;}
  body.tools-page .game-rebuild #missionList .mission-card .mission-thumb{width:53px;height:50px;flex-basis:53px;}
  body.tools-page .game-rebuild #missionList .mission-card .mission-text strong{font-size:13px;}
  body.tools-page .game-rebuild #missionList .mission-card .mission-points{font-size:12px;}
  body.tools-page .game-rebuild #missionList .mission-card .mission-details{padding:13px 12px 18px;}
  body.tools-page .game-rebuild #missionList .question-block{padding:14px 12px!important;}
  body.tools-page .game-rebuild #missionList .question-block .question-title{font-size:14px;}
  body.tools-page .game-rebuild #missionList .question-block .choice-group button{font-size:13px;min-width:58px;padding:10px 12px!important;}
  body.tools-page .game-rebuild #tokenChoices {grid-template-columns:repeat(7,minmax(0,1fr));}
}
@media(prefers-reduced-motion:reduce){body.tools-page .game-rebuild .choice-group button{transition:none!important;}body.tools-page .game-rebuild .choice-group button:hover{transform:none!important;}}
/* Keep original timer fullscreen feature, styled within screen bounds. */
body.tools-page .game-rebuild .timer-card:fullscreen {background:#130d09;color:#fff0df;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:clamp(14px,5vw,50px);}
body.tools-page .game-rebuild .timer-card:fullscreen .timer-display {width:min(64vw,54vh,420px);height:auto;aspect-ratio:1;font-size:clamp(44px,8vw,100px);border-width:clamp(9px,2vw,17px);margin:14px auto;}
body.tools-page .game-rebuild .timer-card:fullscreen .timer-progress {width:min(72vw,550px);max-width:none;}
