/* 내 상황 명언 — DESIGN.md 규칙: 그라데이션·블러·글로우 없음, 포인트 색 1개(자두색), 카드 12px, 1px 선.
   글꼴: Pretendard(본문·UI) + 고운바탕(명언 본문·제목, 명조 허용 사이트로 제안) */
:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --ink: #1D1B1E;
  --ink-2: #47434A;
  --muted: #6F6A70;
  --line: #E6E3E0;
  --accent: #7A3B69;
  --accent-soft: #F3E9F0;
  --on-accent: #FFFFFF;
  --ok: #2F6B4F;
  --warn: #8A5A12;
  --sheet-shadow: 0 8px 24px -12px rgba(0, 0, 0, .12);
  --r: 12px;
  --r-btn: 10px;
  --serif: 'Gowun Batang', 'Noto Serif KR', 'AppleMyungjo', Batang, serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121113; --surface: #1B1A1C; --ink: #EEEBEE; --ink-2: #CFCAD0; --muted: #959097; --line: #2C2A2E;
    --accent: #CF8DBF; --accent-soft: #2C2129; --on-accent: #121113; --ok: #7FB89A; --warn: #D9A04A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121113; --surface: #1B1A1C; --ink: #EEEBEE; --ink-2: #CFCAD0; --muted: #959097; --line: #2C2A2E;
  --accent: #CF8DBF; --accent-soft: #2C2129; --on-accent: #121113; --ok: #7FB89A; --warn: #D9A04A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.65; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--surface); padding: 8px 12px; border-radius: var(--r-btn); z-index: 99; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 24px; }

/* 상단바 */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { max-width: 720px; margin: 0 auto; height: 56px; padding: 0 8px 0 16px; display: flex; align-items: center; gap: 4px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); }
.top-sp { flex: 1; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-btn); cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--surface); }
.icon-btn .ico { width: 22px; height: 22px; }

/* 위치 */
.crumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }

/* 머리 */
.eyebrow { font-size: 14px; font-weight: 500; color: var(--accent); margin: 0 0 6px; }
.g-head { padding: 20px 0 8px; }
.g-head h1, .home-head h1, .doc h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.035em; margin: 0 0 8px; font-weight: 700; }
.lead { color: var(--ink-2); margin: 0; font-size: 16px; }
.home-head { padding: 32px 0 8px; }
.home-head h1 { font-family: var(--serif); font-size: clamp(30px, 7vw, 44px); line-height: 1.25; letter-spacing: -.03em; }
h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.03em; margin: 32px 0 12px; font-weight: 700; }

