/* 모든 페이지가 함께 쓰는 모양. 색은 앱 테마(ui/theme/Color.kt)와 아이콘 색에서 가져왔다.
   외부 글꼴·스크립트를 쓰지 않는다(방문 정보를 다른 곳에 보내지 않는다는 처리방침의 약속). */
:root {
  --bg: #FCF8F2; --bg-2: #F6EFE5; --surface: #FFFFFF; --surface-2: #FBF6EF;
  --ink: #1C1917; --muted: #57534E; --faint: #8A817A; --line: #EAE2D8;
  --primary: #C2410C; --primary-deep: #9A3412; --on-primary: #FFFFFF;
  --soft: #FFEDD5; --on-soft: #7C2D12;
  --lav: #A78BFA; --lav-soft: #EDE9FE; --on-lav: #4C1D95;
  --amber: #FBBF24; --amber-soft: #FEF3C7;
  --mint: #DCFCE7; --on-mint: #14532D;
  --glass: rgba(252, 248, 242, .72);
  --shadow-sm: 0 1px 2px rgba(60, 30, 10, .06), 0 4px 14px rgba(60, 30, 10, .05);
  --shadow: 0 2px 6px rgba(60, 30, 10, .06), 0 18px 48px rgba(124, 45, 18, .12);
  --shadow-lg: 0 30px 80px rgba(124, 45, 18, .22);
  --serif: "Iowan Old Style", "Apple Garamond", Georgia, "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", "Noto Serif CJK KR", serif;
  --sans: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110F; --bg-2: #1B1714; --surface: #221C19; --surface-2: #1E1916;
    --ink: #FAF5F0; --muted: #D6CBC2; --faint: #A39A92; --line: #3A312C;
    --primary: #FDBA74; --primary-deep: #FB923C; --on-primary: #431407;
    --soft: #4A1D0B; --on-soft: #FFEDD5;
    --lav: #C4B5FD; --lav-soft: #2E1065; --on-lav: #EDE9FE;
    --amber: #FCD34D; --amber-soft: #422006;
    --mint: #14532D; --on-mint: #DCFCE7;
    --glass: rgba(20, 17, 15, .72);
    --shadow-sm: none;
    --shadow: 0 18px 48px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 7.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.6vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.3em; }
li + li { margin-top: 6px; }
.serif { font-family: var(--serif); }
.lead { font-size: clamp(1.02rem, 2.6vw, 1.15rem); color: var(--muted); max-width: 36em; }
.note { color: var(--muted); font-size: .92rem; }
.meta { color: var(--muted); font-size: .92rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px 5px 10px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: .85rem; font-weight: 600; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); position: relative; flex: none; }

/* 종이 결: 배경에 아주 옅게 깐다. */
.grain::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain::before { mix-blend-mode: screen; opacity: .25; } }
main, header, footer { position: relative; z-index: 1; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.top.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(60, 30, 10, .06); }
.top .bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.12rem; }
.brand svg { width: 34px; height: 34px; flex: none; transition: transform .5s var(--ease); }
.brand:hover svg { transform: rotate(-8deg) scale(1.06); }
.brand small { font-family: var(--serif); font-weight: 700; color: var(--primary); font-size: .95rem; letter-spacing: .01em; }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { position: relative; color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--on-soft); background: var(--soft); }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i, .menu summary i::before, .menu summary i::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform .3s var(--ease), background .2s; }
.menu summary i::before, .menu summary i::after { content: ""; position: absolute; left: 0; }
.menu summary i::before { top: -6px; } .menu summary i::after { top: 6px; }
.menu[open] summary i { background: transparent; }
.menu[open] summary i::before { transform: translateY(6px) rotate(45deg); }
.menu[open] summary i::after { transform: translateY(-6px) rotate(-45deg); }
.menu .panel { position: absolute; right: 0; top: 52px; width: min(260px, calc(100vw - 32px)); padding: 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; animation: drop .25s var(--ease); }
.menu .panel a { padding: 12px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu .panel a[aria-current="page"] { background: var(--soft); color: var(--on-soft); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@media (max-width: 720px) { .nav { display: none; } .menu { display: block; } }

/* 읽은 만큼 차는 책갈피 줄 */
.progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--lav), var(--primary) 60%, var(--amber)); border-radius: 0 3px 3px 0; }

/* 버튼 */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px;
  border-radius: 999px; border: 0; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 22px rgba(194, 65, 12, .28);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(194, 65, 12, .34); }
.btn:active { transform: translateY(0) scale(.97); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; box-shadow: none; }
@media (prefers-color-scheme: dark) { .btn { box-shadow: none; } .btn:hover { box-shadow: 0 10px 30px rgba(253, 186, 116, .2); } }

/* 카드 */
.card {
  --mx: 50%; --my: 0%;
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card > :last-child { margin-bottom: 0; }

/* 머리 아래 공통 표제 */
.page-hero { position: relative; padding: 44px 0 28px; overflow: hidden; }
.page-hero h1 { font-size: clamp(1.9rem, 6.4vw, 3rem); }
.page-hero .lead { margin-bottom: 0; }
.blobs { position: absolute; inset: -20% -10% auto; height: 520px; pointer-events: none; z-index: -1; filter: blur(60px); opacity: .75; }
.blobs i { position: absolute; border-radius: 50%; }
.blobs i:nth-child(1) { width: 380px; height: 380px; left: -60px; top: 40px; background: #FFD8B8; }
.blobs i:nth-child(2) { width: 320px; height: 320px; right: 6%; top: -20px; background: #DDD3FF; }
.blobs i:nth-child(3) { width: 240px; height: 240px; left: 42%; top: 160px; background: #FDE68A; opacity: .7; }
@media (prefers-color-scheme: dark) {
  .blobs { opacity: .45; }
  .blobs i:nth-child(1) { background: #7C2D12; } .blobs i:nth-child(2) { background: #4C1D95; } .blobs i:nth-child(3) { background: #713F12; }
}


/* 접는 질문 */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 18px; transition: box-shadow .3s, border-color .3s; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.faq summary { list-style: none; cursor: pointer; font-weight: 700; padding: 16px 32px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > :not(summary) { margin: 0 0 16px; color: var(--muted); animation: drop .3s var(--ease); }

/* 바닥 */
.foot { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: .92rem; }
.foot .wrap { display: grid; gap: 18px; padding-top: 32px; padding-bottom: 40px; }
.foot .row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--primary); text-decoration: underline; }
.foot .brand { font-size: 1rem; }
.foot .brand svg { width: 28px; height: 28px; }
.family { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink) !important; font-weight: 700; width: fit-content; transition: transform .25s var(--ease), box-shadow .25s; }
.family:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); text-decoration: none !important; }
.family .arrow { color: var(--primary); }

/* 효과를 끄는 경우: 움직임 줄이기 설정, 캡처용 ?still */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
