/* UI-ENTRY-RESULT-ART-ALIGN-001. Dataset is granted only after auth + complete assets. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] {
  --er-ink: #f4e5be;
  --er-muted: #d1c3a7;
  --er-gold: #efd18b;
  --er-line: #8b744a;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, #hero-selection-modal, #defeat-modal, #doom-guard-evolution, #doom-guard-evolution-open) {
  color: var(--er-ink); font-family: 'RD Entry Serif', 'Microsoft YaHei', serif; font-variant-numeric: tabular-nums;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, #hero-selection-modal, #defeat-modal, #doom-guard-evolution) ::selection { background: #edd08c; color: #10171c; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, #hero-selection-modal, #defeat-modal, #doom-guard-evolution) * { scrollbar-width: thin; scrollbar-color: #ad925e #12191d; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, #hero-selection-modal, #defeat-modal, #doom-guard-evolution) :focus-visible { outline: 2px solid #8cddf6; outline-offset: -2px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog, #defeat-modal, #doom-guard-evolution) :is(button, summary),
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution-open {
  min-width: 44px; min-height: 44px; box-sizing: border-box; padding: 3px 10px;
  border: 7px solid transparent; border-image: var(--er-art-neutral) 12 / 7px / 0 stretch;
  border-radius: 0; background: #10171b var(--er-art-stone) center / 180px;
  color: var(--er-ink); font: inherit; font-size: 13px; line-height: 1.4;
  box-shadow: none; cursor: pointer; touch-action: manipulation;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, #hero-selection-modal, #defeat-modal, #doom-guard-evolution) button:is(:active, [data-theme-pressed='true']):not(:disabled) { filter: brightness(.78); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, #hero-selection-modal, #defeat-modal, #doom-guard-evolution) button:disabled { opacity: .48; filter: saturate(.2); cursor: default; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(.hero-selection-dialog, #defeat-modal, #doom-guard-evolution) {
  position: relative; border: 17px solid transparent; border-image: var(--er-art-frame) 40 / 17px / 0 stretch;
  border-radius: 0; background: #0e1519 var(--er-art-stone) repeat; box-shadow: 0 14px 35px #000b;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(.hero-selection-dialog, #doom-guard-evolution)::before {
  content: ''; position: absolute; z-index: 2; pointer-events: none;
  width: 40px; height: 28px; left: calc(50% - 20px); top: -21px; background: var(--er-art-gem) center / contain no-repeat;
}

/* Entry: a scene, an independent logo and real status/action nodes. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] body:is(.entry-pending, .entry-shell) > #game-entry-overlay:not([hidden]) {
  padding: max(12px, var(--rd-safe-area-top)) max(12px, var(--rd-safe-area-right)) max(12px, var(--rd-safe-area-bottom)) max(12px, var(--rd-safe-area-left));
  border: 12px solid transparent; border-image: var(--er-art-frame) 40 / 12px / 0 stretch;
  background: #080e15 var(--er-art-background) center / cover no-repeat;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .game-entry-card { position: relative; width: 100%; height: 100%; max-width: 1300px; overflow: visible; justify-content: center; align-items: center; gap: 0; padding: 14vh 0 48px; text-align: center; border: 0; border-image: none; background: transparent; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .er-logo { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(44vw, 430px); height: 25vh; background: var(--er-art-logo) center top / contain no-repeat; pointer-events: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-title { margin: 6px 0; font-size: clamp(22px, 3.6vw, 34px); line-height: 1.4; letter-spacing: 0; color: #ffe1a0; text-shadow: 0 3px 7px #000; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] .game-entry-phone { display: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-hint { margin: 2px 0 8px; color: var(--er-ink); font-size: 13px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-status { max-width: min(720px, 88%); margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: #f4e5be; text-shadow: 0 2px 4px #000; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .game-entry-actions { gap: 8px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay #game-entry-enter { background-color: #193b21; min-width: 160px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .er-waiting { display: none; width: 50px; height: 32px; flex: 0 0 32px; margin-top: 9px; background: var(--er-art-gem) center / contain no-repeat; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .game-entry-card:has(#game-entry-enter[hidden]) .er-waiting { display: block; animation: er-wait 1.8s ease-in-out infinite alternate; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .game-entry-secondary-actions { position: absolute; bottom: 0; left: 0; display: flex; gap: 8px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay [data-audio-settings] { position: absolute; bottom: 0; right: 0; display: flex; gap: 8px; width: auto; margin: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) details { position: relative; width: auto; min-width: 100px; border: 0; font: inherit; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) summary { display: flex; align-items: center; justify-content: center; list-style: none; white-space: nowrap; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) summary::-webkit-details-marker { display: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) summary::after { content: ''; width: 6px; height: 6px; margin: -3px 0 0 9px; border: solid #efd18b; border-width: 0 1px 1px 0; transform: rotate(45deg); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) details[open] { z-index: 5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) details[open] > :not(summary) { position: relative; z-index: 1; background: #111a20; margin: 0; padding: 6px 12px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay details[open] { width: min(310px, 40vw); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay details[open] > summary { position: relative; }
@keyframes er-wait { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .er-waiting { animation: none; } }

:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#hero-selection-modal, #game-entry-overlay) .er-settings-content > * { position: static; width: auto; background: transparent; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .render-quality-settings[open] { position: relative; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#hero-selection-modal, #game-entry-overlay) .er-extra-tools[hidden] { display: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .er-extra-content { display: flex; flex-direction: column; gap: 6px; }

/* Selection: move the original settings and skill host, never recreate controls. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal { background: #080e15 var(--er-art-background) center / cover no-repeat; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog {
  width: min(1420px, 100%); height: 100%; max-height: 100%; padding: 4px 8px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 4px 12px;
  overflow: visible;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog > header { grid-column: 1 / -1; min-height: 44px; gap: 10px; border-bottom: 1px solid var(--er-line); padding-bottom: 4px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-title { font-size: clamp(17px, 2.3vw, 25px); color: #ffe1a0; line-height: 1.4; white-space: nowrap; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal [data-audio-settings] { display: flex; gap: 6px; border: 0; margin-left: auto; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog details[open] > :not(summary) { position: absolute; right: 0; top: 44px; width: min(300px, 65vw); box-sizing: border-box; box-shadow: 0 8px 20px #000a; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .render-quality-settings[open] > p { position: static; width: min(300px, 65vw); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .render-quality-settings[open] { position: absolute; top: 0; right: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-ban-preview { flex: 0 1 210px; min-width: 0; font-size: 11px; line-height: 1.4; color: var(--er-muted); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-ban-preview strong { color: var(--er-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-note { grid-column: 1 / -1; margin: 0; font-size: 11px; line-height: 1.4; color: var(--er-muted); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-selection-body { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: minmax(0, 1fr) auto; gap: 7px 12px; overflow: hidden; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-heroes { grid-row: 1 / 3; display: flex; flex-direction: column; min-height: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-section-title { flex: 0 0 auto; margin: 0 0 4px; color: var(--er-gold); font-size: 14px; font-weight: 600; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices { min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; gap: 6px; padding: 1px 3px 3px 0; align-content: start; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices button { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 3px; min-height: 126px; padding: 6px 3px; border-image: var(--er-art-panel) 23 / 7px / 0 stretch; text-align: center; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-choices img { grid-row: auto; width: 36px; height: 36px; border-radius: 0; border: 1px solid #a38753; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices strong { font-size: 13px; color: var(--er-ink); line-height: 1.3; overflow-wrap: anywhere; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-choices span { color: var(--er-muted); font-size: 10px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices small { min-height: 0; white-space: normal; overflow: visible; color: var(--er-muted); font-size: 11px; line-height: 1.4; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog button[aria-pressed='true'] { background-color: #20292c; border-image: var(--er-art-panel) 23 / 7px / 0 stretch; box-shadow: inset 0 -2px #e7c777; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .er-skills { grid-column: 2; grid-row: 1; min-height: 0; overflow-y: auto; padding: 0 9px 3px; border: 1px solid #655737; background: #080d10a8; overscroll-behavior: contain; touch-action: pan-y; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #run-hero-skills-host .hero-skill-guide { font: 12px/1.55 'RD Entry Serif', 'Microsoft YaHei', serif; color: var(--er-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #run-hero-skills-host h3 { color: var(--er-gold); margin: 5px 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-difficulty { grid-column: 2; grid-row: 2; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-difficulty-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-difficulty-choices button { min-height: 44px; display: flex; flex-direction: column; justify-content: center; padding: 2px; gap: 1px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-difficulty-choices strong { font-size: 16px; line-height: 1.2; color: var(--er-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-difficulty-choices span { font-size: 10px; line-height: 1.4; color: var(--er-muted); white-space: nowrap; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog #run-difficulty-detail { margin: 4px 0 0; color: var(--er-muted); font-size: 11px; line-height: 1.4; white-space: normal; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-entry-tools { grid-column: 1; grid-row: 5; margin: 0; gap: 5px; align-self: center; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-entry-tools button { padding: 2px 5px; font-size: 12px; white-space: nowrap; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #run-benefits-summary { grid-column: 1 / -1; grid-row: 4; min-width: 0; max-height: 32px; overflow-y: auto; margin: 0; align-self: center; color: var(--er-muted); font-size: 11px; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-selection-footer { grid-column: 2; grid-row: 5; margin: 0; padding: 0; gap: 10px; border-top: 0; flex-wrap: nowrap; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog #run-start { margin-left: auto; min-width: 160px; background-color: #183921; font-size: 17px; color: #fff0c2; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #run-selection-summary { margin-left: auto; color: var(--er-gold); font-size: 15px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog :is(#run-theme-preview, #run-online-debug) { font-size: 11px; padding-inline: 5px; }

/* Final defeat only: the native owner still controls display and real result text. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal { position: fixed; width: min(680px, calc(100% - 64px - var(--rd-safe-area-left) - var(--rd-safe-area-right))) !important; max-height: calc(100% - 90px - var(--rd-safe-area-top) - var(--rd-safe-area-bottom)); padding: 32px 22px 18px !important; overflow: visible; border: 17px solid transparent !important; border-image: var(--er-art-frame) 40 / 17px / 0 stretch !important; border-radius: 0 !important; background: #0e1519 var(--er-art-stone) repeat !important; box-shadow: 0 14px 35px #000b, 0 0 0 100vmax #0008 !important; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] .er-defeat-crest { position: absolute; top: -60px; left: calc(50% - 100px); width: 200px; height: 80px; background: var(--er-art-defeat-crest) center / contain no-repeat; pointer-events: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal .er-defeat-title { font: 600 clamp(23px, 3.6vw, 36px)/1.4 'RD Entry Serif', 'Microsoft YaHei', serif !important; color: #ffa690 !important; text-shadow: 0 3px 7px #000 !important; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-wave-text { font: 17px/1.5 'RD Entry Serif', 'Microsoft YaHei', serif !important; color: var(--er-gold) !important; padding: 14px 0; margin-top: 10px !important; border-block: 1px solid var(--er-line); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal p { margin-top: 12px !important; color: var(--er-ink) !important; font-size: 13px !important; line-height: 1.6; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal #btn-defeat-new-run { background: #183921 var(--er-art-stone) center / 180px !important; border: 7px solid transparent !important; border-image: var(--er-art-neutral) 12 / 7px / 0 stretch !important; border-radius: 0 !important; padding: 3px 10px !important; color: #fff0c2 !important; font: 18px/1.4 'RD Entry Serif', 'Microsoft YaHei', serif !important; min-width: 240px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal { box-sizing: border-box; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal .er-defeat-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal #run-start,
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal #btn-defeat-new-run { background-blend-mode: luminosity; }

/* Nonmodal evolution: retain the lower control zone and scroll real remaining choices. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution { position: fixed; top: calc(16px + var(--rd-safe-area-top)); left: var(--rd-safe-center-x); width: min(1000px, calc(100% - 100px - var(--rd-safe-area-left) - var(--rd-safe-area-right))); max-height: calc(100% - 172px - var(--rd-safe-area-top) - var(--rd-safe-area-bottom)); padding: 0 8px 6px; overflow: visible; font-size: 13px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution h2 { color: #ffb090; font: 600 clamp(16px, 2.4vw, 24px)/1.4 'RD Entry Serif', 'Microsoft YaHei', serif; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution header { min-height: 44px; gap: 10px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-pending { margin: 0 0 5px; color: var(--er-gold); font-size: 12px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 1px 2px 2px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-choices button { min-height: 88px; padding: 8px; border-image: var(--er-art-panel) 23 / 7px / 0 stretch; gap: 5px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-choices strong { color: var(--er-gold); font-size: 15px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-choices span { color: var(--er-ink); font-size: 12px; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-note { color: var(--er-muted); margin: 5px 0 0; font-size: 11px; line-height: 1.4; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution-open { background-color: #20292c; font-size: 13px; }

@media (max-width: 720px) and (orientation: landscape) {
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog { padding: 0 3px; gap: 3px 6px; border-width: 13px; border-image-width: 13px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog > header { gap: 5px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-title { font-size: 16px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#game-entry-overlay, .hero-selection-dialog) details { min-width: 82px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog summary { padding-inline: 4px; font-size: 11px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-ban-preview { flex-basis: 130px; font-size: 10px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-selection-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr); gap: 5px 7px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices button { min-height: 118px; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 5px 3px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-choices img { width: 28px; height: 28px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .hero-selection-choices strong { font-size: 12px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .run-difficulty-choices span { white-space: normal; overflow-wrap: anywhere; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .run-entry-tools button { font-size: 11px; padding-inline: 2px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog #run-start { min-width: 125px; font-size: 16px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #run-selection-summary { font-size: 13px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution { width: calc(100% - 58px - var(--rd-safe-area-left) - var(--rd-safe-area-right)); }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #doom-guard-evolution .doom-evolution-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-modal { padding: 22px 12px 10px !important; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #defeat-wave-text { padding: 8px 0; font-size: 15px !important; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay .game-entry-secondary-actions { gap: 3px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-overlay button { padding-inline: 6px; font-size: 12px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #game-entry-status { font-size: 12px; }
}

/* Expanded settings stay anchored to their original header control. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #hero-selection-modal .hero-selection-dialog .render-quality-settings[open] { position: relative; top: auto; right: auto; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#hero-selection-modal, #game-entry-overlay) details[open] > :is(.audio-settings-content, .er-settings-content, .er-extra-content) {
  box-sizing: border-box; padding: 7px 10px; border: 9px solid transparent; border-image: var(--er-art-panel) 23 / 9px / 0 stretch;
  background: #10171b var(--er-art-stone) repeat; box-shadow: 0 8px 20px #000a;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#hero-selection-modal, #game-entry-overlay) .render-quality-options label { min-height: 44px; border: 6px solid transparent; border-image: var(--er-art-neutral) 12 / 6px / 0 stretch; border-radius: 0; background: #10171b; color: var(--er-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] :is(#hero-selection-modal, #game-entry-overlay) .render-quality-options label:has(input:checked) { background: #22292c; box-shadow: inset 0 -2px #dfc178; }

/* In-run update notice: original status, warning, actions and event owners. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice {
  grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(620px, calc(100% - 32px - var(--rd-safe-area-left) - var(--rd-safe-area-right)));
  max-height: calc(100% - 32px - var(--rd-safe-area-top) - var(--rd-safe-area-bottom)); padding: 12px 16px; overflow-y: auto;
  border: 17px solid transparent; border-image: var(--er-art-frame) 40 / 17px / 0 stretch; border-radius: 0;
  background: #0e1519 var(--er-art-stone) repeat; box-shadow: 0 14px 35px #000b;
  color: var(--er-ink); font: 14px/1.7 'RD Entry Serif', 'Microsoft YaHei', serif;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice .er-update-title { margin: 0; padding: 0 0 7px; border-bottom: 1px solid var(--er-line); color: var(--er-gold); font: 600 22px/1.4 'RD Entry Serif', 'Microsoft YaHei', serif; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice-message { margin: 0; color: var(--er-ink); overflow-wrap: anywhere; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice .update-notice-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding-top: 3px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice button {
  min-height: 44px; min-width: 146px; padding: 4px 12px; border: 7px solid transparent; border-image: var(--er-art-neutral) 12 / 7px / 0 stretch;
  border-radius: 0; background: #182025 var(--er-art-stone) center / 180px; color: var(--er-ink); font: 14px/1.4 'RD Entry Serif', 'Microsoft YaHei', serif; touch-action: manipulation;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice #update-notice-later { border-color: transparent; background: #1b2923 var(--er-art-stone) center / 180px; background-blend-mode: luminosity; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice button:active:not(:disabled) { filter: brightness(.78); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #update-notice :focus-visible { outline: 2px solid #8cddf6; outline-offset: -2px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] body.preparation-dashboard:not(.prep-art-active) #prep-dashboard { background-image: var(--er-art-background); background-position: center; background-size: cover; }

/* Accepted a33e revision03 stage layout; dedicated prep-art owner retains priority. */
#mi-enemy-preview[hidden] { display: none !important; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] body.mi-enemy-preview-active .prep-next-round { min-height: 0; gap: 6px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] body.mi-enemy-preview-active #prep-wave-panel { display: flex; flex: 1; flex-direction: column; min-height: 0; gap: 5px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-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-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] body.mi-enemy-preview-active #btn-banner-start-wave { flex: 0 0 auto; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-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(--er-art-panel) 48 / 12px / 0 stretch; background: #0b1725 var(--er-art-stage) center / cover no-repeat; overflow: hidden; pointer-events: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-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-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-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-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-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-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] .mi-preview-minion { flex: .65; height: 68%; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #mi-enemy-preview:empty::after { align-self: center; color: var(--theme-muted); font: 12px/1.5 'Microsoft YaHei', sans-serif; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #mi-enemy-preview[data-state='loading']:empty::after { content: '模型载入中…'; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #mi-enemy-preview[data-state='failed']:empty::after { content: '模型暂不可用'; }
@media (max-height: 350px) {
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] #mi-enemy-preview { min-height: 68px; padding: 8px 4px 10px; border-image-width: 8px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] .mi-preview-minion { height: 100%; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] body.mi-enemy-preview-active #prep-next-boss { font-size: 11px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'][data-entry-result-art='ready'] .prep-next-round:has(#prep-challenges > button:not([hidden])) #mi-enemy-preview { min-height: 0; }
}
