/* ==========================================================================
   Pharos — 등대 테마 (다크 기본 / 라이트 지원)
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #050a12;
  --bg-2: #07101c;
  --panel: rgba(13, 25, 42, 0.72);
  --panel-solid: #0a1727;
  --card: #0b1726;
  --card-2: #0e1e33;
  --line: rgba(136, 178, 222, 0.14);
  --line-strong: rgba(136, 178, 222, 0.3);
  --ink: #e9f1fb;
  --ink-2: #bacbde;
  --muted: #8299b1;
  --beam: #f4b75e;
  --beam-2: #ffe0ab;
  --beam-soft: rgba(244, 183, 94, 0.13);
  --on-accent: #1b1206;
  --sea: #58c9b5;
  --sea-soft: rgba(88, 201, 181, 0.14);
  --green: #4bd39a;
  --green-soft: rgba(75, 211, 154, 0.13);
  --yellow: #f3c65a;
  --yellow-soft: rgba(243, 198, 90, 0.13);
  --red: #f4796a;
  --red-soft: rgba(244, 121, 106, 0.13);
  --unknown: #9aa8b8;
  --unknown-soft: rgba(154, 168, 184, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --sans: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "D2Coding", Consolas, monospace;

  /* ---------------------------------------------------------------- 모션 토큰
     v3.67 — Emil Kowalski Skills 의 커브·duration 표를 그대로 옮겼다. 이 사이트에서
     "브라우저 기본 ease"를 쓰던 자리는 전부 아래 세 커브 중 하나로 바뀐다.
       --ease-out     진입·이탈(UI 표준). 대부분의 호버·색·투명도 변화
       --ease-in-out  화면 위를 미끄러지는 이동·모프(폭·바 위치)
       --ease-drawer  iOS 식 드로어·모달 패널
     duration 은 "나가는 쪽이 더 빠르다"(hover-in 150 / hover-out 120)를 지키고,
     누름 피드백은 90ms 로 짧게, UI 전반은 300ms 를 넘기지 않는다(모달 240ms). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 90ms;
  --dur-hover-in: 150ms;
  --dur-hover-out: 120ms;
  --dur-panel: 200ms;
  --dur-modal: 240ms;
  --dur-slide: 240ms;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3efe5;
  --bg-2: #efe9db;
  --panel: rgba(255, 253, 248, 0.9);
  --panel-solid: #fffdf8;
  --card: #fffdf8;
  --card-2: #faf5ea;
  --line: rgba(30, 45, 60, 0.15);
  --line-strong: rgba(30, 45, 60, 0.32);
  --ink: #14202c;
  --ink-2: #36485a;
  --muted: #5c6e81;
  --beam: #8f5a0d;
  --beam-2: #6f440a;
  --beam-soft: rgba(143, 90, 13, 0.12);
  --on-accent: #fff8ea;
  --sea: #0a6f63;
  --sea-soft: rgba(10, 111, 99, 0.12);
  --green: #0f6a48;
  --green-soft: rgba(15, 106, 72, 0.12);
  --yellow: #7d5804;
  --yellow-soft: rgba(125, 88, 4, 0.13);
  --red: #a8392a;
  --red-soft: rgba(168, 57, 42, 0.11);
  --unknown: #5f6e7d;
  --unknown-soft: rgba(95, 110, 125, 0.1);
  --shadow: 0 30px 70px rgba(74, 58, 28, 0.18);
  --shadow-soft: 0 10px 26px rgba(74, 58, 28, 0.1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  word-break: keep-all;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 12% -12%, var(--beam-soft), transparent 62%),
    radial-gradient(900px 700px at 100% 0%, var(--sea-soft), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* 바다의 격자 + 등대 빛줄기 */
.sea {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.sea::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.55), transparent 72%);
  opacity: 0.5;
}
.beam-sweep {
  position: absolute;
  top: -380px;
  right: -160px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, var(--beam-soft) 24deg, transparent 52deg);
  filter: blur(2px);
  opacity: 0.75;
  animation: sweep 26s linear infinite;
}
@keyframes sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .beam-sweep { animation: none; }
}

a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--unknown-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--beam);
  color: var(--on-accent);
  font-weight: 700;
  transition: top var(--dur-panel) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ 아이콘
   v3.67 — 흩어져 있던 유니코드 글리프(◐ ☆ ★ ? ⚙ ⌕ ✕)를 Lucide 인라인 SVG 한 세트로
   통일했다(js/icons.js). 크기는 라벨 글자 크기를 따라가는 1em 이 기본이고, 아이콘만 있는
   버튼은 아래에서 px 로 고정한다. stroke-width 는 등대 탭과 같은 1.9 — 굵기가 섞이지 않는다. */
.ico {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.14em;
  stroke-width: 1.9;
  pointer-events: none;
}
/* 아이콘만 들어가는 아이콘 버튼 — 글자 크기(15px)보다 한 단계 큰 17px. */
.icon-btn .ico { width: 17px; height: 17px; }
.icon-btn--sm .ico { width: 15px; height: 15px; }
/* 글자와 나란히 서는 아이콘 — 글자 높이에 맞춘 15px. */
.ghost-btn .ico, .text-btn .ico { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(16px, 3vw, 40px) 14px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.mark {
  width: 46px;
  height: 46px;
  color: var(--beam);
  flex: none;
  filter: drop-shadow(0 6px 18px var(--beam-soft));
}
/* v22 — 파로스 룬(사파이어 나침반) 브랜드 마크 */
.mark--rune {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 9px rgba(96, 150, 235, 0.32)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}
.mark--rune img { display: block; width: 100%; height: 100%; }
html[data-theme="light"] .mark--rune { filter: drop-shadow(0 2px 6px rgba(30, 45, 60, 0.28)); }
.brand-text { display: grid; gap: 1px; }
.wordmark {
  margin: 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.wordmark-sub {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--beam);
  font-weight: 600;
}
.tagline { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }
.topbar-side { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; justify-content: flex-end; }
.dataset-chip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--panel);
  white-space: nowrap;
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: border-color var(--dur-hover-out) var(--ease-out), color var(--dur-hover-out) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.ghost-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.ghost-btn:active { transform: translateY(1px); }
.ghost-ico { color: var(--beam); display: inline-flex; align-items: center; }

/* 언어 전환 KO | EN — 헤더 오른쪽, 테마 토글 옆의 세그먼트 토글.
   390px 에서도 한 줄에 들어가고 터치 영역은 34px 이상을 유지한다. */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  flex: none;
}
.lang-toggle button {
  font: inherit;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  min-width: 34px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out);
}
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button[aria-pressed="true"] { color: #16120a; background: var(--beam); }
.lang-toggle button:focus-visible { outline: 2px solid var(--beam); outline-offset: 1px; }
.wordmark-sub:empty { display: none; }

/* ------------------------------------------------------------------ app */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  padding: 6px clamp(16px, 3vw, 40px) 56px;
  align-items: start;
}

/* -------------------------------------------------------------- controls */
.controls {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.controls::-webkit-scrollbar { width: 8px; }
.controls::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 15px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.panel h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
}
.panel-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.hint { margin: 6px 0 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.hint strong { color: var(--ink-2); font-weight: 600; }
.mini-label code { text-transform: none; letter-spacing: 0; }
.mini-label {
  margin: 14px 0 6px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 가중치 */
.weights { display: grid; gap: 12px; }
.weight {
  display: grid;
  gap: 6px;
}
.weight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.weight-name { color: var(--ink-2); font-weight: 600; }
.weight-name small { color: var(--muted); font-weight: 400; font-size: 10.5px; margin-left: 5px; letter-spacing: 0.02em; }
.weight-pct {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--beam);
  font-variant-numeric: tabular-nums;
}
.weight input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.weight input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--beam) 0%, var(--beam) var(--fill, 40%), var(--line-strong) var(--fill, 40%), var(--line-strong) 100%);
}
.weight input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--panel-solid);
  border: 2.5px solid var(--beam);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.weight input[type="range"]:focus-visible { outline: none; }
.weight input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
}
.weight input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: var(--line-strong);
}
.weight input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--panel-solid);
  border: 2.5px solid var(--beam);
}
.weight-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

.weight-bar {
  display: flex;
  height: 6px;
  margin-top: 12px;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--unknown-soft);
}
.weight-bar span { display: block; height: 100%; transition: flex-basis var(--dur-slide) var(--ease-in-out); }
.weight-bar .seg-0 { background: var(--beam); }
.weight-bar .seg-1 { background: var(--sea); }
.weight-bar .seg-2 { background: var(--ink-2); }

.preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  font: inherit;
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background var(--dur-hover-out) var(--ease-out), border-color var(--dur-hover-out) var(--ease-out), color var(--dur-hover-out) var(--ease-out);
}
.preset:hover { border-color: var(--beam); color: var(--ink); }
.preset[aria-pressed="true"] {
  background: var(--beam-soft);
  border-color: var(--beam);
  color: var(--beam);
  font-weight: 700;
}

/* 필터 */
.filter-list { display: grid; gap: 1px; margin-bottom: 10px; }
.filter-extra { margin-bottom: 10px; }
.filter-extra > summary {
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px dashed var(--line);
}
.filter-extra > summary::-webkit-details-marker { display: none; }
.filter-extra > summary::before { content: "＋ "; color: var(--beam); }
.filter-extra[open] > summary::before { content: "－ "; }
.filter-extra > summary:hover { color: var(--beam); }
.filter {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-hover-out) var(--ease-out);
}
.filter:hover { background: var(--card-2); }
.filter input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  flex: none;
  position: relative;
  transition: background var(--dur-hover-in) var(--ease-out), border-color var(--dur-hover-in) var(--ease-out);
}
.filter input:checked { background: var(--beam); border-color: var(--beam); }
.filter input:checked::after {
  content: "✓";
  position: absolute;
  inset: -3px 0 0 1px;
  font-size: 12px;
  font-weight: 800;
  color: #1b1206;
  line-height: 16px;
}
.filter input:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.filter-text { display: grid; gap: 1px; }
.filter-name { font-size: 12.8px; color: var(--ink-2); line-height: 1.35; }
.filter input:checked ~ .filter-text .filter-name { color: var(--ink); }
.filter-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.01em; }
.filter.is-default .filter-meta { color: var(--beam); opacity: 0.85; }
.text-btn {
  font: inherit;
  font-size: 11.5px;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  padding: 6px 10px;
  cursor: pointer;
  width: 100%;
}
.text-btn:hover { color: var(--beam); border-color: var(--beam); }

/* 스위치 */
.switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  flex: none;
  width: 40px;
  height: 22px;
  margin-top: 2px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  position: relative;
  transition: background var(--dur-hover-out) var(--ease-out), border-color var(--dur-hover-out) var(--ease-out);
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform var(--dur-panel) var(--ease-out), background var(--dur-hover-out) var(--ease-out);
}
.switch input:checked + .switch-track { background: var(--beam-soft); border-color: var(--beam); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); background: var(--beam); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--sea); outline-offset: 2px; }
.switch-text { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* 목록 컨트롤 */
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-2);
  margin-bottom: 10px;
}
.segmented button {
  flex: 1;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 6px 4px;
  cursor: pointer;
  transition: background var(--dur-hover-out) var(--ease-out), color var(--dur-hover-out) var(--ease-out), box-shadow var(--dur-hover-out) var(--ease-out);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] {
  background: var(--panel-solid);
  color: var(--beam);
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}
.search { position: relative; display: block; margin-bottom: 10px; }
.search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px 8px 30px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--beam); }

.select-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.select-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.select-row select {
  flex: 1;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
  cursor: pointer;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.8px;
  color: var(--muted);
  cursor: pointer;
}
.check-row input { accent-color: var(--beam); width: 14px; height: 14px; }

