/* The purchase picker is shared; the remaining refinements are black-gold only. */
#shop-modal.shop-sheet #shop-purchase-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
#shop-modal.shop-sheet #shop-purchase-mode { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 150px; cursor: pointer; }
#shop-modal.shop-sheet #shop-purchase-mode::after { content: ''; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
#shop-modal.shop-sheet #shop-purchase-mode[aria-expanded='true']::after { transform: rotate(225deg) translate(-2px, -2px); }
#shop-modal.shop-sheet #shop-purchase-options { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0; padding: 4px; border: 1px solid #85946f; border-radius: 5px; background: #101e20; }
#shop-modal.shop-sheet #shop-purchase-options[hidden] { display: none; }
#shop-modal.shop-sheet #shop-settings:has(#shop-purchase-options:not([hidden])) .shop-settings-panel { padding-block: 6px; }
#shop-modal.shop-sheet #shop-purchase-picker:has(#shop-purchase-options:not([hidden])) { margin-block: 0; row-gap: 6px; }
#shop-modal.shop-sheet #shop-purchase-options button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: #e8e2c8; text-align: left; }
#shop-modal.shop-sheet #shop-purchase-options button::before { content: ''; width: 16px; height: 16px; flex: 0 0 16px; }
#shop-modal.shop-sheet #shop-purchase-options button[aria-checked='true'] { background: #35503c; color: #fff0ce; }
#shop-modal.shop-sheet #shop-purchase-options button[aria-checked='true']::before { background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Readable material surfaces use their existing boundaries, with no extra cards. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] :is(#player-changelog, #attribute-panel-dialog, #damage-meters-dock, .game-entry-card) { background: transparent; color: var(--theme-ink); border-image: var(--theme-art-panel-stone) 48 fill / 10px / 0 stretch; border-radius: 0; box-shadow: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] :is(#player-changelog, #attribute-panel-dialog, #game-entry-overlay, #damage-meters-dock) button { background: transparent; color: var(--theme-ink); border-image: var(--theme-art-button-neutral-normal) 24 fill / 8px / 0 stretch; border-radius: 0; box-shadow: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] :is(#player-changelog, #attribute-panel-dialog, #game-entry-overlay, #damage-meters-dock) button:is(:active, [data-theme-pressed='true']):not(:disabled) { border-image-source: var(--theme-art-button-neutral-pressed); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] :is(#player-changelog, #attribute-panel-dialog, #game-entry-overlay, #damage-meters-dock) button:disabled { border-image-source: var(--theme-art-button-neutral-disabled); }

