/* DearUnwritten — 박물관 기록실 느낌: 양피지 바탕 · 짙은 갈색 단추 · 세리프 제목 (시안 _reference/시안2.png · 시안21.png) */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe7d8;
  --card: #fbf8f2;
  --ink: #2b2118;
  --ink-2: #54463a;
  --muted: #8a7b6a;
  --line: #e3d9c7;
  --btn: #3b2b1f;
  --btn-ink: #f8f1e4;
  --accent: #9a6b3c;
  --soft: #f4ead6;
  --ok: #4e6b44;
  --warn: #9b3d2b;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 10px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.15; letter-spacing: -.01em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.serif { font-family: var(--serif); }
[hidden] { display: none !important; }

/* ── 머리 ── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(246, 241, 231, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-family: var(--serif); font-size: 24px; text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.logo small { font-size: 13px; color: var(--muted); font-family: var(--sans); margin-left: 2px; vertical-align: 2px; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a.on, .nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.search { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--paper-2); border-radius: 999px; padding: 8px 14px 8px 36px; font-size: 13px; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; color: var(--muted); }
.me-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 16px; font-size: 13px; white-space: nowrap; text-decoration: none; }
.me-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: var(--btn-ink); font-family: var(--serif); text-decoration: none; flex: none; }

/* ── 단추 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; background: var(--btn); color: var(--btn-ink); text-decoration: none; font-weight: 500; font-size: 14px; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; transform: none; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.arrow::after { content: ' →'; }

/* ── 첫 화면 ── */
.hero { position: relative; overflow: hidden; background: var(--paper-2) center right / cover no-repeat; min-height: 470px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--paper) 0%, rgba(246, 241, 231, .92) 34%, rgba(246, 241, 231, 0) 62%); }
.hero .wrap { position: relative; width: 100%; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1.02; letter-spacing: -.025em; }
.hero p { font-family: var(--serif); font-size: 21px; color: var(--ink-2); margin: 22px 0 30px; line-height: 1.45; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.values > div { padding: 30px 24px; text-align: center; border-right: 1px solid var(--line); }
.values > div:last-child { border-right: 0; }
.values svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--ink-2); }
.values b { display: block; font-family: var(--serif); font-weight: 500; font-size: 17px; }
.values span { font-size: 13px; color: var(--muted); }
.section { padding: 52px 0 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.section-head h2 { font-size: 32px; }
.section-head a { font-size: 14px; text-decoration: none; }

/* ── 카드 ── */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s; }
.card:hover { transform: translateY(-2px); }
.card .pic { aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .kicker { font-size: 12px; color: var(--muted); display: flex; gap: 14px; }
.card h3 { font-size: 22px; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.card .meta { margin-top: auto; padding-top: 12px; display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.card .meta svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.card.new { align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; border-style: dashed; box-shadow: none; min-height: 220px; font-family: var(--serif); font-size: 18px; }
.card.new .plus { width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-family: var(--sans); }
.by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* ── 어떻게 ── */
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 8px; }
.how > div { padding: 8px 24px 20px; border-right: 1px solid var(--line); text-align: center; }
.how > div:last-child { border-right: 0; }
.how .n { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; font-family: var(--serif); margin: 0 auto 6px; }
.how svg { width: 44px; height: 44px; margin: 6px auto 12px; color: var(--ink-2); }
.how b { display: block; font-family: var(--serif); font-weight: 500; font-size: 19px; margin-bottom: 4px; }
.how span { font-size: 13px; color: var(--muted); }
.banner { margin-top: 56px; min-height: 280px; background: #2a1f17 center right / cover no-repeat; display: flex; align-items: center; position: relative; }
.banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 20, 12, .9) 0%, rgba(30, 20, 12, .55) 45%, rgba(30, 20, 12, 0) 75%); }
.banner .wrap { position: relative; width: 100%; color: #f3e8d4; }
.banner q { display: block; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.25; max-width: 470px; quotes: none; }
.banner q::after { content: ''; display: block; width: 28px; height: 1px; background: #f3e8d4; margin-top: 22px; }
footer.foot { padding: 30px 0 50px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
footer.foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }

/* ── 둘러보기 ── */
.page-head { padding: 40px 0 18px; }
.page-head h1 { font-size: 44px; }
.page-head p { font-family: var(--serif); font-size: 19px; color: var(--ink-2); margin: 8px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 24px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--ink-2); text-align: left; }
.chip.on, .chip:hover { border-color: var(--ink-2); color: var(--ink); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 18px; }

/* ── 인물 ── */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); text-decoration: none; margin: 26px 0 12px; }
.fig-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fig-head h1 { font-size: clamp(36px, 5vw, 50px); }
.badge { background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.lede { font-family: var(--serif); font-size: 22px; line-height: 1.35; color: var(--ink-2); margin: 8px 0 0; max-width: 560px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 26px 0 0; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 0; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--ink); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.evidence { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; margin-top: 24px; }
.evidence .shot { border-radius: 6px; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; }
.evidence .shot img { width: 100%; height: 100%; object-fit: cover; }
.evidence .cap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.evidence h3 { font-size: 22px; margin-bottom: 10px; }
.evidence p { margin: 0 0 14px; color: var(--ink-2); }
.quote { background: var(--soft); border-radius: 6px; padding: 16px 18px; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.quote small { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); margin-top: 8px; }
.know { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: 22px; }
.know h3 { font-size: 22px; margin-bottom: 10px; }
.know ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.know li { margin: 4px 0; }
.know .unk { background: var(--paper-2); border-radius: var(--r); padding: 22px; }
.cta { margin: 40px 0; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta h2 { font-size: 28px; }
.steps { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.steps i { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); font-style: normal; font-size: 12px; background: var(--card); margin-right: 6px; }
.steps .on { color: var(--ink); }
.steps .on i { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.steps .sep { width: 22px; height: 1px; background: var(--line); }

/* ── 댓글 ── */
.comments { max-width: 720px; margin-top: 22px; }
.cmt { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cmt .who { font-size: 12px; color: var(--muted); }
.cmt .txt { margin-top: 2px; }
.cmt .reply { margin: 10px 0 0 18px; padding: 10px 14px; background: var(--soft); border-radius: 8px; font-size: 14px; display: flex; gap: 10px; }
.compose-box { display: flex; gap: 10px; margin-top: 16px; }
.compose-box textarea { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 10px 12px; min-height: 46px; resize: vertical; }

/* ── 작성: 인터뷰 ── */
.studio-top { border-bottom: 1px solid var(--line); background: var(--card); }
.studio-top .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.studio-top .grow { flex: 1; }
.studio { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 120px); }
.side { border-right: 1px solid var(--line); padding: 22px 18px; background: var(--paper); }
.side .shot { border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.side .shot img { width: 100%; height: 100%; object-fit: cover; }
.side h3 { font-size: 19px; margin-top: 10px; }
.side .tiny { margin-bottom: 18px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.side nav button svg { width: 16px; height: 16px; color: var(--muted); }
.side nav button.on { background: var(--paper-2); color: var(--ink); }
.side .facts { margin-top: 20px; font-size: 13px; color: var(--ink-2); }
.side .facts ul { padding-left: 16px; margin: 6px 0 0; }
.main { padding: 26px 32px 40px; max-width: 820px; }
.chat { display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg .bubble { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; max-width: 560px; white-space: pre-wrap; box-shadow: var(--shadow); }
.msg .name { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble { background: var(--soft); border-color: transparent; box-shadow: none; }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden; background: var(--paper-2) center / cover; border: 1px solid var(--line); position: relative; display: grid; place-items: center; font-family: var(--serif); }
.av.me { background: var(--btn); color: var(--btn-ink); border: 0; }
.ai-tag { font-size: 10px; letter-spacing: .04em; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 6px; color: var(--muted); }
.suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-left: 52px; }
.answer { margin-top: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: flex-end; box-shadow: var(--shadow); }
.answer textarea { flex: 1; border: 0; background: none; resize: none; min-height: 72px; outline: none; }
.send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; flex: none; }
.send:disabled { opacity: .35; }
.send svg { width: 18px; height: 18px; }
.tips { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tips ul { margin: 4px 0 0; padding-left: 16px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.notice { background: #f7e6dc; border: 1px solid #e9c8b6; color: var(--warn); border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }

/* ── 타임라인 ── */
.timeline { position: relative; margin-top: 18px; }
.trow { display: grid; grid-template-columns: 74px 22px 1fr; gap: 12px; padding-bottom: 18px; }
.trow .yr { font-size: 12px; color: var(--muted); text-align: right; padding-top: 4px; }
.trow .rail { position: relative; display: flex; justify-content: center; }
.trow .rail::before { content: ''; position: absolute; top: 0; bottom: -18px; width: 1px; background: var(--line); }
.trow:last-child .rail::before { bottom: 0; }
.trow .rail i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--muted); margin-top: 7px; }
.trow.written .rail i { background: var(--ink); border-color: var(--ink); }
.trow.focus .rail i { background: var(--accent); border-color: var(--accent); }
.tcard { display: grid; grid-template-columns: 92px 1fr; gap: 14px; }
.tcard .th { width: 92px; height: 70px; border-radius: 6px; background: var(--paper-2); overflow: hidden; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.tcard .th img { width: 100%; height: 100%; object-fit: cover; }
.tcard .th svg { width: 22px; height: 22px; }
.tcard h4 { font-size: 18px; }
.tcard h4 em { font-family: var(--sans); font-style: normal; font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.tcard p { margin: 4px 0 8px; font-size: 14px; color: var(--ink-2); }
.tcard textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 80px; background: var(--card); margin: 6px 0; }
.tcard .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 진행 ── */
.progress { max-width: 560px; margin: 80px auto; text-align: center; }
.progress h2 { font-size: 34px; margin-bottom: 10px; }
.progress ol { list-style: none; padding: 0; margin: 28px auto 0; text-align: left; display: inline-block; }
.progress li { padding: 6px 0 6px 28px; position: relative; color: var(--muted); }
.progress li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
.progress li.on { color: var(--ink); }
.progress li.on::before { background: var(--accent); border-color: var(--accent); animation: blink 1.4s infinite; }
.progress li.done { color: var(--ink-2); }
.progress li.done::before { background: var(--ink); border-color: var(--ink); }

/* ── 전기 ── */
.bio-head { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; margin-top: 6px; }
.bio-head .shot { border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.bio-head .shot img { width: 100%; height: 100%; object-fit: cover; }
.bio-head h1 { font-size: clamp(32px, 4.4vw, 46px); }
.bio-head .lede { font-size: 19px; }
.bio-title { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.bio-title b { font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--ink); }
.bio-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; margin-top: 24px; }
.disclaim { background: var(--soft); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.chapter { display: grid; grid-template-columns: 1fr 210px; gap: 22px; padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.chapter h2 { font-size: 24px; }
.chapter .yr { font-size: 12px; color: var(--muted); margin: 4px 0 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chapter .text p { margin: 0 0 10px; color: var(--ink-2); font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.chapter .pic { border-radius: 6px; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; align-self: start; }
.chapter .pic img { width: 100%; height: 100%; object-fit: cover; }
.tag { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: var(--card); color: var(--ink-2); }
.tag.known { background: #e9efe4; border-color: #cfdcc6; color: var(--ok); }
.aside > * + * { margin-top: 18px; }
.aside h3 { font-size: 20px; margin-bottom: 10px; }
.aside .shot { border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.aside .shot img { width: 100%; height: 100%; object-fit: cover; }
.aside ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.like.on { background: #f3dfd6; border-color: #e7c2b2; }

/* ── 기여: 주제 고르기 ── */
.topics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 22px 0; }
.topic { border: 1px solid var(--line); background: var(--card); border-radius: var(--r); padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; }
.topic svg { width: 28px; height: 28px; color: var(--ink-2); }
.topic:hover, .topic.on { border-color: var(--ink); box-shadow: var(--shadow); }

/* ── 서재 ── */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row .grow { flex: 1; min-width: 200px; }
.list-row b { font-family: var(--serif); font-weight: 500; font-size: 18px; }

/* ── 입장 · 로그인 · 알림 ── */
.gate { max-width: 420px; margin: 9vh auto; padding: 36px 28px; text-align: center; display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.gate .logo { font-size: 34px; }
.gate input[type=password] { border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; background: var(--paper); text-align: center; }
.gate label { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; justify-content: center; align-items: center; }
.gate .err { color: var(--warn); font-size: 13px; min-height: 18px; }
.overlay { position: fixed; inset: 0; background: rgba(43, 33, 24, .38); z-index: 50; display: grid; place-items: center; padding: 16px; }
.sheet { width: min(420px, 100%); background: var(--card); border-radius: 16px; padding: 28px 24px; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { font-size: 28px; }
.sheet p { margin: 0; color: var(--ink-2); font-size: 14px; }
.sheet .x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 24px; color: var(--muted); }
.sheet .keep { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; justify-content: center; }
.sheet input[type=text], .sheet input:not([type]) { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--paper); }
.toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 좁은 화면 ── */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(2, 1fr); }
  .how { grid-template-columns: repeat(2, 1fr); }
  .how > div:nth-child(2) { border-right: 0; }
  .evidence, .know, .bio-grid { grid-template-columns: 1fr; }
  .topics { grid-template-columns: repeat(3, 1fr); }
  .search { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top .wrap { gap: 14px; height: 56px; }
  .logo { font-size: 21px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav .opt { display: none; }
  .me-btn { margin-left: auto; }
  .hero { min-height: 420px; align-items: flex-end; background-position: 70% center; }
  .hero::before { background: linear-gradient(0deg, var(--paper) 0%, rgba(246, 241, 231, .9) 45%, rgba(246, 241, 231, .15) 100%); }
  .hero .wrap { padding-bottom: 30px; }
  .hero p { font-size: 18px; margin: 14px 0 20px; }
  .values { grid-template-columns: 1fr; }
  .values > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .section-head h2 { font-size: 26px; }
  .grid, .grid.three { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card h3 { font-size: 18px; }
  .card p { font-size: 13px; }
  .card .body { padding: 10px 12px 12px; }
  .card .meta { flex-direction: column; gap: 2px; }
  .how { grid-template-columns: 1fr 1fr; }
  .how > div { padding: 8px 10px 18px; }
  .studio { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; display: grid; grid-template-columns: 88px 1fr; gap: 0 12px; align-items: center; }
  .side .shot { grid-row: span 2; }
  .side h3 { margin-top: 0; }
  .side .tiny { margin-bottom: 0; }
  .side nav { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; margin-top: 10px; }
  .side nav button { white-space: nowrap; }
  .side .facts { display: none; }
  .main { padding: 18px 16px 30px; }
  .suggest { margin-left: 0; }
  .trow { grid-template-columns: 52px 16px 1fr; gap: 8px; }
  .tcard { grid-template-columns: 1fr; }
  .tcard .th { display: none; }
  .bio-head { grid-template-columns: 96px 1fr; gap: 14px; }
  .chapter { grid-template-columns: 1fr; }
  .chapter .pic { order: -1; }
  .chapter .text p { font-size: 17px; }
  .topics { grid-template-columns: repeat(2, 1fr); }
  .page-head h1 { font-size: 34px; }
  .tabs { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