.controls-foot {
  margin: 0;
  padding: 2px 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* -------------------------------------------------------------- results */
.results { min-width: 0; display: grid; gap: 18px; }

.boot-note {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--beam);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--panel);
}
.boot-note code { white-space: nowrap; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.toolbar .segmented { margin: 0; width: auto; flex: 0 0 auto; }
.toolbar .segmented button { flex: initial; padding: 5px 11px; }
.toolbar .arena-bar {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}
.arena-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--sea);
  text-transform: uppercase;
  white-space: nowrap;
}
.toolbar .arena-bar .segmented {
  flex: 1 1 auto;
  width: auto;
  margin: 0;
  flex-wrap: wrap;
  padding: 2px;
  background: transparent;
  border-color: transparent;
}
.toolbar .arena-bar .segmented button { flex: initial; padding: 4px 10px; font-size: 11.5px; }
.arena-help {
  flex: 0 1 320px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toolbar .search { margin: 0; flex: 1 1 200px; min-width: 150px; }
.toolbar .search input { padding-top: 6px; padding-bottom: 6px; }
.toolbar .select-row { margin: 0; flex: 0 0 auto; }
.toolbar .select-row select { flex: initial; padding: 5px 8px; }
.toolbar .check-row { flex: 0 0 auto; white-space: nowrap; }
.toolbar > .panel-hint { margin-left: auto; }

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.arena-context {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--sea);
  border-radius: 12px;
  background: var(--panel);
  font-size: 12px;
  color: var(--ink-2);
}
.arena-context-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sea);
}
.arena-context strong { font-size: 13px; color: var(--ink); }
.arena-context-desc { flex: 1 1 300px; color: var(--muted); line-height: 1.5; }
.arena-context-count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--beam); white-space: nowrap; }
.arena-notes { display: grid; gap: 6px; margin: 12px 0 4px; }
.arena-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
}
.arena-note p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.arena-note .chip { flex: 0 0 auto; }
.stat {
  background: var(--panel);
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  display: grid;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--line);
}
.stat--ok::after { background: var(--green); }
.stat--warn::after { background: var(--yellow); }
.stat--bad::after { background: var(--red); }
.stat--avg::after { background: var(--beam); }
.stat-label { font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.stat-value { font-family: var(--mono); font-size: 24px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat--ok .stat-value { color: var(--green); }
.stat--warn .stat-value { color: var(--yellow); }
.stat--bad .stat-value { color: var(--red); }
.stat--avg .stat-value { color: var(--beam); }
.stat-sub { font-size: 10.5px; color: var(--muted); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-hint { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.section-sub { margin: -4px 0 12px; }

.verdict-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.verdict-dot--bad { background: var(--red); box-shadow: 0 0 10px var(--red); }
.verdict-dot--ok { background: var(--green); }
.verdict-dot--warn { background: var(--yellow); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  align-items: start;
}

/* ----------------------------------------------------------------- card */
.card {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 10px;
  padding: 16px 16px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(158deg, var(--card-2) 0%, var(--card) 62%);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color var(--dur-hover-out) var(--ease-out), box-shadow var(--dur-hover-out) var(--ease-out);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--beam), transparent);
  opacity: 0;
  transition: opacity var(--dur-hover-out) var(--ease-out);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
/* v3.67 — 호버된 카드는 제자리에 두고 안쪽 포스터만 2px 든다. 카드 자신을 띄우면
   가장자리에서 포인터가 미끄러지고, 큰 카드에서는 이웃과 겹친다(Emil Kowalski 규칙). */
.card:hover .item-icon,
.card:focus-visible .item-icon {
  transform: translateY(-2px);
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.card--ok { border-left: 3px solid var(--green); }
.card--warn { border-left: 3px solid var(--yellow); }
.card--bad { border-left: 3px solid var(--red); }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-titles { min-width: 0; display: grid; gap: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--unknown-soft);
  white-space: nowrap;
}
.chip--cat { color: var(--beam); border-color: var(--beam); background: var(--beam-soft); font-weight: 700; }
.chip--arena { color: var(--sea); border-color: var(--sea); background: var(--sea-soft); }
.chip--tier { color: var(--ink-2); background: var(--card-2); }
.chip--path { color: var(--sea); border-color: var(--sea); background: var(--sea-soft); }
.chip--grade { font-family: var(--mono); }
.chip--A { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.chip--B { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.chip--C { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.chip--muted { color: var(--unknown); }
.chip--maintenance { font-weight: 700; }
.chip--optional { color: var(--sea); border-color: var(--sea); background: var(--sea-soft); font-weight: 700; }
.chip--core { color: var(--red); border-color: var(--red); background: var(--red-soft); font-weight: 700; }
.chip--maintenance--ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.chip--maintenance--warn { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.chip--maintenance--bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
/* 발행 단계 배지 — 공개 API 대량 적재(auto_fact) 항목 표시. 검증 완료 항목에는 붙지 않는다. */
.chip--auto {
  color: var(--ink-2);
  border-color: var(--line-strong);
  border-style: dashed;
  background: var(--card-2);
  font-family: var(--mono);
  font-size: 9.8px;
  letter-spacing: 0.02em;
}
.card-name-text > .chip--auto { margin-top: 3px; justify-self: start; align-self: start; width: max-content; }

.card h3 {
  margin: 0;
  word-break: keep-all;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.card-dev { margin: 0; font-size: 11.5px; color: var(--muted); }

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid;
  white-space: nowrap;
  flex: none;
}
.verdict--ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.verdict--warn { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.verdict--bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.verdict .v-emoji { font-size: 10px; }

.card-mid { display: flex; align-items: center; gap: 16px; }
.score {
  position: relative;
  width: 74px;
  height: 74px;
  flex: none;
  display: grid;
  place-items: center;
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 2.6; }
.ring-value {
  fill: none;
  stroke: var(--beam);
  stroke-width: 2.6;
  stroke-linecap: round;
  transition: stroke-dasharray var(--dur-modal) var(--ease-out);
}
.card--ok .ring-value { stroke: var(--green); }
.card--warn .ring-value { stroke: var(--yellow); }
.card--bad .ring-value { stroke: var(--red); }
.score-inner { display: grid; place-items: center; text-align: center; line-height: 1.05; }
.score-num { font-family: var(--mono); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-cap { font-size: 8.5px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }

.lights { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; flex: 1; min-width: 0; }
.light {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.light-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--unknown);
  box-shadow: 0 0 8px currentColor;
}
.light--green .light-dot { background: var(--green); color: var(--green); }
.light--yellow .light-dot { background: var(--yellow); color: var(--yellow); }
.light--red .light-dot { background: var(--red); color: var(--red); }
.light-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.light--profile .light-label::after {
  content: "P1";
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--beam);
  border: 1px solid var(--beam);
  border-radius: 4px;
  padding: 0 3px;
  margin-left: 5px;
}
.light-score { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.one-liner {
  margin: 0;
  word-break: keep-all;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tier-badges { display: flex; flex-wrap: wrap; gap: 5px; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
  min-height: 30px;
}
.reason { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.reason-chip {
  font-size: 10.5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink-2);
  background: var(--unknown-soft);
}
.reason-chip--bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.reason-chip--warn { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.reason-chip--ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.reason-chip--sea { color: var(--sea); border-color: var(--sea); background: var(--sea-soft); }
.card-more { color: var(--beam); white-space: nowrap; font-weight: 600; }

/* 거름 카드 */
.grid--avoided .card {
  opacity: 0.62;
  filter: saturate(0.72);
  box-shadow: none;
}
.grid--avoided .card:hover { opacity: 0.95; filter: none; }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.page-foot {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.page-foot p { margin: 0; }
.foot-note { max-width: 70ch; line-height: 1.6; }

/* ---------------------------------------------------------------- modal
   v3.67 — 열고 닫을 때마다 반복되는 전환이라 fade·rise 키프레임 대신 transition 으로 바꿨다.
   닫힘(hidden)을 display:none 이 아니라 visibility:hidden 으로 두었다 — backdrop 은 inset:0 이라
   레이아웃에 영향이 없고, 나가는 쪽도 같은 시간만큼 사라진다. hidden 순간 포인터는 통과시킨다. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 34px);
  background: rgba(3, 7, 13, 0.72);
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--dur-panel) var(--ease-out),
    visibility 0s;
}
.modal-backdrop[hidden] {
  display: grid;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--dur-panel) var(--ease-out),
    visibility 0s var(--dur-panel);
}
html[data-theme="light"] .modal-backdrop { background: rgba(48, 42, 30, 0.4); }

.modal {
  width: min(980px, 100%);
  max-height: min(92vh, 1000px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    opacity var(--dur-modal) var(--ease-out),
    transform var(--dur-modal) var(--ease-drawer);
}
.modal-backdrop[hidden] .modal {
  opacity: 0;
  transform: translateY(10px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(600px 200px at 0% 0%, var(--beam-soft), transparent 70%),
    var(--panel-solid);
}
.modal-titles { display: grid; gap: 5px; min-width: 0; }
.modal-titles h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.025em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.modal-dev { margin: 0; font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  font: inherit;
  font-size: 15px;
  line-height: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--beam); color: var(--beam); }

.modal-body {
  overflow-y: auto;
  padding: 20px 22px 28px;
  display: grid;
  /* v3.61 — 그리드 한 칸이 내용의 최대 폭까지 늘어나 모바일에서 섹션이 화면 밖으로 나갔다.
     칸을 컨테이너 폭에 묶어 두고, 넘치는 것은 각 요소 안에서 처리한다. */
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  scrollbar-width: thin;
}
.modal-body::-webkit-scrollbar { width: 9px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.m-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.m-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.m-sec-head h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--beam);
  font-weight: 700;
}
.m-sec-head .sec-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 4px;
}
.m-sec-note { margin: -4px 0 0; font-size: 11.5px; color: var(--muted); }
/* 방법론 맨 위 — 이 화면이 따르는 기준·스키마 버전 한 줄(흩어진 버전 표기를 대신한다). */
.method-version {
  margin: 0 0 4px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.method-version b { color: var(--ink); }
/* 미디어 작품성 축 — 다른 섹션과 구분되게 은은한 왼쪽 선만 둔다. */
.m-sec--media { border-left: 2px solid var(--beam); padding-left: 12px; }

.verdict-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--card-2), var(--card));
}
.verdict-hero--ok { border-color: var(--green); }
.verdict-hero--warn { border-color: var(--yellow); }
.verdict-hero--bad { border-color: var(--red); }
.hero-score { display: grid; justify-items: center; gap: 4px; }
.hero-score .score { width: 94px; height: 94px; }
.hero-score .score-num { font-size: 26px; }
.hero-verdict { font-size: 12px; font-weight: 700; }
.hero-verdict--ok { color: var(--green); }
.hero-verdict--warn { color: var(--yellow); }
.hero-verdict--bad { color: var(--red); }
.hero-body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.hero-oneliner { margin: 0; word-break: keep-all; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.hero-signals { display: flex; flex-wrap: wrap; gap: 6px; }
.sig-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--ink-2);
  background: var(--unknown-soft);
}
.sig-pill--green { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.sig-pill--yellow { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.sig-pill--red { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.sig-pill b { font-family: var(--mono); font-weight: 600; }

.rule-line {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--unknown-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  padding: 7px 10px;
  line-height: 1.55;
}
.rule-line b { color: var(--beam); }

.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.list li {
  position: relative;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--beam);
}
.list--bad li::before { background: var(--red); }
.list--ok li::before { background: var(--green); }
.list--muted li::before { background: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 560px;
}
table.data th, table.data td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data thead th {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--card-2);
  white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--card-2); }
table.data td { word-break: keep-all; }
table.data.tier-table th:nth-child(1) { width: 190px; }
table.data.tier-table th:nth-child(2) { width: 150px; }
table.data.tier-table th:nth-child(3) { width: 96px; }
table.data.tier-table th:nth-child(4) { width: 64px; }
table.data.tier-table th:nth-child(5) { width: 170px; }
table.data.flag-table th:nth-child(1) { width: 176px; }
table.data.flag-table th:nth-child(2) { width: 150px; }
table.data.flag-table th:nth-child(3) { width: 64px; }
table.data.flag-table th:nth-child(4) { width: 52px; }
table.data.flag-table th:nth-child(5) { width: 76px; }
table.data.flag-table td:nth-child(3),
table.data.flag-table td:nth-child(4),
table.data.flag-table td:nth-child(5) { white-space: nowrap; }
table.data td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.tier-name { font-weight: 700; color: var(--ink); }
.table-note { font-size: 10.5px; color: var(--muted); margin: 6px 0 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 1px 7px;
  color: var(--muted);
  background: var(--unknown-soft);
  white-space: nowrap;
}
.pill--ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.pill--warn { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.pill--bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.pill--beam { color: var(--beam); border-color: var(--beam); background: var(--beam-soft); }
.pill--sea { color: var(--sea); border-color: var(--sea); background: var(--sea-soft); }

.axis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; align-items: start; }
.axis-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  background: var(--card-2);
  display: grid;
  gap: 6px;
  align-content: start;
}
.axis-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.axis-card h4 { margin: 0; font-size: 12.5px; letter-spacing: 0.01em; }
.axis-card h4 small { color: var(--muted); font-weight: 400; font-size: 10px; margin-left: 4px; }
.axis-score { font-family: var(--mono); font-size: 17px; font-weight: 700; }
.axis-score--green { color: var(--green); }
.axis-score--yellow { color: var(--yellow); }
.axis-score--red { color: var(--red); }
.axis-score--unknown { color: var(--unknown); }
.axis-summary { margin: 0; font-size: 11.8px; line-height: 1.6; color: var(--ink-2); }
.axis-meta { display: flex; flex-wrap: wrap; gap: 5px; }

.review-row {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}
.review-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.review-top h4 { margin: 0; font-size: 12.5px; }
.review-bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 46px 1fr 92px; align-items: center; gap: 8px; font-size: 11px; }
.bar-label { color: var(--muted); font-size: 10.5px; }
.bar-track { display: block; height: 7px; border-radius: 99px; background: var(--unknown-soft); overflow: hidden; border: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; border-radius: 99px; transition: width var(--dur-slide) var(--ease-out); }
.bar-fill--cum { background: var(--sea); }
.bar-fill--recent { background: var(--beam); }
.bar-value { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.review-gap { font-size: 11px; color: var(--muted); }
.review-gap b { font-family: var(--mono); }
.review-gap--bad b { color: var(--red); }
.review-gap--warn b { color: var(--yellow); }
.review-gap--ok b { color: var(--green); }

.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.money-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  background: var(--card-2);
  display: grid;
  gap: 5px;
  align-content: start;
}
.money-card h4 { margin: 0; font-size: 11px; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.money-value { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.money-note { margin: 0; font-size: 11.3px; line-height: 1.55; color: var(--muted); }
.money-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.kv { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 12px; font-size: 12px; }
.kv dt { color: var(--muted); font-size: 11.5px; }
.kv dd { margin: 0; color: var(--ink-2); }

.sources { display: grid; gap: 8px; }
.source {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card-2);
}
.source-grade {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid;
}
.source-grade--A { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.source-grade--B { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.source-grade--C { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.source-grade--unknown { color: var(--unknown); border-color: var(--line-strong); background: var(--unknown-soft); }
.source-title { font-size: 12.5px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.source-note { font-size: 11px; color: var(--muted); line-height: 1.5; }
.source-meta { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.source-link { font-size: 11.5px; color: var(--sea); white-space: nowrap; }

.flag-table { font-size: 11.8px; }
.flag-table td.flag-name { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.flag-value { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.flag-value--yes { color: var(--red); }
.flag-value--no { color: var(--green); }
.flag-value--unknown { color: var(--unknown); }
.flag-note { color: var(--muted); font-size: 11px; line-height: 1.5; }

.callout {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--beam);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11.8px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--beam-soft);
}
.callout--bad { border-left-color: var(--red); background: var(--red-soft); }
.callout--warn { border-left-color: var(--yellow); background: var(--yellow-soft); }
.callout--auto {
  margin-bottom: 14px;
  border-left-color: var(--line-strong);
  border-style: dashed;
  background: var(--card-2);
  font-size: 11.4px;
}
.callout b { color: var(--ink); }

.calc { display: grid; gap: 8px; }
.calc-line {
  display: grid;
  grid-template-columns: 130px 1fr 78px;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
}
.calc-line .calc-label { color: var(--muted); }
.calc-bar { height: 8px; border-radius: 99px; background: var(--unknown-soft); border: 1px solid var(--line); overflow: hidden; }
.calc-bar span { display: block; height: 100%; background: var(--beam); }
.calc-val { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.calc-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.calc-total b { color: var(--beam); }

.rules { display: grid; gap: 3px; padding: 0; margin: 0; list-style: none; counter-reset: rule; }
.rules li {
  counter-increment: rule;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  padding: 4px 8px 4px 26px;
  position: relative;
  border-radius: 7px;
}
.rules li::before {
  content: counter(rule);
  position: absolute;
  left: 7px;
  top: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.rules li.is-active {
  color: var(--ink);
  background: var(--beam-soft);
  border: 1px solid var(--beam);
}
.rules li.is-active::before { color: var(--beam); font-weight: 700; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }

.muted { color: var(--muted); }
.noscript {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--red-soft);
  border: 1px solid var(--red);
  color: var(--ink);
  font-size: 13px;
  z-index: 50;
}
.error-banner {
  border: 1px solid var(--red);
  background: var(--red-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  display: grid;
  gap: 6px;
}
.error-banner code { background: rgba(0, 0, 0, 0.25); }

.pill--muted { color: var(--unknown); border-color: var(--line-strong); background: var(--unknown-soft); }

.review-meta { margin: 0; font-family: var(--mono); font-size: 10.5px; color: var(--muted); line-height: 1.5; }

.calc-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--card-2);
}
.calc-block[open] { padding-bottom: 12px; }
.calc-summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
  font-size: 11.5px;
  color: var(--ink-2);
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 7px;
}
.calc-summary::-webkit-details-marker { display: none; }
.calc-summary::before {
  content: "▸";
  color: var(--beam);
  font-size: 10px;
  transition: transform var(--dur-hover-in) var(--ease-out);
}
.calc-block[open] > .calc-summary::before { content: "▾"; }
.calc-summary:hover { color: var(--beam); }
.calc-block .callout { margin-top: 8px; }
.calc-block details > .calc-summary { color: var(--muted); }

.verdict-hero--ok .ring-value { stroke: var(--green); }
.verdict-hero--warn .ring-value { stroke: var(--yellow); }
.verdict-hero--bad .ring-value { stroke: var(--red); }
.stat-sub {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.kv dd .pill { margin-right: 3px; }

/* ---------------------------------------------------------- responsive */
.mobile-only { display: none; }

@media (max-width: 1080px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .controls {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .controls-foot { grid-column: 1 / -1; }
  .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .app { display: flex; flex-direction: column; }
  .results { order: 1; width: 100%; }
  .controls { order: 2; width: 100%; }
  .controls[hidden] { display: none; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 16px 16px 10px; flex-wrap: wrap; }
  .tagline { display: none; }
  .app { padding: 0 14px 44px; gap: 16px; }
  .controls { grid-template-columns: minmax(0, 1fr); }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .arena-bar { flex-wrap: wrap; gap: 6px 8px; }
  .arena-help { display: none; }
  .toolbar .arena-bar .segmented { flex: 1 1 100%; }
  .arena-context-desc { flex: 1 1 100%; }
  .arena-context-count { margin-left: 0; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .modal { max-height: 94vh; border-radius: 18px; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-titles h2 { font-size: 20px; }
  .modal-body { padding: 16px 15px 24px; }
  .verdict-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-score { justify-items: start; grid-auto-flow: column; align-items: center; justify-content: start; gap: 12px; }
  .kv { grid-template-columns: 104px minmax(0, 1fr); }
  .calc-line { grid-template-columns: 96px 1fr 66px; }
  .source { grid-template-columns: auto minmax(0, 1fr); }
  .source-link { grid-column: 2; }
}

/* ==========================================================================
   v2 — 4단 탐색(홈 → 도메인 → 대분류 → 비교군 → 항목) · 미세조정 드로어 · 비교 뷰
   ========================================================================== */

[hidden] { display: none !important; }

.view {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px 22px 64px;
  display: grid;
  gap: 20px;
  outline: none;
}

/* ---------------------------------------------------------------- 상단바 */

.topbar {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 22px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
}
/* 모드 바는 브랜드·도구 사이에서 자기 폭만 쓰고, 넘치면 줄바꿈 대신 가로 스크롤 —
   EN 라벨이 길어져 두 줄로 접히면 분야 바와 겹치던 문제를 막는다. */
.topbar > .domain-tabs { grid-column: 2; justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.topbar > .domain-tabs::-webkit-scrollbar { display: none; }
.topbar > .brand { grid-column: 1; }
.topbar > .topbar-side { grid-column: 3; justify-self: end; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }.brand:hover { text-decoration: none; }
.brand-text { display: grid; gap: 0; line-height: 1.15; }
.brand .tagline { display: none; }

.domain-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(8px);
}
.domain-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.domain-tabs button:hover { color: var(--ink); }
.domain-tabs button[aria-selected="true"] {
  background: var(--beam-soft);
  color: var(--beam);
  box-shadow: inset 0 0 0 1px var(--beam);
}
.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--sea-soft);
  color: var(--sea);
  font-family: var(--mono);
  font-size: 10.5px;
}
.ghost-btn--tune { border-color: var(--beam); color: var(--beam); }
.ghost-btn.is-on { border-color: var(--beam); color: var(--beam); background: var(--beam-soft); }
.ghost-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.primary-btn {
  border: 1px solid var(--beam);
  background: linear-gradient(180deg, var(--beam), #d99a3f);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.primary-btn:hover { filter: brightness(1.05); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

/* -------------------------------------------------------------- 경로 표시 */

.crumb-bar {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4px 22px 10px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.breadcrumb button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  padding: 2px 0;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
}
.breadcrumb button:hover { color: var(--beam); border-bottom-color: var(--beam); }
.breadcrumb li[aria-current] { color: var(--ink); font-weight: 600; }
.crumb-sep { color: var(--line-strong); }
.crumb-note {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  max-width: 60ch;
  text-align: right;
}

/* ------------------------------------------------------------------- 홈 */

.home { display: grid; gap: 26px; }
.hero {
  position: relative;
  padding: 34px 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(700px 300px at 0% 0%, var(--beam-soft), transparent 65%),
    radial-gradient(600px 320px at 100% 20%, var(--sea-soft), transparent 60%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid var(--line);
  opacity: 0.6;
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--beam);
  text-transform: uppercase;
}
.hero h1, .level-head h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.03em;
}
.hero h1 .hl { color: var(--beam); }
.lede { margin: 0 0 16px; max-width: 66ch; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.lede strong { color: var(--ink); }

.home-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  margin: 4px 0 14px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
}
.home-search .search-ico { position: static; transform: none; color: var(--beam); font-size: 16px; }
.home-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  padding: 7px 2px;
  outline: none;
  min-width: 0;
}
.home-search input::placeholder { color: var(--muted); }
.home-search:focus-within { border-color: var(--beam); }

/* v3.54 — 분야 화면 맨 위의 통합 검색줄. 홈 히어로보다 한 단 작게 두어 제목을 가리지 않는다. */
.home-search--slim {
  max-width: 640px;
  margin: 0 0 16px;
  padding: 4px 4px 4px 13px;
}
.home-search--slim input { padding: 6px 2px; font-size: 13.5px; }
.home-search--slim .primary-btn { padding: 7px 16px; font-size: 12.5px; }
.home-search--slim + .home-search-results { margin: 0 0 16px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.hero-meta b { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.home-block { display: grid; gap: 12px; }
.section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.section-hint { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.section-sub { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }

.arena-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.arena-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--dur-hover-out) var(--ease-out);
}
.arena-card:hover { border-color: var(--beam); }
.arena-card:hover > *,
.arena-card:focus-visible > * { transform: translateY(-2px); }
.arena-card > * { transition: transform var(--dur-hover-in) var(--ease-out); }
.arena-card:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.arena-card-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--sea); }
.arena-card-title { font-size: 18px; letter-spacing: -0.02em; }
.arena-card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.arena-card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.arena-card-meta .ok { color: var(--green); }
.arena-card-meta .bad { color: var(--red); }
.arena-card-top { font-size: 12px; color: var(--ink-2); }
.arena-card-top b { color: var(--beam); font-family: var(--mono); }
.arena-card-go { font-size: 11.5px; color: var(--beam); }

.gap-list { display: grid; gap: 10px; }
.gap-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto;
  grid-template-areas: "title scale more" "drivers drivers more";
  gap: 6px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}
.gap-row:hover { border-color: var(--line-strong); border-left-color: var(--red); }
.gap-row:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.gap-title { grid-area: title; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gap-title strong { font-size: 15.5px; }
.gap-scale { grid-area: scale; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gap-stars, .gap-score { display: grid; gap: 1px; }
.gap-stars b { font-family: var(--mono); font-size: 17px; color: var(--yellow); }
.gap-score b { font-family: var(--mono); font-size: 17px; color: var(--red); }
.gap-stars small, .gap-score small { font-size: 10px; color: var(--muted); }
.gap-vs { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.gap-drivers { grid-area: drivers; display: flex; gap: 5px; flex-wrap: wrap; margin: 0; }
.gap-more { grid-area: more; font-size: 12px; color: var(--beam); white-space: nowrap; }

.bookmark-list { display: grid; gap: 6px; }
.bookmark-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}
.bookmark-row:hover { border-color: var(--line-strong); }
.bookmark-name { font-weight: 600; }
.bookmark-score { margin-left: auto; font-family: var(--mono); color: var(--beam); }

.home-search-results {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-solid);
  padding: 14px 16px;
}
.search-result-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.search-result-head strong { font-size: 15px; }
.search-result-head .muted { font-size: 11.5px; }
.search-result-head .text-btn { margin-left: auto; }
.search-rows { display: grid; gap: 4px; }
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.search-row:hover { background: var(--card-2); border-color: var(--line); }
.search-row-name { font-weight: 600; min-width: 120px; }
.search-row-desc { flex: 1 1 220px; font-size: 12px; color: var(--muted); }
.search-row-score { font-family: var(--mono); color: var(--beam); }

/* ------------------------------------------------------ 도메인·대분류 화면 */

.level { display: grid; gap: 20px; }
.level-head { padding: 8px 0 2px; }
.level-head h1 { font-size: clamp(22px, 2.8vw, 30px); }
.level-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.level-note b { color: var(--ink-2); }
.level-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
/* v3.58 — 모바일 추천 첫 화면: 대분류(장르) 칩이 30~35개면 10줄을 차지해 첫 추천 카드를 가린다.
   720px 이하에서는 앞 4개만 보이고 "장르 전체 보기 (35) ▾" 로 펼친다(데스크톱은 그대로 펼침). */
.chip--cats-toggle { display: none; }
/* 대분류 칩 묶음은 flex 흐름에 그대로 참여시킨다(묶음 상자가 따로 줄바꿈하지 않게). */
.level-badges .cat-chips { display: contents; }
@media (max-width: 720px) {
  .level-badges[data-cats-open='false'] .cat-chips > .chip--link:nth-child(n + 5) { display: none; }
  .level-badges .chip--cats-toggle { display: inline-flex; align-items: center; gap: 4px; }
}

.category-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.category-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.category-card:hover { border-color: var(--sea); }
.category-card:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.category-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); }
.category-card strong { font-size: 17px; }
.category-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.category-meta { font-family: var(--mono); font-size: 11px; color: var(--sea); }
.category-arenas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

/* ------------------------------------------------------------- 비교군 목록 */

.arena-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 4px 0 6px;
}
.arena-summary .stat { margin: 0; }
.toolbar-search { flex: 1 1 240px; margin: 0; }
.toolbar .check-row { white-space: nowrap; }

.card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.card-more { margin-left: auto; font-size: 11.5px; color: var(--beam); }
.compare-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.compare-check input { accent-color: var(--beam); width: 13px; height: 13px; }
.compare-check:has(input:checked) { border-color: var(--beam); color: var(--beam); background: var(--beam-soft); }
.icon-btn--sm { width: 26px; height: 26px; font-size: 13px; }

.chip--fresh--ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.chip--fresh--warn { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }

/* ---------------------------------------------------------------- 비교 바 */

.compare-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
}
.compare-bar-label { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }
.compare-bar-list { display: flex; gap: 6px; flex-wrap: wrap; }
.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: var(--sea-soft);
  color: var(--sea);
  font-size: 12px;
}
.chip-x {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
  padding: 0 4px;
  opacity: 0.8;
}
.chip-x:hover { opacity: 1; }

/* ------------------------------------------------------------------- 비교 표 */

.compare-wrap { overflow-x: auto; }
.compare-table { min-width: 620px; }
.compare-table th, .compare-table td { vertical-align: top; }
.compare-rowlabel { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; text-align: left; }
table.data.compare-table thead th { position: sticky; top: 0; background: var(--panel-solid); z-index: 1; text-transform: none; letter-spacing: -0.01em; font-size: 13px; color: var(--ink); }
table.data.compare-table thead th .verdict { text-transform: none; font-size: 11px; }
table.data.compare-table thead th .compare-head-name { text-transform: none; }
.compare-head-name { display: block; font-size: 15px; margin-bottom: 4px; }
.cmp-score { font-family: var(--mono); font-size: 17px; color: var(--beam); }

/* ---------------------------------------------------------- 미세조정 드로어 */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 8, 15, 0.55);
  backdrop-filter: blur(2px);
  animation: veil-in var(--dur-panel) var(--ease-out);
}
@keyframes veil-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(430px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--panel-solid);
  border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  /* v3.67 — 열릴 때만 오른쪽에서 살짝 들어온다(iOS 드로어 커브). 닫힘은 즉시 —
     hidden 을 display:none 으로 두어야 화면 밖으로 나간 패널이 가로 넘침을 만들지 않는다. */
  animation: drawer-in var(--dur-slide) var(--ease-drawer);
}
@keyframes drawer-in {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: none; }
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-body { overflow-y: auto; padding: 16px 18px 28px; display: grid; gap: 20px; }
.tune-sec { display: grid; gap: 8px; }
.tune-sec h3 { margin: 0; font-size: 13.5px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tune-sec .hint { margin: 0; font-size: 11.5px; }
.filter-pack { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card); }
.filter-pack[open] { border-color: var(--line-strong); }
.filter-pack > summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); list-style: none; display: grid; gap: 2px; }
.filter-pack > summary::-webkit-details-marker { display: none; }
.filter-pack > summary::before { content: "＋ "; color: var(--beam); }
.filter-pack[open] > summary::before { content: "－ "; }
.filter-pack .muted { font-size: 11px; }
.filter-pack .filter-list { margin-top: 6px; }
.tune-foot { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.tune-foot p { margin: 0; font-size: 12px; color: var(--muted); }
body.drawer-open { overflow: hidden; }

/* ------------------------------------------------------------- 사전(기본 정보) */

.enc-summary { display: grid; gap: 6px; }
.enc-summary p { margin: 0; font-size: 13px; line-height: 1.72; color: var(--ink-2); }
.enc-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 8px;
  margin: 0;
}
.enc-fact {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  min-width: 0;
}
.enc-fact dt { font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 3px; }
.enc-fact dd { margin: 0; font-size: 12.5px; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.enc-fact-note { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.enc-block { display: grid; gap: 6px; }
.enc-block .mini-label { margin: 0; }
.enc-highlights { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.enc-highlights li {
  position: relative;
  padding: 6px 10px 6px 24px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.enc-highlights li::before {
  content: "✦";
  position: absolute;
  left: 9px;
  top: 6px;
  font-size: 10px;
  color: var(--beam);
}
.enc-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.enc-rel {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  transition: border-color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.enc-rel:hover, .enc-rel:focus-visible { border-color: var(--beam); background: var(--card-2); }
.enc-rel:active { transform: translateY(1px); }
.enc-rel .icon-badge, .enc-rel img { flex: 0 0 auto; }
.enc-rel-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.enc-rel-name { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enc-rel-meta { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.enc-rel-type { color: var(--sea); font-weight: 600; }
.enc-rel-type--sequel, .enc-rel-type--prequel { color: var(--beam); }
.enc-rel-type--adaptation { color: var(--sea); }
.enc-rel-arrow { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.enc-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.enc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--beam-2);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--beam-soft);
  text-decoration: none;
}
.enc-link:hover, .enc-link:focus-visible { border-color: var(--beam); }
.enc-link-note { font-size: 10.5px; color: var(--muted); }
.enc-sources { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; }
.enc-sources a { color: var(--ink-2); text-decoration: underline dotted; text-underline-offset: 3px; }
.enc-sources a:hover { color: var(--beam); }

@media (max-width: 620px) {
  .enc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enc-related { grid-template-columns: 1fr; }
  .enc-fact { padding: 8px 10px; }
}

/* ------------------------------------------------------------- 상세 모달 보강 */

.modal--method { width: min(860px, 94vw); max-width: 860px; }
.fact-table th { width: 180px; }
.opinion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.opinion-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-2);
}
.opinion-card h4 { margin: 0 0 8px; font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.opinion-card .list { margin: 0; }

.alt-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.alt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.alt-row:hover { border-color: var(--sea); }
.alt-name { font-weight: 600; min-width: 0; }
.alt-name .search-row-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-tier { font-size: 11.5px; color: var(--muted); }
.alt-sim {
  font-size: 10.5px;
  font-family: var(--mono);
  color: var(--sea);
  border: 1px solid var(--sea-soft);
  background: var(--sea-soft);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
  cursor: help;
  flex: none;
}
.alt-score { margin-left: auto; font-family: var(--mono); color: var(--beam); }
.alt-more { font-size: 11.5px; color: var(--sea); }

.rules--static li { cursor: default; }

.inline-btn, .level-badges .text-btn, .search-result-head .text-btn, .tune-foot .text-btn, .bookmark-row .text-btn {
  width: auto;
  display: inline-block;
}
.level-badges .text-btn { border-style: solid; padding: 6px 12px; }

.kv--glossary dt { min-width: 110px; }
.callout--ok { border-color: var(--green); }

/* ------------------------------------------------------------------ 토스트 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 90;
  margin: 0;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  color: var(--ink);
  font-size: 12.5px;
  box-shadow: var(--shadow-soft);
  white-space: pre-line;
  max-width: min(560px, calc(100vw - 32px));
}

/* ------------------------------------------------------------------ 반응형 */

@media (max-width: 900px) {
  .topbar { gap: 8px; }
  .topbar > .topbar-side { width: auto; justify-content: flex-end; }
  .crumb-note { display: none; }
  .gap-row { grid-template-columns: 1fr; grid-template-areas: "title" "scale" "drivers" "more"; }
  .gap-more { justify-self: start; }
}

@media (max-width: 720px) {
  .view { padding: 4px 14px 90px; }
  .topbar { padding: 12px 14px 8px; }
  .crumb-bar { padding: 2px 14px 8px; }
  .hero { padding: 22px 18px 20px; }
  .hero h1 { font-size: 24px; }
  .home-search { border-radius: 14px; padding: 8px 10px 8px 12px; flex-wrap: wrap; }
  .home-search input { flex: 1 1 160px; }
  .domain-tabs { overflow-x: auto; max-width: 100%; }
  .arena-cards, .category-cards { grid-template-columns: 1fr; }
  .arena-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer { width: 100vw; }
  .compare-bar { left: 12px; right: 12px; transform: none; bottom: 12px; border-radius: 16px; }
  .modal { width: 100vw; max-height: 100vh; border-radius: 0; }
  .opinion-grid { grid-template-columns: 1fr; }
}

/* v2 다듬기 — 목록 요약 간격·비교 표 라벨 폭·모바일 상단 압축 */
.arena-summary { margin: 2px 0 14px; }
#arenaResults > .section-head { margin-top: 4px; }
table.data.compare-table th.compare-rowlabel { width: 176px; min-width: 132px; }
@media (max-width: 720px) {
  .dataset-chip { display: none; }
  .topbar { padding: 10px 14px 6px; gap: 8px; }
  .mark { width: 34px; height: 34px; }
  .wordmark { font-size: 21px; }
  .topbar-side { gap: 6px; }
  .topbar-side .ghost-btn { font-size: 11.5px; padding: 6px 9px; }
  .domain-tabs { padding: 3px; }
  .domain-tabs button { padding: 6px 14px; font-size: 12.5px; }
  .crumb-bar { padding-top: 0; }
  .arena-summary .stat { padding: 10px 12px; }
  .arena-summary .stat-value { font-size: 21px; }
}

/* --------------------------------------------- 공식 아이콘 (item.icon / v2.1) */
/* 카드 46px · 상세 54px · 비교표 32px · 검색·갭·보관함 26px.
   이미지가 없거나 로드에 실패하면 img 가 숨겨지고 같은 자리에 이름 첫 글자 배지가 남는다. */
.item-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, var(--card-2), var(--card));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform var(--dur-hover-in) var(--ease-out);
}
.item-icon::before {
  content: attr(data-initial);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.item-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.item-icon img[hidden] { display: none; }
.item-icon--card { width: 46px; height: 46px; }
.item-icon--detail { width: 54px; height: 54px; border-radius: 12px; }
.item-icon--detail::before { font-size: 22px; }
.item-icon--compare { width: 32px; height: 32px; border-radius: 8px; }
.item-icon--compare::before { font-size: 13px; }
.item-icon--small { width: 26px; height: 26px; border-radius: 7px; }
.item-icon--small::before { font-size: 11px; }
html[data-theme="light"] .item-icon { box-shadow: 0 1px 2px rgba(20, 32, 44, 0.08); }

.card-name-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-name-text { min-width: 0; display: grid; gap: 2px; }
.card-name-text h3 { margin: 0; }

.search-row-name,
.bookmark-name,
.alt-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.search-row-text { min-width: 0; }

.compare-head-name { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.compare-head-text { min-width: 0; }

.modal-icon-slot { flex: none; display: flex; align-items: flex-start; padding-top: 2px; }
.modal-titles { flex: 1 1 auto; }

.gap-title { align-items: center; }

@media (max-width: 720px) {
  .item-icon--card { width: 42px; height: 42px; border-radius: 9px; }
  .item-icon--card::before { font-size: 16px; }
  .item-icon--detail { width: 46px; height: 46px; border-radius: 11px; }
  .item-icon--detail::before { font-size: 18px; }
  .modal-titles h2 { font-size: 22px; }
}

/* 모바일 상세 모달 머리 — 아이콘 + 제목은 한 줄, 액션 버튼은 아래 줄로 내려 글자가 세로로 쪼개지지 않게 한다. */
@media (max-width: 720px) {
  .modal-head { flex-wrap: wrap; gap: 8px 10px; padding: 16px 16px 12px; }
  .modal-icon-slot { order: 1; align-items: center; }
  .modal-titles { order: 2; flex: 1 1 220px; }
  .modal-actions { order: 3; flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
}

/* ==========================================================================
   v3 — 장르별 추천이 주인공인 정보 계층
   1) 홈/도메인: 장르 이름 + 그 장르의 추천 항목 타일(아이콘 44px · 판정 · 점수)
   2) 비교군 목록 카드: 아이콘 · 이름 · 판정 · 점수 · 한 줄 요약 · 핵심 태그 2개
   3) 3축 점수·필터 통과 목록·가격 티어는 상세 모달에만 남긴다
   ========================================================================== */

/* ---------------------------------------------------- 1. 홈 히어로 압축 */

.hero--compact {
  display: grid;
  gap: 12px;
  padding: 18px 20px 14px;
}
.hero--compact .hero-lead { display: grid; gap: 4px; }
.hero--compact .eyebrow { margin: 0; }
.hero--compact h1 {
  margin: 0;
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.25;
}
.hero--compact .lede {
  margin: 0;
  max-width: 88ch;
  font-size: 12.8px;
  line-height: 1.55;
}
.hero--compact .home-search { margin: 2px 0 0; max-width: 660px; padding: 4px 4px 4px 13px; }
.hero--compact .home-search input { padding: 6px 2px; font-size: 13.5px; }
.hero--compact .home-search .primary-btn { padding: 7px 16px; font-size: 12.5px; }
.hero--compact .hero-meta { align-items: center; gap: 4px 14px; font-size: 11.5px; }
.hero--compact .hero-meta b { font-size: 12.5px; }
.hero-meta-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.hero-meta-actions .text-btn {
  width: auto;
  display: inline-block;
  padding: 3px 10px;
  font-size: 11.5px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.hero-meta-actions .text-btn:hover { border-color: var(--beam); }

/* ---------------------------------------------- 2. 장르별 추천 쇼케이스 */

.genre-showcase .section-head { margin-bottom: 2px; }
.genre-list { display: grid; gap: 10px; }
.genre-block {
  display: grid;
  gap: 9px;
  padding: 11px 13px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--card-2) 0%, var(--card) 70%);
}
.genre-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.genre-title {
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.genre-title:hover .genre-name { color: var(--beam); }
.genre-title:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
.genre-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-transform: uppercase;
}
.genre-name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.genre-stat { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.genre-stat .ok { color: var(--green); }
.genre-more {
  margin-left: auto;
  flex: none;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--sea);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.genre-more:hover { border-color: var(--sea); color: var(--beam); }
.genre-more:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

.pick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 7px; }
.pick-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-hover-out) var(--ease-out);
}
.pick-tile:hover { border-color: var(--beam); }
/* 히트박스(테두리)는 고정 — 안쪽 세 조각만 1px 든다. */
.pick-tile:hover > *,
.pick-tile:focus-visible > * { transform: translateY(-1px); }
.pick-tile > * { transition: transform var(--dur-hover-in) var(--ease-out); }
.pick-tile:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.pick-text { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.pick-name {
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.3;
  word-break: keep-all;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pick-tagline {
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-meta { display: grid; justify-items: end; gap: 1px; flex: none; }
.pick-score { font-family: var(--mono); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-tile--ok .pick-score { color: var(--green); }
.pick-tile--warn .pick-score { color: var(--yellow); }
.pick-tile--bad .pick-score { color: var(--red); }
.pick-tile .verdict { font-size: 10px; padding: 1px 6px; }

/* ---------------------------------------------- 3. 도메인·대분류 압축 */

.level-head--compact { display: grid; gap: 5px; padding: 4px 0 0; }
.level-head--compact h1 { margin: 0; font-size: clamp(20px, 2.4vw, 26px); }
.level-head--compact .lede { margin: 0; max-width: 96ch; font-size: 13px; line-height: 1.5; }
.level-head--compact .level-badges { margin-top: 6px; }
.chip--link {
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  color: var(--sea);
  border-color: var(--sea);
  background: var(--sea-soft);
}
.chip--link b { font-family: var(--mono); font-weight: 700; color: var(--beam); }
.chip--link:hover { border-color: var(--beam); color: var(--beam); }
.lede--line {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.level-head--arena { gap: 4px; }

/* ---------------------------------------------- 4. 비교군 요약 한 줄 */

.arena-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.arena-summary .stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
}
.arena-summary .stat::after { display: none; }
.arena-summary .stat-label { font-size: 10.5px; letter-spacing: 0.03em; }
.arena-summary .stat-value { font-size: 15px; line-height: 1.25; }
.arena-summary .stat-sub { display: none; }

/* ---------------------------------------------- 5. 목록 카드 — 핵심만 */

.card { gap: 7px; padding: 13px 14px 9px; }
.card-head { align-items: center; gap: 9px; }
.card-name-text h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-dev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-score { display: grid; justify-items: end; gap: 0; flex: none; text-align: right; }
.card-score .score-num {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.card--ok .card-score .score-num { color: var(--green); }
.card--warn .card-score .score-num { color: var(--yellow); }
.card--bad .card-score .score-num { color: var(--red); }
.card-score .score-cap {
  font-size: 8.5px;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-transform: uppercase;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card .one-liner { -webkit-line-clamp: 2; font-size: 12.2px; }
.chip--pass { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.chip--warn { color: var(--yellow); border-color: var(--yellow); background: var(--yellow-soft); }
.card-tools { margin-top: 1px; padding-top: 7px; }

.item-icon--pick { width: 44px; height: 44px; border-radius: 10px; }
.item-icon--pick::before { font-size: 17px; }

.card-score .verdict { font-size: 10px; padding: 1px 6px; }

@media (max-width: 900px) {
  .hero--compact { padding: 16px 15px 12px; }
  .hero-meta-actions { margin-left: 0; }
  .genre-head { flex-wrap: wrap; row-gap: 4px; }
  .genre-more { margin-left: 0; }
}
@media (max-width: 720px) {
  .hero--compact h1 { font-size: 19px; }
  .hero--compact .lede { font-size: 12.2px; }
  .pick-row { grid-template-columns: 1fr; }
  .pick-tagline { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
  .genre-block { padding: 10px 11px; }
  .item-icon--pick { width: 40px; height: 40px; border-radius: 9px; }
  .item-icon--pick::before { font-size: 15px; }
  .arena-summary .stat { padding: 3px 9px; }
  .arena-summary .stat-value { font-size: 13.5px; }
}

/* ==========================================================================
   v4 — 첫인상 · 비교 · 모바일 마감 (2026-11-25)
   1) 홈 장르 쇼케이스 도메인 필터(점프 바)와 히어로·카드 리듬 정리
   2) 플로팅 비교 바 · 비교 표 첫 열 고정·차이 강조
   3) 390px 모바일 가로 넘침 0 · 터치 영역 · 라이트 테마 대비
   ========================================================================== */

/* 홈에서는 경로 표시가 '홈' 한 글자만 남아 어색하므로 감춘다(도메인 화면부터 노출). */
body.is-home .crumb-bar { display: none; }
/* 등대는 첫 화면 — 경로 막대 대신 히어로가 정체성을 말한다. */
body.is-lighthouse .crumb-bar { display: none; }

/* ---------------------------------------------------- 1. 홈 리듬·도메인 필터 */

.home { gap: 22px; }
.hero--compact { padding: 20px 22px 15px; gap: 13px; }
.hero--compact h1 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.035em; }
.hero--compact .lede { font-size: 13px; max-width: 82ch; }
.hero--compact .home-search { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03); }
.genre-list { gap: 9px; }

.domain-filter {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  margin: 0 0 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
}
.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-hover-out) var(--ease-out), color var(--dur-hover-out) var(--ease-out), border-color var(--dur-hover-out) var(--ease-out);
}
.domain-chip b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--unknown-soft);
  border-radius: 99px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.domain-chip:hover { color: var(--ink); background: var(--card-2); }
.domain-chip[aria-pressed="true"] { color: var(--beam); background: var(--beam-soft); border-color: var(--beam); }
.domain-chip[aria-pressed="true"] b { color: var(--beam); background: transparent; }
.domain-chip:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

/* 홈 장르 블록 머리 — 좁은 폭에서 제목·전체 링크는 한 줄, 건수는 아래 줄 */
@media (max-width: 720px) {
  .genre-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title more" "stat stat";
    align-items: center;
    row-gap: 4px;
  }
  .genre-title { grid-area: title; }
  .genre-more { grid-area: more; justify-self: end; }
  .genre-stat { grid-area: stat; }
  .pick-tagline { font-size: 11px; }
  .genre-kicker { font-size: 10.5px; }
}

/* -------------------------------------------------------- 2. 플로팅 비교 바 */

.compare-bar { padding: 9px 12px 9px 16px; gap: 10px; }
.compare-bar-label { color: var(--ink-2); font-size: 11.5px; }
.compare-bar .primary-btn { padding: 9px 18px; }
.compare-bar .text-btn {
  width: auto;
  border-style: solid;
  padding: 8px 12px;
  color: var(--ink-2);
}
.compare-bar .text-btn:hover { color: var(--beam); }
body.has-compare-bar .view { padding-bottom: 118px; }
body.has-compare-bar .toast { bottom: 108px; }

/* ------------------------------------------------------ 3. 비교 표 가독성 */

.compare-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--muted);
}
.compare-summary b { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.compare-summary-hint { margin-left: auto; font-family: var(--mono); font-size: 10.5px; }
.scroll-hint { display: none; margin: 0; font-size: 11px; color: var(--muted); }

table.data.compare-table { border-collapse: separate; border-spacing: 0; }
.compare-table th.compare-rowlabel {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 168px;
  min-width: 128px;
  background: var(--panel-solid);
  border-right: 1px solid var(--line);
}
table.data.compare-table th.compare-rowlabel { width: 168px; min-width: 128px; }
table.data.compare-table thead th.compare-rowlabel { z-index: 6; background: var(--panel-solid); }
.compare-table tbody tr:hover th.compare-rowlabel { background: var(--card-2); }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--line); }
.cmp-row--score td, .cmp-row--score th { background: var(--card-2); }
.cmp-cell { transition: background var(--dur-hover-out) var(--ease-out); }
.cmp-cell--best { background: var(--green-soft); }
.cmp-cell--best .cmp-score { color: var(--green); }
.cmp-best {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid var(--green);
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--green);
  vertical-align: 2px;
}
.cmp-diff {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--red);
}

