:root {
  --paper: #f7f1e8; --surface: #fff; --ink: #1c1b1a; --stone: #4a4741; --hair: #e1dcd3;
  --accent: #2a72de;
  --clay: #6b443d; --forest: #224228; --gold: #ddaa61; --sage: #ced4b8;
  --olive: #5c6f5d; --ochre: #bc924c; --espresso: #39221e;
  --error: #e33a22;
  --serif: "Noto Serif KR", serif;
  --pill: 9999px; --r-card: 20px; --r-plate: 28px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 "Pretendard Variable", Pretendard, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 100%; height: 100%; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--stone); }

.top { display: flex; align-items: center; justify-content: space-between; height: 72px; border-bottom: 1px solid var(--hair); }
.mark { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.nav { display: flex; gap: 4px; font-size: 15px; }
.nav a { padding: 10px 12px; border-radius: var(--pill); color: var(--stone); }
.nav a:hover { color: var(--ink); background: rgba(74,71,65,.08); }
.nav .hide-sm { display: none; }

/* 첫 화면 */
.hero > * { min-width: 0; }
.hero { display: grid; gap: 48px; padding: 56px 0 80px; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1.2; margin: 16px 0 24px; }
.hero-lead { color: var(--stone); margin: 0 0 40px; max-width: 28em; }

.search { position: relative; max-width: 560px; }
.search-row { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--pill); padding: 6px 6px 6px 22px; gap: 8px; }
.search-row:focus-within { border-color: var(--stone); }
.search input { flex: 1; min-width: 0; border: 0; font: inherit; color: var(--ink); padding: 10px 0; background: transparent; }
.search input:focus { outline: none; }
.search button { display: flex; align-items: center; gap: 8px; border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; padding: 0 22px; min-height: 48px; border-radius: var(--pill); cursor: pointer; }
.search button svg { width: 16px; height: 16px; }
.search button:hover { filter: brightness(.92); }
.results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 10px); background: var(--surface); border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(57,34,30,.12); padding: 10px; animation: in 180ms ease-out; }
.results-count { font-size: 13px; color: var(--stone); margin: 6px 12px 8px; }
.results-list { list-style: none; margin: 0; padding: 0; }
.results .entry-link { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px; border-radius: 14px; }
.results .entry-link:hover { background: var(--paper); }
.results .entry-name { font-family: var(--serif); font-size: 18px; }
.results .entry-sci { grid-column: 1; font-size: 14px; font-style: italic; color: var(--stone); }
.results .entry-topic { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; color: var(--stone); order: 3; }
.results .entry-icon, .results .entry-meta, .results .entry-date { display: none; }
.results .state { padding: 14px 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; padding: 0; font-size: 15px; }
.chips a { display: inline-block; border: 1px solid var(--stone); color: var(--stone); padding: 7px 16px; border-radius: var(--pill); }
.chips a:hover { background: var(--stone); color: #fff; }

/* 도판 */
.plate { margin: 0; background: var(--gold); border-radius: var(--r-plate); aspect-ratio: 4 / 5; max-height: 560px; display: grid; grid-template-rows: auto 1fr auto; padding: 28px; }
.plate-art { display: block; color: var(--ink); align-self: center; justify-self: center; width: 82%; }
.plate-art svg { height: auto; aspect-ratio: 1; display: block; }
.plate figcaption { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-top: 1px solid rgba(28,27,26,.25); padding-top: 16px; }
.plate-name { font-family: var(--serif); font-size: 26px; font-weight: 300; line-height: 1.2; }
.plate-sci { font-style: italic; font-size: 15px; }
.plate figcaption a { font-size: 15px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid currentColor; }

/* 섹션 */
.sec { padding-top: 80px; }
.sec-head { margin-bottom: 32px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sec-head h2 { font-family: var(--serif); font-weight: 300; font-size: 32px; line-height: 1.2; margin: 8px 0 0; }
.more { font-size: 15px; font-weight: 600; border-bottom: 1px solid currentColor; white-space: nowrap; }

/* 도감 서가: 주제 수가 늘어도 같은 칸으로 쌓인다 */
.pills { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 20px; padding: 2px; scrollbar-width: none; }
.pills button { flex: none; font: inherit; font-size: 15px; color: var(--stone); background: transparent; border: 1px solid var(--hair); border-radius: var(--pill); padding: 0 16px; min-height: 44px; cursor: pointer; }
.pills button:hover { border-color: var(--stone); }
.pills button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pills small { font-size: 12px; opacity: .7; margin-left: 4px; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.book { position: relative; display: grid; grid-template-rows: auto 1fr auto auto; height: 100%; min-height: 188px; padding: 18px; border-radius: var(--r-card); overflow: hidden; color: #fff; }
.book-no { font-size: 12px; font-weight: 700; letter-spacing: 1px; opacity: .75; }
.book-icon { position: absolute; top: 14px; right: 14px; width: 52px; height: 52px; opacity: .85; }
.book-name { font-family: var(--serif); font-weight: 300; font-size: 20px; line-height: 1.25; margin-top: 12px; grid-row: 3; word-break: keep-all; }
.book-meta { font-size: 13px; opacity: .85; margin-top: 6px; grid-row: 4; }
a.book:hover .book-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.c-clay { background: var(--clay); } .c-forest { background: var(--forest); } .c-olive { background: var(--olive); } .c-espresso { background: var(--espresso); }
.c-gold { background: var(--gold); color: var(--ink); } .c-ochre { background: var(--ochre); color: var(--ink); }
.book.is-soon { background: transparent; color: var(--stone); border: 1px dashed #bdb6aa; }
.is-featured { grid-column: span 2; }
.is-featured .book-icon { width: 88px; height: 88px; }
.is-featured .book-name { font-size: 28px; }
.shelf .state { grid-column: 1 / -1; padding: 32px 0; }

/* 최근 등록 */
.recent { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--hair); }
.recent .entry { border-bottom: 1px solid var(--hair); }
.recent .entry-link { display: grid; grid-template-columns: 1fr auto; padding: 20px 0; gap: 2px 16px; }
.recent .entry-link:hover .entry-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.recent .entry-topic { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--stone); }
.recent .entry-name { font-family: var(--serif); font-size: 24px; font-weight: 300; line-height: 1.3; }
.recent .entry-date { grid-column: 2; grid-row: 2; align-self: center; font-size: 13px; color: var(--stone); }
.recent .entry-sci { grid-column: 1 / -1; font-style: italic; color: var(--stone); font-size: 15px; }
.recent .entry-meta { grid-column: 1 / -1; font-size: 15px; color: var(--stone); }
.recent .entry-icon { display: none; }
.entry-skeleton { display: grid; gap: 10px; padding: 22px 0; }
.entry-skeleton span { height: 12px; width: 30%; background: var(--hair); border-radius: var(--pill); animation: pulse 1.2s ease-in-out infinite; }
.entry-skeleton span:nth-child(2) { height: 22px; width: 55%; }
.entry-skeleton span:nth-child(3) { width: 70%; }

.state { list-style: none; padding: 40px 0; }
.state-title { font-family: var(--serif); font-size: 22px; font-weight: 400; margin: 0 0 6px; }
.state-body { color: var(--stone); margin: 0; font-size: 15px; }
.state-error .state-title { color: var(--error); }
.state-error .state-title::before { content: "오류 — "; }
.state-retry { margin-top: 20px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--stone); padding: 0 22px; min-height: 44px; border-radius: var(--pill); cursor: pointer; }
.state-retry:hover { background: var(--stone); color: #fff; }

/* 비교 */
.vs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-card); padding: 24px; text-align: center; }
.vs:hover { outline: 1px solid var(--stone); }
.vs-side { display: grid; justify-items: center; gap: 8px; }
.vs-side svg { width: 56px; height: 56px; color: var(--stone); }
.vs-side b { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.3; }
.vs-mid { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--stone); }
.vs small { grid-column: 1 / -1; font-size: 14px; color: var(--stone); border-top: 1px solid var(--hair); padding-top: 12px; }

