/* Native dark presentation for the local TCGN adapter. Colour only: shared geometry stays in v1-shell/controls. */
html[data-tcgn-v1][data-theme='dark'] {
  color-scheme: dark;
  --page: #0c0e0e;
  --surface: #141717;
  --surface-secondary: #1a1e1e;
  --search: #1d2121;
  --border: #2b3030;
  --text: #f3f5f4;
  --muted: #9ca5a2;
  --disabled: #68716e;
  --hover: #232828;
  --border-hover: #69746f;
  --focus: #ff956e;
  --ribbon: #101313;
  --ribbon-text: #9ca5a2;
  --brand: var(--tcgn-product-accent, #ff7341);
  --mint: #ff7341;
  --brand-hover: #ff855a;
  --mint-hover: #ff855a;
  --brand-pressed: var(--tcgn-product-accent, #ed6332);
  --on-mint: #0c0e0e;
  --shell-canvas: var(--page);
  --shell-topbar: var(--page);
  --shell-sidebar: var(--page);
  --shell-elevated: var(--surface);
  --shell-search: var(--search);
  --shell-active-row: var(--hover);
  --shell-right-rail: var(--surface-secondary);
  --shell-border: var(--border);
  --shell-separator: var(--border);
  --shell-text-primary: var(--text);
  --shell-text-navigation: var(--text);
  --shell-text-muted: var(--muted);
  --canvas: var(--page);
  --text-muted: var(--muted);
  --nav-active: var(--hover);
  --control-border: #53605b;
}
html[data-tcgn-v1][data-theme='dark'] .sitestrip {
  --strip-rule: var(--border);
  --strip-active: var(--page);
}
html[data-tcgn-v1][data-theme='dark'] .sitestrip .sitestrip-network a:not([aria-current]):hover {
  background: var(--hover);
}
html[data-tcgn-v1][data-theme='dark'] .sitestrip :is(a[aria-current], .sitestrip-selector) {
  color: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] .tcgn-stationary > path {
  fill: var(--brand);
}
html[data-tcgn-v1][data-theme='dark'][data-review-meteor='neutral'] .tcgn-stationary > path {
  fill: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] .tcgn-stationary > g {
  fill: var(--muted);
}
html[data-tcgn-v1][data-theme='dark'] .tcgn-word-track {
  color: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] :is(.tcgn-browse-panel, .tcgn-primary.is-open) {
  box-shadow: none;
}
html[data-tcgn-v1]:not([data-tcgn-collection])[data-theme='dark']
  :is(.browse-tiles a, .v1-set-page .card-tile):hover {
  background: var(--surface);
  border-color: var(--border-hover);
}
html[data-tcgn-v1][data-theme='dark'] :is(.one-piece-logo img, .front-game img[src*='one-piece']) {
  filter: none;
  opacity: 1;
}
html[data-tcgn-v1][data-theme='dark'] :is(.tcgn-dropdown, .tcgn-select, .tcgn-search) {
  --tcgn-control-border: var(--control-border);
  --tcgn-control-focus: var(--focus);
  --tcgn-control-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f5f4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-tcgn-v1][data-theme='dark']
  #main
  .v1-set-page
  :is(.tcgn-dropdown, .tcgn-select, .tcgn-search),
html[data-tcgn-v1][data-theme='dark']
  :is(input, select, textarea, .toolbar-dialog, .search-preview) {
  background-color: var(--search);
  border-color: var(--control-border);
  color: var(--text);
  box-shadow: none;
}
html[data-tcgn-v1][data-theme='dark']
  #main
  .v1-set-page
  :is(.tcgn-dropdown, .tcgn-select, .tcgn-search):hover {
  background-color: var(--hover);
  border-color: var(--border-hover);
}
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .tcgn-search input,
html[data-tcgn-v1][data-theme='dark'] .platform-search input {
  background: transparent;
}
html[data-tcgn-v1][data-theme='dark'] :is(.tcgn-search > svg, .tcgn-dropdown .control-value) {
  color: var(--muted);
}
html[data-tcgn-v1][data-theme='dark'] input::placeholder {
  color: var(--muted);
  opacity: 1;
}
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .tcgn-select::picker(select) {
  background: var(--search);
  border-color: var(--control-border);
  color: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .tcgn-all-filters {
  background: var(--surface-secondary);
  color: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .tcgn-all-filters:hover {
  background: var(--hover);
}
html[data-tcgn-v1][data-theme='dark']
  :is(.button.secondary, .button:not(.primary), .btn-secondary) {
  background: transparent;
  border-color: var(--control-border);
  color: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] :is(.button.primary, .btn-primary, .button-primary) {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-mint);
}
html[data-tcgn-v1][data-theme='dark'] :is(.button.primary, .btn-primary, .button-primary):hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
html[data-tcgn-v1][data-theme='dark'] .v1-set-page progress,
html[data-tcgn-v1][data-theme='dark'] .v1-set-page progress::-webkit-progress-bar {
  background: var(--border);
}
html[data-tcgn-v1][data-theme='dark'] .v1-set-page .active-filter-chips button {
  background: var(--hover);
  color: var(--text);
}
html[data-tcgn-v1][data-theme='dark'] :is(.toolbar-dialog button, .toolbar-dialog label):hover {
  background-color: var(--hover);
}
html[data-tcgn-v1][data-theme='dark']
  :is(.toolbar-dialog button[aria-selected='true'], .toolbar-dialog button[aria-checked='true']) {
  background: var(--surface-secondary);
  color: #ff956e;
}
html[data-tcgn-v1][data-theme='dark'] .mobile-bottom-nav {
  --input: #1d2121;
  --brand: var(--tcgn-product-accent, #ff7341);
  --brand-pressed: var(--tcgn-product-accent, #ed6332);
  --canvas: var(--page);
  --shell-canvas: var(--page);
  --text-muted: var(--muted);
  --shell-text-primary: var(--text);
  --shell-text-muted: var(--muted);
  --shell-active-row: var(--hover);
  --nav-active: var(--hover);
  background: var(--surface-secondary);
  border-color: var(--border);
}
html[data-tcgn-v1][data-theme='dark'] .mobile-nav-scanner {
  background: var(--brand);
  color: var(--on-mint);
  box-shadow: none;
}
html[data-tcgn-v1][data-theme='dark'] :focus-visible,
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .tcgn-select:focus-visible {
  outline-color: var(--focus);
}
html[data-tcgn-v1][data-theme='dark'] .platform-search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
html[data-tcgn-v1][data-theme='dark'] :is(button:disabled, input:disabled, select:disabled) {
  color: var(--disabled);
}
html[data-tcgn-v1][data-theme='dark'] .front-catalogue-tile[href='/one-piece/sets/'] img {
  filter: none;
  opacity: 1;
}
html[data-tcgn-v1][data-theme='dark'] .front-search button {
  color: var(--on-mint);
}
html[data-tcgn-v1][data-theme='dark'] .front-catalogue-tile:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}
html[data-tcgn-v1][data-theme='dark'] :is(.platform-search, .front-search):hover {
  background: var(--hover);
}
html[data-tcgn-v1][data-theme='dark'] .front-search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Correction: confined to the ME04 Collection preview. Shared header geometry is untouched. */
html[data-tcgn-v1][data-theme='dark']
  #main
  .v1-set-page
  :is(.tcgn-dropdown, .tcgn-search, .tcgn-select) {
  border-color: var(--control-border);
}
html[data-tcgn-v1][data-theme='dark']
  #main
  .v1-set-page
  :is(.collection-primary, .collection-metrics-bar, .collection-metrics-bar > div) {
  background: transparent;
  box-shadow: none;
}
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .active-filter-chips button {
  background: var(--surface);
}
html[data-tcgn-v1][data-theme='dark'] #main .v1-set-page .tcgn-select::picker(select) {
  border-color: var(--control-border);
}

/* Fixed Frame 59 paths, revealed bottom-to-top with the existing word slides. */
html[data-tcgn-v1] .tcgn-stationary > path {
  fill: var(--meteor-base, #ff7341);
}
html[data-tcgn-v1] .tcgn-stationary > .meteor-colour-layer {
  clip-path: inset(100% 0 0) fill-box;
}
html[data-tcgn-v1] .tcgn-stationary > g.meteor-colour-layer.meteor-colour-stock {
  fill: #c190ff;
}
html[data-tcgn-v1] .tcgn-stationary > g.meteor-colour-layer.meteor-colour-exchange {
  fill: var(--meteor-second, #02fdcf);
}
html[data-tcgn-v1] .tcgn-stationary > g.meteor-colour-layer.meteor-colour-tracker {
  fill: var(--meteor-return, #ff7341);
}
html[data-tcgn-v1] .meteor-colour-layer > path {
  fill: inherit;
}
html[data-tcgn-v1] .wordmark-playing .meteor-colour-layer {
  animation-duration: 1500ms;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
html[data-tcgn-v1] .wordmark-playing .meteor-colour-stock {
  animation-name: meteor-stock-fill;
}
html[data-tcgn-v1] .wordmark-playing .meteor-colour-exchange {
  animation-name: meteor-exchange-fill;
}
html[data-tcgn-v1] .wordmark-playing .meteor-colour-tracker {
  animation-name: meteor-tracker-fill;
}
@keyframes meteor-stock-fill {
  0%,
  16% {
    clip-path: inset(100% 0 0) fill-box;
  }
  30%,
  100% {
    clip-path: inset(0 0 0) fill-box;
  }
}
@keyframes meteor-exchange-fill {
  0%,
  49% {
    clip-path: inset(100% 0 0) fill-box;
  }
  63%,
  100% {
    clip-path: inset(0 0 0) fill-box;
  }
}
@keyframes meteor-tracker-fill {
  0%,
  82% {
    clip-path: inset(100% 0 0) fill-box;
  }
  96%,
  100% {
    clip-path: inset(0 0 0) fill-box;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-tcgn-v1] .tcgn-stationary > path {
    fill: var(--meteor-base, #ff7341) !important;
  }
  html[data-tcgn-v1] .meteor-colour-layer {
    display: none;
    animation: none !important;
  }
  html[data-tcgn-v1] .tcgn-word-track,
  html[data-tcgn-v1] .tcgn-word-track > span {
    animation: none !important;
  }
}