@media (max-width: 720px) {
  .compare-table { min-width: 540px; }
  .compare-table th.compare-rowlabel { width: 108px; min-width: 96px; padding: 8px 8px; font-size: 10px; }
  table.data.compare-table th.compare-rowlabel { width: 108px; min-width: 96px; padding: 8px 8px; font-size: 10px; }
  .compare-table th, .compare-table td { padding: 8px 9px; }
  .scroll-hint { display: block; }
  .compare-summary { font-size: 11.5px; gap: 2px 12px; }
  .compare-summary-hint { display: none; }
}

/* ------------------------------------------- 4. 390px 모바일 마감·터치 영역 */

@media (max-width: 720px) {
  .view { padding: 4px 14px 96px; }
  .hero--compact { padding: 16px 15px 13px; gap: 11px; }
  .hero--compact h1 { font-size: 20px; }
  .hero--compact .lede { font-size: 12.4px; }
  .hero-meta-actions { width: 100%; }
  .hero-meta-actions .text-btn { min-height: 34px; }
  .domain-filter { top: 6px; width: 100%; justify-content: space-between; padding: 4px; }
  .domain-chip { flex: 1 1 auto; justify-content: center; padding: 8px 8px; font-size: 12.5px; }

  .topbar-side .ghost-btn { min-height: 36px; }
  .lang-toggle button { min-height: 34px; min-width: 38px; }
  .domain-tabs button { min-height: 36px; }
  .genre-more { min-height: 34px; padding: 7px 12px; font-size: 11.5px; }
  .compare-check { min-height: 34px; padding: 3px 10px; font-size: 12px; }
  .compare-check input { width: 15px; height: 15px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn--sm { width: 34px; height: 34px; }
  .primary-btn { min-height: 40px; padding: 9px 16px; }
  .text-btn { min-height: 36px; }
  .chip-x { padding: 5px 6px; }
  .card-more { padding: 6px 0; }
  .alt-row { min-height: 44px; }
  /* v3.61 — 폭 390에서 이름·결·점수·판정·보기를 모두 넣으면 넘친다. 티어 이름과 '보기 →'는 데스크톱에서만 보인다. */
  .alt-tier, .alt-more { display: none; }
  .alt-row { gap: 7px; padding: 9px 10px; }
  .search-row { min-height: 44px; }

  .modal-backdrop { padding: 0; }
  .modal { width: 100%; max-height: 100dvh; border-radius: 0; border-left: 0; border-right: 0; }
  .modal-body { padding: 16px 16px 28px; }
  .modal-actions .ghost-btn { min-height: 38px; }
  .modal-actions .icon-btn { width: 40px; height: 40px; }

  .compare-bar {
    left: 10px;
    right: 10px;
    transform: none;
    bottom: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label label" "list list" "open clear";
    gap: 6px 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-radius: 18px;
  }
  .compare-bar-label { grid-area: label; }
  .compare-bar-list { grid-area: list; }
  .compare-bar #compareOpen { grid-area: open; justify-self: stretch; }
  .compare-bar #compareClear { grid-area: clear; justify-self: end; }
  body.has-compare-bar .view { padding-bottom: 190px; }
  body.has-compare-bar .toast { bottom: 186px; }
}

/* ---------------------------------------------- 5. 라이트 테마 대비·경계 보강 */

html[data-theme="light"] .primary-btn,
html[data-theme="light"] .skip-link {
  background: linear-gradient(180deg, #8f5a0d, #6f440a);
  border-color: #7d4e0b;
  color: var(--on-accent);
}
html[data-theme="light"] .ghost-btn,
html[data-theme="light"] .dataset-chip { background: var(--card); }
html[data-theme="light"] .compare-bar,
html[data-theme="light"] .modal,
html[data-theme="light"] .drawer { border-color: var(--line-strong); }
html[data-theme="light"] .item-icon { background: #fff; }
html[data-theme="light"] .domain-chip b { background: rgba(30, 45, 60, 0.07); }

/* v4 보강 — 모달 액션 한 줄 유지·모바일 닫기 위치 */
.modal-actions { flex-wrap: wrap; row-gap: 6px; }
.modal-actions .ghost-btn { white-space: nowrap; flex: none; }
@media (max-width: 720px) {
  .modal-head { position: relative; padding-right: 58px; }
  .modal-actions { padding-right: 0; }
  .modal-actions #modalClose,
  .modal-actions .icon-btn[aria-label="상세 닫기"] {
    position: absolute;
    top: 12px;
    right: 12px;
  }
  .modal-actions .ghost-btn { font-size: 12px; padding: 8px 12px; }
  .breadcrumb button { padding: 7px 0; }
  .chip--link { min-height: 32px; padding: 5px 10px; }
  .toolbar .select-row select { min-height: 34px; padding: 7px 8px; }
  .source-link { padding: 5px 0; display: inline-block; }
  a.pill { min-height: 26px; padding: 3px 8px; }
}

html[data-theme="light"] .domain-chip[aria-pressed="true"] b { background: rgba(255, 253, 248, 0.8); }

/* 모달 닫기(X)는 머리 오른쪽 위에 고정 — 액션 버튼이 늘어나도 줄바꿈에 밀리지 않는다. */
.modal-head { position: relative; padding-right: 62px; }
.modal-actions #modalClose,
.modal-actions .icon-btn[aria-label="상세 닫기"],
.modal-actions .icon-btn[aria-label="방법론 닫기"] {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
}
@media (max-width: 720px) {
  .modal-head { padding-right: 56px; }
  .modal-actions #modalClose,
  .modal-actions .icon-btn[aria-label="상세 닫기"],
  .modal-actions .icon-btn[aria-label="방법론 닫기"] { top: 12px; right: 12px; }
}

.icon-btn.is-on { border-color: var(--beam); color: var(--beam); background: var(--beam-soft); }

@media (max-width: 720px) {
  .modal-actions { gap: 6px; }
  .modal-actions .ghost-btn { padding: 8px 10px; font-size: 11.5px; }
}

/* border-collapse: collapse 상태에서는 sticky 표 셀의 배경·고정이 깨진다. */
table.data.compare-table { border-collapse: separate; border-spacing: 0; }

/* 헤더의 항목 셀이 고정된 '기준' 라벨 텍스트를 덮지 않도록 — 항목 헤더 셀은 z-index 0. */
table.data.compare-table thead th:not(.compare-rowlabel) { z-index: 0; }

/* 고정된 도메인 필터 바 뒤로 스크롤되는 카드가 비쳐 보이지 않도록 배경 띠를 깐다. */
.domain-filter { isolation: isolate; }
.domain-filter::before {
  content: "";
  position: absolute;
  inset: -10px -22px -14px -22px;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 62%, transparent 100%);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
@media (max-width: 720px) {
  .domain-filter::before { inset: -8px -14px -12px -14px; }
}

table.data.compare-table td.cmp-cell--best { background: var(--green-soft); }

/* ==========================================================================
   등대(Lighthouse) — 조건을 고르면 명작 하나와 실제 퀘스트를 비춘다
   ========================================================================== */

.lh { display: grid; gap: 16px; }
.lh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 28px;
  overflow: hidden;
  background:
    radial-gradient(560px 280px at 0% 0%, var(--beam-soft), transparent 70%),
    radial-gradient(420px 240px at 100% 10%, var(--sea-soft), transparent 65%),
    var(--panel);
}
.lh-hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: 4%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--beam-soft), transparent 62%);
  pointer-events: none;
}
.lh-hero-lead { position: relative; display: grid; gap: 6px; min-width: 0; }
.lh-hero h1 { font-size: clamp(23px, 2.7vw, 32px); }
.lh-hero .lede { max-width: 62ch; }
.lh-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.lh-steps li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 11.5px;
  white-space: nowrap;
}
.lh-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 8px;
  min-width: 0;
}
.lh-stat {
  display: grid;
  gap: 1px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  min-width: 0;
}
.lh-stat b { font-family: var(--mono); font-size: 22px; line-height: 1.1; color: var(--beam); }
.lh-stat small { font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); }

