    * { box-sizing: border-box; }

    :root {
      --bg-page: #050505;
      --bg-page-gradient: radial-gradient(ellipse at 50% 0%, #0d1a0d 0%, #050505 70%);
      --bg-surface: #0f0f0f;
      --bg-surface-2: #111;
      --bg-surface-3: #1a1a1a;
      --bg-surface-4: #141414;
      --bg-surface-deep: #0c0c0c;
      --border-color: #2a2a2a;
      --border-subtle: #1f1f1f;
      --border-faint: #161616;
      --border-focus: #444;
      --accent: #ffd500;
      --text-primary: #fff;
      --text-secondary: #ccc;
      --text-tertiary: #ddd;
      --text-muted: #888;
      --text-dim: #555;
      --text-faint: #444;
      --text-ghost: #333;
      --badge-ghost-bg: transparent;
      --switch-dot: #888;
      --modal-overlay: rgba(0, 0, 0, 0.88);
      --stack-panel-bg: #0a0f1a;
      --stack-panel-border: #1e2a4a;
      --chart-text: #444;
      --chart-grid: #111;
      --theme-badge-color: #ffd500;
      --theme-badge-border: #ffd50033;
      --discount-badge-color: #6dff9a;
      --discount-badge-border: #6dff9a22;
      --gc-buy-color: #ffd400;
      --gc-buy-color-hover: #ffe84d;
    }

    [data-theme="light"] {
      --accent: #f59e0b;
      --bg-page: #f3f4f6;
      --bg-page-gradient: radial-gradient(ellipse at 50% 0%, #e6f4ea 0%, #f3f4f6 70%);
      --bg-surface: #ffffff;
      --bg-surface-2: #ffffff;
      --bg-surface-3: #eef1fb;
      --bg-surface-4: #f1f2f4;
      --bg-surface-deep: #ffffff;
      --border-color: #d6d8db;
      --border-subtle: #e3e5e8;
      --border-faint: #ebedef;
      --border-focus: #aeb2b8;
      --text-primary: #14161a;
      --text-secondary: #3a3d42;
      --text-tertiary: #2a2d31;
      --text-muted: #6b7178;
      --text-dim: #8a8f96;
      --text-faint: #9aa0a6;
      --text-ghost: #c4c8cc;
      --badge-ghost-bg: #eef1fb;
      --switch-dot: #fff;
      --modal-overlay: rgba(20, 20, 20, 0.45);
      --stack-panel-bg: #eef1fb;
      --stack-panel-border: #c9d2f0;
      --chart-text: #8a8f96;
      --chart-grid: #e3e5e8;
      --theme-badge-color: #a16207;
      --theme-badge-border: #a1620733;
      --discount-badge-color: #15803d;
      --discount-badge-border: #15803d33;
      --gc-buy-color: #a16207;
      --gc-buy-color-hover: #854d0e;
    }

    html, body { overflow-x: hidden; }

    body {
      background: var(--bg-page);
      background-image: var(--bg-page-gradient);
      min-height: 100vh;
      color: var(--text-primary);
      font-family: 'Inter', Arial, sans-serif;
      padding: 28px 24px;
      transition: background 0.2s, color 0.2s;
    }

    .page-container {
      max-width: 1680px;
      width: 100%;
      min-width: 0;
      margin: 0 auto;
    }

    /* ── Header ──────────────────────────────────────────────────────────────── */

    .header { margin-bottom: 6px; }

    .header-title {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .header-icon { font-size: 44px; line-height: 1; }

    h1 {
      color: #ffd400;
      font-size: 46px;
      font-weight: 800;
      margin: 0;
      letter-spacing: -1.5px;
    }

    .header-sub {
      color: var(--text-faint);
      font-size: 14px;
      margin: 6px 0 0 58px;
    }

    /* ── Stats strip ─────────────────────────────────────────────────────────── */

    .stats-strip {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--text-faint);
      font-size: 13px;
      font-weight: 600;
      margin: 18px 0 28px;
      flex-wrap: wrap;
    }

    .stats-strip .stat-val { color: #00ff99; font-weight: 700; }
    .stat-divider { color: var(--border-color); font-size: 16px; }

    /* ── Controls ────────────────────────────────────────────────────────────── */

    .controls {
      display: flex;
      gap: 10px;
      margin-bottom: 14px;
      flex-wrap: wrap;
      align-items: center;
    }

    input, select {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 12px 16px;
      font-size: 14px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 500;
      outline: none;
      transition: border-color 0.15s;
    }

    input:focus, select:focus { border-color: var(--border-focus); }

    input { width: 100%; max-width: 260px; }
    input[type="checkbox"] { width: auto; max-width: none; }

    select option { background: var(--bg-surface-2); color: var(--text-primary); }

    .live-indicator {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #00ff99;
      font-size: 13px;
      font-weight: 700;
      margin-left: auto;
      padding: 10px 16px;
      background: #071a0e;
      border: 1px solid #00ff9922;
      border-radius: 12px;
    }

    .live-dot {
      width: 7px;
      height: 7px;
      background: #00ff99;
      border-radius: 50%;
      animation: pulse 1.5s infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%       { opacity: 0.4; transform: scale(0.7); }
    }

    /* ── Store filter (multi-select) ────────────────────────────────────────── */

    .store-filter {
      position: relative;
    }

    .store-filter-btn {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 12px 16px;
      font-size: 14px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 500;
      cursor: pointer;
      transition: border-color 0.15s;
      white-space: nowrap;
    }

    .store-filter-btn:hover,
    .store-filter.open .store-filter-btn { border-color: var(--border-focus); }

    .store-filter-panel {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      right: auto;
      z-index: 50;
      background: var(--bg-surface-deep);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 16px;
      width: 320px;
      max-width: calc(100vw - 32px);
      max-height: 360px;
      overflow-y: auto;
      box-sizing: border-box;
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    }

    .store-filter.open .store-filter-panel { display: block; }

    .store-filter-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 16px;
    }

    .store-filter-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: var(--text-primary);
      cursor: pointer;
      width: 100%;
    }

    .store-filter-item input {
      width: 18px;
      height: 18px;
      min-width: 18px;
      max-width: 18px;
      flex: 0 0 18px;
      padding: 0;
      margin: 0;
      cursor: pointer;
    }

    .store-filter-item .sf-label {
      flex: 1;
      min-width: 0;
    }

    .store-filter-actions {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border-faint);
    }

    .store-filter-actions button {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 600;
      padding: 6px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .store-filter-actions button:hover { background: var(--border-color); color: var(--text-primary); }

    /* ── Filter chips ────────────────────────────────────────────────────────── */

    .chips {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 28px;
    }

    .chip {
      background: var(--bg-surface);
      color: var(--text-dim);
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      padding: 7px 15px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .chip:hover { border-color: var(--border-focus); color: var(--text-muted); }

    .chip.active {
      background: #071a0e;
      color: #00ff99;
      border-color: #00ff9966;
    }

    /* ── Grid ────────────────────────────────────────────────────────────────── */

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
      gap: 20px;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      justify-items: stretch;
    }

    /* ── Cards ───────────────────────────────────────────────────────────────── */

    .card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 20px;
      padding: 16px;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
      animation: fadeUp 0.35s ease;
    }

    .card:hover {
      transform: translateY(-5px);
      border-color: #00ff9944;
      box-shadow: 0 16px 48px rgba(0, 255, 153, 0.08);
    }
    .card.retired-urgent {
      border-color: rgba(220, 50, 30, 0.45);
      box-shadow: 0 0 0 1px rgba(220, 50, 30, 0.12), 0 6px 24px rgba(220, 50, 30, 0.1);
    }
    .card.wishlist-match {
      border-color: rgba(255, 214, 10, 0.40);
      box-shadow: 0 0 0 1px rgba(255, 214, 10, 0.10), 0 6px 24px rgba(255, 214, 10, 0.08);
    }
    .retired-urgency-banner {
      background: linear-gradient(90deg, #c0392b 0%, #e74c3c 100%);
      color: #fff;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.6px;
      text-transform: uppercase;
      padding: 6px 14px;
      margin: -16px -16px 14px;
      border-radius: 18px 18px 0 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .retired-urgency-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: #fff;
      animation: urgency-pulse 1.2s ease-in-out infinite;
      flex-shrink: 0;
    }
    @keyframes urgency-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%       { opacity: 0.4; transform: scale(0.7); }
    }

    .card img {
      width: 100%;
      height: 220px;
      object-fit: contain;
      border-radius: 14px;
      background: white;
      margin-bottom: 14px;
      display: block;
    }

    .card h2 {
      font-size: 15px;
      font-weight: 700;
      line-height: 1.35;
      margin: 0 0 10px;
      color: var(--text-primary);
    }

    .set-number {
      color: var(--text-ghost);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .price-block {
      display: flex;
      align-items: baseline;
      gap: 10px;
      margin: 10px 0 10px;
      flex-wrap: wrap;
    }

    .price {
      font-size: 32px;
      color: #00ff99;
      font-weight: 800;
      letter-spacing: -0.5px;
      line-height: 1;
    }

    .msrp {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-dim);
      text-decoration: line-through;
      line-height: 1;
    }

    .score {
      display: inline-flex;
      align-items: center;
      background: #071318;
      border: 1px solid #00f7ff22;
      color: #00f7ff;
      font-size: 12px;
      font-weight: 700;
      padding: 5px 11px;
      border-radius: 999px;
      white-space: nowrap;
      line-height: 1;
    }

    .meta {
      color: var(--text-ghost);
      font-size: 12px;
    }

    .card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-faint);
    }

    .app-disclaimer {
      margin: 28px auto 4px;
      padding: 18px 8px 4px;
      max-width: 720px;
      color: var(--text-ghost);
      font-size: 11px;
      line-height: 1.5;
      text-align: center;
    }

    /* ── Badges ──────────────────────────────────────────────────────────────── */

    .badges-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      margin-bottom: 10px;
    }

    .badges-row > * { display: inline-flex; align-items: center; line-height: 1; }

    .new-badge {
      display: inline-block;
      background: #001f5e;
      color: #6b9fff;
      border: 1px solid #6b9fff33;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .source-badge {
      display: inline-block;
      padding: 5px 11px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .source-woot    { background: #9CCC65; color: #fff; border: none; text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; }
    .source-amazon  { background: #FF9900; color: #000; border: 1px solid #FF9900; }
    .source-walmart { background: #0071CE; color: #fff; border: 1px solid #FFC220; }
    .source-walmart .walmart-spark { color: #FFC220; }
    .source-walmart-instore { background: #0071CE; color: #fff; border: 1px solid #FFC220; }
    .source-walmart-instore .walmart-spark { color: #FFC220; }
    .source-target  { background: #fff;    color: #CC0000; border: 1px solid #CC0000; }
    .source-barnes  { background: #fff;    color: #3f2a14; border: 1px solid #3f2a14; }
    .source-barnes-instore { background: #3f2a14; color: #f5e6d3; border: 1px solid #6b4a2a; }
    .source-boscovs { background: #fff; color: #003087; border: 1px solid #003087; }
    .source-bestbuy { background: #0046BE; color: #FFE000; border: none; text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; }
    .source-bestbuy-instore { background: #FFE000; color: #0046BE; border: 1px solid #0046BE; }

    .theme-badge {
      display: inline-block;
      background: var(--badge-ghost-bg);
      color: var(--theme-badge-color);
      border: 1px solid var(--theme-badge-border);
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
    }

    .retired-badge {
      display: inline-block;
      background: #1f0000;
      color: #ff8d8d;
      border: 1px solid #ff8d8d33;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
    }

    .active-badge {
      display: inline-block;
      background: var(--badge-ghost-bg);
      color: #3a7a55;
      border: 1px solid #3a7a5533;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
    }

    .retiring-soon-badge {
      display: inline-block;
      background: #1f1900;
      color: #ffd966;
      border: 1px solid #ffd96633;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
    }

    .exclusive-badge {
      display: inline-block;
      background: #0a0f20;
      color: #818cf8;
      border: 1px solid #818cf833;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
    }
    .wishlist-card-badge {
      display: inline-block;
      background: rgba(255,214,10,0.10);
      color: #ffd60a;
      border: 1px solid rgba(255,214,10,0.30);
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
    }

    /* ── Settings toggle ─────────────────────────────────────────────────── */

    .settings-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
      font-size: 12px;
      color: var(--text-muted);
      white-space: nowrap;
    }

    .mute-stores-btn {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      font-size: 12px;
      padding: 6px 12px;
      border-radius: 8px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s;
    }

    .mute-stores-btn:hover { background: var(--border-color); color: var(--text-primary); }

    .mute-stores-hint {
      font-size: 13px;
      color: var(--text-muted);
      margin: 0 0 16px;
      line-height: 1.4;
    }

    .mute-stores-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 10px;
      margin-bottom: 20px;
    }

    .mute-store-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: var(--text-primary);
      cursor: pointer;
    }

    .mute-store-item input {
      width: auto;
      max-width: none;
      padding: 0;
      flex: none;
    }

    .mute-store-item input { cursor: pointer; }

    .my-store-alert-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin: 0 0 10px;
    }

    .my-store-alert-action {
      background: var(--bg-surface-2);
      color: var(--text-secondary);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }

    .my-store-alert-action:hover {
      background: var(--bg-surface-3);
      color: var(--text-primary);
    }

    .my-store-alerts-header {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) minmax(104px, 120px);
      gap: 7px;
      align-items: center;
      margin: 2px 0 6px;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.4px;
      text-transform: uppercase;
    }

    .my-store-alerts-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-bottom: 12px;
    }

    .my-store-alert-row {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) minmax(104px, 120px);
      gap: 7px;
      align-items: center;
      min-width: 0;
      color: var(--text-primary);
      font-size: 13px;
      cursor: pointer;
    }

    .my-store-alert-row input {
      width: auto;
      max-width: none;
      padding: 0;
      flex: none;
      cursor: pointer;
    }

    .my-store-alert-name {
      min-width: 0;
      line-height: 1.2;
      overflow-wrap: anywhere;
    }

    .store-threshold-select {
      width: 100%;
      min-width: 0;
      font-size: 12px;
      padding: 4px 6px;
    }

    .mute-stores-save-btn {
      background: #ffd400;
      color: #000;
      border: none;
      font-size: 14px;
      font-weight: 800;
      padding: 10px 20px;
      border-radius: 10px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .mute-stores-save-btn:hover { background: #ffe84d; }

    /* ── Auth gate ───────────────────────────────────────────────────────── */

    .auth-gate {
      display: flex;
      position: fixed;
      inset: 0;
      align-items: center;
      justify-content: center;
      background: var(--bg-page);
      background-image: var(--bg-page-gradient);
      z-index: 2000;
      padding: 20px;
    }

    .auth-card {
      background: var(--bg-surface-deep);
      border: 1px solid var(--border-color);
      border-radius: 24px;
      padding: 32px;
      max-width: 380px;
      width: 100%;
    }

    .auth-logo {
      font-size: 28px;
      font-weight: 800;
      color: #ffd400;
      text-align: center;
      margin-bottom: 24px;
    }


    #authForm {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    #authForm input { width: 100%; max-width: none; }

    #authSubmitBtn {
      background: #ffd400;
      color: #000;
      border: none;
      font-family: 'Inter', Arial, sans-serif;
      font-size: 14px;
      font-weight: 800;
      padding: 12px;
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.15s;
    }

    #authSubmitBtn:hover { background: #ffe84d; }

    .auth-error {
      color: #ff6b6b;
      font-size: 13px;
      margin-top: 12px;
      min-height: 1px;
    }

    .auth-message {
      color: #00ff99;
      font-size: 13px;
      margin-top: 8px;
      min-height: 1px;
    }

    /* ── Main nav ────────────────────────────────────────────────────────── */

    /* ── Sticky Site Header ───────────────────────────────────────────────────── */
    #siteHeader {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 200;
      background: var(--bg-page);
      padding: 12px 24px 0;
      border-bottom: 1px solid var(--border-subtle);
    }

    .site-brand-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .site-brand {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 20px;
      font-weight: 800;
      color: #ffd400;
      letter-spacing: 0;
    }

    .site-brand-icon { font-size: 24px; }

    .gear-btn {
      background: none;
      border: none;
      font-size: 22px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 8px;
      color: var(--text-muted);
      transition: background .15s, color .15s;
      font-family: 'Inter', Arial, sans-serif;
    }
    .gear-btn:hover { background: var(--bg-surface-3); color: var(--text-primary); }

    .nav-scroll-wrap { position: relative; }
    .nav-fade-right {
      position: absolute;
      top: 0; right: 0;
      width: 48px;
      height: calc(100% - 12px);
      background: linear-gradient(to right, transparent, var(--bg-surface));
      pointer-events: none;
    }
    .main-nav {
      display: flex;
      align-items: center;
      gap: 4px;
      padding-bottom: 12px;
      padding-right: 56px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      scroll-padding-inline: 12px 56px;
    }
    .main-nav::-webkit-scrollbar { display: none; }

    .nav-link {
      color: var(--text-muted);
      text-decoration: none;
      font-size: 14px;
      font-weight: 600;
      padding: 8px 14px;
      border-radius: 10px;
      transition: all 0.15s;
      white-space: nowrap;
    }

    .nav-link:hover { color: var(--text-primary); background: var(--bg-surface-3); }

    .nav-link.active { color: #000; background: #ffd400; }

    /* ── Profile / Settings Slide-up Sheet ───────────────────────────────────── */
    .profile-sheet-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: var(--modal-overlay);
      z-index: 300;
    }
    .profile-sheet-overlay.open { display: block; }

    .profile-sheet {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      background: var(--bg-surface);
      border-radius: 20px 20px 0 0;
      border: 1px solid var(--border-color);
      border-bottom: none;
      padding: 8px 24px 40px;
      z-index: 301;
      transform: translateY(100%);
      transition: transform .3s cubic-bezier(.32,1.05,.7,1);
    }
    .profile-sheet.open { transform: translateY(0); }

    .profile-sheet-top {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      padding-bottom: 4px;
    }
    .profile-sheet-close {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      border-radius: 50%;
      width: 28px;
      height: 28px;
      font-size: 13px;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .profile-sheet-close:hover { background: var(--bg-surface-3); color: var(--text-primary); }

    .profile-sheet-handle {
      width: 36px; height: 4px;
      background: var(--border-color);
      border-radius: 2px;
      margin: 8px auto 20px;
    }

    .profile-sheet-email {
      font-size: 13px;
      color: var(--text-muted);
      text-align: center;
      margin-bottom: 20px;
      word-break: break-all;
    }

    .profile-sheet-divider {
      border: none;
      border-top: 1px solid var(--border-subtle);
      margin: 4px 0 16px;
    }

    .profile-sheet-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 0 16px;
    }

    .profile-sheet-label {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .profile-sheet-btn {
      display: block;
      width: 100%;
      padding: 14px 16px;
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      text-align: left;
      cursor: pointer;
      margin-bottom: 10px;
      font-family: 'Inter', Arial, sans-serif;
      transition: background .15s;
    }
    .profile-sheet-btn:hover { background: var(--bg-surface-3); }
    .profile-sheet-logout { color: #ff5555; }

    /* ── Views / Settings page ───────────────────────────────────────────── */

    .view-placeholder {
      text-align: center;
      color: var(--text-faint);
      font-size: 18px;
      font-weight: 600;
      padding: 80px 20px;
    }

    /* ── Wishlist ────────────────────────────────────────────────────────── */

    .wishlist-empty {
      text-align: center;
      color: var(--text-faint);
      font-size: 15px;
      padding: 40px 20px;
    }

    .wishlist-card { position: relative; }

    .wishlist-remove-btn {
      position: absolute;
      top: 12px;
      right: 12px;
      min-width: 72px;
      height: 30px;
      border-radius: 999px;
      border: 1px solid var(--border-color);
      background: var(--bg-surface-2);
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 700;
      transition: all 0.15s;
      z-index: 2;
    }

    .wishlist-remove-btn:hover { background: #ef444422; border-color: #ef4444; color: #ef4444; }

    .wishlist-deal-badge {
      display: inline-block;
      margin-top: 10px;
      padding: 6px 12px;
      border-radius: 10px;
      background: #00ff9922;
      color: #00ff99;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }

    .wishlist-deal-badge.wishlist-price-warning {
      background: #ffd40022;
      color: #ffd400;
      border: 1px solid #ffd40055;
    }

    .wishlist-no-deal {
      margin-top: 10px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .wishlist-deal-reason {
      margin-top: 5px;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
    }

    .wishlist-add-btn {
      background: #ffd400;
      color: #000;
      border: none;
      border-radius: 10px;
      padding: 8px 14px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 800;
      cursor: pointer;
      transition: background 0.15s;
      flex-shrink: 0;
    }

    .wishlist-add-btn:hover { background: #ffe84d; }
    .wishlist-add-btn:disabled { background: var(--bg-surface-3); color: var(--text-muted); cursor: default; }

    .wishlist-list-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 16px;
    }
    .wishlist-tab-wrap {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface-2);
      overflow: hidden;
      transition: background 0.15s, border-color 0.15s;
    }
    .wishlist-tab-wrap.active {
      background: #ffe84d;
      border-color: #ffe84d;
    }
    .wishlist-tab-name {
      background: none;
      border: none;
      padding: 6px 4px 6px 14px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      color: var(--text-secondary);
    }
    .wishlist-tab-wrap.active .wishlist-tab-name { color: #000; }
    .wishlist-tab-del {
      background: none;
      border: none;
      padding: 6px 10px 6px 2px;
      cursor: pointer;
      color: var(--text-muted);
      font-size: 14px;
      line-height: 1;
    }
    .wishlist-tab-wrap.active .wishlist-tab-del { color: #555; }
    .wishlist-tab-del:hover { color: #f87171; }
    .wishlist-new-list-btn {
      padding: 6px 16px;
      border-radius: 999px;
      border: 1px dashed var(--border-subtle);
      background: transparent;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
    }
    .wishlist-new-list-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
    .wishlist-filter-bar {
      display: flex;
      gap: 7px;
      flex-wrap: wrap;
      align-items: center;
      margin: 4px 0 18px;
    }
    .wishlist-filter-label {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-right: 2px;
    }
    .wishlist-filter-chip {
      min-height: 30px;
      border-radius: 999px;
      border: 1px solid var(--border-subtle);
      background: transparent;
      color: var(--text-secondary);
      padding: 5px 10px;
      font-family: 'Inter', Arial, sans-serif;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    .wishlist-filter-chip:hover {
      border-color: var(--border-focus);
      color: var(--text-primary);
    }
    .wishlist-filter-chip.active {
      background: #ffd40018;
      border-color: #ffd40099;
      color: #ffd400;
    }
    .wishlist-filter-chip strong {
      min-width: 20px;
      height: 20px;
      border-radius: 999px;
      background: var(--bg-surface-3);
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      line-height: 1;
      padding: 0 6px;
    }
    .wishlist-filter-chip.active strong {
      background: #ffd400;
      color: #000;
    }
    .wishlist-delete-panel {
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      border-radius: 14px;
      padding: 14px 16px;
      margin-bottom: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }
    .wishlist-delete-panel strong { font-size: 14px; flex: 1 1 100%; color: var(--text-primary); }
    .wishlist-delete-btn-danger {
      padding: 6px 14px; border-radius: 999px; border: 1px solid #f87171;
      background: transparent; color: #f87171; font-size: 13px; font-weight: 600; cursor: pointer;
    }
    .wishlist-delete-btn-danger:hover { background: #f871711a; }
    .wishlist-first-list-cta {
      text-align: center; padding: 48px 24px; color: var(--text-muted);
    }
    .wishlist-first-list-cta p { margin: 0 0 16px; font-size: 15px; }
    .wishlist-first-list-cta button {
      padding: 10px 24px; border-radius: 999px; border: 1px dashed var(--border-subtle);
      background: transparent; color: var(--text-secondary); font-size: 14px;
      font-weight: 700; cursor: pointer;
    }
    .wishlist-first-list-cta button:hover { border-color: #ffe84d; color: #ffe84d; }
    .wishlist-move-select {
      font-size: 12px;
      padding: 4px 8px;
      border-radius: 6px;
      background: var(--bg-surface-3);
      color: var(--text-secondary);
      border: 1px solid var(--border-subtle);
      margin-top: 6px;
      cursor: pointer;
    }

    .page-intro {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 14px;
      padding: 16px 20px;
      margin-bottom: 20px;
    }
    .page-intro.dashboard-summary {
      background: transparent;
      border: none;
      border-radius: 0;
      padding: 0;
    }
    .page-intro-title {
      font-size: 16px;
      font-weight: 700;
      margin: 0 0 6px;
      color: var(--text-primary);
    }
    .page-intro-body {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.55;
      margin: 0;
    }
    .page-intro-body strong { color: var(--text-secondary); }

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

    .deal-action-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 12px 14px;
      min-height: 82px;
    }

    .deal-action-label {
      font-size: 11px;
      font-weight: 800;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 7px;
    }

    .deal-action-value {
      font-size: 20px;
      line-height: 1.15;
      font-weight: 800;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .deal-action-sub {
      font-size: 12px;
      line-height: 1.35;
      color: var(--text-muted);
      margin-top: 4px;
    }

    @media (max-width: 760px) {
      .deal-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .deal-action-value { font-size: 17px; }
    }

    .wishlist-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 24px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 16px;
      padding: 16px 22px;
      margin-bottom: 20px;
    }

    .wishlist-summary:empty { display: none; }

    .ws-stat { font-size: 13px; color: var(--text-muted); }
    .ws-stat strong { display: block; font-size: 18px; color: var(--text-primary); margin-top: 2px; }

    .wishlist-target-badge {
      display: inline-block;
      margin-top: 10px;
      padding: 6px 12px;
      border-radius: 10px;
      background: #ffd40022;
      color: #ffd400;
      font-size: 12px;
      font-weight: 700;
    }

    .wishlist-price-range {
      margin-top: 8px;
      font-size: 12px;
      color: var(--text-secondary);
    }
    .wishlist-price-range strong { color: var(--text-primary); }

    .wishlist-command-panel {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin: 10px 0;
    }

    .wishlist-command-stat {
      background: var(--bg-surface-4);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 9px 10px;
      min-width: 0;
    }

    .wishlist-command-label {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 4px;
    }

    .wishlist-command-value {
      color: var(--text-primary);
      font-size: 15px;
      font-weight: 800;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .wishlist-checking-value {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      max-width: 100%;
    }

    .wishlist-checking-spinner {
      flex: 0 0 auto;
      width: 11px;
      height: 11px;
      margin-right: 6px;
      vertical-align: -1px;
    }

    .wishlist-command-sub {
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.35;
      margin-top: 3px;
    }

    .wishlist-command-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin: 8px 0 2px;
    }

    @media (max-width: 640px) {
      .wishlist-command-panel { grid-template-columns: 1fr; }
    }

    /* hidden attribute must win over display:flex on banner/modal elements */
    [hidden] { display: none !important; }

    /* First-run setup banner — sits at the top of the page below the sticky header */
    .telegram-setup-banner {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; padding: 10px 16px;
      margin: 0 0 0 0;
      background: rgba(0,255,153,0.08); border-bottom: 1px solid rgba(0,255,153,0.25);
      font-size: 14px; flex-wrap: wrap;
    }
    .telegram-setup-link {
      color: #00ff99; font-weight: 700; text-decoration: none; white-space: nowrap;
    }
    .telegram-setup-dismiss {
      background: none; border: none; color: var(--text-muted);
      cursor: pointer; font-size: 16px; padding: 2px 6px; line-height: 1;
    }

    .setup-checklist {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 12px;
      margin: 12px 0 16px;
    }

    .setup-checklist-title {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      font-size: 13px;
      font-weight: 800;
      color: var(--text-primary);
      margin-bottom: 10px;
    }

    .setup-checklist-progress {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }

    .setup-checklist-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .setup-check-item {
      background: var(--bg-surface-4);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 10px;
      min-height: 96px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .setup-check-item.done {
      border-color: #34d39933;
      background: rgba(5, 46, 26, 0.45);
    }

    .setup-check-main {
      display: flex;
      gap: 7px;
      align-items: flex-start;
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.25;
    }

    .setup-check-dot {
      width: 18px;
      height: 18px;
      flex: 0 0 18px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      font-size: 11px;
    }

    .setup-check-item.done .setup-check-dot {
      background: #34d399;
      border-color: #34d399;
      color: #052e1a;
    }

    .setup-check-sub {
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.35;
      flex: 1;
    }

    .setup-check-action {
      align-self: flex-start;
      background: transparent;
      border: 1px solid var(--border-color);
      color: var(--text-primary);
      border-radius: 8px;
      padding: 5px 8px;
      font-size: 11px;
      font-weight: 800;
      font-family: inherit;
      cursor: pointer;
    }

    .setup-check-action:hover { border-color: var(--border-focus); }

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

    @media (max-width: 520px) {
      .setup-checklist-grid { grid-template-columns: 1fr; }
    }

    .wishlist-track-toggle {
      display: block;
      width: 100%;
      margin-top: 12px;
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      border-radius: 10px;
      padding: 8px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .wishlist-track-toggle:hover { background: var(--border-color); color: var(--text-primary); }

    .wishlist-track-panel {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border-faint);
      cursor: default;
    }

    .wt-row {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
    }

    .wt-row label {
      flex: 1;
      font-size: 11px;
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .wt-row input, .wishlist-track-panel textarea {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 8px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
      width: 100%;
    }

    .wishlist-track-panel textarea {
      resize: vertical;
      min-height: 50px;
      margin-bottom: 10px;
    }

    .wishlist-track-done {
      width: 100%;
      margin-top: 2px;
      background: var(--accent);
      color: #111;
      border: none;
      border-radius: 10px;
      padding: 10px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 800;
      cursor: pointer;
    }

    .wt-progress {
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 4px;
    }

    .wt-progress-bar {
      height: 6px;
      border-radius: 3px;
      background: var(--bg-surface-3);
      overflow: hidden;
      margin-bottom: 10px;
    }

    .wt-progress-bar-fill {
      height: 100%;
      background: #00ff99;
      border-radius: 3px;
    }

    /* ── Gift Assistant ──────────────────────────────────────────────────── */

    .gift-intro {
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.5;
      max-width: 720px;
      margin: -8px 0 16px;
    }

    .gift-intro-steps {
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.5;
      max-width: 720px;
      margin: -4px 0 16px;
      padding-left: 20px;
    }

    .gift-intro-steps li { margin-bottom: 6px; }

    .gift-add-recipient-form {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin-bottom: 20px;
    }

    .gift-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .gift-field label {
      font-size: 11px;
      color: var(--text-dim);
      font-family: 'Inter', Arial, sans-serif;
    }

    .gift-add-recipient-form input,
    .gift-add-recipient-form select {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
    }

    .gift-add-recipient-form input[type="text"],
    .gift-add-recipient-form input[type="number"],
    .gift-add-recipient-form input[type="date"],
    .gift-add-recipient-form select { width: 140px; }

    .gift-add-recipient-form input[type="date"] {
      width: 140px;
      min-width: 140px;
      max-width: 140px;
    }

    .gift-theme-chips {
      display: flex;
      flex-direction: column;
      gap: 2px;
      width: 220px;
      max-height: 160px;
      overflow-y: auto;
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 6px;
    }

    .gift-theme-pick-chip {
      display: block;
      width: 100%;
      text-align: left;
      background: transparent;
      color: var(--text-dim);
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
      cursor: pointer;
    }

    .gift-theme-pick-chip.selected {
      background: #ffd400;
      color: #000;
      border-color: #ffd400;
      font-weight: 700;
    }

    #giftAddRecipientBtn {
      background: #ffd400;
      color: #000;
      border: none;
      border-radius: 10px;
      padding: 11px 18px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 800;
      cursor: pointer;
      transition: background 0.15s;
    }

    #giftAddRecipientBtn:hover { background: #ffe84d; }

    .gift-recipient-card {
      position: relative;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 20px;
      padding: 22px;
      margin-bottom: 24px;
    }

    .gift-recipient-header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
      padding-right: 76px;
    }

    .gift-collapse-toggle {
      position: absolute;
      top: 12px;
      right: 48px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 1px solid var(--border-color);
      background: var(--bg-surface-2);
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }

    .gift-collapse-toggle:hover {
      background: var(--bg-surface-3);
      color: var(--text-primary);
    }

    .gift-collapsed-summary {
      color: var(--text-muted);
      font-size: 13px;
      margin-top: 4px;
    }

    .gift-section-details summary.gift-section-title {
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .gift-section-details summary.gift-section-title::-webkit-details-marker { display: none; }

    .gift-section-details summary.gift-section-title::before {
      content: '▸';
      font-size: 11px;
      color: var(--text-muted);
      transition: transform 0.15s;
    }

    .gift-section-details[open] summary.gift-section-title::before {
      transform: rotate(90deg);
    }

    .gift-recipient-header h2 {
      font-size: 20px;
      font-weight: 800;
      margin: 0;
      color: var(--text-primary);
    }

    .gift-recipient-meta {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 10px;
    }

    .gift-occasion-badge {
      display: inline-block;
      padding: 6px 12px;
      border-radius: 10px;
      background: #ff66c422;
      color: #ff66c4;
      font-size: 12px;
      font-weight: 700;
    }

    .gift-reminder-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      margin: 6px 0 10px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .gift-reminder-row select {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 6px 8px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
    }

    .gift-theme-chip {
      display: inline-block;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--bg-surface-3);
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 600;
      margin-right: 4px;
    }

    .gift-build-badge {
      display: inline-block;
      margin-top: 10px;
      margin-right: 6px;
      padding: 6px 12px;
      border-radius: 10px;
      background: var(--bg-surface-3);
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 700;
    }

    .gift-section-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
      margin: 18px 0 10px;
    }

    .gift-refresh-recs-btn {
      display: block;
      margin: 0 0 10px;
      background: var(--bg-surface-3);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 6px 12px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s;
    }

    .gift-refresh-recs-btn:hover { background: var(--bg-surface-2); }

    .gift-mini-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 14px;
      margin-bottom: 6px;
    }

    .gift-mini-card {
      position: relative;
      background: var(--bg-surface-2);
      border: 1px solid var(--border-subtle);
      border-radius: 16px;
      padding: 12px;
    }

    .gift-mini-card-top {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
    }

    .gift-mini-card-top img {
      width: 56px;
      height: 56px;
      object-fit: contain;
      border-radius: 8px;
      background: white;
      flex-shrink: 0;
      display: block;
    }

    .gift-mini-card-info {
      flex: 1;
      min-width: 0;
    }

    .gift-mini-card h3 {
      font-size: 13px;
      font-weight: 700;
      line-height: 1.3;
      margin: 0 0 6px;
      color: var(--text-primary);
    }

    .gift-mini-remove {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 1px solid var(--border-color);
      background: var(--bg-surface);
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }

    .gift-mini-remove:hover { background: #ef444422; border-color: #ef4444; color: #ef4444; }

    .gift-search-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 12px;
    }

    .gift-search-row .gift-field { flex: 0 0 auto; }
    .gift-search-row .gift-field:first-child { flex: 1; min-width: 180px; }
    .gift-search-row input[type="text"] { width: 100%; min-width: 180px; }
    .gift-search-row input[type="number"] { width: 90px; }

    .gift-search-row select {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 13px;
      font-family: 'Inter', Arial, sans-serif;
    }

    .gift-search-checkbox-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .gift-status-label {
      display: block;
      font-size: 11px;
      color: var(--text-dim);
      font-family: 'Inter', Arial, sans-serif;
      margin-top: 8px;
      margin-bottom: 4px;
    }

    .gift-status-select {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 6px 8px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      width: 100%;
    }

    .gift-notes-input {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 6px 8px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      width: 100%;
      margin-top: 8px;
    }

    .gift-find-deal-btn {
      display: block;
      width: 100%;
      margin-top: 8px;
      background: var(--bg-surface-3);
      border: 1px solid var(--border-color);
      color: var(--text-primary);
      border-radius: 8px;
      padding: 7px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s;
    }

    .gift-find-deal-btn:hover { background: var(--border-color); }

    .gift-empty {
      text-align: center;
      color: var(--text-faint);
      font-size: 13px;
      padding: 16px;
    }

    .settings-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 20px;
      padding: 22px;
      margin-bottom: 18px;
      max-width: 520px;
    }

    .settings-close-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      position: sticky;
      top: var(--header-h, 90px);
      background: var(--bg-page);
      padding: 8px 0;
      z-index: 10;
    }
    .settings-close-btn {
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      border-radius: 50%;
      width: 32px;
      height: 32px;
      font-size: 15px;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .settings-close-btn:hover { background: var(--bg-surface-3); color: var(--text-primary); }

    .settings-card h2 {
      font-size: 16px;
      font-weight: 700;
      margin: 0 0 14px;
      color: var(--text-primary);
    }

    .settings-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 14px;
      color: var(--text-dim);
      margin: 0 0 16px;
    }

    .settings-row span:last-child { color: var(--text-tertiary); font-weight: 600; }

    .settings-toggle-row {
      margin: 0 0 16px;
    }

    .switch {
      position: relative;
      display: inline-block;
      width: 36px;
      height: 20px;
      flex-shrink: 0;
    }

    .switch input { opacity: 0; width: 0; height: 0; }

    .switch .slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background-color: var(--border-color);
      border: 1px solid var(--border-focus);
      transition: .2s;
      border-radius: 999px;
    }

    .switch .slider:before {
      position: absolute;
      content: "";
      height: 14px;
      width: 14px;
      left: 2px;
      bottom: 2px;
      background-color: var(--switch-dot);
      transition: .2s;
      border-radius: 50%;
    }

    .switch input:checked + .slider {
      background-color: #ffd96633;
      border-color: #ffd96666;
    }

    .switch input:checked + .slider:before {
      transform: translateX(16px);
      background-color: #ffd966;
    }

    .hot {
      display: inline-block;
      background: #2d0000;
      color: #ff4d40;
      border: 1px solid #ff4d4033;
      padding: 5px 11px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 12px;
      margin: 8px 0;
    }

    .amazon-badge {
      display: inline-block;
      background: #071a0e;
      color: #4cff85;
      border: 1px solid #4cff8522;
      padding: 5px 11px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 12px;
      margin: 6px 0;
    }

    .discount-badge {
      display: inline-block;
      background: #0a2010;
      color: var(--discount-badge-color);
      border: 1px solid var(--discount-badge-border);
      padding: 5px 11px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 12px;
    }

    .msrp-badge {
      display: inline-block;
      background: rgba(255, 211, 0, 0.12);
      color: var(--accent);
      border: 1px solid rgba(255, 211, 0, 0.36);
      padding: 5px 11px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 12px;
    }

    .neutral-badge {
      display: inline-block;
      background: var(--badge-ghost-bg);
      color: var(--text-ghost);
      border: 1px solid var(--border-subtle);
      padding: 5px 11px;
      border-radius: 999px;
      font-weight: 600;
      font-size: 12px;
    }

    .retire-reason-note {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #1f0a00;
      color: #fb923c;
      border: 1px solid #fb923c44;
      padding: 5px 11px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      margin-top: 4px;
    }
    .retire-reason-note::before {
      content: '';
      display: inline-block;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #fb923c;
      animation: retire-pulse 1.2s ease-in-out infinite;
      flex-shrink: 0;
    }
    @keyframes retire-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.2; transform: scale(0.7); }
    }

    .lowest-badge {
      display: inline-block;
      background: linear-gradient(135deg, #ffd700, #ff9f00);
      color: #000;
      font-weight: 800;
      padding: 6px 12px;
      border-radius: 999px;
      margin-bottom: 8px;
      font-size: 12px;
      box-shadow: 0 0 20px rgba(255, 180, 0, 0.25);
    }

    .lowest-30d-badge {
      display: inline-block;
      background: linear-gradient(135deg, #0096c7, #0077b6);
      color: white;
      font-weight: 700;
      padding: 6px 12px;
      border-radius: 999px;
      margin-bottom: 8px;
      font-size: 12px;
      box-shadow: 0 0 16px rgba(0, 150, 199, 0.2);
    }

    .lowest-7d-badge {
      display: inline-block;
      background: linear-gradient(135deg, #7b2ff7, #5c0fd4);
      color: white;
      font-weight: 700;
      padding: 6px 12px;
      border-radius: 999px;
      margin-bottom: 8px;
      font-size: 12px;
      box-shadow: 0 0 16px rgba(123, 47, 247, 0.25);
    }

    .combo-badge {
      display: inline-block;
      background: linear-gradient(135deg, #ff9f00, #ff3d3d);
      color: #000;
      font-weight: 800;
      padding: 6px 12px;
      border-radius: 999px;
      margin-bottom: 8px;
      font-size: 12px;
      box-shadow: 0 0 20px rgba(255, 80, 0, 0.3);
    }

    .deal-retirement-row {
      display: flex;
      align-items: center;
      margin: 8px 0 0;
    }

    .deal-retirement-row .combo-badge,
    .deal-retirement-row .retirement-countdown {
      margin-bottom: 0;
    }

    /* ── Skeleton ────────────────────────────────────────────────────────────── */

    .skeleton {
      height: 480px;
      border-radius: 20px;
      background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-3) 50%, var(--bg-surface) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
    }

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

    /* ── Toast ───────────────────────────────────────────────────────────────── */

    .toast {
      position: fixed;
      top: 20px;
      right: 20px;
      background: #0a1a0a;
      color: #00ff99;
      border: 1px solid #00ff9944;
      padding: 14px 18px;
      border-radius: 14px;
      font-weight: 600;
      font-size: 13px;
      z-index: 9999;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
      animation: slideIn 0.2s ease;
      max-width: 300px;
    }

    /* ── Scroll to top ───────────────────────────────────────────────────────── */

    #scrollTopBtn {
      position: fixed;
      bottom: 28px;
      right: 18px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--accent, #00ff99);
      color: #0a1a0a;
      border: none;
      font-size: 20px;
      line-height: 44px;
      text-align: center;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(0,255,153,0.35);
      z-index: 1500;
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      pointer-events: none;
    }
    #scrollTopBtn.visible {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    /* ── Load More ───────────────────────────────────────────────────────────── */

    #loadMoreWrap {
      text-align: center;
      margin: 48px 0 32px;
      display: none;
    }

    .load-more-btn {
      background: var(--bg-surface);
      color: #00ff99;
      border: 1px solid #00ff9933;
      border-radius: 14px;
      padding: 14px 48px;
      font-size: 14px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
    }

    .load-more-btn:hover { background: #071a0e; border-color: #00ff9966; }
    .load-more-btn:disabled { opacity: 0.3; cursor: default; }

    /* ── Set Hub / Best Deal Finder ───────────────────────────────────────────── */

    .best-deal-btn {
      background: var(--bg-surface);
      color: #00ff99;
      border: 1px solid #00ff9933;
      border-radius: 12px;
      padding: 12px 18px;
      font-size: 14px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
    }

    .best-deal-btn:hover { background: #071a0e; border-color: #00ff9966; }

    .set-hub-btn {
      background: var(--bg-surface-3);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 8px 11px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 800;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }

    .set-hub-btn:hover {
      background: #071a0e;
      border-color: #00ff9966;
      color: #00ff99;
    }

    .set-lookup-tabs {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 2px 0 14px;
      margin-bottom: 2px;
      scrollbar-width: none;
    }
    .set-lookup-tabs::-webkit-scrollbar { display: none; }

    .set-lookup-tab {
      appearance: none;
      background: var(--bg-surface);
      color: var(--text-secondary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 10px 14px;
      font-family: 'Inter', Arial, sans-serif;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }

    .set-lookup-tab.active {
      background: #071a0e;
      border-color: #00ff9966;
      color: #00ff99;
    }

    .set-lookup-panel[hidden] { display: none !important; }

    .set-lookup-shared-search {
      margin-bottom: 12px;
    }

    @media (min-width: 901px) {
      #view-find {
        width: min(1180px, 100%);
        margin-left: auto;
        margin-right: auto;
      }

      #view-find .settings-card {
        max-width: none;
        width: 100%;
      }

      #view-find .set-lookup-shared-search {
        max-width: 780px;
        margin-left: auto;
        margin-right: auto;
      }

      #view-find .set-lookup-tabs {
        justify-content: center;
      }

      #view-find .set-lookup-signal-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      }
    }

    .set-lookup-search-card h2,
    .set-lookup-placeholder h2 {
      margin: 0;
      color: var(--text-primary);
      font-size: 18px;
      letter-spacing: 0;
    }

    .set-lookup-search-card p,
    .set-lookup-placeholder p {
      margin: 5px 0 0;
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .set-lookup-market-card h2 {
      margin: 0;
      color: var(--text-primary);
      font-size: 18px;
      letter-spacing: 0;
    }

    .set-lookup-market-card p {
      margin: 5px 0 0;
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .set-lookup-signals-card h2 {
      margin: 0;
      color: var(--text-primary);
      font-size: 18px;
      letter-spacing: 0;
    }

    .set-lookup-signals-card p {
      margin: 5px 0 0;
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .set-lookup-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 14px;
    }

    .set-lookup-overview-card {
      border-radius: 12px;
      margin-bottom: 12px;
      padding: 14px;
    }

    .set-lookup-signal-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
      gap: 6px;
      margin: 8px 0;
    }

    .set-lookup-signal-card {
      min-height: 70px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }

    .set-lookup-signal-card.strong {
      border-color: #00ff9966;
      background: linear-gradient(180deg, rgba(0,255,153,.08), var(--bg-surface));
    }

    .set-lookup-signal-card.signal-good {
      border-color: #00ff9966;
      background: linear-gradient(180deg, rgba(0,255,153,.08), var(--bg-surface));
    }

    .set-lookup-signal-card.signal-warn {
      border-color: rgba(255, 204, 0, .52);
      background: linear-gradient(180deg, rgba(255, 204, 0, .08), var(--bg-surface));
    }

    .set-lookup-signal-card.signal-danger {
      border-color: rgba(248, 113, 113, .56);
      background: linear-gradient(180deg, rgba(248, 113, 113, .09), var(--bg-surface));
    }

    .set-lookup-signal-card span {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .set-lookup-signal-card strong {
      color: var(--text-primary);
      font-size: 15px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .set-lookup-signal-card small {
      color: var(--text-muted);
      font-size: 10.5px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .set-lookup-timing-mini-wrap {
      margin-top: auto;
    }

    .set-lookup-timing-mini {
      align-items: flex-end;
      display: flex;
      gap: 4px;
      height: 30px;
      padding-top: 4px;
    }

    .set-lookup-timing-mini span {
      background: #00ff99aa;
      border-radius: 3px 3px 0 0;
      display: block;
      flex: 1;
      min-width: 8px;
    }

    .set-lookup-timing-mini span.negative {
      background: rgba(248, 113, 113, .85);
    }

    .set-lookup-timing-mini-labels {
      align-items: center;
      color: var(--text-muted);
      display: flex;
      font-size: 10px;
      font-weight: 800;
      justify-content: space-between;
      line-height: 1.1;
      margin-top: 4px;
      text-transform: uppercase;
    }

    .set-lookup-timing-curve {
      display: flex;
      flex-direction: column;
      gap: 7px;
      margin-top: 10px;
    }

    .set-lookup-timing-row {
      align-items: center;
      display: grid;
      gap: 8px;
      grid-template-columns: 48px 1fr 64px;
    }

    .set-lookup-timing-row span {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 800;
    }

    .set-lookup-timing-row strong {
      color: var(--text-primary);
      font-size: 11px;
      text-align: right;
    }

    .set-lookup-timing-bar {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      height: 9px;
      overflow: hidden;
    }

    .set-lookup-timing-bar i {
      background: #00ff99aa;
      display: block;
      height: 100%;
    }

    .set-lookup-timing-bar.negative i {
      background: rgba(248, 113, 113, .85);
    }

    .set-lookup-card-link {
      color: var(--accent);
      font-size: 11px;
      font-weight: 800;
      text-decoration: none;
      width: fit-content;
    }

    .set-lookup-card-link:hover {
      color: var(--accent);
    }

    .set-lookup-pov-link {
      align-items: center;
      color: var(--text-muted);
      display: flex;
      flex-wrap: wrap;
      font-size: 11px;
      font-weight: 800;
      gap: 6px;
      margin-top: 9px;
    }

    .set-lookup-trend-inline {
      color: var(--accent);
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-top: 4px;
      min-width: 0;
    }

    .set-lookup-trend-inline svg {
      display: block;
      height: 46px;
      max-width: 100%;
      width: 180px;
    }

    .set-lookup-trend-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 800;
      line-height: 1.2;
      text-transform: uppercase;
    }

    .set-lookup-google-trends-embed {
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      margin-top: 10px;
      min-height: 260px;
      overflow: hidden;
      width: 100%;
    }

    .set-lookup-google-trends-embed iframe {
      border: 0;
      display: block;
      min-height: 260px;
      width: 100%;
    }

    .set-lookup-embed-loading {
      align-items: center;
      color: var(--text-muted);
      display: flex;
      font-size: 12px;
      font-weight: 700;
      min-height: 260px;
      justify-content: center;
      padding: 16px;
      text-align: center;
    }

    .set-lookup-trends-fallback {
      align-items: center;
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      gap: 8px;
      justify-content: center;
      min-height: 260px;
      padding: 18px;
      text-align: center;
    }

    .set-lookup-trends-fallback strong {
      color: var(--text-main);
      font-size: 13px;
    }

    .set-lookup-trends-fallback span {
      font-size: 12px;
      line-height: 1.35;
      max-width: 320px;
    }

    .set-lookup-trends-fallback a {
      color: var(--accent);
      font-size: 11px;
      font-weight: 800;
      text-decoration: none;
      text-transform: uppercase;
    }

    .set-lookup-market-chart-panel {
      margin-top: 12px;
    }

    .set-lookup-market-chart-wrap {
      position: relative;
      height: 280px;
      min-height: 280px;
      width: 100%;
    }

    .set-lookup-market-chart-wrap canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
    }

    .set-lookup-investor-preview {
      background: var(--bg-surface-2);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 10px;
      margin: 10px 0;
    }

    .set-lookup-preview-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 8px;
    }

    .set-lookup-preview-head > div:first-child {
      min-width: 0;
    }

    .set-lookup-preview-kicker {
      color: #00ff99;
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 2px;
    }

    .set-lookup-preview-head h3 {
      margin: 0;
      color: var(--text-primary);
      font-size: 15px;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }

    .set-lookup-preview-confidence {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
    }

    .set-lookup-workspace-summary {
      display: grid;
      gap: 6px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin: 0 0 8px;
    }

    .set-lookup-workspace-metric {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      min-width: 0;
      padding: 7px 8px;
    }

    .set-lookup-workspace-metric span {
      color: var(--text-muted);
      display: block;
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .04em;
      line-height: 1;
      margin-bottom: 4px;
      text-transform: uppercase;
    }

    .set-lookup-workspace-metric strong {
      color: var(--text-primary);
      display: block;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .set-lookup-workspace-metric small {
      color: var(--text-muted);
      display: block;
      font-size: 10px;
      line-height: 1.25;
      margin-top: 3px;
      overflow-wrap: anywhere;
    }

    .set-lookup-thesis {
      color: var(--text-secondary);
      font-size: 12px;
      line-height: 1.35;
      border-top: 1px solid var(--border-subtle);
      padding-top: 8px;
      margin-top: 2px;
    }

    .set-lookup-thesis-panel {
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 12px;
    }

    .set-lookup-thesis-panel strong {
      display: block;
      color: var(--text-primary);
      font-size: 14px;
      margin-bottom: 5px;
    }

    .set-lookup-thesis-panel p {
      margin: 0;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .set-lookup-overview-thesis {
      margin-top: 6px;
    }

    .set-lookup-thesis-score {
      align-items: center;
      display: flex;
      gap: 10px;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .set-lookup-thesis-score div {
      min-width: 0;
    }

    .set-lookup-thesis-score strong {
      margin-bottom: 2px;
    }

    .set-lookup-thesis-score span {
      color: var(--text-muted);
      display: block;
      font-size: 11px;
      font-weight: 750;
      line-height: 1.25;
    }

    .set-lookup-thesis-score b {
      align-items: center;
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      color: var(--text-primary);
      display: inline-flex;
      flex: 0 0 auto;
      font-size: 18px;
      font-weight: 900;
      height: 44px;
      justify-content: center;
      width: 44px;
    }

    .set-lookup-thesis-score.good b {
      border-color: #00ff9966;
      color: #34d399;
    }

    .set-lookup-thesis-score.warn b {
      border-color: rgba(255, 204, 0, .52);
      color: #fbbf24;
    }

    .set-lookup-thesis-lists {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      margin-top: 10px;
    }

    .set-lookup-thesis-lists div {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 8px;
    }

    .set-lookup-thesis-lists span {
      color: var(--text-muted);
      display: block;
      font-size: 10px;
      font-weight: 850;
      line-height: 1;
      margin-bottom: 6px;
      text-transform: uppercase;
    }

    .set-lookup-thesis-lists ul {
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      gap: 5px;
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .set-lookup-thesis-lists li {
      font-size: 11px;
      line-height: 1.35;
    }

    .set-lookup-thesis-checklist {
      display: grid;
      gap: 6px;
      grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
      margin-top: 10px;
    }

    .set-lookup-thesis-check {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      min-width: 0;
      padding: 7px 8px;
    }

    .set-lookup-thesis-check.good {
      border-color: #00ff9966;
    }

    .set-lookup-thesis-check.warn {
      border-color: rgba(255, 204, 0, .52);
    }

    .set-lookup-thesis-check.danger {
      border-color: rgba(248, 113, 113, .56);
    }

    .set-lookup-thesis-check span {
      color: var(--text-muted);
      display: block;
      font-size: 9px;
      font-weight: 850;
      line-height: 1;
      margin-bottom: 5px;
      text-transform: uppercase;
    }

    .set-lookup-thesis-check strong {
      color: var(--text-primary);
      font-size: 12px;
      line-height: 1.15;
      margin: 0;
      overflow-wrap: anywhere;
    }

    .set-lookup-peer-list {
      border-top: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 10px;
      padding-top: 10px;
    }

    .set-lookup-peer-title {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .set-lookup-peer-row {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      display: block;
      padding: 8px;
      text-decoration: none;
    }

    .set-lookup-peer-row:hover {
      border-color: rgba(255, 204, 0, .38);
    }

    .set-lookup-peer-row strong {
      color: var(--text-primary);
      display: block;
      font-size: 12px;
      line-height: 1.25;
      margin: 0 0 3px;
      overflow-wrap: anywhere;
    }

    .set-lookup-peer-row span,
    .set-lookup-peer-more {
      color: var(--text-muted);
      display: block;
      font-size: 11px;
      line-height: 1.3;
    }

    .set-lookup-comparable-chart {
      border-top: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      gap: 7px;
      margin-top: 10px;
      padding-top: 10px;
    }

    .set-lookup-comparable-chart-row {
      display: grid;
      grid-template-columns: 52px minmax(110px, 1fr) minmax(150px, 1.1fr);
      gap: 8px;
      align-items: center;
      min-width: 0;
    }

    .set-lookup-comparable-chart-row > span {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 800;
    }

    .set-lookup-comparable-chart-bars {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-height: 24px;
      padding: 4px;
      min-width: 0;
    }

    .set-lookup-comparable-chart-bars i {
      border-radius: 4px;
      display: block;
      height: 6px;
      max-width: 100%;
      min-width: 0;
    }

    .set-lookup-comparable-chart-bars .amazon {
      background: #ff9900;
    }

    .set-lookup-comparable-chart-bars .walmart {
      background: #0071dc;
    }

    .set-lookup-comparable-chart-bars .negative {
      opacity: .58;
    }

    .set-lookup-comparable-chart-values {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 8px;
      min-width: 0;
    }

    .set-lookup-comparable-chart-values em,
    .set-lookup-comparable-chart-note {
      color: var(--text-muted);
      font-size: 10.5px;
      font-style: normal;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .set-lookup-comparable-chart-values em {
      align-items: center;
      display: inline-flex;
      gap: 4px;
    }

    .set-lookup-comparable-chart-swatch {
      border-radius: 999px;
      display: inline-block;
      flex: 0 0 auto;
      height: 7px;
      width: 7px;
    }

    .set-lookup-comparable-chart-swatch.amazon {
      background: #ff9900;
    }

    .set-lookup-comparable-chart-swatch.walmart {
      background: #0071dc;
    }

    .set-lookup-comparable-chart-note {
      margin-top: 2px;
    }

    @media (max-width: 520px) {
      .set-lookup-comparable-chart-row {
        grid-template-columns: 48px minmax(0, 1fr);
      }

      .set-lookup-comparable-chart-values {
        grid-column: 1 / -1;
        padding-left: 56px;
      }
    }

    .set-lookup-signal-detail-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .set-lookup-signal-detail {
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface);
      border-radius: 8px;
      padding: 11px 12px;
      min-width: 0;
    }

    .set-lookup-signal-detail.signal-good { border-color: #00ff9966; }
    .set-lookup-signal-detail.signal-warn { border-color: rgba(255, 204, 0, .52); }
    .set-lookup-signal-detail.signal-danger { border-color: rgba(248, 113, 113, .56); }

    .set-lookup-signal-detail-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 4px;
      min-width: 0;
    }

    .set-lookup-signal-detail-name {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .04em;
      overflow-wrap: anywhere;
    }

    .set-lookup-signal-detail-value {
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 850;
      text-align: right;
      overflow-wrap: anywhere;
    }

    .set-lookup-signal-detail p {
      margin: 0;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .set-lookup-signal-meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0 0 8px;
    }

    .set-lookup-signal-meta-pill {
      align-items: center;
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      color: var(--text-secondary);
      display: inline-flex;
      font-size: 10.5px;
      font-weight: 750;
      gap: 5px;
      line-height: 1.2;
      max-width: 100%;
      min-width: 0;
      padding: 5px 8px;
      overflow-wrap: anywhere;
    }

    .set-lookup-signal-meta-pill b {
      color: var(--text-muted);
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .set-lookup-signal-meta-pill.confidence-high,
    .set-lookup-signal-meta-pill.confidence-supported {
      border-color: #00ff9966;
      color: #34d399;
    }

    .set-lookup-signal-meta-pill.confidence-medium {
      border-color: rgba(255, 204, 0, .42);
      color: #fbbf24;
    }

    .set-lookup-signal-meta-pill.confidence-low,
    .set-lookup-signal-meta-pill.missing {
      border-color: rgba(248, 113, 113, .46);
      color: #fca5a5;
    }

    .set-lookup-signal-meta-pill.loading {
      border-color: var(--border-subtle);
      color: var(--text-muted);
    }

    .set-lookup-signal-meta-pill.confidence-loading {
      color: var(--text-muted);
    }

    .set-lookup-signal-links {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 9px;
    }

    .set-lookup-signal-links a {
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      background: var(--bg-surface-3);
      color: var(--text-primary);
      font-size: 11px;
      font-weight: 800;
      line-height: 1;
      padding: 7px 9px;
      text-decoration: none;
    }

    .set-lookup-signal-links a:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .set-lookup-signal-actions {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 9px;
    }

    .set-lookup-signal-action {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      color: var(--text-primary);
      cursor: pointer;
      font-size: 11px;
      font-weight: 800;
      line-height: 1;
      padding: 7px 10px;
    }

    .set-lookup-signal-action:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .set-lookup-signal-action:disabled {
      cursor: wait;
      opacity: .7;
    }

    .set-lookup-api-test-result {
      color: var(--text-muted);
      flex-basis: 100%;
      font-size: 11px;
      font-weight: 650;
      line-height: 1.35;
      margin-top: 1px;
    }

    .set-lookup-api-test-result.good { color: #34d399; }
    .set-lookup-api-test-result.warn { color: #fbbf24; }

    .set-lookup-minifig-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 10px;
    }

    .set-lookup-minifig-row {
      align-items: start;
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      display: grid;
      gap: 11px;
      grid-template-columns: 50px minmax(0, 1fr);
      min-height: 70px;
      min-width: 0;
      padding: 10px;
    }

    .set-lookup-minifig-row img,
    .set-lookup-minifig-placeholder {
      background: #fff;
      border-radius: 6px;
      height: 50px;
      object-fit: contain;
      width: 50px;
    }

    .set-lookup-minifig-body {
      min-width: 0;
      max-width: 100%;
      width: 100%;
    }

    .set-lookup-minifig-body strong {
      color: var(--text-primary);
      display: block;
      font-size: 13px;
      line-height: 1.3;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .set-lookup-minifig-meta,
    .set-lookup-minifig-body .set-lookup-minifig-detail {
      color: var(--text-muted);
      display: block;
      font-size: 11.5px;
      line-height: 1.4;
      margin-top: 3px;
    }

    .set-lookup-minifig-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
      min-width: 0;
    }

    .set-lookup-minifig-pill,
    .set-lookup-minifig-stat {
      align-items: center;
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      display: inline-flex;
      font-size: 10px;
      font-weight: 800;
      gap: 6px;
      line-height: 1.25;
      min-height: 24px;
      min-width: 0;
      padding: 4px 8px;
      white-space: nowrap;
    }

    .set-lookup-minifig-pill {
      background: rgba(52, 211, 153, .12);
      border-color: rgba(52, 211, 153, .32);
      color: #34d399;
    }

    .set-lookup-minifig-pill.combo_only_exclusive,
    .set-lookup-minifig-pill.scarce_not_exclusive,
    .set-lookup-minifig-pill.scarce-part {
      background: rgba(251, 191, 36, .12);
      border-color: rgba(251, 191, 36, .32);
      color: #fbbf24;
    }

    .set-lookup-minifig-pill.shared_or_common,
    .set-lookup-minifig-pill.needs_data,
    .set-lookup-minifig-pill.needs_parts,
    .set-lookup-minifig-pill.uncommon-part {
      background: var(--bg-surface-2);
      border-color: var(--border-subtle);
      color: var(--text-muted);
    }

    .set-lookup-minifig-stat {
      background: var(--bg-surface-2);
      color: var(--text-primary);
      max-width: 100%;
    }

    .set-lookup-minifig-stat-wide {
      border-radius: 12px;
      justify-content: space-between;
      width: 100%;
    }

    .set-lookup-minifig-stat b {
      color: var(--text-muted);
      font-size: 9.5px;
      font-weight: 750;
      letter-spacing: 0;
      text-transform: none;
    }

    .set-lookup-minifig-stat em {
      color: var(--text-primary);
      font-style: normal;
      font-weight: 850;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .set-lookup-minifig-stat-wide em {
      overflow-wrap: anywhere;
      text-align: right;
      white-space: normal;
    }

    .set-lookup-minifig-stat em a {
      color: var(--lego-yellow);
      text-decoration: none;
    }

    .set-lookup-minifig-stat em a:hover {
      text-decoration: underline;
    }

    .set-lookup-minifig-part-breakdown {
      display: grid;
      gap: 9px;
      margin-top: 2px;
      width: 100%;
    }

    .set-lookup-minifig-part-group {
      display: grid;
      gap: 6px;
      min-width: 0;
      width: 100%;
    }

    .set-lookup-minifig-part-title {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .02em;
      text-transform: uppercase;
    }

    .set-lookup-minifig-part-row {
      align-items: flex-start;
      background: rgba(255, 255, 255, .035);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      display: grid;
      gap: 7px;
      grid-template-columns: minmax(0, 1fr) auto;
      min-width: 0;
      padding: 8px 9px;
    }

    .set-lookup-minifig-part-row.exclusive {
      border-color: rgba(52, 211, 153, .28);
    }

    .set-lookup-minifig-part-row.scarce,
    .set-lookup-minifig-part-row.combo {
      border-color: rgba(251, 191, 36, .28);
    }

    .set-lookup-minifig-part-row strong {
      color: var(--text-primary);
      display: block;
      font-size: 12px;
      font-weight: 850;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .set-lookup-minifig-part-row span {
      color: var(--text-muted);
      display: block;
      font-size: 10.5px;
      font-weight: 700;
      line-height: 1.3;
      margin-top: 2px;
      overflow-wrap: anywhere;
    }

    .set-lookup-minifig-part-side {
      align-items: flex-end;
      display: grid;
      gap: 2px;
      justify-items: end;
      max-width: 105px;
      min-width: 86px;
      text-align: right;
    }

    .set-lookup-minifig-part-side em {
      color: var(--text-primary);
      font-size: 10.5px;
      font-style: normal;
      font-weight: 850;
      line-height: 1.2;
    }

    .set-lookup-minifig-part-side a {
      color: var(--lego-yellow);
      font-size: 10.5px;
      font-weight: 850;
      text-decoration: none;
    }

    @media (max-width: 420px) {
      .set-lookup-minifig-part-row {
        gap: 6px;
        grid-template-columns: minmax(0, 1fr);
      }

      .set-lookup-minifig-part-side {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        max-width: none;
        min-width: 0;
        text-align: left;
      }
    }

    .set-lookup-minifig-body .set-lookup-minifig-detail {
      white-space: normal;
      max-width: 34rem;
    }

    .set-lookup-minifig-links {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 5px;
    }

    .set-lookup-minifig-links a,
    .set-lookup-minifig-more {
      color: var(--accent);
      font-size: 11px;
      font-weight: 800;
      text-decoration: none;
    }

    .bd-search-row {
      display: flex;
      gap: 10px;
      margin-bottom: 16px;
    }

    .bd-search-row > input, .bd-search-row > div > input { max-width: none; width: 100%; min-width: 0; }

    #bestDealInput {
      overflow: hidden;
      padding-right: 58px !important;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .bd-search-row button {
      background: #ffd400;
      color: #000;
      border: none;
      border-radius: 12px;
      padding: 12px 20px;
      font-size: 14px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 800;
      cursor: pointer;
      transition: background 0.15s;
    }

    .bd-search-row button:hover { background: #ffe84d; }

    #bestDealClearBtn {
      align-items: center;
      background: none; border: none; cursor: pointer; display: inline-flex;
      font-size: 15px; height: 32px; justify-content: center; line-height: 1;
      padding: 0; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
      width: 32px; border-radius: 8px;
      color: var(--text-muted); transition: color 0.15s, background 0.15s;
    }
    #bestDealClearBtn:hover { color: var(--text-primary); background: var(--bg-surface-3); }

    .wishlist-search-input-wrap {
      position: relative; flex: 1; min-width: 0;
    }
    .wishlist-search-input-wrap input {
      width: 100%; box-sizing: border-box; max-width: none;
      color: var(--text-primary);
      caret-color: var(--border-focus);
      padding-right: 48px;
      -webkit-text-fill-color: var(--text-primary);
    }
    #wishlistSearchClearBtn {
      align-items: center;
      display: inline-flex;
      justify-content: center;
      position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
      background: none; border: none; cursor: pointer; padding: 0;
      font-size: 15px; line-height: 1; border-radius: 6px;
      height: 32px; width: 32px;
      color: var(--text-muted); transition: color 0.15s, background 0.15s;
    }
    #wishlistSearchClearBtn:hover { color: var(--text-primary); background: var(--bg-surface-3); }

    .bd-pick-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px;
      border: 1px solid var(--border-subtle);
      border-radius: 14px;
      margin-bottom: 8px;
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
    }

    .bd-pick-item:hover { border-color: var(--border-focus); background: var(--bg-surface); }

    .bd-pick-item img {
      width: 48px;
      height: 48px;
      object-fit: contain;
      background: white;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .bd-pick-name { font-weight: 700; font-size: 13px; color: var(--text-tertiary); }
    .bd-pick-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

    #bestDealResults .bd-set-header .bd-pick-name {
      color: var(--text-primary);
      font-size: 18px;
      line-height: 1.2;
      overflow-wrap: anywhere;
    }

    .bd-set-header {
      margin-bottom: 16px;
    }
    #bestDealResults .bd-set-header .bd-img-wrap {
      width: 100%;
      height: 140px;
      background: white;
      border-radius: 10px;
      overflow: hidden;
      margin-top: 10px;
    }
    #bestDealResults .bd-set-header .bd-img-wrap img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    .bd-set-meta { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
    .bd-set-meta strong { color: var(--text-tertiary); }

    .set-hub-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 12px 0 2px;
    }

    .set-hub-action {
      background: var(--bg-surface);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 8px 11px;
      font-size: 12px;
      font-family: 'Inter', Arial, sans-serif;
      font-weight: 800;
      cursor: pointer;
      text-decoration: none;
    }

    .set-hub-action.primary { background: #ffd400; color: #111; border-color: #ffd400; }
    .set-hub-action:hover { border-color: var(--border-focus); }

    .bd-msrp-note {
      font-size: 14px;
      color: var(--text-secondary);
      margin-bottom: 14px;
      padding: 12px 14px;
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
    }

    @keyframes bestOfferGlow {
      0%, 100% { border-color: #00d97e33; box-shadow: none; }
      50% { border-color: #00d97e99; box-shadow: 0 0 14px 2px #00d97e1a; }
    }

    .bd-stack-card {
      background: var(--stack-panel-bg);
      border: 1px solid #00d97e33;
      border-radius: 14px;
      padding: 14px;
      margin-bottom: 16px;
    }

    .bd-stack-card-best {
      animation: bestOfferGlow 2.8s ease-in-out infinite;
    }

    .bd-stack-card-title {
      font-weight: 800;
      color: #00d97e;
      font-size: 14px;
      margin-bottom: 6px;
    }

    .bd-stack-card-body { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
    .bd-stack-card-body strong { color: var(--text-primary); }

    .bd-gc-cta {
      display: inline-block;
      background: #00d97e;
      color: #000;
      padding: 9px 16px;
      border-radius: 10px;
      font-weight: 800;
      font-size: 13px;
      text-decoration: none;
      transition: background 0.15s;
    }

    .bd-gc-cta:hover { background: #34f5a4; color: #000; }

    .bd-gc-cta.sw-trigger {
      border: none;
      cursor: pointer;
      font-family: inherit;
    }

    .sw-set-name { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }

    .sw-step {
      display: flex;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border-subtle);
      opacity: 0.45;
    }
    .sw-step:last-child { border-bottom: none; }
    .sw-step-active, .sw-step-done { opacity: 1; }

    .sw-step-num {
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 13px;
      background: var(--bg-surface-3);
      color: var(--text-secondary);
      border: 1px solid var(--border-color);
    }
    .sw-step-done .sw-step-num {
      background: #00d97e;
      color: #000;
      border-color: #00d97e;
    }
    .sw-step-active .sw-step-num {
      background: #00d97e33;
      color: #00d97e;
      border-color: #00d97e;
    }

    .sw-step-title { font-weight: 700; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
    .sw-step-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }

    .sw-step-btn {
      display: inline-block;
      background: #00d97e;
      color: #000;
      border: none;
      padding: 7px 14px;
      border-radius: 8px;
      font-weight: 800;
      font-size: 12px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .sw-step-btn:hover { background: #34f5a4; }

    .sw-done-note {
      margin-top: 14px;
      font-size: 13px;
      color: #00d97e;
      font-weight: 700;
      text-align: center;
    }

    .bd-store-row {
      display: grid;
      grid-template-columns: 1fr 1fr auto;
      align-items: center;
      gap: 10px;
      padding: 12px 10px;
      background: var(--stack-panel-bg);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      margin-bottom: 8px;
    }

    .bd-store-row .source-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 132px;
      box-sizing: border-box;
      white-space: nowrap;
      text-align: center;
    }

    .bd-store-source-kind {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .04em;
      line-height: 1.2;
      margin-top: 5px;
      max-width: 150px;
      text-transform: uppercase;
    }

    @media (max-width: 900px) {
      .set-lookup-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .bd-store-row.bd-best {
      border-color: var(--border-color);
    }

    .bd-store-btn-row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }

    .bd-store-price { font-weight: 800; font-size: 16px; color: var(--text-primary); }
    .bd-store-eff { font-size: 12px; color: #00d97e; font-weight: 700; margin-top: 2px; }
    .bd-stack-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
    .bd-stack-pill {
      font-size: 11px;
      font-weight: 600;
      color: #00d97e;
      background: #071a0e;
      border: 1px solid #00ff9933;
      border-radius: 999px;
      padding: 2px 8px;
      text-decoration: none;
      white-space: nowrap;
    }
    .bd-stack-pill:hover { background: #0a2a20; }
    .bd-store-age { font-size: 12px; color: var(--text-dim); }

    .bd-back-link {
      display: inline-block;
      margin-bottom: 12px;
      font-size: 13px;
      color: var(--text-muted);
      cursor: pointer;
    }

    .bd-back-link:hover { color: var(--text-secondary); }

    .bd-open-link {
      display: inline-block;
      background: #ffd400;
      color: #000;
      padding: 8px 14px;
      border-radius: 10px;
      font-weight: 800;
      font-size: 12px;
      text-decoration: none;
      white-space: nowrap;
    }

    .bd-open-link:hover { background: #ffe84d; color: #000; }

    /* ── Animations ──────────────────────────────────────────────────────────── */

    @keyframes slideIn {
      from { opacity: 0; transform: translateY(-8px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .card.new-card {
      border-color: #6b9fff44;
      box-shadow: 0 0 28px rgba(107, 159, 255, 0.12);
    }

    .card.live-insert {
      animation: liveSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes liveSlideIn {
      from { opacity: 0; transform: translateY(-16px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* ── Modal ───────────────────────────────────────────────────────────────── */

    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: var(--modal-overlay);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.open {
      display: flex;
      animation: fadeIn 0.18s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    .modal {
      background: var(--bg-surface-deep);
      border: 1px solid var(--border-color);
      border-radius: 24px;
      padding: 28px;
      max-width: 600px;
      width: 100%;
      max-height: 92vh;
      overflow-x: hidden;
      overflow-y: auto;
      position: relative;
      animation: modalSlideUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes modalSlideUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Find Best Deal modal — align to top so it stays clear of the keyboard,
       and allow overflow so the autocomplete dropdown isn't clipped. */
    #bestDealOverlay { align-items: flex-start; padding-top: 40px; padding-bottom: 20px; overflow-y: auto; }
    #bestDealContent { overflow: visible; max-height: none; position: relative; }
    #bestDealResults { max-height: 63vh; overflow-y: auto; }
    #bestDealDropdown .set-search-item { align-items: center; }
    #bestDealDropdown .set-search-item-thumb { width: 72px !important; min-width: 72px !important; max-width: 72px !important; height: 48px !important; max-height: 48px !important; object-fit: contain !important; border-radius: 6px !important; }
    #bestDealResults .set-search-item-thumb { width: 48px !important; min-width: 48px !important; max-width: 48px !important; height: 48px !important; max-height: 48px !important; object-fit: contain !important; border-radius: 6px !important; background: var(--bg-surface-3) !important; margin: 0 !important; display: block !important; }
    #bestDealContent .modal-close-wrap { position: absolute; top: 10px; right: 10px; height: auto; pointer-events: none; }
    #bestDealContent .modal-close { top: 0; position: relative; }
    #bestDealResults .local-stock { margin-bottom: 20px; }

    /* Zero-height sticky bar that keeps the ✕ pinned to the top of the
       scrollable modal as the user scrolls through long content. */
    .modal-close-wrap {
      position: sticky;
      top: 8px;
      height: 0;
      overflow: visible;
      display: flex;
      justify-content: flex-end;
      z-index: 30;
      pointer-events: none;
    }
    .modal-close {
      position: relative;
      top: 0;
      pointer-events: all;
      background: var(--bg-surface-3);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      width: 38px;
      height: 38px;
      border-radius: 50%;
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }

    .modal-close:hover { background: var(--border-color); color: var(--text-primary); }

    .modal img {
      width: 100%;
      height: 320px;
      object-fit: contain;
      border-radius: 16px;
      background: white;
      margin-bottom: 18px;
      display: block;
    }

    .modal h2 {
      font-size: 20px;
      font-weight: 700;
      color: var(--text-primary);
      margin: 0 0 14px;
      line-height: 1.3;
    }

    .modal .price { font-size: 38px; font-weight: 800; margin: 6px 0; }

    .modal .badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
    .modal .badges > * { display: inline-flex; align-items: center; line-height: 1; }

    .modal-stat {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border-faint);
      font-size: 14px;
      color: var(--text-dim);
    }

    .modal-stat span:last-child { color: var(--text-tertiary); font-weight: 600; }

    .chart-note {
      font-size: 12px;
      color: var(--text-dim);
      margin: 8px 0 14px;
      line-height: 1.5;
    }
    .chart-note strong { color: var(--text-tertiary); }
    .chart-stat-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px 12px;
      padding-top: 2px;
    }
    .chart-stat-grid span {
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .chart-source-note {
      margin-top: 8px;
      color: var(--text-muted);
    }

    .modal-cta {
      display: block;
      text-align: center;
      margin-top: 22px;
      background: #ffd400;
      color: #000;
      padding: 15px;
      border-radius: 14px;
      font-weight: 800;
      font-size: 15px;
      text-decoration: none;
      transition: background 0.15s;
    }

    .modal-cta:hover { background: #ffe84d; color: #000; }

    .modal canvas { margin-top: 18px; }

    canvas { margin-top: 14px; margin-bottom: 6px; }
    .card canvas { pointer-events: none; }
    .card-chart-panel {
      margin-top: 14px;
      padding: 10px 10px 8px;
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
    }
    .card-chart-panel canvas {
      display: block;
      width: 100% !important;
      margin: 4px 0 2px;
    }
    .card-chart-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .03em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .card-chart-head span:last-child {
      color: var(--text-tertiary);
      white-space: nowrap;
      text-transform: none;
      letter-spacing: 0;
    }
    .card-chart-summary {
      min-height: 15px;
      margin-top: 3px;
      font-size: 11px;
      line-height: 1.35;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ── Phase 4: Local Stock ────────────────────────────────────────────────── */

    .local-stock {
      margin-top: 18px;
      padding: 14px;
      background: var(--bg-surface-4);
      border: 1px solid var(--border-color);
      border-radius: 14px;
    }

    .local-stock-title {
      font-weight: 700;
      font-size: 14px;
      margin-bottom: 10px;
    }

    .local-stock-controls {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }

    .local-stock-controls input {
      flex: 1 1 100px;
      min-width: 90px;
      background: var(--bg-surface-deep);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      color: var(--text-tertiary);
      padding: 8px 10px;
      font-size: 13px;
    }

    .local-stock-controls button {
      background: var(--bg-surface-3);
      border: 1px solid var(--border-color);
      color: var(--text-tertiary);
      padding: 8px 12px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
    }

    .local-stock-controls button:hover { background: var(--border-color); }

    @keyframes availabilitySpin {
      to { transform: rotate(360deg); }
    }
    .local-stock-loading, .local-stock-empty {
      font-size: 13px;
      color: var(--text-muted);
      padding: 6px 2px;
    }
    .local-stock-loading::before {
      content: '';
      display: inline-block;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2px solid var(--border-color);
      border-top-color: var(--accent);
      margin-right: 8px;
      vertical-align: middle;
      animation: availabilitySpin 0.75s linear infinite;
    }
    .availability-spinner {
      display: inline-block;
      width: 12px;
      height: 12px;
      border: 2px solid var(--border-color);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: availabilitySpin 0.75s linear infinite;
      margin-right: 6px;
      vertical-align: -2px;
    }
    .no-local-stores {
      font-size: 13px;
      color: var(--text-muted);
      padding: 6px 2px;
    }
    .no-local-stores-expand {
      display: inline-block;
      margin-top: 8px;
      background: transparent;
      border: 1px solid var(--accent);
      border-radius: 8px;
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 600;
      color: var(--accent);
      cursor: pointer;
      transition: background .12s;
    }
    .no-local-stores-expand:hover { background: rgba(255, 213, 0, 0.08); }

    .plan-run-from-modal-btn {
      display: block;
      width: 100%;
      margin-top: 14px;
      padding: 11px 16px;
      background: var(--accent);
      color: #000;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      text-align: center;
      letter-spacing: 0.2px;
    }
    .plan-run-from-modal-btn:hover { opacity: 0.88; }

.store-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 0;
      border-top: 1px solid var(--border-subtle);
      flex-wrap: wrap;
    }

    .store-row:first-child { border-top: none; }

    .store-row-main { flex: 1 1 200px; min-width: 0; }

    .store-name { font-weight: 700; font-size: 13px; }
    .store-address { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

    .store-row-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      margin-left: auto;
    }

    .store-distance { font-size: 12px; color: var(--text-muted); }
    .store-aisle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
    .store-trust-line {
      flex: 1 1 100%;
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 3px;
    }

    .instore-stores-list { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 5px; }
    .instore-stores-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 2px; }
    .instore-store-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
    .instore-store-link { text-decoration: none; padding: 3px 0; border-radius: 4px; }
    .instore-store-link:hover .instore-name { text-decoration: underline; color: var(--accent); }
    .instore-price { color: #6dff9a; font-weight: 700; }
    .instore-dist { color: var(--text-muted); }
    .instore-aisle { color: var(--text-muted); }
    .instore-qty { color: #fbbf24; font-weight: 700; }
    .instore-name { color: var(--text-secondary); }
    .instore-expired .price { text-decoration: line-through; color: #ff6b6b !important; }
    .card.instore-expired { border-color: rgba(255, 107, 107, 0.45); box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.12), 0 6px 24px rgba(255, 107, 107, 0.08); }
    .card.instore-expired:hover { border-color: rgba(255, 107, 107, 0.7); box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.2), 0 16px 48px rgba(255, 107, 107, 0.12); }
    .instore-expired-badge { display: inline-block; background: rgba(255,60,60,0.12); color: #ff6b6b; border: 1px solid rgba(255,60,60,0.3); border-radius: 8px; padding: 3px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }

    .store-status {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .stock-in      { background: #052e1a; color: #34d399; border: 1px solid #34d39933; }
    .stock-limited { background: #2e2705; color: #fbbf24; border: 1px solid #fbbf2433; }
    .stock-out     { background: #2e0505; color: #f87171; border: 1px solid #f8717133; }
    .stock-check   { background: var(--bg-surface-3); color: var(--text-muted); border: 1px solid var(--border-color); }

    .store-onsale {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 999px;
      background: #1a001a;
      color: #e0218a;
      border: 1px solid #e0218a33;
    }

    .store-directions {
      font-size: 12px;
      font-weight: 700;
      color: #ffd400;
      text-decoration: none;
    }

    .store-directions:hover { text-decoration: underline; }
    .store-check-link { display: block; font-size: 12px; color: #862633; font-weight: 700; text-decoration: none; margin: 4px 0 2px; }
    .store-check-link:hover { text-decoration: underline; }

    .instore-trust {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 8px 0;
    }

    .trust-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border: 1px solid var(--border-subtle);
      background: var(--bg-surface-4);
      color: var(--text-muted);
      border-radius: 999px;
      padding: 4px 8px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
    }

    .trust-pill.strong { color: #34d399; border-color: #34d39933; background: #052e1a; }
    .trust-pill.warn { color: #fbbf24; border-color: #fbbf2433; background: #2e2705; }

    a { color: #4da3ff; text-decoration: none; font-weight: 600; }

    /* ── Phase 2B: Gift card, Stack Score, Deal age, Retirement ─────────────── */

    .gc-badge {
      display: inline-block;
      background: #051a14;
      color: #00d97e;
      border: 1px solid #00d97e33;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      margin-right: 6px;
    }

    .gc-badge-link {
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s;
    }

    .gc-badge-link:hover { background: #0a2a20; }

    .gc-buy-suffix {
      color: var(--gc-buy-color);
      font-weight: 800;
      margin-left: 4px;
    }

    .gc-buy-link {
      background: #1a1400;
      color: var(--gc-buy-color);
      border-color: #ffd40033;
      text-decoration: none;
      cursor: pointer;
    }

    .gc-buy-link:hover { background: #2a2200; color: var(--gc-buy-color-hover); }

    .stack-row .gc-buy-link {
      display: inline-block;
      background: transparent;
      border: none;
      padding: 0 0 0 6px;
      color: var(--gc-buy-color);
      font-weight: 800;
      text-decoration: none;
      font-size: 12px;
    }

    .stack-row .gc-buy-link:hover { color: var(--gc-buy-color-hover); }

    .effective-price {
      font-size: 12px;
      color: #00d97e;
      font-weight: 700;
      margin-bottom: 8px;
      opacity: 0.85;
    }

    .stack-score-pill {
      display: inline-flex;
      align-items: center;
      background: linear-gradient(135deg, #1a0d3a, #0d1a3a);
      color: #a78bfa;
      border: 1px solid #a78bfa44;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      margin-right: 6px;
      white-space: nowrap;
      line-height: 1;
    }

    .deal-age {
      color: var(--text-muted);
      font-size: 12px;
      font-style: italic;
    }

    .retirement-countdown {
      display: inline-block;
      background: #1f0a00;
      color: #fb923c;
      border: 1px solid #fb923c44;
      padding: 5px 11px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    /* Modal Stack Score panel */
    .stack-panel {
      background: var(--stack-panel-bg);
      border: 1px solid var(--stack-panel-border);
      border-radius: 16px;
      padding: 16px;
      margin: 16px 0;
    }

    .stack-panel-title {
      font-size: 13px;
      font-weight: 700;
      color: #a78bfa;
      margin-bottom: 12px;
      letter-spacing: 0.3px;
    }

    .stack-row {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      color: var(--text-dim);
      padding: 6px 0;
      border-bottom: 1px solid var(--border-faint);
    }

    .stack-row:last-child { border-bottom: none; }

    .stack-row span:last-child {
      color: #00d97e;
      font-weight: 700;
    }

    .stack-row.stack-total {
      color: var(--text-tertiary);
      font-weight: 700;
      padding-top: 10px;
      margin-top: 4px;
      border-top: 1px solid var(--stack-panel-border);
      border-bottom: none;
    }

    .stack-row.stack-total span:last-child {
      color: #a78bfa;
      font-size: 15px;
    }

    .stack-effective {
      text-align: center;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--stack-panel-border);
      font-size: 13px;
      color: var(--text-dim);
    }

    .stack-effective strong {
      color: #00ff99;
      font-size: 22px;
      font-weight: 800;
      display: block;
      margin-top: 4px;
    }

    /* Phase 3 store badge colors */
    .source-lego      { background: #E3000B; color: #fff; border: 1px solid #000; text-shadow:
        -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
        -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000,
        -2px -2px 0 #FFD500, 2px -2px 0 #FFD500, -2px 2px 0 #FFD500, 2px 2px 0 #FFD500,
        -2px 0 0 #FFD500, 2px 0 0 #FFD500, 0 -2px 0 #FFD500, 0 2px 0 #FFD500; }
    .source-kohls     { background: #862633; color: #fff; border: 1px solid #862633; }
    .source-macys     { background: #E21A2C; color: #fff; border: 1px solid #E21A2C; }
    .source-macys .macys-star { color: #fff; text-shadow:
        -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
        -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000; }
    .source-samsclub  { background: #041E42; color: #fff; border: none; }
    .source-kroger    { background: #001500; color: #006D2B; border: 1px solid #006D2B33; }
    .source-fredmeyer { background: #0a1200; color: #6aaa3f; border: 1px solid #6aaa3f33; }
    .source-disney    { background: #4DB6E5; color: #fff; border: 1px solid #fff; }
    .source-petco     { background: #1a0800; color: #e85d00; border: 1px solid #e85d0033; }
    .source-barnes .bn-amp { color: #f5c518; }
    .source-scheels            { background: #fff; color: #cc0000; border: none; }
    .source-entertainment-earth { background: #fff; color: #000; border: 1px solid #000; }
    .source-staples       { background: #fff; color: #cc0000; }
    .source-zavvi         { background: #000; color: #00ff99; border: none; }
    .source-selfridges    { background: #ffe600; color: #111; border: 1px solid #111; }
    .source-booksamillion { background: #fff; color: #002855; border: none; }
    .source-kohls-instore { background: #fff; color: #862633; border: 1px solid #862633; }
    .source-walmart-instore-community { background: #e06c00; color: #fff; border: none; }

    /* ── Light mode: lighten the dark accent-badge backgrounds to match .active-badge ── */

    [data-theme="light"] .score,
    [data-theme="light"] .new-badge,
    [data-theme="light"] .retired-badge,
    [data-theme="light"] .retiring-soon-badge,
    [data-theme="light"] .hot,
    [data-theme="light"] .amazon-badge,
    [data-theme="light"] .discount-badge,
    [data-theme="light"] .gc-badge,
    [data-theme="light"] .stack-score-pill,
    [data-theme="light"] .retirement-countdown,
    [data-theme="light"] .toast,
    [data-theme="light"] .store-onsale,
    [data-theme="light"] .live-indicator,
    [data-theme="light"] .chip.active,
    [data-theme="light"] .stock-in,
    [data-theme="light"] .stock-limited,
    [data-theme="light"] .stock-out {
      background: var(--badge-ghost-bg);
    }

    [data-theme="light"] .exclusive-badge { background: #eef0ff; color: #4338ca; border-color: #4338ca33; }
    [data-theme="light"] #tripLocationActive { color: #16a34a; }

    /* ── Mobile ──────────────────────────────────────────────────────────────── */

    @media (max-width: 600px) {
      /* iOS Safari auto-zooms the page when a focused input/select/textarea
         has font-size < 16px, and the zoom/pan often sticks around after the
         element loses focus on re-render — looks like the whole page
         shifted off-center. Force 16px on mobile to prevent the zoom. */
      input, select, textarea { font-size: 16px !important; }

      body { padding: 14px 12px; }
      #siteHeader { padding: 10px 12px 0; }
      .main-nav { gap: 3px; padding-right: 48px; scroll-padding-inline: 10px 48px; }
      .nav-link { font-size: 12px; padding: 7px 9px; border-radius: 8px; }
      h1 { font-size: 28px; letter-spacing: -1px; }
      .header-icon { font-size: 30px; }
      .header-sub { margin-left: 0; margin-top: 4px; }
      .deals-header-row { flex-direction: column; gap: 8px; align-items: stretch; }
      .deals-mode-pills {
        padding-top: 0; width: 100%; display: flex;
        background: var(--bg-surface-2); border: 1px solid var(--border-color);
        border-radius: 22px; padding: 3px; gap: 0;
      }
      .deals-mode-btn { flex: 1; text-align: center; font-size: 12px; padding: 8px 6px; border-radius: 19px; white-space: nowrap; }
      .deals-mode-btn:hover:not(.active) { border: none; }
      .deals-search-row { flex-wrap: wrap; }
      .search-field-wrap { width: 100%; min-width: 0; }
      .deals-search-row .best-deal-btn { width: 100%; }
      .bd-search-row {
        flex-direction: column;
        gap: 8px;
      }
      .bd-search-row > button {
        width: 100%;
      }
      .set-lookup-tabs {
        gap: 6px;
        padding-bottom: 12px;
      }
      .set-lookup-tab {
        padding: 9px 13px;
      }
      .set-lookup-minifig-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 9px;
      }
      .set-lookup-minifig-row img,
      .set-lookup-minifig-placeholder {
        height: 48px;
        width: 48px;
      }
      .set-lookup-minifig-body strong {
        font-size: 12.5px;
      }
      .set-lookup-minifig-stats {
        align-items: flex-start;
        flex-direction: row;
      }
      .set-lookup-minifig-pill {
        width: fit-content;
      }
      .set-lookup-minifig-stat {
        align-self: flex-start;
        border-radius: 12px;
        justify-content: space-between;
        max-width: 100%;
        width: 100%;
      }
      .set-lookup-minifig-stat b {
        flex: 0 0 auto;
      }
      .set-lookup-minifig-stat em {
        flex: 1 1 auto;
        overflow-wrap: normal;
        text-align: right;
        white-space: normal;
      }
      .set-lookup-signal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .set-lookup-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .set-lookup-workspace-metric {
        padding: 7px 8px;
      }
      .set-lookup-preview-head {
        flex-direction: row;
        gap: 6px;
      }
      .set-lookup-preview-confidence {
        flex: 0 0 auto;
        text-align: right;
        white-space: nowrap;
      }
      .set-lookup-signal-detail-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
      }
      .set-lookup-signal-detail-value {
        text-align: left;
      }
      .set-lookup-signal-meta-pill {
        align-items: flex-start;
        border-radius: 8px;
        flex-direction: column;
        gap: 3px;
        width: 100%;
      }
      .ctrl-pill-dropdown.filter-dropdown {
        position: fixed; left: 12px; right: 12px; bottom: 12px;
        top: auto; width: auto; max-width: none; max-height: 70vh;
        display: flex; flex-direction: column; overflow: hidden;
      }
      .ctrl-pill-dropdown.filter-dropdown[hidden] { display: none; }
      .chips { gap: 6px; }
      .chip { padding: 6px 12px; font-size: 12px; }
      .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }

      .bd-store-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 8px;
      }
      .bd-store-row .source-badge { width: auto; }
      .bd-store-source-kind { max-width: none; }
      .bd-open-link { width: 100%; text-align: center; box-sizing: border-box; }
      .bd-store-btn-row .bd-open-link { width: auto; }
      .bd-stack-pill { white-space: normal; }

      .modal-overlay { padding: 10px; }
      .modal { padding: 18px; border-radius: 18px; }
    }

    /* ── Deals mode toggle ───────────────────────────────────────────────────── */
    .deals-mode-bar {
      display: flex; gap: 6px; margin-bottom: 14px;
    }
    .deals-mode-btn {
      flex: 1; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border-color);
      background: var(--bg-surface-2); color: var(--text-primary);
      font-size: 13px; font-weight: 600; font-family: 'Inter', Arial, sans-serif;
      cursor: pointer; transition: all .15s; white-space: nowrap; text-align: center;
    }
    .deals-mode-btn.active {
      background: var(--accent); color: #000; border-color: var(--accent);
    }
    .deals-mode-btn:hover:not(.active) { background: var(--bg-surface-3); }

    /* ── Alerts page ─────────────────────────────────────────────────────────── */
    .alerts-filter-bar {
      display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px;
    }
    .alerts-filter-bar select {
      background: var(--bg-surface-2); border: 1px solid var(--border-color);
      border-radius: 10px; padding: 8px 10px; font-size: 13px;
      color: var(--text-primary); font-family: 'Inter', Arial, sans-serif; cursor: pointer;
    }
    .alerts-filter-bar .gift-search-checkbox-label {
      display: flex; align-items: center; gap: 6px; font-size: 13px;
      color: var(--text-muted); cursor: pointer; padding: 6px 4px;
    }
    .alert-card {
      background: var(--bg-surface); border: 1px solid var(--border-subtle);
      border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column;
      gap: 6px; cursor: default; transition: border-color .15s;
    }
    .alert-card:hover { border-color: var(--border-color); }
    .alert-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: 10px; margin-bottom: 4px; }
    .alert-card-set { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .5px; }
    .alert-card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
    .alert-card-price { font-size: 18px; font-weight: 800; color: var(--text-primary); }
    .alert-card-msrp { font-size: 12px; color: var(--text-muted); }
    .alert-card-age { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
    .alert-card-score { font-size: 12px; color: var(--text-muted); }
    .alert-card-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
    .alert-card-actions button {
      font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-color);
      background: var(--bg-surface-2); color: var(--text-primary); cursor: pointer;
      font-family: 'Inter', Arial, sans-serif; font-weight: 600;
    }
    .alert-card-actions button:hover { background: var(--bg-surface-3); }
    .alert-card-actions button:disabled { opacity: .5; cursor: default; }
    .alerted-badge {
      display: inline-block; padding: 3px 8px; border-radius: 8px;
      font-size: 11px; font-weight: 700; margin-top: 4px;
    }
    .alerted-badge.sent { background: rgba(0,255,153,.1); color: #00ff99; }
    .alerted-badge.unsent { background: var(--bg-surface-3); color: var(--text-muted); }

    .subscribers-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
    .subscribers-table th { text-align: left; padding: 6px 8px; color: var(--text-muted); font-weight: 600; }
    .subscribers-table td { padding: 8px 8px; border-top: 1px solid var(--border-subtle); color: var(--text-primary); vertical-align: middle; }
    .sub-remove-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 0 4px; }
    .sub-remove-btn:hover { color: #ff4444; }

    /* ── Deals page redesign ─────────────────────────────────────────────────── */
    .deals-header-row {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 16px; margin-bottom: 20px;
    }
    .deals-header-row .header { margin-bottom: 0; flex: 1; min-width: 0; }
    .deals-mode-pills { display: flex; gap: 4px; align-items: center; padding-top: 6px; width: 100%; }

    .deals-search-row {
      display: flex; gap: 8px; margin-bottom: 12px; align-items: center;
    }
    .search-field-wrap {
      position: relative; flex: 1; min-width: 0;
    }
    .search-field-wrap #searchBox {
      width: 100%; box-sizing: border-box; max-width: none;
      padding-right: 72px; /* room for clear + go buttons */
    }
    .search-clear-btn, .search-go-btn {
      position: absolute; top: 50%; transform: translateY(-50%);
      background: none; border: none; cursor: pointer; padding: 4px 6px;
      font-size: 15px; line-height: 1; border-radius: 6px;
      transition: color 0.15s, background 0.15s;
    }
    .search-clear-btn { right: 36px; color: var(--text-muted); }
    .search-clear-btn:hover { color: var(--text-primary); background: var(--bg-surface-3); }
    .search-go-btn { right: 8px; color: #00ff99; font-weight: 700; font-size: 17px; }
    .search-go-btn:hover { color: #fff; background: var(--bg-surface-3); }

    .deals-ctrl-bar {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 12px; gap: 8px;
    }
    .deals-ctrl-left { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
    .deals-results-count {
      font-size: 13px; color: var(--text-muted); white-space: nowrap;
      flex-shrink: 0; font-weight: 600;
    }

    .ctrl-pill-wrap { position: relative; }
    .ctrl-pill {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border-color);
      background: var(--bg-surface-2); color: var(--text-primary);
      font-size: 13px; font-weight: 600; font-family: 'Inter', Arial, sans-serif;
      cursor: pointer; transition: all .15s; white-space: nowrap;
    }
    .ctrl-pill:hover { background: var(--bg-surface-3); border-color: var(--border-focus); }
    .ctrl-pill.open { border-color: var(--accent); }
    .pill-caret { font-size: 10px; opacity: 0.55; }
    .pill-badge {
      background: var(--accent); color: #000; font-size: 10px; font-weight: 800;
      border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center;
      line-height: 1.4; display: none;
    }

    .ctrl-pill-dropdown {
      position: absolute; top: calc(100% + 6px); left: 0;
      background: var(--bg-surface-deep); border: 1px solid var(--border-color);
      border-radius: 14px; padding: 6px; min-width: 180px;
      z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.45);
    }
    .ctrl-pill-dropdown.filter-dropdown {
      min-width: 260px; padding: 10px; max-height: 420px;
      display: flex; flex-direction: column; overflow: hidden;
    }
    .ctrl-pill-dropdown.filter-dropdown[hidden] { display: none; }
    .ctrl-pill-opt {
      display: block; width: 100%; text-align: left; padding: 8px 12px;
      border-radius: 8px; border: none; background: none; color: var(--text-primary);
      font-size: 13px; font-family: 'Inter', Arial, sans-serif; font-weight: 500;
      cursor: pointer; transition: background .1s;
    }
    .ctrl-pill-opt:hover { background: var(--bg-surface-3); }
    .ctrl-pill-opt.active { color: var(--accent); font-weight: 700; }

    .filter-dropdown-top {
      display: flex; align-items: center; justify-content: space-between;
      padding: 4px 10px 6px; flex-shrink: 0;
    }
    .filter-dropdown-body {
      overflow-y: auto; flex: 1;
      padding: 0 2px 4px;
    }
    .filter-dropdown-close {
      background: var(--bg-surface-3); border: 1px solid var(--border-color);
      border-radius: 50%; width: 26px; height: 26px; font-size: 13px;
      color: var(--text-muted); cursor: pointer; display: flex;
      align-items: center; justify-content: center; flex-shrink: 0;
    }
    .filter-dropdown-close:hover { color: var(--text-primary); }
    .filter-dropdown-footer {
      flex-shrink: 0; padding: 10px 10px 4px;
      border-top: 1px solid var(--border-faint);
    }
    .filter-confirm-btn {
      width: 100%; padding: 10px; border-radius: 10px;
      background: var(--accent); color: #000;
      font-size: 13px; font-family: 'Inter', Arial, sans-serif;
      font-weight: 700; border: none; cursor: pointer;
      transition: opacity 0.15s;
    }
    .filter-confirm-btn:hover { opacity: 0.85; }

    .filter-section-label {
      font-size: 11px; font-weight: 700; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: .6px; padding: 4px 12px 6px;
    }
    .filter-toggle-row {
      display: flex; align-items: center; gap: 8px; font-size: 13px;
      color: var(--text-primary); cursor: pointer; padding: 0 12px;
    }
    .filter-toggle-row input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
    .filter-inner-select {
      width: 100%; background: var(--bg-surface-3); border: 1px solid var(--border-subtle);
      border-radius: 8px; padding: 7px 10px; font-size: 13px; color: var(--text-primary);
      font-family: 'Inter', Arial, sans-serif; font-weight: 500; margin-bottom: 2px;
    }

    .ctrl-bar-live {
      display: flex; align-items: center; gap: 6px; color: #00ff99;
      font-size: 12px; font-weight: 700; padding: 7px 12px;
      background: #071a0e; border: 1px solid #00ff9922; border-radius: 20px;
    }

    .deals-chip-scroll {
      display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap !important;
      margin-bottom: 20px; padding-bottom: 2px;
      scrollbar-width: none; -ms-overflow-style: none;
    }
    .deals-chip-scroll::-webkit-scrollbar { display: none; }
    .deals-chip-scroll .chip { flex-shrink: 0; }

    /* ── Stack savings box ───────────────────────────────────────────────────── */
    .stack-box {
      border: 1px solid #00ff9933;
      background: rgba(0,255,153,0.04);
      border-radius: 12px;
      padding: 9px 12px;
      margin-bottom: 8px;
    }
    .stack-box-header {
      font-size: 12px;
      font-weight: 600;
      color: rgba(0,255,153,0.55);
      margin-bottom: 7px;
      letter-spacing: 0.1px;
      text-align: center;
    }
    .stack-box-header strong {
      color: #00ff99;
      font-weight: 800;
      font-size: 13px;
    }

    /* ── Plan a Haul / Trip Planner ───────────────────────────────────────────── */
    .trip-mode-row { display: flex; gap: 8px; margin-bottom: 14px; }
    .trip-wishlist-picker { margin-bottom: 12px; }
    .trip-picker-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; }
    .trip-all-none-row { display: flex; gap: 6px; margin-bottom: 6px; }
    .trip-set-chip-all, .trip-set-chip-none { display: block; flex: 1; text-align: center; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-surface-3); color: var(--text-muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s; user-select: none; box-sizing: border-box; }
    .trip-set-chip-all.selected { background: var(--accent); color: #000; border-color: var(--accent); }
    .trip-set-chip-none:hover { border-color: var(--text-muted); color: var(--text-primary); }
    .trip-picker-search { width: 100%; box-sizing: border-box; padding: 6px 28px 6px 28px; font-size: 12px; border-radius: 8px; background: var(--bg-surface-3); border: 1px solid var(--border-color); color: var(--text-primary); margin-bottom: 6px; max-width: none; }
    .trip-picker-search-wrap { position: relative; margin-bottom: 2px; }
    .trip-picker-search-wrap::before { content: '🔍'; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; pointer-events: none; }
    .trip-picker-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); font-size: 15px; line-height: 1; cursor: pointer; padding: 0; display: none; }
    .trip-picker-clear.visible { display: block; }
    @keyframes trip-spin { to { transform: rotate(360deg); } }
    .trip-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: trip-spin 0.7s linear infinite; vertical-align: middle; margin-right: 7px; flex-shrink: 0; }
    .trip-picker-scroll { max-height: 188px; overflow-y: auto; border-radius: 8px; }
    .trip-picker-scroll::-webkit-scrollbar { width: 3px; }
    .trip-picker-scroll::-webkit-scrollbar-track { background: transparent; }
    .trip-picker-scroll::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
    .trip-picker-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
    .trip-set-chip { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-surface-3); cursor: pointer; transition: all .15s; user-select: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
    .trip-set-chip.selected { background: var(--accent); border-color: var(--accent); }
    .trip-chip-num { font-size: 12px; font-weight: 700; color: var(--text-primary); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .trip-chip-name { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
    .trip-set-chip.selected .trip-chip-num { color: #000; }
    .trip-set-chip.selected .trip-chip-name { color: rgba(0,0,0,0.55); }
    .trip-mode-btn { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-surface-3); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
    .trip-mode-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
    .trip-stops-row { display: flex; gap: 6px; }
    .trip-stops-btn { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-surface-3); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
    .trip-stops-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
    .trip-summary { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; padding: 10px 14px; background: var(--bg-surface-2); border-radius: 10px; }
    .trip-stop-card { background: var(--bg-surface-2); border-radius: 14px; padding: 16px; margin-bottom: 12px; position: relative; border: 1px solid var(--border-color); }
    .trip-remove-btn { position: absolute; top: 10px; left: 10px; background: var(--bg-surface-3); border: 1px solid var(--border-color); color: var(--text-muted); font-size: 13px; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
    .trip-remove-btn:hover { background: rgba(220,50,30,.18); color: #e74c3c; border-color: rgba(220,50,30,.4); }
    .trip-stop-card.trip-visited { opacity: 0.38; }
    .trip-stop-number { position: absolute; top: 12px; right: 14px; font-size: 26px; font-weight: 900; color: var(--accent); opacity: 0.85; line-height: 1; }
    .trip-stop-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; padding-left: 32px; }
    .trip-stop-address { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
    .trip-worth-label { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 6px; margin-bottom: 8px; }
    .trip-worth-must      { background: rgba(0,255,153,.12);  color: #00ff99; }
    .trip-worth-excellent { background: rgba(99,179,237,.12);  color: #63b3ed; }
    .trip-worth-good      { background: rgba(255,214,10,.12);  color: #ffd60a; }
    .trip-worth-nearby    { background: var(--bg-surface-3);   color: var(--text-muted); }
    .trip-worth-caution   { background: rgba(251,146,60,.10);  color: #fb923c; }
    .trip-worth-skip      { background: rgba(239,68,68,.10);   color: #f87171; }
    .trip-sets-list { font-size: 13px; color: var(--text-secondary); margin: 8px 0; }
    .trip-set-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--border-color); }
    .trip-set-row:last-child { border-bottom: none; }
    .trip-set-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px; }
    .trip-set-price { font-weight: 700; color: var(--accent); white-space: nowrap; }
    .trip-set-status { margin-left: 8px; white-space: nowrap; }
    .maps-picker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
    .maps-picker button:not(.maps-picker-call) { background: var(--bg-surface-3); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 11px; font-size: 12px; cursor: pointer; color: var(--text-primary); transition: background .12s; }
    .maps-picker button:not(.maps-picker-call):hover { background: var(--bg-surface); }
    .maps-picker-call { background: rgba(0,255,153,.1); border: 1px solid rgba(0,255,153,.35); border-radius: 8px; padding: 6px 11px; font-size: 12px; color: #00ff99; font-weight: 600; text-decoration: none; white-space: nowrap; }
    .maps-picker-call:hover { background: rgba(0,255,153,.18); }
    .trip-visited-btn { margin-top: 10px; font-size: 12px; color: var(--text-muted); background: none; border: 1px solid var(--border-color); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
    .community-find-row { background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
    .cf-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
    .cf-detail { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
    .cf-time { font-size: 11px; color: var(--text-muted); }
    .cf-meta-row { display:flex; flex-wrap:wrap; gap:6px; margin:7px 0 4px; }
    .cf-pill { display:inline-flex; align-items:center; border:1px solid var(--border-subtle); background:var(--bg-surface-4); color:var(--text-muted); border-radius:999px; padding:3px 8px; font-size:11px; font-weight:700; }
    .cf-pill.strong { color:#34d399; border-color:#34d39933; background:#052e1a; }
    .cf-confirm-btn { margin-top:7px; background:transparent; color:var(--text-primary); border:1px solid var(--border-color); border-radius:8px; padding:5px 9px; font-size:11px; font-family:inherit; font-weight:800; cursor:pointer; }
    .cf-confirm-btn:hover { border-color:var(--border-focus); }
    .trip-no-results { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 14px; }
    .trip-mode-btn { flex:1; padding:9px 0; border-radius:999px; border:1px solid var(--border-color); background:var(--bg-surface-3); color:var(--text-secondary); font-size:13px; font-weight:600; cursor:pointer; transition:background 0.15s,color 0.15s,border-color 0.15s; }
    .trip-mode-btn.trip-mode-active { background:var(--accent); color:#111; border-color:var(--accent); }
    .trip-worth-sweep { background: rgba(139,92,246,.12); color: #a78bfa; }
    .route-stops-btn { flex:1; padding:9px 0; border-radius:999px; border:1px solid var(--border-color); background:var(--bg-surface-3); color:var(--text-secondary); font-size:13px; font-weight:600; cursor:pointer; transition:background 0.15s,color 0.15s,border-color 0.15s; }
    .route-stops-active { background:var(--accent) !important; color:#111 !important; border-color:var(--accent) !important; }
    .route-cust-retailer { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:10px; background:var(--bg-surface-2); border:1px solid var(--border-color); cursor:pointer; }
    .route-cust-retailer input[type=checkbox] { accent-color:var(--accent); width:16px; height:16px; flex-shrink:0; cursor:pointer; }
    .route-cust-retailer label { flex:1; font-size:14px; font-weight:600; cursor:pointer; }
    .route-cust-count { font-size:12px; color:var(--text-muted); }
    /* ── Find It browse mode ─────────────────────────────────────────────── */
    .find-mode-toggle { display:flex; gap:6px; margin-bottom:14px; }
    .find-mode-btn { flex:1; padding:9px 0; border-radius:999px; border:1px solid var(--border-color); background:var(--bg-surface-3); color:var(--text-secondary); font-size:13px; font-weight:600; cursor:pointer; transition:background .15s,color .15s,border-color .15s; }
    .find-mode-btn.active { background:var(--accent); color:#111; border-color:var(--accent); }
    .browse-theme-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:4px; }
    .browse-theme-card { background:var(--bg-surface-2); border:1px solid var(--border-color); border-radius:14px; overflow:hidden; cursor:pointer; transition:border-color .15s,transform .1s; }
    .browse-theme-card:active { transform:scale(.97); }
    .browse-theme-card:hover { border-color:var(--accent); }
    .browse-theme-img { width:100%; aspect-ratio:4/3; object-fit:contain; background:#fff; padding:10px; box-sizing:border-box; display:block; }
    .browse-theme-img-placeholder { width:100%; aspect-ratio:4/3; background:#fff; display:flex; align-items:center; justify-content:center; font-size:36px; }
    .browse-theme-footer { padding:10px 10px 12px; }
    .browse-theme-name { font-size:13px; font-weight:700; color:var(--text-primary); line-height:1.3; }
    .browse-theme-count { font-size:11px; color:var(--text-muted); margin-top:2px; }
    .browse-set-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:4px; }
    .browse-set-card { background:var(--bg-surface-2); border:1px solid var(--border-color); border-radius:14px; overflow:hidden; cursor:pointer; transition:border-color .15s; }
    .browse-set-card:hover { border-color:var(--accent); }
    .browse-set-img { width:100%; aspect-ratio:1; object-fit:contain; background:#fff; padding:10px; box-sizing:border-box; border-radius:10px 10px 0 0; }
    .browse-set-info { padding:10px 10px 12px; }
    .browse-set-name { font-size:12px; font-weight:700; color:var(--text-primary); line-height:1.3; margin-bottom:4px; }
    .browse-set-meta { font-size:12px; color:var(--text-secondary); display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-top:3px; }
    .browse-set-meta .bsm-sep { opacity:.3; }
    .browse-set-retired { color:#f87171; font-weight:600; }
    .browse-set-img-wrap { position:relative; }
    .browse-set-retired-badge { position:absolute; bottom:8px; left:8px; background:rgba(239,68,68,.9); color:#fff; font-size:10px; font-weight:700; border-radius:20px; padding:3px 9px; pointer-events:none; letter-spacing:.02em; }
    .browse-set-retiring-badge { position:absolute; bottom:8px; left:8px; background:rgba(251,146,60,.92); color:#fff; font-size:10px; font-weight:700; border-radius:20px; padding:3px 9px; pointer-events:none; letter-spacing:.02em; }
    .browse-set-excl-badge { position:absolute; top:8px; right:8px; background:rgba(234,179,8,.92); color:#111; font-size:10px; font-weight:700; border-radius:20px; padding:3px 9px; pointer-events:none; letter-spacing:.02em; }
    .browse-back-btn { display:flex; align-items:center; gap:6px; background:none; border:none; color:var(--text-secondary); font-size:13px; font-weight:600; cursor:pointer; padding:0 0 14px; }
    .browse-load-more { width:100%; margin-top:12px; padding:11px; background:var(--bg-surface-2); border:1px solid var(--border-color); border-radius:12px; color:var(--text-secondary); font-size:13px; font-weight:600; cursor:pointer; }
    .browse-load-more:hover { border-color:var(--accent); color:var(--accent); }
    .browse-year-pill { padding:6px 14px; background:#ffe84d; border:1px solid #ffe84d; border-radius:999px; color:#111; font-size:12px; font-weight:700; cursor:pointer; transition:background .15s,border-color .15s; }
    .browse-year-pill:hover { background:#f5dc00; border-color:#f5dc00; }
    .set-search-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg-surface-2); border: 1px solid var(--border-color); border-radius: 10px; z-index: 100; max-height: 280px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
    .set-search-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border-color); overflow: hidden; }
    .set-search-item:last-child { border-bottom: none; }
    .set-search-item:hover, .set-search-item.focused { background: var(--bg-surface-3); }
    .set-search-item-thumb { width: 40px; min-width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--bg-surface-3); flex-shrink: 0; }
    .set-search-item-text { min-width: 0; flex: 1; overflow: hidden; }
    .set-search-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .set-search-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .find-retailer-details { background: var(--bg-surface-2); border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
    .find-retailer-details > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; list-style: none; user-select: none; }
    .find-retailer-details > summary::-webkit-details-marker { display: none; }
    .find-retailer-details > summary::marker { display: none; }
    .find-retailer-summary-left { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text-primary); }
    .find-retailer-chevron { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: var(--bg-surface-3); border: 1px solid var(--border-color); border-radius: 6px; flex-shrink: 0; transition: transform .2s; }
    .find-retailer-chevron::before { content: ''; width: 5px; height: 5px; border-right: 2px solid var(--accent); border-top: 2px solid var(--accent); transform: rotate(45deg) translate(-1px, 0); }
    .find-retailer-details[open] .find-retailer-chevron { transform: rotate(90deg); }
    .find-retailer-count { font-size: 11px; font-weight: 600; padding: 2px 8px; background: var(--bg-surface-3); border-radius: 10px; color: var(--text-muted); text-align: right; margin-left: 8px; }
    .find-retailer-count .find-count-sub { display: block; margin-top: 1px; }
    .find-retailer-count.has-stock { background: rgba(0,255,153,.12); color: #00ff99; }
    .find-retailer-count.backorder { background: rgba(251,191,36,.12); color: #fbbf24; }
    .find-retailer-count.searching { color: var(--text-muted); font-style: italic; }
    .find-retailer-stores { padding: 0 8px 10px; }
    .find-summary { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; padding: 8px 12px; background: var(--bg-surface-2); border-radius: 10px; }
    .find-no-results { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 14px; }
    .find-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); padding: 10px 0 4px; }
    .find-online-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
    .find-online-status { font-size: 13px; font-weight: 600; }
    .find-online-price { font-size: 13px; color: var(--accent); font-weight: 700; }
    .find-online-link { font-size: 12px; color: #fbbf24; text-decoration: none; margin-left: auto; white-space: nowrap; font-weight: 600; }
    .find-online-link:hover { color: #fde68a; }
    .find-online-qty { font-size: 11px; color: var(--text-muted); margin-top: 2px; padding-left: 2px; }
    .find-cheaper-instore { color: #6dff9a; }
    .trip-launch-row { margin-bottom: 16px; }
    /* ── Chart expand / lightbox ─────────────────────────────────────────────── */
    .chart-panel {
      margin-top: 16px;
      padding: 12px 12px 10px;
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
      border: 1px solid var(--border-subtle);
    }
    .chart-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }
    .chart-panel-title {
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.2;
    }
    .chart-panel-subtitle,
    .chart-lightbox-subtitle {
      margin-top: 3px;
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.35;
    }
    .chart-control-stack {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
      flex-shrink: 0;
    }
    .chart-range-selector {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: nowrap;
      flex-shrink: 0;
      padding: 2px;
      border-radius: 8px;
      background: var(--bg-surface-3);
      border: 1px solid var(--border-subtle);
    }
    .chart-range-btn {
      min-width: 34px;
      height: 26px;
      padding: 0 8px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--text-muted);
      font-family: 'Inter', Arial, sans-serif;
      font-size: 11px;
      font-weight: 800;
      line-height: 26px;
      white-space: nowrap;
      cursor: pointer;
    }
    .chart-range-btn.active {
      background: var(--accent);
      color: #111;
    }
    .chart-html-legend {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 6px;
      margin: 0 0 8px;
      min-width: 0;
    }
    .chart-html-legend:empty {
      display: none;
    }
    .chart-legend-group {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 7px 12px;
      min-width: 0;
      width: 100%;
    }
    .chart-guide-legend {
      gap: 6px 10px;
      padding-top: 2px;
    }
    .chart-legend-heading {
      color: var(--text-dim);
      font-size: 10px;
      font-weight: 800;
      line-height: 1.2;
      text-transform: uppercase;
      letter-spacing: .04em;
      flex: 0 0 auto;
    }
    .chart-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      max-width: 100%;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--text-muted);
      font-family: 'Inter', Arial, sans-serif;
      font-size: 11px;
      font-weight: 800;
      line-height: 1.2;
      cursor: pointer;
      opacity: 1;
    }
    .chart-guide-item {
      font-size: 10px;
      font-weight: 750;
    }
    .chart-guide-static {
      cursor: default;
    }
    .chart-legend-item.muted {
      opacity: .42;
    }
    .chart-legend-dot {
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: var(--legend-color);
      box-shadow: 0 0 0 1px rgba(255,255,255,.12);
      flex: 0 0 auto;
    }
    .chart-legend-line {
      width: 18px;
      height: 0;
      border-top: 2px solid var(--legend-color);
      flex: 0 0 18px;
    }
    .chart-legend-line-dashed {
      border-top-style: dashed;
    }
    .chart-legend-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }
    .chart-expand-wrap {
      position: relative;
      cursor: zoom-in;
      margin-top: 0;
      padding: 0;
      border-radius: 10px;
      background: transparent;
      border: 0;
      height: 220px;
    }
    .chart-expand-wrap canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
      margin: 0 !important;
    }
    .chart-expand-hint {
      position: absolute; bottom: 8px; right: 8px;
      font-size: 11px; font-weight: 600; color: var(--text-muted);
      background: var(--bg-surface-2); border: 1px solid var(--border-subtle);
      border-radius: 6px; padding: 3px 8px; opacity: 0;
      transition: opacity .2s; pointer-events: none;
    }
    .chart-expand-wrap:hover .chart-expand-hint { opacity: 1; }

    .chart-lightbox {
      display: none; position: fixed; inset: 0; z-index: 2000;
      background: rgba(0,0,0,.78); backdrop-filter: blur(9px);
      align-items: center; justify-content: center; padding: 20px;
      overflow-y: auto;
    }
    .chart-lightbox.open { display: flex; }
    .chart-lightbox-inner {
      background:
        radial-gradient(circle at 20% 0%, rgba(255, 211, 0, .07), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.035), transparent 36%),
        var(--bg-surface);
      border: 1px solid var(--border-color);
      box-shadow: 0 24px 90px rgba(0,0,0,.5);
      border-radius: 20px; padding: 22px 22px 18px; width: 100%;
      max-width: 820px; position: relative;
    }
    .chart-lightbox-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding-right: 42px;
      margin-bottom: 12px;
    }
    .chart-lightbox-title {
      font-size: 16px; font-weight: 800; color: var(--text-primary);
      margin-bottom: 0;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .chart-lightbox-chart-scroll {
      width: 100%;
      overflow-x: visible;
      overflow-y: hidden;
    }
    .chart-lightbox-canvas-frame {
      width: 100%;
      height: 340px;
    }
    .chart-lightbox-canvas-frame canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
      margin: 0;
      touch-action: none;
    }
    .chart-zoom-reset {
      border: 1px solid var(--border-color);
      background: var(--bg-surface-2);
      color: var(--text-secondary);
      border-radius: 8px;
      padding: 8px 12px;
      font: 800 12px/1 'Inter', Arial, sans-serif;
      cursor: pointer;
      white-space: nowrap;
      transition: background .15s, color .15s, border-color .15s;
    }
    .chart-zoom-reset:hover {
      background: var(--bg-surface-3);
      color: var(--text-primary);
      border-color: var(--accent);
    }
    .chart-lightbox-inner .chart-note {
      margin: 12px 0 0;
      padding-top: 10px;
      border-top: 1px solid var(--border-subtle);
      color: var(--text-muted);
    }
    .chart-lightbox-close {
      position: absolute; top: 16px; right: 16px;
      background: var(--bg-surface-3); border: 1px solid var(--border-color);
      color: var(--text-muted); border-radius: 8px; padding: 4px 10px;
      font-size: 16px; cursor: pointer; font-family: 'Inter', Arial, sans-serif;
      line-height: 1; transition: color .15s;
    }
    .chart-lightbox-close:hover { color: var(--text-primary); }

    @media (max-width: 640px) {
      .chart-lightbox {
        padding: calc(12px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
        align-items: flex-start;
        justify-content: center;
      }
      .chart-lightbox-inner {
        padding: 18px 14px 14px;
        border-radius: 18px;
        margin: 0 0 18px;
      }
      .chart-lightbox-header,
      .chart-panel-head {
        flex-direction: column;
        gap: 8px;
      }
      .chart-lightbox-header {
        padding-right: 38px;
      }
      .chart-control-stack,
      .chart-range-selector {
        width: 100%;
      }
      .chart-control-stack {
        align-items: stretch;
      }
      .chart-zoom-reset {
        width: 100%;
        padding: 10px 12px;
      }
      .chart-range-selector {
        overflow-x: auto;
      }
      .chart-range-btn {
        flex: 1;
        min-width: 42px;
      }
      .chart-html-legend {
        gap: 6px;
        margin: 0 0 7px;
      }
      .chart-legend-group {
        align-items: flex-start;
        gap: 7px 10px;
      }
      .chart-legend-item {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
        font-size: 11px;
      }
      .chart-guide-legend .chart-legend-item {
        font-size: 10px;
      }
      .chart-legend-text {
        white-space: nowrap;
      }
      .chart-lightbox-title {
        font-size: 15px;
        line-height: 1.25;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
      }
      .chart-lightbox-chart-scroll {
        overflow-x: hidden;
        margin: 2px 0 0;
        padding: 0;
      }
      .chart-lightbox-canvas-frame {
        min-width: 0;
        width: 100%;
        height: 340px;
      }
      .chart-stat-grid { grid-template-columns: 1fr; }
      .chart-expand-wrap { height: 230px; }
      #chart-lightbox-canvas {
        height: 100% !important;
        min-height: 0;
      }
    }

    /* ── Guided Tour ─────────────────────────────────────────────────────── */
    /* box-shadow is NOT set in the inline cssText so CSS can animate it freely */
    #tourHighlight { box-shadow: 0 0 0 9999px rgba(0,0,0,.72); }
    @keyframes tourPulse {
      0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,1),   0 0 0 9999px rgba(0,0,0,.72); }
      50%       { box-shadow: 0 0 0 8px rgba(34,197,94,.35), 0 0 0 9999px rgba(0,0,0,.72); }
    }
    @keyframes tourPulseNoDim {
      0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,1); }
      50%       { box-shadow: 0 0 0 8px rgba(34,197,94,.35); }
    }
    #tourHighlight.active        { animation: tourPulse      1.5s ease-in-out infinite; }
    #tourHighlight.active-nodim  { animation: tourPulseNoDim 1.5s ease-in-out infinite; }
    /* !important overrides the inline style.cssText set by JS */
    #tourTooltip {
      border: 1.5px solid rgba(255,232,77,.6) !important;
      background: #242424 !important;
    }
    #tourNextBtn {
      background: #ffe84d; color: #111; border: none; border-radius: 999px;
      padding: 10px 22px; font-weight: 800; font-size: 14px; cursor: pointer;
      font-family: 'Inter', Arial, sans-serif;
    }
    #tourNextBtn:hover { background: #ffd700; }
    #tourPrevBtn {
      background: transparent; color: #bbb;
      border: 1px solid #3a3a3a; border-radius: 999px;
      padding: 10px 18px; font-size: 14px; cursor: pointer;
      font-family: 'Inter', Arial, sans-serif;
    }
    #tourSkipBtn {
      background: none; border: none; color: #666;
      font-size: 12px; cursor: pointer; text-decoration: underline;
      font-family: 'Inter', Arial, sans-serif; padding: 0;
    }
    #tourDontShowWrap { font-size: 12px; color: #666; display: flex; align-items: center; gap: 6px; }
    .tour-section-btn {
      background: var(--bg-surface-2); color: var(--text-secondary);
      border: 1px solid var(--border-color); border-radius: 999px;
      padding: 6px 14px; font-size: 13px; cursor: pointer;
      font-family: 'Inter', Arial, sans-serif;
    }
    .tour-section-btn:hover { border-color: #ffe84d; color: var(--text-primary); }
    #siteHeader.tour-header-bright { z-index: 2502 !important; pointer-events: none; }
    .tour-nav-pulse { border-radius: 999px; }
    @keyframes tourTap {
      0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,232,77,.8); }
      45%  { transform: scale(0.93); box-shadow: 0 0 0 10px rgba(255,232,77,.4); }
      100% { transform: scale(1); box-shadow: 0 0 0 22px rgba(255,232,77,0); }
    }
    .tour-tap-anim { animation: tourTap 0.48s ease-out 1 forwards; border-radius: inherit; }
