/* Extracted from static/index.html during frontend structure refactor. */

    :root {
      --position-grail: #F6C85F;
      --position-grail-soft: rgba(246, 200, 95, 0.16);
      --position-strong-premium: #A78BFA;
      --position-strong-premium-soft: rgba(167, 139, 250, 0.16);
      --position-set-standout: #6EA8FF;
      --position-set-standout-soft: rgba(110, 168, 255, 0.16);
      --position-quiet-standout: #F0A93A;
      --position-quiet-standout-soft: rgba(240, 169, 58, 0.16);
      --position-chase-market: #4F8CFF;
      --position-chase-market-soft: rgba(79, 140, 255, 0.16);
      --position-above-expected: #55D6D2;
      --position-above-expected-soft: rgba(85, 214, 210, 0.16);
      --position-below-expected: #FF7A6E;
      --position-below-expected-soft: rgba(255, 122, 110, 0.16);
      --position-market-aligned: #8CB6E8;
      --position-market-aligned-soft: rgba(140, 182, 232, 0.16);
      --position-limited-data: #B18CFF;
      --position-limited-data-soft: rgba(177, 140, 255, 0.14);
      --position-typical-market: #9AA7BD;
      --position-typical-market-soft: rgba(154, 167, 189, 0.12);
      --signal-breakout: #35F0D0;
      --signal-breakout-glow: rgba(53, 240, 208, 0.32);
      --signal-momentum: #2E8F66;
      --signal-momentum-soft: rgba(46, 143, 102, 0.18);
      --signal-cooling: #74C7F5;
      --signal-cooling-soft: rgba(116, 199, 245, 0.18);
      --signal-low-value-uptick: #8CCF7A;
      --signal-low-value-dip: #F59E5B;
      --signal-volatile: #A78BFA;
      --signal-stable: #8FA3BF;
      --signal-fresh-market: #67D8F7;
      --signal-declining: #FF6B6B;
      --signal-insufficient: #6F7F95;
    }

    html,
    body {
      max-width: 100%;
    }

    body {
      overflow-x: clip;
    }

    body.side-nav-open {
      overflow: hidden;
    }

    .app-toast-stack {
      position: fixed;
      top: 18px;
      right: 18px;
      z-index: 1100;
      display: grid;
      gap: 10px;
      pointer-events: none;
    }

    .app-toast {
      min-width: 240px;
      max-width: min(420px, calc(100vw - 36px));
      padding: 11px 14px;
      border-radius: 14px;
      border: 1px solid rgba(94, 234, 168, 0.22);
      background:
        linear-gradient(135deg, rgba(94, 234, 168, 0.12), rgba(94, 234, 168, 0) 42%),
        rgba(13, 21, 34, 0.94);
      color: #e8fff3;
      box-shadow: 0 10px 28px rgba(3, 9, 18, 0.28);
      font-size: 13px;
      line-height: 1.35;
      font-weight: 600;
      opacity: 0;
      transform: translateY(-6px);
      transition: opacity 160ms ease, transform 160ms ease;
      backdrop-filter: blur(10px);
    }

    .app-toast.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .app-toast.is-success {
      border-color: rgba(74, 222, 128, 0.26);
      background:
        linear-gradient(135deg, rgba(74, 222, 128, 0.14), rgba(74, 222, 128, 0) 42%),
        rgba(13, 21, 34, 0.94);
      color: #e7fff1;
    }

    .main,