.lh-catalog-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, var(--beam-soft), transparent 58%),
    var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur-hover-out) var(--ease-out);
}
.lh-catalog-banner:hover { border-color: var(--beam); text-decoration: none; }
.lh-catalog-main { display: grid; gap: 2px; min-width: 0; }
.lh-catalog-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lh-catalog-link { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.lh-catalog-arrow { margin-left: 6px; color: var(--beam); }
.lh-catalog-sub { font-size: 12px; color: var(--muted); }
.lh-catalog-banner:hover .lh-catalog-link { color: var(--beam); }

@media (max-width: 900px) {
  .lh-hero { grid-template-columns: minmax(0, 1fr); }
  .lh-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .lh-hero { padding: 18px 16px 16px; }
  .lh-hero h1 { font-size: 22px; }
  .lh-hero .lede { font-size: 12.8px; }
  .lh-stat { padding: 8px 10px; }
  .lh-stat b { font-size: 19px; }
  .lh-stat small { font-size: 9.8px; }
  .lh-catalog-banner { padding: 12px 14px; }
  .lh-catalog-link { font-size: 13.5px; }
  .lh-catalog-sub { font-size: 11.5px; }
}

.lh-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.lh-group { display: grid; gap: 6px; min-width: 0; }
.lh-label { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.lh-seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.lh-seg::-webkit-scrollbar { display: none; }
.lh-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.lh-seg button:hover { color: var(--ink); }
.lh-seg button[aria-checked="true"] {
  background: var(--beam-soft);
  color: var(--beam);
  box-shadow: inset 0 0 0 1px var(--beam);
}
.lh-seg button:disabled { opacity: 0.5; cursor: not-allowed; }
.lh-draw-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lh-draw { white-space: nowrap; }
.lh-hint { font-size: 12px; color: var(--muted); min-width: 0; }

.lh-result { display: grid; min-width: 0; }
.lh-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 220px at 100% 0%, var(--beam-soft), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.lh-card-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lh-card-id { display: grid; gap: 4px; min-width: 0; }
.lh-card-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lh-score { font-family: var(--mono); font-size: 11.5px; color: var(--beam); }
.lh-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
/* 등대 검수작 배지 — 목표 카드에서 '무엇이 검수됐는지' 먼저 보이게 한다. */
.lh-chip--review { border-color: var(--beam); background: var(--beam-soft); color: var(--beam); font-weight: 600; }
.lh-chip--check { border-color: var(--line-strong); background: var(--card-2); color: var(--ink-2); cursor: help; }
/* v3.63 B안 — 거름·조건부 작품의 '주의' 배지와 조건 문장. 등대 카드에서만 쓰는 예외 표기. */
.lh-chip--caution { border-color: #c98a3a; background: rgba(201, 138, 58, 0.12); color: #a86f26; font-weight: 700; cursor: help; }
.lh-why { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.lh-why span { display: inline-block; margin-right: 6px; font-weight: 700; color: var(--beam); }
.lh-caution { margin: 2px 0 0; padding: 6px 10px; border-left: 3px solid #c98a3a; border-radius: 4px;
  background: rgba(201, 138, 58, 0.08); font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.lh-caution span { display: inline-block; margin-right: 6px; font-weight: 700; color: #a86f26; }
[data-theme="dark"] .lh-chip--caution { color: #e6b070; }
[data-theme="dark"] .lh-caution span { color: #e6b070; }

.lh-game-name { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.lh-game-meta { margin: 0; font-size: 12px; color: var(--muted); }

.lh-quest {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  min-width: 0;
}
.lh-quest-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 11.5px; color: var(--muted); }
.lh-tier-badge {
  padding: 2px 9px;
  border: 1px solid var(--beam);
  border-radius: 999px;
  background: var(--beam-soft);
  color: var(--beam);
  font-weight: 700;
}
.lh-quest-title { margin: 0; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
.lh-quest-desc { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.lh-quest-tip {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--sea);
  border-radius: 8px;
  background: var(--sea-soft);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.lh-quest-tip b { color: var(--sea); }
.lh-quest-time { margin: 0; font-size: 12px; color: var(--muted); }
.lh-quest-time b { color: var(--ink); font-family: var(--mono); font-size: 12.5px; }

.lh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lh-actions .text-btn {
  width: auto;
  border: 0;
  padding: 6px 2px;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.lh-actions .text-btn:hover { color: var(--beam); text-decoration-color: var(--beam); border: 0; }
.lh-tier-hint { margin: 0; font-size: 12px; color: var(--muted); }

.lh-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}
.lh-empty-glyph { font-size: 34px; filter: drop-shadow(0 6px 16px var(--beam-soft)); }
.lh-empty h2 { margin: 0; font-size: 17px; }
.lh-empty p { margin: 0; max-width: 56ch; font-size: 13px; color: var(--muted); line-height: 1.6; }

.lh-history { display: grid; gap: 10px; }
.lh-history-total {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--beam-soft);
  color: var(--beam);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.lh-history-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.lh-history-list { display: flex; flex-wrap: wrap; gap: 8px; }
/* 랜딩 부제·예시 목표 — 처음 온 사람이 10초 안에 '무엇을 받는지' 보게 한다. */
.lh-landing-lede {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(13.5px, 1.35vw, 15.5px);
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}
.lh-samples {
  display: grid;
  gap: 11px;
  justify-items: center;
  width: 100%;
  max-width: 760px;
  /* 버튼 아래 예시 목표는 '한 걸음 더' 층이다 — 버튼과 확실히 떼어 놓아
     첫 동작(목표 탐색)이 먼저 읽히고, 예시는 그다음에 눈에 들어온다. */
  margin-top: clamp(12px, 3vh, 26px);
}
.lh-samples-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lh-samples-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lh-sample {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: left;
}
.lh-sample-text { display: grid; min-width: 0; gap: 2px; }
.lh-sample-text b {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lh-sample-text span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .lh-samples-list { grid-template-columns: 1fr; }
  .lh-sample { padding: 8px 10px; }
}
.lh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.lh-badge-text { display: grid; min-width: 0; font-size: 11.5px; color: var(--ink); }
.lh-badge-text b {
  max-width: 32ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}
.lh-badge-date { font-family: var(--mono); font-size: 10px; color: var(--beam); }

/* --- 등대 위저드(v21) — 한 화면에 한 단계씩 --------------------------------- */

.lh--landing {
  display: grid;
  gap: clamp(20px, 4vh, 40px);
  align-content: space-between;
  min-height: calc(100vh - 210px);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(10px, 4vh, 40px) 0 8px;
}
.lh-landing {
  display: grid;
  justify-items: center;
  gap: clamp(16px, 2.8vh, 30px);
  padding: clamp(22px, 5.4vh, 62px) 12px clamp(20px, 3.6vh, 38px);
  text-align: center;
}
/* v22 — 첫 화면 중앙의 등대 심볼(골드 모노라인, 투명 PNG/WebP) */
.lh-symbol {
  position: relative;
  display: inline-flex;
  justify-content: center;
  margin: 0 0 clamp(2px, 1vh, 10px);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}
.lh-symbol::before {
  content: "";
  position: absolute;
  inset: -22% -32% -18%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 58%, rgba(244, 183, 94, 0.26), rgba(244, 183, 94, 0.06) 45%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}
.lh-symbol img { display: block; height: clamp(126px, 21vh, 180px); width: auto; }
html[data-theme="light"] .lh-symbol {
  filter: drop-shadow(0 0 1px rgba(20, 32, 44, 0.75)) drop-shadow(0 1px 1px rgba(20, 32, 44, 0.45))
    drop-shadow(0 8px 16px rgba(20, 32, 44, 0.16));
}
html[data-theme="light"] .lh-symbol::before {
  background: radial-gradient(ellipse at 50% 58%, rgba(143, 90, 13, 0.1), transparent 68%);
}

/* v3.65 — 등대 10클릭 이스터에그: 대항해 모드(전체 도감 랜덤).
   평소에는 조용한 등대 그림이고, 10번째 클릭에 황금 후광과 배지가 켜진다. */
.lh-symbol[data-lh-mark] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.lh-symbol[data-lh-mark]:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 8px;
  border-radius: 18px;
}
.lh-symbol.is-poked { animation: lh-poke 0.42s var(--ease-out); }
@keyframes lh-poke {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-3px) scale(1.015); }
}
.lh--easter .lh-symbol::before {
  background: radial-gradient(ellipse at 50% 58%, rgba(255, 205, 108, 0.5), rgba(255, 205, 108, 0.14) 44%, transparent 72%);
  filter: blur(14px);
}
.lh--easter .lh-symbol { filter: drop-shadow(0 0 18px rgba(255, 198, 92, 0.5)) drop-shadow(0 12px 30px rgba(0, 0, 0, 0.5)); }
.lh--easter .lh-symbol img { animation: lh-beacon 3.6s var(--ease-in-out) infinite; }
@keyframes lh-beacon {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16) drop-shadow(0 0 10px rgba(255, 212, 128, 0.75)); }
}
html[data-theme="light"] .lh--easter .lh-symbol { filter: drop-shadow(0 0 12px rgba(176, 118, 20, 0.32)) drop-shadow(0 8px 16px rgba(20, 32, 44, 0.16)); }
html[data-theme="light"] .lh--easter .lh-symbol::before { background: radial-gradient(ellipse at 50% 58%, rgba(176, 118, 20, 0.18), transparent 70%); }
.lh-easter-badge,
.lh-easter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 205, 108, 0.55);
  border-radius: 999px;
  background: rgba(255, 193, 78, 0.12);
  color: var(--beam-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
html[data-theme="light"] .lh-easter-badge,
html[data-theme="light"] .lh-easter-chip { color: #8a5a08; border-color: rgba(143, 90, 13, 0.45); background: rgba(244, 183, 94, 0.18); }
.lh-easter-note {
  max-width: 620px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 205, 108, 0.28);
  border-radius: 12px;
  background: rgba(255, 193, 78, 0.07);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.lh-easter-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  max-width: 900px;
  margin: 0 auto 12px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 205, 108, 0.32);
  border-radius: 12px;
  background: rgba(255, 193, 78, 0.08);
}
.lh-easter-banner p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.lh-landing-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--beam);
}
.lh-landing-title {
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lh-landing-title .hl { color: var(--beam); }
.lh-start {
  margin: clamp(4px, 1.4vh, 12px) 0 0;
  font-size: clamp(16px, 1.6vw, 18px);
  padding: 16px 34px;
  border-radius: 999px;
  box-shadow: 0 16px 40px -18px var(--beam);
}
.lh-start:focus-visible { outline: 2px solid var(--beam); outline-offset: 3px; }

/* --- 항해 서약(v23) — 목표 탐색 직후의 각서 화면 ---------------------------- */

.lh--pledge {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 230px);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(4px, 2vh, 20px) 0;
}
.lh-pledge {
  position: relative;
  display: grid;
  gap: clamp(15px, 2.4vw, 24px);
  padding: clamp(26px, 4vw, 42px) clamp(20px, 4vw, 40px) clamp(20px, 3vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(560px 300px at 50% -14%, var(--beam-soft), transparent 68%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* 계약서 내지 — 안쪽에 한 겹 더 그은 가는 선 */
.lh-pledge::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
  opacity: 0.7;
  pointer-events: none;
}
/* 상단 빛줄기 */
.lh-pledge::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--beam), transparent);
  opacity: 0.5;
  pointer-events: none;
}
.lh-pledge-head { display: grid; justify-items: center; gap: 7px; text-align: center; }
.lh-pledge-rune { display: block; filter: drop-shadow(0 0 16px rgba(244, 183, 94, 0.3)); }
.lh-pledge-rune img { display: block; width: clamp(36px, 4vw, 48px); height: auto; }
html[data-theme="light"] .lh-pledge-rune { filter: drop-shadow(0 2px 6px rgba(20, 32, 44, 0.18)); }
html[data-theme="light"] .lh-pledge-rune img {
  filter: drop-shadow(0 0 1px rgba(20, 32, 44, 0.6)) drop-shadow(0 1px 1px rgba(20, 32, 44, 0.35));
}
.lh-pledge-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--beam);
}
.lh-pledge-title {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.26;
  letter-spacing: -0.025em;
  outline: none;
}
.lh-pledge-rule { display: flex; align-items: center; gap: 10px; }
.lh-pledge-rule::before,
.lh-pledge-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.lh-pledge-rule span {
  width: 6px;
  height: 6px;
  border: 1px solid var(--beam);
  transform: rotate(45deg);
}
.lh-pledge-clauses { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.lh-pledge-clauses li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: start;
}
.lh-pledge-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--beam);
  padding-top: 4px;
}
.lh-pledge-clauses p {
  margin: 0;
  font-size: clamp(14.5px, 1.5vw, 16.5px);
  line-height: 1.72;
  color: var(--ink);
  text-wrap: pretty;
}
.lh-pledge-clauses li:first-child p { color: var(--ink-2); }
.lh-pledge-clauses li:last-child p { font-weight: 600; }
.lh-pledge-check {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: border-color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out);
}
.lh-pledge-check:hover { border-color: var(--beam); }
.lh-pledge-check input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.lh-pledge-box {
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  transition: border-color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out), box-shadow var(--dur-hover-out) var(--ease-out);
}
.lh-pledge-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--beam);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg) scale(0.6);
  opacity: 0;
  transition: opacity var(--dur-hover-out) var(--ease-out), transform var(--dur-hover-out) var(--ease-out);
}
.lh-pledge-check input:checked + .lh-pledge-box {
  border-color: var(--beam);
  background: var(--beam-soft);
  box-shadow: inset 0 0 0 1px var(--beam);
}
.lh-pledge-check input:checked + .lh-pledge-box::after { opacity: 1; transform: rotate(42deg) scale(1); }
.lh-pledge-check input:focus-visible + .lh-pledge-box { outline: 2px solid var(--beam); outline-offset: 2px; }
.lh-pledge-check-text { font-size: 13.5px; line-height: 1.55; font-weight: 600; color: var(--ink); }
.lh--pledge.is-sworn .lh-pledge-check { border-style: solid; border-color: var(--beam); background: var(--beam-soft); }
.lh-pledge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}
.lh-pledge-go {
  font-size: 16px;
  padding: 14px 30px;
  border-radius: 999px;
  box-shadow: 0 16px 40px -20px var(--beam);
  transition: opacity var(--dur-hover-out) var(--ease-out);
}
.lh-pledge-go:disabled {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}
.lh-pledge-hint {
  margin: -6px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.lh--pledge.is-sworn .lh-pledge-hint { display: none; }
.lh-pledge-go:focus-visible { outline: 2px solid var(--beam); outline-offset: 3px; }
.lh-pledge-back {
  width: auto;
  border: 0;
  border-radius: 8px;
  padding: 6px 4px;
  color: var(--muted);
}
.lh-pledge-back:hover { color: var(--beam); border: 0; }
.lh-pledge-sign {
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  opacity: 0.8;
}

.lh--wizard,
.lh--result {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: calc(100vh - 230px);
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(4px, 2vh, 20px) 0;
}
.lh-stepper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 24px;
}
.lh-stepper .text-btn,
.lh-wizard-nav .text-btn {
  width: auto;
  border: 0;
  border-radius: 8px;
  padding: 6px 2px;
  color: var(--muted);
}
.lh-stepper .text-btn:hover,
.lh-wizard-nav .text-btn:hover { color: var(--beam); border: 0; }
.lh-progress {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.lh-dots { display: inline-flex; gap: 4px; }
.lh-dots i {
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}
.lh-dots i.is-on { background: var(--beam); }

.lh-panel {
  display: grid;
  gap: clamp(14px, 2.4vw, 20px);
  padding: clamp(20px, 3.4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 260px at 100% 0%, var(--beam-soft), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.lh-q {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.025em;
  outline: none;
}
.lh-q--sub {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.lh-summary {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.lh-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lh-choices--seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lh-choices--tiers { grid-template-columns: minmax(0, 1fr); }
.lh-choices--diff { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lh-choice {
  display: grid;
  gap: 3px;
  align-content: start;
  justify-items: center;
  text-align: center;
  padding: 15px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  min-width: 0;
  transition: border-color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out);
}
.lh-choice:hover { border-color: var(--line-strong); }
.lh-choice:hover > *,
.lh-choice:focus-visible > * { transform: translateY(-1px); }
.lh-choice > * { transition: transform var(--dur-hover-in) var(--ease-out); }
.lh-choice:focus-visible { outline: 2px solid var(--beam); outline-offset: 2px; }
.lh-choice.is-on {
  border-color: var(--beam);
  background: var(--beam-soft);
  box-shadow: inset 0 0 0 1px var(--beam);
}
.lh-choice-label { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.lh-choice-sub { font-size: 11.5px; color: var(--muted); }
.lh-choice-hint { font-size: 11px; line-height: 1.4; color: var(--ink-2); }
.lh-choices--tiers .lh-choice { justify-items: start; text-align: left; padding: 16px 18px; }

/* 분야 선택 — 다섯 장의 카드(게임 · 애니 · 영화 · 만화 · 전체 랜덤) */
.lh-cat-lede {
  margin: -6px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.lh-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.lh-cat {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: start;
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  min-width: 0;
  transition: border-color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out);
}
.lh-cat:hover {
  border-color: var(--line-strong);
}
.lh-cat:hover > *,
.lh-cat:focus-visible > * { transform: translateY(-1px); }
.lh-cat > * { transition: transform var(--dur-hover-in) var(--ease-out); }
.lh-cat:focus-visible { outline: 2px solid var(--beam); outline-offset: 2px; }
.lh-cat.is-on {
  border-color: var(--beam);
  background: var(--beam-soft);
  box-shadow: inset 0 0 0 1px var(--beam);
}
.lh-cat-label { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.lh-cat-sub { font-size: 11.5px; color: var(--muted); }
.lh-cat-hint { font-size: 11px; line-height: 1.4; color: var(--ink-2); }
.lh-cats .lh-cat:last-child { grid-column: 1 / -1; }

/* 결과 카드의 분야 배지 */
.lh-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.lh-cat-badge--game { border-color: var(--sea); background: var(--sea-soft); color: var(--sea); }
.lh-cat-badge--anime { border-color: var(--beam); background: var(--beam-soft); color: var(--beam); }
.lh-cat-badge--movie { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.lh-cat-badge--manga { border-color: var(--green); background: var(--green-soft); color: var(--green); }


.lh-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.lh-count { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.lh-count.is-empty { color: var(--muted); }
.lh-draw { justify-self: start; font-size: 16px; padding: 13px 26px; }
.lh-draw:disabled { opacity: 0.45; cursor: not-allowed; }

.lh--result .lh-result-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--beam);
}
.lh-diff {
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.lh-diff--chill { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.lh-diff--normal { border-color: var(--sea); background: var(--sea-soft); color: var(--sea); }
.lh-diff--hardcore { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.lh-badge-diff { font-size: 10px; color: var(--muted); }
.lh-locked { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

@media (max-width: 720px) {
  .lh--landing,
  .lh--wizard,
  .lh--result { padding-top: 0; }
  .lh--pledge { min-height: auto; padding: 0; }
  .lh-pledge { padding: 22px 16px 18px; gap: 15px; }
  .lh-pledge::before { inset: 6px; }
  .lh-pledge-title { font-size: 21px; }
  .lh-pledge-clauses { gap: 12px; }
  .lh-pledge-clauses li { grid-template-columns: 24px minmax(0, 1fr); gap: 2px 8px; }
  .lh-pledge-clauses p { font-size: 14px; line-height: 1.66; }
  .lh-pledge-check { padding: 12px 13px; gap: 10px; }
  .lh-pledge-check-text { font-size: 12.8px; }
  .lh-pledge-actions { flex-direction: column; gap: 4px; }
  .lh-pledge-go { width: 100%; padding: 14px 18px; }
  .lh-pledge-back { width: 100%; }
  .lh-landing { padding: clamp(18px, 4.6vh, 42px) 4px 12px; gap: 20px; }
  .lh-symbol { margin-bottom: 0; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55)); }
  .lh-symbol img { height: clamp(104px, 17vh, 140px); }
  .lh-landing-title { font-size: clamp(26px, 8vw, 34px); }
  .lh-start { width: 100%; max-width: 320px; padding: 15px 20px; }
  .lh-choices--diff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lh-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .lh-cats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lh-cat { padding: 13px 14px; }
  .lh-cat-label { font-size: 15px; }
  .lh-cat-hint { font-size: 10.5px; }
  .lh-choice { padding: 12px 6px; }
  .lh-choice-label { font-size: 13.5px; }
  .lh-choice-sub { font-size: 10.5px; }
  .lh-choice-hint { font-size: 10px; }
  .lh-panel { padding: 18px 14px; }
  .lh-q { font-size: 20px; }
  .lh-draw { width: 100%; }
  .lh-wizard-nav .primary-btn { padding: 12px 18px; }
}

/* 보상형 광고 슬롯(정식 출시 전 테스트) */
.modal--ad { max-width: 520px; }
.lh-ad-slot {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background:
    repeating-linear-gradient(135deg, var(--beam-soft) 0 10px, transparent 10px 20px),
    var(--card);
  text-align: center;
}
.lh-ad-tag {
  padding: 2px 8px;
  border: 1px solid var(--beam);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--beam);
}
.lh-ad-copy { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.lh-ad-sub { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.lh-ad-count { font-family: var(--mono); font-size: 34px; line-height: 1; color: var(--beam); }
.lh-ad-count small { margin-left: 4px; font-size: 12px; color: var(--muted); }
.lh-ad-actions { display: flex; justify-content: center; margin-top: 14px; }

@media (max-width: 720px) {
  .lh-controls { padding: 12px 12px 14px; gap: 10px; grid-template-columns: minmax(0, 1fr); }
  .lh-card { padding: 15px; }
  .lh-game-name { font-size: 19px; }
  .lh-quest { padding: 13px; }
  .lh-quest-title { font-size: 16.5px; }
  .lh-actions .primary-btn, .lh-actions .ghost-btn { flex: 1 1 100%; justify-content: center; }
  .lh-badge-text b { max-width: 18ch; }
}

/* 등대 액션 행 — 상세 보기는 링크 폭만 차지하게 */
.lh-actions .text-btn { flex: 0 0 auto; }

@media (max-width: 720px) {
  .lh-draw-row { flex-direction: column; align-items: stretch; }
  .lh-draw { width: 100%; white-space: normal; }
  .lh-hint { width: 100%; }
}

/* 상단 탭은 줄바꿈 대신 가로 스크롤 — EN 라벨이 두 줄로 늘어나지 않게 */
.domain-tabs button { white-space: nowrap; }

@media (max-width: 720px) {
  .domain-tabs { gap: 2px; }
  .domain-tabs button { padding: 6px 10px; font-size: 12.5px; }
}

@media (max-width: 420px) {
  .domain-tabs { gap: 0; }
  .domain-tabs button { padding: 6px 4px; letter-spacing: -0.01em; }
}

/* ------------------------------- v31 — 도메인 6개(앱·게임·AI 도구·영화·애니·만화) 상단 탭 */
/* 탭이 8개(등대·전체 탐색 + 도메인 6)가 되면서 한 줄에 브랜드·탭·도구가 다 들어가지 않는 폭이 생긴다.
   넓은 화면은 한 줄, 중간 폭은 탭을 자기 줄로 내리고, 모바일은 4×2 격자로 접어 가로 스크롤을 없앤다. */
@media (min-width: 1440px) {
  .topbar { max-width: 1360px; gap: 14px; }
  .domain-tabs { gap: 2px; }
  .domain-tabs button { padding: 7px 11px; font-size: 13px; }
}
@media (max-width: 1439px) {
  /* 탭은 둘째 줄 — 브랜드·도구 줄과 분명히 떨어뜨리고, 아래 분야 바와 붙지 않게 여백을 둔다. */
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 8px;
    padding-bottom: 10px;
  }
  .topbar > .brand { grid-column: 1; grid-row: 1; }
  .topbar > .topbar-side { grid-column: 2; grid-row: 1; }
  .topbar > .domain-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
  }
}
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr; }
  .topbar > .brand { grid-column: 1; grid-row: 1; }
  .topbar > .topbar-side { grid-column: 1; grid-row: 2; justify-self: stretch; justify-content: flex-start; flex-wrap: wrap; }
  .topbar > .domain-tabs { grid-column: 1; grid-row: 3; }
  .domain-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 2px;
    padding: 3px;
    border-radius: 16px;
    overflow: visible;
  }
  .domain-tabs button { padding: 7px 2px; font-size: 12px; text-align: center; }
}
@media (max-width: 420px) {
  .topbar-side { gap: 4px; }
  .topbar-side .ghost-btn { padding: 6px 7px; font-size: 11px; }
  .topbar-side .ghost-btn .ghost-ico { margin-right: 2px; }
  .lang-toggle button { padding: 5px 8px; font-size: 11px; }
}
@media (max-width: 420px) {
  /* 아주 좁은 폭에서는 도구 버튼의 장식 아이콘을 빼고 한 줄에 담는다(라벨·aria 는 그대로). */
  .topbar-side .ghost-ico { display: none; }
  .topbar-side .ghost-btn { padding: 6px 8px; }
}

/* ==========================================================================
   v40 — 상단 3축 모드(🚨 등대 · 🧭 추천 · 📖 도감) · 2차 분야 바 · 도감 포스터 그리드
   --------------------------------------------------------------------------
   · 상단은 세로 높이를 줄여 첫 화면에서 콘텐츠가 먼저 보이게 한다(모드 바 → 분야 바 → 콘텐츠).
   · 도감은 '포스터 + 제목' 카드의 고밀도 그리드다 — 모바일 3열, 데스크톱 5~6열.
     카드에는 완결 칩만 아주 작게 얹고, 사전 꼬리표·한 줄 개요·제작사 줄은 싣지 않는다.
   ========================================================================== */

/* ---------------------------------------------------------------- 상단 밀도 */

.topbar { padding: 10px 22px 6px; gap: 14px; }
.brand { gap: 10px; }
.wordmark { font-size: 18px; letter-spacing: 0.26em; gap: 8px; }
.wordmark-sub { font-size: 11px; letter-spacing: 0.12em; }
.dataset-chip { padding: 4px 10px; font-size: 11px; }
.topbar-side { gap: 6px; }
.ghost-btn { padding: 5px 11px; gap: 6px; }
.lang-toggle button { min-height: 26px; }

/* 상단 모드 바 — 3개 굵직한 축이 한 줄에 또렷하게 들어간다. */
.mode-tabs { gap: 2px; padding: 3px; }
.mode-tabs button { font-size: 13.5px; padding: 6px 18px; letter-spacing: -0.01em; }
.mode-tabs button[aria-selected="true"] { background: var(--beam-soft); }

/* 2차 분야 바 — 추천·도감 모드가 함께 쓴다. 스크롤해도 상단에 붙어 분야를 바꿀 수 있다. */
.domain-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  max-width: 1240px;
  margin: 0 auto;
  padding: 5px 22px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  /* 스크롤해도 뒤 콘텐츠가 비쳐 보이지 않게 — 반투명 그라데이션 대신 배경색으로 막는다. */
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.domain-bar::-webkit-scrollbar { display: none; }
.domain-bar .domain-chip { padding: 4px 10px; font-size: 12px; }
.domain-bar .domain-chip b { font-size: 10px; }

.view { padding: 8px 22px 48px; gap: 14px; }
.level { gap: 14px; }

/* ------------------------------------------------------------ 도감 머리말 */

/* 도감에서는 경로 줄이 히어로와 겹치므로 감춘다 — 모드 바가 이미 '도감'을 말한다. */
body.is-encyclopedia .crumb-bar { display: none; }
body.is-encyclopedia .view { padding-top: 4px; gap: 10px; }

.enc-mode { display: grid; gap: 10px; }
.enc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px 16px;
  flex-wrap: wrap;
  padding: 2px 0 0;
}
.enc-head-main { display: grid; gap: 1px; min-width: 0; }
.enc-head .eyebrow { margin: 0; font-size: 10px; letter-spacing: 0.14em; }
.enc-head h1 { margin: 0; font-size: clamp(19px, 2.1vw, 23px); line-height: 1.2; letter-spacing: -0.02em; }
.enc-h1-sub { margin-left: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.enc-head-meta {
  margin: 0 0 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ------------------------------------------------------------ 검색·정렬·필터 */

.enc-toolbar {
  position: sticky;
  top: 36px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
}
/* v48.1 — 지우기는 입력칸 '안쪽 우측'의 작은 × 다.
   텍스트 버튼이 입력칸과 나란히 flex 로 놓이면 1글자만 쳐도 입력칸 폭을 다 먹어 글자가 가려졌다. */
.enc-search { flex: 1 1 240px; min-width: 0; display: block; position: relative; margin: 0; }
.enc-search input {
  width: 100%;
  height: 32px;
  padding: 0 32px 0 28px;
  font-size: 13px;
  border-radius: 9px;
  /* 모바일 사파리·크롬의 기본 지우기 아이콘과 겹치지 않게 직접 만든 × 하나만 남긴다. */
  -webkit-appearance: none;
  appearance: none;
}
.enc-search input::-webkit-search-cancel-button,
.enc-search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.enc-search .search-ico { left: 9px; font-size: 13px; }
.enc-search-clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  line-height: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.enc-search-clear[hidden] { display: none !important; }
.enc-search-clear svg { width: 10px; height: 10px; display: block; }
.enc-search-clear svg path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.enc-search-clear:hover { color: var(--ink); background: var(--line); }
.enc-search-clear:active { background: rgba(136, 178, 222, 0.24); }
.enc-search-clear:focus-visible { outline: 2px solid var(--beam); outline-offset: 1px; color: var(--ink); }
.enc-toolbar .select-row { margin: 0; gap: 0; flex: 0 0 auto; }
.enc-toolbar .select-label { display: none; }
.enc-toolbar .select-row select { height: 32px; padding: 0 8px; font-size: 12px; border-radius: 9px; }
.enc-filters { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.enc-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.enc-filter:hover { color: var(--ink); border-color: var(--line-strong); }
.enc-filter:has(input:checked) { color: var(--beam); border-color: var(--beam); background: var(--beam-soft); }
.enc-filter input { accent-color: var(--beam); margin: 0; width: 12px; height: 12px; }
.enc-count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------ 장르·비교군 칩 바 */

.enc-genres {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0 2px;
}
.enc-genres::-webkit-scrollbar { display: none; }
.enc-genre {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-hover-out) var(--ease-out), border-color var(--dur-hover-out) var(--ease-out), background var(--dur-hover-out) var(--ease-out);
}
.enc-genre b { font-family: var(--mono); font-size: 9.5px; font-weight: 600; color: var(--unknown); }
.enc-genre:hover { color: var(--ink); border-color: var(--line-strong); }
.enc-genre:focus-visible { outline: 2px solid var(--sea); outline-offset: 1px; }
.enc-genre.is-on { color: var(--beam); border-color: var(--beam); background: var(--beam-soft); }
.enc-genre.is-on b { color: var(--beam); }
.enc-genres--sub { padding-top: 0; }
.enc-genre--sm { height: 24px; padding: 0 9px; font-size: 11px; background: transparent; }

/* ------------------------------------------------- 도감 포스터 카드 그리드 */

.enc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px 12px;
}
.enc-card {
  position: relative;
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.enc-card:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }

/* 카드의 주인공 — 정사각 포스터. 이미지가 없으면 이름 첫 글자 배지가 그 자리를 지킨다. */
.item-icon--poster {
  display: grid;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.26);
  transition: transform var(--dur-hover-in) var(--ease-out), border-color var(--dur-hover-out) var(--ease-out), box-shadow var(--dur-hover-out) var(--ease-out);
}
.item-icon--poster::before { font-size: 26px; }
.enc-card:hover .item-icon--poster,
.enc-card:focus-visible .item-icon--poster {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
}
html[data-theme="light"] .item-icon--poster { box-shadow: 0 1px 3px rgba(20, 32, 44, 0.14); }
html[data-theme="light"] .enc-card:hover .item-icon--poster { box-shadow: 0 6px 16px rgba(20, 32, 44, 0.18); }

/* 완결된 작품만 포스터 좌상단에 아주 작게 — 배지를 더 얹지 않는다. */
.enc-done-chip {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  background: rgba(8, 10, 14, 0.64);
  color: #f1f4f9;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
}
html[data-theme="light"] .enc-done-chip {
  background: rgba(255, 255, 255, 0.86);
  color: #1b2431;
}

.enc-card-body { display: grid; gap: 2px; min-width: 0; }
.enc-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
  min-height: calc(2 * 1.35em);
}
.enc-card-sub {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.enc-foot { display: grid; justify-items: center; gap: 6px; padding: 14px 0 4px; }
.enc-more { min-width: 200px; justify-content: center; }
.enc-done { margin: 0; font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------- 추천·모달 밀도 정돈 */

.grid { gap: 12px; }
.card { padding: 14px 14px 10px; gap: 8px; }
.card h3 { font-size: 18px; }
.one-liner { -webkit-line-clamp: 2; }
.level-head { padding: 6px 0 2px; }

/* 상세 모달 배지 줄 — 제목보다 튀지 않게 작고 조용하게, 아이콘·제목과 윗선을 맞춘다. */
.modal-icon-slot { padding-top: 0; }
#modalChips { gap: 4px; }
#modalChips .chip { font-size: 10px; padding: 1px 7px; letter-spacing: 0; }
#modalChips .chip--arena { color: var(--ink-2); border-color: var(--line); background: var(--card-2); }
#modalChips .chip--cat { font-weight: 700; }
.modal-titles h2 { font-size: 24px; }

/* ------------------------------------------------------------------ 좁은 폭 */

@media (max-width: 1100px) {
  .enc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; }
}

@media (max-width: 900px) {
  .enc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 9px; }
}

@media (max-width: 720px) {
  /* 모바일 상단은 두 줄로 접는다 — 1줄: 브랜드 + KO/EN, 2줄: 보관함·방법론·미세조정·테마. */
  .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 14px 4px;
    gap: 4px 6px;
    justify-content: flex-start;
  }
  .topbar > .brand { flex: 0 0 100%; }
  .topbar > .topbar-side { display: contents; }
  .brand { order: 1; flex: 0 0 100%; padding-right: 84px; }
  #bookmarkBtn, #methodBtn, #tuneBtn, #themeToggle { order: 2; }
  #domainTabs { order: 3; }
  #langToggle { position: absolute; top: 9px; right: 14px; }
  #themeToggle #themeLabel { display: none; }
  #themeToggle { padding-left: 9px; padding-right: 9px; }
  /* 라벨을 감춘 두 버튼(방법론·테마)은 아이콘이 유일한 표시라 다시 보이게 한다. */
  #methodBtn .ghost-ico, #themeToggle .ghost-ico { display: inline; }
  .mark { width: 32px; height: 32px; }
  .wordmark { font-size: 15px; letter-spacing: 0.2em; }
  .wordmark-sub { font-size: 10px; }
  .dataset-chip { display: none; }
  .topbar-side .ghost-btn { padding: 5px 9px; font-size: 11.5px; }
  #methodBtn .ghost-ico { margin: 0; }
  .mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 14px; }
  .mode-tabs button { padding: 6px 2px; font-size: 12.5px; text-align: center; }
  .domain-bar { padding: 4px 14px 5px; flex-wrap: wrap; overflow-x: visible; }
  .domain-bar .domain-chip { padding: 4px 9px; font-size: 11.5px; gap: 4px; }
  .domain-bar .domain-chip b { display: none; }
  .view { padding: 6px 14px 36px; gap: 10px; }
  body.is-encyclopedia .view { padding-top: 2px; gap: 8px; }

  .enc-head { align-items: flex-start; gap: 2px; }
  .enc-head h1 { font-size: 19px; }
  .enc-head-meta { font-size: 10px; margin: 2px 0 0; }
  .enc-toolbar { position: static; padding: 6px 8px; gap: 6px; border-radius: 11px; }
  .enc-search { flex: 1 1 55%; }
  .enc-toolbar .select-row { flex: 0 0 auto; min-width: 100px; }
  .enc-toolbar .select-row select { width: 100%; }
  .enc-filters { flex: 0 1 auto; gap: 3px; }
  .enc-filter { height: 26px; padding: 0 8px; font-size: 11px; }
  .enc-count { margin-left: auto; }
  .enc-genre { height: 25px; padding: 0 9px; font-size: 11px; }
  .enc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 7px; }
  .enc-card { gap: 5px; }
  .item-icon--poster { border-radius: 8px; }
  .item-icon--poster::before { font-size: 20px; }
  .enc-done-chip { top: 4px; left: 4px; padding: 0 4px; font-size: 9px; }
  .enc-card-title { font-size: 12px; line-height: 1.32; min-height: calc(2 * 1.32em); }
  .enc-card-sub { font-size: 10.5px; }
}

