:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-sunken: #f8f9fa;
  --line: rgba(17, 24, 39, 0.08);
  --line-strong: rgba(17, 24, 39, 0.14);
  --ink: #15171c;
  --ink-2: #4b5260;
  --ink-3: #868d99;
  --accent: #2f5bd3;
  --accent-ink: #1f3f9a;
  --accent-soft: #edf1fc;
  --rose: #c95a7b;
  --fresh-ink: #1d7a52;
  --fresh-bg: #e7f4ed;
  --check-ink: #96570a;
  --check-bg: #fbf0dc;
  --stale-ink: #9b3838;
  --stale-bg: #f9e9e9;
  --muted-bg: #eef0f3;
  --strip: #1b1d22;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 16px -8px rgba(16, 24, 40, 0.10);
  --shadow-float: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 24px -10px rgba(16, 24, 40, 0.18);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- top strip + header ---------- */

.strip {
  background: var(--strip);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  text-align: center;
  padding: 7px 16px;
}
.strip strong { color: #fff; font-weight: 600; margin-right: 6px; }

.header {
  position: sticky;
  top: 12px;
  z-index: 20;
  max-width: 1360px;
  margin: 12px auto 0;
  padding: 0 24px;
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 12px 10px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark { font-weight: 800; font-size: 17px; letter-spacing: 0.04em; }
.brand-divider { width: 1px; height: 16px; background: var(--line-strong); }
.brand-name { font-weight: 600; font-size: 14.5px; }
.brand-tag {
  font-size: 11px; font-weight: 600; color: var(--accent-ink);
  background: var(--accent-soft); padding: 2px 8px; border-radius: 999px;
}

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: 12px; margin-left: 8px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--ink-2);
  padding: 7px 14px; border-radius: 9px; font-size: 14px; font-weight: 500;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab:active { transform: scale(0.98); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); font-weight: 600; }
.tab-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.tab-count[data-empty="true"] { background: var(--muted-bg); color: var(--ink-3); }
.header-meta { margin-left: auto; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; padding-right: 8px; }
.header-meta b { color: var(--ink-2); font-weight: 600; }

/* ---------- page ---------- */

