  /* ═══════════════════════════════════════════════════════
     THEMES  —  applied via  data-theme=""  on <html>
     ═══════════════════════════════════════════════════════ */

  :root, [data-theme="dark"] {
    --bg: #0B0D14;
    --bg-2: #0F121B;
    --surface: #151925;
    --surface-2: #1A1F2D;
    --surface-hover: #1F2433;
    --border: #232838;
    --border-strong: #2E3447;
    --text: #ECEEF3;
    --text-2: #8B92A4;
    --text-3: #5C6378;
    --accent: #7C5CFF;
    --accent-2: #9B7BFF;
    --accent-rgb: 124, 92, 255;
    --accent-bottom: #6A48F0;
    --accent-soft: rgba(var(--accent-rgb), 0.14);
    --accent-line: rgba(var(--accent-rgb), 0.45);
    --green: #2EC07A;
    --green-soft: rgba(46, 192, 122, 0.16);
    --amber: #F0B23A;
    --pink: #FF5C8A;
    --header-bg: rgba(11, 13, 20, 0.88);
    --scrollbar-thumb: #2A3041;
    --scrollbar-thumb-hover: #353C52;
    --toggle-off: rgba(255,255,255,0.14);
    --art-bg: #12151f;
    --model-thumb-bg: radial-gradient(circle, #2a2f40 0%, #161b28 100%);
  }

  [data-theme="light"] {
    --bg: #F1F3F8;
    --bg-2: #E7EAF2;
    --surface: #FFFFFF;
    --surface-2: #F5F7FC;
    --surface-hover: #ECEEF6;
    --border: #D4D8E8;
    --border-strong: #C0C6D8;
    --text: #0E1120;
    --text-2: #56607A;
    --text-3: #96A0B4;
    --accent: #7C5CFF;
    --accent-2: #9B7BFF;
    --accent-rgb: 124, 92, 255;
    --accent-bottom: #6A48F0;
    --accent-soft: rgba(var(--accent-rgb), 0.10);
    --accent-line: rgba(var(--accent-rgb), 0.30);
    --green: #1DA060;
    --green-soft: rgba(29, 160, 96, 0.12);
    --amber: #C98A10;
    --pink: #D43065;
    --header-bg: rgba(241, 243, 248, 0.92);
    --scrollbar-thumb: #C2C8DC;
    --scrollbar-thumb-hover: #A8B0C8;
    --toggle-off: rgba(0,0,0,0.14);
    --art-bg: #E7EAF2;
    --model-thumb-bg: radial-gradient(circle, #d8dce8 0%, #c8ccd8 100%);
  }

  [data-theme="orange"] {
    --bg: #0F0A04;
    --bg-2: #160D06;
    --surface: #1E1308;
    --surface-2: #241709;
    --surface-hover: #2C1D0C;
    --border: #3D2510;
    --border-strong: #522F15;
    --text: #F6EDE0;
    --text-2: #B09070;
    --text-3: #6E5238;
    --accent: #FF7A2F;
    --accent-2: #FF9A5C;
    --accent-rgb: 255, 122, 47;
    --accent-bottom: #D45818;
    --accent-soft: rgba(255, 122, 47, 0.14);
    --accent-line: rgba(255, 122, 47, 0.45);
    --green: #3EC07A;
    --green-soft: rgba(62, 192, 122, 0.16);
    --amber: #FFB830;
    --pink: #FF5C8A;
    --header-bg: rgba(15, 10, 4, 0.88);
    --scrollbar-thumb: #3D2510;
    --scrollbar-thumb-hover: #523018;
    --toggle-off: rgba(255,255,255,0.14);
    --art-bg: #1a0e04;
    --model-thumb-bg: radial-gradient(circle, #2e1c09 0%, #1a0e04 100%);
  }

  [data-theme="purple"] {
    --bg: #09060F;
    --bg-2: #0D0916;
    --surface: #130E22;
    --surface-2: #18132C;
    --surface-hover: #1E1836;
    --border: #2C2248;
    --border-strong: #3D2E65;
    --text: #EDE8FF;
    --text-2: #A090C8;
    --text-3: #655885;
    --accent: #BF5CFF;
    --accent-2: #D47CFF;
    --accent-rgb: 191, 92, 255;
    --accent-bottom: #9B30E0;
    --accent-soft: rgba(191, 92, 255, 0.14);
    --accent-line: rgba(191, 92, 255, 0.45);
    --green: #3EC09A;
    --green-soft: rgba(62, 192, 154, 0.16);
    --amber: #F0B23A;
    --pink: #FF5CA0;
    --header-bg: rgba(9, 6, 15, 0.88);
    --scrollbar-thumb: #2C2248;
    --scrollbar-thumb-hover: #3D2E65;
    --toggle-off: rgba(255,255,255,0.14);
    --art-bg: #0d0918;
    --model-thumb-bg: radial-gradient(circle, #221840 0%, #120d28 100%);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; overflow-x: clip; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
  }
  /* Faster tap response */
  a, button, [role="button"] { touch-action: manipulation; }
  button, input, select { font-family: inherit; color: inherit; }
  button { cursor: pointer; border: none; background: none; }
  input { outline: none; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 6px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

  /* App shell */
  .app { min-height: 100vh; display: flex; flex-direction: column; }

  /* ===== HEADER WRAPPER (sticky, floating card) ===== */
  .header-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 28px;
  }
  .header-wrap::before {
    content: "";
    position: absolute;
    inset: -40px -30px auto -30px;
    height: 120px;
    background:
      radial-gradient(60% 100% at 12% 100%, rgba(var(--accent-rgb), 0.55), transparent 70%),
      radial-gradient(50% 100% at 88% 100%, rgba(var(--accent-rgb), 0.45), transparent 70%),
      radial-gradient(40% 100% at 50% 100%, rgba(var(--accent-rgb), 0.25), transparent 70%);
    filter: blur(22px);
    pointer-events: none;
    z-index: 0;
  }
  [data-theme="light"] .header-wrap::before { opacity: 0.25; }

  /* ===== HEADER CARD ===== */
  .header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 16px 12px 18px;
    background: linear-gradient(180deg,
      rgba(var(--accent-rgb), 0.12) 0%,
      rgba(var(--accent-rgb), 0.05) 100%),
      var(--header-bg);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.04) inset,
      0 30px 60px -20px rgba(0, 0, 0, 0.6),
      0 0 80px -20px rgba(var(--accent-rgb), 0.4);
  }
  [data-theme="light"] .header {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 8px 28px -8px rgba(0, 0, 0, 0.12),
      0 0 50px -12px rgba(var(--accent-rgb), 0.2);
  }
  .header::before {
    content: "";
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.5), transparent);
    z-index: 2;
    pointer-events: none;
  }
  .header::after {
    content: "";
    position: absolute;
    bottom: -40px; left: 22%;
    width: 280px; height: 80px;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.4), transparent 70%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
  }
  [data-theme="light"] .header::after { opacity: 0.2; }

  /* ===== BRAND ===== */
  .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 6px 2px 2px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
  }
  .brand-mark {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(160deg,
      color-mix(in srgb, rgba(var(--accent-rgb), 1) 20%, var(--surface)) 0%,
      var(--bg) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    display: grid;
    place-items: center;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.03) inset,
      0 8px 22px -6px rgba(var(--accent-rgb), 0.55),
      0 0 24px -4px rgba(var(--accent-rgb), 0.45);
    overflow: hidden;
    flex-shrink: 0;
  }
  .brand-mark img {
    width: 100%; height: 100%; object-fit: cover; display: block;
  }
  .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
  .brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
  .brand-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-weight: 500; }

  /* ===== NAV ===== */
  .nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 20px;
    position: relative;
    z-index: 1;
  }
  .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
    white-space: nowrap;
  }
  .nav-item svg { width: 16px; height: 16px; opacity: .8; flex-shrink: 0; }
  .nav-item:hover {
    color: var(--text);
    background: rgba(139, 92, 246, 0.08);
  }
  .nav-item.is-active {
    color: #fff;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.28) 0%, rgba(124, 58, 237, 0.22) 100%);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow:
      0 0 0 1px rgba(167, 139, 250, 0.15) inset,
      0 8px 20px -6px rgba(139, 92, 246, 0.55),
      0 0 24px -4px rgba(139, 92, 246, 0.45);
  }
  .nav-item.is-active svg { opacity: 1; }

  /* ===== RIGHT CLUSTER ===== */
  .actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
  }

  /* Icon button (bell, lang, theme) */
  .icon-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(28, 22, 50, 0.9) 0%, rgba(16, 13, 30, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.22);
    display: grid; place-items: center;
    cursor: pointer;
    color: #d6cffb;
    transition: border-color .15s ease, color .15s ease;
    font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  }
  .icon-btn:hover { border-color: rgba(167, 139, 250, 0.45); color: #fff; }
  .icon-btn svg { width: 17px; height: 17px; }
  .hdr-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
    font-size: 11px; font-weight: 700;
    display: grid; place-items: center;
    box-shadow: 0 0 0 2px #0c0a18, 0 4px 10px -2px rgba(139, 92, 246, 0.6);
    line-height: 1;
  }

  /* Avatar pill */
  .avatar-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px 0 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(28, 22, 50, 0.9) 0%, rgba(16, 13, 30, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.22);
    cursor: pointer;
    transition: border-color .15s ease;
  }
  .avatar-pill:hover { border-color: rgba(167, 139, 250, 0.45); }
  .hdr-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0a0ff 0%, #b478ff 40%, #6d28d9 100%);
    display: grid; place-items: center;
    font-weight: 700; font-size: 12px; color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
    flex-shrink: 0;
  }
  .avatar-pill .hdr-chev { color: var(--text-3); display: grid; place-items: center; }
  .avatar-pill .hdr-chev svg { width: 12px; height: 12px; }
  .sub-pill {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 2px 7px; border-radius: 6px;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.02em;
  }

  /* Subscribe CTA */
  .btn-subscribe {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 18px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px; font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid rgba(196, 181, 253, 0.35);
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
    cursor: pointer;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 1px 0 rgba(255, 255, 255, 0.18) inset,
      0 10px 24px -8px rgba(124, 58, 237, 0.7),
      0 0 28px -6px rgba(139, 92, 246, 0.6);
    transition: filter .15s ease, box-shadow .15s ease, transform .1s ease;
  }
  .btn-subscribe:hover {
    filter: brightness(1.08);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.1) inset,
      0 1px 0 rgba(255, 255, 255, 0.22) inset,
      0 12px 28px -8px rgba(124, 58, 237, 0.85),
      0 0 36px -4px rgba(139, 92, 246, 0.75);
  }
  .btn-subscribe:active { transform: translateY(1px); }
  .btn-subscribe svg { width: 14px; height: 14px; }

  /* Sign-in button */
  .btn-signin {
    height: 40px; padding: 0 16px;
    background: linear-gradient(180deg, rgba(28, 22, 50, 0.9) 0%, rgba(16, 13, 30, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 12px;
    font-weight: 600; font-size: 13.5px; color: var(--text);
    cursor: pointer;
    transition: border-color .15s ease;
  }
  .btn-signin:hover { border-color: rgba(167, 139, 250, 0.45); }

  /* Page */
  .page { flex: 1; display: flex; max-width: 1640px; margin: 0 auto; width: 100%; padding: 16px 32px 80px; gap: 28px; }
  .sidebar { width: 296px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
  .main { flex: 1; min-width: 0; }

  /* Search */
  .search {
    display: flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 120ms ease;
  }
  .search:focus-within { border-color: var(--accent-line); }
  .search input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 14px; }
  .search input::placeholder { color: var(--text-3); }

  /* Sidebar accordion */
  .acc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }
  .acc-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    font-weight: 600; font-size: 14.5px;
    width: 100%; cursor: pointer; user-select: none;
  }
  .acc-clear {
    display: grid; place-items: center;
    width: 20px; height: 20px; border-radius: 6px;
    border: none; cursor: pointer; flex-shrink: 0;
    background: var(--surface-2);
    color: var(--text-3);
    transition: background 100ms ease, color 100ms ease;
  }
  .acc-clear:hover { background: rgba(255,80,80,0.18); color: #ff6060; }
  .acc-head .count {
    color: var(--text-2); font-weight: 600;
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
  }
  .acc-head .chev { color: var(--text-2); transition: transform 200ms ease; }
  .acc.open .chev { transform: rotate(180deg); }
  .acc-body { border-top: 1px solid var(--border); }
  .acc-search { padding: 10px 12px 4px; }
  .acc-search input {
    width: 100%; height: 36px;
    padding: 0 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text); font-size: 13.5px;
  }
  .acc-search input::placeholder { color: var(--text-3); }
  .col-list { max-height: 420px; overflow-y: auto; padding: 6px 6px 10px; display: flex; flex-direction: column; gap: 2px; }
  .col-row {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    transition: background 100ms ease;
    text-align: left;
  }
  .col-row:hover { background: var(--surface-hover); }
  .col-row.active {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-bottom) 100%);
    color: #fff;
  }
  .col-row.active .col-count { color: rgba(255,255,255,0.85); }
  .col-checkbox {
    width: 15px; height: 15px; border-radius: 4px; flex-shrink: 0;
    border: 1.5px solid var(--text-3);
    display: grid; place-items: center;
    transition: all 100ms ease;
  }
  .col-row.active .col-checkbox {
    background: rgba(255,255,255,0.92);
    border-color: transparent;
    color: #7C5CFF;
  }
  .col-icon {
    width: 26px; height: 26px; border-radius: 7px;
    display: grid; place-items: center;
    flex-shrink: 0;
  }
  .col-name { flex: 1; font-weight: 600; font-size: 13.5px; }
  .col-count {
    color: var(--text-2); font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  }

  /* Tabs above page title */
  .tabs-row {
    display: flex; gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }
  .tabs-row .nav-item { padding: 10px 16px; font-size: 14.5px; }
  .tabs-row .nav-item.active::after { left: 16px; right: 16px; bottom: -1px; }

  /* Main content */
  .main-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px; gap: 16px;
  }
  .title-block { display: flex; align-items: center; gap: 14px; min-width: 0; }
  .back-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    transition: background 120ms ease;
  }
  .back-btn:hover { background: var(--surface-hover); }
  .page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }

  .controls { display: flex; align-items: center; gap: 10px; }
  .pill {
    height: 38px; padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--text);
    transition: background 120ms ease;
    position: relative;
  }
  .pill:hover { background: var(--surface-hover); }
  .pill.active { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-2); }
  .pill.active:hover { background: var(--accent-soft); }
  .pill.locked { opacity: 0.45; }
  .pill.locked:hover { opacity: 0.7; background: var(--surface); }
  .pill.icon-only { width: 38px; padding: 0; justify-content: center; }
  .pill .chev { color: var(--text-2); }
  /* Premium gate */
  .premium-gate-wrap { position: relative; display: inline-flex; }
  .premium-tooltip {
    position: absolute; top: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    width: 210px; z-index: 50;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 11px 13px;
    box-shadow: 0 14px 36px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: normal;
    text-align: left;
  }
  .premium-tooltip-head {
    display: flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 700; color: var(--accent-2);
    margin-bottom: 5px;
  }
  .premium-tooltip-body { font-size: 12px; color: var(--text-2); line-height: 1.5; }
  .menu button.locked { opacity: 0.45; display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
  .menu button.locked:hover { opacity: 0.7; background: var(--surface-hover); }
  .seg { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
  .seg button {
    width: 32px; height: 30px; border-radius: 7px;
    color: var(--text-2);
    display: grid; place-items: center;
    transition: background 120ms ease, color 120ms ease;
  }
  .seg button.active { background: var(--surface-hover); color: var(--text); }

  /* Grid */
  .grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
  }
  @media (max-width: 1400px) { .grid { grid-template-columns: repeat(5, 1fr); } }
  @media (max-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }
  @media (max-width: 920px)  { .grid { grid-template-columns: repeat(3, 1fr); } }

  /* List view */
  .gift-list { display: flex; flex-direction: column; gap: 6px; }
  .list-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 16px 8px 8px;
    text-align: left;
    width: 100%;
    appearance: none; -webkit-appearance: none;
    transition: background 120ms, border-color 120ms;
    cursor: pointer;
  }
  .list-row:hover { background: var(--surface-hover); border-color: var(--border-strong); }
  .list-thumb {
    width: 60px; height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--art-bg);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .list-thumb img { width: 100%; height: 100%; object-fit: contain; }
  .list-row-name { font-weight: 700; font-size: 14px; color: var(--text); }
  .list-row-num { font-weight: 500; color: var(--text-3); font-size: 13px; margin-left: 6px; }
  .list-row-attrs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
  .list-row-attrs span { font-size: 12px; color: var(--text-3); }
  .list-row-attrs span b { color: var(--text-2); font-weight: 500; }
  .list-row-price { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }

    .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 140ms ease, border-color 140ms ease;
    text-align: left;
    width: 100%;
    display: flex; flex-direction: column;
    appearance: none; -webkit-appearance: none;
    padding: 0;
  }
  .card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
  /* На тач-устройствах (iOS/Telegram) :hover «залипает» после тапа — карточка
     получает transform и создаёт композитный слой, из-за чего фиксированные
     поповеры фильтров уходят под неё. Отключаем hover-трансформ на тач. */
  @media (hover: none) { .card:hover { transform: none; } }
  .card-art {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    flex-shrink: 0;
  }
  .card-art .pattern { position: absolute; inset: 0; opacity: 0.55; }
  .card-art .gift { position: absolute; inset: 0; display: grid; place-items: center; }
  .freshness-icon { position: relative; cursor: default; flex-shrink: 0; }
  .freshness-icon .freshness-tip {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
    padding: 5px 9px; font-size: 11px; color: var(--text-2); white-space: nowrap;
    pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .freshness-icon:hover .freshness-tip { display: block; }
  .card-body { padding: 12px 14px 14px; }
  .card-title { font-weight: 700; font-size: 14px; color: var(--text); margin: 0 0 4px; letter-spacing: -0.005em; }
  .card-sub { font-size: 12px; color: var(--text-3); margin-bottom: 8px; min-height: 14px; }
  .card-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
  .price { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 700; white-space: nowrap; }
  /* Model + rarity chip on the card face */
  .card-model {
    display: flex; align-items: center; gap: 6px;
    margin: 0 0 6px; min-width: 0;
  }
  .card-model-name {
    font-size: 12px; font-weight: 600; color: var(--text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .card-model .rarity { font-size: 11px; font-weight: 700; flex-shrink: 0; }
  /* Fiat equivalent under the TON price */
  .card-fiat { font-size: 11.5px; color: var(--text-3); margin-top: 3px; font-weight: 500; }
  .detail-fiat { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 8px; }
  /* Бейдж маркетплейса — верхний левый угол изображения */
  .market-overlay { position: absolute; top: 8px; left: 8px; z-index: 2; }
  .market-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: color-mix(in srgb, var(--mk, transparent) 30%, rgba(11,13,20,0.72));
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border: 1px solid color-mix(in srgb, var(--mk, var(--border-strong)) 75%, #ffffff 12%);
    border-radius: 8px; padding: 3px 7px 3px 4px;
    font-size: 11px; font-weight: 700; color: #fff; line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  }
  .market-badge-logo { width: 14px; height: 14px; border-radius: 4px; display: block; flex-shrink: 0; }
  .market-badge-name { letter-spacing: 0.01em; }

  /* Market filter chips — слева от фильтров, наглядно как бейджи маркетов.
     В покое приглушённые, при выборе подсвечиваются цветом своего маркета. */
  .mkt-filter { display: inline-flex; align-items: center; gap: 6px; margin-right: 2px; }
  .mkt-chip {
    height: 38px; padding: 0 12px 0 9px; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--text-2);
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  }
  .mkt-chip:hover { background: var(--surface-hover); color: var(--text); }
  .mkt-chip-logo { width: 16px; height: 16px; border-radius: 5px; display: block; flex-shrink: 0;
    filter: grayscale(0.5); opacity: 0.8; transition: filter 120ms ease, opacity 120ms ease; }
  .mkt-chip.active {
    background: color-mix(in srgb, var(--mk) 22%, var(--surface));
    border-color: color-mix(in srgb, var(--mk) 70%, transparent);
    color: #fff;
  }
  .mkt-chip.active .mkt-chip-logo { filter: none; opacity: 1; }

  /* Tags overlay on the gift art — bottom-left corner */
  .card-tags-overlay {
    position: absolute; bottom: 8px; left: 8px; z-index: 2;
  }
  .card-tags-overlay .tags-compact {
    background: rgba(0,0,0,0.52);
    border-radius: 7px;
    padding: 2px 3px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  /* Inside the art overlay: no background on individual segments, only text color */
  .card-tags-overlay .tag-abbr { background: transparent; }
  .card-tags-overlay .tag-abbr + .tag-abbr { border-left-color: rgba(255,255,255,0.15); }
  /* Tooltip anchored to left edge of tag — stays within card bounds */
  .card-tags-overlay .tag-tip { left: 0; transform: none; }
  .price .nx {
    width: 14px; height: 14px; border-radius: 4px;
    background: linear-gradient(135deg, var(--accent), #B69BFF);
    display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 800;
  }
  .badge-sale { background: var(--green-soft); color: var(--green); padding: 2px 7px; border-radius: 6px; font-weight: 700; font-size: 11px; letter-spacing: 0.02em; white-space: nowrap; }

  /* Gift tags */
  .tag-badge     { padding: 2px 7px; border-radius: 6px; font-weight: 700; font-size: 11px; letter-spacing: 0.02em; white-space: nowrap; }
  .tag-low-price { background: var(--green-soft); color: var(--green); }
  .tag-rare-back { background: rgba(168,85,247,0.15); color: #c084fc; }
  .tag-rare-num   { background: rgba(245,158,11,0.15); color: #f59e0b; }
  .tag-monochrome { background: rgba(148,163,184,0.15); color: #94a3b8; }
  .tag-custom     { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
  .gift-tags     { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

  /* Compact segmented tag badge (main listing) */
  .tags-compact  { display: inline-flex; border-radius: 6px; overflow: visible; }
  .tags-compact .tag-abbr {
    padding: 2px 7px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
    line-height: 1.6; white-space: nowrap; position: relative; cursor: default;
  }
  .tags-compact .tag-abbr:first-child  { border-radius: 6px 0 0 6px; }
  .tags-compact .tag-abbr:last-child   { border-radius: 0 6px 6px 0; }
  .tags-compact .tag-abbr:only-child   { border-radius: 6px; }
  .tags-compact .tag-abbr + .tag-abbr  { border-left: 1px solid rgba(0,0,0,0.12); }
  .tag-tip {
    display: none; position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); padding: 4px 9px; border-radius: 7px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45); z-index: 300; pointer-events: none;
  }
  .tag-abbr:hover .tag-tip { display: block; }

  /* Market icons */
  .mkt {
    width: 16px; height: 16px;
    border-radius: 5px;
    display: inline-grid; place-items: center;
    flex-shrink: 0;
    color: #fff;
  }
  .mkt-mrkt     { background: linear-gradient(135deg, #FF8A3D 0%, #FF4F4F 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
  .mkt-portals  { background: linear-gradient(135deg, #3DB3FF 0%, #2A6FDB 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
  .mkt-fragment { background: linear-gradient(135deg, #5A6E94 0%, #1F2738 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18); }

  /* Detail page */
  .detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
  @media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
  @media (max-width: 860px) { .detail-art-col { order: -1; } }

  .detail-art-wrap {
    border-radius: 16px; overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
    position: relative;
  }
  .detail-art-outer { position: relative; }
  .detail-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
  }
  .detail-row {
    display: grid; grid-template-columns: 110px 1fr;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    align-items: center;
  }
  .detail-row:last-child { border-bottom: none; }
  .detail-row .label { color: var(--text-2); font-weight: 500; }
  .detail-row .value-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
  .detail-row .value { font-weight: 700; color: var(--text); }
  .detail-row .rarity {
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--accent-2);
    padding: 2px 7px; border-radius: 5px;
    font-size: 11.5px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
  }
  .detail-row .owner-link { color: var(--accent-2); text-decoration: none; font-weight: 600; }
  .detail-row .owner-link:hover { text-decoration: underline; }

  /* Listings table */
  .listings {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
  }
  .listings-title {
    padding: 16px 20px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-2);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .listings-head, .listing-row {
    display: grid; grid-template-columns: 1.6fr 1fr 0.9fr 1fr 200px;
    gap: 14px;
    padding: 12px 20px;
    align-items: center;
  }
  .listings-head {
    background: var(--bg-2);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
  }
  .listing-row {
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    transition: background 100ms ease;
  }
  .listing-row:last-child { border-bottom: none; }
  .listing-row:hover { background: var(--surface-hover); }
  .listing-row.cheapest { background: rgba(46, 192, 122, 0.05); }
  .listing-mkt { display: flex; align-items: center; gap: 10px; font-weight: 700; }
  .listing-mkt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .listing-mkt-sub { display: none; } /* hidden on desktop — info already in separate columns */
  .col-market { display: flex; align-items: center; gap: 7px; }
  .listing-mkt .mkt { width: 28px; height: 28px; font-size: 12px; border-radius: 7px; }
  .listing-mkt-name { letter-spacing: 0.04em; font-size: 13.5px; }
  .listing-price { display: flex; align-items: center; gap: 8px; font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 14px; }
  .listing-diff { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-2); }
  .listing-diff.zero { color: var(--green); font-weight: 700; }
  .listing-diff.high { color: var(--amber); }
  .btn-buy {
    width: 100%;
    height: 36px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-bottom) 100%);
    color: #fff;
    border-radius: 9px;
    font-weight: 700; font-size: 13.5px;
    text-decoration: none;
    transition: transform 100ms ease, box-shadow 100ms ease;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb),0.25), inset 0 1px 0 rgba(255,255,255,0.18);
  }
  .btn-buy:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(var(--accent-rgb),0.35), inset 0 1px 0 rgba(255,255,255,0.18); }
  .btn-buy.ghost {
    background: var(--surface-hover);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border-strong);
  }
  .btn-buy.ghost:hover { background: #262C3D; }
  [data-theme="light"] .btn-buy { color: #1A1030; }
  [data-theme="light"] .btn-buy.ghost:hover { background: var(--surface-2); }

  .detail-actions { display: flex; gap: 8px; padding: 0 20px 16px; }
  .detail-actions .btn-buy { flex: 1; }

  /* Filter accordions in collection view */
  .acc-simple { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }

  /* Dropdown menu */
  .menu {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 180px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 6px;
    z-index: 30;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  }
  .menu button {
    display: block; width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
  }
  .menu button:hover { background: var(--surface-hover); }
  .menu button.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }

  /* Price filter popover */
  .price-menu { min-width: 244px; }
  .price-row { display: flex; align-items: center; gap: 6px; padding: 4px 4px 9px; }
  .price-input {
    width: 100%; min-width: 0; height: 34px; padding: 0 9px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); font-size: 13.5px; font-weight: 600;
  }
  .price-input:focus { border-color: var(--accent-2); outline: none; }
  .price-input::-webkit-outer-spin-button, .price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .price-dash { color: var(--text-2); flex-shrink: 0; }
  .price-unit { color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; flex-shrink: 0; }
  .price-presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px 4px; border-top: 1px solid var(--border); }
  .price-menu .price-preset {
    width: auto; display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 11px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600;
  }
  .price-menu .price-preset:hover { background: var(--surface-hover); color: var(--text); }
  .price-menu .price-preset.active { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-2); }
  .price-menu .price-preset.price-clear { margin-left: auto; width: 32px; padding: 6px 0; }
  .pill-reset { color: var(--text-2); gap: 5px; }
  .pill-reset:hover { color: var(--text); }

  /* Rarity filter popover (Монохром / Редкий фон / Редкий #) */
  .rarity-menu { min-width: 272px; padding: 6px; }
  .rarity-menu .rarity-row {
    display: flex; align-items: flex-start; gap: 10px; width: 100%;
    padding: 9px 10px; border-radius: 8px; text-align: left;
  }
  .rarity-menu .rarity-row:hover { background: var(--surface-hover); }
  .rarity-menu .rarity-row.on { background: var(--accent-soft); }
  .rarity-menu .rarity-row.locked { opacity: 0.75; }
  .rarity-box {
    width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
    border: 1.5px solid var(--border-strong); border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff; line-height: 1;
  }
  .rarity-row.on .rarity-box { background: var(--accent-2); border-color: var(--accent-2); }
  .rarity-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .rarity-name { font-size: 13.5px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
  .rarity-row.on .rarity-name { color: var(--accent-2); }
  .rarity-hint { font-size: 11.5px; font-weight: 500; color: var(--text-2); line-height: 1.3; white-space: normal; }

  /* Modal */
  .modal-bg {
    position: fixed; inset: 0; background: rgba(5,7,12,0.7); backdrop-filter: blur(6px);
    display: grid; place-items: center; z-index: 100; padding: 20px;
    animation: fade 150ms ease;
  }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .modal {
    width: 100%; max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 28px;
    animation: pop 200ms cubic-bezier(.2,.8,.3,1.1);
  }
  @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
  .modal h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
  .modal p { margin: 0 0 20px; color: var(--text-2); font-size: 14px; }
  .plan {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease;
  }
  .plan:hover { border-color: var(--border-strong); background: var(--surface-hover); }
  .plan.active { border-color: var(--accent-line); background: var(--accent-soft); }
  .plan-name { font-weight: 700; font-size: 15px; }
  .plan-price { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--text); }
  .plan-period { color: var(--text-3); font-size: 12px; margin-left: 4px; }
  .modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 8px;
    display: grid; place-items: center; color: var(--text-2);
  }
  .modal-close:hover { background: var(--surface-hover); color: var(--text); }
  .modal-wrap { position: relative; }

  /* ── Subscribe Modal (two-column) ── */
  .modal-bg { overflow-y: auto; }
  .sub-modal-wrap {
    position: relative; /* anchor for .modal-close */
    display: flex; gap: 0;
    width: 100%; max-width: 820px;
    max-height: calc(100vh - 40px);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    overflow: hidden;
    animation: pop 220ms cubic-bezier(.2,.8,.3,1.1);
  }
  .sub-modal-left {
    flex: 0 0 340px;
    background: linear-gradient(160deg, rgba(124,92,255,0.18) 0%, rgba(124,92,255,0.04) 100%);
    border-right: 1px solid var(--border);
    padding: 32px 28px 28px;
    display: flex; flex-direction: column; gap: 0;
  }
  .sub-modal-eyebrow {
    font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent); opacity: 0.85; margin-bottom: 10px;
  }
  .sub-modal-title {
    margin: 0 0 10px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em;
    line-height: 1.2; white-space: pre-line;
  }
  .sub-modal-subtitle {
    margin: 0 0 20px; font-size: 13px; color: var(--text-2); line-height: 1.5;
  }
  .sub-feat-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 11px;
  }
  .sub-feat-item {
    display: flex; align-items: flex-start; gap: 10px;
  }
  .sub-feat-icon {
    flex-shrink: 0; width: 26px; height: 26px;
    background: rgba(124,92,255,0.15); border: 1px solid rgba(124,92,255,0.25);
    border-radius: 7px; display: grid; place-items: center;
    font-size: 12px; color: var(--accent); margin-top: 1px;
  }
  .sub-feat-text { display: flex; flex-direction: column; gap: 1px; }
  .sub-feat-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .sub-feat-desc  { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }

  .sub-modal-tagline {
    margin: 16px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.55;
    border-top: 1px solid var(--border); padding-top: 14px;
  }
  .sub-modal-right {
    flex: 1; padding: 32px 28px 28px;
    display: flex; align-items: center; justify-content: center;
  }
  .sub-plans-center {
    width: 100%; display: flex; flex-direction: column;
  }
  .sub-plans-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 14px;
  }
  .sub-plans { display: flex; flex-direction: column; gap: 9px; }
  .sub-plan {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px; border-radius: 13px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 140ms, background 140ms;
  }
  .sub-plan:hover { border-color: var(--border-strong); background: var(--surface-hover); }
  .sub-plan.active { border-color: var(--accent-line); background: var(--accent-soft); }
  .sub-plan-badge {
    position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
    padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  }
  .sub-plan-radio {
    flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border-strong); display: grid; place-items: center;
    transition: border-color 140ms;
  }
  .sub-plan.active .sub-plan-radio { border-color: var(--accent); }
  .sub-plan-radio-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
    animation: pop 150ms ease;
  }
  .sub-plan-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .sub-plan-name { font-size: 14px; font-weight: 700; }
  .sub-plan-note { font-size: 11.5px; color: var(--text-3); }
  .sub-plan-pricing { text-align: right; }
  .sub-plan-price { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; }
  .sub-plan-period { display: block; font-size: 11px; color: var(--text-3); margin-top: 1px; }

  .sub-cta-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 20px; padding: 13px 16px;
    background: var(--accent); color: #fff; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: opacity 160ms, transform 100ms;
  }
  .sub-cta-btn:hover { opacity: 0.88; transform: translateY(-1px); }
  .sub-cta-btn:active { transform: scale(0.98); }
  .sub-modal-fine {
    text-align: center; font-size: 11.5px; color: var(--text-3);
    margin: 10px 0 0;
  }

  @media (max-width: 640px) {
    /* Колонкой контент выше экрана — включаем внутреннюю прокрутку, иначе низ
       (кнопка/мелкий текст) обрезается overflow:hidden из базового правила */
    .sub-modal-wrap {
      flex-direction: column; max-width: 440px; border-radius: 18px;
      max-height: calc(100vh - 24px); overflow-y: auto; overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }
    .sub-modal-left { flex: none; border-right: none; border-bottom: 1px solid var(--border); padding: 24px 20px 20px; }
    .sub-modal-title { font-size: 20px; }
    .sub-modal-right { padding: 20px; }
  }

  /* Empty state */
  .empty {
    grid-column: 1 / -1;
    padding: 60px 0;
    text-align: center; color: var(--text-3);
  }

  /* Pagination */
  .pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 28px 0 8px;
  }
  .pagination button {
    min-width: 36px; height: 36px; border-radius: 9px;
    padding: 0 10px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-2); font-size: 13px; font-weight: 600;
    transition: background 120ms, color 120ms, border-color 120ms;
  }
  .pagination button:hover:not(:disabled) {
    background: var(--surface-hover); color: var(--text); border-color: var(--border-strong);
  }
  .pagination button.active {
    background: var(--accent); border-color: var(--accent); color: #fff;
  }
  .pagination button:disabled { opacity: 0.3; cursor: default; }
  .pagination-ellipsis { color: var(--text-3); padding: 0 4px; font-size: 13px; }

  .listing-actions { display: flex; gap: 6px; }

  /* responsive listings */
  @media (max-width: 720px) {
    /* Switch listing rows to flex so market icon + buttons share one row */
    .listings-head { display: none; }
    .listing-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
    }
    .listing-row .col-price,
    .listing-row .col-diff { display: none; }
    /* listing-mkt stretches, truncates long names */
    .listing-row .listing-mkt { flex: 1; min-width: 0; overflow: hidden; }
    .listing-row .listing-mkt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    /* market: icon only, no text label */
    .listing-row .col-market { display: flex; flex-shrink: 0; }
    .listing-row .col-market > span { display: none; }
    /* price + diff inside listing-mkt on mobile */
    .listing-row .listing-mkt-sub {
      display: flex; align-items: center; gap: 5px;
      font-size: 11.5px; font-weight: 500; color: var(--text-2);
      font-family: 'JetBrains Mono', monospace;
    }
    .listing-row .listing-mkt-sub svg { opacity: 0.7; }
    .listing-row .listing-mkt-diff { font-size: 11px; }
    .listing-row .listing-mkt-diff.zero { color: var(--green); font-weight: 700; }
    .listing-row .listing-mkt-diff.high { color: var(--amber); }
    /* buttons: fixed compact size */
    .listing-row .listing-actions { flex-shrink: 0; gap: 5px; }
    .listing-row .listing-actions .btn-buy {
      width: auto; flex: none;
      padding: 0 12px; font-size: 12.5px; height: 32px;
    }
  }

  /* Auth fields */
  .field { margin-bottom: 12px; }
  .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.02em; }
  .field input {
    width: 100%; height: 42px; padding: 0 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text); font-size: 14px;
    transition: border-color 120ms ease;
  }
  .field input:focus { border-color: var(--accent-line); }
  .auth-tabs {
    display: flex; gap: 4px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
  }
  .auth-tabs button {
    flex: 1; height: 34px; border-radius: 7px;
    color: var(--text-2); font-weight: 600; font-size: 13.5px;
    transition: background 120ms ease, color 120ms ease;
  }
  .auth-tabs button.active { background: var(--surface-hover); color: var(--text); }
  .auth-error { color: #FF6E6E; font-size: 12.5px; margin-top: -4px; margin-bottom: 10px; min-height: 14px; }

  /* Profile dropdown */
  .profile-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 280px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px;
    z-index: 200;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  }
  .profile-menu-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
  .profile-menu-head .avatar { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, #FFB07A, #B05CFF); display: grid; place-items: center; font-weight: 800; color: #1a1a1a; }
  .profile-name { font-weight: 700; font-size: 14px; }
  .profile-email { color: var(--text-3); font-size: 12px; }
  .sub-card {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb),0.18), rgba(var(--accent-rgb),0.06));
    border: 1px solid rgba(var(--accent-rgb),0.3);
  }
  .sub-card.inactive { background: var(--bg-2); border-color: var(--border); }
  .sub-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
  .sub-value { font-weight: 800; font-size: 16px; letter-spacing: -0.005em; }
  .sub-value .num { font-family: 'JetBrains Mono', monospace; color: var(--accent-2); }
  .menu-action {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text); font-size: 13.5px; font-weight: 500;
    transition: background 100ms ease;
  }
  .menu-action:hover { background: var(--surface-hover); }
  .menu-action.danger { color: #FF7A7A; }
  .menu-action.danger:hover { background: rgba(255,122,122,0.08); }

  /* .sub-pill defined in header section */

  /* .btn-signin is defined in the header section above */

  /* utility */
  .sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

  /* ── Beautiful Auth Modal ───────────────────────────── */
  .auth-modal {
    width: 100%; max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    padding: 38px 36px 32px;
    animation: pop 220ms cubic-bezier(.2,.8,.3,1.1);
    position: relative;
  }
  .auth-logo-wrap {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 26px;
  }
  .auth-logo-icon {
    width: 56px; height: 56px; border-radius: 18px;
    background: linear-gradient(135deg, var(--accent) 0%, #B69BFF 100%);
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 24px;
    box-shadow: 0 8px 28px rgba(var(--accent-rgb),0.45), inset 0 1px 0 rgba(255,255,255,0.25);
    margin-bottom: 14px;
  }
  .auth-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 5px; }
  .auth-sub { color: var(--text-2); font-size: 13.5px; margin: 0; text-align: center; }
  .auth-seg {
    display: flex; background: var(--bg-2);
    border: 1px solid var(--border); border-radius: 11px;
    padding: 3px; margin-bottom: 24px; gap: 2px;
  }
  .auth-seg button {
    flex: 1; height: 38px; border-radius: 8px;
    font-weight: 600; font-size: 14px;
    color: var(--text-2);
    transition: background 120ms ease, color 120ms ease;
  }
  .auth-seg button.active { background: var(--surface-hover); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
  .auth-field { margin-bottom: 14px; }
  .auth-field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 7px; letter-spacing: 0.04em; text-transform: uppercase; }
  .auth-input-wrap { position: relative; }
  .auth-input-wrap .afi {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); pointer-events: none; display: flex; align-items: center;
  }
  .auth-input-wrap input {
    width: 100%; height: 46px;
    padding: 0 14px 0 42px;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: 11px;
    color: var(--text); font-size: 14.5px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }
  .auth-input-wrap input:focus {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12);
    outline: none;
  }
  .auth-input-wrap input::placeholder { color: var(--text-3); }
  .auth-input-wrap .pw-eye {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text-3); padding: 5px; display: flex; align-items: center;
    border-radius: 6px; transition: color 100ms ease;
  }
  .auth-input-wrap .pw-eye:hover { color: var(--text-2); }
  .auth-err {
    min-height: 16px; font-size: 12.5px; color: #FF6E7A;
    margin: 2px 0 10px; display: flex; align-items: center; gap: 5px;
  }
  .auth-submit {
    width: 100%; height: 50px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-bottom) 100%);
    color: #fff; border-radius: 12px;
    font-weight: 700; font-size: 15px;
    box-shadow: 0 6px 20px rgba(var(--accent-rgb),0.38), inset 0 1px 0 rgba(255,255,255,0.18);
    transition: transform 100ms ease, box-shadow 100ms ease, opacity 150ms ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 6px;
  }
  .auth-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(var(--accent-rgb),0.48), inset 0 1px 0 rgba(255,255,255,0.18); }
  .auth-submit:active:not(:disabled) { transform: translateY(0); }
  .auth-submit:disabled { opacity: 0.65; cursor: not-allowed; }
  .auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-3); }
  .auth-footer button { color: var(--accent-2); font-weight: 700; font-size: 13px; background: none; border: none; cursor: pointer; padding: 0; }
  .auth-footer button:hover { text-decoration: underline; }
  .auth-spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── Profile page ────────────────────────────────────── */
  .prof-page { padding: 32px 28px 60px; display: flex; flex-direction: column; gap: 24px; }
  .prof-layout { display: grid; grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr); gap: 20px; align-items: start; }
  @media (max-width: 900px) { .prof-layout { grid-template-columns: 1fr; } }
  .prof-left { display: flex; flex-direction: column; gap: 12px; }

  /* Identity card */
  .prof-id-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 22px;
    display: flex; flex-direction: column; gap: 18px;
  }
  .prof-id-top { display: flex; align-items: center; gap: 14px; }
  .prof-avatar {
    width: 60px; height: 60px; border-radius: 999px; flex-shrink: 0;
    background: linear-gradient(135deg, #ff8eb6 0%, #b86bff 100%);
    display: grid; place-items: center;
    font-weight: 800; font-size: 22px; color: #fff;
    box-shadow: 0 6px 22px rgba(184,107,255,0.35);
  }
  .prof-id-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .prof-name { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prof-email { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prof-sub-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin-top: 3px; }
  .prof-sub-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

  /* Meta rows */
  .prof-meta { display: flex; flex-direction: column; padding: 14px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); gap: 2px; }
  .prof-meta-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
  .prof-meta-label { color: var(--text-3); }
  .prof-meta-value { font-weight: 600; font-variant-numeric: tabular-nums; }

  /* Action buttons */
  .prof-actions { display: flex; gap: 8px; }
  .prof-btn-settings {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 14px; border-radius: 11px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-weight: 600; font-size: 13.5px;
    transition: all 140ms ease;
  }
  .prof-btn-settings:hover { background: rgba(var(--accent-rgb),0.10); border-color: rgba(var(--accent-rgb),0.3); color: var(--accent); }
  .prof-btn-settings.is-open { background: rgba(var(--accent-rgb),0.15); border-color: rgba(var(--accent-rgb),0.4); color: var(--accent); }
  .prof-btn-exit {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 16px; border-radius: 11px;
    background: rgba(255,77,109,0.07); border: 1px solid rgba(255,77,109,0.2);
    color: #ff4d6d; font-weight: 600; font-size: 13.5px;
    transition: all 140ms ease;
  }
  .prof-btn-exit:hover { background: rgba(255,77,109,0.15); border-color: rgba(255,77,109,0.38); }

  /* Collapsible settings panel */
  .prof-settings-wrap { overflow: hidden; transition: max-height 340ms cubic-bezier(0.4,0,0.2,1); }
  .prof-settings-inner {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px;
    display: flex; flex-direction: column;
    opacity: 0; transform: translateY(-6px);
    transition: opacity 280ms ease, transform 280ms ease;
  }
  .prof-settings-wrap.is-open .prof-settings-inner { opacity: 1; transform: translateY(0); }
  .prof-settings-title { font-weight: 700; font-size: 15px; margin-bottom: 14px; }
  .prof-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
  @media (max-width: 620px) { .prof-settings-grid { grid-template-columns: 1fr; } }
  .prof-field-group { display: flex; flex-direction: column; gap: 8px; height: 100%; }
  .prof-field-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 2px; }
  .prof-settings-form { display: flex; flex-direction: column; gap: 7px; flex: 1; }
  .prof-settings-form .prof-submit { margin-top: auto; }
  .prof-form-feedback { min-height: 18px; }
  .prof-settings-divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

  /* Form states */
  .prof-ok { font-size: 12.5px; color: #34D399; display: flex; align-items: center; gap: 5px; min-height: 16px; }
  .prof-submit {
    height: 42px; border-radius: 11px; font-weight: 700; font-size: 14px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-bottom) 100%);
    color: #fff; transition: opacity 150ms ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .prof-submit:hover:not(:disabled) { opacity: 0.9; }
  .prof-submit:disabled { opacity: 0.55; cursor: not-allowed; }

  /* Legacy aliases — point to unified .icon-btn */
  .bell-btn { /* replaced by .icon-btn */ }
  .lang-toggle { /* replaced by .icon-btn */ }
  .bell-badge { /* replaced by .hdr-badge */ }

  /* Notification dropdown */
  .notif-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
    width: 340px; max-height: 440px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,0.45);
    display: flex; flex-direction: column; overflow: hidden;
  }
  .notif-head {
    padding: 14px 16px 10px; display: flex; align-items: center;
    justify-content: space-between; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .notif-head-title { font-weight: 700; font-size: 14px; }
  .notif-read-all {
    font-size: 12px; color: var(--accent); font-weight: 600;
    background: none; border: none; cursor: pointer; padding: 0;
  }
  .notif-read-all:hover { opacity: 0.8; }
  .notif-list { overflow-y: auto; flex: 1; }
  .notif-item {
    padding: 11px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: flex-start; gap: 10px;
    transition: background 100ms;
  }
  .notif-item:last-child { border-bottom: none; }
  .notif-item:hover { background: var(--surface-hover); }
  .notif-item.unread { background: rgba(var(--accent-rgb),0.07); }
  .notif-item.unread:hover { background: rgba(var(--accent-rgb),0.12); }
  .notif-icon {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 15px;
  }
  .notif-icon.price-change { background: rgba(59,130,246,0.15); color: #60a5fa; }
  .notif-icon.removed { background: rgba(239,68,68,0.15); color: #f87171; }
  .notif-body { flex: 1; min-width: 0; }
  .notif-title { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .notif-sub { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
  .notif-time { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
  .notif-empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

  /* Notification toggles in profile settings */
  .notif-section-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px;
  }
  .notif-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border);
  }
  .notif-toggle-row:last-child { border-bottom: none; }
  .notif-toggle-label { font-size: 13px; color: var(--text); }
  .notif-toggle-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
  .toggle-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
  .toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
  .toggle-slider {
    position: absolute; inset: 0; border-radius: 999px;
    background: var(--toggle-off); cursor: pointer;
    transition: background 200ms;
  }
  .toggle-slider::before {
    content: ""; position: absolute;
    left: 3px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transition: left 200ms;
  }
  .toggle-switch input:checked + .toggle-slider { background: var(--accent); }
  .toggle-switch input:checked + .toggle-slider::before { left: 19px; }

  .tg-link-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--border);
    margin-top: 10px;
  }
  .tg-link-label { font-size: 13px; font-weight: 600; color: var(--text); }
  .tg-link-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
  .tg-link-btn {
    padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-bottom) 100%);
    color: #fff; transition: opacity 140ms;
  }
  .tg-link-btn:hover { opacity: 0.88; }
  .tg-linked-badge {
    display: flex; align-items: center; gap: 5px;
    color: #34D399; font-size: 12px; font-weight: 600;
  }

  /* Right column wrapper */
  .prof-right-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

  /* Favorites section */
  .prof-fav-section {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 22px;
    display: flex; flex-direction: column; gap: 18px; min-height: 420px;
  }
  .prof-fav-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .prof-fav-title-row { display: flex; align-items: center; gap: 10px; }
  .prof-fav-title { margin: 0; font-size: 17px; font-weight: 700; }
  .prof-fav-count {
    background: rgba(var(--accent-rgb),0.16); color: var(--accent);
    border-radius: 999px; padding: 2px 10px;
    font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
    transition: background 180ms, color 180ms;
  }
  .prof-fav-count .prof-fav-limit { opacity: 0.5; font-weight: 500; }
  .prof-fav-count.at-limit {
    background: rgba(239,68,68,0.15); color: #f87171;
  }
  .fav-limit-banner {
    display: flex; align-items: center; gap: 8px;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    border-radius: 10px; padding: 9px 12px;
    font-size: 13px; color: #f87171;
    animation: fadeSlideDown 200ms ease;
  }
  .fav-limit-banner svg { flex-shrink: 0; opacity: 0.85; }
  .fav-limit-banner span { flex: 1; line-height: 1.4; }
  .fav-limit-banner-close {
    background: none; border: none; padding: 2px; cursor: pointer;
    color: #f87171; opacity: 0.6; display: flex; align-items: center;
    transition: opacity 150ms;
  }
  .fav-limit-banner-close:hover { opacity: 1; }
  @keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .prof-fav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  @media (max-width: 700px) { .prof-fav-grid { grid-template-columns: repeat(2, 1fr); } }
  .prof-fav-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--text-3); font-size: 13.5px; text-align: center; padding: 40px 20px;
  }
  .prof-fav-empty svg { opacity: 0.3; }

  /* ── Watchlist section ─────────────────────────────────────────────── */
  .wl-section {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border); border-radius: 18px; padding: 22px;
    display: flex; flex-direction: column; gap: 14px;
  }
  .wl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .wl-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
  .wl-count { background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; border-radius: 20px; padding: 1px 7px; }
  .wl-add-btn {
    display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
    color: var(--accent); background: var(--accent-soft); border: none; border-radius: 8px;
    padding: 6px 12px; cursor: pointer; transition: opacity 150ms; white-space: nowrap;
  }
  .wl-add-btn:hover { opacity: 0.8; }
  .wl-loading { display: flex; justify-content: center; padding: 20px 0; }
  .wl-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; padding: 24px 0; }
  .wl-form-err { font-size: 12px; color: #f87171; }

  /* Alert items list */
  .wl-list { display: flex; flex-direction: column; gap: 8px; }
  .wl-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 12px; transition: border-color 180ms;
  }
  .wl-item:hover { border-color: var(--border-strong); }
  .wl-item-paused { opacity: 0.5; }
  .wl-item-thumb {
    width: 44px; height: 44px; object-fit: contain; border-radius: 8px;
    background: var(--surface-hover); flex-shrink: 0; padding: 4px;
  }
  .wl-item-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .wl-item-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wl-item-col { font-size: 11px; color: var(--text-3); }
  .wl-item-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .wl-tag { font-size: 10.5px; font-weight: 600; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
  .wl-tag-backdrop { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
  .wl-tag-price { background: var(--accent-soft); color: var(--accent); }
  .wl-tag-found { background: rgba(52,211,153,0.12); color: #34d399; }
  .wl-item-actions { display: flex; gap: 5px; flex-shrink: 0; }
  .wl-toggle {
    width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text-3); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 150ms;
  }
  .wl-toggle.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
  .wl-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .wl-delete {
    width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text-3); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 150ms;
  }
  .wl-delete:hover { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.4); color: #f87171; }

  /* ── Watchlist Picker Modal ─────────────────────────────────────────── */
  .wl-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
    z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px;
  }
  .wl-modal {
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 20px; width: 100%; max-width: 580px; max-height: 85vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 80px -16px rgba(0,0,0,0.6);
  }
  .wl-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
    font-size: 13.5px; color: var(--text-2); flex-shrink: 0;
  }
  .wl-modal-breadcrumb { display: flex; align-items: center; gap: 6px; }
  .wl-modal-back {
    background: none; border: none; color: var(--accent); font-size: 18px;
    cursor: pointer; padding: 0 6px 0 0; line-height: 1; opacity: 0.8;
  }
  .wl-modal-back:hover { opacity: 1; }
  .wl-modal-x {
    background: var(--surface-2); border: none; border-radius: 8px;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    color: var(--text-2); cursor: pointer; transition: background 150ms;
  }
  .wl-modal-x:hover { background: var(--surface-hover); }

  /* Step indicators */
  .wl-steps {
    display: flex; gap: 0; padding: 12px 20px; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .wl-step {
    display: flex; align-items: center; gap: 6px; flex: 1;
    font-size: 11.5px; color: var(--text-3); font-weight: 500;
  }
  .wl-step.active { color: var(--text); }
  .wl-step.done { color: var(--accent); }
  .wl-step-num {
    width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; flex-shrink: 0;
  }
  .wl-step.active .wl-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
  .wl-step.done .wl-step-num { background: var(--accent-soft); border-color: var(--accent); }
  .wl-step-label { white-space: nowrap; }
  @media (max-width: 480px) { .wl-step-label { display: none; } }

  /* Picker body */
  .wl-picker-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
  .wl-picker-loading { display: flex; justify-content: center; padding: 32px 0; }
  .wl-picker-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 20px 0; }
  .wl-picker-section-label { font-size: 11.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }

  /* Search */
  .wl-search-wrap {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px;
    padding: 9px 12px; flex-shrink: 0;
  }
  .wl-search-wrap svg { opacity: 0.45; flex-shrink: 0; }
  .wl-search { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 13.5px; font-family: inherit; }
  .wl-search-clear { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 16px; padding: 0; line-height: 1; }

  /* Collection grid */
  .wl-col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .wl-col-card {
    background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px;
    padding: 10px 8px 8px; cursor: pointer; transition: border-color 150ms, transform 120ms;
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  }
  .wl-col-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .wl-col-img-wrap {
    width: 60px; height: 60px; border-radius: 8px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
  }
  .wl-col-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
  .wl-col-name { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .wl-col-sub { font-size: 10px; color: var(--text-3); }

  /* Model grid */
  .wl-model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
  .wl-model-card {
    border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer;
    transition: border-color 150ms, transform 120ms; overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
  }
  .wl-model-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .wl-model-img-wrap { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
  .wl-model-img-wrap img { width: 80%; height: 80%; object-fit: contain; }
  .wl-model-name { font-size: 10.5px; font-weight: 600; color: var(--text); padding: 5px 6px 2px; text-align: center; line-height: 1.2; }
  .wl-model-rarity { font-size: 9.5px; color: var(--text-3); padding-bottom: 5px; }

  /* Confirm preview */
  .wl-confirm-preview {
    border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 14px;
    border: 1px solid var(--border);
  }
  .wl-confirm-img { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
  .wl-confirm-col { font-size: 11px; color: var(--text-2); margin-bottom: 2px; }
  .wl-confirm-model { font-size: 15px; font-weight: 700; color: var(--text); }

  /* Backdrop visual grid */
  .wl-backdrop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
  .wl-backdrop-card {
    background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 10px;
    cursor: pointer; transition: border-color 150ms, transform 120ms;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 4px 8px; text-align: center;
  }
  .wl-backdrop-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .wl-backdrop-card.selected { border-color: var(--accent); background: var(--accent-soft); }
  .wl-backdrop-img-wrap {
    width: 56px; height: 56px; border-radius: 7px; overflow: hidden; position: relative; flex-shrink: 0;
  }
  .wl-backdrop-check {
    position: absolute; inset: 0; background: rgba(var(--accent-rgb), 0.4);
    display: flex; align-items: center; justify-content: center; color: #fff;
  }
  .wl-backdrop-name { font-size: 10px; font-weight: 600; color: var(--text); line-height: 1.3; word-break: break-word; }
  .wl-backdrop-floor { font-size: 9.5px; color: var(--accent); font-weight: 700; }

  /* Price input */
  .wl-price-row { display: flex; align-items: center; gap: 8px; }
  .wl-price-input {
    flex: 1; background: var(--surface-2); border: 1.5px solid var(--border-strong);
    border-radius: 10px; color: var(--text); font-size: 18px; font-weight: 700;
    font-family: inherit; padding: 10px 14px; outline: none; transition: border-color 150ms;
    max-width: 180px;
  }
  .wl-price-input:focus { border-color: var(--accent); }
  .wl-price-currency { font-size: 16px; font-weight: 700; color: var(--text-2); }

  /* Save button */
  .wl-save-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent)));
    border: none; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 700;
    padding: 13px 20px; cursor: pointer; transition: opacity 150ms;
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px;
    box-shadow: 0 4px 18px -6px var(--accent-soft);
  }
  .wl-save-btn:hover { opacity: 0.88; }
  .wl-save-btn:disabled { opacity: 0.4; cursor: default; }

  /* Match screen */
  .wl-match-screen {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 28px 24px 24px; text-align: center;
  }
  .wl-match-icon { font-size: 42px; }
  .wl-match-title { font-size: 20px; font-weight: 800; color: var(--text); }
  .wl-match-subtitle { font-size: 12.5px; color: var(--text-3); }
  .wl-match-list { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
  .wl-match-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 12px; text-align: left;
  }
  .wl-match-row-left { display: flex; align-items: center; gap: 10px; }
  .wl-match-photo { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--surface-hover); }
  .wl-match-row-src { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
  .wl-match-row-price { font-size: 16px; font-weight: 800; color: var(--text); }
  .wl-match-row-price span { font-size: 12px; font-weight: 500; color: var(--text-2); }
  .wl-match-row-btn {
    background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
    border-radius: 8px; padding: 7px 12px; text-decoration: none;
    white-space: nowrap; flex-shrink: 0; transition: opacity 150ms;
  }
  .wl-match-row-btn:hover { opacity: 0.85; }
  .wl-match-close {
    background: none; border: 1px solid var(--border-strong); border-radius: 10px;
    color: var(--text-2); font-size: 13px; padding: 8px 20px; cursor: pointer; margin-top: 4px;
  }

  /* Watchlist notification in bell */
  .notif-icon.watchlist-hit { background: rgba(52,211,153,0.12); }
  .notif-item.notif-watchlist .notif-title { color: var(--text); }

  /* Heart button on gift cards */
  .fav-heart {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 28px; height: 28px; border-radius: 8px;
    background: rgba(10,6,18,0.52); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.09);
    display: grid; place-items: center;
    padding: 0;
    color: rgba(255,255,255,0.82);
    transition: background 140ms ease, color 140ms ease, transform 120ms ease;
  }
  .fav-heart:hover { background: rgba(10,6,18,0.78); color: #ff5c8a; transform: scale(1.08); }
  .fav-heart.is-active { color: #ff4d6d; }
  .fav-heart.is-active:hover { color: #ff8aa0; }

  /* ═══════════════════════════════════════════════════════════════════
     MOBILE RESPONSIVENESS — Telegram Mini App
     ═══════════════════════════════════════════════════════════════════ */

  /* Safe-area padding for iPhone notch / home indicator */
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }

  /* ── Mobile filter button (hidden on desktop, shown on mobile) ── */
  .mob-filter-btn {
    display: none; /* hidden on desktop */
    align-items: center; justify-content: center;
    position: relative;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    transition: background 120ms, color 120ms, border-color 120ms;
    flex-shrink: 0;
  }
  .mob-filter-btn:hover { background: var(--surface-hover); color: var(--text); }
  .mob-filter-dot {
    position: absolute; top: 5px; right: 5px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1.5px var(--bg);
  }

  /* ── Tablet (≤860px): sidebar becomes slide-in drawer ── */
  /* ── Нижний таб-бар (мобайл) ── */
  .bottom-nav { display: none; }
  .bn-icon-wrap { position: relative; display: inline-flex; }
  .bn-badge {
    position: absolute; top: -5px; right: -8px;
    min-width: 15px; height: 15px; padding: 0 4px;
    background: var(--pink); color: #fff;
    font-size: 9.5px; font-weight: 800; line-height: 15px; text-align: center;
    border-radius: 8px; border: 2px solid var(--surface);
  }
  /* Профиль: мобильная секция «Оформление + Уведомления» (десктоп — скрыто) */
  /* Profile page header row: back + title left, appearance tools right */
  .prof-head-row { display: flex; align-items: center; gap: 12px; }
  .prof-head-tools { display: none; align-items: center; gap: 8px; margin-left: auto; }
  .prof-head-tools .icon-btn { width: 38px; height: 38px; }
  .prof-mobile-extra { display: none; flex-direction: column; gap: 14px; margin: 4px 0 18px; }
  .prof-me-block { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
  .prof-me-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); padding: 14px 16px 8px; }
  .prof-me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 14px; }
  .prof-me-label { font-size: 14px; font-weight: 600; color: var(--text); }
  /* Встроенный (не выпадающий) список уведомлений в профиле */
  .notif-dropdown.notif-embed {
    position: static; width: 100%; max-height: 420px;
    box-shadow: none; border: none; border-radius: 0;
  }
  @media (max-width: 860px) {
    .bottom-nav {
      display: flex;
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
      background: var(--surface);
      border-top: 1px solid var(--border);
      padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
      justify-content: space-around; align-items: stretch;
    }
    .bn-item {
      flex: 1 1 0; min-width: 0;
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      background: none; border: 0; cursor: pointer; text-decoration: none;
      color: var(--text-3); font-size: 10.5px; font-weight: 600;
      padding: 3px 0; line-height: 1; transition: color .15s ease;
    }
    .bn-item.is-active { color: var(--accent); }
    .bn-item svg { display: block; }
    .bn-item span { white-space: nowrap; }
  }

  @media (max-width: 860px) {
    /* Вся верхняя шапка не нужна на мобайле — навигация в нижнем таб-баре,
       язык/тема переехали в панель фильтров (.side-mobile-tools) */
    .header-wrap { display: none; }
    .prof-head-tools { display: flex; }
    .prof-mobile-extra { display: flex; }
    .mob-filter-btn { display: flex; }
    .page { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(70px + env(safe-area-inset-bottom, 0px)); gap: 0; }
    .sidebar {
      position: fixed;
      top: 0;
      left: -100%;
      height: 100vh;
      width: min(296px, 85vw);
      z-index: 49;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      background: var(--bg);
      border-right: 1px solid var(--border);
      transition: left .25s ease;
      box-shadow: 8px 0 32px rgba(0,0,0,0.4);
      padding: 12px 0 24px;
    }
    .sidebar.open { left: 0; }
    .main { width: 100%; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .page-title { font-size: 22px; }
    /* Prevent flex from squeezing accordion sections — sidebar scrolls instead */
    .sidebar .acc { flex-shrink: 0; }
    /* Больше коллекций видно сразу; остальное скроллится внутри drawer */
    .col-list { max-height: 55vh; overflow-y: auto; }
    /* Filter button in controls row */
    .mob-filter-btn { flex-shrink: 0; }
  }

  /* ── Mobile (≤600px): compact nav, 2-col grid ── */
  @media (max-width: 600px) {
    .header-wrap { padding: 7px 10px; }

    /* Hide nav text labels — keep only icons */
    .nav-item { font-size: 0; padding: 0; width: 38px; height: 38px; justify-content: center; gap: 0; }
    .nav-item svg { font-size: initial; width: 17px; height: 17px; }
    .nav { margin-left: 6px; gap: 2px; }

    /* Brand — hide text, keep logo icon only */
    .brand-sub { display: none; }
    .brand-text { display: none; }
    .brand-mark { width: 36px; height: 36px; }

    /* Actions */
    .actions { gap: 5px; }
    .icon-btn { width: 34px; height: 34px; }
    /* Subscribe: icon-only to save space */
    .btn-subscribe { padding: 0; width: 34px; height: 34px; border-radius: 10px; gap: 0; justify-content: center; }
    .btn-subscribe svg { width: 15px; height: 15px; }
    .btn-subscribe-text { display: none; }
    /* Sign-in: compact */
    .btn-signin { padding: 0 10px; font-size: 12px; height: 34px; }

    /* Content grid */
    .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .page { padding: calc(10px + env(safe-area-inset-top, 0px) + var(--tg-content-top, 0px)) 10px calc(70px + env(safe-area-inset-bottom, 0px)); }
    .page-title { font-size: 19px; }
    .main-head { margin-bottom: 10px; gap: 8px; }
    .controls { flex-wrap: wrap; gap: 6px; }
    /* Маркет-чипы — отдельная строка, 4 чипа поровну на всю ширину, чтобы все
       были видны целиком без скролла (раньше Fragment уходил за край). */
    .mkt-filter { flex: 1 0 100%; display: flex; gap: 5px; margin-right: 0; }
    .mkt-filter .mkt-chip {
      flex: 1 1 0; min-width: 0; height: 36px;
      padding: 0 6px; gap: 5px; font-size: 12px; justify-content: center;
    }
    .mkt-filter .mkt-chip-logo { width: 15px; height: 15px; }
    .mkt-filter .mkt-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  }

  /* ── Small phones (≤400px): tighten spacing further ── */
  @media (max-width: 400px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .nav { margin-left: 2px; gap: 1px; }
    .nav-item { width: 34px; height: 34px; }
    .page { padding: calc(8px + env(safe-area-inset-top, 0px) + var(--tg-content-top, 0px)) 8px calc(70px + env(safe-area-inset-bottom, 0px)); }
    .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
    .actions { gap: 4px; }
    .btn-subscribe { width: 32px; height: 32px; }
    .btn-signin { height: 32px; }
  }

  /* ── Tiny phones (≤360px): hide sign-in button ── */
  @media (max-width: 360px) {
    .btn-signin { display: none; }
  }

  /* ── Controls row: stack under title on mobile ── */
  @media (max-width: 540px) {
    .main-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .controls { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .controls::-webkit-scrollbar { display: none; }
    .controls > * { flex-shrink: 0; }
  }

  /* ── Modals: bottom sheet on mobile ── */
  @media (max-width: 540px) {
    .modal-bg {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 0;
      overflow-y: auto;
    }
    .modal {
      max-width: 100%;
      border-radius: 22px 22px 0 0;
      padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
      animation: modal-slide-up 250ms cubic-bezier(.2,.8,.3,1);
    }
    @keyframes modal-slide-up {
      from { transform: translateY(40px); opacity: 0; }
      to   { transform: translateY(0);    opacity: 1; }
    }
    .modal-wrap { width: 100%; }

    /* Auth modal */
    .auth-modal {
      border-radius: 22px 22px 0 0;
      padding: 26px 18px calc(22px + env(safe-area-inset-bottom, 0px));
      max-width: 100%;
    }

    /* Subscribe modal */
    .sub-modal-wrap {
      flex-direction: column;
      max-width: 100%;
      border-radius: 22px 22px 0 0;
      max-height: calc(100vh - 32px);
      overflow-y: auto;
    }
    .sub-modal-left {
      flex: none;
      border-right: none;
      border-bottom: 1px solid var(--border);
      padding: 22px 16px 16px;
    }
    .sub-modal-right { padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    .sub-modal-title { font-size: 19px; }
    .sub-feat-list { display: none; } /* collapse feature list in bottom sheet */
  }

  /* ── Profile page mobile ── */
  @media (max-width: 540px) {
    .prof-page { padding: 14px 12px calc(70px + env(safe-area-inset-bottom, 0px)); }
    .prof-id-card { padding: 16px; }
    .prof-fav-section { padding: 16px; min-height: auto; }
    .wl-section { padding: 16px; }
    .wl-modal-overlay { padding: 0; align-items: flex-end; }
    .wl-modal {
      border-radius: 22px 22px 0 0;
      max-height: 88vh;
    }
  }

  /* ── Listing table mobile ── */
  @media (max-width: 400px) {
    .listings-head, .listing-row { padding: 9px 10px; gap: 8px; }
  }

  /* ── Notification dropdown: bottom sheet on small screens ── */
  @media (max-width: 540px) {
    .notif-dropdown {
      position: fixed;
      top: auto;
      bottom: 0;
      left: 0;
      right: 0;
      width: 100%;
      max-width: 100%;
      border-radius: 20px 20px 0 0;
      max-height: 72vh;
      animation: modal-slide-up 220ms ease;
    }
  }

  /* ── Profile menu: slide from top-right but not overflow ── */
  @media (max-width: 380px) {
    .profile-menu { right: -10px; width: 260px; }
  }

  /* ── Model filter list ───────────────────────────────── */
  .model-row {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--text);
    transition: background 100ms ease;
    text-align: left;
    cursor: pointer; border: none; background: none;
  }
  .model-row:hover { background: var(--surface-hover); }
  .model-row.active { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-bottom) 100%); color: #fff; }
  .model-row.active .model-rarity { color: rgba(255,255,255,0.85); }
  .model-row.active .col-checkbox { background: rgba(255,255,255,0.92); border-color: transparent; color: var(--accent); }
  .model-thumb {
    width: 32px; height: 32px; border-radius: 7px;
    object-fit: contain; flex-shrink: 0;
    background: var(--model-thumb-bg);
  }
  .model-thumb-placeholder {
    width: 32px; height: 32px; border-radius: 7px;
    background: var(--bg-2); border: 1px solid var(--border);
    flex-shrink: 0; display: grid; place-items: center;
    color: var(--text-3); font-size: 10px;
  }
  .model-info { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 5px; overflow: hidden; }
  .model-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; }
  .model-rarity {
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700;
    flex-shrink: 0; opacity: 0.85;
  }
  .model-count {
    font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 700;
    flex-shrink: 0; color: var(--text-3);
  }
  .model-row.active .model-count { color: rgba(255,255,255,0.7); }
  /* Rarity tiers: lower % = rarer = more special */
  .rarity-legendary { color: #FFD700; text-shadow: 0 0 8px rgba(255,215,0,0.5); } /* <=0.5% */
  .rarity-epic      { color: #FF6B6B; text-shadow: 0 0 8px rgba(255,107,107,0.4); } /* <=1% */
  .rarity-rare      { color: #B07BFF; text-shadow: 0 0 8px rgba(176,123,255,0.4); } /* <=1.5% */
  .rarity-uncommon  { color: #60A5FA; } /* <=2% */
  .rarity-common    { color: #34D399; } /* <=2.5% */
  .rarity-basic     { color: var(--text-3); } /* >2.5% */

  /* Symbol filter icons: white on dark themes, black on light theme */
  .symbol-filter-icon { filter: brightness(0) invert(1); opacity: 0.75; }
  [data-theme="light"] .symbol-filter-icon { filter: brightness(0); opacity: 0.7; }