@media (max-width: 380px) {
  .enc-grid { gap: 12px 6px; }
  .enc-card-title { font-size: 11.5px; }
}

/* ==========================================================================
   v3.50 — 모바일 위계·여백 개편 (390×844 기준)
   --------------------------------------------------------------------------
   지적: 모바일에서 주인공인 세 축(🚨 등대 · 🧭 추천 · 📖 도감)보다
        보조 도구(보관함·방법론·내 기준 미세조정·테마)가 위에, 더 크게 보였고,
        글과 버튼이 붙어 보이는 곳이 있었다.
   처방: 1) 1줄 브랜드(+테마·KO/EN) → 2줄 세 축 탭(가장 큼) → 3줄 보조 칩(작고 낮은 대비).
        2) 글 → 액션 사이 세로 여백을 8px 이상으로 벌린다.
   데스크톱(721px 이상)은 이 블록의 영향을 받지 않는다.
   ========================================================================== */

@media (max-width: 720px) {
  /* ---- 1) 상단 위계: 브랜드 줄 → 세 축 탭 줄 → 보조 칩 줄 ---- */
  .topbar { padding: 8px 14px 8px; gap: 8px; }

  /* 1줄: 브랜드 · (테마 · KO/EN) — 한 줄에 담고 오른쪽 끝으로 민다. */
  .topbar > .brand { order: 1; flex: 0 1 auto; min-width: 0; width: auto; padding-right: 0; }
  #themeToggle, #langToggle { order: 1; }
  #themeToggle { margin-left: auto; min-height: 32px; padding: 4px 10px; }
  #langToggle { position: static; margin-left: 0; }
  .lang-toggle button { min-height: 32px; }

  /* 2줄: 세 축 모드 탭 — 이 화면의 주인공. 폭 전체·가장 큰 글자·가장 높은 터치. */
  #domainTabs {
    order: 2;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
  }
  .mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 18px;
  }
  .mode-tabs button {
    min-height: 48px;
    padding: 10px 4px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
  }
  .mode-tabs button[aria-selected="true"] {
    box-shadow: inset 0 0 0 1.5px var(--beam);
    color: var(--beam);
  }
  /* EN 라벨(Recommendations·Encyclopedia)은 길어서 같은 크기로는 칸을 넘는다 —
     한 줄을 유지한 채 글자만 줄여 세 칸에 고르게 담는다. */
  html[lang="en"] .mode-tabs {
    grid-template-columns: 0.9fr 1.2fr 1fr;
  }
  html[lang="en"] .mode-tabs button {
    font-size: 11.5px;
    letter-spacing: -0.02em;
    padding-left: 2px;
    padding-right: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 3줄: 보조 칩 — 탭보다 한 단계 작고, 강조 테두리 없이 낮은 대비로 뒤에 선다. */
  #bookmarkBtn, #methodBtn, #tuneBtn { order: 3; }
  .topbar-side .ghost-btn {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 11.5px;
    color: var(--muted);
    background: transparent;
    border-color: var(--line);
  }
  .topbar-side .ghost-btn:hover { color: var(--ink); border-color: var(--line-strong); }
  #tuneBtn { border-color: var(--line); color: var(--muted); background: transparent; }
  #tuneBtn .ghost-ico { color: var(--beam); }
  #themeToggle { color: var(--muted); border-color: var(--line); }
  .count-pill { height: 16px; min-width: 16px; font-size: 9.5px; }

  /* ---- 2) 글 → 액션 사이 여백 ---- */

  /* 추천 첫 화면 히어로: 검색·지표·보조 링크 */
  .hero--compact { gap: 14px; }
  .hero--compact .hero-lead { gap: 6px; }
  .hero--compact .lede { line-height: 1.62; }
  .hero--compact .home-search { margin-top: 4px; }
  .hero--compact .hero-meta { gap: 8px 14px; line-height: 1.5; }
  .hero-meta-actions { margin-top: 8px; gap: 8px; }
  .hero-meta-actions .text-btn { min-height: 36px; padding: 6px 12px; font-size: 12px; }

  /* 장르별 추천 카드: 머리(제목·지표) 아래 목록 */
  .genre-showcase .section-head { margin-bottom: 4px; }
  .genre-list { gap: 12px; }
  .genre-block { gap: 12px; padding: 13px 13px 15px; }
  .genre-head { gap: 8px 10px; }
  .pick-row { gap: 9px; }

  /* 섹션 머리 → 안내문 */
  .section-sub { margin: 0; }
  .home-block { gap: 13px; }

  /* 도감 머리 → 검색·필터 바 */
  .enc-mode { gap: 12px; }
  body.is-encyclopedia .view { gap: 12px; }
  .enc-head { gap: 8px 12px; }
  .enc-head-main { gap: 3px; }
  .enc-head-meta { margin: 2px 0 0; line-height: 1.6; }
  .enc-toolbar { gap: 8px; padding: 8px 9px; }
  .enc-filters { gap: 6px; row-gap: 7px; }

  /* 도감·작품 상세 모달: 제목·메타 아래 액션 줄, 안내문 아래 본문 */
  .modal-head { gap: 10px; padding: 15px 58px 14px 16px; }
  .modal-titles { gap: 7px; }
  .modal-actions { margin-top: 6px; gap: 8px; }
  .modal-body { gap: 22px; padding: 18px 16px 30px; }
  .m-sec { gap: 12px; }
  .m-sec-head + p, .m-sec > p { margin-top: 2px; }

  /* 등대 랜딩: 안내문 → 목표 탐색 버튼 → 예시 목표 (v3.57 순서·여백)
     버튼이 예시 위로 올라와 첫 화면 안에서 바로 눌 수 있게 하고,
     글·버튼·예시 사이는 한 단계씩 벌려 숨통을 틔운다. */
  .lh-landing { gap: 22px; }
  .lh-landing-lede { margin-top: 2px; line-height: 1.72; }
  .lh-start { margin-top: 8px; padding: 16px 30px; }
  .lh-samples { margin-top: 12px; gap: 12px; }
  .lh-samples-list { gap: 11px; }

  /* 등대 서약: 조항 → 체크 → 버튼 */
  .lh-pledge { gap: 18px; }
  .lh-pledge-clauses { gap: 16px; }
  .lh-pledge-actions { gap: 12px 14px; margin-top: 4px; }
  .lh-pledge-hint { margin-top: 0; }

  /* 등대 위저드·결과 카드: 카드 머리 → 퀘스트 → 액션 */
  .lh-controls { gap: 14px; padding: 14px 13px; }
  .lh-card { gap: 16px; padding: 16px 15px; }
  .lh-card-id { gap: 6px; }
  .lh-quest { gap: 11px; padding: 15px 14px; }
  .lh-quest-kicker { gap: 8px; margin-bottom: 2px; }
  .lh-actions { gap: 10px 12px; margin-top: 2px; }
  .lh-draw-row { gap: 10px 14px; }
  .lh-stepper { gap: 10px; }
  .lh-wizard-nav { gap: 10px 12px; }

  /* 일반 액션 줄 */
  .text-btn { padding: 7px 2px; }
  .card-more { padding: 8px 0; }

  /* 미세조정 서랍: 제목 → 설명 → 컨트롤 */
  #tuneBody .panel-head { margin-bottom: 8px; }
  #tuneBody .hint { margin: 10px 0 14px; }
  #tuneBody .mini-label { margin: 16px 0 8px; }
  .weight { gap: 8px; }
  .weights { gap: 14px; }
  .filter-list { gap: 2px; margin-bottom: 14px; }
}

