/* The user-selected menu palette/materials applied to the existing legacy UI.
   Presentation only: no positions, combat controls, transactions or account rules. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-menu-info-art='ready'] {
  --theme-ink: #f4e5be;
  --theme-muted: #cfbea0;
  --theme-gold: #efd18b;
  --theme-edge: #8b744a;
  --theme-surface: #10171b;
  --theme-raised: #25251e;
  --mi-selected-bg: #24251f;
  --mi-selected-ink: #f3deb1;
  --mi-selected-edge: #b89e69;
  --mi-selected-image: linear-gradient(#b4954a18, #b4954a08), var(--mi-art-stone);
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-menu-info-art='ready'] :is(#attribute-panel-dialog, #skill-modal, #talent-modal, #run-reward-dialog, #curse-dialog, #shop-modal, #player-commands-dialog, #player-changelog, #community-group).mi-legacy-surface {
  --mi-ink: #f4e5be; --mi-muted: #cfbea0; --mi-gold: #efd18b; --mi-line: #8b744a;
  box-sizing: border-box;
  background: #0d1418 var(--mi-art-stone) repeat;
  border: 12px solid transparent;
  border-image: var(--mi-art-frame) 40 / 12px / 0 stretch;
  border-radius: 0;
  color: var(--mi-ink);
  box-shadow: 0 14px 35px #000b;
  font-family: 'RD Menu Serif', 'Microsoft YaHei', serif;
}
:root[data-menu-info-art='ready'] :is(#attribute-panel-dialog, #run-reward-dialog, #curse-dialog, #player-commands-dialog).mi-legacy-surface { padding: 8px; }
:root[data-menu-info-art='ready'] :is(#attribute-panel-dialog, #skill-modal, #talent-modal, #run-reward-dialog, #curse-dialog, #shop-modal, #player-commands-dialog, #player-changelog, #community-group).mi-legacy-surface :is(button, summary) { font-family: 'RD Menu Serif', 'Microsoft YaHei', serif; }
:root[data-menu-info-art='ready'] :is(#attribute-panel-dialog, #skill-modal, #talent-modal, #run-reward-dialog, #curse-dialog, #shop-modal, #player-commands-dialog, #player-changelog, #community-group).mi-legacy-surface button:where(:not(.shop-item, .attribute-panel-pin, .talent-card)) {
  box-sizing: border-box; min-height: 44px; min-width: 44px;
  border: 7px solid transparent;
  border-image: var(--mi-art-neutral) 12 / 7px / 0 stretch;
  border-radius: 0; background: #11191b var(--mi-art-stone) center / 180px;
  color: var(--mi-ink); box-shadow: none;
}
:root[data-menu-info-art='ready'] .mi-legacy-surface button:disabled { opacity: .5; filter: saturate(.25); }
:root[data-menu-info-art='ready'] .mi-legacy-surface button:is(:active, [data-theme-pressed='true']):not(:disabled) { filter: brightness(.8); }
:root[data-menu-info-art='ready'] :is(#attribute-panel-dialog, #skill-modal, #talent-modal, #run-reward-dialog, #curse-dialog, #shop-modal, #player-commands-dialog, #player-changelog, #community-group).mi-legacy-surface button[aria-pressed='true']:not(:disabled) { background-image: none; background-color: #554021; color: #ffe4a1; }
:root[data-menu-info-art='ready'] .mi-legacy-surface :focus-visible { outline: 2px solid #8cddf6; outline-offset: 2px; }
:root[data-menu-info-art='ready'] .mi-legacy-surface ::selection { background: #edd08c; color: #10171c; }
:root[data-menu-info-art='ready'] .mi-legacy-surface * { scrollbar-color: #b3975f #12191d; scrollbar-width: thin; }
:root[data-menu-info-art='ready'] :is(#attribute-panel-dialog, #skill-modal, #talent-modal, #run-reward-dialog, #curse-dialog, #shop-modal, #player-commands-dialog).mi-legacy-surface :is(header, .talent-header, .shop-header, #attribute-panel-header) {
  background: transparent; border-color: var(--mi-line); color: var(--mi-gold);
}
:root[data-menu-info-art='ready'] .mi-legacy-surface :is(h2, #skill-modal-title, #talent-modal-title, #attribute-panel-title, #shop-title) { color: var(--mi-gold); font-family: 'RD Menu Serif', 'Microsoft YaHei', serif; font-size: clamp(17px, 2.5vw, 24px); line-height: 1.4; }
:root[data-menu-info-art='ready'] #attribute-panel-dialog.mi-legacy-surface :is(#attribute-panel-navigation, #attribute-panel-note) { background: transparent; border-color: var(--mi-line); }
:root[data-menu-info-art='ready'] #attribute-panel-dialog.mi-legacy-surface .attribute-panel-group { background: transparent; border-color: var(--mi-line); border-radius: 0; }
:root[data-menu-info-art='ready'] #attribute-panel-dialog.mi-legacy-surface :is(.attribute-panel-group-title, .attribute-panel-value) { color: var(--mi-gold); }
:root[data-menu-info-art='ready'] #attribute-panel-dialog.mi-legacy-surface :is(.attribute-panel-label, .attribute-panel-detail, #attribute-panel-hero, #attribute-panel-note) { color: var(--mi-muted); }
:root[data-menu-info-art='ready'] #talent-modal.mi-legacy-surface .talent-card { background: #10171b var(--mi-art-stone) repeat; border: 7px solid transparent; border-image: var(--mi-art-panel) 48 / 7px / 0 stretch; border-radius: 0; color: var(--mi-ink); }
:root[data-menu-info-art='ready'] #talent-modal.mi-legacy-surface .talent-card-btn { background: #11191b var(--mi-art-stone) center / 180px; border-image: var(--mi-art-neutral) 12 / 7px / 0 stretch; border-radius: 0; color: var(--mi-gold); }
:root[data-menu-info-art='ready'] #skill-modal.mi-legacy-surface :is(.skill-row, .skill-footer) { background: transparent; border-color: var(--mi-line); }
:root[data-menu-info-art='ready'] #skill-modal.mi-legacy-surface :is(.skill-kind, .skill-details > summary, #skill-rules) { color: var(--mi-muted); }
:root[data-menu-info-art='ready'] #curse-dialog.mi-legacy-surface :is(.curse-controls-pane, .curse-rewards-pane, .curse-detail-pane, .curse-section) { background: transparent; border-color: var(--mi-line); border-radius: 0; }
:root[data-menu-info-art='ready'] #curse-dialog.mi-legacy-surface :is(.curse-note, #curse-config-note, #curse-challenge-state) { color: var(--mi-muted); }
:root[data-menu-info-art='ready'] #shop-modal.mi-legacy-surface :is(.shop-catalog, .shop-detail, .shop-footer, .shop-settings-panel, .shop-header) { background: #10171b var(--mi-art-stone) repeat; border-color: var(--mi-line); border-radius: 0; }
:root[data-menu-info-art='ready'] #shop-modal.mi-legacy-surface :is(#shop-upgrade-btn, #shop-attributes-btn, #shop-settings-close, #shop-close-btn, #shop-buy-btn, #shop-lock-toggle, #shop-reroll-btn, #btn-toggle-destroy, #btn-toggle-corruption, #shop-auto-toggle, #shop-auto-coin-toggle, #shop-lock-auto, #shop-lock-once, #shop-lock-always) { background: #11191b var(--mi-art-stone) center / 180px; border-image: var(--mi-art-neutral) 12 / 7px / 0 stretch; color: var(--mi-ink); }
:root[data-menu-info-art='ready'] #shop-modal.mi-legacy-surface :is(#shop-buy-btn, #shop-reroll-btn) { background-image: none; background-color: #42331b; color: #ffe5a5; }
:root[data-menu-info-art='ready'] #shop-modal.mi-legacy-surface .shop-item { background: #10171b var(--mi-art-stone) repeat; border-image: var(--mi-art-panel) 48 / 5px / 0 stretch; border-radius: 0; }
:root[data-menu-info-art='ready'] :is(#player-changelog, #community-group).mi-legacy-surface article { background: transparent; border: 0; border-image: none; box-shadow: none; color: var(--mi-ink); }
:root[data-menu-info-art='ready'] #progression-dialog.mi-surface:not([data-section='profile']) .progression-panels { display: block; overflow-y: auto; }
:root[data-menu-info-art='ready'] #progression-dialog.mi-surface :is(.progression-card, .theme-option) { background: #10171b var(--mi-art-stone) repeat; border-color: var(--mi-line); border-radius: 0; }
:root[data-menu-info-art='ready'] #progression-dialog.mi-surface :is(#progression-free, #progression-feedback-content, #progression-hero) { background: #10191d; border-color: var(--mi-line); border-radius: 0; color: var(--mi-ink); }
:root[data-menu-info-art='ready'] #progression-dialog.mi-surface :is(.progression-description, .progression-next, .progression-note, #progression-history) { color: var(--mi-muted); }
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface :is(.mobile-hero-tabs, .mobile-passives, .hero-talents-panel) { background: transparent; border-color: var(--mi-line); border-radius: 0; }
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface .mobile-hero-tabs [aria-pressed='true'] { background-image: none; background-color: #554021; color: #ffe4a1; }
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface :is(.hero-part-help, .mobile-help, .camera-settings) { color: var(--mi-muted); }
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface #shadow-control-layout p { color: var(--mi-muted); }
/* Preparation chrome inherits the palette while the scene, units and HUD geometry stay owned by their existing systems. */
:root[data-menu-info-art='ready'] body:not(.prep-art-active) #prep-dashboard :is(.prep-dashboard-header, .prep-shortcuts, #prep-inventory-host .console-center) { background: #10171b var(--mi-art-stone) repeat; color: var(--theme-ink); border-color: var(--theme-edge); }
:root[data-menu-info-art='ready'] body.preparation-dashboard:not(.prep-art-active) #prep-dashboard { background-image: var(--mi-art-background); background-position: center; background-size: cover; }

