/* Approved navy surfaces and red primary, mapping legacy component colors. */

body {
  background: var(--ui-color-background);
}
.game-panel {
  box-shadow:
    0 0 0 2px #03070fa6,
    inset 0 0 0 1px #7f9fc624,
    0 6px 18px #02050b73;
}
.ui-nav-rail__item {
  box-shadow: none;
}
.ui-nav-rail__item[aria-current="page"] {
  box-shadow: inset 2px 0 var(--ui-color-accent);
}

/* Existing HUD. */
/* Capture and loot tiles surrounding the report use the same navy surfaces. */
.hunt-notification-tile {
  border-color: var(--ui-color-border);
  background: #0d1522d6;
  color: var(--ui-color-text);
}
.hunt-notification-entry > button.hunt-notification-tile:hover {
  background: color-mix(
    in srgb,
    var(--notification-color) 18%,
    var(--ui-color-surface-raised)
  );
}
button.hunt-notification-tile:focus-visible {
  outline-color: var(--identity-brand-red);
}
.hunt-notification-fallback,
.hunt-notification-overflow {
  color: var(--ui-color-accent-strong);
}
.hunt-notification-value {
  background: #060b13e8;
  color: var(--ui-color-accent-strong);
}
:is(.hunt-notification-capture, .hunt-notification-best)
  .hunt-notification-tile {
  background: color-mix(in srgb, var(--notification-color) 14%, #060b13d6);
}
.hunt-notification-capture.pending .hunt-notification-tile {
  border-color: var(--ui-color-border);
  background: #101a28d6;
}
.hunt-notification-capture.failed .hunt-notification-tile {
  border-color: var(--ui-color-border);
  background: #090f1bd6;
}
.top-right,
.panel-kicker span:last-child,
.hunt-header-encounters,
.trainer-line,
.report-target small,
.skill-group-identity small,
.skill-group-empty,
.skills-empty {
  color: var(--ui-color-text-muted);
}
.zoom-button {
  background: var(--ui-color-surface);
  border-color: var(--ui-color-border);
  color: var(--ui-color-text);
}
.zoom-button:hover {
  background: var(--ui-color-surface-control);
}
.hunt-header,
.hunt-header-copy > strong,
.trainer-line strong,
.skill-group-header,
.skill-tooltip,
.skill-tooltip strong {
  color: var(--ui-color-text);
}
.hunt-header-encounter {
  border-color: var(--ui-color-border-subtle);
  background: #090f1bdc;
}
.panel-kicker {
  border-bottom-color: #293e5870;
}
.member {
  border-color: #293e5874;
  background: #090f1bd9;
}
.member:hover {
  background: var(--ui-color-surface-raised);
}
.member:focus-visible {
  outline-color: var(--ui-color-focus);
}
.member-portrait {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface-control);
}
.member-name small,
.skill-tooltip-owner {
  color: #abc4e4;
}
.member-hp,
.member-xp,
.xp-track {
  background: #101c2c;
  border-color: #293e5880;
}
.skill-group-divided {
  border-left-color: #293e589c;
}
.skill:focus-visible {
  outline-color: var(--ui-color-focus);
}
.skill-lock {
  border-color: var(--ui-color-border);
  background: #090f1bf2;
  color: var(--ui-color-text);
}
.helper-control[data-tooltip]::after {
  border-color: var(--ui-color-border);
  background: var(--ui-color-background);
  color: var(--ui-color-text);
}

/* Shared selects contain several colors outside the token system. */
.custom-select-trigger {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
}
.custom-select-trigger:hover:not(:disabled),
.custom-select.is-open .custom-select-trigger {
  background: var(--ui-color-surface-raised);
}
.custom-select-trigger:focus-visible,
.custom-select-option:focus-visible,
.custom-select-buy:focus-visible {
  outline-color: var(--ui-color-focus);
}
.custom-select-primary {
  color: var(--ui-color-text);
}
.custom-select-chevron {
  color: var(--ui-color-text-muted);
}
.custom-select-menu {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface);
  box-shadow:
    0 7px 18px #02050bd9,
    inset 0 0 0 1px #7f9fc618;
  scrollbar-color: var(--ui-color-border) var(--ui-color-surface);
}
.custom-select-row + .custom-select-row {
  border-top-color: #293e5826;
}
.custom-select-row:hover,
.custom-select-row.is-active,
.custom-select-row:focus-within {
  background: var(--ui-color-surface-control);
}
.custom-select-option[aria-selected="true"] .custom-select-primary {
  color: var(--ui-color-accent-strong);
}
.custom-select-buy {
  color: var(--ui-color-accent);
}
.custom-select-buy:hover {
  color: var(--ui-color-accent-strong);
  background: var(--ui-color-surface-control);
}
.custom-select-buy::after {
  border-color: var(--ui-color-border);
  background: var(--ui-color-background);
  color: var(--ui-color-text);
}