/* ── 대표 명언(틀 6종) ── */
.hero { margin: 16px 0 8px; padding: 32px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); position: relative; }
.hero blockquote { margin: 0; }
.hero-text p { margin: 0; }
.hero-cap { margin-top: 20px; font-size: 14px; color: var(--muted); }
.hero-cap span::before { content: '·'; margin: 0 6px; }
.hero-orig { margin: 0 0 16px; color: var(--muted); font-family: var(--serif); font-size: 15px; line-height: 1.7; }
/* 부드럽게: 가는 명조, 넓은 여백, 왼쪽 정렬 */
.hero-soft { padding: 48px 28px 40px; }
.hero-soft .hero-text { font-family: var(--serif); font-weight: 400; color: var(--ink-2); line-height: 1.95; letter-spacing: -.01em; }
.hero-soft.hero-xl .hero-text, .hero-soft.hero-l .hero-text { font-size: clamp(24px, 5.4vw, 32px); }
.hero-soft.hero-m .hero-text { font-size: clamp(20px, 4.4vw, 26px); }
.hero-soft.hero-s .hero-text { font-size: 18px; }
.hero-soft .hero-cap { padding-top: 16px; border-top: 1px solid var(--line); display: inline-block; }
/* 크게: 굵은 고딕, 꽉 차게 */
.hero-bold { padding: 32px 24px 28px; }
.hero-bold .hero-text { font-weight: 800; letter-spacing: -.045em; line-height: 1.18; }
.hero-bold.hero-xl .hero-text { font-size: clamp(40px, 11vw, 72px); }
.hero-bold.hero-l .hero-text { font-size: clamp(30px, 7.6vw, 52px); }
.hero-bold.hero-m .hero-text { font-size: clamp(24px, 5.6vw, 36px); line-height: 1.3; }
.hero-bold.hero-s .hero-text { font-size: clamp(19px, 4.4vw, 24px); line-height: 1.5; letter-spacing: -.03em; }
.hero-bold .hero-cap { color: var(--ink); font-weight: 500; }
/* 응원: 큰 숫자 + 짧은 말 */
.hero-cheer { padding: 28px 24px; display: grid; gap: 4px; }
.hero-cheer .hero-text { font-weight: 700; letter-spacing: -.035em; line-height: 1.35; }
.hero-cheer.hero-xl .hero-text, .hero-cheer.hero-l .hero-text { font-size: clamp(26px, 6.4vw, 40px); }
.hero-cheer.hero-m .hero-text { font-size: clamp(20px, 4.8vw, 28px); }
.hero-cheer.hero-s .hero-text { font-size: 18px; line-height: 1.6; }
.bignum { margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.bignum .num { font-size: clamp(56px, 16vw, 104px); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--accent); }
.bignum small { font-size: 16px; font-weight: 500; color: var(--muted); }
/* 축하: 가운데 정렬, 넉넉한 줄 간격 */
.hero-celebrate { text-align: center; padding: 44px 24px 36px; }
.hero-celebrate .hero-text { font-weight: 500; line-height: 1.85; letter-spacing: -.02em; }
.hero-celebrate.hero-xl .hero-text, .hero-celebrate.hero-l .hero-text { font-size: clamp(24px, 5.6vw, 34px); }
.hero-celebrate.hero-m .hero-text { font-size: clamp(19px, 4.4vw, 24px); }
.hero-celebrate.hero-s .hero-text { font-size: 17px; }
.hero-celebrate::before { content: ''; display: block; width: 32px; height: 1px; background: var(--accent); margin: 0 auto 24px; }
.hero-celebrate .hero-cap { margin-top: 24px; }
/* 책: 원문 위, 번역 아래, 세리프 조판, 출처는 쪽 번호처럼 */
.hero-book { padding: 32px 28px 24px; }
.hero-book .hero-text { font-family: var(--serif); font-weight: 700; line-height: 1.7; letter-spacing: -.02em; }
.hero-book.hero-xl .hero-text, .hero-book.hero-l .hero-text { font-size: clamp(24px, 5.6vw, 32px); }
.hero-book.hero-m .hero-text { font-size: clamp(20px, 4.6vw, 25px); }
.hero-book.hero-s .hero-text { font-size: 18px; }
.hero-book .hero-cap { text-align: right; font-family: var(--serif); border-top: 1px solid var(--line); padding-top: 12px; }

/* 소개·팁 */
.intro p { color: var(--ink-2); }
.intro a { color: var(--accent); }
.tips { padding-left: 20px; color: var(--ink-2); margin: 0; }
.tips li { margin: 6px 0; }

/* 검색 */
.search { position: relative; display: flex; align-items: center; gap: 8px; margin: 24px 0 8px; padding: 0 14px; height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); }
.search:focus-within { border-color: var(--accent); }
.search .ico { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.search-big { height: 56px; }
.search-res { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sheet-shadow); z-index: 15; max-height: min(60vh, 440px); overflow: auto; }
.search-res ul { list-style: none; margin: 0; padding: 6px; }
.search-res a { display: block; padding: 10px 12px; border-radius: var(--r-btn); text-decoration: none; }
.search-res a:hover, .search-res a:focus { background: var(--bg); outline: none; }
.search-res b { display: block; font-weight: 500; font-size: 15px; line-height: 1.5; }
.search-res span { font-size: 13px; color: var(--muted); }
.search-res mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.search-res .empty { padding: 14px 16px; color: var(--muted); font-size: 14px; margin: 0; }