@media (max-width: 420px) {
  /* 아주 좁은 폭에서도 세 축 탭의 글자 크기는 그대로 둔다(360px 실측 KO '🚨 등대' ≈ 66px < 칸 105px).
     EN 라벨은 위 `html[lang="en"]` 규칙이 따로 줄인다. */
  #themeToggle .ghost-ico { display: inline; }
  .topbar-side .ghost-btn { padding: 4px 8px; }
}

/* v3.50.1 — 721~900px 대역에서 데이터 칩(`기준 v0.9.0 · 13,686건 · 비교군 101`)이
   브랜드 워드마크 위로 겹쳐 글자가 뭉개지던 것(768px 실측). 720px 이하에서 이미 숨기는 칩이라
   같은 기준으로 900px 까지 숨기고, 좁은 대역에서는 도구 줄이 줄바꿈을 허용한다. */
@media (max-width: 900px) and (min-width: 721px) {
  .dataset-chip { display: none; }
  .topbar-side { flex-wrap: wrap; }
}

/* v3.52 — 첫 화면·검색 지연 로딩 스켈레톤.
   search-index.json(10MB)을 첫 화면에서 받지 않게 되면서, 도착 전 빈 화면 대신
   카드 자리와 안내 한 줄을 보여 준다(레이아웃 시프트 없는 고정 높이). */
