:root {
  --paper: #fcfbf8;
  --paper-deep: #f5f0ea;
  --ink: #28241e;
  --muted: #6f7480;
  --line: #dedbd5;
  --brown: #8b6b57;
  --brown-dark: #6f5140;
  --sage: #788270;
  --white: #fffefa;
  --shadow: 0 18px 60px rgb(68 54 43 / 10%);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 14% 5%, rgb(139 107 87 / 7%), transparent 26rem),
    radial-gradient(circle at 90% 18%, rgb(120 130 112 / 7%), transparent 28rem),
    var(--paper);
  color: var(--ink);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--brown-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a36e4a; outline-offset: 4px; border-radius: 4px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(222 219 213 / 80%);
  background: rgb(252 251 248 / 92%);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.page-shell,
.hero,
.section-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand-copy { display: grid; line-height: 1.18; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; letter-spacing: .12em; font-size: 1.16rem; }
.brand-copy small { color: var(--muted); font-size: .72rem; }

.primary-nav { display: flex; gap: 6px; margin-left: auto; }
.primary-nav a,
.language-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: #55565a;
  text-decoration: none;
  font-size: .9rem;
}
.primary-nav a[aria-current="page"],
.language-nav a[aria-current="true"] { background: var(--paper-deep); color: var(--ink); font-weight: 700; }
.language-nav { display: flex; gap: 2px; border-left: 1px solid var(--line); padding-left: 18px; }
.language-nav a { width: 44px; padding-inline: 0; }

.hero {
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: clamp(44px, 8vw, 112px);
  padding-block: 64px;
}
.eyebrow { color: var(--brown); font-weight: 750; letter-spacing: .08em; font-size: .84rem; text-transform: uppercase; }
.hero h1, .document-hero h1, .invite-card h1, .not-found h1 {
  margin: 12px 0 20px;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.18;
}
.hero h1 { max-width: 720px; font-family: inherit; font-size: clamp(2.35rem, 5vw, 4.4rem); white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.hero-lead { max-width: 620px; color: #62646a; font-size: clamp(1.06rem, 2vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 1px solid var(--brown);
  border-radius: 999px;
  background: var(--brown);
  color: white;
  font-weight: 750;
  text-decoration: none;
}
.button:hover { background: var(--brown-dark); color: white; }
.button.secondary { background: transparent; color: var(--brown-dark); }
.button.secondary:hover { background: var(--paper-deep); }
.button[aria-disabled="true"] { border-color: var(--line); background: var(--paper-deep); color: var(--muted); cursor: not-allowed; }

.book-stage { display: grid; place-items: center; min-width: 0; }
.hero-logo { display: block; width: 100%; max-width: 460px; height: auto; border-radius: 28%; }
.release-note { font-size: .875rem; color: var(--muted); margin-top: 16px; }
.walkthrough { display: grid; gap: 56px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.feature-row + .feature-row { padding-top: 48px; border-top: 1px solid var(--line); }
.feature-copy h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.4; margin: 12px 0 18px; word-break: keep-all; overflow-wrap: anywhere; }
.feature-copy p { color: var(--muted); margin: 0; font-size: 1.0625rem; }
.app-preview { min-width: 0; margin: 0; }
.preview-sheet { background: var(--paper); padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 32px rgb(68 54 43 / 5%); }
.preview-heading { margin: 0 0 18px; font-weight: 650; font-size: 1.15rem; }
.preview-covers { display: flex; justify-content: center; gap: 28px; padding-block: 10px; }
.preview-book { min-width: 0; flex: 0 1 130px; text-align: center; }
.preview-book img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; box-shadow: 4px 6px 12px rgb(68 54 43 / 14%); }
.preview-book span { display: block; margin-top: 12px; font-size: .875rem; }
.preview-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); text-align: center; }
.scene-image { width: 100%; height: auto; display: block; border-radius: 6px; }
.scene-caption { white-space: pre-line; margin: 18px 0 10px; }
.scene-position { color: var(--brown); font-size: .875rem; margin: 0; }
.preview-comment { border-left: 2px solid var(--sage); padding: 10px 16px; background: white; }
.preview-comment p { margin: 4px 0 0; }
.doodle-heading { margin-top: 28px; }
.color-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.person { display: inline-flex; align-items: center; gap: 7px; }
.person::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--brown); }
.person-1::before { background: #76a2bf; }
.person-2::before { background: #788270; }
figcaption { text-align: right; font-size: .8125rem; color: var(--muted); margin-top: 10px; }
.faq-inner { max-width: 800px; }
.faq-inner h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); margin: 0 0 24px; }
.faq-item { border-top: 1px solid var(--line); padding-block: 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; min-height: 44px; align-content: center; padding-right: 12px; }
.faq-item p { color: var(--muted); margin: 10px 0; }
.contact-link { display: inline-block; margin-top: 24px; min-height: 44px; align-content: center; color: var(--brown-dark); }
.callout a, .contact-link { overflow-wrap: anywhere; }
#how-it-works { scroll-margin-top: 100px; }
html:lang(ko) p, html:lang(ko) li { word-break: keep-all; overflow-wrap: anywhere; }

