/* Shop details share the v3 material, while all labels and state still come from the game. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] { --theme-danger: #ffc1ac; }

:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item:is(.selected, [aria-pressed='true']) { border-image-source: var(--theme-art-slot-selected); outline: 1px solid var(--theme-gold); outline-offset: -3px; box-shadow: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .shop-item-name {
  box-sizing: border-box; display: block; width: 100%; max-width: 100%; height: 12px; padding: 0 2px;
  border-image: var(--theme-art-button-neutral-normal) 24 fill / 2px / 0 stretch;
  border-radius: 0; background: transparent; color: var(--theme-ink);
  font-size: 10.5px; font-weight: 600; line-height: 12px; letter-spacing: .01em;
  text-shadow: 0 1px 1px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  outline: 1px solid var(--theme-edge); outline-offset: -1px;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item[aria-pressed='true'] .shop-item-name { color: var(--theme-gold); outline-color: var(--theme-gold); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .item-price-badge {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  max-width: 100%; height: 12px; padding: 0 2px; background: transparent; color: var(--theme-gold);
  font: 700 12px/12px Georgia, 'Times New Roman', serif; font-variant-numeric: tabular-nums;
  letter-spacing: .015em; text-shadow: 0 1px 1px #000;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .item-price-badge::before {
  content: ''; display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Cpath d='M10 8h4m-2 0v8m-2 0h4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .item-price-badge.cannot-afford { color: var(--theme-danger); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .item-level-badge {
  border-image: none;
  border-radius: 0; background: var(--theme-art-panel-stone) center / 256px 256px no-repeat; color: var(--theme-ink);
  font: 600 9px/11px Georgia, 'Times New Roman', serif; font-variant-numeric: tabular-nums; padding: 1px 3px;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-level-badge { border-image: var(--theme-art-button-neutral-normal) 24 fill / 3px / 0 stretch; border-radius: 0; background: transparent; color: var(--theme-gold); font-family: Georgia, 'Times New Roman', serif; font-variant-numeric: tabular-nums; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(#shop-gold, #shop-reroll-label) { color: var(--theme-gold); font-family: Georgia, 'Times New Roman', serif; font-variant-numeric: tabular-nums; }

:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed] { position: relative; display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; padding-inline: 6px; max-width: none; white-space: nowrap; flex: 0 0 auto; color: var(--theme-muted); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed]::before {
  content: ''; display: inline-block; box-sizing: border-box; flex: 0 0 36px; width: 36px; height: 18px;
  border: 0; border-radius: 0; border-image: var(--theme-art-button-neutral-normal) 24 fill / 3px / 0 stretch;
  background: transparent;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed]::after {
  content: ''; position: absolute; top: 50%; left: 10px; box-sizing: border-box; width: 12px; height: 12px;
  border: 1px solid var(--theme-edge); border-radius: 50%; background: var(--theme-art-joystick-thumb) center / contain no-repeat;
  transform: translateY(-50%); pointer-events: none;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed='true'] { color: var(--theme-ink); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed='true']::before { border-image-source: var(--theme-art-button-primary-normal); }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed='true']::after { transform: translate(18px, -50%); }

:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #btn-toggle-destroy { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; line-height: 12px; white-space: nowrap; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #btn-toggle-destroy::before {
  content: ''; width: 14px; height: 14px; flex: 0 0 14px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M9 6V3h6v3M6 6l1 15h10l1-15M10 10v7M14 10v7'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #btn-toggle-destroy:is(.active, [aria-pressed='true']) { color: var(--theme-danger); border-image-source: var(--theme-art-button-neutral-pressed); outline: 1px solid var(--theme-danger); outline-offset: -3px; }
/* Legacy danger mode resets border-image with an important border shorthand. */
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet .inv-slot.destroy-mode { border-image: var(--theme-art-slot-normal) 16 fill / 6px / 0 stretch !important; outline: 1px solid var(--theme-danger); outline-offset: -4px; box-shadow: none !important; animation: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet .inv-slot > .inv-count { border-image: var(--theme-art-frame-screen) 40 / 2px / 0 stretch; border-radius: 0; font-family: Georgia, 'Times New Roman', serif; font-variant-numeric: tabular-nums; }

:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-purchase-mode { background: transparent; border-image: var(--theme-art-button-neutral-normal) 24 fill / 6px / 0 stretch; border-radius: 0; box-shadow: none; color: var(--theme-ink); color-scheme: dark; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(#shop-feedback, #shop-inventory-host #inventory-inspector) { border-image: var(--theme-art-panel-stone) 48 fill / 6px / 0 stretch; border-radius: 0; background: transparent; color: var(--theme-ink); box-shadow: none; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-lock-status { color: var(--theme-ink) !important; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-lock-toggle[aria-pressed='true'] { border-image-source: var(--theme-art-button-neutral-pressed); outline: 1px solid var(--theme-gold); outline-offset: -3px; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-lock-toggle[aria-pressed='true'] #shop-lock-status { color: var(--theme-gold) !important; }
:root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet #shop-settings[open] > summary { border-image-source: var(--theme-art-button-neutral-pressed); color: var(--theme-gold); }

@media (max-width: 700px) and (orientation: landscape) {
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body #shop-modal.shop-sheet .shop-grid button.shop-item .item-price-badge { font-size: 11px; }
}
@media (orientation: landscape) {
  /* Let conditional controls use the whole footer row; inventory nodes stay put. */
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet .shop-footer { row-gap: 0; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet .shop-bag-panel { display: contents; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet #shop-quick-controls { grid-column: 1 / -1; grid-row: 1; width: auto; margin-bottom: 0; flex-wrap: nowrap; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet #shop-inventory-host { grid-column: 1; grid-row: 2; min-width: 0; }
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] body.mobile-layout #shop-modal.shop-sheet .shop-actions { grid-column: 2; grid-row: 2; }
}
@media (prefers-reduced-motion: no-preference) {
  :root[data-ui-theme='black-gold'][data-ui-theme-assets='ready'] #shop-modal.shop-sheet :is(.shop-quick-controls, .shop-automation) button[aria-pressed]::after { transition: transform 120ms ease-out; }
}