/* Hunt list, filters, expanded destination and map dialogs. */
.hunt-menu-search,
.hunt-menu-count,
.hunt-destination-detail small,
.hunt-list-empty,
.hunt-menu-tabs button {
  color: var(--ui-color-text-muted);
}
.hunt-menu-search input {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
}
.hunt-menu-search input::placeholder {
  color: var(--ui-color-text-muted);
}
.hunt-menu-tabs {
  border-bottom-color: var(--ui-color-border-subtle);
}
.hunt-destination {
  border-color: #293e588c;
  background: var(--ui-color-surface);
}
.hunt-destination[data-locked="true"] {
  background: #080f1a;
}
.hunt-destination-visit {
  color: var(--ui-color-text);
}
.hunt-destination-icon {
  border-color: var(--ui-color-border);
  background-color: var(--ui-color-surface-control);
  color: #7f9fc6;
}
.hunt-destination-badge {
  border-color: var(--ui-color-border);
  color: #abc4e4;
}
.hunt-favorite {
  border-left-color: var(--ui-color-border);
  color: var(--ui-color-text-muted);
}
.hunt-favorite:hover,
.hunt-favorite[aria-pressed="true"] {
  color: #abc4e4;
}
.hunt-destination-expanded,
.hunt-map-status {
  background: var(--ui-color-surface);
}
.hunt-map-tooltip {
  background: #090f1bed;
}
.hunt-map-overlay {
  background: #040910dc;
}
.hunt-map-dialog {
  background: var(--ui-color-surface);
}
#hunt-map-close {
  background: var(--ui-color-surface-raised);
}