.skeleton {
  display: grid;
  gap: 14px;
  padding: 18px 0 8px;
}
.skeleton-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.skeleton-note small {
  color: var(--muted);
  opacity: 0.8;
  font-size: 12px;
}
.skeleton-spin {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--beam);
  animation: skeleton-spin 0.9s linear infinite;
  flex: none;
}
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.skeleton-card {
  display: block;
  height: 104px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%);
  background-size: 240% 100%;
  animation: skeleton-sheen 1.5s var(--ease-in-out) infinite;
}
.search-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 2px;
  color: var(--muted);
  font-size: 13px;
}
@keyframes skeleton-spin {
  to { transform: rotate(360deg); }
}
@keyframes skeleton-sheen {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-card, .skeleton-spin { animation: none; }
}

/* ==========================================================================
   v3.56 — 헤더 `?` 메뉴 통합 & 등대 탭 아이콘
   --------------------------------------------------------------------------
   지적: 1줄(브랜드·테마·KO/EN) 아래 3줄로 보관함·방법론·내 기준 미세조정이
        따로 서 있어 상단이 세 줄로 부풀었고, 세 축 탭의 등대는 우리 등대가
        아닌 🚨 이모지였다.
   처방: 1) 세 버튼을 KO/EN 오른쪽 `?` 하나로 모으고, 누르면 아래로 작은
           팝업(보관함 · 방법론 · 내 기준 미세조정)이 내려온다.
        2) 보관함에 하나라도 담기면 `?` 우상단에 작은 금색 점.
        3) 등대 탭은 등대 히어로와 같은 결의 라인 SVG(활성=금색, 비활성=뮤트).
   모바일은 1줄(브랜드 · 테마 · KO/EN · ?) → 2줄(세 축 탭)로 끝나고 3줄이 사라진다.
   ========================================================================== */

/* ---------------------------------------------------------------- `?` 버튼 */
.help-menu { position: relative; display: inline-flex; flex: none; }
.topbar .help-btn {
  position: relative;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  justify-content: center;
  gap: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-2);
}
.topbar .help-btn .help-mark { display: grid; place-items: center; transform: translateY(-0.5px); }
.topbar .help-btn .ico { width: 18px; height: 18px; }
.topbar .help-btn:hover { border-color: var(--line-strong); color: var(--beam); }
.topbar .help-btn:focus-visible { outline: 2px solid var(--beam); outline-offset: 2px; }
.topbar .help-btn[aria-expanded="true"] { border-color: var(--beam); color: var(--beam); background: var(--beam-soft); }
.help-dot {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--beam);
  box-shadow: 0 0 0 2px var(--panel-solid);
}
.help-dot[hidden] { display: none; }

/* 팝업 — 버튼 아래로 내려오는 작은 메뉴. 테마 변수를 그대로 써서 다크/라이트가 함께 바뀐다. */
.help-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 2px;
  min-width: 208px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft), 0 18px 44px rgba(0, 0, 0, 0.32);
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--dur-panel) var(--ease-out),
    transform var(--dur-panel) var(--ease-out),
    visibility 0s;
}
.help-pop[hidden] {
  display: grid;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity var(--dur-panel) var(--ease-out),
    transform var(--dur-panel) var(--ease-out),
    visibility 0s var(--dur-panel);
}
.help-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.help-item:hover { background: var(--card-2); color: var(--ink); }
.help-item:focus-visible { outline: 2px solid var(--beam); outline-offset: -2px; color: var(--ink); }
/* v3.69 — 제보·요청 항목은 새 탭 링크(<a>)다. 전역 `a:hover` 밑줄을 끄고 외부 표시만 오른쪽에 둔다. */
.help-item--link, .help-item--link:hover { text-decoration: none; }
.help-ext { flex: none; color: var(--muted); font-size: 11px; line-height: 1; }
.help-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  color: var(--beam);
  font-size: 12px;
  line-height: 1;
}
.help-ico .ico { width: 16px; height: 16px; }
.help-label { flex: 1 1 auto; white-space: nowrap; }
.help-item .count-pill { flex: none; height: 17px; min-width: 17px; font-size: 10px; }
/* 팝업이 열려 있는 동안 상단 바가 2차 분야 바(z 12) 위로 올라와야 팝업이 가려지지 않는다. */
body.help-open .topbar { z-index: 40; }

/* ------------------------------------------------------------- 등대 탭 아이콘 */
.mode-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mode-tabs .mode-ico {
  flex: none;
  display: block;
  width: 21px;
  height: 21px;
  stroke: currentColor;
}
.mode-tabs .mode-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  /* 1줄: 브랜드 · (테마 · KO/EN · ?) — `?` 는 언어 전환 오른쪽 끝. */
  #helpMenu { order: 1; }
  .topbar .help-btn { width: 32px; height: 32px; font-size: 13px; }
  .help-dot { top: 3px; right: 4px; width: 5.5px; height: 5.5px; }
  .help-pop { top: calc(100% + 6px); min-width: 200px; }
  .help-item { min-height: 40px; font-size: 13px; }
  .mode-tabs .mode-ico { width: 22px; height: 22px; }
}

@media (max-width: 420px) {
  .topbar .help-btn { width: 30px; height: 30px; padding: 0; }
  .topbar-side .help-item { padding: 4px 8px; }
}

/* 360px 대역 — 브랜드(로고+워드마크+파로스) · 테마 · KO/EN · `?` 네 가지가 한 줄에 남도록
   브랜드 쪽을 반 칸씩 줄인다(390px 의 여유로운 배치는 그대로 둔다). */
@media (max-width: 380px) {
  .topbar { gap: 8px 6px; }
  .brand { gap: 8px; }
  .mark { width: 28px; height: 28px; }
  .wordmark { font-size: 14px; letter-spacing: 0.14em; gap: 6px; }
  .wordmark-sub { font-size: 9.5px; letter-spacing: 0.1em; }
  #themeToggle { padding-left: 7px; padding-right: 7px; }
  .lang-toggle { padding: 2px; }
  .lang-toggle button { min-width: 29px; padding: 0 5px; font-size: 11px; }
  .topbar .help-btn { width: 30px; height: 30px; }
}

/* 예전 모바일 보조 칩 스타일(`#tuneBtn { color: var(--muted) }` 등)이 팝업 항목에도 걸려
   세 항목 중 미세조정만 흐리게 보였다 — 팝업 안에서는 셋을 같은 색·같은 여백으로 맞춘다. */
#bookmarkBtn.help-item, #methodBtn.help-item, #tuneBtn.help-item {
  color: var(--ink-2);
  background: transparent;
  border: 0;
}
#bookmarkBtn.help-item:hover, #methodBtn.help-item:hover, #tuneBtn.help-item:hover,
#bookmarkBtn.help-item:focus-visible, #methodBtn.help-item:focus-visible, #tuneBtn.help-item:focus-visible {
  color: var(--ink);
  background: var(--card-2);
}
#tuneBtn.help-item .help-ico { color: var(--beam); }

/* ==========================================================================
   v3.59 — 미검수(검수 대기) 상태 · 약속 분리(소프트웨어 / 미디어)

   미검수(auto_fact) 항목은 판정(🟢 추천 · 🟡 조건부 · 🔴 거름) 대신 중립 회색의
   `미검수` 상태를 쓴다 — 색으로 좋고 나쁨을 말하지 않고, 점선 테두리로 '아직 검수 전'임을 보인다.
   ========================================================================== */

.chip--pending,
.pill--pending {
  color: var(--ink-2);
  border-color: var(--line-strong);
  border-style: dashed;
  background: var(--card-2);
}
.chip--pending { font-weight: 700; letter-spacing: 0.01em; }
.pill--pending { font-weight: 700; }
.chip--pending::before,
.pill--pending::before {
  content: "⌛";
  font-size: 9px;
  margin-right: 3px;
  opacity: 0.7;
}

.verdict--pending {
  color: var(--ink-2);
  border-color: var(--line-strong);
  border-style: dashed;
  background: var(--card-2);
}
.card--pending { border-left: 3px solid var(--line-strong); }
.card--pending .ring-value { stroke: var(--line-strong); }
.score-num--pending { color: var(--ink-2); }
.stat--pending::after { background: var(--line-strong); }
.stat--pending .stat-value { color: var(--ink-2); }
.verdict-dot--pending { background: var(--line-strong); box-shadow: none; border: 1px dashed var(--muted); }