.section { padding-block: 92px; border-top: 1px solid rgb(222 219 213 / 80%); }
.section.tint { background: rgb(245 240 234 / 70%); }
.section-heading { max-width: 700px; margin-bottom: 40px; }
.section-heading h2 { margin: 0 0 12px; font-size: clamp(1.75rem, 3.5vw, 2.8rem); line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.section-heading p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgb(255 254 250 / 90%);
  box-shadow: 0 9px 26px rgb(68 54 43 / 5%);
}
.card-number { color: var(--brown); font-family: Georgia, serif; font-size: .82rem; letter-spacing: .12em; }
.card h3 { margin: 20px 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }
.trust-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0; list-style: none; }
.trust-list li { padding: 22px 24px; border-left: 3px solid var(--sage); background: var(--white); border-radius: 0 16px 16px 0; }

.page-shell { padding-block: 68px 112px; }
.document-hero { max-width: 820px; padding: 28px 0 52px; border-bottom: 1px solid var(--line); }
.document-hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.document-hero .intro { color: var(--muted); font-size: 1.1rem; }
.effective { margin-top: 22px; color: var(--brown-dark); font-size: .9rem; }
.document-layout { display: grid; grid-template-columns: 210px minmax(0, 740px); gap: 70px; align-items: start; padding-top: 50px; }
.document-toc { position: sticky; top: 114px; padding: 0; list-style: none; }
.document-toc a { min-height: 38px; display: block; padding: 7px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: .9rem; }
.document-toc a:hover { border-color: var(--brown); color: var(--ink); }
.document-content section { scroll-margin-top: 112px; padding: 0 0 44px; }
.document-content section + section { padding-top: 42px; border-top: 1px solid var(--line); }
.document-content h2 { margin: 0 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; line-height: 1.35; }
.document-content p { margin: 0 0 14px; }
.document-content ul { margin: 12px 0 0; padding-left: 1.35em; }
.document-content li + li { margin-top: 7px; }
.callout { margin-top: 24px; padding: 20px 22px; border-radius: 16px; background: var(--paper-deep); }

.invite-wrap, .not-found { min-height: 650px; width: min(720px, calc(100% - 48px)); margin: auto; display: grid; place-items: center; padding-block: 80px; text-align: center; }
.invite-card { width: 100%; padding: clamp(32px, 7vw, 64px); border: 1px solid var(--line); border-radius: 34px; background: var(--white); box-shadow: var(--shadow); }
.invite-card img { width: 92px; height: 92px; border-radius: 24px; }
.invite-card h1, .not-found h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
.invite-card p, .not-found p { color: var(--muted); }
.invite-actions { justify-content: center; }
.token-note { margin-top: 24px; font-size: .84rem; }

.site-footer { border-top: 1px solid var(--line); padding-block: 46px; background: #f7f3ed; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: start; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand img { width: 44px; height: 44px; }
.footer-copy p { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; color: #595b61; font-size: .88rem; }
.footer-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

.loading-shell, .noscript { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 8px 16px; padding-block: 12px; }
  .brand { margin-right: auto; }
  .brand-copy small { display: none; }
  .language-nav { padding-left: 8px; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; margin: 0; padding-top: 4px; }
  .primary-nav a { white-space: nowrap; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-block: 64px; }
  .hero { grid-template-columns: 1.3fr 1fr; gap: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: auto; }
  .document-layout { grid-template-columns: 1fr; gap: 28px; }
  .document-toc { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; }
  .document-toc li { min-width: max-content; }
  .document-toc a { border-left: 0; border-bottom: 2px solid var(--line); }
}

@media (max-width: 620px) {
  .header-inner, .footer-inner, .page-shell, .hero, .section-inner { width: min(100% - 32px, 1120px); }
  .header-inner { min-height: 68px; }
  .brand img { width: 38px; height: 38px; }
  .language-nav a { width: 40px; }
  .site-header { position: relative; }
  .header-inner { gap: 4px 8px; padding-block: 8px; }
  .language-nav { border-left: 0; padding-left: 0; }
  .language-nav a { width: 44px; font-size: .875rem; }
  .primary-nav { padding-top: 0; flex-wrap: wrap; overflow: visible; gap: 0 4px; }
  .primary-nav a { padding-inline: 10px; font-size: .875rem; white-space: normal; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-block: 32px 40px; }
  .hero h1 { font-size: clamp(2.1rem, 9.5vw, 2.8rem); }
  .hero-lead { font-size: 1rem; }
  .hero-logo { max-width: 240px; }
  .actions { gap: 10px; margin-top: 24px; }
  .actions .button { flex: 1 1 auto; padding: 12px 16px; text-align: center; }
  .section { padding-block: 44px; }
  .section-heading { margin-bottom: 28px; }
  .feature-row { grid-template-columns: 1fr; gap: 22px; }
  .feature-row + .feature-row { padding-top: 32px; }
  .walkthrough { gap: 32px; }
  .feature-copy p { font-size: 1rem; }
  .trust-list li { padding: 18px; }
  .document-hero { padding-block: 0 28px; }
  .document-hero h1 { font-family: inherit; font-size: 2rem; overflow-wrap: anywhere; }
  .page-shell { padding-block: 32px 56px; }
  #how-it-works { scroll-margin-top: 16px; }
  .trust-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-meta { grid-column: auto; }
  .invite-wrap, .not-found { width: min(100% - 32px, 720px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media (prefers-contrast: more) {
  :root { --muted: #494949; --line: #aaa39a; --brown: #704a34; }
  .card, .invite-card { border-width: 2px; }
}

@media print {
  .site-header, .site-footer, .document-toc, .skip-link { display: none; }
  body { background: white; font-size: 11pt; }
  .page-shell { width: 100%; padding: 0; }
  .document-layout { display: block; padding-top: 24px; }
  .document-content section { break-inside: avoid; }
}
