/* MONSTRERIUM: shared game + arena surfaces. No extra WebGL passes or live blur. */
:root{--mon-ink:#171715;--mon-panel:#20211f;--mon-raised:#2b2c28;--mon-line:#655e4b;--mon-text:#f5eddf;--mon-muted:#c4bdaf;--mon-gold:#e8bb6c;--mon-green:#a5c697}
.play-screen{color:var(--mon-text)}
.play-screen .game-hud{background:linear-gradient(#131411dd,#15161388 78%,transparent);color:var(--mon-text)}
.play-screen .pet-identity,.play-screen .pet-age{color:var(--mon-text);text-shadow:0 1px 3px #0009}
.play-screen .pet-age{opacity:.85}.play-screen .pet-avatar{border:1px solid #c5a367;background:#292a24}
.play-screen .experience-line{color:var(--mon-text)}.play-screen .experience-line>div{background:#4c493b}.play-screen .experience-line i{background:var(--mon-gold)}
.play-screen .need-chip{background:#20211fea;border-color:#716952;color:var(--mon-text);box-shadow:none}.play-screen .need-chip>div{background:#4c493b}.play-screen .need-chip.low{border-color:#e69971;color:#ffccaf}
.play-screen .friends-entry,.play-screen .arena-entry,.play-screen .return-home,.play-screen .place-label{background:#20211fec;color:var(--mon-text);border:1px solid #817052;box-shadow:none;backdrop-filter:none}
.play-screen .friends-entry:hover,.play-screen .arena-entry:hover{background:#38372c}.play-screen .place-dot{background:var(--mon-green)}
.play-screen .action-dock{background:#191a17f5;border:1px solid #73664c;border-bottom:0;box-shadow:0 -8px 24px #0003;border-radius:20px 20px 0 0;backdrop-filter:none}
.play-screen .action-dock button{color:var(--mon-text);background:transparent;border:1px solid transparent;border-radius:13px;min-height:54px}
.play-screen .action-dock button[data-action="train"],.play-screen .action-dock button[data-action="feed"]{background:var(--mon-gold);color:#242016}
.play-screen .action-dock button.selected:not([data-action="train"]):not([data-action="feed"]){background:#38382e;color:var(--mon-text);border-color:var(--mon-gold)}
.play-screen .activity-banner,.play-screen .growth-hint{background:#20211ff2;color:var(--mon-text);border:1px solid #817052;box-shadow:none;backdrop-filter:none}.play-screen .activity-banner span,.play-screen .growth-hint b{color:var(--mon-gold)}
.play-screen .panel-scrim{background:#080906b3;backdrop-filter:none}
.play-screen .game-panel{background:var(--mon-panel);color:var(--mon-text);border:1px solid #76684d;border-radius:20px;box-shadow:0 20px 60px #0007}
.play-screen .game-panel h1,.play-screen .game-panel h2,.play-screen .game-panel h3{color:var(--mon-text)}
.play-screen .game-panel .eyebrow,.play-screen .game-panel .panel-lead,.play-screen .game-panel .small-note{color:var(--mon-muted)}
.play-screen .game-panel .round-button{background:#30312a;border-color:#827457;color:var(--mon-text);min-width:44px;min-height:44px}
.play-screen .menu-grid button,.play-screen .menu-grid .arena-entry,.play-screen .game-panel .training-list button,.play-screen .profile-stats>div,.play-screen .tactic-options button{background:var(--mon-raised);border:1px solid var(--mon-line);color:var(--mon-text);border-radius:13px}
.play-screen .menu-grid button{min-height:56px}.play-screen .panel-menu .menu-grid>.arena-entry,.play-screen .panel-menu>.subtle-link{display:none}
.play-screen .game-panel .primary-button,.play-screen .game-panel .arena-link{background:var(--mon-gold);color:#242016;border:1px solid var(--mon-gold);min-height:44px}
.play-screen .game-panel .secondary-button,.play-screen .game-panel .profile-name{color:var(--mon-text);background:transparent;border-color:#827457;min-height:44px}
.play-screen .game-panel .primary-button:disabled{background:#494b41;color:#c1c1b4;border-color:#616255;opacity:1}
.play-screen .game-panel input,.play-screen .game-panel select{background:#171815;color:var(--mon-text);border-color:#8a7b5d}
.play-screen .game-panel .training-list small,.play-screen .game-panel .training-reward,.play-screen .game-panel .training-details summary{color:var(--mon-muted)}
.play-screen .game-panel .training-list svg,.play-screen .profile-stats svg,.play-screen .game-panel .training-current{color:var(--mon-gold)}
.play-screen .game-panel .training-choices button[aria-pressed="true"]{border-color:var(--mon-gold);background:#373329;box-shadow:inset 3px 0 var(--mon-gold)}
.play-screen .game-panel .training-choices button[aria-pressed="true"] .training-current{font-weight:1000}.training-gain{font-size:12px;color:var(--mon-green);white-space:nowrap}
.play-screen .game-panel .training-details{border-color:var(--mon-line)}.play-screen .game-panel .training-blocked{color:#ffc699}
.play-screen .preparation-item,.play-screen .battle-summary,.play-screen .result-card,.play-screen .combat-skills,.play-screen .profile-journey{background:#2b2c28;color:var(--mon-text);border:1px solid var(--mon-line)}
.play-screen .preparation-item span,.play-screen .battle-summary span,.play-screen .combat-skills p{color:var(--mon-muted)}
.play-screen .preparation-item b{color:var(--mon-text)}.play-screen .preparation-item.missing{border-color:#bd885f}.preparation-threshold{font-size:11px;font-weight:500;color:var(--mon-muted);white-space:nowrap}
.play-screen .tactic-options button[aria-pressed="true"]{border-color:var(--mon-gold);background:#373329}.play-screen .tactic-options small{color:var(--mon-muted)}
.play-screen .game-panel .community-links a,.play-screen .game-panel .site-information-links a{background:transparent;border-color:var(--mon-line);color:var(--mon-muted);border-radius:10px;min-height:44px}
.play-screen .game-panel a,.play-screen .result-card a{color:var(--mon-gold)}
.play-screen :focus-visible{outline:2px solid var(--mon-gold);outline-offset:3px}
/* Match arena chrome without changing camera, timing, combat, or its safe zones. */
.arena-screen{background:#1d1e1b;color:var(--mon-text)}
.arena-screen .arena-header{background:linear-gradient(#171815dd,transparent);color:var(--mon-text)}
.arena-screen .arena-site-links{background:#20211ff5;border-color:#827457}
.arena-screen .fighter-hud>div{background:#20211fe8;border:1px solid #827457;border-radius:12px;backdrop-filter:none}
.arena-screen .fighter-hud .fighter-meter-label,.arena-screen .fighter-tactic{color:var(--mon-muted)}
.arena-screen .arena-footer{background:#171815d9;border-color:#73664c;color:var(--mon-muted)}
.arena-screen .arena-empty:not(.arena-loading){background:#20211fee;border:1px solid #827457;color:var(--mon-text);border-radius:18px}
.arena-screen .arena-empty p{color:var(--mon-muted)}.arena-screen .arena-empty a{color:var(--mon-gold)}
.arena-screen .arena-result{background:#20211fee;border-color:#827457;color:var(--mon-text)}.arena-screen .arena-result strong{color:var(--mon-text)}
.arena-screen .arena-event{background:#20211fe8;border:1px solid #827457;color:var(--mon-gold)}
@media(max-height:600px){.play-screen .game-panel{border-radius:16px}.play-screen .menu-grid button{min-height:48px}.play-screen .action-dock button{min-height:44px}.play-screen .game-panel .training-current{font-size:14px}}

.play-screen .game-panel .combat-skills small,.play-screen .game-panel .profile-journey,.play-screen .game-panel .together-fitness p,.play-screen .game-panel .together-goal{color:var(--mon-muted)}
.play-screen .game-panel .together-goal,.play-screen .game-panel .together-week>div{background:var(--mon-raised);border-color:var(--mon-line)}

.play-screen .game-panel .together-week,.play-screen .game-panel .account-options button{background:var(--mon-raised);border-color:var(--mon-line);color:var(--mon-text)}
.play-screen .game-panel .account-options small,.play-screen .game-panel .together-week p{color:var(--mon-muted)}
.play-screen .game-panel .account-options .danger-option{border-color:#bd806c;color:#ffd0bb}
.play-screen .game-panel .danger-button{background:#944d3a;border-color:#c88e78;color:#fff6ef}
.play-screen .game-panel .together-days li[aria-current]{outline-color:var(--mon-gold)}

@media (max-height:600px) and (orientation:landscape){
 .play-screen .game-panel.panel-training .training-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
 .play-screen .game-panel.panel-training .training-choices button{min-width:0;padding:10px;gap:7px;flex-wrap:wrap;align-content:start}
 .play-screen .game-panel.panel-training .training-choices small{display:none}
 .play-screen .game-panel.panel-training .training-current{width:100%;margin:2px 0 0;font-size:17px}
}

/* Compatibility with the active browser UI adapters; native build uses the same palette. */
:root[data-mon-yard]{--mon-ink:#171715;--mon-surface:#2b2c28;--mon-gold:#e8bb6c;--mon-text:#f5eddf;--mon-muted:#c4bdaf;--mon-edge:#655e4b}
.play-screen .game-panel.game-panel[data-mon-training-ready]{background:#20211f;color:#f5eddf;border-color:#76684d}
.play-screen .game-panel[data-mon-training-ready] :is(.preparation-item,.combat-skills,.combat-skills>div,.round-button,.mon-training-choice,.mon-training-detail){background:#2b2c28;color:#f5eddf;border-color:#655e4b}
.play-screen .game-panel[data-mon-training-ready] :is(.panel-lead,.small-note,.combat-skills small,.eyebrow){color:#c4bdaf}
.play-screen .game-panel[data-mon-training-ready] .mon-training-choice[aria-pressed="true"]{background:#373329;color:#f5eddf;border-color:#e8bb6c}
.play-screen .game-panel[data-mon-training-ready] .mon-training-begin{background:#e8bb6c;border-color:#e8bb6c;color:#242016}
.arena-screen.arena-screen[data-mon-arena-ui] .fighter-hud>div{background:#20211fe8;border-color:#827457}
.arena-screen.arena-screen[data-mon-arena-ui] .arena-footer{background:#171815d9;border-color:#73664c}
.arena-screen.arena-screen[data-mon-arena-ui] .arena-site-links{background:#20211ff5;border-color:#827457}

/* Keep age readable over the yard image despite the older HUD small-text rule. */
.play-screen .game-hud .pet-identity small.pet-age{color:var(--mon-text);opacity:1;text-shadow:0 1px 3px #000c}

/* Tournament entry: one clear route, readable state and optional rules. */
:root[data-mon-yard] .play-screen .tournament-panel{display:grid;gap:14px}:root[data-mon-yard] .play-screen .tournament-panel>h1{margin-bottom:0}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry{margin:0;padding:18px;background:var(--mon-raised);border:1px solid var(--mon-line);border-radius:18px;color:var(--mon-text);box-shadow:none}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry-active{border-color:#a88e58}:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry h2{font-size:20px;line-height:1.25;margin:0 0 8px;color:var(--mon-text)}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry p{color:var(--mon-muted);line-height:1.5}:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry-time{font-size:14px;margin:0 0 16px;font-variant-numeric:tabular-nums}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-open{display:flex;align-items:center;justify-content:center;min-height:48px;margin:0;background:var(--mon-gold);color:#242016;text-decoration:none;text-align:center;font-weight:900;border:1px solid var(--mon-gold);border-radius:14px;padding:12px}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-withdraw{width:100%;min-height:44px;margin-top:8px;background:transparent;color:var(--mon-muted);border:1px solid var(--mon-line);border-radius:12px;padding:10px;font-weight:700}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-rules{border-top:1px solid var(--mon-line);padding-top:14px;color:var(--mon-muted)}:root[data-mon-yard] .play-screen .tournament-panel .tournament-rules summary{min-height:44px;cursor:pointer;font-weight:800;color:var(--mon-text)}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-prizes{display:flex;flex-wrap:wrap;gap:8px}:root[data-mon-yard] .play-screen .tournament-panel .tournament-prizes span{padding:6px 10px;background:#343328;color:var(--mon-text);border:1px solid var(--mon-line);border-radius:10px;font-size:12px}
:root[data-mon-yard] .play-screen .tournament-panel .tournament-rules p{font-size:14px;line-height:1.55;color:var(--mon-muted)}
@media(max-height:600px){:root[data-mon-yard] .play-screen .tournament-panel{gap:10px}:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry{padding:12px}:root[data-mon-yard] .play-screen .tournament-panel .tournament-entry h2{font-size:17px}}

:root[data-mon-arena-ui] .arena-screen .arena-empty.arena-loading{position:fixed!important;inset:auto auto calc(60px + env(safe-area-inset-bottom,0px)) 50%!important;transform:translateX(-50%)!important;width:max-content!important;max-width:calc(100vw - 32px)!important;min-width:0!important;min-height:0!important;height:auto!important;padding:10px 16px!important;margin:0!important;border:1px solid #c6a46b44!important;border-radius:24px!important;background:#191a17ef!important;color:#f5eddf!important;box-shadow:none!important;display:flex!important;align-items:center!important;gap:10px!important;pointer-events:none!important;z-index:20!important}:root[data-mon-arena-ui] .arena-screen .arena-empty.arena-loading>svg{width:18px!important;height:18px!important;margin:0!important;flex:none}:root[data-mon-arena-ui] .arena-screen .arena-empty.arena-loading h1{font-size:13px!important;line-height:1.4!important;margin:0!important;font-weight:500!important;color:inherit!important}

/* Keep foreground and background paired across the legacy and mobile themes. */
.account-screen .account-card .account-tabs button:not([aria-pressed="true"]),
.account-screen .account-card .email-signin button:not(.primary),
.account-screen .account-card .gate-back,
.account-screen .account-card .forgot-link {
  color: #392e38;
  background: #f4f1dd;
  border-color: #9b967f;
}

:is(.account-gate, :root[data-mon-yard="gate"] .account-screen) .account-card .account-tabs button:not([aria-pressed="true"]),
:is(.account-gate, :root[data-mon-yard="gate"] .account-screen) .account-card .email-signin button:not(.primary),
:is(.account-gate, :root[data-mon-yard="gate"] .account-screen) .account-card :is(.gate-back, .forgot-link) {
  color: #f7ecdf;
  background: #302832;
  border-color: #a79199;
}

.account-screen .account-card .email-signin button,
.account-screen .account-card .account-tabs button {
  min-height: 44px;
}

:is(.account-screen .account-card .email-signin, .play-screen .game-panel)
:is(button:disabled, a[aria-disabled="true"]) {
  opacity: 1;
  cursor: default;
}

.account-screen .account-card .email-signin button:disabled {
  color: #4d463e;
  background: #e1dacc;
  border-color: #a69b88;
}

:is(.account-gate, :root[data-mon-yard="gate"] .account-screen) .account-card .email-signin button:disabled {
  color: #e5d6c8;
  background: #494047;
  border-color: #afa299;
}

.play-screen .game-hud .pet-identity > span:last-child {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(24, 23, 20, .92);
  color: #fff3df;
}

:root .play-screen .game-hud .pet-identity small.pet-xp {
  color: #ffd58f;
  opacity: 1;
}

.play-screen .game-panel .tournament-entry {
  color: #fff3df;
  background: #302d25;
}

.play-screen .game-panel .tournament-entry :is(h2, strong, p, time) {
  color: inherit;
}

.play-screen .game-panel .tournament-prizes > :is(b, span) {
  color: #fff3df;
  background: #383327;
  border-color: #b9a271;
}

.play-screen .game-panel .tournament-entry a:not(.tournament-open) {
  color: #ffd58f;
  text-underline-offset: 3px;
}

.play-screen .game-panel .tournament-entry button:not(.primary-button),
.play-screen .game-panel .together-fitness [role="alert"] button {
  min-height: 44px;
  color: #fff3df;
  background: #383327;
  border: 1px solid #b9a271;
  border-radius: 8px;
}

.play-screen .game-panel .tournament-entry button:disabled,
.play-screen .game-panel :is(.together-actions, .friends-panel) button:disabled {
  color: #ded7ca;
  background: #48443c;
  border-color: #aca18f;
}

.play-screen .webgl-fallback {
  color: #332d27;
}

.arena-screen .arena-3d-notice {
  max-width: calc(100vw - 32px);
  text-align: center;
}

.arena-screen .arena-3d-notice span {
  white-space: normal;
}

.arena-screen .arena-3d-notice button,
.arena-screen .live-actions .live-retry,
.sparring-scene-retry button {
  min-height: 44px;
  color: #fff3df;
  background: #392e38;
  border: 1px solid #b9a089;
  border-radius: 8px;
  padding-inline: 12px;
}

.arena-screen .live-actions .live-retry:disabled {
  color: #ded7ca;
  background: #48443c;
  opacity: 1;
  cursor: default;
}

:is(.account-screen .account-card, .play-screen .game-panel, .arena-screen)
:is(button, a, summary):focus-visible {
  outline: 2px solid #ffda94;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #33262c;
}