/* Menus, collection, team and shop keep their original structure. */
.drawer-empty,
.drawer-note,
.debug-intro,
.collection-summary small,
.collection-sort > span,
.shop-card-main small,
.pokemon-card-title small,
.pokemon-power small,
.iv-heading,
.iv-cell,
.iv-cell small,
.pokemon-card-foot > span,
.team-card-title > small,
.team-card-power > small,
.team-quality-line,
.team-card-power,
.depot-toolbar,
.quality-filter > span:first-child,
.depot-detail-heading span,
.depot-detail-foot span,
.depot-identity > strong small,
.depot-identity > small,
.depot-metrics,
.bulk-bar > div:first-child small,
.bag-totals,
.bag-totals small,
.bag-totals em,
.section-heading > strong,
.shop-row-main small,
.shop-row-meta,
.shop-exact,
.shop-total,
.shop-total small {
  color: var(--ui-color-text-muted);
}
.wallet-strip,
.team-replace-panel,
.bag-totals {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface-raised);
}
.wallet-strip,
.shop-card-meta,
.collection-summary,
.team-chevron {
  color: #7f9fc6;
}
.wallet-strip strong,
.collection-summary > strong,
.pokemon-power strong,
.iv-heading strong,
.iv-cell strong,
.pokemon-card-foot > span strong,
.team-card-power strong,
.team-card[open] .team-chevron,
.team-replace-panel > strong,
.depot-metrics strong,
.depot-actions > strong,
.bag-totals strong,
.shop-row-meta strong,
.shop-total strong {
  color: #abc4e4;
}
.shop-card-main strong,
.shop-card-meta strong,
.pokemon-card-title > strong,
.team-card,
.team-card-title > strong,
.team-replace-panel,
.depot-row,
.depot-identity > strong,
.bulk-bar,
.shop-row-main strong {
  color: var(--ui-color-text);
}
.drawer-tabs {
  background: var(--ui-color-surface);
}
.drawer-tabs button,
.collection-sort button {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface-raised);
  color: var(--ui-color-text-muted);
}
.shop-card,
.pokemon-card,
.team-card {
  border-color: var(--ui-color-border);
  background: linear-gradient(
    150deg,
    var(--ui-color-surface-raised),
    var(--ui-color-surface)
  );
}
.team-card[open]:not(.capture-focused) {
  border-color: #7f9fc6;
}
.pokemon-card-icon,
.depot-sprite {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface-control);
}
.iv-cell {
  border-color: #293e583d;
  background: #090f1ba8;
}
.iv-cell > i {
  background: #19263a;
}
.pokemon-card-foot,
.team-card-body {
  border-top-color: #293e5870;
}
.depot-search input,
.quality-filter-control,
.shop-exact input {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface);
  color: var(--ui-color-text);
}
.quality-filter-control select {
  color: var(--ui-color-text);
}
.depot-search input::placeholder {
  color: var(--ui-color-text-muted);
}
.depot-row,
.shop-row {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface-raised);
}
.depot-row:not(.capture-focused):hover,
.shop-row:hover {
  border-color: #7f9fc6;
  background: var(--ui-color-surface-control);
}
.shop-row.shop-targeted,
.shop-row.shop-targeted:hover {
  border-color: var(--identity-brand-red, #ef5b63);
  border-left-color: var(--identity-brand-red, #ef5b63);
  background: #ef5b6312;
  box-shadow:
    inset 0 0 0 1px #ef5b6357,
    0 0 13px #ef5b633d;
}
.depot-detail {
  border-color: color-mix(in srgb, var(--quality-color, #d8c185) 60%, #293e58);
  background: color-mix(in srgb, var(--quality-color, #d8c185) 7%, #090f1b);
}
.bulk-bar {
  border-color: var(--ui-color-border);
  background: #101a28f7;
}
.shop-buy-line {
  border-top-color: #293e583d;
}
.team-replace-options button,
.depot-actions button:not(.sell-pokemon),
.bulk-controls button:not(.danger):not(.bulk-sell),
.bulk-bar > button:not(.danger),
.shop-card-actions button:not(.use-action),
.shop-steps button,
.show-more {
  border-color: var(--ui-color-border);
  background: var(--ui-color-surface-control);
  color: var(--ui-color-text);
}
.team-replace-options button:hover,
.team-replace-options button:focus-visible,
.depot-actions button:not(.sell-pokemon):hover,
.bulk-controls button:not(.danger):not(.bulk-sell):hover,
.bulk-bar > button:not(.danger):hover,
.shop-steps button:hover {
  border-color: #abc4e4;
  background: #22344d;
}
.drawer.collection-drawer,
.drawer.bag-drawer,
.drawer.debug-drawer {
  scrollbar-color: var(--ui-color-border) var(--ui-color-surface);
}
.drawer.collection-drawer :is(button, input, select, summary):focus-visible,
.drawer.bag-drawer :is(button, input, select, summary):focus-visible,
.drawer.debug-drawer :is(button, input, select):focus-visible {
  outline-color: var(--ui-color-focus);
}

.brand,
.brand b {
  color: #f2eee3;
}
.brand .identity-poke {
  color: var(--identity-brand-red);
}
.brand-mark {
  display: none;
}
.brand,
.hunt-header-copy > strong,
.drawer-head h2,
.ha-analyzer h1,
.ha-section-heading h2 {
  font-synthesis: none;
}
/* The helper label is ported outside the scrolling card. */
:root[data-identity-tooltip-ready] .helper-control[data-tooltip]::after {
  content: none;
}
.identity-hover-tooltip {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(245px, calc(100vw - 16px));
  padding: 6px 8px;
  border: 1px solid var(--ui-color-border);
  background: var(--ui-color-background);
  color: var(--ui-color-text);
  box-shadow: 0 4px 13px #000a;
  font: 400 10px/1.3 var(--ui-font-body);
  white-space: normal;
  overflow-wrap: break-word;
  pointer-events: none;
}
/* Red leads headings and the current hunt indicator; navy surfaces support them. */
.ha-analyzer h1,
.ha-section-heading h2,
#hunt-header-label,
.party .panel-kicker,
.party .trainer-line > span,
.hunt-header-mark,
.hunt-header-encounters strong,
.hunt-header-state {
  color: var(--identity-brand-red);
}
.hunt-header-state {
  border-color: var(--identity-brand-red);
}
/* Blue accent tokens support surfaces. Interactive scopes use primary red. */
.nav-button,
.ui-nav-rail__item,
.ui-nav-rail__group-toggle,
.ui-nav-rail__mobile-toggle,
.ui-button--primary,
.hunt-menu-tabs,
.hunt-destination[data-selected="true"],
.custom-select,
.drawer-tabs,
.collection-sort,
.team-replace-option,
.depot-row.selected,
.shop-row.shop-targeted,
.shop-steps {
  --ui-color-accent: var(--identity-brand-red);
  --ui-color-accent-strong: #ff858b;
  --ui-color-focus: #ff858b;
}
.nav-button.active,
.nav-button:not(:disabled):hover {
  border-color: var(--identity-brand-red);
}
.member:hover {
  border-color: var(--identity-brand-red);
}
.hunt-menu-tabs button:hover,
.hunt-menu-tabs button.selected {
  color: #ff858b;
  background: #ef5b6318;
  border-bottom-color: var(--identity-brand-red);
}
.hunt-destination[data-selected="true"] {
  border-color: #ff858b;
  box-shadow: inset 3px 0 var(--identity-brand-red);
}
.hunt-destination-visit:hover {
  background: #ef5b6312;
}
.custom-select-trigger:hover:not(:disabled),
.custom-select.is-open .custom-select-trigger {
  border-color: var(--identity-brand-red);
}
.custom-select-row:hover,
.custom-select-row.active,
.custom-select-row:focus-within {
  background: #ef5b6312;
}
.ha-metric:hover,
.ha-metric[aria-expanded="true"] {
  border-color: var(--identity-brand-red);
  background: #ef5b630b;
}
.drawer-tabs button.active,
.collection-sort button.active {
  border-color: var(--identity-brand-red);
  color: #ff858b;
  background: #ef5b6318;
}
.depot-row.selected,
.depot-row:has(.depot-check input:checked) {
  border-color: var(--identity-brand-red);
  background: #ef5b6312;
}
.depot-check input {
  accent-color: var(--identity-brand-red);
}
.ui-button--primary,
.shop-buy {
  border-color: var(--ui-accent, var(--identity-action-red));
  background: var(--ui-accent, var(--identity-action-red));
  color: var(--identity-on-red);
}
.ui-button--primary:hover:not(:disabled),
.shop-buy:hover:not(:disabled) {
  border-color: var(--ui-accent, var(--identity-action-hover));
  background: var(--ui-accent, var(--identity-action-hover));
  color: var(--identity-on-red);
}