.page { max-width: 1360px; margin: 0 auto; padding: 36px 24px 80px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hero h1 { font-size: 30px; line-height: 1.25; letter-spacing: -0.03em; font-weight: 700; margin: 0; }
.hero p { margin: 8px 0 0; color: var(--ink-2); max-width: 62ch; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ---------- search + filters ---------- */

.controls { padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.search {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; height: 54px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search .icon { width: 20px; height: 20px; color: var(--ink-3); }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--ink-3); }
.kbd {
  font-size: 12px; color: var(--ink-3); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 1px 7px; background: var(--surface-sunken);
}
.result-count { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.result-count b { color: var(--ink); }

.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.filter-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; font-weight: 500;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip[aria-pressed="true"] .chip-count { color: rgba(255, 255, 255, 0.8); }
.chip[data-zero="true"] { opacity: 0.45; }
.chip-count { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.chip-row-quick { gap: 8px; }
.chip-row-quick .chip { height: 38px; padding: 0 15px; font-size: 14px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-branding { background: var(--rose); }
.dot-performance { background: var(--accent); }

.select {
  height: 34px; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0 32px 0 13px; background: var(--surface); font-size: 13.5px; color: var(--ink-2);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868d99' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.25s var(--ease); cursor: pointer; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.3s var(--ease); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(14px); }
.spacer { flex: 1; }
.link-button { border: 0; background: none; color: var(--ink-3); font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.link-button:hover { color: var(--ink); background: var(--surface-sunken); }

.popover-wrap { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 15;
  width: min(320px, calc(100vw - 48px)); padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-float);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.popover[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check-item:hover { background: var(--surface-sunken); }
.check-item input { accent-color: var(--accent); margin: 0; }
.check-item .count { margin-left: auto; color: var(--ink-3); font-size: 12px; }

/* ---------- results ---------- */

.browse { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.browse[data-index="true"] { grid-template-columns: 216px minmax(0, 1fr); }
.list-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 10px; }
.list-count { margin-right: auto; font-size: 13.5px; color: var(--ink-2); }
.list-count b { color: var(--ink); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.list { overflow: hidden; }

/* ---------- media name index ---------- */

.media-index {
  position: sticky; top: 96px; max-height: calc(100vh - 112px);
  display: flex; flex-direction: column; padding: 14px 0 6px; overflow: hidden;
}
.index-head { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; font-size: 14px; }
.index-head span { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.index-toggle { display: none; margin-left: auto; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.index-body { display: flex; flex-direction: column; min-height: 0; }
.index-jump { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.index-jump button {
  min-width: 24px; height: 24px; padding: 0 5px; border: 0; border-radius: 6px; background: none;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.index-jump button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.index-list { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 8px; scroll-padding-top: 34px; }
.skip-link {
  position: absolute; left: 12px; top: 8px; z-index: 2; padding: 6px 10px; border: 0; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 12.5px; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.results:focus { outline: none; }
.index-group h3 {
  position: sticky; top: 0; z-index: 1; margin: 0; padding: 8px 8px 4px;
  background: var(--surface); font-size: 12px; font-weight: 700; color: var(--ink-3);
}
.index-group ul { list-style: none; margin: 0; padding: 0; }
.index-group a {
  display: block; padding: 5px 8px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.index-group a:hover { background: var(--surface-sunken); color: var(--ink); }
.index-empty { margin: 0; padding: 4px 16px 10px; font-size: 13px; color: var(--ink-3); }
.row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1.25fr) minmax(0, 1fr) 132px 28px;
  align-items: center; gap: 20px;
  width: 100%; padding: 14px 18px; text-align: left;
  border: 0; border-top: 1px solid var(--line); background: transparent;
  transition: background 0.2s var(--ease);
  animation: rise 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-sunken); }
.row:hover .row-arrow { transform: translateX(3px); color: var(--ink); }
.row-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-title h3 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-summary { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-products { display: flex; flex-wrap: wrap; gap: 6px; }
.row-side { display: grid; justify-items: end; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.row-arrow { color: var(--ink-3); transition: transform 0.25s var(--ease), color 0.2s; }

.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: var(--muted-bg);
  border: 1px solid var(--line);
}
.thumb.is-loaded, .thumb.is-placeholder { background: var(--surface-sunken); }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s var(--ease); }
.thumb.is-loaded img { opacity: 1; }
.thumb-badge {
  position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 600;
  color: #fff; background: rgba(17, 24, 39, 0.62); padding: 1px 7px; border-radius: 999px;
}
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 11.5px; line-height: 1.35; }
.placeholder b { display: block; color: var(--ink-2); font-size: 22px; font-weight: 700; margin-bottom: 2px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--muted-bg); color: var(--ink-2);
}
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 500; }
.period { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.period.is-fresh { background: var(--fresh-bg); color: var(--fresh-ink); }
.period.is-check { background: var(--check-bg); color: var(--check-ink); }
.period.is-stale { background: var(--stale-bg); color: var(--stale-ink); }
.period.is-unknown { background: var(--muted-bg); color: var(--ink-3); }
.period small { font-weight: 600; margin-left: 4px; opacity: 0.85; font-size: 11px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: rise 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.card-open { display: flex; flex-direction: column; flex: 1; border: 0; background: transparent; padding: 0; text-align: left; }
.card .thumb { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.card-body { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card-media { font-size: 12.5px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.card-price { font-size: 14.5px; font-weight: 700; color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.objective { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.compare-toggle {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.compare-toggle:active { transform: scale(0.96); }
.compare-toggle .icon { width: 15px; height: 15px; }
.compare-toggle[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.empty { padding: 64px 24px; text-align: center; color: var(--ink-2); }
.empty h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.empty p { margin: 0 0 18px; }

.button {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), border-color 0.2s var(--ease);
}
.button:hover { border-color: var(--ink-3); }
.button:active { transform: scale(0.98); }
.button-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-primary:hover { background: #2a2e36; }
.button .icon { width: 16px; height: 16px; }
.button-icon-wrap { width: 24px; height: 24px; margin-right: -8px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); transition: transform 0.25s var(--ease); }
.button:hover .button-icon-wrap { transform: translate(2px, -1px); }
.button:not(.button-primary) .button-icon-wrap { background: var(--surface-sunken); }

/* ---------- drawer ---------- */

.scrim {
  position: fixed; inset: 0; z-index: 30; background: rgba(17, 24, 39, 0.32);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.scrim[data-open="true"] { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31;
  width: min(760px, 94vw); background: var(--bg);
  box-shadow: -8px 0 24px -12px rgba(16, 24, 40, 0.22);
  transform: translateX(104%); transition: transform 0.5s var(--ease);
  display: flex; flex-direction: column;
}
.drawer[data-open="true"] { transform: none; }
.drawer-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.drawer-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.icon-button:hover { color: var(--ink); border-color: var(--line-strong); }
.drawer-close { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 22px 48px; display: grid; gap: 16px; align-content: start; overflow-wrap: anywhere; }
.detail-head { display: grid; gap: 10px; }
.detail-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; line-height: 1.25; }
.detail-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13.5px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.section { padding: 18px 20px; }
.section h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.section h3 .count { color: var(--ink-3); font-weight: 600; }
.section p { margin: 0; color: var(--ink); }
.facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.facts dt { color: var(--ink-3); font-weight: 600; font-size: 13px; padding-top: 2px; }
.facts dd { margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list .tag { height: auto; min-height: 24px; padding-block: 3px; white-space: normal; line-height: 1.3; border-radius: 12px; }
.bullets { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.bullets li::marker { color: var(--ink-3); }
.price-block { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--ink); color: #fff; }
.price-block .label { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.price-block .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.price-block .note { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.product-rows { display: grid; }
.product-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto 20px; align-items: center; gap: 12px;
  padding: 11px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left;
}
.product-row:first-child { border-top: 0; }
.product-row:hover { background: var(--surface-sunken); }
.product-row strong { display: block; font-size: 14.5px; }
.product-row span.sub { font-size: 12.5px; color: var(--ink-3); }
.product-row .price {
  max-width: 260px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-align: right; word-break: keep-all;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.page-button { border: 0; padding: 0; background: none; display: grid; gap: 4px; text-align: left; font-size: 12px; color: var(--ink-3); }
.page-button .thumb { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.page-button:hover .thumb { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.versions { display: grid; gap: 0; }
.version { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.version:first-child { border-top: 0; }
.version a { color: var(--accent-ink); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.source-note { font-size: 12.5px; color: var(--ink-3); }

/* ---------- compare ---------- */

.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.compare-table th, .compare-table td { padding: 14px 16px; vertical-align: top; text-align: left; border-top: 1px solid var(--line); font-size: 14px; }
.compare-table tr:first-child th, .compare-table tr:first-child td { border-top: 0; }
.compare-table th { width: 128px; white-space: nowrap; color: var(--ink-3); font-weight: 600; font-size: 13px; background: var(--surface-sunken); }
.compare-table td { min-width: 200px; }
.compare-head { display: grid; gap: 8px; }
.compare-head .thumb { max-width: 220px; }
.compare-head h3 { margin: 0; font-size: 16px; }
.compare-head .remove { justify-self: start; }
.best { display: inline-flex; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--fresh-ink); background: var(--fresh-bg); padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 40; background: rgba(12, 14, 18, 0.9);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox[data-open="true"] { opacity: 1; pointer-events: auto; }
.lightbox-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: rgba(255, 255, 255, 0.85); font-size: 14px; }
.lightbox-head .icon-button { margin-left: auto; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox-stage { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; padding: 0 12px; min-height: 0; }
.lightbox-stage img { max-height: calc(100dvh - 140px); margin: 0 auto; border-radius: 10px; }
.lightbox-nav { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: #fff; display: grid; place-items: center; justify-self: center; }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox-foot { text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 13px; padding: 12px; }

.footer { margin-top: 40px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 1100px) {
  .row { grid-template-columns: 112px minmax(0, 1fr) 120px 20px; }
  .row-products { display: none; }
  .header-meta { display: none; }
  .browse[data-index="true"] { grid-template-columns: minmax(0, 1fr); }
  .media-index { position: relative; top: auto; max-height: none; padding-bottom: 0; }
  .index-toggle { display: inline-flex; }
  .media-index[data-open="false"] .index-body { display: none; }
  .index-list { max-height: 50vh; }
}
@media (max-width: 760px) {
  .header { padding: 0 12px; }
  .header-bar { flex-wrap: wrap; gap: 10px; }
  .tabs { margin-left: 0; width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .page { padding: 24px 16px 64px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 24px; }
  .row { grid-template-columns: 96px minmax(0, 1fr); }
  .row-side, .row-arrow { display: none; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 8px; }
  .product-row { grid-template-columns: auto minmax(0, 1fr) 20px; grid-template-areas: "name name arrow" "goal price arrow"; row-gap: 6px; }
  .product-row > div { grid-area: name; }
  .product-row .objective { grid-area: goal; }
  .product-row .price { grid-area: price; max-width: none; text-align: left; }
  .product-row > .icon { grid-area: arrow; }
}

/* ---------- late additions ---------- */

.drawer-crumb-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drawer-crumb .crumb-link { padding: 4px 6px; border-radius: 6px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.drawer-crumb .crumb-link:hover { background: var(--surface-sunken); }
.drawer-crumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-crumb .icon { width: 14px; height: 14px; }
.section h3 .spacer { flex: 1; }
.results[data-animate="false"] .row,
.results[data-animate="false"] .card { animation: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow-float);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }
.card-media .period { margin-left: auto; }
.product-row { text-decoration: none; color: inherit; }
.row { text-decoration: none; color: inherit; }
.card-open { color: inherit; text-decoration: none; }
.compare-head a { color: inherit; text-decoration: none; }
.compare-head a:hover { text-decoration: underline; }
.dot-fresh { background: var(--fresh-ink); }
.dot-check { background: var(--check-ink); }
.dot-stale { background: var(--stale-ink); }
.lightbox-stage .placeholder { color: rgba(255, 255, 255, 0.7); font-size: 15px; }