/* Selected controls keep the dark material, with one restrained gold marker. */
:root[data-menu-info-art='ready'] #progression-dialog.mi-surface .progression-tabs [aria-selected='true'],
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface .dm-tab.active,
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface .render-quality-options label.is-selected,
:root[data-menu-info-art='ready'] body.mobile-layout #mobile-drawer.mi-surface button[aria-pressed='true'],
:root[data-menu-info-art='ready'] #attribute-panel-dialog.mi-legacy-surface #attribute-panel-navigation button[aria-pressed='true'],
:root[data-menu-info-art='ready'] :is(#attribute-panel-dialog, #skill-modal, #talent-modal, #run-reward-dialog, #curse-dialog, #player-commands-dialog).mi-legacy-surface button[aria-pressed='true']:not(:disabled),
:root[data-menu-info-art='ready'] #shop-modal.mi-legacy-surface button[aria-pressed='true']:not(:disabled),
:root[data-menu-info-art='ready'] #shop-modal.mi-legacy-surface :is(#shop-lock-toggle, #shop-auto-toggle, #shop-auto-coin-toggle, #btn-toggle-destroy, #btn-toggle-corruption, #shop-lock-auto, #shop-lock-once, #shop-lock-always)[aria-pressed='true'] {
  background-color: var(--mi-selected-bg) !important;
  background-image: var(--mi-selected-image) !important;
  background-size: auto, 180px;
  color: var(--mi-selected-ink) !important;
  border-image-source: var(--mi-art-neutral);
  box-shadow: inset 0 -2px 0 var(--mi-selected-edge), inset 0 0 0 1px #6b624b;
}