.surface,
.section-head,
.section-title,
.mini-title{
      min-width: 0;
    }

    input,
    select {
      border: 1px solid var(--line);
      background: var(--field-bg);
      border-radius: var(--radius-xs);
      padding: 10px 12px;
      outline: none;
      transition: border-color 140ms ease, background 140ms ease;
    }

    input:focus,
    select:focus {
      border-color: rgba(var(--accent-rgb), 0.72);
      background: var(--field-focus-bg);
    }

    .app-shell {
      display: block;
      min-height: 100vh;
    }

    .side-nav-backdrop {
      position: fixed;
      inset: 0;
      z-index: 110;
      border: 0;
      padding: 0;
      background: rgba(5, 10, 18, 0.62);
      backdrop-filter: blur(10px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 180ms ease, visibility 180ms ease;
    }

    .side-nav {
      position: fixed;
      top: 16px;
      left: 16px;
      bottom: 16px;
      width: min(280px, calc(100vw - 32px));
      max-width: calc(100vw - 32px);
      z-index: 120;
      border: 1px solid color-mix(in srgb, var(--accent-border-subtle) 26%, var(--surface-border-soft) 74%);
      border-radius: 28px;
      background:
        radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 26%),
        linear-gradient(180deg, var(--panel-nav-start) 0%, var(--panel-nav-end) 100%);
      padding: 14px var(--space-4) var(--space-5);
      display: flex;
      flex-direction: column;
      gap: var(--space-5);
      backdrop-filter: blur(18px);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 28px 56px rgba(3, 8, 18, 0.34);
      overflow-y: auto;
      overscroll-behavior: contain;
      transform: translateX(calc(-100% - 28px));
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: transform 220ms ease, opacity 180ms ease, visibility 180ms ease;
    }

    body.side-nav-open .side-nav-backdrop {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    body.side-nav-open .side-nav {
      transform: translateX(0);
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .side-nav-topbar {
      display: flex;
      justify-content: flex-end;
      margin-bottom: -8px;
    }

    .side-nav-close {
      width: 40px;
      min-width: 40px;
      height: 40px;
      border-radius: 999px;
      border: 1px solid rgba(150, 176, 220, 0.2);
      background: rgba(255, 255, 255, 0.035);
      color: var(--text-strong);
      font-size: 24px;
      line-height: 1;
      box-shadow: 0 8px 18px rgba(2, 8, 18, 0.18);
      transition: border-color var(--dur), background var(--dur), transform var(--dur);
    }

    .side-nav-close:hover,
    .side-nav-close:focus-visible {
      border-color: rgba(var(--accent-rgb), 0.46);
      background: rgba(var(--accent-rgb), 0.12);
      transform: translateY(-1px);
    }

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: -5px;
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.brand-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.brand-tagline {
  display: inline-grid;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-align: center;
}

.brand .brand-tagline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;

  font-size: var(--tagline-font-size);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: var(--tagline-opacity);
}

.brand .tagline-line {
  display: grid;
  grid-template-columns: 3ch auto;
  align-items: baseline;
}

.brand .tagline-prefix {
  display: inline-block;
  width: 3ch;
  text-align: left;
}

.brand .tagline-rest {
  display: inline-block;
}

.brand .accent {
  font-weight: 700;
  color: var(--text-primary);
}

/* Fjern eller kommenter ut den gamle .brand-tagline-regelen helt */
    .nav-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .nav-item {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-3);
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid transparent;
      color: var(--text-muted);
      transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
      text-align: left;
      font-size: 14px;
      text-decoration: none;
    }

    .nav-item:hover {
      background: var(--accent-soft);
      color: var(--text);
      border-color: rgba(var(--accent-rgb), 0.24);
      transform: translateX(1px);
    }

    .nav-item.is-active {
      color: color-mix(in srgb, var(--accent) 22%, white 78%);
      border-color: rgba(var(--accent-rgb), 0.52);
      background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.24) 0%, rgba(var(--accent-rgb), 0.08) 100%);
      box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.2);
    }

    .nav-meta {
      color: var(--text-soft);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .side-foot {
      margin-top: auto;
      border: 1px solid var(--line);
      background: var(--panel-soft);
      border-radius: var(--radius-sm);
      padding: 12px;
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.5;
    }

    .side-foot a {
      color: color-mix(in srgb, var(--accent) 58%, white 42%);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .main {
      min-width: 0;
      padding: var(--space-5) var(--space-6) var(--space-8);
      display: flex;
      flex-direction: column;
      gap: var(--space-5);
    }

    .main-toolbar {
      position: sticky;
      top: 10px;
      z-index: 38;
      display: flex;
      align-items: center;
      gap: 12px;
      justify-content: space-between;
      margin-bottom: -4px;
      pointer-events: none;
    }

    .main-toolbar-actions {
      pointer-events: auto;
      margin-left: auto;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex: 0 0 auto;
    }

    .mobile-card-detail-back {
      /* This control belongs exclusively to the narrow-screen contextual
         toolbar. Keep it hidden even though the generic .btn rule is declared
         later and even when route initialization removes [hidden]. */
      display: none !important;
    }

    .main-toolbar-currency {
      min-height: 46px;
      padding: 10px 12px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        rgba(10, 18, 33, 0.78);
      border-color: color-mix(in srgb, var(--accent-border-subtle) 18%, var(--surface-border-soft) 82%);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(2, 8, 18, 0.12);
      backdrop-filter: blur(16px);
    }

    .main-toolbar-currency select {
      min-width: 64px;
    }

    .currency-combobox {
      min-width: 0;
    }

    .currency-combobox .browser-combobox-shell {
      min-height: 46px;
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .currency-combobox-native {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      border: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      clip-path: inset(50%);
      white-space: nowrap;
    }

    .currency-combobox input {
      min-width: 0;
      font-size: 14px;
      font-weight: 600;
      text-overflow: ellipsis;
    }

    .currency-combobox-toggle {
      border: 0;
      background: transparent;
      color: var(--text-soft);
      min-width: 22px;
      padding: 0;
      font-size: 15px;
      line-height: 1;
      cursor: pointer;
    }

    .currency-combobox-toggle:hover {
      color: var(--text);
    }

    .currency-combobox-menu {
      gap: 8px;
    }

    .currency-combobox[data-open="true"] {
      z-index: 160;
    }

    .currency-combobox .browser-combobox-group-options {
      gap: 4px;
    }

    .currency-combobox .browser-combobox-option {
      padding: 10px 12px;
    }

    .currency-combobox-option-main {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      min-width: 0;
      flex: 1 1 auto;
    }

    .currency-combobox-flag {
      flex: none;
      font-size: 16px;
      line-height: 1;
      align-self: center;
    }

    .currency-combobox-option-copy {
      min-width: 0;
    }

    .currency-combobox-option-primary {
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .currency-combobox .browser-combobox-option-label {
      font-size: 13px;
      font-weight: 650;
    }

    .currency-combobox .browser-combobox-option-meta {
      font-size: 11px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }





    .daily-refresh-status {
      pointer-events: none;
      flex: 1 1 auto;
      max-width: min(560px, calc(100vw - 132px));
      display: none;
      gap: 8px;
      padding: 9px 13px 10px;
      border: 1px solid rgba(115, 146, 194, 0.12);
      border-radius: 16px;
      background: rgba(11, 19, 34, 0.62);
      box-shadow: 0 8px 22px rgba(3, 8, 18, 0.08);
      backdrop-filter: blur(14px);
    }

    .daily-refresh-status.is-visible {
      display: grid;
    }

    .daily-refresh-status-copy {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .daily-refresh-status-label {
      margin: 0;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(184, 200, 228, 0.74);
      white-space: nowrap;
    }

    .daily-refresh-status-summary {
      margin: 0;
      flex: 1 1 auto;
      min-width: 0;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.25;
      color: rgba(236, 244, 255, 0.94);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: right;
    }

    .daily-refresh-status-meta {
      margin: 0;
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.02em;
      color: rgba(171, 188, 214, 0.78);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .daily-refresh-status-track {
      position: relative;
      overflow: hidden;
      height: 4px;
      border-radius: 999px;
      background: rgba(125, 145, 178, 0.18);
    }

    .daily-refresh-status-fill {
      position: absolute;
      inset: 0 auto 0 0;
      width: 0;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(108, 170, 255, 0.92), rgba(122, 245, 222, 0.92));
      box-shadow: 0 0 14px rgba(108, 170, 255, 0.22);
      transition: width 220ms ease;
    }

    .daily-refresh-status.is-completed {
      border-color: rgba(122, 237, 197, 0.16);
      background: rgba(10, 20, 28, 0.6);
    }

    .daily-refresh-status.is-completed .daily-refresh-status-fill {
      background: linear-gradient(90deg, rgba(120, 214, 174, 0.86), rgba(110, 188, 255, 0.78));
      box-shadow: none;
    }

    .daily-refresh-status.is-indeterminate .daily-refresh-status-fill {
      width: 34%;
      animation: daily-refresh-indeterminate 1.35s ease-in-out infinite;
    }

    .daily-refresh-status.is-failed {
      border-color: rgba(255, 112, 112, 0.22);
      background: rgba(24, 14, 20, 0.82);
    }

    .daily-refresh-status.is-failed .daily-refresh-status-fill {
      background: linear-gradient(90deg, rgba(255, 120, 120, 0.92), rgba(255, 168, 120, 0.92));
      box-shadow: none;
    }

    @keyframes daily-refresh-indeterminate {
      0% {
        transform: translateX(-18%);
      }
      50% {
        transform: translateX(118%);
      }
      100% {
        transform: translateX(-18%);
      }
    }

    @media (max-width: 720px) {
      .main-toolbar {
        align-items: stretch;
      }

      .main-toolbar-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
      }

      .daily-refresh-status {
        max-width: none;
      }

      .daily-refresh-status-copy {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
      }

      .daily-refresh-status-summary,
      .daily-refresh-status-meta {
        text-align: left;
        white-space: normal;
      }
    }

    .side-nav-toggle {
      pointer-events: auto;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-height: 46px;
      padding: 10px 14px;
      border: 1px solid color-mix(in srgb, var(--accent-border-subtle) 24%, var(--surface-border-soft) 76%);
      border-radius: 16px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        rgba(10, 18, 33, 0.82);
      color: var(--text-strong);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 28px rgba(2, 8, 18, 0.18);
      backdrop-filter: blur(16px);
      transition: border-color var(--dur), background var(--dur), transform var(--dur), box-shadow var(--dur), opacity var(--dur);
    }

    .side-nav-toggle:hover,
    .side-nav-toggle:focus-visible {
      border-color: rgba(var(--accent-rgb), 0.42);
      background:
        linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.08)),
        rgba(10, 18, 33, 0.88);
      transform: translateY(-1px);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 32px rgba(2, 8, 18, 0.22);
    }

    body.side-nav-open .side-nav-toggle {
      opacity: 0;
      pointer-events: none;
      transform: translateY(-4px);
    }

    .side-nav-toggle-icon {
      width: 16px;
      display: inline-grid;
      gap: 3px;
    }

    .side-nav-toggle-icon span {
      display: block;
      width: 16px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
      box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.22);
    }

    .side-nav-toggle-label {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .global-footer {
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--panel-soft);
      padding: 14px 16px;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.55;
      display: grid;
      gap: 6px;
    }

    .global-footer a {
      color: color-mix(in srgb, var(--accent) 48%, white 52%);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .global-footer-links {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .global-footer-links span {
      color: var(--text-soft);
    }

    .side-utility {
      display: grid;
      gap: 10px;
    }

    .side-utility-select {
      width: 100%;
    }

    .image-attribution {
      margin: 8px 0 0;
      font-size: 11px;
      color: var(--text-soft);
      line-height: 1.4;
    }

    body.dexseq-legal-page {
      min-height: 100vh;
      margin: 0;
      background:
        radial-gradient(circle at 18% 0%, rgba(37, 68, 117, 0.22), transparent 34%),
        radial-gradient(circle at 82% 12%, rgba(52, 89, 152, 0.12), transparent 28%),
        #07101d;
      color: var(--text-primary);
      font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    }

    .legal-shell {
      width: min(1040px, calc(100% - 32px));
      margin: 0 auto;
      padding: 32px 0 40px;
      display: grid;
      gap: 18px;
    }

    .legal-hero,
    .legal-panel,
    .legal-footnote {
      border: 1px solid var(--line);
      border-radius: 24px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
        rgba(11, 19, 33, 0.92);
      box-shadow: 0 16px 44px rgba(3, 10, 20, 0.22);
      backdrop-filter: blur(12px);
    }

    .legal-hero {
      padding: 26px 28px 24px;
      display: grid;
      gap: 14px;
    }

    .legal-back-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      width: fit-content;
      padding: 9px 13px;
      border: 1px solid rgba(155, 178, 214, 0.2);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 600;
      text-decoration: none;
    }

    .legal-back-link:hover {
      border-color: rgba(155, 178, 214, 0.34);
      background: rgba(255, 255, 255, 0.05);
    }

    .legal-kicker {
      margin: 0;
      font-size: var(--type-label);
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .legal-title {
      margin: 0;
      font-family: "Space Grotesk", sans-serif;
      font-size: clamp(34px, 5vw, 48px);
      line-height: 1.02;
      letter-spacing: -0.03em;
      color: var(--text-primary);
    }

    .legal-summary,
    .legal-meta {
      margin: 0;
      max-width: 760px;
      color: var(--text-muted);
      font-size: 15px;
      line-height: 1.65;
    }

    .legal-meta {
      font-size: 13px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .legal-panel {
      padding: 8px 28px;
      display: grid;
    }

    .legal-section {
      padding: 20px 0 22px;
      border-top: 1px solid rgba(149, 173, 209, 0.12);
    }

    .legal-section:first-child {
      border-top: none;
    }

    .legal-section h2 {
      margin: 0 0 10px;
      font-family: "Space Grotesk", sans-serif;
      font-size: 22px;
      line-height: 1.15;
      color: var(--text-primary);
    }

    .legal-section p {
      margin: 0;
      color: var(--text-muted);
      font-size: 15px;
      line-height: 1.72;
    }

    .legal-section p + p,
    .legal-section p + .legal-inline-link-row,
    .legal-section .legal-inline-link-row + p {
      margin-top: 12px;
    }

    .legal-inline-link-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      font-size: 14px;
      color: var(--text-muted);
    }

    .legal-inline-link,
    .legal-footnote a {
      color: color-mix(in srgb, var(--accent) 46%, white 54%);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .legal-muted-link {
      color: var(--text-soft);
      text-decoration: none;
      cursor: default;
    }

    .legal-footnote {
      padding: 14px 18px;
      color: var(--text-soft);
      font-size: 12px;
      line-height: 1.6;
    }

    .rights-form {
      display: grid;
      gap: 16px;
    }

    .rights-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .rights-form-field {
      display: grid;
      gap: 7px;
      min-width: 0;
    }

    .rights-form-field.is-full {
      grid-column: 1 / -1;
    }

    .rights-form-label {
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .rights-form-input,
    .rights-form-select,
    .rights-form-textarea {
      width: 100%;
      border: 1px solid rgba(149, 173, 209, 0.18);
      border-radius: 16px;
      background: rgba(7, 14, 24, 0.88);
      color: var(--text-primary);
      padding: 12px 14px;
      font: inherit;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    }

    .rights-form-textarea {
      min-height: 120px;
      resize: vertical;
    }

    .rights-form-input::placeholder,
    .rights-form-textarea::placeholder {
      color: var(--text-soft);
    }

    .rights-form-input:focus,
    .rights-form-select:focus,
    .rights-form-textarea:focus {
      outline: none;
      border-color: rgba(91, 172, 255, 0.52);
      box-shadow: 0 0 0 3px rgba(52, 119, 207, 0.18);
    }

    .rights-form-checkbox {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 14px 16px;
      border: 1px solid rgba(149, 173, 209, 0.16);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.02);
      color: var(--text-muted);
      font-size: 14px;
      line-height: 1.55;
    }

    .rights-form-checkbox input {
      margin-top: 2px;
      accent-color: #5ca9ff;
    }

    .rights-form-submit-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
    }

    .rights-form-note {
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.55;
    }

    .rights-form-submit {
      border: 1px solid rgba(149, 173, 209, 0.2);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.03);
      color: rgba(233, 240, 255, 0.56);
      padding: 11px 16px;
      font: 600 14px/1 "IBM Plex Sans", sans-serif;
      cursor: not-allowed;
    }

    @media (max-width: 800px) {
      .legal-shell {
        width: min(100%, calc(100% - 24px));
        padding: 24px 0 32px;
      }

      .legal-hero,
      .legal-panel {
        padding-left: 18px;
        padding-right: 18px;
      }

      .rights-form-grid {
        grid-template-columns: 1fr;
      }
    }

    .section-head-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: flex-start;
      justify-content: flex-end;
      min-width: 0;
    }

    .control-select-wrap,
    .currency-wrap {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      border: 1px solid var(--line);
      border-radius: var(--radius-xs);
      background: var(--panel-elevated);
      padding: 8px 10px;
      color: var(--text-muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .control-select-wrap select,
    .currency-wrap select {
      border: 0;
      background: transparent;
      color: var(--text);
      font-size: 13px;
      padding: 0;
      min-width: 80px;
    }

    .mobile-nav {
      display: none;
      position: fixed;
      left: max(12px, env(safe-area-inset-left));
      right: max(12px, env(safe-area-inset-right));
      bottom: max(12px, env(safe-area-inset-bottom));
      z-index: 40;
      align-items: stretch;
      gap: 4px;
      padding: 8px;
      border: 1px solid rgba(150, 176, 220, 0.16);
      border-radius: 24px;
      background:
        linear-gradient(180deg, rgba(14, 20, 32, 0.96) 0%, rgba(9, 13, 22, 0.98) 100%);
      box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
      backdrop-filter: blur(14px);
    }

    .mobile-nav .nav-item {
      flex: 1 1 0;
      min-width: 0;
      min-height: 58px;
      padding: 9px 6px 8px;
      border: 1px solid transparent;
      background: transparent;
      border-radius: 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.1;
      text-align: center;
      transform: none;
      text-decoration: none;
    }

    .mobile-nav .nav-item:hover {
      transform: none;
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(150, 176, 220, 0.12);
    }

    .mobile-nav .nav-item.is-active {
      color: var(--text-primary);
      background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.32) 0%, rgba(var(--accent-rgb), 0.18) 100%);
      border-color: rgba(var(--accent-rgb), 0.44);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    }

    .mobile-nav-icon {
      width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      font-size: 18px;
      line-height: 1;
    }

    .mobile-nav-label {
      display: block;
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .settings-modal {
      position: fixed;
      inset: 0;
      z-index: 120;
      display: grid;
      place-items: center;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 160ms ease, visibility 160ms ease;
    }

    .settings-modal.is-open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .settings-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(5, 10, 18, 0.7);
      backdrop-filter: blur(12px);
    }

    .settings-modal-dialog {
      position: relative;
      width: min(460px, calc(100vw - 28px));
      max-width: calc(100vw - 28px);
      border: 1px solid rgba(150, 176, 220, 0.18);
      border-radius: 22px;
      background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.16), transparent 34%),
        linear-gradient(180deg, rgba(18, 26, 40, 0.98) 0%, rgba(9, 13, 22, 0.98) 100%);
      box-shadow: 0 28px 56px rgba(0, 0, 0, 0.46);
      padding: 18px;
      display: grid;
      gap: 16px;
    }

    .settings-modal-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 12px;
    }

    .settings-modal-title {
      font-size: 24px;
      line-height: 1.1;
    }

    .settings-modal-close {
      width: 40px;
      min-width: 40px;
      height: 40px;
      border-radius: 999px;
      border: 1px solid rgba(150, 176, 220, 0.18);
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-strong);
      font-size: 24px;
      line-height: 1;
    }

    .settings-modal-body {
      display: grid;
      gap: 12px;
    }

    .page {
      display: none;
      gap: var(--space-5);
      flex-direction: column;
    }

    .page.is-active {
      display: flex;
    }

    .surface {
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, var(--panel-shell-start) 0%, var(--panel-shell-end) 100%);
      box-shadow: var(--shadow-card);
      padding: var(--space-5);
      min-width: 0;
    }

    .section-archetype-focal,
    .section-archetype-primary,
    .section-archetype-secondary,
    .section-archetype-utility {
      position: relative;
      overflow: hidden;
    }

    .section-archetype-focal::after,
    .section-archetype-primary::after {
      content: "";
      position: absolute;
      inset: 0 auto auto 0;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.82), rgba(var(--accent-rgb), 0));
      pointer-events: none;
    }

    .section-archetype-secondary {
      background: linear-gradient(180deg, color-mix(in srgb, var(--panel-shell-start) 86%, black 14%) 0%, color-mix(in srgb, var(--panel-shell-end) 90%, black 10%) 100%);
      border-color: var(--surface-border-faint);
    }

    .section-archetype-utility {
      background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 92%, black 8%) 0%, color-mix(in srgb, var(--panel-elevated) 90%, black 10%) 100%);
      border-color: var(--surface-border-faint);
      box-shadow: none;
    }

    .section-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-3);
      margin-bottom: var(--space-4);
    }

    .section-head--compact {
      margin-bottom: var(--space-3);
    }

    .section-kicker {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-soft);
      margin: 0 0 7px;
      font-weight: 600;
    }

    .section-title {
      margin: 0;
      font-family: "Space Grotesk", sans-serif;
      font-size: 22px;
      line-height: 1.18;
      letter-spacing: 0.01em;
    }

    .section-subtitle {
      margin: 6px 0 0;
      color: var(--text-muted);
      font-size: 13px;
      max-width: 800px;
    }

    .grid-2 {
      display: grid;
      gap: var(--space-5);
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
      display: grid;
      gap: var(--space-4);
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid-4 {
      display: grid;
      gap: var(--space-3);
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stat-card {
      border-radius: var(--radius-sm);
      background: var(--surface-card-soft);
      padding: 12px 14px;
      min-width: 0;
    }

    .stat-label {
      color: var(--text-soft);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin: 0;
    }

    .term-help {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      cursor: help;
      text-decoration: underline;
      text-decoration-style: dotted;
      text-underline-offset: 2px;
      text-decoration-color: rgba(var(--accent-rgb), 0.5);
    }

    .metric-help-inline {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .metric-help-text {
      min-width: 0;
    }

    .metric-info-trigger {
      width: 16px;
      height: 16px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-radius: 50%;
      border: 1px solid rgba(132, 170, 216, 0.18);
      background: rgba(12, 22, 37, 0.78);
      color: rgba(202, 219, 241, 0.76);
      font-size: 10px;
      line-height: 1;
      font-weight: 700;
      transition: border-color var(--dur), color var(--dur), background var(--dur);
      cursor: pointer;
    }

    .metric-info-trigger:hover,
    .metric-info-trigger:focus-visible {
      border-color: rgba(132, 184, 255, 0.34);
      color: rgba(234, 242, 252, 0.94);
      background: rgba(15, 28, 46, 0.92);
      outline: none;
    }

    .stat-value {
      margin: 8px 0 0;
      font-size: 24px;
      line-height: 1.1;
      font-weight: 700;
      font-family: "Space Grotesk", sans-serif;
      min-height: 26px;
      color: var(--text-strong);
    }

    .stat-note {
      margin: 6px 0 0;
      color: var(--text-muted);
      font-size: 12px;
      min-height: 17px;
    }











    .page-section {
      border-color: var(--surface-border-faint);
      background: linear-gradient(180deg, var(--panel-shell-start) 0%, var(--panel-shell-end) 100%);
      padding: clamp(20px, 2.6vw, 28px);
    }

    .hero-grid {
      display: grid;
      gap: var(--space-4);
      grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    }

    .hero-blurb {
      margin: 0;
      color: var(--text-muted);
      max-width: 58ch;
      font-size: 15px;
      line-height: 1.56;
    }

    .feature-list {
      margin: var(--space-4) 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 9px;
    }

    .feature-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      color: var(--text-muted);
      font-size: 13px;
    }

    .feature-dot {
      width: 8px;
      height: 8px;
      margin-top: 6px;
      border-radius: 50%;
      background: linear-gradient(180deg, var(--accent-grad-start) 0%, var(--accent-grad-end) 100%);
      flex-shrink: 0;
    }

    .control-row {
      display: grid;
      grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
      gap: var(--space-3);
      align-items: end;
    }

    .browser-search-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      margin-bottom: 12px;
    }

    .browser-search {
      border: 1px solid color-mix(in srgb, var(--accent-border-subtle) 38%, var(--surface-border-soft) 62%);
      background: linear-gradient(180deg, color-mix(in srgb, var(--field-bg) 78%, rgba(var(--accent-rgb), 0.05) 22%) 0%, color-mix(in srgb, var(--field-bg) 95%, black 5%) 100%);
      border-radius: 18px;
      min-height: 52px;
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 0 12px 0 16px;
      transition: border-color var(--dur), box-shadow var(--dur), background var(--dur), transform var(--dur);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
    }

    .browser-search:focus-within {
      border-color: var(--accent-border-strong);
      background: linear-gradient(180deg, color-mix(in srgb, var(--field-focus-bg) 82%, rgba(var(--accent-rgb), 0.08) 18%) 0%, color-mix(in srgb, var(--field-focus-bg) 95%, black 5%) 100%);
      box-shadow: var(--focus-ring-strong);
      transform: translateY(-1px);
    }

    .browser-search-icon {
      color: color-mix(in srgb, var(--accent) 28%, var(--text-soft) 72%);
      font-size: 18px;
      line-height: 1;
    }

    .browser-search input {
      border: 0;
      background: transparent;
      padding: 0;
      min-height: 44px;
      font-size: 16px;
      color: var(--text-strong);
      font-weight: 550;
    }

    .browser-search input:focus {
      border: 0;
      background: transparent;
    }

    .browser-combobox {
      position: relative;
      min-width: 0;
      overflow: visible;
      z-index: 120;
    }

    .browser-combobox-shell {
      border: 1px solid color-mix(in srgb, var(--accent-border-subtle) 42%, var(--surface-border-soft) 58%);
      background: linear-gradient(180deg, color-mix(in srgb, var(--field-bg) 82%, rgba(var(--accent-rgb), 0.08) 18%) 0%, color-mix(in srgb, var(--field-bg) 96%, black 4%) 100%);
      border-radius: 16px;
      min-height: var(--control-height-lg);
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 0 12px 0 14px;
      transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .browser-combobox[data-open="true"] .browser-combobox-shell,
    .browser-combobox:focus-within .browser-combobox-shell {
      border-color: var(--accent-border-strong);
      background: linear-gradient(180deg, color-mix(in srgb, var(--field-focus-bg) 84%, rgba(var(--accent-rgb), 0.12) 16%) 0%, color-mix(in srgb, var(--field-focus-bg) 96%, black 4%) 100%);
      box-shadow: var(--focus-ring-strong);
    }

    .browser-combobox[data-open="true"] {
      z-index: 90;
    }

    .browser-combobox input {
      border: 0;
      background: transparent;
      padding: 0;
      min-height: 46px;
      font-size: 15px;
      color: var(--text-strong);
    }

    .browser-combobox input:focus {
      border: 0;
      background: transparent;
    }

    .browser-combobox-menu {
      position: absolute;
      top: calc(100% + 10px);
      left: 0;
      right: 0;
      z-index: 1400;
      display: grid;
      gap: 10px;
      max-height: min(68vh, 560px);
      overflow: auto;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
      padding: 8px;
      border-radius: 18px;
      border: 1px solid color-mix(in srgb, var(--accent-border-subtle) 46%, var(--surface-border-faint) 54%);
      background:
        linear-gradient(180deg, color-mix(in srgb, var(--panel-shell-start) 86%, black 14%) 0%, color-mix(in srgb, var(--panel-shell-end) 96%, black 4%) 100%);
      box-shadow: 0 22px 38px rgba(2, 8, 18, 0.42);
    }

    .browser-combobox-menu[hidden] {
      display: none !important;
    }

    .browser-combobox-group {
      display: grid;
      gap: 8px;
    }

    .browser-combobox-group-head {
      position: sticky;
      top: 0;
      z-index: 2;
      margin: 0;
      padding: 7px 10px 6px;
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(13, 21, 40, 0.98) 0%, rgba(13, 21, 40, 0.94) 100%);
      box-shadow: 0 8px 18px rgba(2, 8, 18, 0.16);
    }

    .browser-combobox-group-title {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: color-mix(in srgb, var(--accent) 12%, var(--text-soft) 88%);
    }

    .browser-combobox-group-options {
      display: grid;
      gap: 6px;
    }

    .browser-combobox-option {
      width: 100%;
      border: 1px solid transparent;
      border-radius: 14px;
      padding: 11px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      background: rgba(255, 255, 255, 0.02);
      color: var(--text-strong);
      text-align: left;
      transition: border-color var(--dur), background var(--dur), transform var(--dur);
    }

    .browser-combobox-option:hover,
    .browser-combobox-option.is-active {
      border-color: color-mix(in srgb, var(--accent-border-soft) 76%, transparent 24%);
      background: rgba(var(--accent-rgb), 0.14);
    }

    .browser-combobox-option.is-selected {
      border-color: color-mix(in srgb, var(--accent-border-strong) 82%, transparent 18%);
      background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.18) 0%, rgba(var(--accent-rgb), 0.12) 100%);
    }

    .browser-combobox-option-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .browser-combobox-option-label {
      font-size: 13px;
      font-weight: 700;
      line-height: 1.25;
      color: var(--text-strong);
    }

    .browser-combobox-option-meta {
      font-size: 11px;
      color: var(--text-soft);
      line-height: 1.35;
    }

    .browser-combobox-option-check {
      color: color-mix(in srgb, var(--accent) 24%, white 76%);
      font-size: 14px;
      flex: none;
    }

    .browser-combobox-empty {
      padding: 12px 14px;
      border-radius: 14px;
      border: 1px dashed var(--surface-border-soft);
      color: var(--text-soft);
      font-size: 13px;
      text-align: center;
    }

    .search-clear {
      border: 1px solid color-mix(in srgb, var(--accent-border-subtle) 42%, var(--surface-border-soft) 58%);
      background: rgba(255,255,255,0.03);
      border-radius: 11px;
      color: var(--text-muted);
      min-height: 36px;
      padding: 0 12px;
      font-size: 12px;
      font-weight: 700;
      transition: border-color var(--dur), color var(--dur), background var(--dur);
    }

    .search-clear:hover {
      border-color: var(--accent-border-soft);
      color: var(--text);
      background: var(--surface-card-strong);
    }

    .browser-control-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.88fr) minmax(230px, 0.92fr) minmax(240px, 0.9fr);
      gap: 12px;
      align-items: start;
      overflow: visible;
      align-items: start;
      position: relative;
      z-index: 4;
      margin-bottom: 12px;
    }

    .browser-set-group-logo--text-fallback {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 84px;
      height: 32px;
      padding: 0 10px;
      border-radius: 999px;
      border: 1px solid rgba(131, 155, 199, 0.18);
      background: rgba(34, 52, 82, 0.72);
      color: var(--text-muted);
      font-size: 10px;
      line-height: 1;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 700;
      white-space: nowrap;
    }

    .entity-tag-row--browser-side {
      margin-top: 0;
    }

    .entity-inline-tag--era {
      border-color: rgba(153, 183, 235, 0.2);
      background: rgba(16, 28, 50, 0.9);
      color: rgba(212, 224, 247, 0.9);
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }

    .field-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-soft);
      font-weight: 600;
    }

    .btn {
      border-radius: var(--radius-xs);
      border: 1px solid var(--surface-border-soft);
      background: var(--surface-card);
      color: var(--text-strong);
      font-weight: 600;
      font-size: 13px;
      line-height: 1;
      min-height: var(--control-height-md);
      padding: 0 14px;
      transition: border-color var(--dur), background var(--dur), transform var(--dur), color var(--dur);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      white-space: nowrap;
    }

    .btn:hover {
      border-color: var(--accent-border-soft);
      background: var(--surface-card-strong);
      transform: translateY(-1px);
    }

    .btn-primary {
      border-color: var(--accent-border-strong);
      background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.34) 0%, rgba(var(--accent-rgb), 0.18) 100%);
      color: color-mix(in srgb, var(--accent) 18%, white 82%);
    }

    .btn-primary:hover {
      border-color: rgba(var(--accent-rgb), 0.78);
      background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.44) 0%, rgba(var(--accent-rgb), 0.24) 100%);
    }

    .btn-subtle {
      font-size: 12px;
      min-height: var(--control-height-sm);
      padding: 0 11px;
      border-color: var(--surface-border-soft);
      color: var(--text-muted);
    }

    .result-count {
      margin-top: var(--space-3);
      color: var(--text-muted);
      font-size: 13px;
    }

    .entity-card {
      border-radius: var(--radius-sm);
      padding: 11px;
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr);
      gap: 10px;
      min-width: 0;
      transition: border-color var(--dur), background var(--dur), transform var(--dur);
      text-align: left;
    }

    .entity-card:hover {
      border-color: var(--accent-border-soft);
      background: var(--surface-card-strong);
      transform: translateY(-1px);
    }

    .entity-image {
      width: 72px;
      height: 100px;
      border-radius: 10px;
      border: 1px solid var(--surface-border-soft);
      background: var(--field-bg);
      object-fit: cover;
      display: block;
    }

    .entity-image.placeholder {
      background: linear-gradient(180deg, var(--panel-shell-start) 0%, var(--panel-shell-end) 100%);
    }

    .entity-title {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.3;
      color: var(--text-strong);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .entity-meta {
      margin-top: 4px;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .entity-value {
      margin-top: 8px;
      font-size: 17px;
      line-height: 1.15;
      font-weight: 700;
      color: #edf4ff;
      font-family: "Space Grotesk", sans-serif;
    }

    .entity-note {
      margin-top: 4px;
      font-size: 11px;
      color: var(--text-soft);
    }

    .entity-browser-change {
      margin: 0;
      font-size: 11px;
      line-height: 1.35;
      color: var(--text-soft);
      letter-spacing: 0.03em;
      white-space: nowrap;
    }

    .entity-browser-change--positive {
      color: var(--positive);
    }

    .entity-browser-change--negative {
      color: var(--negative);
    }

    .entity-browser-badge-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 6px;
      min-height: 24px;
    }

    .mini-title {
      margin: 0;
      font-weight: 600;
      font-size: 13px;
      color: var(--text);
      line-height: 1.35;
    }

    .mini-meta {
      margin: 5px 0 0;
      color: var(--text-muted);
      font-size: 12px;
    }

    .card-map-node.is-top-tier {
      box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 20px 34px rgba(0,0,0,0.26);
    }

    .card-map-tail-point {
      --node-size: 5px;
      width: var(--node-size);
      height: var(--node-size);
      border-radius: 999px;
      display: block;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.18);
      box-shadow: none;
    }

    .card-map-tail-point.tone-special-art {
      background: rgba(255, 199, 126, 0.34);
      border-color: rgba(255, 199, 126, 0.2);
    }

    .card-map-tail-point.tone-art {
      background: rgba(128, 186, 255, 0.3);
      border-color: rgba(128, 186, 255, 0.18);
    }

    .card-map-tail-point.tone-ultra {
      background: rgba(255, 154, 154, 0.3);
      border-color: rgba(255, 154, 154, 0.18);
    }

    .card-map-tail-point.tone-rare {
      background: rgba(144, 214, 193, 0.28);
      border-color: rgba(144, 214, 193, 0.16);
    }

    .bubble-inner {
      pointer-events: none;
      width: 100%;
      display: grid;
      gap: 3px;
      place-items: center;
      position: relative;
      z-index: 2;
    }

    .bubble-sub {
      font-size: 10px;
      line-height: 1.15;
      color: rgba(230, 241, 255, 0.82);
      font-weight: 600;
      text-shadow: 0 1px 10px rgba(6, 16, 28, 0.28);
    }

    .bubble-inner--logo {
      width: 100%;
      height: 100%;
      display: grid;
      place-items: center;
      padding: 9%;
      position: relative;
    }

    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: var(--space-3);
    }

    .legend-chip {
      padding: 5px 9px;
      font-size: 11px;
      color: var(--text-muted);
      letter-spacing: 0.04em;
      background: var(--chip-bg);
    }

    .side-panel {
      border-radius: var(--radius-sm);
      background: var(--surface-card-soft);
      padding: 16px;
      min-height: 460px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .commentary--compact {
      padding: 0;
      background: transparent;
      border: 0;
      box-shadow: none;
    }

    .commentary--signals-only .commentary-signals {
      gap: 7px;
    }

    .commentary--signals-only .commentary-signal {
      padding: 9px 13px;
      border-radius: 15px;
      line-height: 1.35;
    }

    .card-map-shell {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      padding: var(--space-3);
      border: 1px solid var(--surface-border-soft);
      border-radius: var(--radius-sm);
      background: var(--surface-elevated-soft);
    }

    .card-map-summary {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-3);
      flex-wrap: wrap;
      padding-bottom: var(--space-2);
      border-bottom: 1px solid var(--surface-border-soft);
    }

    .card-map-summary-title {
      margin: 0;
      color: var(--text-primary);
      font-size: 18px;
      line-height: 1.15;
    }

    .card-map-tier-stack {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
    }

    .card-map-tier {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
      padding: var(--space-3);
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.05);
    }

    .card-map-tier-top {
      background: linear-gradient(180deg, rgba(94, 135, 255, 0.10), rgba(255,255,255,0.02));
      border-color: rgba(120, 154, 255, 0.18);
    }

    .card-map-tier-mid {
      background: linear-gradient(180deg, rgba(67, 108, 171, 0.08), rgba(255,255,255,0.02));
    }

    .card-map-tier-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-2);
    }

    .card-map-tier-title {
      margin: 0 0 4px;
      color: var(--text-primary);
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    .card-map-tier-copy {
      margin: 0;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.45;
      max-width: 48ch;
    }

    .card-map-tier-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: flex-start;
    }

    .card-map-item {
      width: 82px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding: 0;
      border: 0;
      background: none;
      color: inherit;
      text-align: center;
      cursor: pointer;
    }

    .card-map-item.is-active .card-map-node {
      transform: translateY(-1px) scale(1.03);
      box-shadow: 0 0 0 2px rgba(255,255,255,0.08), 0 18px 34px rgba(0,0,0,0.24);
    }

    .card-map-node {
      --node-size: 44px;
      width: var(--node-size);
      height: var(--node-size);
      border-radius: 999px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255,255,255,0.10);
      color: var(--text-primary);
      background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
      transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
      box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    }

    .card-map-node:hover {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.18);
    }

    .card-map-node.tone-special-art {
      background: linear-gradient(180deg, rgba(255, 188, 98, 0.18), rgba(255,255,255,0.05));
      border-color: rgba(255, 199, 126, 0.28);
    }

    .card-map-node.tone-art {
      background: linear-gradient(180deg, rgba(114, 176, 255, 0.18), rgba(255,255,255,0.05));
      border-color: rgba(128, 186, 255, 0.24);
    }

    .card-map-node.tone-ultra {
      background: linear-gradient(180deg, rgba(255, 129, 129, 0.18), rgba(255,255,255,0.05));
      border-color: rgba(255, 154, 154, 0.24);
    }

    .card-map-node.tone-rare {
      background: linear-gradient(180deg, rgba(144, 214, 193, 0.16), rgba(255,255,255,0.05));
      border-color: rgba(144, 214, 193, 0.20);
    }

    .card-map-node.tone-neutral {
      background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    }

    .card-map-node.is-extreme {
      box-shadow: 0 0 0 1px rgba(255, 199, 126, 0.22), 0 18px 34px rgba(255, 171, 64, 0.16);
    }

    .card-map-node-rank {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.03em;
    }

    .card-map-item-name {
      width: 100%;
      color: var(--text-primary);
      font-size: 11px;
      line-height: 1.25;
      font-weight: 600;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .card-map-item-meta {
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.2;
    }

    .card-map-detail {
      padding-top: var(--space-2);
      border-top: 1px solid var(--surface-border-soft);
    }

    .card-map-detail-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-2);
      margin-bottom: var(--space-3);
    }

    .card-map-detail-title {
      margin: 0;
      color: var(--text-primary);
      font-size: 18px;
      line-height: 1.15;
    }

    .card-map-detail-link {
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: left;
      cursor: pointer;
    }

    .card-map-detail-link:hover,
    .card-map-detail-link:focus-visible {
      color: var(--accent);
      outline: none;
    }

    .card-map-detail-open {
      flex: 0 0 auto;
    }

    .card-map-detail-stats {
      gap: 10px;
      margin-bottom: var(--space-3);
    }

    .card-map-detail-media-row {
      display: grid;
      grid-template-columns: 108px minmax(0, 1fr);
      gap: 14px;
      align-items: start;
      margin-bottom: var(--space-3);
    }

    .card-map-detail-media {
      display: grid;
      gap: 8px;
      align-content: start;
    }

    .card-map-detail-media .card-detail-image-trigger,
    .card-map-detail-media .entity-image,
    .card-map-detail-media .entity-image.placeholder {
      width: 108px;
      min-width: 108px;
      max-width: 108px;
    }

    .card-map-detail-media .card-detail-image-trigger {
      display: block;
      width: 108px;
    }

    .card-map-detail-media .entity-image,
    .card-map-detail-media .entity-image.placeholder {
      width: 108px;
      height: 151px;
      border-radius: 12px;
      object-fit: cover;
    }

    .card-map-mini-history {
      display: grid;
      gap: 10px;
      margin-top: var(--space-1);
      padding: 12px 14px;
      border: 1px solid var(--surface-border-soft);
      border-radius: 16px;
      background: rgba(255,255,255,0.028);
    }

    .card-map-mini-history-head,
    .card-map-mini-history-meta,
    .card-map-mini-history-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .card-map-mini-history-head .stat-label {
      margin: 0;
    }

    .card-map-mini-history-head .set-trend-pill {
      flex-shrink: 0;
    }

    .card-map-mini-history-chart {
      min-width: 0;
    }

    .card-map-mini-history-chart .chart-shell,
    .card-map-mini-history-chart .set-trend-shell {
      min-height: 0;
      padding: 8px 10px 6px;
      border-radius: 14px;
    }

    .card-map-mini-history-chart .set-trend-shell svg {
      max-height: none;
    }

    .card-map-mini-history-chart .chart-axis-label {
      font-size: 10px;
    }

    .card-map-mini-history-chart .set-trend-guide {
      stroke-opacity: 0.58;
    }

    .card-map-mini-history-chart .set-trend-line {
      stroke-width: 2.6;
    }

    .card-map-mini-history-meta,
    .card-map-mini-history-summary {
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.35;
    }

    .card-map-mini-history-summary {
      justify-content: flex-start;
    }

    .card-map-empty,
    .card-map-detail-empty {
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.5;
      padding: var(--space-3);
      border: 1px dashed rgba(255,255,255,0.08);
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.02);
    }

    @media (max-width: 820px) {
      .card-map-detail-media-row {
        grid-template-columns: 1fr;
      }

      .card-map-detail-media {
        justify-items: start;
      }

      .card-map-mini-history-head,
      .card-map-mini-history-meta {
        flex-wrap: wrap;
      }
    }

    .panel-empty {
      margin: auto 0;
      color: var(--text-muted);
      font-size: 13px;
      text-align: center;
      line-height: 1.5;
    }

    .tag-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .tag {
      border: 1px solid var(--surface-border-soft);
      padding: 4px 8px;
      font-size: 11px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-muted);
      background: var(--chip-bg);
    }

    .tag.positive {
      border-color: var(--status-positive-border);
      color: var(--status-positive-text);
      background: var(--status-positive-bg);
    }

    .tag.warning {
      border-color: var(--status-warning-border);
      color: var(--status-warning-text);
      background: var(--status-warning-bg);
    }

    .tag.negative {
      border-color: var(--status-negative-border);
      color: var(--status-negative-text);
      background: var(--status-negative-bg);
    }

    .tag.info {
      border-color: rgba(116, 214, 255, 0.36);
      color: #a8e7ff;
      background: rgba(38, 86, 116, 0.28);
    }

    .tag.neutral {
      border-color: rgba(168, 180, 204, 0.28);
      color: #c7d2e4;
      background: rgba(92, 108, 136, 0.18);
    }

    .variant-pill {
      border: 1px solid var(--surface-border-soft);
      background: var(--chip-bg);
      color: var(--text-muted);
      padding: 5px 10px;
      font-size: 11px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      cursor: pointer;
    }

    .variant-pill:hover {
      border-color: var(--accent-border-soft);
      color: var(--text-hi);
      background: var(--chip-hover-bg);
    }

    .variant-pill.is-active {
      border-color: var(--accent-border-strong);
      color: color-mix(in srgb, var(--accent) 20%, white 80%);
      background: rgba(var(--accent-rgb), 0.18);
    }

    .split {
      display: grid;
      gap: var(--space-4);
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }

    .bar-stack {
      display: grid;
      gap: 10px;
    }

    .bar-item {
      display: grid;
      gap: 6px;
    }

    .bar-head {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .bar-track {
      width: 100%;
      height: 9px;
      border-radius: var(--radius-pill);
      background: var(--surface-card-strong);
      border: 1px solid var(--surface-border-faint);
      overflow: hidden;
    }

    .bar-fill {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--viz-primary-start) 0%, var(--viz-primary-end) 100%);
    }

    .bar-fill.warning {
      background: linear-gradient(90deg, var(--viz-warning-start) 0%, var(--viz-warning-end) 100%);
    }

    .bar-fill.positive {
      background: linear-gradient(90deg, var(--viz-positive-start) 0%, var(--viz-positive-end) 100%);
    }

    .bar-fill.negative {
      background: linear-gradient(90deg, var(--viz-negative-start) 0%, var(--viz-negative-end) 100%);
    }



    .commentary {
      border-radius: var(--radius-sm);
      background: var(--surface-card-soft);
      padding: 12px;
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.58;
    }

    .commentary-summary {
      margin: 0;
      color: var(--text-muted);
    }

    .commentary-signals {
      margin-top: 10px;
      display: grid;
      gap: 8px;
    }

    .commentary-signal {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      border: 1px solid var(--surface-border-soft);
      border-radius: 10px;
      padding: 8px 10px;
      font-size: 12px;
      line-height: 1.45;
    }

    .commentary-signal.positive {
      border-color: var(--status-positive-border);
      background: var(--status-positive-bg);
      color: var(--status-positive-text);
    }

    .commentary-signal.negative {
      border-color: var(--status-negative-border);
      background: var(--status-negative-bg);
      color: var(--status-negative-text);
    }

    .commentary-signal-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      flex-shrink: 0;
      margin-top: 4px;
    }

    .commentary-signal.positive .commentary-signal-dot {
      background: var(--positive);
      box-shadow: 0 0 0 3px rgba(var(--success-rgb), 0.16);
    }

    .commentary-signal.negative .commentary-signal-dot {
      background: var(--negative);
      box-shadow: 0 0 0 3px rgba(var(--danger-rgb), 0.16);
    }

    .top-cards-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .top-card {
      border-radius: 12px;
      background: var(--surface-card-soft);
      padding: 10px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      text-align: left;
      transition: border-color var(--dur), transform var(--dur), background var(--dur);
    }

    .top-card-media {
      min-height: 80px;
      border-radius: 10px;
      border: 1px solid rgba(145, 165, 214, 0.16);
      background:
        linear-gradient(180deg, rgba(18, 26, 42, 0.92) 0%, rgba(12, 18, 30, 0.88) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px;
    }

    .top-card-body {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .top-card:hover {
      border-color: var(--accent-border-soft);
      background: var(--surface-card);
      transform: translateY(-1px);
    }

    .top-card img,
    .top-card .placeholder {
      width: 100%;
      max-width: 136px;
      height: 68px;
      border-radius: 8px;
      border: 1px solid var(--surface-border-soft);
      object-fit: cover;
      background: var(--field-bg);
      display: block;
    }

    .top-card .top-card-set-logo {
      object-fit: contain;
      padding: 6px;
      background:
        radial-gradient(circle at top left, rgba(120, 176, 255, 0.12), transparent 62%),
        rgba(12, 18, 30, 0.9);
      border-color: rgba(145, 165, 214, 0.24);
    }

    .ranked-list {
      display: grid;
      gap: 8px;
    }

    .rank-row {
      border-radius: var(--radius-sm);
      background: var(--surface-card-soft);
      padding: 10px 12px;
      display: grid;
      grid-template-columns: 48px minmax(0, 1.1fr) minmax(150px, 0.8fr) minmax(100px, 0.7fr);
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .rank-badge {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 1px solid var(--surface-border-soft);
      background: var(--surface-card-strong);
      display: grid;
      place-items: center;
      font-size: 13px;
      font-weight: 700;
      color: var(--text-strong);
      font-family: "Space Grotesk", sans-serif;
    }

    .rank-badge.top {
      background: linear-gradient(180deg, var(--viz-primary-start) 0%, var(--viz-primary-end) 100%);
      border-color: var(--accent-border-strong);
    }

    .value-bar {
      position: relative;
      width: 100%;
      height: 8px;
      border-radius: var(--radius-pill);
      background: var(--surface-card-strong);
      border: 1px solid var(--surface-border-faint);
      overflow: hidden;
      margin-top: 6px;
    }

    .value-bar > span {
      position: absolute;
      inset: 0 auto 0 0;
      width: 0;
      background: linear-gradient(90deg, var(--viz-primary-start) 0%, var(--viz-primary-end) 100%);
    }

    .pokemon-browser-shell {
      display: grid;
      gap: 14px;
    }

    .pokemon-browser-controls {
      display: grid;
      gap: 10px;
    }

    .pokemon-browser-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .pokemon-generation-nav-btn {
      appearance: none;
      border: 1px solid var(--surface-border-soft);
      padding: 6px 10px;
      background: var(--chip-bg);
      color: var(--text-strong);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .pokemon-generation-nav-btn:hover {
      border-color: var(--accent-border-soft);
      background: var(--chip-hover-bg);
      transform: translateY(-1px);
    }

    .toggle-pills {
      display: inline-flex;
      gap: 6px;
      border: 1px solid var(--surface-border-soft);
      border-radius: var(--radius-pill);
      padding: 3px;
      background: var(--surface-card-soft);
    }

    .toggle-pill {
      appearance: none;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-muted);
      padding: 5px 10px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.02em;
      cursor: pointer;
    }

    .toggle-pill:hover {
      color: var(--text-strong);
      border-color: var(--accent-border-subtle);
    }

    .toggle-pill.is-active {
      color: color-mix(in srgb, var(--accent) 14%, white 86%);
      background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.34) 0%, rgba(var(--accent-rgb), 0.2) 100%);
      border-color: var(--accent-border-soft);
    }





    .pokemon-generation-section {
      display: grid;
      gap: 12px;
      padding-top: 2px;
      border-top: 1px solid rgba(94, 126, 170, 0.2);
    }

    .pokemon-generation-section:first-child {
      border-top: none;
      padding-top: 0;
    }

    .pokemon-generation-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .pokemon-generation-title {
      margin: 0;
      font-family: "Space Grotesk", sans-serif;
      font-size: 20px;
      line-height: 1.1;
      color: var(--text-strong);
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .pokemon-generation-region {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: var(--radius-pill);
      border: 1px solid var(--surface-border-soft);
      background: var(--chip-bg);
      color: color-mix(in srgb, var(--accent) 26%, white 74%);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .pokemon-generation-region[data-region="Kanto"] {
      color: color-mix(in srgb, var(--accent) 28%, white 72%);
      border-color: var(--accent-border-soft);
      background: rgba(var(--accent-rgb), 0.16);
    }

    .pokemon-generation-region[data-region="Johto"] {
      color: #b8d8ff;
      border-color: rgba(178, 204, 255, 0.36);
      background: rgba(21, 30, 51, 0.88);
    }

    .pokemon-generation-region[data-region="Hoenn"] {
      color: #88f0d1;
      border-color: rgba(104, 220, 183, 0.34);
      background: rgba(10, 39, 37, 0.9);
    }

    .pokemon-generation-region[data-region="Sinnoh"] {
      color: #d2c0ff;
      border-color: rgba(181, 153, 255, 0.34);
      background: rgba(28, 20, 54, 0.88);
    }

    .pokemon-generation-region[data-region="Unova"] {
      color: #dfe7f5;
      border-color: rgba(189, 201, 220, 0.32);
      background: rgba(26, 31, 38, 0.92);
    }

    .pokemon-generation-region[data-region="Kalos"] {
      color: #ffd59d;
      border-color: rgba(255, 189, 110, 0.34);
      background: rgba(50, 30, 12, 0.88);
    }

    .pokemon-generation-region[data-region="Alola"] {
      color: #ffb5d0;
      border-color: rgba(255, 153, 197, 0.34);
      background: rgba(56, 16, 34, 0.88);
    }

    .pokemon-generation-region[data-region="Galar"] {
      color: #a6d8ff;
      border-color: rgba(138, 204, 255, 0.36);
      background: rgba(16, 36, 58, 0.88);
    }

    .pokemon-generation-region[data-region="Paldea"] {
      color: #ffe48a;
      border-color: rgba(255, 220, 112, 0.34);
      background: rgba(58, 45, 10, 0.9);
    }

    .pokemon-generation-meta {
      margin: 4px 0 0;
      color: var(--text-muted);
      font-size: 13px;
    }

    .pokemon-generation-stats {
      margin-top: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .pokemon-generation-stat {
      display: inline-flex;
      align-items: center;
      padding: 5px 9px;
      border-radius: var(--radius-pill);
      border: 1px solid var(--surface-border-soft);
      background: var(--chip-bg);
      color: var(--text-strong);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    .pokemon-generation-divider {
      height: 1px;
      background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.02));
      border-radius: var(--radius-pill);
    }

    .pokemon-generation-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .pokemon-generation-jump-group {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .pokemon-generation-action-note {
      color: var(--text-soft);
      font-size: 11px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .pokemon-load-more-row {
      grid-column: 1 / -1;
      display: flex;
      justify-content: center;
      padding-top: 8px;
    }


















    .pokemon-row-title {
      margin: 0;
      font-family: "Space Grotesk", sans-serif;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.2;
      color: var(--text-strong);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pokemon-row-meta {
      margin: 2px 0 0;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.4;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pokemon-type-row {
      margin-top: 6px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .pokemon-type-chip {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      border: 1px solid rgba(136, 169, 219, 0.4);
      background: rgba(15, 30, 54, 0.75);
      color: #dbe9ff;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    .pokemon-row-value {
      margin: 8px 0 0;
      font-size: 20px;
      line-height: 1;
      font-family: "Space Grotesk", sans-serif;
      color: #f3fbff;
      font-weight: 700;
    }

    .pokemon-row-kpis {
      display: grid;
      gap: 4px;
      margin-top: 8px;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.4;
      grid-column: 2;
    }


    .pokemon-detail-page {
      --pokemon-detail-shell: rgba(10, 18, 31, 0.88);
      --pokemon-detail-shell-strong: rgba(13, 23, 38, 0.94);
      --pokemon-detail-panel: rgba(12, 21, 35, 0.74);
      --pokemon-detail-panel-soft: rgba(11, 19, 32, 0.58);
      --pokemon-detail-border: rgba(132, 163, 212, 0.13);
      --pokemon-detail-border-strong: rgba(132, 180, 243, 0.24);
      --pokemon-detail-accent: #79bcff;
      --pokemon-detail-accent-rgb: 121, 188, 255;
      --pokemon-detail-accent-soft: #8ad9ef;
      --pokemon-detail-accent-muted: #8fa8d4;
      --pokemon-detail-accent-structure: #86a8f6;
      --pokemon-detail-lavender: #b8c4ff;
      --pokemon-detail-bar-blue-start: #6691ff;
      --pokemon-detail-bar-blue-end: #9cc9ff;
      --pokemon-detail-bar-cyan-start: #5ec9e9;
      --pokemon-detail-bar-cyan-end: #91e4de;
      --pokemon-detail-bar-periwinkle-start: #6f95f1;
      --pokemon-detail-bar-periwinkle-end: #a5c3f7;
      --pokemon-detail-bar-indigo-start: #6584e0;
      --pokemon-detail-bar-indigo-end: #97b1f5;
      --pokemon-detail-bar-lavender-start: #8fa7f0;
      --pokemon-detail-bar-lavender-end: #c0cffc;
      --pokemon-detail-bar-gold-start: #ffd66e;
      --pokemon-detail-bar-gold-end: #ffebaa;
      --pokemon-detail-panel-radius: 18px;
      --pokemon-detail-panel-pad: 14px;
      min-width: 0;
      display: flex;
      justify-content: center;
    }

    .pokemon-detail-page-stack {
      width: min(100%, 1100px);
      display: grid;
      gap: 12px;
      margin: 0 auto;
    }

    .pokemon-detail-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .pokemon-detail-back {
      color: color-mix(in srgb, var(--accent) 28%, white 72%);
      border: 1px solid rgba(var(--accent-rgb), 0.4);
      background: rgba(var(--accent-rgb), 0.18);
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.03em;
      transition: border-color 140ms ease, background 140ms ease;
    }

    .pokemon-detail-back:hover {
      border-color: rgba(145, 206, 255, 0.65);
      background: rgba(27, 58, 102, 0.5);
    }

    .pokemon-detail-hero {
      display: grid;
      gap: 20px;
      grid-template-columns: 188px minmax(0, 1fr);
      align-items: start;
    }

    .pokemon-detail-visual {
      display: grid;
      gap: 6px;
      align-items: start;
      width: 100%;
      max-width: 188px;
    }

    .pokemon-hero-main {
      min-width: 0;
      display: grid;
      gap: 16px;
      align-content: center;
      grid-template-columns: minmax(0, 1fr) minmax(220px, 244px);
      align-items: start;
      width: min(100%, 844px);
      justify-self: start;
    }

    .pokemon-hero-core {
      min-width: 0;
      display: grid;
      gap: 14px;
      align-content: start;
    }

    .pokemon-hero-identity {
      min-width: 0;
      display: grid;
      gap: 4px;
      align-content: center;
    }

    .pokemon-hero-side {
      min-width: 0;
      display: grid;
      justify-items: stretch;
      align-content: center;
    }

    .pokemon-detail-title {
      font-size: clamp(32px, 4vw, 46px);
      line-height: 0.98;
      margin: 0;
    }

    .pokemon-detail-subtitle {
      margin: 0;
      max-width: 70ch;
      color: var(--text-soft);
      font-size: 16px;
      line-height: 1.45;
    }




















    .pokemon-active-badge-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      min-width: 0;
    }

    .pokemon-hero-signal-row .pokemon-active-badge {
      min-height: 23px;
      padding: 0 9px;
      font-size: 10px;
      letter-spacing: 0.06em;
    }

    .pokemon-active-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 24px;
      padding: 0 10px;
      border-radius: 999px;
      border: 1px solid rgba(131, 166, 211, 0.14);
      background: rgba(11, 19, 31, 0.54);
      color: rgba(229, 236, 247, 0.92);
      font-size: 10.5px;
      line-height: 1.2;
      font-weight: 700;
      letter-spacing: 0.05em;
      white-space: nowrap;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pokemon-active-badge.is-cool {
      border-color: rgba(121, 188, 255, 0.24);
      color: #dbeeff;
    }

    .pokemon-active-badge.is-aqua {
      border-color: rgba(108, 221, 210, 0.26);
      color: #c3f7ef;
    }

    .pokemon-active-badge.is-gold {
      border-color: rgba(255, 213, 110, 0.26);
      color: #ffebb3;
    }

    .pokemon-active-badge.is-periwinkle,
    .pokemon-active-badge.is-violet {
      border-color: rgba(158, 171, 247, 0.2);
      color: #e0e6ff;
    }

    .pokemon-active-badge.is-rose {
      border-color: rgba(229, 137, 161, 0.22);
      color: #ffd6de;
    }

    .pokemon-active-badge.is-soft {
      border-color: rgba(133, 152, 184, 0.16);
      color: rgba(201, 214, 232, 0.82);
    }


















    .pokemon-mock-card-thumb {
      position: relative;
      overflow: hidden;
      display: grid;
      align-content: space-between;
      justify-items: start;
      border-radius: 10px;
      border: 1px solid rgba(135, 169, 219, 0.22);
      background:
        linear-gradient(180deg, rgba(22, 31, 46, 0.94), rgba(12, 20, 34, 0.98));
      padding: 8px;
      box-sizing: border-box;
    }

    .pokemon-mock-card-thumb.is-gold {
      background:
        linear-gradient(180deg, rgba(41, 34, 20, 0.94), rgba(16, 18, 24, 0.98));
    }

    .pokemon-mock-card-chip {
      width: 18px;
      height: 6px;
      border-radius: 999px;
      background: rgba(140, 176, 228, 0.36);
    }

    .pokemon-mock-card-thumb.is-gold .pokemon-mock-card-chip {
      background: rgba(236, 192, 110, 0.42);
    }

    .pokemon-mock-card-glyph {
      align-self: center;
      justify-self: center;
      color: rgba(232, 240, 251, 0.9);
      font-family: "Space Grotesk", sans-serif;
      font-size: 18px;
      line-height: 1;
      letter-spacing: 0.08em;
      font-weight: 700;
    }

    .pokemon-mock-card-lines {
      display: grid;
      gap: 4px;
      width: 100%;
    }

    .pokemon-mock-card-lines span {
      display: block;
      height: 4px;
      border-radius: 999px;
      background: rgba(160, 184, 220, 0.16);
    }

    .pokemon-mock-card-lines span:first-child {
      width: 78%;
    }

    .pokemon-mock-card-lines span:nth-child(2) {
      width: 56%;
    }

    .pokemon-mock-card-lines span:last-child {
      width: 68%;
    }






















































    .pokemon-chase-board {
      display: grid;
      gap: 8px;
    }

    .pokemon-chase-board-head,
    .pokemon-chase-board-row {
      display: grid;
      grid-template-columns: minmax(0, 1.65fr) repeat(5, minmax(0, 0.56fr));
      gap: 10px;
      align-items: center;
    }

    .pokemon-chase-board-head {
      padding: 0 8px;
      color: var(--text-muted);
      font-size: 10px;
      line-height: 1.2;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .pokemon-chase-board-row {
      width: 100%;
      min-width: 0;
      text-align: left;
      padding: 10px 12px;
      border-radius: 16px;
      border: 1px solid rgba(125, 156, 200, 0.12);
      background: rgba(10, 18, 30, 0.64);
      transition: border-color 140ms ease, background 140ms ease, transform 160ms ease;
    }

    .pokemon-chase-board-row:hover {
      border-color: rgba(149, 192, 247, 0.22);
      background: rgba(12, 22, 37, 0.74);
      transform: translateY(-1px);
    }

    .pokemon-chase-board-card {
      display: grid;
      grid-template-columns: auto 48px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .pokemon-top-card-rank {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 999px;
      border: 1px solid rgba(131, 167, 214, 0.16);
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.04em;
    }

    .pokemon-chase-board-thumb {
      width: 48px;
      height: 66px;
      border-radius: 8px;
      border: 1px solid rgba(135, 169, 219, 0.24);
      background: rgba(16, 25, 40, 0.74);
      object-fit: cover;
      display: block;
    }

    .pokemon-chase-board-copy {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .pokemon-chase-board-name,
    .pokemon-chase-board-meta {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pokemon-chase-board-name {
      color: var(--text-strong);
      font-size: 13px;
      line-height: 1.3;
      font-weight: 700;
    }

    .pokemon-chase-board-meta {
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.35;
    }

    .pokemon-chase-board-metric {
      color: var(--text-strong);
      font-size: 12px;
      line-height: 1.35;
      font-weight: 700;
      text-align: right;
      white-space: nowrap;
    }

    .pokemon-chase-board-metric.is-positive,
    .pokemon-card-pool-metric.is-positive {
      color: #84e2d2;
    }

    .pokemon-chase-board-metric.is-negative,
    .pokemon-card-pool-metric.is-negative {
      color: #f3a3b3;
    }

    .pokemon-chase-board-confidence,
    .pokemon-card-pool-confidence {
      justify-self: end;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 22px;
      padding: 0 8px;
      border-radius: 999px;
      border: 1px solid rgba(131, 167, 214, 0.16);
      color: rgba(221, 232, 246, 0.82);
      font-size: 10px;
      line-height: 1.1;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 700;
      white-space: nowrap;
      background: rgba(11, 19, 32, 0.6);
    }

    .pokemon-chase-board-confidence.is-high,
    .pokemon-card-pool-confidence.is-high {
      border-color: rgba(102, 216, 202, 0.2);
      color: #b8f4e6;
    }

    .pokemon-chase-board-confidence.is-mid,
    .pokemon-card-pool-confidence.is-mid {
      border-color: rgba(121, 188, 255, 0.2);
      color: #d2e9ff;
    }

    .pokemon-card-pool-note{
      margin-bottom: 0;
    }

    .pokemon-exposure-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .pokemon-exposure-card {
      padding: 12px;
    }

    .pokemon-exposure-list {
      display: grid;
      gap: 9px;
    }

    .pokemon-exposure-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(88px, 1.1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .pokemon-exposure-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .pokemon-exposure-label,
    .pokemon-exposure-meta,
    .pokemon-exposure-value {
      margin: 0;
    }

    .pokemon-exposure-label {
      color: var(--text-strong);
      font-size: 12px;
      line-height: 1.35;
      font-weight: 700;
    }

    .pokemon-exposure-meta {
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.4;
    }

    .pokemon-exposure-bar {
      position: relative;
      height: 8px;
      border-radius: 999px;
      background: rgba(101, 123, 156, 0.16);
      border: 1px solid rgba(124, 152, 189, 0.08);
      overflow: hidden;
    }

    .pokemon-exposure-fill {
      position: absolute;
      inset: 0 auto 0 0;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(116, 178, 255, 0.92), rgba(159, 216, 255, 0.98));
    }

    .pokemon-exposure-value {
      color: var(--text-strong);
      font-size: 12px;
      line-height: 1.3;
      font-weight: 700;
      white-space: nowrap;
    }

    .pokemon-peer-matrix-shell {
      overflow-x: auto;
      padding-bottom: 2px;
    }

    .pokemon-peer-matrix {
      min-width: 760px;
      display: grid;
      gap: 6px;
    }

    .pokemon-peer-matrix-head,
    .pokemon-peer-matrix-row {
      display: grid;
      grid-template-columns: minmax(260px, 1.4fr) minmax(110px, 0.72fr) minmax(110px, 0.72fr) minmax(88px, 0.56fr) minmax(140px, 0.88fr);
      gap: 12px;
      align-items: center;
    }

    .pokemon-peer-matrix-head {
      padding: 0 10px 6px;
      color: var(--text-muted);
      font-size: 10px;
      line-height: 1.2;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .pokemon-peer-matrix-row {
      min-width: 0;
      padding: 10px;
      border-radius: 16px;
      border: 1px solid rgba(128, 164, 211, 0.12);
      background: linear-gradient(180deg, rgba(13, 21, 36, 0.68), rgba(10, 17, 30, 0.78));
      text-align: left;
      transition: border-color 140ms ease, background 140ms ease, transform 160ms ease;
    }

    .pokemon-peer-matrix-row:hover {
      border-color: rgba(148, 192, 247, 0.22);
      background: rgba(13, 23, 39, 0.84);
      transform: translateY(-1px);
    }

    .pokemon-peer-matrix-peer {
      min-width: 0;
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr);
      gap: 10px;
      align-items: center;
    }

    .pokemon-peer-matrix-media {
      width: 48px;
      height: 48px;
      display: grid;
      place-items: center;
      border-radius: 14px;
      border: 1px solid rgba(130, 160, 205, 0.12);
      background: rgba(11, 18, 31, 0.72);
      overflow: hidden;
    }

    .pokemon-peer-matrix-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .pokemon-peer-matrix-name {
      color: var(--text-strong);
      font-size: 13px;
      line-height: 1.28;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }


    .pokemon-peer-matrix-meta {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pokemon-peer-matrix-value {
      color: var(--text-strong);
      font-size: 12px;
      line-height: 1.35;
      font-weight: 700;
      white-space: nowrap;
    }

    .pokemon-peer-matrix-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 22px;
      padding: 0 8px;
      border-radius: 999px;
      border: 1px solid rgba(132, 164, 208, 0.12);
      background: rgba(15, 24, 39, 0.64);
      color: var(--text-soft);
      font-size: 10px;
      line-height: 1.2;
      font-weight: 700;
      letter-spacing: 0.04em;
      white-space: nowrap;
      justify-self: start;
    }

    .pokemon-card-pool-panel {
      display: grid;
      gap: 12px;
    }

    .pokemon-card-pool-controls {
      display: grid;
      gap: 12px;
    }

    .pokemon-card-pool-search input {
      min-width: 0;
    }

    .pokemon-card-pool-count {
      margin: 0;
    }

    .pokemon-card-pool-shell {
      border: 1px solid rgba(129, 164, 210, 0.1);
      border-radius: 18px;
      background: rgba(10, 17, 30, 0.58);
      overflow: hidden;
    }


    .pokemon-card-pool-list {
      display: grid;
      gap: 8px;
    }

    .pokemon-card-pool-row {
      width: 100%;
      min-width: 0;
      text-align: left;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 10px 12px;
      border-radius: 16px;
      border: 1px solid rgba(124, 156, 201, 0.1);
      background: rgba(11, 19, 32, 0.68);
      transition: border-color 140ms ease, background 140ms ease, transform 160ms ease;
    }

    .pokemon-card-pool-row:hover {
      border-color: rgba(149, 192, 247, 0.2);
      background: rgba(12, 22, 37, 0.76);
      transform: translateY(-1px);
    }

    .pokemon-card-pool-card {
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .pokemon-card-pool-thumb {
      width: 52px;
      height: 72px;
      border-radius: 8px;
      display: block;
    }

    .pokemon-card-pool-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .pokemon-card-pool-name,
    .pokemon-card-pool-meta,
    .pokemon-card-pool-sub {
      margin: 0;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pokemon-card-pool-name {
      color: var(--text-strong);
      font-size: 13px;
      line-height: 1.32;
      font-weight: 700;
    }

    .pokemon-card-pool-meta {
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.35;
    }

    .pokemon-card-pool-sub {
      color: var(--text-muted);
      font-size: 10.5px;
      line-height: 1.3;
    }

    .pokemon-card-pool-metrics {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: minmax(70px, auto);
      gap: 10px;
      align-items: center;
      justify-content: end;
    }

    .pokemon-card-pool-metric {
      color: var(--text-strong);
      font-size: 11.5px;
      line-height: 1.35;
      font-weight: 700;
      text-align: right;
      white-space: nowrap;
    }

    .pokemon-form-switcher {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0;
      width: fit-content;
      max-width: 100%;
    }

    .pokemon-form-switcher .variant-pill {
      padding: 4px 9px;
      font-size: 10px;
      letter-spacing: 0.02em;
      text-transform: none;
      font-weight: 600;
    }


    .pokemon-detail-image-frame,
    .pokemon-detail-hero .placeholder {
      width: 176px;
      height: 176px;
      border-radius: 20px;
      border: 1px solid rgba(140, 175, 228, 0.35);
      background:
        linear-gradient(180deg, rgba(12, 20, 34, 0.96), rgba(9, 15, 26, 0.98));
      display: block;
    }

    .pokemon-detail-image-frame {
      position: relative;
      overflow: hidden;
      box-shadow: 0 12px 30px rgba(5, 11, 21, 0.2);
    }

    .pokemon-detail-image-frame.is-zoomable {
      cursor: zoom-in;
      transition: border-color 140ms ease, box-shadow 180ms ease, transform 180ms ease;
    }

    .pokemon-detail-image-frame.is-zoomable:hover {
      border-color: rgba(161, 205, 255, 0.56);
      box-shadow: 0 14px 30px rgba(6, 14, 28, 0.34);
      transform: translateY(-1px);
    }

    .pokemon-detail-image-frame.is-zoomable:focus-visible {
      outline: 2px solid rgba(136, 202, 255, 0.78);
      outline-offset: 2px;
      border-color: rgba(161, 205, 255, 0.62);
    }

    .card-detail-image-trigger {
      appearance: none;
      border: 0;
      padding: 0;
      margin: 0;
      background: transparent;
      display: inline-flex;
      border-radius: 10px;
      cursor: zoom-in;
      transition: transform 160ms ease;
    }

    .card-detail-image-trigger:hover {
      transform: translateY(-1px);
    }

    .card-detail-image-trigger:hover .entity-image {
      border-color: rgba(161, 205, 255, 0.56);
      box-shadow: 0 14px 30px rgba(6, 14, 28, 0.34);
    }

    .card-detail-image-trigger:focus-visible {
      outline: 2px solid rgba(136, 202, 255, 0.78);
      outline-offset: 2px;
    }

    .pokemon-detail-image-frame.placeholder {
      border-style: dashed;
      border-color: rgba(137, 165, 210, 0.3);
      background: rgba(12, 23, 39, 0.9);
    }

    .pokemon-detail-image-layer {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center center;
      padding: 10px;
      box-sizing: border-box;
      opacity: 0;
      transform-origin: center center;
      transform: scale(var(--pokemon-layer-scale, 1));
      transition: opacity 190ms ease, transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
      pointer-events: none;
    }

    .pokemon-detail-image-layer.is-sprite {
      --pokemon-layer-scale: 1.08;
    }

    .pokemon-detail-image-frame.mode-normal .pokemon-detail-image-layer.layer-normal,
    .pokemon-detail-image-frame.mode-shiny .pokemon-detail-image-layer.layer-shiny,
    .pokemon-detail-image-frame.mode-single .pokemon-detail-image-layer.layer-single {
      opacity: 1;
    }

    .pokemon-image-mode {
      display: inline-flex;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px;
      background: rgba(10, 19, 33, 0.88);
      width: fit-content;
    }

    .pokemon-image-mode button {
      appearance: none;
      border: 1px solid transparent;
      border-radius: 999px;
      background: transparent;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      padding: 4px 10px;
      cursor: pointer;
      transition: all 140ms ease;
    }

    .pokemon-image-mode button:hover {
      border-color: rgba(118, 184, 255, 0.38);
      color: #e5f3ff;
    }

    .pokemon-image-mode button.is-active {
      color: #f3f8ff;
      border-color: rgba(133, 203, 255, 0.58);
      background: linear-gradient(180deg, rgba(43, 91, 162, 0.8) 0%, rgba(29, 62, 107, 0.85) 100%);
    }

    body.is-modal-open {
      overflow: hidden;
    }

    .image-lightbox {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: grid;
      place-items: center;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 180ms ease, visibility 180ms ease;
    }

    .image-lightbox.is-open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .image-lightbox-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(3, 8, 16, 0.8);
      backdrop-filter: blur(2px);
    }

    .image-lightbox-dialog {
      position: relative;
      z-index: 1;
      width: min(90vw, 980px);
      max-height: 88vh;
      border: 1px solid var(--accent-border-subtle);
      border-radius: 16px;
      background: var(--surface-card);
      box-shadow: var(--shadow-soft);
      padding: 14px 14px 12px;
      display: grid;
      gap: 8px;
      transform: scale(0.97);
      transition: transform 190ms cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    .image-lightbox.is-open .image-lightbox-dialog {
      transform: scale(1);
    }

    .image-lightbox-image-wrap {
      width: 100%;
      max-height: calc(88vh - 60px);
      display: grid;
      place-items: center;
      overflow: auto;
      border-radius: 12px;
      background: var(--surface-card-strong);
      border: 1px solid var(--surface-border-faint);
      padding: 12px;
    }

    .image-lightbox-image {
      display: block;
      width: auto;
      max-width: 100%;
      height: auto;
      max-height: calc(88vh - 84px);
      object-fit: contain;
      object-position: center;
    }

    .image-lightbox-close {
      justify-self: end;
      width: 32px;
      height: 32px;
      border-radius: var(--radius-pill);
      border: 1px solid var(--accent-border-soft);
      background: rgba(var(--accent-rgb), 0.16);
      color: var(--text-strong);
      font-size: 18px;
      line-height: 1;
      font-weight: 700;
      display: grid;
      place-items: center;
      transition: border-color var(--dur), background var(--dur), color var(--dur);
    }

    .image-lightbox-close:hover {
      border-color: var(--accent-border-strong);
      background: rgba(var(--accent-rgb), 0.24);
    }

    .image-lightbox-close:focus-visible {
      outline: 2px solid rgba(var(--accent-rgb), 0.84);
      outline-offset: 2px;
    }

    .pokemon-evolution-rail {
      width: 100%;
      min-width: 0;
      display: grid;
      gap: 10px;
    }

    .pokemon-evolution-rail.is-linear {
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: thin;
      scrollbar-color: rgba(132, 177, 235, 0.35) transparent;
    }

    .pokemon-evolution-rail.is-linear::-webkit-scrollbar {
      height: 6px;
    }

    .pokemon-evolution-rail.is-linear::-webkit-scrollbar-thumb {
      background: rgba(132, 177, 235, 0.35);
      border-radius: 999px;
    }

    .pokemon-evolution-linear-track {
      display: flex;
      align-items: center;
      gap: 10px;
      width: fit-content;
      min-width: max-content;
      padding-right: 4px;
    }

    .pokemon-evolution-connector {
      width: 20px;
      height: 2px;
      flex-shrink: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(108, 143, 205, 0.2) 0%, rgba(141, 186, 245, 0.72) 100%);
      position: relative;
      opacity: 0.85;
    }

    .pokemon-evolution-connector::after {
      content: '';
      position: absolute;
      right: -1px;
      top: 50%;
      width: 7px;
      height: 7px;
      border-top: 1px solid rgba(157, 205, 255, 0.88);
      border-right: 1px solid rgba(157, 205, 255, 0.88);
      transform: translateY(-50%) rotate(45deg);
      border-radius: 1px;
    }

    .pokemon-evolution-stage {
      display: grid;
      gap: 6px;
      justify-items: start;
      min-width: 0;
    }

    .pokemon-evolution-stage-connector {
      width: 2px;
      height: 12px;
      margin-left: 30px;
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(126, 169, 230, 0.18) 0%, rgba(151, 202, 255, 0.78) 100%);
      opacity: 0.75;
    }

    .pokemon-evolution-stage-track {
      position: relative;
      display: flex;
      flex-wrap: wrap;
      align-items: stretch;
      gap: 10px 12px;
      min-width: 0;
      padding-top: 2px;
    }

    .pokemon-evolution-stage-track.has-multiple::before {
      content: '';
      position: absolute;
      left: 26px;
      right: 26px;
      top: 31px;
      height: 1px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(108, 143, 205, 0.18) 0%, rgba(141, 186, 245, 0.68) 50%, rgba(108, 143, 205, 0.18) 100%);
      opacity: 0.7;
      pointer-events: none;
    }

    .pokemon-evolution-card {
      appearance: none;
      border: 1px solid rgba(128, 164, 211, 0.14);
      border-radius: 16px;
      background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.05), transparent 54%),
        rgba(9, 17, 30, 0.72);
      min-width: 168px;
      max-width: 228px;
      padding: 8px 10px;
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      text-align: left;
      position: relative;
      z-index: 1;
      transition: border-color var(--dur), background var(--dur), box-shadow var(--dur), transform var(--dur), opacity var(--dur);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .pokemon-evolution-card:hover {
      border-color: rgba(151, 202, 255, 0.34);
      background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.08), transparent 54%),
        rgba(13, 22, 37, 0.82);
      transform: translateY(-1px);
    }

    .pokemon-evolution-card.is-current {
      border-color: rgba(151, 202, 255, 0.6);
      background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.18), transparent 52%),
        linear-gradient(180deg, rgba(18, 34, 56, 0.95) 0%, rgba(10, 18, 31, 0.92) 100%);
      box-shadow:
        0 0 0 1px rgba(var(--accent-rgb), 0.14),
        0 0 24px rgba(var(--accent-rgb), 0.16);
    }

    .pokemon-evolution-card.is-branch-relevant {
      border-color: rgba(137, 187, 247, 0.26);
      background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.09), transparent 54%),
        rgba(10, 19, 33, 0.76);
    }

    .pokemon-evolution-card.is-muted {
      opacity: 0.7;
      border-color: rgba(128, 164, 211, 0.08);
      background: rgba(8, 14, 24, 0.56);
    }

    .pokemon-evolution-card-media {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      border: 1px solid rgba(137, 182, 240, 0.2);
      background: rgba(10, 18, 31, 0.86);
      display: grid;
      place-items: center;
      overflow: hidden;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .pokemon-evolution-card.is-current .pokemon-evolution-card-media {
      border-color: rgba(151, 202, 255, 0.5);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(var(--accent-rgb), 0.18);
    }

    .pokemon-evolution-card-image {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      padding: 5px;
      box-sizing: border-box;
      display: block;
    }

    .pokemon-evolution-card-placeholder {
      color: var(--text-soft);
      font-size: 17px;
      font-weight: 700;
      line-height: 1;
    }

    .pokemon-evolution-card-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
      align-content: center;
    }

    .pokemon-evolution-card-name {
      color: var(--text-strong);
      font-size: 13px;
      line-height: 1.25;
      font-weight: 700;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .pokemon-evolution-card-dex {
      color: var(--text-soft);
      font-size: 10.5px;
      line-height: 1.25;
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .kpi-groups-stack {
      margin-top: 8px;
      display: grid;
      gap: 8px;
    }

    .kpi-group {
      padding: 8px 10px;
    }

    .kpi-group-title {
      margin: 0;
      color: var(--text-soft);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 700;
    }

    .pokemon-kpi-grid {
      display: grid;
      gap: 8px;
      margin-top: 6px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .kpi-card-compact {
      padding: 8px 10px;
    }

    .kpi-card-compact .stat-label {
      font-size: 10px;
      letter-spacing: 0.06em;
    }

    .kpi-card-compact .stat-value {
      margin-top: 6px;
      font-size: 22px;
      min-height: 0;
    }

    .kpi-card-compact .stat-note {
      margin-top: 4px;
      font-size: 11px;
      min-height: 0;
    }

    .pokemon-detail-sections {
      margin-top: 10px;
      display: grid;
      gap: 10px;
    }

    .section-collapsible {
      padding: 8px 10px;
    }

    .section-collapsible > summary {
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      cursor: pointer;
    }

    .section-collapsible > summary::-webkit-details-marker {
      display: none;
    }

    .section-collapsible-head {
      min-width: 0;
    }

    .section-collapsible-caret {
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1;
      transition: transform 140ms ease;
      transform: rotate(0deg);
    }

    .section-collapsible[open] .section-collapsible-caret {
      transform: rotate(90deg);
    }

    .section-collapsible-body {
      margin-top: 8px;
      display: grid;
      gap: 8px;
    }

    .metric-row-list {
      display: grid;
      gap: 6px;
    }

    .metric-row {
      border: 1px solid var(--surface-border-soft);
      border-radius: 10px;
      background: var(--surface-card-soft);
      padding: 7px 9px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .metric-row-label {
      margin: 0;
      color: var(--text-soft);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .metric-row-value {
      margin: 0;
      color: var(--text-strong);
      font-size: 13px;
      font-weight: 700;
      text-align: right;
      min-width: 0;
    }

    .set-distribution-summary {
      margin: 0;
      color: var(--text-secondary);
      font-size: 14px;
      line-height: 1.65;
      max-width: 72ch;
    }

    .pokemon-insight-grid {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pokemon-cards-toolbar {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      align-items: end;
    }

    .pokemon-card-grid {
      margin-top: 10px;
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pokemon-mini-stat {
      border-radius: 12px;
      background: var(--surface-card-soft);
      padding: 9px;
    }

    .pokemon-mini-stat p {
      margin: 0;
    }

    .pokemon-detail-note {
      margin-top: 8px;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.45;
    }
.pokemon-related-surface{
      padding: var(--pokemon-detail-panel-pad);
    }

    .pokemon-related-surface {
      align-self: start;
    }
.pokemon-related-head{
      margin-bottom: 10px;
    }

    .pokemon-detail-filter-group {
      display: grid;
      gap: 6px;
    }

    .pokemon-detail-filter-label {
      margin: 0;
      color: var(--text-muted);
      font-size: 10px;
      line-height: 1.2;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
.pokemon-related-title{
      font-size: 20px;
    }

    .pokemon-read-grid {
      gap: 8px;
      align-items: start;
    }

    .pokemon-read-column {
      display: grid;
      gap: 10px;
      align-content: start;
      min-width: 0;
      max-width: 360px;
    }


    .dexseq-title-help .metric-help-text {
      white-space: nowrap;
    }
    .analytics-card-title .metric-help-inline {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .analytics-card-title .metric-info-trigger{
      width: 15px;
      height: 15px;
      font-size: 9px;
      flex: 0 0 auto;
    }

    .pokemon-read-summary {
      margin-top: 0;
    }

    .pokemon-read-copyline {
      margin: 0;
      color: color-mix(in srgb, var(--text) 86%, white 14%);
      font-size: 13.5px;
      line-height: 1.56;
      max-width: 34ch;
    }

    .pokemon-read-context-line {
      margin: 0;
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.5;
    }

    .pokemon-read-fact-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 12px;
      margin: 0;
      color: var(--text-soft);
      font-size: 11.5px;
      line-height: 1.5;
      max-width: 36ch;
    }

    .pokemon-read-fact-item {
      position: relative;
      white-space: nowrap;
    }

    .pokemon-read-fact-item:not(:last-child)::after {
      content: '·';
      margin-left: 10px;
      color: rgba(162, 184, 214, 0.62);
    }

    .pokemon-detail-bottom-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
      gap: 10px;
      align-items: start;
    }

    .pokemon-shape-distribution-bar {
      display: flex;
      overflow: hidden;
      width: 100%;
      height: 12px;
      border-radius: 999px;
      border: 1px solid rgba(124, 152, 189, 0.12);
      background: rgba(102, 124, 156, 0.14);
    }

    .pokemon-shape-distribution-segment {
      height: 100%;
      min-width: 0;
      display: block;
    }

    .pokemon-shape-distribution-segment.is-top-card {
      background: linear-gradient(90deg, rgba(118, 187, 255, 0.96), rgba(152, 214, 255, 0.98));
    }

    .pokemon-shape-distribution-segment.is-top-five {
      background: linear-gradient(90deg, rgba(103, 161, 244, 0.92), rgba(135, 181, 248, 0.96));
    }

    .pokemon-shape-distribution-segment.is-long-tail {
      background: linear-gradient(90deg, rgba(88, 121, 171, 0.72), rgba(112, 144, 192, 0.78));
    }

    .pokemon-shape-distribution-legend {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .pokemon-shape-distribution-stat {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .pokemon-shape-distribution-key {
      color: var(--text-muted);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      line-height: 1.25;
    }

    .pokemon-shape-distribution-value {
      color: var(--text-strong);
      font-size: 14px;
      line-height: 1.2;
      font-weight: 700;
    }

    .pokemon-shape-tier-stack {
      display: grid;
      gap: 8px;
    }


    .pokemon-shape-tier-label {
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.3;
      white-space: nowrap;
    }

    .pokemon-shape-tier-bar {
      position: relative;
      display: block;
      width: 100%;
      height: 8px;
      border-radius: 999px;
      border: 1px solid rgba(124, 152, 189, 0.12);
      background: rgba(102, 124, 156, 0.14);
      overflow: hidden;
    }

    .pokemon-shape-tier-fill {
      position: absolute;
      inset: 0 auto 0 0;
      width: 0;
      max-width: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(107, 171, 255, 0.92), rgba(144, 213, 248, 0.98));
    }

    .pokemon-shape-tier-value {
      color: var(--text-strong);
      font-size: 12px;
      line-height: 1.2;
      font-weight: 600;
      white-space: nowrap;
    }


    .metric-row-copy {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .metric-row-note {
      margin: 0;
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .pokemon-detail-subsection-title {
      font-size: 18px;
    }

    .pokemon-advanced-chart-grid {
      margin-top: 0;
    }

    .pokemon-rarity-bars-shell {
      min-height: 132px;
      padding: 8px 4px 4px;
    }

    .pokemon-rarity-bars {
      display: grid;
      gap: 8px;
    }

    .pokemon-rarity-bar-row {
      display: grid;
      grid-template-columns: minmax(92px, 132px) minmax(0, 1fr) auto auto;
      gap: 10px;
      align-items: center;
      min-width: 0;
    }

    .pokemon-rarity-bar-label,
    .pokemon-rarity-bar-value,
    .pokemon-rarity-bar-count {
      font-size: 11px;
      line-height: 1.3;
    }

    .pokemon-rarity-bar-label {
      color: var(--text-soft);
      min-width: 0;
    }

    .pokemon-rarity-bar-track {
      position: relative;
      display: block;
      width: 100%;
      height: 8px;
      border-radius: 999px;
      border: 1px solid rgba(124, 152, 189, 0.12);
      background: rgba(102, 124, 156, 0.14);
      overflow: hidden;
    }

    .pokemon-rarity-bar-fill {
      position: absolute;
      inset: 0 auto 0 0;
      width: 0;
      max-width: 100%;
      border-radius: inherit;
    }

    .pokemon-rarity-bar-value {
      color: var(--text-strong);
      font-weight: 600;
      white-space: nowrap;
    }

    .pokemon-rarity-bar-count {
      color: var(--text-muted);
      white-space: nowrap;
    }

    .pokemon-related-toggle {
      min-width: 0;
      white-space: nowrap;
    }

    .analytics-kpi-strip {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 8px;
    }

    .analytics-kpi-pill {
      border-radius: 10px;
      background: var(--surface-card-soft);
      padding: 8px 9px;
      min-width: 0;
    }

    .analytics-kpi-pill .kpi-label {
      margin: 0;
      font-size: 11px;
      color: var(--text-muted);
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .analytics-kpi-pill .kpi-value {
      margin: 4px 0 0;
      font-size: 15px;
      color: var(--text-strong);
      font-weight: 700;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .analytics-dashboard-grid {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .analytics-card {
      border-radius: 12px;
      background: var(--surface-card-soft);
      padding: 10px;
      min-width: 0;
      display: grid;
      gap: 8px;
      align-content: start;
    }

    .analytics-card-era {
      grid-template-rows: auto minmax(240px, 1fr) auto;
    }

    .analytics-card-era .chart-shell {
      min-height: 260px;
      height: 100%;
      padding: 10px 12px;
      align-content: stretch;
      justify-items: stretch;
    }

    .analytics-card-era .chart-shell svg {
      max-height: none;
      height: 100%;
    }

    .analytics-card-head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 10px;
    }

    .pokemon-related-preview-footer {
      margin-top: 10px;
      display: flex;
      justify-content: flex-end;
    }

    .pokemon-related-count {
      margin: 0 0 8px;
    }

    .pokemon-top-card-preview-list {
      display: grid;
      gap: 0;
      border: 1px solid rgba(128, 164, 211, 0.08);
      border-radius: 16px;
      overflow: hidden;
      background: var(--pokemon-detail-panel-soft);
    }




    .pokemon-top-card-rank {
      width: 22px;
      height: 22px;
      display: inline-grid;
      place-items: center;
      border-radius: 50%;
      border: 1px solid rgba(131, 179, 241, 0.18);
      background: rgba(15, 25, 40, 0.92);
      color: var(--text-soft);
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
    }

    .pokemon-top-card-preview-thumb {
      width: 34px;
      height: 48px;
      border-radius: 6px;
      border: 1px solid rgba(128, 164, 211, 0.16);
      background: rgba(9, 17, 30, 0.84);
      object-fit: cover;
      object-position: center;
      display: block;
    }

    .pokemon-top-card-preview-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .pokemon-top-card-preview-name {
      color: var(--text-strong);
      font-size: 13px;
      font-weight: 650;
      line-height: 1.25;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pokemon-top-card-preview-meta {
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.3;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pokemon-top-card-preview-price {
      color: var(--text-strong);
      font-family: "Space Grotesk", sans-serif;
      font-size: 16px;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
      padding-left: 8px;
    }

    .pokemon-top-card-list {
      display: grid;
      gap: 0;
      border: 1px solid rgba(128, 164, 211, 0.08);
      border-radius: 16px;
      overflow: hidden;
      background: var(--pokemon-detail-panel-soft);
    }




    .pokemon-top-card-thumb {
      width: 46px;
      height: 64px;
      border-radius: 6px;
      border: 1px solid rgba(128, 164, 211, 0.18);
      background: rgba(9, 17, 30, 0.84);
      object-fit: cover;
      object-position: center;
      display: block;
    }

    .pokemon-top-card-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .pokemon-top-card-name {
      margin: 0;
      color: var(--text-strong);
      font-size: 14px;
      font-weight: 650;
      line-height: 1.25;
    }

    .pokemon-top-card-meta,
    .pokemon-top-card-sub {
      margin: 0;
      color: var(--text-soft);
      font-size: 11.5px;
      line-height: 1.3;
    }

    .pokemon-top-card-side {
      display: grid;
      align-items: center;
      justify-items: end;
      gap: 0;
      padding-left: 10px;
    }

    .pokemon-top-card-price {
      margin: 0;
      color: var(--text-strong);
      font-family: "Space Grotesk", sans-serif;
      font-size: 22px;
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1;
      white-space: nowrap;
    }

    .pokemon-related-note {
      margin-top: 8px;
    }

    .pokemon-cards-sheet {
      position: fixed;
      inset: 0;
      z-index: 70;
      display: block;
      pointer-events: none;
    }

    .pokemon-cards-sheet[hidden] {
      display: none !important;
    }

    .pokemon-cards-sheet.is-open {
      pointer-events: auto;
    }

    .pokemon-cards-sheet-backdrop {
      position: absolute;
      inset: 0;
      border: 0;
      padding: 0;
      margin: 0;
      background: rgba(4, 10, 20, 0.58);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 180ms ease;
    }

    .pokemon-cards-sheet.is-open .pokemon-cards-sheet-backdrop {
      opacity: 1;
      pointer-events: auto;
    }

    .pokemon-cards-sheet-panel {
      position: absolute;
      top: 0;
      right: 0;
      height: 100%;
      width: min(100%, 520px);
      display: grid;
      grid-template-rows: auto auto auto minmax(0, 1fr) auto;
      gap: 10px;
      padding: 16px;
      border-left: 1px solid rgba(128, 164, 211, 0.12);
      background:
        linear-gradient(180deg, rgba(11, 19, 32, 0.96), rgba(8, 15, 28, 0.985));
      box-shadow: -18px 0 44px rgba(0, 0, 0, 0.28);
      transform: translateX(24px);
      opacity: 0;
      transition: transform 180ms ease, opacity 180ms ease;
      pointer-events: none;
    }

    .pokemon-cards-sheet.is-open .pokemon-cards-sheet-panel {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
    }

    .pokemon-cards-sheet-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 12px;
    }

    .pokemon-cards-sheet-title {
      font-size: 20px;
    }

    .pokemon-cards-sheet-subtitle {
      margin: 3px 0 0;
      color: var(--text-soft);
      font-size: 12px;
      line-height: 1.45;
    }

    .pokemon-cards-sheet-close {
      align-self: center;
    }

    .pokemon-cards-sheet-controls {
      display: grid;
      gap: 10px;
    }

    .pokemon-cards-sheet-search input {
      width: 100%;
    }

    .pokemon-cards-toolbar--sheet {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .pokemon-cards-sheet-count {
      margin-bottom: 0;
    }

    .pokemon-cards-sheet-list-shell {
      min-height: 0;
      overflow: hidden;
    }

    .pokemon-cards-sheet-list {
      height: 100%;
      min-height: 0;
      max-height: min(58vh, 720px);
      overflow: auto;
      padding-right: 2px;
    }

    .pokemon-cards-sheet-list .pokemon-top-card-list {
      border-radius: 14px;
    }

    .pokemon-cards-sheet-note {
      margin-top: 0;
    }

    .analytics-card-title {
      margin: 0;
      color: var(--text-strong);
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    .analytics-card-meta {
      margin: 0;
      color: var(--text-muted);
      font-size: 11px;
      white-space: nowrap;
    }

    .chart-shell {
      border: 1px solid var(--surface-border-faint);
      border-radius: 10px;
      background: var(--surface-card-soft);
      padding: 8px;
      min-height: 170px;
      display: grid;
      align-content: center;
      justify-items: center;
      overflow: hidden;
    }

    .chart-shell svg {
      width: 100%;
      height: auto;
      max-height: 200px;
      display: block;
    }

    .chart-empty {
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.4;
      text-align: center;
      margin: 0;
      padding: 8px 10px;
    }

    .analytics-note {
      margin: 0;
      color: var(--text-soft);
      font-size: 11px;
      line-height: 1.4;
    }

    .chart-legend {
      display: grid;
      gap: 6px;
      margin-top: 4px;
    }

    .chart-legend-item {
      display: grid;
      grid-template-columns: 10px minmax(0, 1fr) auto;
      align-items: center;
      gap: 7px;
      min-width: 0;
    }

    .chart-legend-dot {
      width: 10px;
      height: 10px;
      border-radius: var(--radius-pill);
      box-shadow: 0 0 0 1px var(--surface-border-faint) inset;
    }

    .chart-legend-label {
      margin: 0;
      color: var(--text-strong);
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chart-legend-value {
      margin: 0;
      color: var(--text-muted);
      font-size: 11px;
      white-space: nowrap;
    }

    .donut-center-label {
      font-size: 12px;
      fill: color-mix(in srgb, var(--text) 92%, white 8%);
      font-weight: 700;
      text-anchor: middle;
      dominant-baseline: middle;
    }

    .donut-center-sub {
      font-size: 10px;
      fill: color-mix(in srgb, var(--text-muted) 78%, white 22%);
      text-anchor: middle;
      dominant-baseline: middle;
    }

    .chart-axis-label {
      font-size: 9px;
      fill: color-mix(in srgb, var(--text-muted) 80%, white 20%);
      text-anchor: middle;
    }

    .chart-axis-label-era {
      font-size: 10px;
      fill: color-mix(in srgb, var(--text) 88%, white 12%);
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    .chart-grid-line {
      stroke: var(--surface-border-faint);
      stroke-width: 1;
    }

    .chart-bar {
      fill: url(#eraBarGradient);
      stroke: var(--accent-border-soft);
      stroke-width: 1;
      rx: 3;
      transition: opacity 120ms ease;
    }

    .chart-bar:hover {
      opacity: 0.9;
    }

    .type-breakdown-bar {
      display: flex;
      width: 100%;
      border: 1px solid var(--surface-border-soft);
      border-radius: var(--radius-pill);
      overflow: hidden;
      min-height: 16px;
      background: var(--surface-card-strong);
    }

    .type-breakdown-segment {
      min-width: 2px;
      transition: filter 120ms ease;
    }

    .type-breakdown-segment:hover {
      filter: brightness(1.12);
    }

    .type-chip-grid {
      margin-top: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .type-chip {
      border: 1px solid var(--surface-border-soft);
      padding: 4px 9px;
      font-size: 11px;
      color: var(--text-strong);
      background: var(--chip-bg);
      white-space: nowrap;
    }

    .analytics-toggle {
      margin-top: 2px;
      border: 1px solid var(--accent-border-subtle);
      background: rgba(var(--accent-rgb), 0.12);
      color: color-mix(in srgb, var(--accent) 18%, white 82%);
      font-size: 11px;
      font-weight: 600;
      padding: 4px 10px;
      width: fit-content;
      cursor: pointer;
    }

    .analytics-toggle:hover {
      border-color: var(--accent-border-soft);
      background: rgba(var(--accent-rgb), 0.18);
    }

    .concentration-bar {
      width: 100%;
      min-height: 20px;
      border-radius: var(--radius-pill);
      border: 1px solid var(--surface-border-soft);
      overflow: hidden;
      display: flex;
      background: var(--surface-card-strong);
    }

    .concentration-segment {
      min-width: 2px;
    }

    .concentration-metrics {
      margin-top: 8px;
      display: grid;
      gap: 6px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .concentration-metric {
      border-radius: 10px;
      padding: 7px;
      background: var(--surface-card-soft);
    }

    .concentration-metric p {
      margin: 0;
    }

    .concentration-metric .label {
      font-size: 10px;
      color: var(--text-muted);
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .concentration-metric .value {
      margin-top: 3px;
      font-size: 14px;
      color: var(--text-strong);
      font-weight: 700;
    }

    .set-heatmap-wrap {
      display: grid;
      gap: 8px;
    }

    .set-heatmap-era {
      display: grid;
      gap: 6px;
    }

    .set-heatmap-era-title {
      margin: 0;
      font-size: 11px;
      color: var(--text-soft);
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .set-heatmap-grid {
      display: grid;
      gap: 6px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .set-heatmap-tile {
      border-radius: 9px;
      padding: 6px 7px;
      min-height: 44px;
      display: grid;
      align-content: space-between;
      gap: 4px;
      color: color-mix(in srgb, var(--accent) 22%, white 78%);
      background: var(--surface-card-soft);
    }

    .set-heatmap-tile .set-name {
      margin: 0;
      font-size: 11px;
      line-height: 1.25;
      font-weight: 600;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .set-heatmap-tile .set-meta {
      margin: 0;
      font-size: 10px;
      color: color-mix(in srgb, var(--text-muted) 84%, white 16%);
      line-height: 1.2;
    }

    .radar-axis-label {
      fill: color-mix(in srgb, var(--text) 84%, white 16%);
      font-size: 9px;
      font-weight: 600;
      text-anchor: middle;
    }

    .radar-ring {
      stroke: var(--surface-border-soft);
      stroke-width: 1;
      fill: none;
    }

    .radar-spoke {
      stroke: var(--surface-border-faint);
      stroke-width: 1;
    }

    .radar-shape {
      fill: rgba(var(--accent-rgb), 0.2);
      stroke: rgba(var(--accent-rgb), 0.72);
      stroke-width: 2;
    }

    .radar-point {
      fill: color-mix(in srgb, var(--accent) 28%, white 72%);
      stroke: rgba(12, 31, 49, 0.9);
      stroke-width: 1.5;
    }

    .pokemon-detail-empty {
      margin-top: 0;
      min-height: 120px;
      display: grid;
      place-items: center;
      line-height: 1.45;
    }

    .pokemon-detail-empty.loading {
      color: var(--text-muted) !important;
    }

    .pokemon-detail-empty.loading::after {
      opacity: 0.68;
    }

    .obs-list {
      margin: 0;
      padding-left: 18px;
      color: var(--text-muted);
      display: grid;
      gap: 7px;
      font-size: 13px;
      line-height: 1.52;
    }

    .set-trend-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .set-trend-value {
      margin: 4px 0 0;
      color: #f4f9ff;
      font-size: clamp(1.7rem, 2.4vw, 2.2rem);
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1;
    }

    .set-trend-badges {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .set-trend-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 88px;
      padding: 8px 12px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.1);
      font-size: 0.92rem;
      font-weight: 800;
      letter-spacing: 0.01em;
    }

    .set-trend-pill--positive {
      color: #d9ffec;
      background: rgba(91, 224, 158, 0.12);
      border-color: rgba(91, 224, 158, 0.22);
    }

    .set-trend-pill--negative {
      color: #ffe0e0;
      background: rgba(255, 139, 139, 0.12);
      border-color: rgba(255, 139, 139, 0.22);
    }

    .set-trend-pill--neutral {
      color: #d9e8ff;
      background: rgba(121, 180, 255, 0.12);
      border-color: rgba(121, 180, 255, 0.22);
    }

    .set-trend-meta {
      color: var(--text-secondary);
      font-size: 0.84rem;
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .set-trend-shell {
      min-height: 214px;
      padding: 12px 18px 10px;
      justify-items: stretch;
      background:
        radial-gradient(circle at top left, rgba(121, 180, 255, 0.09), transparent 44%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    }

    .set-trend-shell--positive {
      background:
        radial-gradient(circle at top left, rgba(91, 224, 158, 0.10), transparent 44%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    }

    .set-trend-shell--negative {
      background:
        radial-gradient(circle at top left, rgba(255, 139, 139, 0.10), transparent 44%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    }

    .set-trend-shell svg {
      width: 100%;
      height: auto;
      max-height: none;
      display: block;
    }

    .set-trend-line {
      fill: none;
      stroke-width: 3;
      stroke-linecap: round;
      stroke-linejoin: round;
      filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
    }

    .set-trend-line--positive {
      stroke: #6af0b1;
    }

    .set-trend-line--negative {
      stroke: #ff8b8b;
    }

    .set-trend-line--neutral {
      stroke: #8ec0ff;
    }

    .set-trend-guide {
      stroke: rgba(255,255,255,0.07);
      stroke-width: 1;
      stroke-dasharray: 3 5;
    }

    .set-trend-point {
      fill: #eaf3ff;
      stroke: rgba(16, 25, 44, 0.9);
      stroke-width: 2;
    }

    .set-trend-point--end {
      fill: #ffffff;
    }

    .trend-area-segment {
      stroke: none;
      pointer-events: none;
    }

    .trend-area-segment--up {
      fill: rgba(74, 222, 128, 0.18);
    }

    .trend-area-segment--down {
      fill: rgba(248, 113, 113, 0.16);
    }

    .trend-hover-node {
      cursor: crosshair;
      pointer-events: all;
    }

    .trend-hit-area {
      fill: transparent;
      stroke: none;
      pointer-events: all;
    }

    .trend-hover-guide,
    .trend-active-point {
      opacity: 0;
      transition: opacity 130ms ease;
      pointer-events: none;
    }

    .trend-hover-guide {
      stroke: rgba(210, 226, 249, 0.32);
      stroke-width: 1;
      stroke-dasharray: 4 5;
    }

    .trend-active-point {
      fill: color-mix(in srgb, var(--viz-primary-start) 88%, white 16%);
      stroke: rgba(10, 18, 31, 0.95);
      stroke-width: 2;
      filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.26));
    }

    .trend-hover-node:hover .trend-hover-guide,
    .trend-hover-node:hover .trend-active-point {
      opacity: 1;
    }

    .reason-list {
      margin: 0;
      padding-left: 16px;
      color: var(--text-soft);
      font-size: 12px;
      line-height: 1.45;
      display: grid;
      gap: 4px;
    }

    .empty {
      border: 1px dashed rgba(157, 181, 222, 0.26);
      border-radius: var(--radius-sm);
      padding: 22px;
      text-align: center;
      color: var(--text-muted);
      font-size: 13px;
      background: rgba(8, 13, 23, 0.56);
    }

    .loading {
      position: relative;
      overflow: hidden;
      color: transparent !important;
    }

    .loading::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(100deg, rgba(22, 34, 53, 0.65) 30%, rgba(44, 66, 101, 0.78) 50%, rgba(22, 34, 53, 0.65) 70%);
      background-size: 220% 100%;
      animation: shimmer 1.3s infinite;
      border-radius: inherit;
    }

    @keyframes shimmer {
      0% {
        background-position: 130% 0;
      }
      100% {
        background-position: -120% 0;
      }
    }

    @media (max-width: 1270px) {
      .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }


      .pokemon-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .pokemon-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .top-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .rank-row {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 8px;
      }

      .rank-row > .rank-metric,
      .rank-row > .rank-secondary {
        grid-column: 2;
      }
    }

    @media (max-width: 980px) {
      .main {
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
      }

      .mobile-nav {
        display: flex;
      }
    }

    @media (max-width: 1090px) {
      .main {
        padding: var(--space-4);
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
      }

      .mobile-nav {
        display: flex;
      }

      .currency-wrap,
      .control-select-wrap {
        justify-content: space-between;
        width: 100%;
      }
    }

    @media (max-width: 960px) {
      .control-row {
        grid-template-columns: 1fr;
      }

      .browser-search-row {
        grid-template-columns: 1fr;
      }


      .pokemon-hero-main {
        grid-template-columns: 1fr;
      }

      .pokemon-hero-side {
        justify-items: start;
      }






      .pokemon-chase-board-head {
        display: none;
      }

      .pokemon-chase-board-row {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .pokemon-chase-board-row > .pokemon-chase-board-metric,
      .pokemon-chase-board-row > .pokemon-chase-board-confidence {
        justify-self: start;
        text-align: left;
      }

      .pokemon-card-pool-row {
        grid-template-columns: 1fr;
      }

      .pokemon-card-pool-metrics {
        justify-content: start;
      }

      .pokemon-read-fact-strip {
        max-width: none;
      }


      .pokemon-evolution-stage-track {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
      }

      .pokemon-evolution-stage-track.has-multiple::before {
        left: 22px;
        right: 22px;
      }

      .pokemon-evolution-card {
        min-width: 156px;
      }

      .set-heatmap-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 620px) {
	      .main {
	        padding: var(--space-3);
          padding-bottom: calc(96px + env(safe-area-inset-bottom));
	      }

      .surface {
        padding: var(--space-4);
      }

      .section-title {
        font-size: 22px;
        line-height: 1.15;
      }
      .page-section {
        padding: 18px;
      }

      .btn,
.mobile-nav .nav-item,
.pokemon-generation-nav-btn{
        min-height: 44px;
      }

      .browser-search {
        grid-template-columns: 20px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 0 10px 0 12px;
      }

      .browser-search input,
      .browser-search .search-clear {
        min-width: 0;
      }

      .search-clear {
        padding-inline: 8px;
      }

      .entity-card {
        grid-template-columns: 62px minmax(0, 1fr);
      }

      .entity-image {
        width: 62px;
        height: 88px;
      }

      .top-cards-grid {
        grid-template-columns: 1fr;
      }

      .section-head {
        flex-direction: column;
      }

      .mobile-nav {
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        padding: 6px;
        gap: 2px;
        border-radius: 22px;
      }

      .mobile-nav .nav-item {
        min-height: 54px;
        padding: 8px 4px 7px;
        border-radius: 16px;
      }

      .mobile-nav-icon {
        width: 20px;
        height: 20px;
        font-size: 16px;
      }

      .mobile-nav-label {
        font-size: 10px;
      }

      .main-toolbar {
        top: 8px;
      }

      .settings-modal-dialog {
        width: min(100vw - 20px, 420px);
        padding: 16px;
      }

      .bubble-sub {
        display: none;
      }


      .pokemon-generation-actions {
        align-items: flex-start;
        width: 100%;
      }

      .pokemon-generation-jump-group {
        gap: 6px;
      }

      .pokemon-generation-nav-btn {
        padding: 5px 8px;
        font-size: 11px;
      }

      .pokemon-generation-title {
        gap: 8px;
      }

      .pokemon-generation-region {
        font-size: 10px;
        padding: 3px 8px;
      }

      .pokemon-generation-stats {
        gap: 6px;
      }

      .pokemon-generation-stat {
        font-size: 11px;
        padding: 4px 8px;
      }



      .pokemon-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }


      .pokemon-insight-grid {
        grid-template-columns: 1fr;
      }

      .global-footer {
        font-size: 11px;
      }
    }

    @media (max-width: 960px) {
      #pokemonViewToggle {
        display: none !important;
      }
    }

    @media (max-width: 960px) {

      .pokemon-browser-meta {
        align-items: flex-start;
      }
    }

    @media (max-width: 760px) {
      .side-nav {
        top: max(12px, env(safe-area-inset-top));
        left: max(12px, env(safe-area-inset-left));
        bottom: 12px;
        width: min(320px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        border-radius: 24px;
        padding: 12px 14px 18px;
      }

      .main-toolbar {
        top: max(8px, env(safe-area-inset-top));
      }
    }

    @media (max-width: 430px) {


    }







    .card-history-range-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .card-history-controls {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .card-history-shell {
      min-height: 272px;
    }

    .card-history-shell svg {
      width: 100%;
      height: auto;
      overflow: visible;
    }

    .card-history-area-segment--up {
      fill: rgba(74, 222, 128, 0.18);
    }

    .card-history-area-segment--down {
      fill: rgba(248, 113, 113, 0.16);
    }

    .card-history-hover-node {
      cursor: crosshair;
    }

    .card-history-hit-area {
      fill: transparent;
      stroke: none;
    }

    .card-history-hover-guide,
    .card-history-active-point {
      opacity: 0;
      transition: opacity 130ms ease;
      pointer-events: none;
    }

    .card-history-hover-guide {
      stroke: rgba(210, 226, 249, 0.32);
      stroke-width: 1;
      stroke-dasharray: 4 5;
    }

    .card-history-active-point {
      fill: color-mix(in srgb, var(--viz-primary-start) 88%, white 16%);
      stroke: rgba(10, 18, 31, 0.95);
      stroke-width: 2;
      filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.26));
    }

    .card-history-hover-node:hover .card-history-hover-guide,
    .card-history-hover-node:hover .card-history-active-point {
      opacity: 1;
    }

    .comparable-card {
      min-width: 0;
    }

    .card-detail-page-surface {
      overflow: hidden;
    }

    .card-detail-page-head {
      align-items: center;
    }

    .card-detail-body {
      margin-top: 0;
      min-width: 0;
    }

    .card-detail-page-stack {
      width: min(100%, 1040px);
      display: grid;
      gap: 8px;
      margin: 0 auto;
    }



























































    .dexseq-constellation {
      position: relative;
      min-height: 124px;
      padding-top: 0;
      padding-right: 24px;
    }

    .dexseq-constellation-track {
      position: absolute;
      left: 6px;
      right: 24px;
      top: 56px;
      height: 2px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(98, 128, 208, 0.56), rgba(110, 177, 232, 0.64), rgba(202, 182, 118, 0.68));
      opacity: 0.9;
    }

    .dexseq-constellation-marker {
      position: absolute;
      top: 0;
      width: max-content;
      max-width: 144px;
      transform: translateX(-50%);
      min-width: 0;
    }

    .dexseq-constellation-marker.is-lane-alt {
      top: 70px;
    }

    .dexseq-constellation-marker.is-align-left {
      transform: translateX(0);
    }

    .dexseq-constellation-marker.is-align-right {
      transform: translateX(-100%);
    }

    .dexseq-constellation-label {
      display: grid;
      gap: 1px;
      justify-items: center;
      text-align: center;
      padding-bottom: 0;
    }

    .dexseq-constellation-name {
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.25;
    }

    .dexseq-constellation-marker.is-cluster .dexseq-constellation-name {
      color: rgba(192, 208, 232, 0.82);
    }

    .dexseq-constellation-value {
      color: var(--text-strong);
      font-family: "Space Grotesk", sans-serif;
      font-size: 17px;
      line-height: 1;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .dexseq-constellation-dot-anchor {
      position: absolute;
      top: 0;
      width: 0;
      height: 0;
    }

    .dexseq-constellation-dot {
      position: absolute;
      left: 50%;
      top: 50px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      transform: translateX(-50%);
      border: 1px solid rgba(8, 16, 28, 0.92);
      background-color: rgba(200, 220, 248, 0.92);
      box-shadow: 0 0 0 4px rgba(200, 220, 248, 0.05);
      overflow: hidden;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
    }

    .dexseq-constellation-dot.has-media {
      background-image: var(--dot-image);
    }

    .dexseq-constellation-dot.has-media::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(4,10,18,0.1));
      pointer-events: none;
    }

    .dexseq-constellation-dot-anchor.is-indigo .dexseq-constellation-dot {
      background-color: #6f8fe2;
      box-shadow: 0 0 0 4px rgba(111, 143, 226, 0.08);
    }

    .dexseq-constellation-dot-anchor.is-blue .dexseq-constellation-dot {
      background-color: #79b4f8;
      box-shadow: 0 0 0 4px rgba(121, 180, 248, 0.08);
    }

    .dexseq-constellation-dot-anchor.is-teal .dexseq-constellation-dot {
      background-color: #69cabf;
      box-shadow: 0 0 0 4px rgba(105, 202, 191, 0.08);
    }

    .dexseq-constellation-marker.is-gold .dexseq-constellation-value {
      color: #ffe39b;
    }

    .dexseq-constellation-dot-anchor.is-emphasized .dexseq-constellation-dot {
      width: 24px;
      height: 24px;
      border-radius: 7px;
      transform: translateX(-50%);
      background-color: #efc65c;
      box-shadow: 0 0 14px rgba(244, 202, 98, 0.2);
    }

    .dexseq-constellation-dot.is-card {
      background-size: 138%;
      background-position: center 42%;
    }

    .dexseq-constellation-dot-fallback {
      position: relative;
      z-index: 1;
      color: rgba(240, 247, 255, 0.92);
      font-size: 9px;
      line-height: 1;
      font-weight: 700;
      font-family: "Space Grotesk", sans-serif;
    }

    .dexseq-constellation-marker.is-align-left .dexseq-constellation-label,
    .dexseq-constellation-marker.is-align-left.is-lane-alt .dexseq-constellation-label {
      justify-items: start;
      text-align: left;
    }

    .dexseq-constellation-marker.is-align-right .dexseq-constellation-label,
    .dexseq-constellation-marker.is-align-right.is-lane-alt .dexseq-constellation-label {
      justify-items: end;
      text-align: right;
    }

    .card-history-latest-dot {
      fill: color-mix(in srgb, var(--viz-primary-start) 88%, white 14%);
      stroke: rgba(10, 18, 31, 0.95);
      stroke-width: 2;
    }

    .card-history-latest-label {
      fill: rgba(234, 242, 252, 0.94);
      font-size: 11px;
      font-weight: 600;
    }

    @media (max-width: 980px) {



    }

    @media (max-width: 760px) {















      .card-detail-page-head {
        align-items: flex-start;
      }








      .pokemon-top-card-preview-thumb {
        width: 30px;
        height: 42px;
      }

      .pokemon-top-card-preview-price {
        font-size: 14px;
      }

      .pokemon-rarity-bar-row {
        grid-template-columns: minmax(80px, 112px) minmax(0, 1fr) auto;
        gap: 8px;
      }

      .pokemon-rarity-bar-count {
        display: none;
      }

      .pokemon-top-card-thumb {
        width: 42px;
        height: 58px;
      }

      .pokemon-top-card-price {
        font-size: 18px;
      }

      .dexseq-constellation {
        min-height: 136px;
      }

      .dexseq-constellation-label {
        max-width: 92px;
      }

      .card-history-controls {
        align-items: stretch;
        flex-direction: column;
      }

      .card-history-shell {
        min-height: 208px;
      }





      .pokemon-detail-title {
        font-size: 28px;
      }




      .pokemon-active-badge-row {
        gap: 6px;
      }

      .pokemon-active-badge {
        min-height: 26px;
        padding: 0 10px;
        font-size: 10px;
        max-width: 100%;
      }







      .pokemon-chase-board-card,
      .pokemon-card-pool-card {
        grid-template-columns: 42px minmax(0, 1fr);
      }

      .pokemon-top-card-rank {
        display: none;
      }

      .pokemon-chase-board-thumb,
      .pokemon-card-pool-thumb {
        width: 42px;
        height: 58px;
      }

      .pokemon-card-pool-metrics {
        grid-template-columns: repeat(2, minmax(0, auto));
        grid-auto-flow: row;
        justify-content: start;
        gap: 6px 10px;
      }




.pokemon-related-surface{
        padding: 12px;
      }

      .pokemon-cards-sheet-panel {
        width: min(100%, 100vw);
        padding: 14px;
      }

      .pokemon-cards-sheet-list {
        max-height: none;
        height: min(58vh, 560px);
      }

      .pokemon-mobile-body {
        min-width: 0;
        display: grid;
        gap: 2px;
        align-content: center;
      }

      .pokemon-mobile-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
      }

      .pokemon-mobile-head .pokemon-row-title {
        min-width: 0;
        margin: 0;
      }

      .pokemon-mobile-value {
        margin: 0;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-main);
        white-space: nowrap;
      }

      .pokemon-mobile-stats {
        margin: 0;
        color: var(--text-soft);
        font-size: 11px;
        line-height: 1.3;
      }




    }

    @media (prefers-reduced-motion: reduce) {

    }

    .tag--positive {
      background: rgba(61, 189, 124, 0.14);
      border-color: rgba(61, 189, 124, 0.26);
      color: #9be7bd;
    }

    .tag--warning {
      background: rgba(244, 164, 96, 0.14);
      border-color: rgba(244, 164, 96, 0.26);
      color: #ffcf9b;
    }

    .tag--watch {
      background: rgba(244, 180, 76, 0.16);
      border-color: rgba(244, 180, 76, 0.3);
      color: #ffd88f;
    }

    .tag--accent {
      background: rgba(104, 168, 255, 0.14);
      border-color: rgba(104, 168, 255, 0.26);
      color: #bfdbff;
    }

    .tag--sell {
      background: rgba(225, 92, 92, 0.16);
      border-color: rgba(225, 92, 92, 0.3);
      color: #ffb2b2;
    }

    .tag--neutral {
      background: rgba(255,255,255,0.06);
      border-color: rgba(255,255,255,0.1);
      color: var(--text-primary);
    }

.btn-danger {
  border-color: rgba(255, 111, 111, 0.34);
  color: #ffd4d4;
}

.btn-danger:hover {
  border-color: rgba(255, 111, 111, 0.6);
  background: rgba(120, 24, 24, 0.34);
}

/* Mobile shell: the bottom navigation is the single navigation surface. */
@media (max-width: 1090px) {
  .side-nav-toggle {
    display: none !important;
  }

  .main-toolbar {
    justify-content: flex-end;
    flex-wrap: wrap;
    min-height: 40px;
  }

  .main-toolbar-actions {
    width: auto;
    margin-left: auto;
  }

  .main-toolbar-currency {
    width: 124px;
    min-height: 40px;
    padding: 4px;
    border-radius: 14px;
  }

  .main-toolbar-currency .browser-combobox-shell {
    min-height: 34px;
    grid-template-columns: minmax(0, 1fr) 14px;
    gap: 6px;
    padding: 0 8px;
    border-radius: 11px;
  }

  .main-toolbar-currency input {
    min-height: 34px;
    font-size: 12px;
    font-weight: 650;
  }

  .main-toolbar-currency .currency-combobox-toggle {
    min-width: 14px;
    font-size: 12px;
  }

  .main-toolbar-currency .browser-combobox-menu {
    left: auto;
    right: 0;
    width: min(320px, calc(100vw - 24px));
  }

  .daily-refresh-status {
    order: 2;
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .main-toolbar-currency {
    width: 112px;
  }
}

/* Mobile homepage density pass: preserve the data while reducing vertical travel. */
@media (max-width: 760px) {
  .main-toolbar {
    position: relative;
    top: auto;
    height: 0;
    min-height: 0;
    margin-bottom: 0;
    align-items: flex-start;
  }
}

@media (min-width: 1091px) {
  .main-toolbar-currency {
    display: none !important;
  }
}

/* Mobile utility row for detail pages: reserve space for the floating toolbar and
   show the context back button. */
@media (max-width: 760px) {
  /* The zero-height mobile toolbar floats above the active page. Reserve one
     compact utility row so the currency control never covers page content. */
  #page-search,
  #page-card {
    padding-top: 52px;
  }

  .main-toolbar-currency {
    width: 124px;
  }

  body[data-active-page="set"] .mobile-card-detail-back:not([hidden]),
  body[data-active-page="card"] .mobile-card-detail-back:not([hidden]),
  body[data-active-page="pokemon_detail"] .mobile-card-detail-back:not([hidden]) {
    pointer-events: auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 4px 13px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1;
  }

  #page-set,
#page-pokemon-detail{
    padding-top: 52px;
  }
}

/* Mobile Set Report: treat the report as a compact reading surface instead of
   stacking the desktop toolbar, chart canvases, and metric cards vertically. */
@media (max-width: 760px) {

  #page-set .set-trend-pill {
    min-width: 0;
    padding: 5px 8px;
    font-size: 10px;
  }
}

/* Shared time-series inspector for Overview and Card Detail. */
.trend-inspector-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.trend-inspector-shell svg {
  touch-action: pan-y;
}

.trend-hover-node.is-inspecting .trend-hover-guide,
.trend-hover-node.is-inspecting .trend-active-point,
.card-history-hover-node.is-inspecting .card-history-hover-guide,
.card-history-hover-node.is-inspecting .card-history-active-point {
  opacity: 1;
}
/* Phase 6 Compare: relative trusted paths. */
.cmp-root { box-sizing: border-box; width: 100%; max-width: 1120px; margin: 0 auto; padding: clamp(20px, 4vw, 54px); color: #282722; }
.cmp-head { margin: 0 0 30px; }
.cmp-back-link { display:inline-block; margin:0 0 18px; color:#4d625c; font-size:13px; font-weight:650; text-decoration:none; }
.cmp-back-link:hover { text-decoration:underline; }
.cmp-kicker { margin: 0 0 8px; color: #83624a; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.cmp-head h1 { margin: 0; font: 500 clamp(30px, 5vw, 50px)/1.04 Georgia, serif; letter-spacing: -.035em; }
.cmp-head > p:last-child { color: #716e65; margin: 12px 0 0; }
.cmp-picker { padding: 18px 0; border-block: 1px solid #dedbd2; }
.cmp-picker label { display:block; margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.cmp-add { display:flex; gap:8px; max-width: 720px; }
.cmp-query { display:block; width:min(720px,100%); margin:0 0 8px; padding:11px 12px; border:1px solid #cbc7bc; border-radius:8px; background:#fffefa; font:inherit; }
.cmp-add select { flex:1; min-width:0; padding:11px 12px; border:1px solid #cbc7bc; border-radius:8px; background:#fffefa; font:inherit; }
.cmp-add button,.cmp-range { padding:9px 14px; border:1px solid #c9c3b7; border-radius:7px; background:#f7f4ec; color:#333; font:inherit; cursor:pointer; }
.cmp-add button:hover,.cmp-range:hover:not(:disabled) { background:#ece7dc; }
.cmp-chip { display:inline-flex; align-items:center; gap:12px; margin:12px 8px 0 0; padding:8px 9px 8px 12px; border:1px solid #d5d0c5; border-radius:999px; background:#fffefa; }
.cmp-chip small { margin-left:5px; color:#827d72; text-transform:capitalize; }
.cmp-chip button { border:0; background:none; font-size:20px; line-height:1; cursor:pointer; }
.cmp-help,.cmp-note { color:#77736a; font-size:13px; }
.cmp-empty { padding:26px 0; color:#706c63; }
.cmp-results { margin-top:30px; }
.cmp-period { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; margin-bottom:12px; }
.cmp-period > span { color:#77736a; font-size:13px; }
.cmp-period strong { font:500 18px Georgia,serif; }
.cmp-period > div { display:flex; gap:5px; margin-left:auto; }
.cmp-context { margin:0 0 12px; color:#77736a; font-size:12px; }
.cmp-range { padding:6px 10px; font-size:12px; }
.cmp-range.is-active { border-color:#74614e; background:#e8e0d2; }
.cmp-range:disabled { opacity:.38; cursor:not-allowed; }
.cmp-chart { min-height:220px; overflow:hidden; padding:12px 0 0; border-top:1px solid #dedbd2; }
.cmp-chart svg { display:block; width:100%; height:auto; overflow:visible; font:11px system-ui,sans-serif; }
.cmp-chart svg text { fill:#77736a; }
.cmp-grid { stroke:#e7e3da; stroke-width:1; }
.cmp-zero { stroke:#918879; stroke-width:1.3; stroke-dasharray:4 4; }
.cmp-legend { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0 20px; border-top:1px solid #dedbd2; }
.cmp-legend-row { display:flex; align-items:center; gap:10px; min-width:0; padding:12px 0; color:inherit; text-decoration:none; border-bottom:1px solid #ece9e2; }
.cmp-legend-row i { flex:0 0 4px; height:34px; border-radius:4px; background:var(--cmp-color); }
.cmp-legend-row span { display:flex; flex:1; flex-direction:column; min-width:0; }
.cmp-legend-row strong,.cmp-legend-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cmp-legend-row small { margin-top:3px; color:#77736a; }
.cmp-legend-row b { font-variant-numeric:tabular-nums; }
.cmp-inspection { min-height:24px; padding:8px 0; font-size:13px; font-variant-numeric:tabular-nums; }
.cmp-summary { width:100%; margin:18px 0; border-collapse:collapse; font-size:13px; }
.cmp-summary th,.cmp-summary td { padding:9px 7px; border-top:1px solid #e3dfd6; text-align:right; font-variant-numeric:tabular-nums; }
.cmp-summary thead th,.cmp-summary tbody th { color:#77736a; font-weight:500; }
.cmp-summary th:first-child { text-align:left; }
.sq-compare-link { display:inline-flex; align-self:flex-start; margin:10px 0; padding:7px 11px; border:1px solid #d1c9bc; border-radius:999px; color:#4d483e; text-decoration:none; font-size:13px; }
@media (max-width:560px) { .cmp-root { padding:22px 16px; } .cmp-period { align-items:flex-start; } .cmp-period > div { width:100%; margin:0; } .cmp-range { flex:1; padding:8px 4px; } .cmp-legend { grid-template-columns:1fr; } .cmp-add { align-items:stretch; } }
++ b/static/styles/app.css
/* Phase 14C Comparable Market Profiles. */
.cs-profile-section { padding-block: 20px; border-top: 1px solid #dedbd2; }
.cs-profile-semantics,.cs-profile-date,.cs-comp-intro,.cs-profile-state { color: #716e65; font-size: 13px; }
.cs-profile-semantics { margin: 0 0 12px; }
.cs-profile-state { margin: 6px 0; }
.cs-profile-list { display: grid; gap: 12px; margin: 16px 0; padding: 0; list-style: none; }
.cs-profile-row { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: start; gap: 14px; padding: 14px; border: 1px solid #e3dfd6; border-radius: 10px; background: #fffefa; transition: border-color 120ms ease, background 120ms ease; }
.cs-profile-row.is-selected { border-color: #55776f; background: #f2f7f5; box-shadow: inset 3px 0 #365d55; }
.cs-profile-art { position: relative; display: block; width: 90px; aspect-ratio: 5 / 7; overflow: hidden; border-radius: 5px; background: var(--paper-deep, #e8e0d2); }
.cs-profile-art > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-profile-art-missing { background: var(--paper-deep, #e8e0d2); }
.cs-profile-art-fallback { position: absolute; inset: 0; background: var(--paper-deep, #e8e0d2); }
.cs-profile-main { min-width: 0; }
.cs-profile-card-head { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.cs-profile-card-head > div:first-child { min-width:0; }
.cs-profile-card-head > div:first-child > strong,.cs-profile-price > strong { display:block; }
.cs-profile-card-head .cs-muted,.cs-profile-price > span { display:block; color:#77736a; font-size:12px; }
.cs-profile-price { flex:none; text-align:right; font-size:14px; }
.cs-profile-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.cs-profile-reason { display: inline-block; padding: 4px 7px; border-radius: 999px; background: #f0ece3; color: #564c3f; font-size: 11px; }
.cs-profile-metrics { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0 4px; }
.cs-profile-metrics > div { display: grid; gap: 2px; }
.cs-profile-metrics dt { color: #77736a; font-size: 10px; }
.cs-profile-metrics dd { margin: 0; color: #302f2a; font-size: 13px; font-variant-numeric: tabular-nums; }
.cs-profile-details { margin-top: 8px; color: #716e65; font-size: 12px; }
.cs-profile-details summary { width: fit-content; cursor: pointer; }
.cs-profile-details dl { display: grid; gap: 5px; margin: 8px 0 0; }
.cs-profile-details dl > div { display: grid; grid-template-columns: minmax(130px,auto) 1fr; gap: 10px; }
.cs-profile-details dt { color: #77736a; }
.cs-profile-details dd { margin: 0; color: #48463f; }
.cs-profile-card-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:8px; }
.cs-profile-select,.cs-profile-compare-selected,.cs-profile-more { display: inline-block; margin-top: 7px; padding: 7px 10px; border: 1px solid #d1c9bc; border-radius: 7px; background: #f7f4ec; color: #4d483e; text-decoration: none; font: inherit; cursor: pointer; }
.cs-profile-card-foot > .cs-profile-select { flex:none; margin-top:0; }
.cs-profile-select.is-selected { border-color: #365d55; background: #365d55; color: #fff; font-weight: 650; }
.cs-profile-select:disabled { opacity: .48; cursor: not-allowed; }
.cs-profile-selection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 12px 0 4px; }
.cs-profile-compare-selected { border-color: #365d55; background: #365d55; color: #fff; font-weight: 650; }
.cs-profile-selection-actions > span,.cs-profile-selection-limit { color: #716e65; font-size: 12px; }
.cs-profile-selection-limit { margin: 10px 0 0; }
.cs-profile-skeleton { display: grid; gap: 9px; margin: 12px 0; }
.cs-profile-skeleton i { display: block; height: 12px; border-radius: 6px; background: #eeeae2; }
.cs-profile-skeleton i:nth-child(2n) { width: 76%; }
@media (max-width: 640px) { .cs-profile-row { grid-template-columns: 60px minmax(0,1fr); gap: 10px; padding: 10px; } .cs-profile-art { width: 60px; } .cs-profile-card-head { gap:6px; } .cs-profile-price { font-size:13px; } .cs-profile-metrics { gap: 6px 14px; } .cs-profile-details dl > div { grid-template-columns: 1fr; gap: 2px; } }
