/* ==========================================================================
   서가록 — Korean consumer UI (2026-10-29)
   화이트 배경 · Pretendard · 블루 포인트 · 둥근 카드 · 정보 밀도
   ========================================================================== */

:root {
  --bg: #f7f2e8;
  --surface: #efe8da;
  --surface-2: #e6ddcc;
  --card: #fcfaf5;
  --paper: #f7f2e8;
  --paper-2: #efe8da;
  --line: #d8d1c2; /* brand A border */
  --line-2: #d8ccb8;

  --ink: #231911; /* brand A text */
  --ink-2: #2a241e;
  --text-2: #5e534a; /* brand A textMuted */
  --text-3: #63584b;
  --muted: #63584b;

  --accent: #b8371f;
  --accent-ink: #ffffff;
  --accent-soft: #f7e6df;
  --danger: #b8371f;
  --danger-soft: #f7e6df;
  --teal: #0f7d45;
  --teal-soft: #e5f3ea;
  --gold: #6b4f13;
  --gold-soft: #f4ecd8;

  --sans: "IBM Plex Sans KR", Pretendard, "Noto Sans KR", system-ui, -apple-system,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Hahmlet", "Noto Serif KR", serif;
  --serif: var(--display);
  --mono: "IBM Plex Sans KR", ui-monospace, monospace;

  --r: 14px;
  --r-sm: 10px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(23, 18, 14, 0.05), 0 8px 20px -14px rgba(23, 18, 14, 0.35);
  --shadow-pop: 0 10px 36px -10px rgba(23, 18, 14, 0.3);
  --margin: 24px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scroll-padding-bottom: 96px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, dl, dt, dd, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
.grain { display: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 8px 0;
  font-size: 13px;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------------- header ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 242, 232, 0.96);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px var(--margin);
}
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { height: 24px; width: auto; display: block; }
.brand-mark-img { width: 28px; height: 28px; display: block; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.brand-mark i { display: block; width: 3.5px; border-radius: 1px; background: var(--ink); }
.brand-mark i:nth-child(1) { height: 18px; }
.brand-mark i:nth-child(2) { height: 13px; background: var(--accent); }
.brand-mark i:nth-child(3) { height: 16px; opacity: 0.7; }
.brand-mark i:nth-child(4) { height: 11px; opacity: 0.45; }
.brand-text { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.brand-text small { display: none; }

.tabs { display: flex; align-items: center; gap: 4px; }
.tab {
  position: relative;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-3);
  border-radius: 8px;
}
.tab.is-on { color: var(--ink); }
.tab.is-on::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2.5px; border-radius: 2px;
  background: var(--accent);
}
.tab .count { margin-left: 4px; color: var(--accent); font-size: 12px; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-mini {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  padding: 9px 14px;
  background: var(--surface);
  border-radius: 10px;
  color: var(--text-3);
}
.search-mini input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 13.5px; color: var(--ink); }
.search-mini input::placeholder { color: var(--text-3); }
.search-mini input:focus { outline: none; }
.subs-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}
.subs-btn .count { color: #fff; opacity: 0.9; }

.popover {
  position: absolute;
  right: var(--margin);
  top: calc(100% + 6px);
  width: min(360px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 20px;
  z-index: 70;
}
.popover-head b { font-size: 16px; font-weight: 800; }
.popover-head p { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.popover-body { margin: 14px 0 4px; display: grid; gap: 4px; }
.sub-opt { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.popover-foot { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

/* ---------------- hero ---------------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px var(--margin) 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.hero.is-compact { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }

/* 검색 중에는 히어로를 검색바만 남긴다 */
.hero.is-compact .hero h1,
.hero.is-compact h1,
.hero.is-compact .eyebrow,
.hero.is-compact .quick,
.hero.is-compact .recent-row,
.hero.is-compact .live-badge { display: none; }
.hero.is-compact .hero-main { display: flex; align-items: center; }
.hero.is-compact .search-big { max-width: none; width: 100%; }
.hero.is-compact { padding-top: 16px; padding-bottom: 4px; }
.hero.is-compact .hero-card,
.hero.is-compact .hero-note,
.hero.is-compact .eyebrow { display: none; }
.hero.is-compact .lede { display: none; }
.hero.is-hidden { display: none; }
.hero-main { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.24;
  color: var(--ink);
  margin-bottom: 12px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 15px; color: var(--text-2); line-height: 1.6; margin-bottom: 20px; }
.lede br.pc { display: none; }

.search-big {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  padding: 6px 6px 6px 16px;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: 14px;
  transition: border-color 150ms ease, background 150ms ease;
}
.search-big:focus-within { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-big svg { color: var(--text-3); flex: none; }
.search-big input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 0; font-size: 15.5px; }
.search-big input::placeholder { color: var(--text-3); }
.search-big input:focus { outline: none; }
.search-go {
  flex: none;
  padding: 11px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.recent-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.recent-label { font-size: 12.5px; color: var(--text-3); margin-right: 2px; }
.recent-chip { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 11px; border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--text-2); }
.recent-clear { font-size: 12px; color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
}
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.live-badge[hidden] { display: none; }

/* index card */
.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-top: 6px;
}
.hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hero-card-top b { font-size: 14.5px; font-weight: 800; }
.hero-card-top span { display: none; }
.hero-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hero-row:last-child { border-bottom: 0; }
.hero-row dt { font-size: 13px; color: var(--text-3); }
.hero-row dd { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.hero-row dd small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.hero-row dd.is-accent { color: var(--danger); }
.hero-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface); font-size: 12px; line-height: 1.5; color: var(--text-3); }
.hero-note b { color: var(--text-2); }

/* ---------------- view / sections ---------------- */
.view { max-width: var(--max); margin: 0 auto; padding: 8px var(--margin) 0; }
.section { padding-top: 44px; }
.section:last-child { padding-bottom: 48px; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-title { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.sec-title .ico { display: none; }
.sec-desc { margin-top: 4px; font-size: 13px; color: var(--text-3); line-height: 1.5; }
.sec-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link-like { font: inherit; color: inherit; text-align: left; }

/* ---------------- pick card ---------------- */
.pick-section { padding-top: 40px; }
.pick-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 264px;
  gap: 24px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.pick-cover { width: 132px; height: 188px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.pick-cover-fallback { display: flex; height: 100%; align-items: center; padding: 12px; font-size: 13px; color: var(--text-3); }
.pick-body { min-width: 0; }
.pick-eyebrow { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; margin-bottom: 10px; }
.pick-title { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; margin-bottom: 6px; }
.pick-author { font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.pick-blurb {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pick-chip { padding: 4px 9px; border-radius: 6px; background: var(--surface); font-size: 12px; color: var(--text-2); font-weight: 600; }
.pick-chip.on { background: var(--teal-soft); color: var(--teal); }
.pick-chip.warn { background: var(--danger-soft); color: var(--danger); }
.pick-actions { display: flex; align-items: center; gap: 12px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}
.pick-similar { border-left: 1px solid var(--line); padding-left: 20px; }
.pick-sim-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.pick-sim-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick-sim img { width: 100%; aspect-ratio: 3 / 4.3; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* ---------------- timeline ---------------- */
.tl-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: none; }
.tl-strip::-webkit-scrollbar { display: none; }
.tl-day {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 56px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-3);
  transition: background 150ms ease, color 150ms ease;
}
.tl-day.is-today { background: var(--accent-soft); color: var(--accent); }
.tl-day.is-on { background: var(--accent); color: #fff; }
.tl-dow { font-size: 11.5px; }
.tl-date { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.tl-day.is-today .tl-date, .tl-day.is-on .tl-date { color: inherit; }
.tl-n { font-size: 11.5px; font-weight: 600; }
.tl-day.is-on .tl-n { color: #fff; }

.tl-groups { display: grid; gap: 14px; }
.tl-group-head { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.tl-group-head b { color: var(--danger); font-weight: 800; font-size: 13.5px; }
.tl-group-head span { font-size: 12px; }
.notice-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tl-group .notice-panel { background: var(--card); }
.notice-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.notice-panel .notice-row + .notice-row { border-top: 1px solid var(--line); }
.notice-panel .notice-row:nth-child(even) { background: var(--card); }
.notice-main { min-width: 0; flex: 1; }
.notice-main b { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.notice-main p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.notice-main .sep { margin: 0 5px; color: var(--line-2); }
.notice-main .plat { color: var(--text-2); }
.notice-right { display: flex; align-items: center; gap: 10px; flex: none; }
.notice-dday { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.notice-dday.hot { color: var(--danger); }
.notice-src { font-size: 12.5px; color: var(--text-3); }

/* ---------------- collections ---------------- */
.cur-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cur-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.cur-card.is-feature { background: var(--accent-soft); border-color: transparent; }
.cur-covers { display: grid; grid-template-columns: repeat(2, 34px); gap: 3px; flex: none; }
.cur-cover { width: 34px; height: 48px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.cur-cover img { width: 100%; height: 100%; object-fit: cover; }
.cur-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cur-body b { font-size: 14.5px; font-weight: 800; letter-spacing: -0.02em; }
.cur-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cur-meta { font-size: 12px; color: var(--text-3); }
.cur-figure { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.cur-figure span { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 2px; }

.cur-head { margin-bottom: 18px; }
.cur-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.cur-head .lede { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.cur-source, .cur-note { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.cur-back { display: inline-flex; align-items: center; margin-bottom: 14px; font-size: 13px; }
.cur-cat { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; margin: 26px 0 10px; }
.cur-cat span { font-size: 12.5px; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.cur-unmatched { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.cur-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cur-chip { padding: 7px 12px; border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--text-2); }

/* ---------------- genre ---------------- */
.genre-row { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------------- rails + book cards ---------------- */
.rail-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.rail-grid > * { flex: 0 0 132px; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 22px 14px; }

.card { display: flex; flex-direction: column; text-align: left; gap: 7px; }
.card-cover {
  position: relative;
  aspect-ratio: 3 / 4.35;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.cover { position: relative; width: 100%; height: 100%; }
.cover:not(.has-img) {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  background: var(--cg, var(--surface));
  border: 1px solid rgba(35, 25, 17, 0.12);
}
.cover:not(.has-img) .cover-top { display: flex; flex-direction: column; gap: 10px; }
.cover:not(.has-img) .cover-rule { width: 22px; height: 2px; background: var(--accent); }
.cover:not(.has-img) .cover-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover:not(.has-img) .cover-author { font-size: 11px; line-height: 1.4; color: var(--text-3); }
.cover-img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms ease; }
.cover-band { display: none; }
.card-body { display: flex; flex-direction: column; gap: 2px; }
.card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-author { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avail { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pill::before { display: none; }
.pill.sub { background: var(--teal-soft); color: var(--teal); }
.pill.end { background: var(--danger-soft); color: var(--danger); }
.pill.buy { background: var(--card); color: var(--text-2); border: 1px solid var(--line); }
.pill.free { background: var(--gold-soft); color: var(--gold); }
.pill.ghost { background: var(--surface); color: var(--text-3); }
.pill.hot { background: var(--danger-soft); color: var(--danger); }

/* rail list (텍스트 리스트 레일) */
.rail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.rail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 13px 4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.rail-row-title { font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1.4; }
.rail-row-meta { font-size: 12px; color: var(--text-3); grid-column: 1; }
.rail-row-av { font-size: 11.5px; color: var(--accent); font-weight: 600; grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* ---------------- overview ---------------- */
.ov-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.ov-stat { padding: 14px 16px; background: var(--surface); border-radius: var(--r); }
.ov-value { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.ov-unit { font-size: 12px; color: var(--text-3); margin-left: 3px; font-weight: 500; }
.ov-label { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.ov-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.ov-sub-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.ov-bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 52px; align-items: center; gap: 10px; padding: 4px 0; }
.ov-bar-label { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-bar-track { height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.ov-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.ov-bar-n { font-size: 12px; color: var(--text-3); text-align: right; font-weight: 600; }
.ov-plat-list { display: grid; gap: 6px; }
.ov-plat { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); padding: 9px 12px; background: var(--surface); border-radius: 8px; }
.ov-plat b { color: var(--ink); font-weight: 700; }

/* ---------------- situation / CTA ---------------- */
.collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.col-card {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.col-card b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.col-card p { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.col-n { display: block; margin-top: 8px; font-size: 12px; color: var(--accent); font-weight: 600; }

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--accent-soft);
}
.cta-band h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.cta-band p { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.cta-btn { padding: 11px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 700; }

/* ---------------- search results ---------------- */
.result-head { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 14px; }
.result-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.result-head span { font-size: 13px; color: var(--text-3); font-weight: 600; }
.result-head span small { font-size: 12px; font-weight: 400; }
.spacer { flex: 1; }
.search-note { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.search-note b { color: var(--text-2); font-weight: 700; }
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.filter-bar-2 { border-bottom: 0; padding-top: 0; margin-top: 0; }
.fb-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.fchip {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}
.fchip.is-on { background: var(--ink); color: #fff; }
.sort-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  color: var(--text-2);
}
.timing, .strat, .cand { display: none; }
.filter-bar-2 .fchip { padding: 6px 11px; font-size: 12.5px; }
.filter-bar-2 .fb-label { font-size: 12px; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 22px 14px; }
.skel { aspect-ratio: 3 / 4.35; border-radius: var(--r-sm); background: var(--surface); animation: skel-pulse 1.3s ease-in-out infinite; }
.skel-line { display: block; height: 14px; border-radius: 4px; background: var(--surface-2); }
@keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.empty { padding: 40px 0; text-align: center; }
.empty b { display: block; font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.empty p { font-size: 13.5px; color: var(--text-3); line-height: 1.6; max-width: 52ch; margin: 0 auto; }
.empty .link { display: inline-block; margin-top: 10px; font-size: 13px; }
.empty .retry { margin-top: 14px; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }

/* ---------------- suggest ---------------- */
.suggest-pop {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  z-index: 55;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
}
.suggest-pop--nav { left: auto; right: 0; width: 340px; }
.sug-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 8px; text-align: left; }
.sug-row.is-active { background: var(--surface); }
.sug-cover { width: 26px; height: 38px; border-radius: 3px; background: var(--surface); flex: none; overflow: hidden; }
.sug-cover img { width: 100%; height: 100%; object-fit: cover; }
.sug-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sug-main b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-main b mark { background: transparent; color: var(--accent); }
.sug-author { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-more { display: flex; justify-content: space-between; width: 100%; padding: 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; background: var(--surface); }
.suggest-pop .sug-empty { padding: 12px; font-size: 12.5px; color: var(--text-3); }

/* ---------------- drawer ---------------- */
.drawer-root { position: fixed; inset: 0; z-index: 100; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(25, 25, 25, 0.45); }
.drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(520px, 100vw);
  background: var(--card);
  border-radius: 18px 0 0 18px;
  overflow-y: auto;
  padding: 0 24px 36px;
  box-shadow: var(--shadow-pop);
}
.drawer-top { display: flex; justify-content: flex-end; padding: 14px 0 4px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.drawer-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); color: var(--text-2); }
.dw-hero { display: flex; gap: 16px; align-items: flex-start; padding: 4px 0 18px; }
.dw-cover { width: 112px; flex: none; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.dw-cover .cover, .dw-cover img { width: 100%; height: auto; object-fit: cover; }
.dw-meta { min-width: 0; }
.dw-meta h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; margin-bottom: 6px; }
.dw-author { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.dw-sub { font-size: 12.5px; color: var(--text-3); }
.dw-price { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.dw-price b, .dw-price strong { font-weight: 800; }
.dw-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { padding: 4px 9px; border-radius: 6px; background: var(--surface); font-size: 12px; color: var(--text-2); }
.dw-blurb { font-size: 14px; line-height: 1.7; color: var(--text-2); margin-bottom: 20px; }
.dw-block { padding: 18px 0; border-top: 1px solid var(--line); }
.dw-block h3 { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.dw-block h3 .n, .dw-block h3 .hint { font-size: 12px; color: var(--text-3); font-weight: 500; }
.dw-block .sub { font-size: 12.5px; color: var(--text-3); line-height: 1.5; margin-bottom: 10px; }
.av-table { display: grid; gap: 5px; }
.av-group-label { font-size: 12px; color: var(--text-3); font-weight: 600; margin: 6px 0 2px; }
.av-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border-radius: 8px; }
.av-row .p-main { flex: 1; min-width: 0; }
.av-row .p-name { font-size: 13px; font-weight: 700; }
.av-row .p-note { font-size: 12px; color: var(--text-3); }
.av-row .state { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 3px 8px; border-radius: 6px; background: var(--card); }
.av-row .state.on { color: var(--teal); background: var(--teal-soft); }
.av-row .buy { font-size: 12px; color: var(--accent); font-weight: 700; }
.report-row { display: flex; flex-wrap: wrap; gap: 6px; }
.report-btn { padding: 8px 13px; border-radius: 8px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.dw-hint { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.similar-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.sim-card { flex: 0 0 84px; display: flex; flex-direction: column; gap: 5px; text-align: left; }
.sim-cover { aspect-ratio: 3 / 4.3; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.sim-cover img { width: 100%; height: 100%; object-fit: cover; }
.sim-card b { font-size: 12px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sim-card span:last-child { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-actions { display: flex; gap: 6px; padding: 14px 0 6px; }
.act-btn { flex: 1; padding: 10px 6px; border-radius: 8px; background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.act-btn.is-on { background: var(--accent); color: #fff; }
.dw-note { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--surface); font-size: 12px; color: var(--text-3); line-height: 1.6; }
.dw-note b { color: var(--text-2); }
.dw-same[hidden] { display: none; }

/* ---------------- shelf / taste / alerts ---------------- */
.shelf-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.shelf-tab { padding: 8px 14px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-3); }
.shelf-tab.is-on { background: var(--ink); color: #fff; }
.shelf-tab .n { margin-left: 4px; color: var(--accent); }
.shelf-tab.is-on .n { color: #fff; }

.taste-wrap { max-width: 640px; margin: 0 auto; padding-top: 16px; }
.progress { height: 4px; border-radius: 999px; background: var(--surface); margin: 12px 0 20px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.q-step { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-bottom: 8px; }
.q-title { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; margin-bottom: 18px; }
.q-opts { display: grid; gap: 8px; margin-bottom: 14px; }
.q-opt { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 14.5px; font-weight: 600; text-align: left; }
.q-opt .idx { font-size: 12px; color: var(--text-3); font-weight: 700; }
.q-back { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.taste-result-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.taste-signature { font-size: 14px; color: var(--text-3); margin-bottom: 16px; }
.rec-list { display: grid; gap: 8px; }
.rec { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.rec-body { min-width: 0; }
.rec-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rec-body b { font-size: 14px; font-weight: 700; }
.rec-meta { font-size: 12px; color: var(--text-3); }
.rec-why { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.alert-panel { display: grid; gap: 6px; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; }
.mini-cover { width: 38px; height: 54px; border-radius: 4px; overflow: hidden; background: var(--surface); flex: none; }
.mini-cover span { display: none; }
.alert-main { flex: 1; min-width: 0; }
.alert-main b { display: block; font-size: 13.5px; font-weight: 700; }
.alert-main p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.alert-right { display: flex; align-items: center; gap: 8px; flex: none; }
.alert-dday { font-size: 12.5px; font-weight: 800; color: var(--danger); }
.btn-alert { padding: 7px 11px; border-radius: 8px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-2); }
.btn-alert.is-on { background: var(--accent); color: #fff; }
.alert-empty { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-3); padding: 14px 0; }

/* ---------------- toast ---------------- */
.toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 16px; border-radius: 10px; background: rgba(25, 25, 25, 0.94); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-pop); }

/* ---------------- footer ---------------- */
.foot {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.foot-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 28px var(--margin) 36px; }
.foot-brand { display: flex; align-items: flex-start; gap: 10px; }
.foot-brand .brand-mark { margin-top: 4px; }
.foot-brand b { font-size: 16px; font-weight: 800; }
.foot-brand p { margin-top: 4px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.foot-right { min-width: 0; }
.foot .disclaimer { font-size: 12px; color: var(--text-3); line-height: 1.65; margin-bottom: 10px; }
.foot .disclaimer b { color: var(--text-2); font-weight: 700; }
.foot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; color: var(--text-3); }
.foot-meta a { color: var(--text-2); font-weight: 600; }
.foot-meta .sep { color: var(--line-2); }
.foot-credit, .foot-disclaimer { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-top: 8px; }
.foot-stamp { font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-top: 8px; }
.foot-name { font-size: 16px; font-weight: 800; }
.foot-desc { font-size: 12.5px; color: var(--text-3); }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }

/* ---------------- bottom nav / motion / helpers ---------------- */
.bottom-nav { display: none; }
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 280ms ease, transform 280ms ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (pointer: coarse) {
  .chip, .fchip, .tab, .sug-row, .recent-chip, .sec-more, .act-btn, .report-btn,
  .btn-alert, .bottom-tab, .genre-chip { min-height: 44px; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1024px) {
  .pick-card { grid-template-columns: 120px minmax(0, 1fr); }
  .pick-similar { grid-column: 1 / -1; border-left: 0; padding-left: 0; padding-top: 14px; border-top: 1px solid var(--line); }
  .pick-sim-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-cols { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --margin: 16px; }
  .nav-inner { gap: 10px; padding: 10px var(--margin); }
  .tabs { display: none; }
  .nav-right .search-mini { display: none; }
  .brand-text { font-size: 17px; }
  .brand-logo { height: 21px; }

  .hero { grid-template-columns: 1fr; gap: 18px; padding: 20px var(--margin) 4px; }
  .hero h1 { font-size: 26px; }
  .lede { font-size: 14px; margin-bottom: 14px; }
  .hero-card { margin-top: 0; }
  .hero.is-compact { padding-bottom: 0; }

  .pick-card { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .pick-cover { width: 104px; height: 148px; }
  .pick-title { font-size: 18px; }
  .pick-blurb { display: none; }
  .pick-sim-row { grid-template-columns: repeat(4, 1fr); }

  .cur-grid { grid-template-columns: 1fr; }
  .cur-covers { grid-template-columns: repeat(2, 30px); }
  .cur-cover { width: 30px; height: 43px; }
  .collections { grid-template-columns: 1fr; }

  .rail-grid > * { flex: 0 0 116px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .rail-list { grid-template-columns: 1fr; }
  .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-value { font-size: 20px; }
  .foot-inner { grid-template-columns: 1fr; gap: 18px; padding: 22px var(--margin) 28px; }

  .drawer { width: 100vw; border-radius: 0; padding: 0 16px 28px; }
  .dw-cover { width: 92px; }
  .sim-card { flex-basis: 76px; }

  .bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(247, 242, 232, 0.98);
    border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-3);
  }
  .bottom-tab svg { width: 22px; height: 22px; }
  .bottom-tab.is-on { color: var(--accent); }
  .bottom-tab .count { display: none; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .search-big { flex-wrap: nowrap; padding: 5px 5px 5px 12px; }
  .search-big input { padding: 10px 0; font-size: 15px; }
  .search-go { padding: 10px 16px; }
  .result-head h2 { font-size: 20px; }
  .filter-bar { gap: 5px; }
  .fchip { padding: 6px 10px; font-size: 12.5px; }
  .sort-select { margin-left: auto; }
  .pick-card { grid-template-columns: 92px minmax(0, 1fr); }
  .pick-cover { width: 92px; height: 132px; }
  .pick-title { font-size: 17px; }
  .pick-actions { flex-wrap: wrap; gap: 8px; }
  .notice-row { padding: 10px 12px; gap: 10px; }
  .notice-main b { font-size: 13.5px; }
  .cur-head h2 { font-size: 20px; }
  .q-title { font-size: 20px; }
}

/* ---------------- 문서 페이지 (about / legal / 404) ---------------- */
.doc { max-width: 780px; margin: 0 auto; padding: 40px var(--margin) 80px; }
.doc h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; margin-bottom: 14px; }
.doc .lede { font-size: 16px; color: var(--text-2); line-height: 1.6; margin-bottom: 32px; }
.prose h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 32px 0 10px; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; }
.prose p { font-size: 14.5px; line-height: 1.75; color: var(--text-2); margin-bottom: 12px; }
.prose li { font-size: 14.5px; line-height: 1.75; color: var(--text-2); margin-bottom: 7px; padding-left: 16px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--sans); background: var(--surface); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.prose details { border-top: 1px solid var(--line); padding: 14px 0; }
.prose summary { font-size: 14.5px; font-weight: 700; cursor: pointer; }
.prose details p { margin-top: 8px; font-size: 14px; }
.prose .hint { font-size: 13px; color: var(--text-3); }
.changelog li { color: var(--text-3); }
.changelog b { color: var(--text-2); }

.legal { max-width: 780px; margin: 0 auto; padding: 40px var(--margin) 80px; }
.legal .back { display: inline-block; margin-bottom: 20px; font-size: 13px; color: var(--text-3); }
.legal h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.legal .lead { font-size: 13px; color: var(--text-3); margin-bottom: 28px; line-height: 1.6; }
.legal h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin: 30px 0 8px; }
.legal h3 { font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
.legal p, .legal li { font-size: 14px; line-height: 1.75; color: var(--text-2); margin-bottom: 9px; }
.legal li { padding-left: 15px; position: relative; }
.legal li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   밀리의서재 구조 + 토스 타이포 — 카테고리 바 / 랭킹 / 종이 카드 보정
   ========================================================================== */
.cat-bar {
  position: sticky;
  top: 57px;
  z-index: 55;
  background: rgba(247, 242, 232, 0.97);
  border-bottom: 1px solid var(--line);
}
.cat-bar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px var(--margin);
  scrollbar-width: none;
}
.cat-bar-inner::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}
.cat-pill.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* 랭킹 (밀리의서재 '랭킹' 구조) */
.rank-section .sec-desc { color: var(--text-3); }
.rank-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.rank-row::-webkit-scrollbar { display: none; }
.rank-item {
  flex: 0 0 148px;
  display: grid;
  grid-template-columns: 18px 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  padding: 8px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: left;
}
.rank-no {
  grid-row: 1 / span 2;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.rank-cover {
  grid-row: 1 / span 2;
  width: 52px;
  height: 74px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rank-author { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 종이 카드 위 텍스트 대비 보정 */
.cur-card.is-feature { background: var(--accent-soft); border-color: transparent; }
.cta-band { background: var(--surface); border: 1px solid var(--line); }
.cta-btn, .search-go, .btn-primary, .subs-btn { background: var(--accent); }
.fchip.is-on { background: var(--ink); color: var(--paper); }
.bottom-tab.is-on { color: var(--accent); }
.tl-day.is-today { background: var(--accent-soft); color: var(--accent); }
.tl-day.is-on { background: var(--accent); color: #fff; }
.live-badge { background: var(--teal-soft); color: var(--teal); }
.hero-card, .pick-card, .cur-card, .col-card, .notice-panel, .q-opt, .alert-row, .rec { background: var(--card); }
.ov-stat { background: var(--surface); }
.pill { background: var(--surface); }
.pill.end, .pill.hot { background: var(--danger-soft); color: var(--danger); }
.pill.sub { background: var(--teal-soft); color: var(--teal); }
.av-row { background: var(--surface); }
.drawer { background: var(--bg); }
.drawer-top { background: var(--bg); }
.suggest-pop, .popover { background: var(--card); }
.nav { background: rgba(247, 242, 232, 0.96); }
.hero h1 em { color: var(--accent); }
.eyebrow { background: var(--accent-soft); color: var(--accent); }
.pick-eyebrow { background: var(--accent-soft); color: var(--accent); }
.live-badge::before { background: var(--teal); }
.ov-bar-fill { background: var(--accent); }
.progress i { background: var(--accent); }
.headline accent, .sec-title em { color: var(--accent); }

/* 토스식 숫자 강조 */
.ov-value, .hero-row dd, .cur-figure { font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .cat-bar { top: 51px; }
  .cat-bar-inner { padding: 8px 16px; }
  .cat-pill { padding: 6px 12px; font-size: 13px; }
  .rank-item { flex-basis: 140px; }
}

/* ==========================================================================
   랭킹 2단 리스트 · 오늘의 책 배너 · 카테고리 바
   ========================================================================== */
.cat-bar { top: 57px; }
body.is-wide .cat-bar { display: none; }

/* 오늘의 책 — 큰 배너 */
.pick-section { padding-top: 28px; }
.pick-card {
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 26px;
  align-items: center;
  padding: 26px 28px;
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
}
.pick-cover {
  order: 2;
  width: 176px;
  height: 246px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 16px 32px -22px rgba(23, 18, 14, 0.55);
}
.pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.pick-body { order: 1; min-width: 0; }
.pick-eyebrow { background: var(--card); color: var(--accent); }
.pick-title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.28; margin-bottom: 6px; }
.pick-author { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.pick-blurb { font-size: 14px; line-height: 1.65; color: var(--text-2); -webkit-line-clamp: 2; margin-bottom: 14px; }
.pick-similar { display: none; }

@media (max-width: 860px) {
  .pick-card { grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; padding: 18px; }
  .pick-cover { width: 112px; height: 158px; }
  .pick-title { font-size: 19px; }
  .pick-blurb { display: none; }
}
@media (max-width: 560px) {
  .pick-card { grid-template-columns: minmax(0, 1fr) 86px; padding: 16px 14px; }
  .pick-cover { width: 86px; height: 122px; }
  .pick-title { font-size: 17px; }
  .pick-actions { gap: 8px; }
  .btn-primary { padding: 9px 14px; font-size: 13px; }
}

/* 서가 랭킹 — 2단 (1~3위 크게) */
.rank-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 2px 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.rank-tabs::-webkit-scrollbar { display: none; }
.rank-tab {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}
.rank-tab.is-on { background: var(--ink); color: var(--paper); }

.rank-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.rank-top { display: grid; gap: 10px; }
.rank-big {
  display: grid;
  grid-template-columns: 34px 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: left;
}
.rank-big .rank-no { font-size: 22px; }
.rank-big-cover { width: 84px; height: 118px; border-radius: 6px; overflow: hidden; background: var(--surface); }
.rank-big-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-big-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rank-big-meta b {
  font-size: 15px; font-weight: 800; line-height: 1.35; letter-spacing: -0.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-author { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-price { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 2px; }

.rank-rest { display: grid; gap: 2px; align-content: start; }
.rank-row-sm {
  display: grid;
  grid-template-columns: 22px 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 8px;
  text-align: left;
}
.rank-no { font-size: 15px; font-weight: 800; color: var(--accent); text-align: center; }
.rank-cover { width: 38px; height: 54px; border-radius: 4px; overflow: hidden; background: var(--surface); }
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rank-meta b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-grid { display: grid; gap: 10px; }
.rank-list { display: grid; gap: 2px; }

@media (max-width: 860px) {
  .cat-bar { top: 51px; }
  .rank-cols { grid-template-columns: 1fr; gap: 8px; }
  .rank-big { grid-template-columns: 26px 72px minmax(0, 1fr); }
  .rank-big .rank-no { font-size: 18px; }
  .rank-big-cover { width: 72px; height: 102px; }
  .rank-big-meta b { font-size: 14px; }
}

/* 랭킹 종류 탭 + 등락/평점 */
.rank-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 10px; }
.rank-kinds { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border-radius: 999px; }
.rank-kind {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
.rank-kind.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.rank-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.rank-delta { font-size: 10.5px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
.rank-delta.up { color: #b42318; font-size: 11px; }
.rank-delta.down { color: #1d4ed8; font-size: 11px; }
.rank-delta.same { color: var(--text-3); font-weight: 600; }
.rank-delta.new {
  color: #fff; background: var(--accent);
  border-radius: 4px; padding: 0 4px; font-size: 9.5px;
}
.rank-big { grid-template-columns: 40px 84px minmax(0, 1fr); }
.rank-row-sm { grid-template-columns: 30px 38px minmax(0, 1fr); }
.rank-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.rank-star { font-size: 12px; font-weight: 700; color: #7a4f00; }
.rank-big .rank-cell { align-self: center; }
.rank-row-sm .rank-cell { align-self: center; }

@media (max-width: 860px) {
  .rank-big { grid-template-columns: 34px 72px minmax(0, 1fr); }
  .rank-row-sm { grid-template-columns: 26px 34px minmax(0, 1fr); }
  .rank-kind { padding: 5px 11px; font-size: 12.5px; }
  .rank-controls { flex-wrap: wrap; }
}

/* 상세 메타 · 공유 · 랭킹 구독 배지 */
.drawer-top { display: flex; justify-content: flex-end; gap: 8px; }
.drawer-share {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
}
.dw-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.dw-fact {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -0.01em;
}
.dw-star { color: #7a4f00; }

.rank-subs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.rank-sub {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.rank-sub.end { background: var(--danger-soft); color: var(--danger); }

/* QA: 가독성/타깃 최소 크기 (WCAG 2.2 target 24px) */
.pick-eyebrow { font-size: 12px; }
.tl-dow, .tl-n { font-size: 12px; }
.pill { font-size: 12px; height: 22px; }
.rank-sub { font-size: 11.5px; }
.recent-clear, .link-like, .link, .sec-more, .notice-src {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.notice-src { min-width: 24px; justify-content: center; }
.result-head h1, .result-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
@media (max-width: 560px) {
  .pill { font-size: 11.5px; }
  .recent-clear, .link-like, .link, .sec-more { min-height: 26px; }
}

/* QA 2차: 푸터/인라인 링크 최소 타깃 24px */
.foot-meta a, .foot-meta button, .foot-links a, .foot-links button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.dw-fact { font-size: 12px; }

/* 웹푸시 종료 알림 카드 + 개인화 홈 */
.push-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.push-card.on { background: var(--teal-soft); border-color: transparent; }
.push-card b { font-size: 15.5px; font-weight: 800; letter-spacing: -0.02em; }
.push-card p { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.personal-section .rail-grid > * { flex-basis: 132px; }

/* 알림 세분화 칩 + 드로어 웹 링크 */
.lead-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lead-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 700;
}
.lead-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dw-weblink { margin: 14px 0 0; font-size: 12.5px; }
.dw-weblink a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* hover 효과는 마우스 환경에서만 (emil mobile-native) */
@media (hover: hover) and (pointer: fine) {
  .tab:hover { color: var(--ink); background: var(--surface); }
  .subs-btn:hover { background: #2b74e0; }
  .sub-opt:hover { background: var(--surface); }
  .search-go:hover { background: #2b74e0; }
  .chip:hover { background: var(--surface-2); color: var(--ink); }
  .recent-chip:hover { background: var(--surface-2); }
  .sec-more:hover { color: var(--accent); }
  .link-like:hover { color: var(--accent); }
  .btn-primary:hover { background: #2b74e0; }
  .tl-day:hover { background: var(--surface-2); }
  .notice-src:hover { color: var(--accent); }
  .cur-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
  .cur-chip:hover { background: var(--surface-2); color: var(--ink); }
  .genre-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .card:hover .cover-img { transform: scale(1.03); }
  .card:hover .card-title { color: var(--accent); }
  .rail-row:hover { background: var(--surface); border-radius: 6px; }
  .col-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
  .fchip:hover { background: var(--surface-2); color: var(--ink); }
  .sug-row:hover { background: var(--surface); }
  .sug-more:hover { color: var(--accent); }
  .drawer-close:hover { background: var(--surface-2); color: var(--ink); }
  .report-btn:hover { background: var(--accent); color: #fff; }
  .q-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
  .alert-row:hover { border-color: var(--line-2); background: var(--surface); }
  .foot-meta a:hover { color: var(--accent); }
  .cat-pill:hover { border-color: var(--accent); color: var(--accent); }
  .rank-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
  .cta-btn:hover, .search-go:hover, .btn-primary:hover, .subs-btn:hover { background: #a02f19; }
  .rank-tab:hover { background: var(--surface-2); color: var(--ink); }
  .rank-big:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
  .rank-row-sm:hover { background: var(--surface); }
  .rank-kind:hover { color: var(--ink); }
  .drawer-share:hover { background: var(--surface-2); color: var(--ink); }
}

/* ==========================================================================
   emilkowalski/skills — mobile-native · design engineering polish
   ========================================================================== */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* 탭 하이라이트 제거 + 버튼 텍스트 선택 방지 */
* { -webkit-tap-highlight-color: transparent; }
button, .tab, .chip, .fchip, .cat-pill, .genre-chip, .act-btn, .report-btn,
.lead-chip, .rank-tab, .rank-kind, .bottom-tab, .sug-row, .card, .rank-big,
.rank-row-sm, .cur-card, .col-card, .q-opt, .subs-btn, .btn-primary, .btn-alert {
  -webkit-user-select: none;
  user-select: none;
}
button, a, [role="button"] { touch-action: manipulation; }

/* 스크롤 체이닝 방지 */
html, body { overscroll-behavior-y: none; }
.rail-grid, .rank-row, .tl-strip, .similar-row, .cat-bar-inner, .rank-tabs,
.suggest-pop, .rank-list, .drawer {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* iOS 입력 확대 방지: 16px 이상 */
@media (max-width: 860px) {
  input, textarea, select,
  .search-big input, .search-mini input { font-size: 16px; }
}

/* 눌림 피드백: translate 대신 scale (emil active 규칙) */
.btn-primary:active, .search-go:active, .cta-btn:active, .subs-btn:active,
.chip:active, .fchip:active, .cat-pill:active, .genre-chip:active, .act-btn:active,
.report-btn:active, .lead-chip:active, .rank-tab:active, .rank-kind:active,
.bottom-tab:active, .tab:active, .drawer-close:active, .drawer-share:active,
.btn-alert:active { transform: scale(0.97); }

/* 탭바/토스트/드로어 safe-area */
.toast-root { bottom: calc(24px + env(safe-area-inset-bottom)); }
.drawer { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }

/* 숫자 흔들림 방지 */
.hero-row dd, .ov-value, .cur-figure, .rank-no, .rank-price, .rank-sub,
.notice-dday, .alert-dday, .dw-price, .dw-fact, .pill, .tl-n,
.rank-row-meta, .search-note { font-variant-numeric: tabular-nums; }

/* 긴 제목·긴 단어 안전 */
.dw-meta h2, .rank-big-meta b, .rank-meta b, .rel-card b, .card-title,
.pick-title, .cur-body b, .notice-main b, .q-title, .book-hero h1,
.card-author, .rank-author, .rank-meta span, .rel-card span {
  overflow-wrap: anywhere;
}

/* 읽기 좋은 줄 길이 */
.dw-blurb, .prose p, .legal p, .book-page .summary, .empty p { max-width: 65ch; }

/* 큰 제목은 살짝 타이트하게 (이미 적용된 곳 외) */
.hero h1, .sec-title, .pick-title, .dw-meta h2, .book-hero h1 { text-wrap: balance; }
.lede, .sec-desc, .pick-blurb, .dw-blurb, .book-hero .summary { text-wrap: pretty; }

/* 등장 모션: 200~250ms ease-out, GPU 속성만 */
@keyframes seog-panel-in { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes seog-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes seog-pop-in { from { transform: scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes seog-toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer { animation: seog-panel-in 240ms var(--ease-out); }
.drawer-scrim { animation: seog-fade-in 180ms ease-out; }
.suggest-pop { transform-origin: top center; animation: seog-pop-in 140ms var(--ease-out); }
.toast { animation: seog-toast-in 180ms var(--ease-out); }

/* reveal easing을 커스텀 커브로 (emil: 내장 easing은 약함) */
.reveal { transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }

/* reduce motion: 이동은 제거, 투명도/색은 유지 */
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-scrim, .suggest-pop, .toast { animation: none !important; }
  .reveal { transition: opacity 200ms ease !important; transform: none !important; }
}

/* 이어 읽기 로딩 스켈레톤 */
.personal-skel .card-cover { border: 0; }
.personal-skel .skel-line { display: block; }

/* ---- 로그인/동기화 ---- */
.auth-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.auth-btn:hover { border-color: var(--ink); }
.auth-btn.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 720px) {
  .auth-btn { display: none; }
}
.sync-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--paper-2, rgba(0,0,0,.015));
}
.sync-banner.is-on { border-style: solid; }
.sync-banner .link { font-size: 13px; }

/* ===== brand A — 책등의 결 (2026-10-30) ===== */
.hero h1,
.result-head h1,
.result-head h2,
.sec-title,
.pick-title,
.dw-meta h2,
.book-hero h1,
.page-head h2,
.cur-head h2,
.q-title,
.legal h1,
.doc h1,
.taste-result-head h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.sec-title, .result-head h1, .result-head h2, .page-head h2, .cur-head h2 { font-weight: 600; }
.hero h1 em { font-style: normal; }
.foot-meta a,
.prose a,
.doc a,
.legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== AdSense 동의 배너 ===== */
.ad-consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 200;
  width: min(680px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  color: var(--text-2);
}
.ad-consent b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.ad-consent p { margin: 0; line-height: 1.55; }
.ad-consent-links { margin-top: 6px !important; font-size: 12px; }
.ad-consent-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ad-consent-actions { display: flex; gap: 8px; flex: none; }
.ad-consent-actions button {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.ad-consent-no { border: 1px solid var(--line); color: var(--text-2); background: transparent; }
.ad-consent-yes { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
@media (max-width: 720px) {
  .ad-consent { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; bottom: 76px; }
  .ad-consent-actions { justify-content: flex-end; }
}

/* ===== 고정 광고 슬롯 ===== */
.ad-slot { margin: 26px auto 8px; max-width: 970px; }
.ad-slot:empty { display: none; }
.ad-slot .ad-label { font-size: 11px; letter-spacing: .04em; color: var(--text-3); margin: 0 0 5px 2px; }
.ad-slot ins { display: block; min-height: 100px; }
.book-page .ad-slot { margin: 24px 0 8px; max-width: none; }

/* ==========================================================================
   unslop by @heydamir — polish (2026-10-31)
   방향: 차분한, 정확한, 종이 냄새 / 세계: 서가·책등·도서관 종이 카드
   원칙: 크롬은 조용히, 실제 표지와 색인 숫자에만 밀도를 둔다.
   ========================================================================== */
:root {
  --hairline: rgba(35, 25, 17, 0.08);
  --hairline-soft: rgba(35, 25, 17, 0.05);
}
body { word-break: keep-all; overflow-wrap: break-word; }
.lede, .sec-desc, .hero-note, .card-title, .card-author, .hero h1, .sec-title, .pick-title,
.foot p, .cta-band h3 { word-break: keep-all; }

/* ---- 1. Spacing: 4px rhythm, quieter grouping ---- */
.nav-inner { gap: 24px; padding: 12px 24px; }
.hero { padding: 32px 24px 8px; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
.hero-main { padding-top: 4px; }
.eyebrow { margin-bottom: 16px; }
.hero h1 { margin-bottom: 16px; }
.lede { margin-bottom: 24px; max-width: 34rem; }
.quick { gap: 8px; margin-top: 16px; }
.recent-row { gap: 6px 14px; margin-top: 10px; }
.live-badge { margin-top: 16px; }
.hero-card { margin-top: 0; padding: 20px; }
.hero-row { padding: 12px 0; }
.section { padding-top: 48px; }
.sec-head { margin-bottom: 20px; }
.sec-desc { margin-top: 6px; }
.grid { gap: 24px 16px; }
.card { gap: 8px; }
.avail { gap: 10px; margin-top: 4px; }

/* ---- 2. Color: one accent, quiet chrome ---- */
.subs-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.subs-btn .count { color: var(--text-3); font-weight: 400; }
.subs-btn:hover { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.auth-btn {
  border: 0;
  background: transparent;
  color: var(--text-3);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.auth-btn:hover { background: var(--surface); color: var(--ink); }
.auth-btn.is-on { background: transparent; color: var(--text-3); border: 0; }
.auth-btn.is-on:hover { background: var(--surface); color: var(--ink); }
.tab { font-weight: 500; padding: 8px 10px; border-radius: 6px; }
.tab .count { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.eyebrow {
  padding: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.eyebrow .dot { background: var(--text-3); }
.live-badge {
  padding: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
  gap: 8px;
}
.live-badge::before { background: var(--teal); }
.hero-card { border-radius: 16px; box-shadow: 0 1px 2px var(--hairline-soft); }
.hero-card-top { margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hero-card-top b { font-size: 14px; font-weight: 500; color: var(--text-3); letter-spacing: 0.01em; }
.hero-row { border-bottom: 1px solid var(--hairline); }
.hero-row dt { font-size: 12.5px; }
.hero-row dd { font-size: 16px; font-weight: 500; letter-spacing: 0; }
.hero-row dd small { font-size: 11.5px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.hero-row dd.is-accent { color: var(--ink); }
.hero-note {
  margin-top: 12px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.6;
}
.hero-note b { color: var(--text-2); font-weight: 500; }
.cta-band { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.cta-band h3 { font-weight: 500; }
.col-n { color: var(--text-3); font-weight: 400; }

/* ---- 3. Icons: no emoji, one quiet status dot ---- */
.card:hover .card-title { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.card:hover .cover-img { transform: none; }
.sec-more:hover { color: var(--ink); }
.genre-chip:hover { border-color: var(--line-2); color: var(--ink); background: var(--card); }
.foot-meta a:hover, .foot-meta a:focus-visible { color: var(--ink); }

/* ---- 4. Copy already tightened in markup; keep quiet labels ---- */
.sec-title { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.result-head h1, .result-head h2 { font-weight: 500; }
.pick-eyebrow { padding: 0; background: transparent; color: var(--text-3); font-weight: 500; }
.pick-title { font-weight: 500; }
.col-card b { font-weight: 500; }
.cur-cat { font-weight: 500; }
.cta-band h3 { font-size: 18px; letter-spacing: -0.01em; }
.cta-btn { background: var(--ink); border-radius: 8px; font-weight: 500; padding: 10px 16px; }
.cta-btn:hover { background: #352a20; }

/* ---- 5. Type: two weights, display only on headings ---- */
.card-title { font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.45; }
.card-author { font-size: 12px; }
.hero h1 {
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.lede { font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.search-big input { font-size: 15.5px; }
.tab, .search-mini input, .search-go, .subs-btn, .auth-btn { font-weight: 500; }

/* ---- 6. Layout: quiet header, composed hero ---- */
.nav { background: rgba(247, 242, 232, 0.96); }
.search-mini { border-radius: 8px; width: 220px; padding: 8px 12px; }
.search-big {
  max-width: 620px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.search-big:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hairline); }
.search-go { border-radius: 8px; padding: 10px 18px; font-size: 14px; }

/* ---- 7. Details: radius by size, quiet counts, no pill chrome ---- */
.chip, .fchip, .cat-pill, .rank-tab, .rank-kind, .auth-btn,
.shelf-tab, .cur-chip, .lead-chip, .rank-kinds { border-radius: 8px; }
.rank-kinds { padding: 3px; background: var(--surface); }
.rank-kind { border-radius: 6px; }
.chip { padding: 8px 12px; font-size: 13px; font-weight: 400; color: var(--text-2); }
.recent-chip {
  max-width: 200px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
}
.cat-pill {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-weight: 400;
}
.cat-pill.is-on { background: var(--ink); color: var(--paper); }
.fchip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font-weight: 400;
}
.fchip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rank-tab { padding: 8px 12px; border: 1px solid transparent; background: transparent; color: var(--text-3); font-weight: 400; }
.rank-tab.is-on { background: var(--surface); border-color: var(--line); color: var(--ink); }
.pill {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  gap: 0;
}
.pill.buy { background: transparent; border: 0; color: var(--text-2); }
.pill.sub { background: transparent; color: var(--teal); }
.pill.end, .pill.hot { background: transparent; color: var(--danger); }
.pill.free { background: transparent; color: var(--gold); }
.pill.ghost { background: transparent; color: var(--text-3); }
.avail .pill::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  vertical-align: 1px;
}
.avail .pill.buy::before { display: none; }
.tag { background: transparent; border: 1px solid var(--line); border-radius: 6px; font-weight: 400; }
.card-cover { border-radius: 10px; }
.pick-card { border-radius: 16px; }
.rank-big, .col-card, .rank-item, .cur-card { border-radius: 12px; }
.rank-big-meta b, .rank-meta b, .rank-big .rank-no { font-weight: 500; }
.rank-big .rank-no { color: var(--text-3); }
.rank-price { font-weight: 500; }

/* ---- 8. Visuals: real covers carry the color ---- */
.cover-img { background: var(--surface); }
.hero-card, .pick-card, .cur-card, .col-card, .rank-big { box-shadow: none; border-color: var(--line); }

/* ---- 9. Motion: one curve, named properties ---- */
@media (prefers-reduced-motion: no-preference) {
  .tab, .chip, .recent-chip, .fchip, .cat-pill, .rank-tab, .auth-btn,
  .subs-btn, .search-go, .search-big, .sec-more, .card-title, .foot-meta a {
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out),
      border-color 140ms var(--ease-out), text-decoration-color 140ms var(--ease-out);
  }
}
.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---- consent: compact, quiet ---- */
.ad-consent { width: min(620px, calc(100vw - 24px)); padding: 14px 16px; gap: 14px; border-radius: 12px; }
.ad-consent b { font-size: 13.5px; margin-bottom: 3px; }
.ad-consent p { font-size: 12.5px; line-height: 1.55; }
.ad-consent-links { margin-top: 5px !important; font-size: 11.5px; }
.ad-consent-actions button { padding: 8px 12px; font-size: 12.5px; border-radius: 6px; font-weight: 500; }

/* content moments: real covers and figures carry the color, not the card chrome */
.pick-section { padding-top: 48px; }
.pick-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px;
  gap: 24px;
}
.pick-cover { box-shadow: 0 10px 24px -20px rgba(35, 25, 17, 0.5); }
.pick-eyebrow { background: transparent; color: var(--text-3); }
.pick-title { font-weight: 500; }
.cur-card.is-feature { background: var(--card); border-color: var(--line); }
.tl-day {
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-3);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.tl-day.is-today { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.tl-day.is-on { background: var(--ink); color: var(--paper); box-shadow: none; }
.tl-date { font-size: 17px; font-weight: 500; }
.tl-n { font-weight: 500; }
.tl-group-head b { color: var(--ink); font-weight: 500; }
.rank-kind { font-weight: 500; }
.rank-big .rank-no { font-size: 20px; font-weight: 400; }
.rank-delta { font-variant-numeric: tabular-nums; }
.rank-star { color: var(--text-3); font-weight: 400; }


@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero h1 { max-width: 18ch; }
}
@media (max-width: 720px) {
  .nav-inner { padding: 10px 20px; gap: 12px; }
  .hero { padding: 24px 20px 4px; }
  .hero h1 { font-size: 32px; }
  .hero-card { padding: 16px; }
  .ad-consent { bottom: calc(76px + env(safe-area-inset-bottom)); padding: 12px 14px; gap: 10px; }
  .ad-consent-actions { justify-content: flex-end; }
}

/* ---- unslop: 검색 결과·책 상세 ---- */
.result-head { margin: 24px 0 16px; gap: 12px; }
.result-head h1, .result-head h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.result-head span { font-size: 13px; font-weight: 400; color: var(--text-3); }
.result-head span small { font-size: 12px; }
.filter-bar { margin: 20px 0 18px; }
.sort-select { border-radius: 8px; font-weight: 400; }
.search-note { font-size: 13px; color: var(--text-3); }
.dw-meta h2 { font-weight: 500; letter-spacing: -0.01em; }
.dw-price { font-weight: 500; }
.dw-fact { color: var(--text-3); }
.av-row .state { background: transparent; border: 1px solid var(--line); border-radius: 6px; font-weight: 500; color: var(--text-3); }
.book-page .summary { word-break: keep-all; }
.book-page .av-list li { word-break: keep-all; }