#mi-enemy-preview[hidden] { display: none !important; }
:root[data-menu-info-art='ready'] body.mi-enemy-preview-active .prep-next-round { min-height: 0; gap: 6px; }
:root[data-menu-info-art='ready'] body.mi-enemy-preview-active #prep-wave-panel { display: flex; flex: 1; flex-direction: column; min-height: 0; gap: 5px; }
:root[data-menu-info-art='ready'] body.mi-enemy-preview-active #prep-next-boss { flex: 0 0 auto; text-align: center; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
:root[data-menu-info-art='ready'] body.mi-enemy-preview-active #btn-banner-start-wave { flex: 0 0 auto; }
:root[data-menu-info-art='ready'] #mi-enemy-preview { display: flex; align-items: end; justify-content: center; flex: 1; min-height: 36px; width: 100%; margin: 0; padding: 12px 6px 15px; border: 0 solid transparent; border-image: var(--mi-art-panel) 48 / 12px / 0 stretch; background: #0b1725 var(--mi-art-stage) center / cover no-repeat; overflow: hidden; pointer-events: none; }
:root[data-menu-info-art='ready'] .mi-preview-enemy { display: flex; flex: 1; min-width: 0; height: 100%; flex-direction: column; justify-content: flex-end; align-items: center; }
:root[data-menu-info-art='ready'] .mi-preview-enemy img { width: 100%; height: calc(100% - 15px); object-fit: contain; object-position: center bottom; filter: drop-shadow(1px 3px 2px #0009); }
:root[data-menu-info-art='ready'] .mi-preview-enemy figcaption { max-width: 100%; color: var(--theme-ink); font: 11px/15px 'Microsoft YaHei', sans-serif; text-align: center; overflow-wrap: anywhere; }
:root[data-menu-info-art='ready'] .mi-preview-minion { flex: .65; height: 68%; }
:root[data-menu-info-art='ready'] #mi-enemy-preview:empty::after { align-self: center; color: var(--theme-muted); font: 12px/1.5 'Microsoft YaHei', sans-serif; }
:root[data-menu-info-art='ready'] #mi-enemy-preview[data-state='loading']:empty::after { content: '模型载入中…'; }
:root[data-menu-info-art='ready'] #mi-enemy-preview[data-state='failed']:empty::after { content: '模型暂不可用'; }
@media (max-height: 350px) {
  :root[data-menu-info-art='ready'] #mi-enemy-preview { min-height: 68px; padding: 8px 4px 10px; border-image-width: 8px; }
  :root[data-menu-info-art='ready'] .mi-preview-minion { height: 100%; }
  :root[data-menu-info-art='ready'] body.mi-enemy-preview-active #prep-next-boss { font-size: 11px; }
  :root[data-menu-info-art='ready'] .prep-next-round:has(#prep-challenges > button:not([hidden])) #mi-enemy-preview { min-height: 0; }
}
