/* The navigation, account controls and tool pages share the same dark brass finishes. */
:root {
  --studio-paper: #f5f1e9;
  --studio-muted: #bfbbb4;
  --studio-gold: #ffe1a5;
  --studio-button: #3a3023;
  --studio-edge: #7b6345;
  --studio-panel: linear-gradient(140deg,#222324,#1a1b1d 70%);
  --studio-rule: #40403e;
}
body:is(.fn-site,.fn-home) {background-color:#111214;color:var(--studio-paper)}
body .fn-topbar {background:#141516;border-bottom:1px solid #383733}
body .fn-nav-group[data-current]>summary {color:var(--studio-gold);border-color:#e6bd7a}
body .fn-topbar .fn-nav-links {border-radius:14px;background:#202122;border-color:#45413c}
body .fn-topbar .fn-nav-links a:is(:hover,:focus-visible,[aria-current]) {background:#383026;color:var(--studio-gold)}
body .studio-footer {
  width:100%;box-sizing:border-box;margin:0;padding:22px clamp(18px,4vw,68px);
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 26px;
  border:0;border-top:1px solid #353532;background:#121315;
  font:500 .84rem/1.45 Inter,system-ui,sans-serif;color:var(--studio-muted);text-align:left;
}
.studio-footer p {margin:0;color:var(--studio-muted);font:inherit}
.studio-footer nav {display:flex;flex-wrap:wrap;gap:0 20px}
body .studio-footer nav a {display:inline-flex;align-items:center;min-height:38px;padding:0;margin:0;color:#d9d5cb;text-decoration:none;font:inherit}
body .studio-footer nav a:is(:hover,:focus-visible,[aria-current]) {color:var(--studio-gold);text-decoration:underline;text-underline-offset:4px}
#stage.playing ~ .studio-footer {display:none}
.studio-credit {margin:22px 0 0;font-size:.8rem;color:var(--studio-muted)}
body .studio-mast {
  position:relative;isolation:isolate;box-sizing:border-box;max-width:none;
  min-height:clamp(154px,17vw,224px);padding:clamp(22px,3.4vw,52px);
  margin-block:0 clamp(20px,2.4vw,36px);border:1px solid #45413a;border-radius:18px;
  background:linear-gradient(106deg,#202121 20%,#23221f 68%,#2d2821);
}
body .studio-mast::before {
  content:"";position:absolute;z-index:-1;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(ellipse at 85% -30%,#e8ca9d16,transparent 64%);
}
body .studio-mast :is(h1,h2) {color:var(--studio-paper);letter-spacing:-.05em;line-height:1.04}
body .studio-mast :is(p,.intro-copy) {max-width:min(65%,70ch);color:#d5cfc4}
body .studio-mast.lobby-heading {align-items:flex-start;flex-direction:column}
body .studio-mast .lobby-shortcuts {position:relative}
body :is(.fn-guide-card,.scenario-card,.board-panel,.uni-panel,.conv-layout>.panel,.gear-card,.practice-choice,.fn-account-card,.legal-content,.account-preference-panel) {
  border-radius:15px;border-color:var(--studio-rule);background-color:#1c1d1f;
}
body .fn-guide-card {background:var(--studio-panel);box-shadow:inset 0 1px #ffffff06}
.fn-site .scenario-card {background:linear-gradient(155deg,#242528,#1a1b1d 72%);border-color:#43423f;border-radius:14px;overflow:hidden}
.fn-site .scenario-card .scenario-meta {padding:16px 17px 19px}
body :is(.scenario-card,.fn-guide-card,.gear-card,.practice-choice):is(:hover,:focus-visible) {border-color:#9d8259;box-shadow:0 6px 20px #0003}
body :is(.bench-summary,.player-card-stats,.result-benchmarks) dd,body :is(.board-panel,.uni-results,.conv-output) {font-variant-numeric:tabular-nums}
body .updates-list .update-entry {padding:clamp(18px,3vw,32px);border-radius:14px;background:var(--studio-panel);border:1px solid #3b3b38}
body .updates-list .update-entry+.update-entry {margin-top:12px}
body .update-entry:first-child {border-color:#746147}
body .pause-content,body .ready-content,body .round-report .result-hero {border-radius:16px;border-color:#645442;background-color:#1a1b1e}
body .round-report .result-total strong {color:#f9daa1;font-variant-numeric:tabular-nums}
/* Common action finish. Selectors target controls, leaving interactive training surfaces unstyled. */
body :is(.studio-action,.fn-account-button,.primary-button,.fn-button,.fn-plan-btn,.lab-button,.routine-button,.button,.btn,.action,.board-quiet,.button-outline,.editorial-action,.account-menu-trigger,.guide-primary,.studio-file-action) {
  background:var(--studio-button)!important;color:var(--studio-gold)!important;border:1px solid var(--studio-edge)!important;border-radius:9px;
  text-shadow:none;box-shadow:inset 0 1px #fff4d20c;
}
body :is(.studio-action,.fn-account-button,.primary-button,.fn-button,.fn-plan-btn,.lab-button,.routine-button,.button,.btn,.action,.board-quiet,.button-outline,.editorial-action,.guide-primary):is(:hover,:focus-visible):not(:disabled) {background:#4b3c29!important;border-color:#ae8a56!important;color:#fff0d0!important}
body :is(.studio-action,.fn-account-button,.primary-button,.fn-button,.lab-button,.button,.btn,.action):is(.selected,.active,[aria-pressed="true"],[aria-selected="true"]) {background:#5c492c!important;color:#fff1ce!important;border-color:#e4b775!important}
body :is(.studio-action,.fn-account-button,.studio-file-action):disabled {opacity:1!important;background:#302d28!important;color:#c7bcaa!important;border-color:#59534a!important;cursor:not-allowed;box-shadow:none}
body :is(.studio-action,.fn-account-button).danger {border-color:#bc9277!important}
body :where(a,button,select,input,textarea,summary):focus-visible {outline:2px solid #ffde9f;outline-offset:3px}
body .community-contact {display:flex;align-items:center;gap:16px;margin-top:16px;padding:19px clamp(18px,3vw,32px);border:1px solid #66563e;border-radius:15px;color:var(--studio-gold);background:linear-gradient(100deg,#322d25,#211f1e);font-weight:650;text-decoration:none}
.community-contact .contact-arrow {margin-inline-start:auto;font-size:1.35rem}
.mail-mark {display:inline-block;position:relative;width:23px;height:16px;border:1.7px solid currentColor;border-radius:3px;overflow:hidden}
.mail-mark::before {content:"";position:absolute;width:14px;height:14px;left:2.5px;top:-8px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
body .community-contact:is(:hover,:focus-visible){background:#3a3124}
body.fn-site .fn-page.v72-contact-wrap {display:block;width:min(100%,800px);min-width:0;margin-inline:auto;box-sizing:border-box}
body.fn-site .fn-page .v72-contact-card {box-sizing:border-box;width:100%;border:1px solid #4d463a;border-radius:19px;padding:clamp(18px,4vw,42px);background:linear-gradient(152deg,#242420,#1a1b1d 36%)}
.v72-contact-card h1 {font-size:clamp(32px,4.5vw,56px);letter-spacing:-.055em;line-height:1.05;margin:0 0 28px}
body .v72-contact-card :is(input,textarea,select) {border-color:#514e47;border-radius:8px}
.v72-contact-card label {color:#dfdbd2}
body .photo-picker {display:flex;align-items:center;gap:12px;min-width:0;padding:8px;border:1px solid #57534b;border-radius:10px;background:#161719}
.photo-picker-control {position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--studio-edge);border-radius:7px;background:var(--studio-button);color:var(--studio-gold);font-weight:650}
#account-profile-form .photo-picker input[type=file] {position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
.photo-picker-control:focus-within {outline:2px solid #ffde9f;outline-offset:3px}
.photo-picker-control:has(input:disabled) {border-color:#59534a;background:#302d28;color:#c7bcaa}
#photo-selection {min-width:0;overflow-wrap:anywhere;color:#d2cabe;font-size:.9rem}
#photo-selection [hidden] {display:none}
#account-profile-form .fn-account-button {padding:10px 16px;min-height:44px;font-weight:650}
@media(max-width:760px){
  body .studio-mast {min-height:124px;padding:22px 17px}
  body .studio-mast::before {opacity:.57}
  body .studio-mast :is(p,.intro-copy){max-width:100%}
  body .studio-footer {padding-block:16px;align-items:flex-start;flex-direction:column}
  .studio-footer nav {gap:0 15px}
}
/* Keep scores, timing and controls readable at the edge of the play area. */
.game-hud .hud-timer,.game-hud .hud-stat {font-variant-numeric:tabular-nums}
.game-hud .hud-timer {border-bottom:2px solid #bea171;border-radius:0 0 10px 10px}
#game-shell .ready-tools,#game-shell .ready-stage {border-color:#564b39}
#game-shell .ready-stage {background:linear-gradient(135deg,#272824ee,#181a1eef)}
#game-shell .ready-tools {background:#1d1f21ed}
#game-shell .ready-stage h2 {letter-spacing:-.055em}
body .community-page h1 {color:var(--studio-paper);letter-spacing:-.065em}
.community-page .social-card {border-radius:17px}
.fn-site .uni-panel,.fn-site .board-panel,.fn-site .bench-summary>div {background:var(--studio-panel);border-color:#45423c}
body .studio-action[aria-current="page"] {border-color:#e4b775!important}
@media(prefers-reduced-motion:reduce){.studio-action,.community-contact{transition:none}}