.ad { margin-top: 80px; border: 1px dashed #bdb6aa; border-radius: var(--r-card); min-height: 120px; display: grid; place-items: center; color: var(--stone); font-size: 12px; letter-spacing: 1px; }

footer { margin-top: 128px; border-top: 1px solid var(--hair); padding: 48px 0; font-size: 15px; color: var(--stone); }
.foot { display: grid; gap: 20px; }
.foot .mark { color: var(--ink); }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot nav a:hover { color: var(--ink); }

@keyframes in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (min-width: 640px) {
  .nav .hide-sm { display: inline-block; }
  .hero h1 { font-size: 56px; }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .book { min-height: 220px; padding: 22px; }
  .recent { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .vs-list { grid-template-columns: repeat(3, 1fr); }
  .foot { grid-template-columns: 1fr auto; align-items: end; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.15fr .85fr; align-items: center; padding: 80px 0 128px; }
  .hero h1 { font-size: 64px; }
  .sec { padding-top: 128px; }
  .sec-head h2 { font-size: 36px; }
  .shelf { grid-template-columns: repeat(5, 1fr); }
  .is-featured .book-icon { width: 140px; height: 140px; }
}

/* ───────── 하위 페이지 공통 ───────── */
.top { gap: 16px; }
.top .search { display: none; }
.top .search-row { padding: 3px 3px 3px 18px; }
.top .search input { padding: 6px 0; font-size: 15px; }
.top .search button { background: var(--ink); min-height: 40px; font-size: 14px; padding: 0 16px; }
.top-search { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--pill); color: var(--stone); }
.top-search svg { width: 18px; height: 18px; }
.top-search:hover { background: rgba(74,71,65,.08); color: var(--ink); }
.top-right { display: flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.pills a, .pills button { display: inline-flex; align-items: center; }
.pills a { flex: none; font-size: 15px; color: var(--stone); border: 1px solid var(--hair); border-radius: var(--pill); padding: 0 16px; min-height: 44px; }
.pills a:hover { border-color: var(--stone); }
.pills a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pills a small { font-size: 12px; opacity: .7; margin-left: 4px; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 8px; list-style: none; margin: 0; padding: 16px 0 0; font-size: 14px; color: var(--stone); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #bdb6aa; }
.crumbs a { display: inline-block; padding: 10px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.page-head { padding: 24px 0 48px; max-width: 46em; }
.page-head h1 { font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1.15; margin: 12px 0 16px; word-break: keep-all; }
.page-lead { color: var(--stone); font-size: 18px; margin: 0; }
.updated { font-size: 14px; color: var(--stone); margin: 16px 0 0; }

/* 주제 표지 */
.cover { position: relative; overflow: hidden; border-radius: var(--r-plate); padding: 28px; margin-top: 16px; color: #fff; }
.cover.c-gold, .cover.c-ochre { color: var(--ink); }
.cover h1 { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1.1; margin: 10px 0 12px; position: relative; word-break: keep-all; }
.cover p { margin: 0; max-width: 28em; opacity: .9; position: relative; }
.cover-icon { position: absolute; right: -10px; bottom: -20px; width: 150px; height: 150px; opacity: .3; }
.cover .eyebrow { color: inherit; opacity: .8; position: relative; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 28px 0 0; position: relative; }
.stats div { display: grid; }
.stats dt { font-size: 12px; font-weight: 700; letter-spacing: 1px; opacity: .75; }
.stats dd { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 300; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 20px; }
.toolbar .pills { margin: 0; flex: 1 1 100%; }
.count { font-size: 15px; color: var(--stone); margin: 0; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--stone); }
.sort select { font: inherit; color: var(--ink); background-color: var(--surface); border: 1px solid var(--hair); border-radius: var(--pill); padding: 0 36px 0 16px; min-height: 44px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%); background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }

/* 항목 카드 목록: 번호가 곧 도판 */
.cards { --tc: var(--clay); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cards .entry-link { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: var(--r-card); overflow: hidden; padding-bottom: 18px; }
.cards .entry-link::before { content: attr(data-no); display: flex; align-items: flex-end; aspect-ratio: 4 / 3; padding: 14px 16px; background: var(--paper); border: 6px solid var(--surface); border-radius: var(--r-card); font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1; color: var(--tc); }
.cards .entry-icon { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; color: var(--tc); }
.cards .entry-topic, .cards .entry-date { display: none; }
.cards .entry-name { font-family: var(--serif); font-size: 19px; line-height: 1.3; padding: 10px 16px 0; word-break: keep-all; }
.cards .entry-sci { font-style: italic; font-size: 13px; color: var(--stone); padding: 2px 16px 0; overflow-wrap: anywhere; }
.cards .entry-meta { font-size: 13px; color: var(--stone); padding: 8px 16px 0; margin-top: auto; }
.cards .entry-link:hover .entry-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cards .entry-skeleton { background: var(--surface); border-radius: var(--r-card); padding: 6px 6px 18px; gap: 10px; }
.cards .entry-skeleton span { margin-left: 10px; }
.cards .entry-skeleton span:first-child { aspect-ratio: 4 / 3; width: 100%; height: auto; border-radius: 16px; margin-left: 0; }
.cards .state, .cards .ad { grid-column: 1 / -1; }
.cards .ad { margin: 8px 0; }

.pager ol { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 48px 0 0; }
.pager a, .pager span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--pill); font-size: 15px; color: var(--stone); }
.pager a:hover { background: rgba(74,71,65,.08); color: var(--ink); }
.pager [aria-current="page"] { background: var(--ink); color: #fff; }

.siblings { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 300; }
.siblings a { display: inline-block; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.siblings a:hover { border-color: var(--ink); }
.siblings small { font-family: "Pretendard Variable", Pretendard, sans-serif; font-size: 13px; color: var(--stone); margin-left: 4px; }

/* 항목 상세 */
.entry-hero { display: grid; gap: 32px; padding: 24px 0 56px; }
.entry-hero > * { min-width: 0; }
.entry-hero h1 { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1.1; margin: 12px 0 4px; word-break: keep-all; }
.entry-sci-lg { font-style: italic; font-size: 19px; color: var(--stone); margin: 0 0 24px; }
.definition { font-size: 19px; line-height: 1.7; margin: 0; }
.entry-hero .plate { max-height: 480px; }
.plate-credit { font-size: 12px; color: var(--stone); margin: 10px 4px 0; }
.layout { display: grid; gap: 48px; }
.layout > * { min-width: 0; }
.facts { background: var(--surface); border-radius: var(--r-card); padding: 24px; align-self: start; }
.facts h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0 0 8px; }
.facts dl { display: grid; grid-template-columns: 84px 1fr; margin: 0; font-size: 15px; }
.facts dt, .facts dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.facts dt { color: var(--stone); }
.facts dd { font-weight: 500; }
.facts-note { font-size: 13px; color: var(--stone); margin: 14px 0 0; }
.facts-links { display: grid; gap: 4px; margin-top: 16px; font-size: 15px; font-weight: 600; }
.facts-links a { padding: 8px 0; border-bottom: 1px solid currentColor; justify-self: start; }

.prose { max-width: 40em; }
.prose h2 { font-family: var(--serif); font-weight: 300; font-size: 30px; line-height: 1.25; margin: 64px 0 16px; word-break: keep-all; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 32px 0 8px; }
.prose p, .prose li { color: #2e2c29; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose p a, .prose li a { border-bottom: 1px solid currentColor; }
.prose .ad { margin: 56px 0; }
.note { background: var(--sage); border-radius: var(--r-card); padding: 22px 24px; margin: 32px 0; }
.note strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 20px; margin-bottom: 6px; }
.note p { margin: 8px 0 0; }

.size-chart { list-style: none; padding: 0; margin: 24px 0 8px; display: grid; gap: 14px; }
.size-chart li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; margin: 0; }
.size-chart .bar { grid-column: 1 / -1; height: 14px; border-radius: var(--pill); background: var(--hair); overflow: hidden; }
.size-chart .bar i { display: block; height: 100%; width: var(--w); background: var(--stone); border-radius: inherit; }
.size-chart .is-me { font-weight: 600; }
.size-chart .is-me .bar i { background: var(--clay); }
.chart-note { font-size: 13px; color: var(--stone); }

.faq { border-top: 1px solid var(--hair); margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 12px 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1.5px solid var(--stone); border-bottom: 1.5px solid var(--stone); transform: rotate(45deg) translateY(-3px); transition: transform 160ms ease-out; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { margin: 0 0 20px; }
.refs { font-size: 15px; padding-left: 1.4em; }
.refs li { margin: 8px 0; color: var(--stone); }

/* 비교 */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duel .plate { aspect-ratio: auto; max-height: none; min-height: 280px; padding: 20px; color: #fff; }
.duel .plate.c-gold { color: var(--ink); }
.duel .plate-art { width: 70%; color: inherit; }
.duel .plate figcaption { flex-direction: column; align-items: flex-start; gap: 8px; border-color: currentColor; }
.duel .plate-name { font-size: 22px; word-break: keep-all; }
.duel .plate figcaption a { border-color: currentColor; }
.flip { transform: scaleX(-1); }
.verdict { background: var(--surface); border-radius: var(--r-card); padding: 24px; margin: 24px 0 0; }
.verdict .eyebrow { display: block; margin-bottom: 8px; }
.verdict p { font-family: var(--serif); font-size: 21px; font-weight: 300; line-height: 1.55; margin: 0; word-break: keep-all; }
.table-scroll { overflow-x: auto; margin: 24px 0; border-radius: var(--r-card); background: var(--surface); }
.cmp { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.cmp caption { text-align: left; padding: 20px 20px 4px; font-size: 13px; color: var(--stone); }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 14px 20px; border-bottom: 1px solid var(--hair); }
.cmp thead th { font-family: var(--serif); font-weight: 400; font-size: 18px; }
.cmp tbody th { font-weight: 500; color: var(--stone); width: 22%; }
.cmp tr:last-child > * { border-bottom: 0; }
.cmp strong { font-weight: 600; box-shadow: inset 0 -7px 0 #eed9b0; }

/* 문서형(소개·정책·문의) */
.doc { display: grid; gap: 40px; }
.doc .toc { font-size: 15px; }
.doc .toc ol { list-style: none; padding: 0; margin: 8px 0 0; display: grid; }
.doc .toc a { display: block; padding: 8px 0; color: var(--stone); }
.doc .toc a:hover { color: var(--ink); }

.form { display: grid; gap: 22px; max-width: 36em; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--stone); font-weight: 400; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; padding: 12px 16px; min-height: 48px; width: 100%; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--stone); box-shadow: 0 0 0 3px rgba(74,71,65,.12); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { font-size: 14px; color: var(--error); margin: 0; }
.field-error::before { content: "! "; font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.btn-primary { justify-self: start; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: var(--pill); padding: 0 28px; min-height: 52px; cursor: pointer; }
.btn-primary:hover { filter: brightness(.92); }
.btn-primary[aria-busy="true"] { opacity: .6; cursor: progress; }
.form-status { border-radius: var(--r-card); padding: 20px 24px; }
.form-status.ok { background: var(--sage); }
.form-status.err { background: #fbe3dd; }
.form-status strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 20px; }
.form-status p { margin: 6px 0 0; }

/* 404 */
.lost { display: grid; gap: 32px; padding: 48px 0 0; }
.lost > * { min-width: 0; }
.lost .plate { aspect-ratio: 4 / 3; max-height: 360px; background: var(--sage); }
.lost .plate-art { width: 46%; }
.lost h1 { font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1.15; margin: 12px 0; }
.lost .chips { margin-top: 28px; }

@media (min-width: 640px) {
  .page-head h1 { font-size: 52px; }
  .cover { padding: 48px; }
  .cover h1 { font-size: 56px; }
  .cover-icon { width: 240px; height: 240px; right: 32px; bottom: -32px; }
  .toolbar .pills { flex: 1 1 auto; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .entry-hero h1 { font-size: 56px; }
  .duel .plate { min-height: 360px; padding: 28px; }
  .duel .plate-name { font-size: 28px; }
  .lost h1 { font-size: 52px; }
}
@media (min-width: 960px) {
  .top .search { display: block; flex: 1; max-width: 380px; margin-left: auto; }
  .top-search { display: none; }
  .cover { padding: 64px; min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; }
  .cover h1 { font-size: 72px; }
  .cover-icon { width: 340px; height: 340px; right: 64px; bottom: -48px; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .entry-hero { grid-template-columns: 1.2fr .8fr; align-items: center; gap: 64px; padding: 40px 0 96px; }
  .entry-hero h1 { font-size: 72px; }
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 80px; }
  .layout .facts { position: sticky; top: 24px; grid-column: 2; grid-row: 1; }
  .layout .prose { grid-column: 1; grid-row: 1; }
  .doc { grid-template-columns: 200px minmax(0, 1fr); gap: 80px; }
  .doc .toc { position: sticky; top: 24px; align-self: start; }
  .lost { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding-top: 80px; }
}
.field .check { font-weight: 400; }
.foot nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
h1, h2, h3 { overflow-wrap: break-word; } /* keep-all 이어도 화면보다 긴 한 단어는 끊는다 */
.duel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.duel .plate { min-width: 0; }
@media (max-width: 479px) { .duel { grid-template-columns: 1fr; } .duel .plate { min-height: 220px; } .duel .plate-art { width: 46%; } }
.crumbs ol { align-items: center; }
.crumbs li[aria-current] { padding: 10px 0; }