.hero-verdict--pending { color: var(--ink-2); }
.verdict-hero--pending {
  border-color: var(--line-strong);
  background: var(--card-2);
}
.sig-pill--pending {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--ink-2);
  background: transparent;
}
.axis-score--pending { color: var(--ink-2); }
.pick-tile--pending { border-style: dashed; border-color: var(--line-strong); }
.pick-tile--pending .pick-score { color: var(--ink-2); }
.grid--pending { border-top: 1px dashed var(--line-strong); padding-top: 14px; }
.callout--pending {
  margin-bottom: 14px;
  border-left-color: var(--line-strong);
  border-style: dashed;
  background: var(--card-2);
}

/* 약속 분리 — 첫 화면 · 방법론 · 도메인 */
.promise-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.promise-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.4;
}
.promise-chip b { font-weight: 700; color: var(--ink); }
.promise-chip--software { border-color: color-mix(in srgb, var(--sea) 45%, var(--line)); }
.promise-chip--software b { color: var(--sea); }
.promise-chip--media { border-color: color-mix(in srgb, var(--beam) 45%, var(--line)); }
.promise-chip--media b { color: var(--beam); }
.chip--promise {
  color: var(--beam);
  border-color: color-mix(in srgb, var(--beam) 45%, var(--line));
  background: transparent;
}
.pill--promise {
  color: var(--beam);
  border-color: color-mix(in srgb, var(--beam) 45%, var(--line));
  background: transparent;
}
.promise-table td { vertical-align: top; font-size: 12px; line-height: 1.6; }
.promise-table td:first-child { white-space: nowrap; }
.method-media-note { border-top: 1px dashed var(--line); padding-top: 8px; }
.tune-promise-note {
  border-left: 2px solid var(--beam);
  padding-left: 8px;
  color: var(--ink-2);
}
.media-crit dt { width: 88px; }
.enc-pending-chip {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(8, 10, 14, 0.6);
  color: #e6ebf2;
  font-size: 8.6px;
  font-weight: 700;
  line-height: 1.7;
  pointer-events: none;
}
html[data-theme="light"] .enc-pending-chip { background: rgba(255, 255, 255, 0.86); color: #3a4655; }

/* ==========================================================================
   v3.67 — 모션 규칙 (호버 게이팅 · 나가는 쪽이 더 빠름 · 감속 경로)

   1) 호버는 마우스가 있는 기기에서만 움직인다 — 터치에서는 탭 뒤에 호버 상태가
      눌어붙지 않도록 `@media (hover: hover) and (pointer: fine)` 안에서만 켠다.
   2) 들어갈 때(hover-in)는 150ms, 나올 때(hover-out)는 120ms. 각 요소의 기본
      transition 은 나가는 쪽(hover-out)으로 두고, 호버 중에만 duration 을 바꿔 끼운다.
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .ghost-btn:hover,
  .icon-btn:hover,
  .help-item:hover,
  .help-btn:hover,
  .lang-toggle button:hover,
  .preset:hover,
  .segmented button:hover,
  .filter:hover,
  .domain-chip:hover,
  .enc-genre:hover,
  .pick-tile:hover,
  .lh-choice:hover,
  .lh-cat:hover,
  .card:hover,
  .enc-rel:hover,
  .arena-card:hover,
  .lh-catalog-banner:hover,
  .lh-pledge-check:hover,
  .bookmark-row:hover {
    transition-duration: var(--dur-hover-in);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* 신규·수정된 모션의 감속 경로 — 색·투명도 변화는 즉시 끝내고(1ms), 반복 애니메이션은
     멈추고, 이동(transform)은 아예 만들지 않는다. */
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
  .beam-sweep,
  .skeleton-card,
  .skeleton-spin,
  .lh--easter .lh-symbol img,
  .drawer,
  .drawer-backdrop,
  .help-pop,
  .modal-backdrop,
  .modal {
    animation: none !important;
  }
  .card:hover .item-icon,
  .card:focus-visible .item-icon,
  .pick-tile:hover > *,
  .pick-tile:focus-visible > *,
  .lh-choice:hover > *,
  .lh-choice:focus-visible > *,
  .lh-cat:hover > *,
  .lh-cat:focus-visible > *,
  .arena-card:hover > *,
  .arena-card:focus-visible > *,
  .enc-card:hover .item-icon--poster,
  .enc-card:focus-visible .item-icon--poster {
    transform: none !important;
  }
}

/* ==========================================================================
   v3.68 — UI/UX 2단계: View Transitions · 한국어 조판 · 포커스 링 · P3 색역
   ========================================================================== */

/* ------------------------------------------------ 1) P3 색역 (Radix 형식)
   sRGB 값을 먼저 두고(위 :root), P3 를 지원하는 화면에서만 골드·바다색을 조금 더 진하게 덮는다.
   같은 색상 계열에서 sRGB 경계를 살짝 넘는 좌표라, P3 화면에서는 채도가 올라가고 sRGB 화면에서는
   브라우저가 가장 가까운 색으로 그린다. 대비는 그대로다 — 골드 위 --on-accent 10.07:1,
   카드 위 바다색 8.88:1(둘 다 WCAG AA 통과). 라이트 테마(--beam #8f5a0d · --sea #0a6f63)는
   밝은 배경의 '글자색'이라 sRGB 값을 그대로 둔다. */
@supports (color: color(display-p3 1 1 1)) {
  :root {
    --beam: color(display-p3 0.975 0.7 0.345);
    --beam-2: color(display-p3 0.99 0.87 0.67);
    --beam-soft: color(display-p3 0.975 0.7 0.345 / 0.13);
    --sea: color(display-p3 0.36 0.79 0.705);
    --sea-soft: color(display-p3 0.36 0.79 0.705 / 0.14);
  }
}

/* --------------------------------------------- 2) 한국어 조판 (W3C klreq)
   · line-break: strict — 닫는 괄호·마침표·쉼표가 줄 머리에 오지 않는다(금칙). 어절 단위로 끊는
     word-break: keep-all 과 함께 써야 '어절은 통째로, 줄 머리 금칙은 지키는' 한국어 줄바꿈이 된다.
   · 다크 배경(라이트-온-다크)은 밝은 획이 번져 보인다. 행간을 1.6 → 1.68~1.78 로 조금 풀고,
     자간은 본문 -0.01em 대신 0 근처로 되돌린다 — 한글은 음수 자간에서 자모가 붙는다.
   · 제목은 text-wrap: balance(줄 길이 균형), 여러 줄 본문은 pretty(마지막 줄 고아 방지).
     미지원 브라우저는 이 두 줄을 무시하므로 기존 줄바꿈 그대로다. */
body { line-break: strict; }

.lede,
.one-liner,
.enc-summary p,
.enc-highlights li,
.enc-fact dd,
.m-sec-note,
.method-version {
  letter-spacing: 0;
}
.lede { line-height: 1.74; text-wrap: pretty; }
.one-liner { line-height: 1.62; text-wrap: pretty; }
.enc-summary p { line-height: 1.78; text-wrap: pretty; }
.enc-highlights li { line-height: 1.68; text-wrap: pretty; }
.enc-fact dd { line-height: 1.55; }
.m-sec-note { line-height: 1.7; text-wrap: pretty; }
.method-version { line-height: 1.6; }

.hero h1,
.enc-head h1,
.modal-titles h2,
.lh-q,
.lh-pledge-title,
.m-sec-head h3 {
  text-wrap: balance;
}

/* ------------------------------------- 3) 포커스 링 복원 (Radix 7~8단계 역할)
   검색 입력은 outline: none + 테두리 색 변화뿐이라 키보드 사용자가 위치를 잃었다.
   입력·선택 컨트롤에는 :focus-visible 링을 되돌린다 — 마우스 클릭에는 그리지 않는다.
   (알약 전체가 테두리인 홈 검색은 안쪽 input 대신 바깥 알약에 한 번만 링을 건다.) */
.search input:focus-visible,
.enc-search input:focus-visible,
.home-search input:focus-visible,
.select-row select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
}
.home-search:has(input:focus-visible) {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
}
.home-search:has(input:focus-visible) input { outline: none; }

/* --------------------------------- 4) View Transitions (지원 브라우저에서만 동작)
   ::view-transition-* 는 전환이 일어나는 동안에만 존재한다. 이름을 넘겨받은 요소
   (목록 카드 포스터 → 상세 모달 아이콘, pharos-morph)는 그룹이 이동·확대되고,
   나머지 화면은 루트 크로스페이드로 넘어간다. duration 은 모달과 같은 240ms,
   커브는 1단계에서 정한 --ease-out 을 그대로 쓴다. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--dur-modal);
  animation-timing-function: var(--ease-out);
}
::view-transition-group(pharos-morph) {
  animation-duration: var(--dur-modal);
  animation-timing-function: var(--ease-out);
}
::view-transition-old(pharos-morph),
::view-transition-new(pharos-morph) {
  animation-duration: 120ms;
  animation-timing-function: var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ==========================================================================
   v3.68 — UI/UX 3단계: 등대·도감·상세의 화면별 레이아웃·여백 다듬기
   --------------------------------------------------------------------------
   이 블록은 1·2단계 규칙(Emil 모션 토큰 · 포커스 링 · P3 · 한국어 조판)을 건드리지
   않고, 간격·호흡만 다시 잡는다. 새 전환/애니메이션을 넣지 않으므로 ease 기본값도
   추가하지 않는다. 화면 폭별 값은 파일 끝에서 다시 정의하므로, 위쪽 미디어쿼리보다
   이 블록이 항상 마지막에 이긴다(같은 특이도 · 뒤에 옴).
   ========================================================================== */

/* ---------------------------------------------------- 1. 등대 첫 화면 호흡 */

/* 라벨(LIGHTHOUSE · 등대)은 헤드라인의 이름표다 — 일러스트와 헤드라인 사이에
   떠 있지 않게 붙이고, 안내문은 두 줄 균형으로 끊는다. 주 행동은 한 단계 띄운다. */
.lh-landing-kicker { margin-bottom: -10px; }
.lh-landing-lede { max-width: 56ch; text-wrap: balance; }
.lh-start { margin-top: clamp(10px, 1.8vh, 16px); }

/* 데스크톱: 첫 화면 위쪽 여백을 줄여 예시 목표의 첫 줄이 화면 안에 걸치게 한다
   (전에는 목표 탐색 버튼이 접히는 선에 딱 붙어 '아래에 뭐가 있나'가 안 보였다). */
@media (min-width: 721px) {
  .lh--landing { padding-top: clamp(6px, 2.4vh, 24px); }
  .lh-landing { padding-top: clamp(12px, 3.2vh, 44px); gap: clamp(14px, 2.4vh, 24px); }
  .lh-symbol { margin-bottom: 0; }
  .lh-landing-title { gap: 6px; }
}

/* 모바일: 일러스트 위 여백만 조금 덜고, 버튼 앞뒤는 그대로 둔다(엄지 동선 유지). */
@media (max-width: 720px) {
  .lh-landing { padding-top: clamp(14px, 3.4vh, 34px); gap: 18px; }
  .lh-landing-lede { margin-top: 0; }
  .lh-start { margin-top: 10px; }
  .lh-samples { margin-top: 10px; }
}

/* 분야 카드: 라벨 > (무엇을 묻는지) > (설명) 의 3단 위계가 색으로도 읽히게 한다.
   전에는 설명(hint, 10.5px)이 요약(sub, 11.5px)보다 밝아 순서가 뒤집혀 보였다. */
.lh-cat-sub { color: var(--ink-2); font-weight: 600; }
.lh-cat-hint { color: var(--muted); }
@media (min-width: 721px) {
  .lh-cat { padding: 14px 16px; gap: 3px; }
}
@media (max-width: 720px) {
  .lh-cat { padding: 12px 13px; gap: 3px; }
  .lh-cat-hint { margin-top: 1px; }
}

/* 위저드: 모바일에서는 화면 세로 가운데 정렬로 진행바가 탭 아래 100px 넘게
   떨어져 있었다 — 짧은 단계(1·2)는 위에서 시작하게 한다. 분야 선택(lh--category)은
   원래 위에서 시작하므로 건드리지 않는다(여백이 더 붙으면 390px에서 6px 스크롤). */
@media (max-width: 720px) {
  .lh--step1, .lh--step2, .lh--step3 {
    align-content: start;
    min-height: auto;
    padding-top: clamp(10px, 2.4vh, 22px);
  }
  .lh-stepper { min-height: 20px; }
}

/* 결과 카드: 모바일에서 카드 세 덩어리(머리·퀘스트·액션)의 간격을 14px 로 맞추고,
   퀘스트 내부는 한 단계 좁혀 제목·설명·팁이 한 묶음으로 읽히게 한다. */
@media (max-width: 720px) {
  .lh-card { gap: 14px; padding: 15px 14px 16px; }
  .lh-quest { gap: 10px; padding: 14px 13px; }
  .lh-actions { gap: 8px 10px; margin-top: 2px; }
  .lh-locked { margin-top: 0; }
}

/* ------------------------------------------------------- 2. 도감 화면 정돈 */

/* 포스터 그리드: 행 사이를 조금 벌려 '다음 줄 포스터'가 앞 카드의 장르 줄에
   붙어 보이지 않게 하고, 제목·장르 사이는 3px 로 띄운다. */
@media (min-width: 721px) {
  .enc-grid { gap: 18px 12px; }
  .enc-card { gap: 8px; }
  .enc-card-body { gap: 3px; }
}
@media (max-width: 720px) {
  .enc-grid { gap: 16px 7px; }
  .enc-card { gap: 6px; }
  .enc-card-body { gap: 3px; }
  /* 검색 32px · 정렬 32px 와 같은 높이로 필터 칩을 올려 한 줄의 기준선을 맞춘다. */
  .enc-filter { height: 28px; }
  .enc-genre { height: 27px; }
  .enc-genres { padding: 2px 0 3px; }
  .enc-toolbar { padding: 8px 9px; }
}
@media (max-width: 380px) {
  .enc-grid { gap: 16px 6px; }
}

/* --------------------------------------------------- 3. 상세 모달 — 액션 줄 */

/* 모바일 360px: 닫기(X) 자리를 비워 둔 오른쪽 58px 때문에 액션 줄이 넘쳐
   북마크만 다음 줄로 떨어졌다(실측: 액션 줄 86px · 머리 299px). 액션 줄만
   그 예약 폭을 되돌려 받아 한 줄에 담고, 사이는 고르게 나눈다. */
@media (max-width: 720px) {
  .modal-actions {
    margin-right: -42px;
    justify-content: space-between;
    gap: 6px;
  }
  .modal-actions .ghost-btn { padding: 8px 9px; }
  .modal-actions .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  .modal-actions .ghost-btn { font-size: 11px; padding: 8px 7px; }
}

/* ------------------------------------------------- 4. 상세 모달 — 섹션 리듬 */

/* 5열 메타 카드: 6개 사실이 5+1 로 떨어져 마지막 카드 하나만 둥둥 떠 보였다
   (실측 비율: 5열 auto-fit). 카드 한 장의 최소 폭을 200px 로 올려 4열로 만들면
   같은 6개가 4+2, 7개가 4+3 으로 떨어져 부분 줄이 자연스러운 줄바꿈으로 읽힌다. */
@media (min-width: 621px) {
  .enc-facts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* 섹션 사이는 넓게, 섹션 안 머리→설명→내용은 같은 10px 로 — 리듬을 한 값으로 통일. */
.modal-body { gap: 24px; }
.m-sec-note { margin: 0; }
@media (max-width: 720px) {
  .modal-body { gap: 20px; }
}

/* 결과 카드 머리: 포스터를 카드의 첫 줄(배지 줄)에 맞춰 붙인다.
   세로 가운데 정렬이면 추천 이유가 길어질 때 포스터가 글 한가운데 떠 보였다. */
.lh-card-top { align-items: flex-start; }
.lh-card-top .item-icon { margin-top: 2px; }

/* 예시 목표는 '목표 탐색'이 주는 것의 미리보기 — 버튼에서 한 칸만 떨어뜨린다. */
@media (min-width: 721px) {
  .lh-samples { margin-top: 12px; }
}

/* 난이도 4택: 아래쪽 `.lh-choices` 규칙이 같은 특이도로 뒤에 있어 3열을 덮어썼다
   (360px 실측: '상관없이·편안·보통' 3장 + '매우맛' 한 장이 둘째 줄에 홀로).
   모바일에서는 2×2 로 되돌려 네 칸이 고르게 서게 한다. */
@media (max-width: 720px) {
  .lh-choices--diff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 420px 이하: 액션 버튼 좌우 패딩을 1px 줄여 EN 라벨('Copy share summary')까지
   한 줄에 담기게 한다(390 EN 실측 361px → 343px, 한 줄 기준 358px). */
@media (max-width: 420px) {
  .modal-actions .ghost-btn { padding: 8px 8px; }
}

/* 상세 머리 액션 줄: 개발사·장르 줄이 길면 flex 기본값(shrink 1) 때문에 액션 묶음이
   줄어들어 북마크만 다음 줄로 떨어졌다(Hades 실측). 액션 줄은 줄지 않게 고정하고,
   긴 메타 줄은 제목 쪽에서 접히게 한다. 모바일은 액션 줄이 자기 줄을 쓰므로 그대로. */
@media (min-width: 721px) {
  .modal-head .modal-actions { flex: 0 0 auto; }
}