/* 목차 */
.toc { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 16px; }
.toc summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 16px; list-style-position: inside; }
.toc ol { margin: 0 0 14px; padding-left: 22px; font-size: 14px; color: var(--ink-2); columns: 2 280px; column-gap: 28px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc-a { color: var(--muted); font-size: 12px; }

/* 명언 카드 */
.qlist { display: grid; gap: 12px; margin-top: 16px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 20px 12px; scroll-margin-top: 72px; transition: border-color .2s; }
.q.is-target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.q-text { font-family: var(--serif); font-size: 20px; line-height: 1.7; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; }
.q-orig { font-family: var(--serif); color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 10px; }
.q-orig[lang="zh-Hant"] { font-size: 17px; letter-spacing: .04em; }
.q-meta { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.q-meta a { color: var(--ink); font-weight: 500; }
.q-note, .q-body { font-size: 15px; color: var(--ink-2); margin: 10px 0 8px; }
.q-ev { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.q-ev a { color: var(--muted); }
.q-ev a:hover { color: var(--accent); }
.badge { display: inline-block; font-size: 12px; font-weight: 500; line-height: 1; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); vertical-align: 1px; white-space: nowrap; }
.badge-ok { color: var(--ok); border-color: currentColor; }
.badge-maybe { color: var(--warn); border-color: currentColor; }
.badge-no { color: var(--accent); border-color: currentColor; }
.q-acts { display: flex; gap: 4px; margin: 8px -8px 0; border-top: 1px solid var(--line); padding-top: 6px; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-btn); font-size: 14px; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.act:hover { background: var(--bg); color: var(--ink); }

/* 진위 판정 도장 */
.tpl-verdict .q-check .q-text { font-family: var(--sans); font-weight: 800; letter-spacing: -.035em; }
.stamp { display: inline-block; margin: 0 0 12px; padding: 6px 12px; border: 2px solid var(--accent); color: var(--accent); border-radius: 8px; font-weight: 800; font-size: 15px; letter-spacing: .02em; transform: rotate(-3deg); }
.stamp-maybe { border-color: var(--warn); color: var(--warn); }
.stamp-sm { font-size: 12px; padding: 2px 7px; border-width: 1.5px; margin: 0 0 6px; transform: none; }
.realq { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.realq-label { font-size: 13px; color: var(--ok); font-weight: 700; margin: 0 0 6px; }
.realq-text { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 0 0 6px; }

/* 칩·목록 */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; text-decoration: none; font-size: 15px; }
.chip .num { color: var(--muted); font-size: 13px; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.more { margin-top: 8px; }

/* 첫 화면 */
.today { margin: 24px 0 0; }
.today-h { font-size: 16px; font-weight: 700; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; }
.today-h .num { color: var(--muted); font-weight: 500; font-size: 14px; }
.today-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 24px 20px; }
.today-text { font-family: var(--serif); font-size: clamp(22px, 5.2vw, 30px); line-height: 1.6; font-weight: 700; letter-spacing: -.025em; margin: 0 0 14px; }
.today-cap { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.today-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-btn); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { border-color: var(--accent); opacity: .92; }
.btn-ghost { border-color: transparent; background: none; }
.find h2 { margin-bottom: 0; }
.sit-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 45%), 1fr)); gap: 8px; }
.sit-grid a { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; height: 100%; }
.sit-grid a:hover { border-color: var(--ink); }
.sit-grid b { font-size: 17px; }
.sit-grid span { font-size: 13px; color: var(--ink-2); font-family: var(--serif); }
.sit-grid i { font-style: normal; font-size: 12px; color: var(--muted); }
.nav-sec .chips + h2 { margin-top: 24px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list a { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.check-list a:hover { border-color: var(--ink); }
.check-list b { display: block; font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.check-list span:not(.stamp) { font-size: 13px; color: var(--muted); }
.more-link { font-size: 14px; }
.more-link a { color: var(--accent); }

/* 문서(안내·개인정보) */
.doc { padding-top: 8px; }
.doc h1 { margin-top: 16px; }
.doc p, .doc li { color: var(--ink-2); font-size: 15.5px; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--accent); }

/* 공유 시트(모달만 그림자 허용) */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: 16px 16px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: var(--sheet-shadow); }
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 16px; } }
.sheet-title { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.sheet-quote { font-family: var(--serif); color: var(--ink-2); font-size: 15px; margin: 0 0 16px; max-height: 5.2em; overflow: hidden; }
.sheet-btns { display: grid; gap: 8px; }
.sheet-btns .btn { width: 100%; }
.sheet-close { width: 100%; margin-top: 8px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-btn); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .g-head h1 { font-size: 32px; }
  .hero { padding-left: 40px; padding-right: 40px; }
  .q { padding: 24px 24px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