/* Update history: a quiet date index beside a left-aligned reading column. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog { line-height: 1.75; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog :is(.player-changelog-header, nav) { background: #10161db3; border-color: var(--theme-edge); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog .player-changelog-header { padding: 10px 16px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog nav { padding: 12px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog nav button { padding: 10px 12px; margin-bottom: 8px; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog nav button[aria-current='true'] { border-image-source: var(--theme-art-button-neutral-pressed); color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog article { padding: 18px 24px 24px; text-align: left; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog :is(time, nav span + span) { color: var(--theme-muted); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog h3 { margin: 6px 0 18px; color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #player-changelog li { margin-bottom: 12px; }

/* The attribute UI is injected later; target its real dialog and preserve the pin controls. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-dialog { line-height: 1.55; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-dialog :is(#attribute-panel-header, #attribute-panel-tools) { background: #10161db3; border-color: var(--theme-edge); gap: 10px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content { padding: 12px; gap: 16px; align-content: start; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content .attribute-panel-group { border: 0; border-radius: 0; background: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content .attribute-panel-group-title { padding: 8px 10px; background: #10161d9c; color: var(--theme-gold); border-color: var(--theme-edge); line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content .attribute-panel-row { min-height: 48px; padding: 3px 10px; gap: 4px 10px; align-items: start; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content :is(.attribute-panel-label, .attribute-panel-value) { padding-top: 12px; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content .attribute-panel-label { color: var(--theme-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content .attribute-panel-value { color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content .attribute-panel-detail { padding-bottom: 8px; color: var(--theme-muted); line-height: 1.65; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-dialog button[aria-pressed='true'] { border-image-source: var(--theme-art-button-neutral-pressed); color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content button.attribute-panel-pin { border: 0; border-image: none; background: transparent; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-content button.attribute-panel-pin[aria-pressed='true'] { background: #353122; color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #attribute-panel-dialog #attribute-panel-note { padding: 8px 12px; background: #10161db3; color: var(--theme-muted); border-color: var(--theme-edge); }

/* Statistics: summary and meter are peers, rather than a centered narrow box below a tall banner. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #mobile-panel-meters:not([hidden]) { display: grid; grid-template-columns: minmax(118px, .6fr) minmax(0, 1.4fr); gap: 14px; align-content: start; align-items: start; padding: 12px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #mobile-panel-meters #mobile-battle-summary { margin: 0; padding: 6px 0; background: none; line-height: 1.7; color: var(--theme-muted); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #mobile-panel-meters #damage-meters-dock { width: 100%; max-width: none; margin: 0; min-width: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-header { padding: 4px 10px; gap: 8px; background: #10161db3; border-color: var(--theme-edge); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-tabs { gap: 4px; padding: 0; border: 0; background: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock :is(.dm-tab, .dm-btn-collapse) { min-height: 44px; min-width: 44px; padding: 6px 10px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-tab.active { border-image-source: var(--theme-art-button-neutral-pressed); color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-body { padding: 8px 10px; gap: 8px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-data-wrap { min-width: 0; gap: 6px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-info-line { gap: 6px; flex-wrap: wrap; align-items: baseline; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-hero-name { color: var(--theme-ink); overflow-wrap: anywhere; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock :is(.dm-pct, .dm-duration) { color: var(--theme-muted); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 0; border: 0; background: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-stat-badge { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; padding: 0; border: 0; background: none; font-size: 11px; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #damage-meters-dock .dm-stat-badge.extra { grid-column: auto; padding: 0; margin: 0; border: 0; }

/* Launch/loading keeps a single material panel, with a reading order and compact groups. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body:is(.entry-pending, .entry-shell) > #game-entry-overlay:not([hidden]) { background: #0b1118 var(--theme-art-bg-preparation) center / cover; place-items: start center; padding-top: max(16px, var(--rd-safe-area-top)); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-card { width: min(620px, 100%); align-items: stretch; gap: 14px; padding: 24px; text-align: left; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-title { margin: 0; font-size: 28px; line-height: 1.35; letter-spacing: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-phone { display: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay :is(#game-entry-hint, #game-entry-status) { margin: 0; max-width: none; line-height: 1.7; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-actions { justify-content: flex-start; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-actions:not(:has(button:not([hidden]))) { display: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-secondary-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-start; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-secondary-actions button { min-width: 0; margin: 0; padding: 8px 16px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay [data-audio-settings] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Talent cards are text first; only the actual learning affordance uses a button frame. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal { width: min(880px, calc(100vw - 24px - var(--rd-safe-area-left) - var(--rd-safe-area-right))); max-height: calc(100dvh - 24px - var(--rd-safe-area-top) - var(--rd-safe-area-bottom)); left: var(--rd-safe-center-x); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-header { padding: 12px 16px; background: #10161db3; border-color: var(--theme-edge); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px; gap: 14px; min-height: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal button.talent-card { padding: 14px; gap: 12px; min-height: 160px; align-items: stretch; justify-content: flex-start; text-align: left; background: #10161df2; border-image: none; border: 1px solid var(--theme-edge); box-shadow: none; transform: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card-title { margin: 0 0 10px; gap: 8px; align-items: baseline; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card-title > span:first-child { min-width: 0; overflow-wrap: anywhere; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card-desc { line-height: 1.65; color: var(--theme-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card-btn { display: grid; place-items: center; min-height: 44px; box-sizing: border-box; margin-top: auto; padding: 8px 12px; background: transparent; border: 0; border-image: var(--theme-art-button-neutral-normal) 24 fill / 8px / 0 stretch; color: var(--theme-gold); border-radius: 0; line-height: 1.5; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card:is(:active, [data-theme-pressed='true']) .talent-card-btn { border-image-source: var(--theme-art-button-neutral-pressed); }

/* Shop labels have breathing room, rather than a second tiny frame around the letters. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .shop-item-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; height: auto; min-height: 0; padding: 0 3px; border: 0; border-image: none; outline: 0; line-height: 1.35; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet .shop-grid .shop-item { grid-template-rows: auto auto auto; align-content: start; row-gap: 4px; padding: 8px 4px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet .shop-detail { padding-top: 12px; gap: 8px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-detail-description { line-height: 1.65; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-purchase-options { background: #10161d; border-color: var(--theme-edge); border-radius: 0; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-purchase-options button { border-image: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-purchase-options button[aria-checked='true'] { background: #353122; color: var(--theme-gold); }

@media (orientation: landscape) {
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #top-bar { padding: 8px 12px; gap: 10px; min-height: 44px; box-sizing: border-box; border-image: var(--theme-art-panel-stone) 48 fill / 6px / 0 stretch; max-width: calc(100vw - var(--mobile-edge-left) - var(--mobile-edge-right) - 296px); }
}
@media (max-width: 700px) and (orientation: landscape) {
  /* Leave the minimap, four 44px quick controls, their gaps and the menu in their existing lanes. */
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #top-bar { flex-wrap: wrap; row-gap: 4px; max-width: calc(100vw - var(--mobile-edge-left) - var(--mobile-edge-right) - var(--mobile-map-width) - 263px); }
}
@media (max-height: 360px) and (orientation: landscape) {
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-overlay .game-entry-card { padding: 16px; gap: 12px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #game-entry-title { font-size: 24px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal button.talent-card { min-height: 155px; padding: 10px; gap: 12px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-choices { gap: 10px; padding: 10px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card-title { font-size: 13px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #talent-modal .talent-card-desc { font-size: 12px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet .shop-grid .shop-item { padding: 3px 2px; row-gap: 1px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet .shop-grid .item-icon { width: 22px; height: 22px; min-height: 22px; max-height: 22px; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .shop-item-name { font-size: 10px; line-height: 11px; }
}
