  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #1A1714;
    --text: #F0EBE3;
    --gold: #C9A882;
    --panel-bg: #2A2320;
    --border: #3D3530;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    height: 100vh; height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* ── HEADER ── */
  header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 50;
    background: var(--bg);
  }
  .brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .brand-logo {
    height: 28px;
    object-fit: contain;
  }
  .brand-sub {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    font-weight: 300;
    color: var(--gold);
    letter-spacing: 0.15em;
  }
  .header-count {
    font-size: 11px;
    font-weight: 300;
    color: var(--border);
    letter-spacing: 0.1em;
  }

  /* ── MAP AREA ── */
  .map-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .map-wrapper.panel-open {
    margin-right: 300px;
  }
  .axis-label {
    position: absolute;
    font-size: 10px;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.5;
    letter-spacing: 0.12em;
    pointer-events: none;
    z-index: 1;
  }
  .axis-top    { top: 14px;  left: 50%; transform: translateX(-50%); }
  .axis-bottom { bottom: 14px; left: 50%; transform: translateX(-50%); }
  .axis-left   { left: 20px; bottom: 14px; }
  .axis-right  { right: 20px; bottom: 14px; }

  .map-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(201,168,130,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(201,168,130,0.06) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
  }

  /* ── TOP SELLER STAR ── */
  .product-item .best-star {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    line-height: 1;
    color: var(--bg);
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transition: opacity 0.3s;
  }
  .product-item.dimmed .best-star { opacity: 0; }
  .product-item.faded .best-star { opacity: 0.3; }

  /* ── STARTER BADGE ── */
  .starter-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 7px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.08em;
    pointer-events: none;
    background: var(--gold);
    color: var(--bg);
    opacity: 0;
    animation: badgeIn 0.45s cubic-bezier(0.34,1.56,0.64,1) 0.3s forwards;
    z-index: 20;
  }

  /* ── PANEL BEST SELLER TAG ── */
  .panel-best-tag {
    display: inline-block;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--bg);
    margin-left: 6px;
    vertical-align: middle;
  }
  .panel-texture {
    font-size: 9px;
    font-weight: 300;
    opacity: 0.5;
  }

  /* product items */
  .product-item {
    position: absolute;
    transform: translate(-50%, -50%) scale(1);
    cursor: pointer;
    transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1),
               transform 0.5s cubic-bezier(0.4,0,0.2,1);
    z-index: 10;
    will-change: transform, opacity;
  }
  .product-item.dimmed {
    opacity: 0.04;
    transform: translate(-50%, -50%) scale(0.4);
    filter: grayscale(1) blur(2px);
    pointer-events: none;
  }
  .product-item.faded {
    opacity: 0.15;
    filter: grayscale(0.5) brightness(0.7);
  }
  .product-item img {
    width: 68px;
    display: block;
    transition: width 0.3s cubic-bezier(0.34,1.56,0.64,1), filter 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  }
  .product-item:hover img {
    width: 88px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.7));
  }
  .product-item.selected img {
    filter: drop-shadow(0 0 12px rgba(201,168,130,0.8)) drop-shadow(0 4px 16px rgba(0,0,0,0.7));
  }

  /* ── ALIVE STATE (filtered match) ── */
  .product-item.alive {
    animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) calc(var(--stagger, 0) * 60ms) both,
               breathe var(--breathe-dur, 3s) calc(0.5s + var(--stagger, 0) * 60ms) ease-in-out infinite;
    z-index: 15;
  }
  .product-item.alive img {
    width: 82px;
    filter: drop-shadow(0 0 18px rgba(201,168,130,0.4)) drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  }
  .product-item.alive .fallback-circle {
    width: 66px;
    height: 66px;
    box-shadow: 0 0 20px rgba(201,168,130,0.35), 0 4px 12px rgba(0,0,0,0.5);
  }
  /* ── SELECTED = HERO (bigger) ── */
  .product-item.selected.alive img {
    width: 100px;
    filter: drop-shadow(0 0 20px rgba(201,168,130,0.9)) drop-shadow(0 6px 20px rgba(0,0,0,0.6));
  }
  .product-item.selected.alive .fallback-circle {
    width: 84px; height: 84px;
    box-shadow: 0 0 24px rgba(201,168,130,0.6), 0 6px 20px rgba(0,0,0,0.5);
  }
  /* ── RECOMMENDED = SUPPORTING (smaller) ── */
  .product-item.recommended.alive img {
    width: 72px;
    filter: drop-shadow(0 0 10px rgba(201,168,130,0.3)) drop-shadow(0 3px 8px rgba(0,0,0,0.4));
  }
  .product-item.recommended.alive .fallback-circle {
    width: 58px; height: 58px;
    box-shadow: 0 0 12px rgba(201,168,130,0.25), 0 3px 8px rgba(0,0,0,0.4);
  }

  @keyframes popIn {
    0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  }
  @keyframes breathe {
    0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(1) rotate(0deg); }
    20%      { transform: translate(-50%, -50%) translateY(var(--by, -8px)) scale(1.04) rotate(var(--br, 2deg)); }
    50%      { transform: translate(-50%, -50%) translateY(calc(var(--by, -8px) * 0.3)) scale(0.98) rotate(0deg); }
    70%      { transform: translate(-50%, -50%) translateY(calc(var(--by, -8px) * 0.7)) scale(1.02) rotate(calc(var(--br, 2deg) * -0.7)); }
  }
  .product-item .fallback-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: block;
    transition: width 0.2s, height 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  }
  .product-item:hover .fallback-circle {
    width: 66px;
    height: 66px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
  }
  .product-item.selected .fallback-circle {
    box-shadow: 0 0 0 2px #C9A882, 0 0 20px rgba(201,168,130,0.6);
  }

  /* ── TOOLTIP ── */
  #tooltip {
    position: fixed;
    background: rgba(10,8,7,0.88);
    color: var(--text);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.05em;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    border: 1px solid var(--border);
  }
  #tooltip.visible { opacity: 1; }
  #tooltip .tt-family {
    font-size: 9px;
    color: var(--gold);
    margin-top: 2px;
    letter-spacing: 0.1em;
  }

  /* ── FILTERS ── */
  .filter-bar {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
    z-index: 50;
    background: var(--bg);
  }
  .filter-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
  }
  .filter-label {
    font-size: 9px;
    font-weight: 300;
    color: var(--gold);
    letter-spacing: 0.15em;
    min-width: 36px;
    flex-shrink: 0;
  }

  /* Hide color filter group (keep feature internally, but no UI exposure) */
  .filter-row-color { display: none; }
  .filter-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 2px;
    flex-shrink: 0;
  }
  .filter-season {
    font-size: 8px;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.6;
    margin: 0 4px 0 6px;
    letter-spacing: 0.12em;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    padding: 2px 0;
  }
  .filter-season:hover { opacity: 1; }
  .filter-season.active {
    opacity: 1;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .filter-reset-btn {
    background: none;
    border: 1px solid rgba(201,168,130,0.3);
    color: var(--gold);
    font-size: 10px;
    font-weight: 300;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 4px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    flex-shrink: 0;
  }
  .filter-reset-btn:hover {
    background: rgba(201,168,130,0.15);
    border-color: rgba(201,168,130,0.5);
  }
  .filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    font-weight: 300;
    padding: 4px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
  }
  .filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
  }
  .filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
    font-weight: 600;
  }
  .filter-btn.pc-btn {
    font-size: 9px;
    padding: 3px 8px;
  }
  /* Mobile-only P/C elements hidden on desktop */
  .pc-season-mobile { display: none; }
  .pc-subtypes-mobile { display: none; }

  /* ── DETAIL PANEL ── */
  #detail-panel {
    position: fixed;
    top: 0; right: 0;
    width: 300px;
    height: 100vh;
    background: var(--panel-bg);
    border-left: 1px solid var(--border);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  #detail-panel.open {
    transform: translateX(0);
  }
  .panel-close {
    position: absolute;
    top: 16px; right: 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    z-index: 1;
  }
  .panel-close:hover {
    border-color: var(--gold);
    color: var(--gold);
  }
  .panel-img-wrap {
    padding: 28px 24px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    background: linear-gradient(to bottom, #221e1b, var(--panel-bg));
  }
  .panel-img-wrap img {
    max-width: 170px;
    max-height: 170px;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6));
  }
  .panel-img-wrap .panel-fallback {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  }
  .panel-info {
    display: none;
  }
  .panel-line {
    font-size: 11px;
    font-weight: 300;
    color: var(--gold);
    letter-spacing: 0.15em;
  }
  .panel-name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
  }
  .panel-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0;
  }
  .panel-family-badge {
    display: none;
  }
  /* ── PANEL HERO (img + info) ── */
  .panel-hero {
    display: flex;
    flex-direction: column;
  }
  .panel-hero-info {
    padding: 16px 24px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .panel-content {
    padding: 8px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
  }

  /* ── PC PILLS ── */
  .panel-pc-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .pc-pill {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }
  .pc-pill-rank {
    font-size: 8px;
    font-weight: 300;
    opacity: 0.7;
  }
  .pc-1st {
    background: var(--gold);
    color: var(--bg);
  }
  .pc-2nd {
    border: 1px solid rgba(201,168,130,0.5);
    color: var(--gold);
  }
  [data-theme="light"] .pc-1st {
    background: var(--gold);
    color: #FDFAF6;
  }
  [data-theme="light"] .pc-2nd {
    border-color: rgba(154,126,94,0.4);
    color: var(--gold);
  }

  .panel-pc-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .panel-pc-rank {
    font-size: 9px;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.5;
    width: 16px;
    flex-shrink: 0;
  }
  .panel-pc-value {
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    letter-spacing: 0.05em;
  }

  /* -- MATCH LINES -- */
  .match-line { position: absolute; pointer-events: none; z-index: 5; overflow: visible; }
  .match-line line { stroke: var(--gold); stroke-dasharray: 6 4; stroke-linecap: round; opacity: 0; animation: lineIn 0.6s ease forwards; }
  @keyframes lineIn { 0% { opacity: 0; stroke-dashoffset: 200; } 100% { opacity: var(--line-opacity, 0.5); stroke-dashoffset: 0; } }
  .product-item.recommended { z-index: 16; }
  .product-item.selected { z-index: 20; }
  .rec-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 8px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.08em;
    pointer-events: none;
    opacity: 0;
    animation: badgeIn 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards;
    z-index: 20;
  }
  .rec-badge.rank-0 {
    background: var(--gold);
    color: var(--bg);
    animation-delay: 0.15s;
  }
  .rec-badge.rank-1 {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    animation-delay: 0.3s;
  }
  .rec-badge.rank-2 {
    background: transparent;
    border: 1px solid rgba(201,168,130,0.5);
    color: var(--gold);
    /* opacity handled by badgeIn animation */
    animation-delay: 0.45s;
  }
  @keyframes badgeIn {
    0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  }


  /* ── CTA BUTTON ── */
  /* ── PANEL MATCH RECS ── */
  .panel-recs {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .panel-recs-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--gold);
    opacity: 0.7;
    margin-bottom: 2px;
  }
  .panel-rec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(201,168,130,0.06);
    border: 1px solid rgba(201,168,130,0.1);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
  }
  .panel-rec-item:hover {
    background: rgba(201,168,130,0.12);
    border-color: rgba(201,168,130,0.25);
  }
  .panel-rec-swatch {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
  }
  .panel-rec-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
  }
  .panel-rec-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .panel-rec-line {
    font-size: 9px;
    color: var(--text);
    opacity: 0.5;
  }
  .panel-rec-badge {
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .panel-rec-item.rank-0 .panel-rec-badge {
    background: var(--gold);
    color: var(--bg);
  }
  .panel-rec-item.rank-1 .panel-rec-badge {
    border: 1px solid var(--gold);
    color: var(--gold);
  }
  .panel-rec-item.rank-2 .panel-rec-badge {
    border: 1px solid rgba(201,168,130,0.5);
    color: var(--gold);
    opacity: 0.8;
  }

  [data-theme="light"] .panel-rec-item {
    background: rgba(154,126,94,0.06);
    border-color: rgba(154,126,94,0.12);
  }
  [data-theme="light"] .panel-rec-item:hover {
    background: rgba(154,126,94,0.12);
    border-color: rgba(154,126,94,0.2);
  }


  .panel-cta {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    background: var(--gold);
    color: var(--bg);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    text-decoration: none;
    text-align: center;
  }
  .panel-cta:hover { opacity: 0.88; transform: translateY(-1px); }
  .panel-cta.hidden { display: none; }
  .panel-desc {
    font-size: 12px;
    font-weight: 300;
    color: var(--text);
    opacity: 0.65;
    line-height: 1.7;
    white-space: pre-line;
  }

  /* ── THEME TOGGLE ── */
  .header-right { display: flex; align-items: center; gap: 12px; }
  .theme-toggle,
  .lang-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
  }
  .lang-toggle {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }
  .theme-toggle:hover,
  .lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
  .icon-moon { display: none; }
  [data-theme="light"] .icon-sun { display: none; }
  [data-theme="light"] .icon-moon { display: block; }

  /* ── LIGHT THEME ── */
  [data-theme="light"] {
    --bg: #FDFAF6;
    --text: #2D2420;
    --gold: #9A7E5E;
    --panel-bg: #FFFFFF;
    --border: #E5DDD4;
  }
  [data-theme="light"] .brand-logo { filter: brightness(0) opacity(0.75); }
  [data-theme="light"] #tooltip {
    background: rgba(255,255,255,0.94);
    color: #2D2420;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  [data-theme="light"] .map-grid {
    background-image:
      linear-gradient(rgba(154,126,94,0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(154,126,94,0.08) 1px, transparent 1px);
  }

  [data-theme="light"] .product-item img {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
  }
  [data-theme="light"] .product-item:hover img {
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.15));
  }
  [data-theme="light"] .product-item.selected img {
    filter: drop-shadow(0 0 10px rgba(154,126,94,0.4)) drop-shadow(0 4px 14px rgba(0,0,0,0.15));
  }
  [data-theme="light"] .product-item.alive img {
    filter: drop-shadow(0 0 12px rgba(154,126,94,0.25)) drop-shadow(0 4px 10px rgba(0,0,0,0.1));
  }
  [data-theme="light"] .product-item.dimmed { opacity: 0.06; }
  [data-theme="light"] .product-item.faded {
    opacity: 0.2; filter: grayscale(0.3) brightness(0.9);
  }
  [data-theme="light"] .product-item .fallback-circle { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
  [data-theme="light"] .product-item:hover .fallback-circle { box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
  [data-theme="light"] .product-item.selected .fallback-circle {
    box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(154,126,94,0.3);
  }
  [data-theme="light"] .product-item.alive .fallback-circle {
    box-shadow: 0 0 12px rgba(154,126,94,0.2), 0 4px 10px rgba(0,0,0,0.1);
  }
  [data-theme="light"] .product-item.selected.alive img {
    filter: drop-shadow(0 0 16px rgba(154,126,94,0.5)) drop-shadow(0 6px 16px rgba(0,0,0,0.15));
  }
  [data-theme="light"] .product-item.recommended.alive img {
    filter: drop-shadow(0 0 8px rgba(154,126,94,0.2)) drop-shadow(0 3px 8px rgba(0,0,0,0.08));
  }
  [data-theme="light"] .panel-img-wrap {
    background: linear-gradient(to bottom, #F5F0EA, var(--panel-bg));
  }
  [data-theme="light"] .panel-img-wrap img {
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.1));
  }
  [data-theme="light"] #detail-panel {
    box-shadow: -4px 0 20px rgba(0,0,0,0.06);
  }
  [data-theme="light"] .panel-family-badge {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
  }

  /* ── RESPONSIVE: TABLET ── */
  @media (max-width: 1024px) {
    header { padding: 0 24px; }
    .product-item img { width: 56px; }
    .product-item:hover img { width: 72px; }
    .product-item.alive img { width: 66px; }
    .product-item.selected.alive img { width: 82px; }
    .product-item.recommended.alive img { width: 60px; }
    #detail-panel { width: 280px; }
    .map-wrapper.panel-open { margin-right: 280px; }
    .filter-bar { padding: 8px 16px; }
    .filter-btn { font-size: 9px; padding: 3px 9px; }
    .product-item .best-star { width: 12px; height: 12px; font-size: 6px; }
    .starter-badge { font-size: 6px; bottom: -15px; }
  }

  /* ── RESPONSIVE: MOBILE ── */
  @media (max-width: 640px) {
    header { height: 52px; padding: 0 16px; }
    .brand-logo { height: 22px; }
    .brand-sub { font-size: 8px; }
    .header-count { font-size: 9px; }
    .header-right { gap: 8px; }
    .theme-toggle, .lang-toggle { width: 28px; height: 28px; }
    .theme-toggle svg { width: 14px; height: 14px; }
    .lang-toggle { font-size: 9px; }
    .axis-label { font-size: 8px; opacity: 0.35; }
    .product-item img { width: 44px; }
    .product-item:hover img { width: 52px; }
    .product-item.alive img { width: 50px; }
    .product-item.selected.alive img { width: 62px; }
    .product-item.recommended.alive img { width: 46px; }
    .product-item .fallback-circle { width: 38px; height: 38px; }
    .product-item:hover .fallback-circle { width: 46px; height: 46px; }
    .product-item.alive .fallback-circle { width: 44px; height: 44px; }
    #tooltip { display: none !important; }
    .map-wrapper.panel-open { margin-right: 0; }
    .map-wrapper { transition: transform 0.4s ease, margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
    #detail-panel {
      top: auto; bottom: 0; left: 0; right: 0;
      width: 100%; height: 55vh; max-height: 55vh; height: 55dvh; max-height: 55dvh;
      border-left: none;
      border-top: 1px solid var(--border);
      border-radius: 16px 16px 0 0;
      transform: translateY(100%);
    }
    #detail-panel.open { transform: translateY(0); }
    .panel-close { top: 12px; right: 12px; z-index: 5; min-width: 44px; min-height: 44px; }
    .panel-hero {
      flex-direction: row;
      align-items: center;
      padding: 16px 16px 0;
      gap: 14px;
    }
    .panel-img-wrap {
      padding: 0; min-height: unset; flex-shrink: 0;
      width: 100px; background: none !important;
    }
    .panel-img-wrap img { max-width: 100px; max-height: 100px; }
    .panel-img-wrap .panel-fallback { width: 70px; height: 70px; }
    .panel-hero-info { padding: 0; gap: 3px; }
    .panel-content { padding: 12px 16px 24px; gap: 10px; }
    .panel-name { font-size: 15px; }
    .panel-line { font-size: 9px; }
    .panel-desc { font-size: 11px; }
    .pc-pill { font-size: 9px; padding: 2px 8px; }
    .pc-pill-rank { font-size: 7px; }
    .filter-bar { padding: 8px 12px; gap: 5px; }
    .filter-reset-btn { font-size: 9px; padding: 5px 10px; min-height: 36px; }
    .filter-row {
      overflow-x: auto; flex-wrap: nowrap;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none; padding-bottom: 2px;
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-btn { font-size: 10px; padding: 6px 12px; flex-shrink: 0; min-height: 36px; }
    .filter-btn.pc-btn { font-size: 9px; padding: 5px 9px; min-height: 36px; }
    /* Hide desktop P/C inline elements on mobile */
    .filter-row .filter-sep { display: none; }
    .filter-row .filter-season { display: none; }
    .filter-row .pc-btn:not([data-filter-val="전체"]) { display: none; }
    /* Mobile P/C season accordion */
    .pc-season-mobile { display: flex; gap: 6px; flex-shrink: 0; }
    .pc-season-toggle {
      background: transparent; border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 11px; font-weight: 400; padding: 6px 14px;
      border-radius: 20px; cursor: pointer; transition: all 0.2s; min-height: 36px;
      letter-spacing: 0.05em; flex-shrink: 0;
    }
    .pc-season-toggle:hover, .pc-season-toggle.active {
      border-color: var(--gold); color: var(--gold);
    }
    .pc-season-toggle.active { background: rgba(201,168,130,0.12); }
    .pc-subtypes-mobile {
      display: none; gap: 6px; padding: 0 12px 6px; flex-wrap: wrap;
    }
    .pc-subtypes-mobile.expanded { display: flex; }
    .pc-subtype-mbtn {
      background: transparent; border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 10px; font-weight: 300; padding: 5px 12px;
      border-radius: 20px; cursor: pointer; transition: all 0.2s; min-height: 36px;
      letter-spacing: 0.05em;
    }
    .pc-subtype-mbtn:hover { border-color: var(--gold); color: var(--gold); }
    .pc-subtype-mbtn.active {
      background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600;
    }
    .rec-badge { font-size: 7px; top: -16px; padding: 2px 6px; }
    .match-line line { stroke-width: 1px !important; }
    .product-item .best-star { width: 10px; height: 10px; font-size: 5px; top: -1px; right: -1px; }
    .starter-badge { font-size: 6px; bottom: -13px; padding: 1px 5px; }
    .panel-best-tag { font-size: 7px; padding: 1px 5px; }
  }


  /* ── ONBOARDING QUIZ MODAL ─────────────────────────────── */
  .quiz-btn {
    background: none; border: 1px solid var(--gold);
    color: var(--gold); font-size: 11px; letter-spacing: 0.5px;
    padding: 5px 14px; border-radius: 20px; cursor: pointer;
    transition: all 0.25s ease; font-family: inherit; white-space: nowrap;
  }
  .quiz-btn:hover { background: var(--gold); color: var(--bg); }

  .quiz-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(10, 9, 8, 0.82); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .quiz-overlay.open { opacity: 1; pointer-events: auto; }

  .quiz-card {
    background: var(--panel-bg, #2A2320); border-radius: 18px;
    padding: 44px 36px 36px; max-width: 420px; width: 90vw;
    position: relative; text-align: center;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .quiz-overlay.open .quiz-card { transform: translateY(0) scale(1); }

  .quiz-close {
    position: absolute; top: 14px; right: 14px;
    background: none; border: none; color: var(--text);
    font-size: 20px; cursor: pointer; opacity: 0.5;
    width: 32px; height: 32px; display: flex;
    align-items: center; justify-content: center;
    transition: opacity 0.2s;
  }
  .quiz-close:hover { opacity: 1; }

  .quiz-logo {
    height: 24px; display: block; margin: 0 auto 12px;
  }
  [data-theme='light'] .quiz-logo { filter: brightness(0) opacity(0.75); }
  .quiz-subtitle {
    font-size: 13px; color: var(--text); opacity: 0.5;
    text-align: center; margin-bottom: 24px; letter-spacing: 0.02em;
  }

  .quiz-title {
    font-size: 17px; font-weight: 600; color: var(--text);
    margin-bottom: 28px; line-height: 1.5;
    white-space: pre-line;
  }

  .quiz-tiles {
    display: flex; gap: 14px;
    justify-content: center; margin-bottom: 20px;
  }

  .quiz-tile {
    flex: 1; max-width: 170px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 22px 16px 18px;
    cursor: pointer; transition: all 0.25s ease;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
  }
  .quiz-tile:hover {
    border-color: var(--gold); background: rgba(201,168,130,0.08);
    transform: translateY(-2px);
  }
  .quiz-tile.selected {
    border-color: var(--gold); background: rgba(201,168,130,0.12);
    box-shadow: 0 0 0 1px var(--gold);
  }

  .quiz-swatches {
    display: flex; gap: 5px; justify-content: center;
  }
  .quiz-swatch {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
  }

  .quiz-tile-label {
    font-size: 14px; font-weight: 600; color: var(--text);
    letter-spacing: 0.3px;
  }
  .quiz-tile-desc {
    font-size: 11px; color: var(--text); opacity: 0.55;
    line-height: 1.5; white-space: pre-line;
  }

  .quiz-browse {
    background: none; border: none; color: var(--text);
    opacity: 0.45; font-size: 12px; cursor: pointer;
    padding: 8px 16px; font-family: inherit;
    transition: opacity 0.2s;
  }
  .quiz-browse:hover { opacity: 0.8; }

  /* Step 2: PC selection */
  .quiz-seasons {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 10px; margin-bottom: 16px;
  }
  .quiz-season-btn {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 12px 8px;
    color: var(--text); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.25s ease; font-family: inherit;
  }
  .quiz-season-btn:hover {
    border-color: var(--gold); background: rgba(201,168,130,0.08);
  }
  .quiz-season-btn.selected {
    border-color: var(--gold); background: rgba(201,168,130,0.12);
    box-shadow: 0 0 0 1px var(--gold);
  }

  .quiz-subtypes {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-bottom: 16px;
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, margin 0.35s ease;
  }
  .quiz-subtypes.expanded {
    max-height: 200px; margin-bottom: 16px;
  }
  .quiz-subtype-btn {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 9px 8px;
    color: var(--text); font-size: 12px; cursor: pointer;
    transition: all 0.2s ease; font-family: inherit;
  }
  .quiz-subtype-btn:hover {
    border-color: var(--gold); background: rgba(201,168,130,0.06);
  }
  .quiz-subtype-btn.selected {
    border-color: var(--gold); background: rgba(201,168,130,0.10);
    box-shadow: 0 0 0 1px var(--gold);
  }

  .quiz-skip {
    background: none; border: none; color: var(--text);
    opacity: 0.4; font-size: 12px; cursor: pointer;
    padding: 8px 16px; font-family: inherit;
    transition: opacity 0.2s;
  }
  .quiz-skip:hover { opacity: 0.7; }
  .quiz-pct-link {
    display: block; text-align: center; margin-top: 8px;
    color: var(--gold); font-size: 12px; text-decoration: none;
    opacity: 0.6; transition: opacity 0.2s;
  }
  .quiz-pct-link:hover { opacity: 1; }

  .quiz-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .quiz-step.hidden {
    opacity: 0; position: absolute; pointer-events: none;
    transform: translateX(-20px);
  }
  .quiz-step.entering {
    animation: quizSlideIn 0.35s ease forwards;
  }
  @keyframes quizSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* Quiz result indicator */
  .quiz-indicator {
    display: none; align-items: center; gap: 8px;
    background: rgba(201,168,130,0.12); border: 1px solid rgba(201,168,130,0.25);
    border-radius: 20px; padding: 4px 12px 4px 14px;
    font-size: 11px; color: var(--gold);
  }
  .quiz-indicator.active { display: inline-flex; }
  .quiz-indicator-x {
    background: none; border: none; color: var(--gold);
    font-size: 14px; cursor: pointer; opacity: 0.6;
    padding: 0 0 0 4px; line-height: 1; font-family: inherit;
    transition: opacity 0.2s;
  }
  .quiz-indicator-x:hover { opacity: 1; }

  /* Light mode overrides */
  [data-theme='light'] .quiz-overlay { background: rgba(240, 235, 227, 0.85); }
  [data-theme='light'] .quiz-card { background: #fff; }
  [data-theme='light'] .quiz-tile {
    background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1);
  }
  [data-theme='light'] .quiz-tile:hover {
    background: rgba(201,168,130,0.1); border-color: var(--gold);
  }
  [data-theme='light'] .quiz-tile.selected {
    background: rgba(201,168,130,0.15); border-color: var(--gold);
  }
  [data-theme='light'] .quiz-season-btn {
    background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1);
  }
  [data-theme='light'] .quiz-season-btn:hover,
  [data-theme='light'] .quiz-season-btn.selected {
    background: rgba(201,168,130,0.1); border-color: var(--gold);
  }
  [data-theme='light'] .quiz-subtype-btn {
    background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08);
  }
  [data-theme='light'] .quiz-subtype-btn:hover,
  [data-theme='light'] .quiz-subtype-btn.selected {
    background: rgba(201,168,130,0.08); border-color: var(--gold);
  }

  /* Responsive: Tablet */
  @media (max-width: 1024px) {
    .quiz-card { padding: 36px 28px 30px; max-width: 380px; }
    .quiz-tile { padding: 18px 14px 16px; }
  }
  /* Responsive: Mobile */
  @media (max-width: 640px) {
    .quiz-card { padding: 32px 20px 26px; max-width: 340px; border-radius: 14px; }
    .quiz-title { font-size: 15px; margin-bottom: 22px; }
    .quiz-tile { padding: 16px 12px 14px; border-radius: 12px; }
    .quiz-tile-label { font-size: 13px; }
    .quiz-tile-desc { font-size: 10px; }
    .quiz-swatch { width: 18px; height: 18px; }
    .quiz-season-btn { font-size: 12px; padding: 10px 6px; }
    .quiz-subtype-btn { font-size: 11px; padding: 7px 6px; }
    .quiz-btn { font-size: 10px; padding: 4px 11px; }
    .quiz-close { min-width: 44px; min-height: 44px; }
  }
