:root {
  color-scheme: light;
  --paper: #f4efe4;
  --sheet: #faf7f0;
  --ink: #2a2723;
  --ink-2: #5f594f;
  --ink-3: #958c7d;
  --ghost: #aaa08e;
  --rule: #e4dbc9;
  --line: #d9cfbc;
  --seal: #b23a2a;
  --seal-soft: rgba(178, 58, 42, 0.1);
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .18 0 0 0 .085 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--paper);
  background-image: var(--grain), radial-gradient(120% 80% at 50% 0%, #f8f4ea 0%, var(--paper) 60%, #ece5d6 100%);
  background-attachment: fixed;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }

/* ── 머리 · 탭 ───────────────────────── */

.top {
  max-width: 600px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 22px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 700 19px/1 var(--serif);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-seal {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--seal);
  color: var(--sheet);
  font-size: 13px;
  transform: rotate(-4deg);
}

.top-date { font-size: 13px; color: var(--ink-3); letter-spacing: 0.02em; }

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 22px calc(110px + env(safe-area-inset-bottom));
}

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(244, 239, 228, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  z-index: 10;
}

.tabs a {
  flex: 0 1 120px;
  text-align: center;
  padding: 10px 0 8px;
  font: 600 15px/1 var(--serif);
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }

.tabs[hidden],
body.writing .tabs { display: none; }

/* ── 공통 글자 · 버튼 · 입력 ───────────── */

.eyebrow { margin: 0; font-size: 13px; color: var(--ink-3); letter-spacing: 0.03em; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; }

.section-title { font-size: 15px; color: var(--ink-2); margin: 40px 0 12px; letter-spacing: 0.02em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--ink-3);
  background: transparent;
  font: 600 15px/1 var(--serif);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: rgba(42, 39, 35, 0.04); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.btn.primary:hover { background: #3a3631; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.link {
  border: 0;
  background: none;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.link.danger { color: var(--seal); }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }

.field input,
.inline-form input {
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: 400 18px/1.4 var(--serif);
  outline: none;
}

.field input:focus,
.inline-form input:focus { border-bottom-color: var(--ink); }
.field input[type='checkbox'],
.field input[type='radio'] { width: auto; padding: 0; border: 0; }

input::placeholder { color: var(--ghost); }

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 5px 11px;
  border: 1px solid var(--seal);
  border-radius: 999px;
  color: var(--seal);
  font-size: 13px;
  white-space: nowrap;
}

.chip b { font: 700 15px/1 var(--serif); }
.chip.muted { border-color: var(--line); color: var(--ink-3); }

/* ── 첫 화면 ─────────────────────────── */

.intro { padding: 28px 0 8px; }
.intro-title { font-size: 30px; line-height: 1.45; margin: 12px 0 28px; letter-spacing: -0.01em; }

.preview {
  margin: 0 0 8px;
  padding: 26px 24px 22px;
  background: var(--sheet);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 14px 30px -18px rgba(60, 40, 10, 0.35);
  user-select: none;
  -webkit-user-select: none;
}

.preview blockquote { margin: 0; font: 400 19px/1.9 var(--serif); word-break: keep-all; }
.preview figcaption { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: right; }

.notice {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--seal);
  background: var(--seal-soft);
  font-size: 14px;
  color: var(--ink-2);
}

.auth { margin-top: 36px; }
.auth h2 { font-size: 18px; margin-bottom: 18px; }
.auth .btn { width: 100%; margin-top: 8px; }
.auth .link { display: block; margin: 14px auto 0; }
.form-error { min-height: 20px; margin: -6px 0 6px; font-size: 13px; color: var(--seal); }

/* ── 오늘 ───────────────────────────── */

.today-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ref { font-size: 26px; margin: 10px 0 20px; letter-spacing: -0.01em; }

.sheet {
  position: relative;
  padding: 22px 22px 26px;
  background: var(--sheet);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 16px 34px -20px rgba(60, 40, 10, 0.4);
  user-select: none;
  -webkit-user-select: none;
}

.sheet-text {
  --lh: 44px;
  margin: 0;
  min-height: calc(var(--lh) * 2);
  font: 400 21px/var(--lh) var(--serif);
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px) var(--lh));
  background-position: 0 -6px;
}

.c.ghost { color: var(--ghost); }
.c.ok { color: var(--ink); }
.c.composing { color: var(--ink-2); box-shadow: inset 0 -2px 0 var(--ink-3); }
.c.bad { color: var(--seal); background: var(--seal-soft); border-radius: 2px; text-decoration: underline wavy var(--seal); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.c.bad.space { text-decoration: none; box-shadow: inset 0 -2px 0 var(--seal); }

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-right: -2px;
  vertical-align: -0.18em;
  background: var(--ink);
  animation: blink 1.05s steps(1) infinite;
}

.sheet:not(.focused) .caret { opacity: 0; animation: none; }

@keyframes blink { 50% { opacity: 0; } }

.capture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  resize: none;
  font-size: 16px;
  cursor: text;
}

.sheet-hint {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sheet);
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s;
}

.sheet.focused .sheet-hint,
.sheet.started .sheet-hint { opacity: 0; }

.meter {
  display: flex;
  justify-content: space-between;
  margin: 26px 2px 0;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.meter .miss { color: var(--seal); margin-left: 8px; }

.status-line { margin: 22px 0 0; font: 400 15px/1.7 var(--serif); color: var(--ink-2); text-align: center; }
.status-line b { color: var(--seal); }

.stamp {
  position: absolute;
  right: 18px;
  bottom: -18px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 3px solid var(--seal);
  border-radius: 12px;
  color: var(--seal);
  font: 700 21px/1 var(--serif);
  letter-spacing: 0.05em;
  background: rgba(250, 247, 240, 0.6);
  transform: rotate(-9deg);
  opacity: 0.92;
  pointer-events: none;
}

.stamp.fresh { animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }

@keyframes stamp {
  0% { transform: rotate(-9deg) scale(1.9); opacity: 0; }
  60% { opacity: 0.95; }
  100% { transform: rotate(-9deg) scale(1); opacity: 0.92; }
}

.done { margin-top: 40px; text-align: center; }
.done-title { margin: 0; font: 600 16px/1.5 var(--serif); color: var(--ink-2); }
.combo { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.combo-num { font: 700 64px/1 var(--serif); letter-spacing: -0.02em; }
.combo-unit { font: 600 18px/1 var(--serif); color: var(--ink-2); }
.done-sub { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }
.done-sub.milestone { color: var(--seal); font-weight: 600; }
.done-meta { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ── 기록 ───────────────────────────── */

.hero { padding: 30px 0 6px; text-align: center; }
.hero .combo-num { font-size: 76px; }
.hero .done-sub { font-size: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 16px 4px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font: 700 22px/1.2 var(--serif); }
.stat span { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-3); }

.cal { margin-top: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h3 { font-size: 17px; }
.cal-nav { width: 36px; height: 36px; border: 0; background: none; font-size: 20px; color: var(--ink-2); cursor: pointer; border-radius: 50%; }
.cal-nav:hover { background: rgba(42, 39, 35, 0.05); }
.cal-nav[disabled] { opacity: 0.25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: 11px; color: var(--ink-3); padding-bottom: 6px; }
.cal-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; font: 400 14px/1 var(--serif); color: var(--ink-2); }
.cal-day.out { visibility: hidden; }
.cal-day.future { color: var(--line); }
.cal-day.today::after { content: ''; position: absolute; inset: 12%; border: 1px dashed var(--ink-3); border-radius: 50%; }
.cal-day.on { color: var(--sheet); font-weight: 600; }
.cal-day.on::before { content: ''; position: absolute; inset: 10%; border-radius: 46% 54% 50% 50%; background: var(--seal); opacity: 0.88; transform: rotate(-12deg); z-index: -1; }
.cal-day.on { isolation: isolate; }

.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; align-items: baseline; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--rule); }
.log .d { flex: none; width: 46px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log .r { flex: 1; font: 400 16px/1.4 var(--serif); }
.log .t { flex: none; font-size: 12px; color: var(--ink-3); }

.empty { padding: 26px 0; text-align: center; font: 400 15px/1.8 var(--serif); color: var(--ink-3); }

.foot { margin-top: 44px; text-align: center; color: var(--ink-3); }
.foot a.link { text-decoration: underline; }

/* ── 함께 ───────────────────────────── */

.page-title { font-size: 26px; margin: 22px 0 6px; }
.page-sub { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.6; }

.group-list { display: grid; gap: 12px; margin-top: 24px; }

.group-card {
  display: block;
  padding: 20px 20px 18px;
  background: var(--sheet);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 12px 26px -18px rgba(60, 40, 10, 0.35);
  text-decoration: none;
}

.group-card .g-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.group-card .g-name { font: 700 18px/1.3 var(--serif); }
.group-card .g-meta { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }

.dots { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink-3); }
.dots i.on { background: var(--seal); border-color: var(--seal); }

.inline-form { display: flex; gap: 10px; align-items: flex-end; }
.inline-form input { flex: 1; }
.inline-form .btn { flex: none; min-height: 42px; }
.inline-form + .inline-form { margin-top: 18px; }
#joinCode { text-transform: uppercase; letter-spacing: 0.2em; }

.back { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--ink-3); text-decoration: none; }

.together { margin: 22px 0 0; padding: 22px 0 24px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.members { list-style: none; margin: 8px 0 0; padding: 0; }
.member { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--rule); }
.m-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px dashed var(--line); border-radius: 8px; font: 700 13px/1 var(--serif); color: transparent; }
.member.is-done .m-mark { border: 2px solid var(--seal); color: var(--seal); transform: rotate(-8deg); }
.m-main { flex: 1; min-width: 0; }
.m-main b { font: 600 16px/1.3 var(--serif); }
.m-main em { margin-left: 6px; font-style: normal; font-size: 11px; color: var(--sheet); background: var(--ink-3); padding: 1px 6px; border-radius: 4px; vertical-align: 2px; }
.m-main small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); }
.m-streak { flex: none; text-align: right; font-size: 12px; color: var(--ink-3); }
.m-streak b { font: 700 18px/1 var(--serif); color: var(--ink); margin-right: 1px; }

.invite { margin-top: 34px; padding: 20px; border: 1px dashed var(--line); border-radius: 6px; text-align: center; }
.invite p { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.invite code { display: block; margin-bottom: 16px; font: 700 26px/1.2 var(--serif); letter-spacing: 0.28em; color: var(--ink); }

/* ── 성경 ───────────────────────────── */

.ref-link { display: inline-block; margin: -10px 0 18px; font-size: 13px; color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--line); }
.ref-link:hover { color: var(--ink); }
.log .r a { text-decoration: none; border-bottom: 1px solid var(--line); }

.resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--sheet);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 12px 26px -18px rgba(60, 40, 10, 0.35);
  text-decoration: none;
}

.resume span { font-size: 13px; color: var(--ink-3); }
.resume b { font: 600 16px/1.3 var(--serif); }

.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.book,
.chapters a {
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: rgba(250, 247, 240, 0.55);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.book { padding: 12px 4px; font: 400 15px/1.3 var(--serif); }
.book:hover,
.chapters a:hover { border-color: var(--ink-3); background: var(--sheet); }

.chapters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 22px; }
.chapters a { aspect-ratio: 1; font: 400 16px/1 var(--serif); }

.reader-head { display: flex; align-items: center; justify-content: space-between; }
.size-ctl { display: flex; gap: 6px; margin-top: 14px; }
.size-ctl button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: transparent; font-family: var(--serif); color: var(--ink-2); cursor: pointer; }
.size-ctl button:first-child { font-size: 12px; }
.size-ctl button:last-child { font-size: 18px; }

.reader {
  list-style: none;
  margin: 18px 0 0;
  padding: 18px 20px;
  background: var(--sheet);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 16px 34px -20px rgba(60, 40, 10, 0.4);
  font-size: var(--read-size, 18px);
}

.v { display: flex; align-items: baseline; gap: 0.55em; padding: 0.22em 0; scroll-margin: 120px; }
.vn { flex: none; min-width: 1.5em; font: 600 0.62em/1 var(--sans); color: var(--seal); text-align: right; font-variant-numeric: tabular-nums; }
.vt { font: 400 1em/1.9 var(--serif); }
.v.hl { margin: 0 -10px; padding: 0.22em 10px; border-radius: 4px; background: rgba(214, 170, 74, 0.16); }

.chapter-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.chapter-nav .btn { padding: 0 16px; font-size: 14px; }

/* ── 목표 ───────────────────────────── */

.goal { padding: 16px 18px 14px; background: var(--sheet); border-radius: 4px; box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 12px 26px -18px rgba(60, 40, 10, 0.35); }
.goal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal-title { font: 600 16px/1.4 var(--serif); }
.goal-seal { flex: none; padding: 3px 8px; border: 2px solid var(--seal); border-radius: 6px; color: var(--seal); font: 700 12px/1 var(--serif); transform: rotate(-6deg); }
.goal-bar { height: 6px; margin: 12px 0 8px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.4s; }
.goal-achieved .goal-bar i { background: var(--seal); }
.goal-missed .goal-bar i,
.goal-stopped .goal-bar i { background: var(--ink-3); }
.goal-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.goal-meta b { font: 700 15px/1 var(--serif); color: var(--ink); }
.goal-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.goal-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

.goal-strip { display: block; margin: 22px 0 0; text-decoration: none; text-align: left; }
.goal-link { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--line); }
.done .goal-strip { margin-top: 22px; }
.g-goal { margin-top: 14px; }
.g-goal .goal { padding: 0; background: none; box-shadow: none; }
.g-goal .goal-title { font-size: 14px; }

.empty.small { padding: 4px 0 0; text-align: left; font-size: 14px; }

.past-goals { list-style: none; margin: 0; padding: 0; }
.past-goals li { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--rule); font: 400 15px/1.4 var(--serif); }
.goal-mark { flex: none; width: 46px; padding: 3px 0; border: 1px solid var(--line); border-radius: 5px; text-align: center; font: 600 11px/1.2 var(--sans); color: var(--ink-3); }
.goal-mark.achieved { border: 2px solid var(--seal); color: var(--seal); transform: rotate(-5deg); }

.goal-form { padding: 18px; background: var(--sheet); border-radius: 4px; box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 12px 26px -18px rgba(60, 40, 10, 0.35); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 8px; background: var(--rule); }
.seg button { min-height: 38px; border: 0; border-radius: 6px; background: none; font: 600 14px/1 var(--serif); color: var(--ink-3); cursor: pointer; }
.seg button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgba(60, 40, 10, 0.15); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 6px; }
.chips button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chips button:hover { border-color: var(--ink-3); color: var(--ink); }
.goal-input { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font: 400 16px/1.4 var(--serif); color: var(--ink-2); }
.goal-input input { width: 6.5em; padding: 6px 2px; border: 0; border-bottom: 1px solid var(--ink-3); background: transparent; font: 700 22px/1.2 var(--serif); color: var(--ink); outline: none; }
.goal-input input[type=date] { width: auto; font-size: 18px; }
.hint { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }
.goal-form .actions { justify-content: flex-end; margin-top: 18px; }
.goal-form .form-error { margin: 10px 0 0; }

/* ── 초대 ───────────────────────────── */

.invite-page { padding: 34px 0 10px; text-align: center; }
.invite-title { margin: 10px 0 24px; font-size: 26px; line-height: 1.45; }
.invite-card { padding: 26px 22px 24px; background: var(--sheet); border-radius: 4px; box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 16px 34px -20px rgba(60, 40, 10, 0.4); }
.invite-card h2 { font-size: 22px; }
.invite-card p { margin: 8px 0 0; font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.invite-card .invite-goal { margin-top: 14px; color: var(--seal); font-weight: 600; }
.faces { display: flex; justify-content: center; margin-top: 18px; }
.face { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1.5px solid var(--ink-3); border-radius: 50%; background: var(--sheet); font: 600 14px/1 var(--serif); color: var(--ink-2); }
.faces .face + .face { margin-left: -8px; }
.face.more { font: 600 11px/1 var(--sans); }
.btn.wide { width: 100%; }
.invite-page .btn.wide { margin-top: 26px; }
.invite-note { margin: 18px 0 0; font: 400 14px/1.7 var(--serif); color: var(--ink-3); }
.invite-open { margin-top: 26px; }
.m-main em.owner { background: var(--seal); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(42, 39, 35, 0); transition: background 0.2s; }
.sheet-backdrop.show { background: rgba(42, 39, 35, 0.38); }
.bottom-sheet { width: 100%; max-width: 600px; max-height: 88dvh; overflow-y: auto; padding: 10px 22px calc(18px + env(safe-area-inset-bottom)); background-color: var(--paper); background-image: var(--grain); border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1); }
.sheet-backdrop.show .bottom-sheet { transform: none; }
.grip { width: 38px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: var(--line); }
.bottom-sheet h2 { font-size: 20px; }
.bottom-sheet h3 { margin: 22px 0 6px; font-size: 14px; color: var(--ink-2); }
.sheet-note { margin: 6px 0 16px; font-size: 13px; color: var(--ink-3); }
.share-row { display: grid; gap: 8px; }
.code-line { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.code-line b { margin-left: 6px; font: 700 18px/1 var(--serif); letter-spacing: 0.2em; color: var(--ink); }
.sheet-members { list-style: none; margin: 0 0 8px; padding: 0; }
.sheet-members li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sm-name { flex: 1; font: 600 15px/1.3 var(--serif); }
.sm-name small { font: 400 12px/1 var(--sans); color: var(--ink-3); }
.tag { padding: 2px 7px; border-radius: 4px; background: var(--seal); color: var(--sheet); font-size: 11px; font-style: normal; }
.bottom-sheet > .link { display: block; margin: 6px auto 0; }
.bottom-sheet > .btn.wide { margin-top: 14px; }
body.sheet-open { overflow: hidden; }

/* ── 소셜 로그인 ─────────────────────── */

.social { display: grid; gap: 10px; margin-top: 30px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 10px; font: 600 16px/1 var(--sans); text-decoration: none; }
.social-btn svg { width: 18px; height: 18px; flex: none; }
.social-btn.kakao { background: #fee500; color: rgba(0, 0, 0, 0.88); }
.social-btn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.social-btn.apple { background: #000; color: #fff; }
.social-btn.apple svg { width: 19px; height: 19px; margin-top: -3px; }
.social-btn[data-on='0'] { opacity: 0.55; }
.pw-open { display: block; margin: 18px auto 0; }

/* ── 말씀 범위 ───────────────────────── */

.scope-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.scope-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); font: 600 13px/1.2 var(--serif); color: var(--ink); cursor: pointer; }
.scope-btn i { font-style: normal; font-size: 10px; color: var(--ink-3); }
.today-head + .scope-row + .ref { margin-top: 6px; }
.scope-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scope-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); text-align: left; cursor: pointer; }
.scope-opt b { font: 600 16px/1.2 var(--serif); }
.scope-opt small { font-size: 12px; color: var(--ink-3); }
.scope-opt.on { border: 2px solid var(--ink); padding: 13px; }
.scope-chips { margin-top: 8px; }
.scope-chips label { cursor: pointer; }
.scope-chips input { position: absolute; opacity: 0; pointer-events: none; }
.scope-chips span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.scope-chips input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--sheet); }
.scope-chips input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: 2px; }
#createForm .hint { margin-top: 14px; }
.g-scope { margin-left: 8px; font: 400 12px/1 var(--sans); color: var(--ink-3); }

/* ── 목장 말씀 ───────────────────────── */

.gv-list { list-style: none; margin: 0; padding: 0; }
.gv { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--rule); }
.gv-main { flex: 1; min-width: 0; }
.gv-name { font: 600 15px/1.3 var(--serif); text-decoration: none; }
.gv-main small { margin-left: 6px; font-size: 11px; color: var(--ink-3); }
.gv-ref { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.gv .btn { flex: none; min-height: 38px; padding: 0 14px; font-size: 14px; }
.gv-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--seal); border-radius: 8px; color: var(--seal); font: 700 13px/1 var(--serif); transform: rotate(-8deg); }
.gv-note { flex: none; font-size: 12px; color: var(--ink-3); }

.group-verse { padding: 18px 20px 20px; background: var(--sheet); border-radius: 4px; box-shadow: 0 1px 0 rgba(60, 40, 10, 0.04), 0 12px 26px -18px rgba(60, 40, 10, 0.35); }
.group-verse .scope-row { margin-top: 0; }
.gv-text { margin: 14px 0 6px; font: 400 18px/1.85 var(--serif); }
.group-verse .gv-ref { margin: 0 0 16px; text-align: right; color: var(--ink-3); }
.group-verse .btn { width: 100%; }
.gv-done { margin: 0; text-align: center; font: 600 14px/1.4 var(--serif); color: var(--seal); }

/* ── 묵상 기도 · 듣기 ─────────────────── */

.pray { margin-top: 40px; padding: 20px 20px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pray-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prayer-text { margin: 12px 0 0; font: 400 16px/1.95 var(--serif); color: var(--ink); word-break: keep-all; }
.voice-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 7px; background: var(--rule); }
.voice-toggle button { min-width: 44px; padding: 5px 10px; border: 0; border-radius: 5px; background: none; font-size: 12px; color: var(--ink-3); cursor: pointer; }
.voice-toggle button.on { background: var(--sheet); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(60, 40, 10, 0.15); }
.listen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.listen-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--ink-3); border-radius: 999px; background: transparent; font: 600 14px/1 var(--serif); color: var(--ink); cursor: pointer; }
.listen-btn i { width: 0; height: 0; border-left: 9px solid var(--seal); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.listen-btn.playing { border-color: var(--seal); color: var(--seal); }
.listen-btn.playing i { width: 9px; height: 11px; border: 0; border-left: 3px solid var(--seal); border-right: 3px solid var(--seal); }

/* ── 묵상 메모 · 나를 위한 기도 ─────────── */

.memo { margin-top: 26px; }
.memo textarea,
.prayer-input { display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); font: 400 15px/1.8 var(--serif); color: var(--ink); resize: vertical; outline: none; }
.memo textarea:focus,
.prayer-input:focus { border-color: var(--ink-3); }
.memo-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.memo-foot .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }

.pfm { display: block; margin-top: 34px; padding: 18px 20px; border-left: 3px solid var(--seal); background: var(--sheet); border-radius: 0 4px 4px 0; text-decoration: none; box-shadow: 0 12px 26px -20px rgba(60, 40, 10, 0.35); }
.pfm b { display: block; margin-top: 6px; font: 600 15px/1.4 var(--serif); }
.pfm-body { margin: 8px 0 6px; font: 400 15px/1.8 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pfm small { font-size: 12px; color: var(--ink-3); }
.pfm-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }

.memories { display: grid; gap: 8px; margin-top: 30px; }
.mem-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.mem-link b { font: 600 15px/1.3 var(--serif); }
.mem-link span { font-size: 12px; color: var(--ink-3); }
.log-note { display: block; margin-top: 4px; font: 400 13px/1.6 var(--serif); color: var(--ink-3); }
.log .r { min-width: 0; }

/* ── 목장 수 · 구독 ───────────────────── */

.plan-line { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.plan-line a { color: var(--seal); }
.notice.over { display: grid; gap: 10px; margin-top: 20px; }
.notice.over b { color: var(--ink); }
.keep-list { display: grid; gap: 6px; }
.notice.dev { display: grid; gap: 12px; margin-top: 22px; }
.g-locked { margin: 10px 0 0; font-size: 13px; color: var(--seal); line-height: 1.6; }
.sub-card { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
.sub-card.big { margin-top: 24px; padding: 24px 22px; box-shadow: 0 16px 34px -22px rgba(60, 40, 10, 0.4); border: 0; }
.sub-title { margin: 0; font: 600 14px/1.4 var(--serif); color: var(--ink-2); }
.price { margin: 6px 0 14px; font-size: 14px; color: var(--ink-3); }
.price b { font: 700 22px/1.2 var(--serif); color: var(--ink); }
.sub-card.big .price b { font-size: 30px; }
.sub-benefits { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.sub-status { margin: 14px 0 0; font: 600 14px/1.4 var(--serif); color: var(--seal); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.agree input { margin-top: 4px; }

/* ── 목장 이야기 · 서로를 위한 기도 ─────── */

.group-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.pray-for { flex: none; margin-left: 4px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font: 600 12px/1 var(--serif); color: var(--ink-2); cursor: pointer; }
.pray-for:hover { border-color: var(--seal); color: var(--seal); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed-day { margin: 18px 0 6px; font: 600 13px/1.4 var(--serif); color: var(--ink-3); }
.fi { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.fi time { margin-left: 4px; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.fi-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--seal); border-radius: 6px; color: var(--seal); font: 700 11px/1 var(--serif); transform: rotate(-8deg); }
.fi .goal-seal { margin-top: 2px; }
.fi-main { flex: 1; min-width: 0; }
.fi-main p { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fi-main b { color: var(--ink); font-family: var(--serif); }
.fi-note { margin-top: 6px !important; padding-left: 10px; border-left: 2px solid var(--line); font: 400 15px/1.7 var(--serif) !important; color: var(--ink) !important; }
.fi-card { flex: 1; padding: 14px 16px; background: var(--sheet); border-radius: 6px; box-shadow: 0 10px 24px -20px rgba(60, 40, 10, 0.4); }
.fi-head { margin: 0; font-size: 13px; color: var(--ink-2); }
.fi-head b { font-family: var(--serif); color: var(--ink); }
.fi-body { margin: 8px 0 0; font: 400 15px/1.85 var(--serif); color: var(--ink); white-space: pre-wrap; }
.fi-card .link { padding: 6px 0 0; font-size: 12px; }
.fi-card time { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.fi.sys { padding: 4px 0; font-size: 12px; color: var(--ink-3); }
.more { display: block; margin: 12px auto 0; }
.past-groups { list-style: none; margin: 8px 0 0; padding: 0; }
.past-groups a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.past-groups b { font: 600 15px/1.3 var(--serif); color: var(--ink-2); }
.past-groups small { font-size: 12px; color: var(--ink-3); }
.past-label { margin-top: 18px; color: var(--seal); }
.bottom-sheet .scope-chips { margin: 4px 0 0; }

/* ── 구독 · 목소리 · 만든 사람들 ──────────── */

.sub-start { margin-top: 22px; }
.sub-start .btn + .btn { margin-top: 8px; }
.sub-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-list li { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); }
.pay-list em { font-style: normal; color: var(--seal); }
.pay-list a { color: var(--ink-3); }
.voice-toggle { grid-template-columns: repeat(3, auto); }
.voice-note { min-height: 1em; margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.listen-lock { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.lock-badge { padding: 3px 8px; border-radius: 4px; background: var(--seal); color: var(--sheet); font: 600 11px/1.2 var(--sans); }
.about-link { margin: 26px 0 0; text-align: center; font-size: 13px; }
.about-link a { color: var(--ink-3); }
.about { padding: 18px 0 10px; }
.about .intro-title { margin-bottom: 26px; }
.about-body { padding: 26px 24px; background: var(--sheet); border-radius: 4px; box-shadow: 0 16px 34px -22px rgba(60, 40, 10, 0.4); }
.about-body p { margin: 0; font: 400 16px/2 var(--serif); color: var(--ink); word-break: keep-all; }
.about-body p + p { margin-top: 16px; }
.about-sign { margin: 18px 4px 0; text-align: right; font: 400 14px/1.6 var(--serif); color: var(--ink-3); }

/* ── 나눔 · 오늘의 기도 주제 ─────────────── */

.tabs a { flex-basis: 96px; }
.topic-card,
.book-promo { display: block; margin-top: 30px; padding: 20px; background: var(--sheet); border-radius: 4px; text-decoration: none; box-shadow: 0 14px 30px -22px rgba(60, 40, 10, 0.4); }
.topic-card b,
.book-promo b { display: block; margin-top: 6px; font: 700 20px/1.4 var(--serif); }
.book-promo b { font-size: 16px; }
.topic-card p:not(.eyebrow) { margin: 6px 0 10px; font: 400 15px/1.7 var(--serif); color: var(--ink-2); }
.topic-go,
.book-promo span { font-size: 13px; color: var(--seal); }
.book-promo .goal-bar { margin: 12px 0 8px; }

.share-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.share-nav a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; color: var(--ink-2); text-decoration: none; }
.share-nav a:hover { background: rgba(42, 39, 35, 0.05); }
.topic-title { margin: 14px 0 0; text-align: center; font-size: 34px; letter-spacing: -0.01em; }
.topic-prompt { margin: 10px 0 0; text-align: center; font: 400 16px/1.8 var(--serif); color: var(--ink-2); }
.topic-verse { display: block; margin: 18px auto 0; max-width: 440px; text-align: center; font: 400 14px/1.8 var(--serif); color: var(--ink-3); text-decoration: none; }
.topic-verse small { display: block; margin-top: 2px; font-size: 12px; }
.my-post { margin-top: 26px; }
.my-post textarea { display: block; width: 100%; padding: 16px 18px; border: 0; border-radius: 4px; background: var(--sheet); box-shadow: 0 14px 30px -22px rgba(60, 40, 10, 0.4); font: 400 16px/1.95 var(--serif); color: var(--ink); resize: vertical; outline: none; background-image: repeating-linear-gradient(to bottom, transparent 0 calc(1.95em - 1px), var(--rule) calc(1.95em - 1px) 1.95em); background-position: 0 12px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.post-foot .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.my-post .hint { margin-top: 6px; }
.my-post-meta { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.share-head { display: flex; align-items: center; justify-content: space-between; }
.share-head .section-title small { font: 400 12px/1 var(--sans); color: var(--ink-3); }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post { padding: 18px 18px 12px; background: var(--sheet); border-radius: 4px; box-shadow: 0 10px 24px -20px rgba(60, 40, 10, 0.4); }
.post.mine { border-left: 3px solid var(--line); }
.post .fi-body { margin: 0; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.post-meta > span:first-child { flex: 1; }
.post-meta b { font-family: var(--serif); color: var(--ink-2); }
.heart { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-3); font-size: 13px; cursor: pointer; transition: color 0.15s, border-color 0.15s, transform 0.1s; }
.heart.on { border-color: var(--seal); color: var(--seal); }
.heart:active { transform: scale(0.94); }
.heart-count { color: var(--seal); }
.post-meta .link { padding: 0; font-size: 12px; }

/* ── 나의 기도 책 ───────────────────────── */

.book-tools { display: flex; align-items: center; justify-content: space-between; }
.book-tools .back { margin-top: 0; }
.book { margin-top: 20px; padding: 40px 30px; background: var(--sheet); border-radius: 4px; box-shadow: 0 16px 34px -22px rgba(60, 40, 10, 0.4); }
.book-cover { padding: 60px 0 70px; text-align: center; border-bottom: 1px solid var(--line); }
.book-cover h1 { margin: 16px 0; font-size: 34px; line-height: 1.4; }
.book-cover p:not(.eyebrow) { color: var(--ink-3); font-size: 14px; }
.book-month { margin: 44px 0 6px; font-size: 18px; color: var(--seal); }
.book-day { padding: 18px 0; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.book-date { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); }
.book blockquote { margin: 0; font: 400 16px/1.9 var(--serif); }
.book cite { display: block; margin-top: 4px; font-size: 12px; font-style: normal; color: var(--ink-3); text-align: right; }
.book-note { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--line); font: 400 14px/1.8 var(--serif); color: var(--ink-2); }
.book-topic { margin: 14px 0 4px; font-size: 12px; color: var(--seal); }
.book-prayer { margin: 0; font: 400 15px/1.9 var(--serif); white-space: pre-wrap; }

@media print {
  body { background: #fff; }
  .top, .tabs, #toast, .book-tools { display: none !important; }
  .page { max-width: none; padding: 0; }
  .book { box-shadow: none; padding: 0; background: none; }
  .book-cover { min-height: 180mm; margin: 0; break-after: page; border: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .book-month { break-before: page; }
}

/* ── 성경 찾기 ───────────────────────── */

.bible-search { display: flex; gap: 8px; margin-top: 18px; }
.bible-search input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); font: 400 16px/1.3 var(--serif); color: var(--ink); outline: none; }
.bible-search input:focus { border-color: var(--ink-3); }
.bible-search .btn { min-height: 44px; }
.sr-count { margin: 18px 2px 6px; font-size: 13px; color: var(--ink-3); }
.sr-list { list-style: none; margin: 0; padding: 0; }
.sr-list a { display: block; padding: 13px 2px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.sr-ref { display: block; font-size: 12px; color: var(--seal); font-weight: 600; }
.sr-text { display: block; margin-top: 4px; font: 400 15px/1.8 var(--serif); color: var(--ink); }
.sr-text mark { background: rgba(214, 170, 74, 0.32); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ── 종이책 꾸미기 · 주문 ─────────────────── */

.paper-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 16px 18px; border: 1px solid var(--seal); border-radius: 8px; background: var(--seal-soft); }
.paper-cta b { display: block; font: 600 15px/1.4 var(--serif); }
.paper-cta span { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.paper-cta .btn { flex: none; }
.maker { margin-top: 20px; }
.maker .field > span small { color: var(--ink-3); }
.range { display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.range input { flex: 1; min-width: 0; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: 400 15px/1.3 var(--serif); }
.maker .agree { margin: 6px 0 0; }
.cover-pick { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.cover-pick .btn { min-height: 40px; font-size: 14px; }
.book-preview .book { margin-top: 0; max-height: 640px; overflow: hidden; position: relative; }
.book-preview .book::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, var(--sheet)); }
.section-title small { font: 400 12px/1 var(--sans); color: var(--ink-3); margin-left: 6px; }

/* 표지: 디자인 · 정렬 · 사진 */
.book-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 420px; padding: 34px 28px; margin: -40px -30px 0; border-radius: 4px 4px 0 0; overflow: hidden; text-align: center; }
.book-cover.align-left { text-align: left; }
.book-cover .cover-photo { width: 100%; max-height: 200px; object-fit: cover; border-radius: 3px; }
.book-cover .cover-text { margin: auto 0; padding: 24px 0; }
.book-cover h1 { margin: 10px 0 12px; font-size: 32px; line-height: 1.35; word-break: keep-all; }
.cover-brand { margin: 0; font-size: 12px; letter-spacing: 0.2em; opacity: 0.7; }
.cover-author { margin: 0; font: 400 15px/1.4 var(--serif); opacity: 0.85; }
.cover-dates { margin: 0; font-size: 12px; opacity: 0.6; }
.design-paper { background: #f1ead9; color: var(--ink); }
.design-ink { background: #2a2723; color: #f4efe4; }
.design-seal { background: #9f3424; color: #faf3ea; }
.design-forest { background: #3d5646; color: #f2efe4; }
.book.size-small { --book-fs: 14px; }
.book.size-medium { --book-fs: 16px; }
.book.size-large { --book-fs: 18px; }
.book blockquote, .book-prayer { font-size: var(--book-fs, 16px); }
.book-note { font-size: calc(var(--book-fs, 16px) - 2px); }

.order-summary { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding: 16px; background: var(--sheet); border-radius: 6px; }
.order-summary > div:last-child b { display: block; font: 600 16px/1.4 var(--serif); }
.order-summary > div:last-child span { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.mini-cover { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 74px; height: 104px; padding: 8px; border-radius: 2px 5px 5px 2px; box-shadow: 2px 3px 8px rgba(40, 30, 10, 0.25); text-align: center; overflow: hidden; }
.mini-cover.align-left { text-align: left; }
.mini-cover img { width: 100%; height: 34px; object-fit: cover; border-radius: 2px; }
.mini-cover b { font: 700 10px/1.3 var(--serif); }
#orderForm select { width: 100%; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: 400 17px/1.4 var(--serif); }
.zip-row { display: flex; gap: 8px; align-items: flex-end; }
.zip-row input { flex: 1; }
.zip-row .btn { flex: none; min-height: 40px; font-size: 14px; }
#orderForm .field input + input { margin-top: 6px; }
.price-box { margin: 6px 0 16px; padding: 14px 16px; background: var(--sheet); border-radius: 6px; }
.price-box p { display: flex; justify-content: space-between; margin: 4px 0; font-size: 14px; color: var(--ink-2); }
.price-box .total { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink); }
.price-box .total b { font: 700 20px/1.2 var(--serif); }

.orders { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.order { padding: 16px 18px; background: var(--sheet); border-radius: 6px; box-shadow: 0 10px 24px -20px rgba(60, 40, 10, 0.4); }
.order > a { display: block; text-decoration: none; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-head b { font: 600 16px/1.4 var(--serif); }
.order-status { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; background: var(--rule); color: var(--ink-2); }
.order-status.s-paid, .order-status.s-making { background: var(--seal-soft); color: var(--seal); }
.order-status.s-shipped { background: var(--ink); color: var(--sheet); }
.order-meta { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.order-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.order-actions .btn { min-height: 36px; font-size: 13px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 12px 0 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding-top: 16px; font-size: 11px; color: var(--ink-3); text-align: center; }
.steps li::before { content: ''; position: absolute; top: 4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--line); }
.steps li.on { color: var(--seal); font-weight: 600; }
.steps li.on::before { background: var(--seal); }
.ship-box { margin: 18px 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 6px; font-size: 14px; line-height: 1.7; }
.ship-box p { margin: 0; }

@media print {
  body.print-a5 .book-cover { margin: 0; min-height: 180mm; }
  body.print-a5 .book-month { break-before: page; }
}


/* ── 운영: 기도 주제 성과 ─────────────────── */

.ab-today { margin-top: 18px; padding: 14px 16px; background: var(--sheet); border-radius: 6px; }
.ab-today p { display: flex; gap: 10px; margin: 4px 0; font-size: 14px; }
.ab-today span { flex: none; width: 46px; color: var(--ink-3); font-size: 12px; }
.ab-today b { font-family: var(--serif); }
.ab-today .ab-rule { display: block; margin-top: 10px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.suggest { list-style: none; margin: 0 0 12px; padding: 0; }
.suggest li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.suggest b { margin-right: 6px; padding: 2px 7px; border-radius: 4px; font-size: 11px; color: var(--sheet); background: var(--ink-3); }
.suggest b.promote { background: var(--seal); }
.suggest small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12px; }
.gen-row { margin-top: 14px; }
.tp-add { margin-top: 14px; flex-wrap: wrap; }
.tp-add input[name=title] { flex: 0 1 120px; }
.tp-list { list-style: none; margin: 0; padding: 0; }
.tp { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--rule); }
.tp-main b { font: 600 15px/1.3 var(--serif); }
.tp-main small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.tp-main .tp-note { color: var(--seal); }
.tp-num { text-align: right; }
.tp-num b { font: 700 16px/1.2 var(--serif); }
.tp-num small { display: block; font-size: 11px; color: var(--ink-3); }
.tp-act { grid-column: 1 / -1; display: flex; gap: 14px; }
.tp-act .link { padding: 0; font-size: 12px; }

/* ── 알림 · 불러오는 중 ─────────────────── */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  max-width: calc(100% - 40px);
  padding: 11px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sheet);
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 20;
}

#toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { padding: 80px 0; text-align: center; color: var(--ink-3); font: 400 15px/1 var(--serif); }

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

@media (max-width: 380px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .sheet { padding: 18px 16px 24px; }
  .sheet-text { --lh: 40px; font-size: 19px; }
}

/* ══ 씀 느낌으로 정리: 가는 명조 · 작은 고딕 · 회색 알약 ══════════════════ */

:root {
  --paper: #f6f5f1;
  --sheet: #ffffff;
  --ink: #343331;
  --ink-2: #5d5b57;
  --ink-3: #9a9790;
  --ghost: #b9b5ac;
  --rule: #ebe8e1;
  --line: #e1ded6;
  --pill: #ecebe7;
  --coral: #ef9f8f;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .22 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body { font-size: 14px; letter-spacing: -0.01em; background-image: var(--grain); color: var(--ink); }
.brand { font-size: 17px; font-weight: 600; }
.brand-seal { width: 22px; height: 22px; font-size: 12px; }
.top-date { font-size: 12px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
.page-title { font-size: 21px; margin-top: 18px; }
.page-sub { font-size: 13px; line-height: 1.7; }
.intro-title { font-size: 24px; font-weight: 600; line-height: 1.5; }
.eyebrow { font-size: 12px; color: var(--ink-3); letter-spacing: 0; }
.ref { font-size: 22px; font-weight: 600; }
.ref-link { font-size: 12px; }
.empty { font-size: 14px; font-weight: 300; }

/* 씀처럼 회색 이름표 */
.section-title, .pill-label {
  display: inline-block; margin: 34px 0 12px; padding: 4px 9px; border-radius: 4px;
  background: var(--pill); color: var(--ink-2); font: 600 12px/1.4 var(--sans); letter-spacing: 0;
}
.section-title small { color: var(--ink-3); }
.pill-label { display: table; margin: 34px auto 14px; }
.pill-label.left { margin-left: 0; }

/* 알약 버튼 */
.btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink-2); font: 600 14px/1 var(--sans); }
.btn:hover { background: #e4e2dd; }
.btn.primary { background: #4a4846; color: #fff; }
.btn.primary:hover { background: #3c3a38; }
.btn.soft { background: var(--pill); color: var(--ink-2); }
.btn.round { width: 44px; padding: 0; }
.btn.ghost-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.link { font-size: 13px; }
.chip { font-size: 12px; }
.chip b { font-size: 14px; }

/* 하얀 카드 · 얇은 테두리 */
.sheet, .preview, .goal, .group-card, .invite-card, .group-verse, .topic-card, .book-promo, .post, .fi-card, .order, .about-body, .reader, .resume, .goal-form, .order-summary, .price-box, .sub-card.big {
  box-shadow: none; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet);
}

/* 글씨: 가는 명조, 넉넉한 줄 간격 */
.sheet-text { font-size: 19px; font-weight: 400; }
.preview blockquote { font-size: 17px; font-weight: 300; line-height: 2; }
.prayer-text, .fi-body, .pfm-body, .topic-prompt, .gv-text, .about-body p { font-weight: 300; color: var(--ink-2); }
.prayer-text { font-size: 15px; line-height: 2; }
.topic-title { font-size: 28px; font-weight: 600; }
.topic-prompt { font-size: 15px; }
.combo-num { font-weight: 500; }
.vt { font-weight: 300; }
.status-line { font-size: 14px; font-weight: 300; }
.done-title { font-size: 15px; font-weight: 500; }

/* 아래 탭: 선 아이콘 + 작은 이름 */
.tabs { gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(250, 249, 246, 0.94); }
.tabs a { flex: 1 1 0; display: grid; justify-items: center; gap: 3px; padding: 6px 0 4px; border: 0; font: 500 11px/1 var(--sans); color: var(--ink-3); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.tabs a.on { color: var(--ink); border: 0; font-weight: 700; }
.tabs a.on svg { stroke-width: 1.7; }

/* 고르기 알약 (씀의 추가 설정) */
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--pill); font: 500 14px/1 var(--sans); color: var(--ink-2); cursor: pointer; }
.radio-pill span::before { content: ''; width: 16px; height: 16px; border: 2px solid #7d7a74; border-radius: 50%; box-sizing: border-box; }
.radio-pill input:checked + span { background: var(--coral); color: #fff; }
.radio-pill input:checked + span::before { border-color: #fff; background: radial-gradient(#fff 0 3px, transparent 3.5px); }
.radio-pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── 종이책: 표지 ───────────────────────── */
.cover-face { container-type: inline-size; position: relative; display: flex; flex-direction: column; gap: 6%; width: 100%; height: 100%; padding: 12% 11%; overflow: hidden; text-align: center; }
.cover-face.align-left { text-align: left; }
.cover-face h1 { margin: 0; font: 600 calc(var(--cover-fs, 26) / 200 * 100cqw)/1.35 var(--serif); word-break: keep-all; }
.cover-sub { margin: 4% 0 0; font: 300 calc(var(--cover-fs, 26) * 0.5 / 200 * 100cqw)/1.5 var(--serif); opacity: 0.8; }
.cover-author { margin: 6% 0 0; font: 400 calc(var(--cover-fs, 26) * 0.45 / 200 * 100cqw)/1.4 var(--serif); opacity: 0.75; }
.cover-photo { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.design-paper { background: #fbf8f1; color: var(--ink); }
.design-ink { background: #2f2d2b; color: #f3efe6; }
.design-seal { background: #a8402e; color: #fbf3ea; }
.design-forest { background: #3d5646; color: #f2efe4; }

/* 소개 */
.paper-hero { position: relative; height: 330px; margin-top: 10px; }
.fan { position: absolute; width: 150px; aspect-ratio: 128 / 210; border-radius: 3px; box-shadow: 0 14px 30px -12px rgba(40, 30, 20, 0.35); overflow: hidden; }
.fan-0 { left: 4%; top: 70px; transform: rotate(-14deg); }
.fan-1 { left: 33%; top: 10px; transform: rotate(-6deg); z-index: 2; }
.fan-2 { right: 4%; top: 60px; transform: rotate(8deg); }
.paper-headline { margin: 22px 0 10px; text-align: center; font-size: 22px; line-height: 1.55; }
.paper-lead { text-align: center; font: 300 15px/1.8 var(--serif); color: var(--ink-2); }
.faq { list-style: none; counter-reset: q; margin: 0; padding: 0; }
.faq li { position: relative; padding: 4px 0 18px 40px; counter-increment: q; }
.faq li::before { content: counter(q); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 5px; background: var(--pill); font: 700 12px/1 var(--sans); color: var(--ink-2); }
.faq b { display: block; font: 600 17px/1.5 var(--serif); }
.faq p { margin: 6px 0 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.paper-member { text-align: center; }
.paper-member b { display: block; font: 600 18px/1.5 var(--serif); }
.paper-member p { margin: 8px 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.paper-notes { margin: 34px -22px 0; padding: 24px 22px 30px; background: #ecebe7; }
.paper-notes b { font: 700 14px/1 var(--sans); }
.paper-notes ul { margin: 14px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.paper-notes li + li { margin-top: 8px; }
.sticky-cta { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; margin: 24px -22px -110px; padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 30%); }
.sticky-cta .btn { flex: 1; min-height: 52px; font-size: 15px; }
.sticky-cta .btn.round { flex: none; width: 52px; }

/* 가이드 */
.guide-head { margin-top: 10px; text-align: center; }
.guide-head h1 { font-size: 20px; line-height: 1.55; }
.guide-head p { font-size: 13px; color: var(--ink-3); }
.open-book { display: inline-flex; gap: 2px; margin: 10px 0 18px; }
.open-book i { width: 54px; height: 70px; border: 1.5px solid #8a8780; border-radius: 3px; background: #fff; }
.guide-card { margin-top: 14px; padding: 6px 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; }
.guide-card > p { margin: 10px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.guide-card.tips { text-align: left; }
.guide-card.tips ul { padding-left: 18px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.guide-card.tips li + li { margin-top: 10px; }
.tip-end { text-align: center; font-weight: 600 !important; }
.size-diagram { position: relative; width: 190px; height: 200px; margin: 6px auto 10px; }
.size-diagram .a4 { position: absolute; right: 0; bottom: 18px; width: 150px; height: 182px; border: 1px solid #b5b2ab; background: #eeede9; }
.size-diagram .a4 > span { position: absolute; right: 8px; top: 8px; font: 700 11px/1 var(--sans); color: var(--ink-3); }
.size-diagram .bk { position: absolute; left: 0; bottom: 0; width: 66%; height: 70%; border: 2px solid #4a4846; background: #fff; display: grid; place-items: center; font: 700 11px/1 var(--sans); }
.size-diagram em { position: absolute; font: 400 11px/1 var(--sans); color: var(--ink-3); font-style: normal; }
.size-diagram .h { left: 4px; bottom: 70px; transform: rotate(90deg); }
.size-diagram .w { left: 72px; bottom: 0; }
.guide-cover { width: 120px; aspect-ratio: 128 / 210; margin: 6px auto 4px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.pages-diagram { display: flex; gap: 6px; justify-content: center; margin: 4px -14px 4px; padding: 18px 10px; background: #4a4846; border-radius: 4px; }
.pd { display: grid; gap: 6px; justify-items: center; width: 54px; }
.pd small { font: 600 9px/1 var(--sans); color: #fff; min-height: 9px; }
.pd i { width: 46px; height: 64px; background: #fff; }
.pd span { font: 500 9px/1.35 var(--sans); color: #fff; text-align: center; }
.pd-title i { background: linear-gradient(#bbb, #bbb) 70% 55% / 40% 3px no-repeat, #fff; }
.pd-pref i { background: linear-gradient(#bbb, #bbb) 50% 20% / 50% 3px no-repeat, #fff; }
.pd-toc i { background: repeating-linear-gradient(#fff 0 6px, #ccc 6px 8px) center / 60% 70% no-repeat, #fff; }
.pd-body i { background: repeating-linear-gradient(#fff 0 4px, #ccc 4px 6px) center / 76% 76% no-repeat, #fff; box-shadow: 3px 3px 0 #ddd, 6px 6px 0 #ccc; }
.body-diagram { position: relative; display: flex; justify-content: center; gap: 12px; margin: 6px -14px; padding: 22px 10px 18px; background: #4a4846; color: #fff; border-radius: 4px; }
.bd-page { position: relative; display: grid; gap: 6px; align-content: start; width: 110px; height: 160px; padding: 18px 14px; background: #fff; }
.bd-page i { height: 4px; background: #ccc; }
.bd-page i.t { width: 40%; margin: 0 auto 6px; }
.bd-page b { position: absolute; left: 50%; bottom: 10px; width: 5px; height: 6px; background: #ccc; }
.bd-note { display: grid; align-content: space-between; font: 600 10px/1 var(--sans); padding: 18px 0 6px; }
.body-diagram em { position: absolute; top: 6px; left: 0; right: 0; font: 600 10px/1 var(--sans); font-style: normal; }
.mistake { display: flex; align-items: center; justify-content: center; gap: 0; margin: 8px auto; padding: 18px 10px; border: 1px solid var(--line); font: 400 14px/1 var(--serif); }
.mistake i { width: 30px; height: 40px; background: linear-gradient(90deg, transparent, #ccc, transparent); }
.pixel-demo { display: flex; justify-content: center; gap: 2px; height: 120px; margin: 6px auto; width: 180px; border-radius: 10px; overflow: hidden; background: linear-gradient(90deg, #9fbac0 50%, #a8c3c8 50%); }
.pixel-demo i { flex: 1; display: grid; place-items: end center; padding-bottom: 12px; font-style: normal; font-weight: 700; }
.pixel-demo .bad { color: #d24; background: repeating-conic-gradient(#e7b8bd 0 25%, #f2d4d6 0 50%) 0 0 / 14px 14px; }
.pixel-demo .good { color: #2a8; background: radial-gradient(circle at 50% 45%, #f5d0d4 0 26%, transparent 27%); }

/* 추가 설정 */
.setup { margin-top: 8px; }
.setup-h { margin: 28px 0 0; font-size: 17px; }
.setup-h small { font: 400 12px/1 var(--sans); color: var(--ink-3); }
.setup textarea { display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 400 15px/1.8 var(--serif); resize: vertical; }
.setup .field input[disabled] { color: var(--ink-3); }
.sticky-cta.two { margin-top: 30px; }

/* 주문 단계 */
.wiz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px -22px 0; padding: 8px 22px 14px; border-bottom: 1px solid var(--line); }
.wiz-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; font: 400 13px/1 var(--sans); color: var(--ink-3); }
.wiz-steps li + li::before { content: '›'; margin-right: 6px; color: var(--ink-2); font-weight: 700; }
.wiz-steps li.on { color: var(--ink); font-weight: 700; }
.wiz-body { min-height: 460px; margin: 0 -22px; padding: 18px 22px; background: #e8e7e3; }
.thin-note { margin: 0 -22px; padding: 10px 22px; background: #e8e7e3; text-align: center; font-size: 12px; color: var(--ink-2); }
.wiz-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.wiz-foot .btn { min-height: 46px; }
.wiz-foot .btn[disabled] { opacity: 0.5; }
.wiz-foot .btn.pay { flex: 1; min-height: 52px; font-size: 15px; }
.stage { height: 380px; display: grid; place-items: center; perspective: 1400px; }
.book3d { --w: 196px; --h: 322px; position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.book3d > div { position: absolute; backface-visibility: hidden; }
.b-front { inset: 0; transform: translateZ(calc(var(--spine) / 2)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); }
.b-back { inset: 0; display: grid; place-items: end center; padding-bottom: 26px; transform: rotateY(180deg) translateZ(calc(var(--spine) / 2)); }
.b-back small { margin-top: 6px; font: 600 10px/1 var(--serif); opacity: 0.7; }
.b-back .brand-seal { margin-bottom: 18px; }
.b-spine { top: 0; left: calc(50% - var(--spine) / 2); width: var(--spine); height: var(--h); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 0; overflow: hidden; transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); writing-mode: vertical-rl; font: 600 9px/1 var(--serif); filter: brightness(0.94); }
.b-spine small { font-size: 7px; opacity: 0.8; }
.b-edge { top: 2px; left: calc(50% - var(--spine) / 2); width: var(--spine); height: calc(var(--h) - 4px); transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 2px)); background: repeating-linear-gradient(90deg, #f4efe3 0 1px, #e5dece 1px 2px); }
.view-front { transform: rotateY(-16deg) rotateX(4deg); }
.view-spine { transform: rotateY(74deg) rotateX(3deg); }
.view-back { transform: rotateY(164deg) rotateX(4deg); }
.view-edge { transform: rotateY(-104deg) rotateX(3deg); }
.view-caption { display: table; margin: 4px auto 12px; padding: 6px 12px; border-radius: 4px; background: #dcdbd6; font: 600 12px/1.4 var(--sans); color: var(--ink-2); }
.view-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.view-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: var(--pill); font: 600 13px/1 var(--sans); color: var(--ink-2); cursor: pointer; }
.view-tabs button.on { background: #4a4846; color: #fff; }
.page-stage { width: min(100%, 330px); margin: 0 auto; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.45); }
.page-ctl { position: relative; display: flex; justify-content: center; align-items: center; margin: 14px 0 8px; }
.page-count { padding: 6px 12px; border-radius: 4px; background: #dcdbd6; font: 700 13px/1 var(--sans); color: var(--ink-2); }
.page-ctl .btn.round { position: absolute; right: 0; min-height: 40px; width: 52px; background: #dcdbd6; }
.page-slider { width: 100%; accent-color: #4a4846; }

/* 내지 한 쪽: 128 × 210mm, 글자 크기는 pt 그대로 비율 맞춤 */
.bpage { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 128 / 210; padding: 17.2cqw 12.5cqw 15.6cqw; background: #fffdf8; color: #222; font: 400 calc(var(--pt, 9) * 0.2756cqw)/calc(131.25cqw / var(--lines, 20)) var(--serif); overflow: hidden; }
.bpage .ln { margin: 0; white-space: nowrap; }
.bpage .l-ref, .bpage .l-topic { color: #666; }
.bpage .l-ref { text-align: right; }
.bpage .l-note { color: #444; padding-left: 2cqw; }
.pg-head { margin: 0 0 calc(131.25cqw / var(--lines, 20) * 2); text-align: center; font-weight: 600; }
.pg-title { position: absolute; right: 14cqw; top: 38%; text-align: right; }
.pg-title b { display: block; font-size: 1.6em; line-height: 1.4; }
.pg-title small { display: block; margin-top: 2cqw; font-size: 0.95em; color: #555; }
.pg-preface { padding-top: 6cqw; }
.pg-pen { margin-top: 6cqw; text-align: right; }
.pg-toc { list-style: none; margin: 0; padding: 0; }
.pg-toc li { display: flex; justify-content: space-between; gap: 4cqw; white-space: nowrap; }
.pg-toc span { overflow: hidden; text-overflow: ellipsis; }
.pg-no { position: absolute; left: 0; right: 0; bottom: 7cqw; text-align: center; font-size: 0.8em; color: #555; }
.k-blank { background: #fffdf8; }

/* 수량 · 결제 */
.qty-art { display: grid; place-items: center; height: 170px; }
.qty-art i { width: 70px; height: 110px; border: 1.5px solid #8a8780; background: #f3f2ee; transform: skewY(-12deg); box-shadow: -10px 4px 0 -1px #e3e2dd; }
.order-detail { padding: 6px 26px 22px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.order-detail dl { margin: 0; }
.order-detail dl div { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.order-detail dt { font-weight: 700; color: var(--ink-2); }
.order-detail dl div::after { content: ''; order: 1; flex: 1; height: 1px; background: var(--line); }
.order-detail dd { order: 2; margin: 0; color: var(--ink-2); }
.order-detail dd small { color: var(--seal); }
.od-total { margin: 12px 0 0; padding-top: 14px; border-top: 2px solid var(--ink); text-align: right; font-size: 14px; }
.od-total b { font-size: 22px; }
.member-upsell { margin-top: 16px; padding: 20px; border-radius: 4px; background: #dedcd7; text-align: center; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.member-upsell .btn { margin-top: 12px; background: #fff; border: 1px solid #ccc; }
.brand-seal.sm { width: 18px; height: 18px; font-size: 10px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.qty-row b { font: 600 20px/1 var(--serif); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 54px; height: 40px; border: 0; border-radius: 999px; background: #fff; font-size: 22px; color: var(--ink-2); cursor: pointer; }
.stepper span { display: grid; place-items: center; width: 46px; height: 48px; border-radius: 8px; background: #fff; font: 700 16px/1 var(--sans); }
.pay-form { padding-bottom: 6px; }
.pay-title { margin: 0; font: 600 18px/1.4 var(--serif); }
.pay-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.box-in { display: block; width: 100%; margin-top: 10px; padding: 14px 16px; border: 1px solid #d6d3cc; border-radius: 10px; background: #fff; font: 500 15px/1.3 var(--sans); color: var(--ink); text-align: left; }
.box-in:disabled { background: #e3e2de; color: var(--ink-3); }
.box-in.addr { font-weight: 700; cursor: pointer; }
.pill-row { display: flex; align-items: center; gap: 14px; }
.pill-row .agree { margin: 20px 0 0; }
.method { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px 16px; border: 1px solid #d6d3cc; border-radius: 10px; background: #fff; font: 600 14px/1 var(--sans); cursor: pointer; }
.method input { width: 22px; height: 22px; accent-color: #4a4846; }
.pay-logo { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font: 800 14px/1 var(--sans); }
.pay-logo.npay { background: #03c75a; color: #fff; }
.pay-logo.kpay { background: #fee500; color: #191919; }
.pay-total { margin: 4px 0 6px; font: 600 20px/1.4 var(--serif); }
.consent { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.consent .link { padding: 0; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.policy { padding-left: 18px; font-size: 13px; line-height: 1.8; }

/* 멤버십 */
.member-top { display: flex; justify-content: flex-end; margin-top: 10px; }
.member-hero { margin: 26px 0 28px; text-align: center; }
.brand-mark { display: block; width: 40px; height: 26px; margin: 0 auto; background: radial-gradient(circle at 30% 100%, #f19c8e 0 60%, transparent 61%), radial-gradient(circle at 70% 100%, #f6b5aa 0 60%, transparent 61%); opacity: 0.9; }
.brand-mark.flip { transform: rotate(180deg); }
.member-brand { display: block; margin: 10px 0; font: 700 26px/1 var(--serif); }
.member-hero h1 { margin-top: 30px; font-size: 21px; }
.member-hero p { margin: 10px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-3); }
.benefits { display: grid; gap: 10px; }
.benefit { display: flex; gap: 14px; padding: 18px; border: 1px solid #d6d3cc; border-radius: 10px; background: #fff; }
.benefit i { flex: none; width: 24px; font-style: normal; font-size: 18px; color: var(--ink-2); text-align: center; }
.benefit b { font: 600 16px/1.4 var(--serif); }
.benefit p { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-3); }
.plans { display: grid; gap: 10px; margin-top: 22px; }
.plan { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 18px; border: 1px solid #d6d3cc; border-radius: 4px; background: #fff; cursor: pointer; }
.plan.on { border: 2px solid #4a4846; padding: 19px 17px; }
.plan input { width: 22px; height: 22px; accent-color: #4a4846; }
.plan-name { flex: 1; font: 600 16px/1.3 var(--serif); }
.plan-price { text-align: right; }
.plan-price b { display: block; font: 700 17px/1.2 var(--sans); }
.plan-price small { font-size: 12px; color: var(--ink-3); }
.plan-badge { position: absolute; right: 70px; top: -10px; padding: 3px 8px; border-radius: 3px; background: var(--coral); color: #fff; font: 600 11px/1 var(--sans); font-style: normal; }
.agree.center { justify-content: center; margin-top: 14px; font-size: 12px; color: var(--ink-3); }

/* 저장 뒤 안내 · 환영 · 글자 수 */
.nudge { text-align: center; padding: 6px 0 4px; }
.nudge i { display: block; font-style: normal; font-size: 20px; color: var(--ink-3); }
.nudge h2 { margin-top: 10px; font-size: 18px; }
.nudge-row { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.nudge-row .btn { min-width: 120px; }
.welcome { display: grid; align-content: space-between; min-height: calc(100dvh - 120px); padding: 40px 0 20px; text-align: center; }
.welcome-name { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 30vh; }
.welcome-name .brand-mark { margin: 0; width: 22px; height: 34px; background: radial-gradient(circle at 0 50%, #ec9284 0 70%, transparent 71%), radial-gradient(circle at 100% 50%, #f6b5aa 0 70%, transparent 71%); }
.welcome-name b { font: 600 20px/1 var(--serif); }
.welcome-text { margin-top: 60px; font-size: 14px; line-height: 1.9; color: var(--ink-3); }
.welcome-text b { color: var(--ink); }
.welcome .btn { width: 60%; margin: 40px auto 0; min-height: 52px; }
.my-post { position: relative; }
.char-count { position: absolute; right: 8px; top: -30px; padding: 4px 8px; border-radius: 4px; background: var(--pill); font: 700 11px/1 var(--sans); color: var(--ink-3); }
.my-post textarea { border: 1px solid var(--line); border-radius: 12px; font-weight: 300; }

/* 인쇄: 판형 그대로 (128 × 210mm) */
@page { size: 128mm 210mm; margin: 0; }
@media print {
  .print-book .bpage, .print-book .print-cover { width: 128mm; height: 210mm; aspect-ratio: auto; break-after: page; box-shadow: none; border: 0; border-radius: 0; }
  .print-book .print-cover { padding: 0; }
  .book-scroll { max-height: none !important; overflow: visible !important; }
  .page-title, .page-sub, .paper-cta, .about-link, .back { display: none !important; }
  body { background: #fff; }
}
.book-scroll { display: grid; gap: 14px; margin-top: 18px; }
.print-book { display: grid; gap: 14px; justify-items: center; }
.print-book .bpage, .print-book .print-cover { width: min(100%, 330px); box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.4); }
.print-cover { aspect-ratio: 128 / 210; padding: 0; overflow: hidden; }

.benefit i svg, .nudge i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.nudge i svg { width: 24px; height: 24px; }

.pg-toc i { font-style: normal; }

/* 앱: 스토어 구독 안내 · 매일 알림 · 개인정보처리방침 */
.store-note { margin: 22px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); text-align: center; }
.store-links { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.store-links .link { font-size: 12px; color: var(--ink-3); }
.remind { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
.remind-on { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.remind-on input { width: auto; }
.remind input[type='time'] { width: auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 500 14px var(--sans); color: var(--ink); }
.legal h2 { margin: 22px 0 6px; font-size: 15px; }
.legal p { font-size: 13px; line-height: 1.8; color: var(--ink-2); }

/* 로고: 앱 아이콘의 산호색 책갈피 (예전 「말」 도장 자리) */
:root { --ribbon: #e9705c; }
.brand-seal, .brand-seal.sm {
  display: inline-block;
  width: 11px;
  height: 20px;
  border-radius: 0;
  background: var(--ribbon);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  font-size: 0;
  transform: none;
}
.brand-seal.sm { width: 8px; height: 14px; }

/* 결제 안내 한 줄: 결제 금액이 쓰이는 곳 */
.gospel-note { margin: 14px auto; font: 400 12.5px/1.7 var(--serif); color: var(--ink-2); text-align: center; word-break: keep-all; }
.pay-form .gospel-note { margin: 14px 0 0; text-align: left; }
.paper-member .gospel-note, .member-upsell .gospel-note, .sub-card .gospel-note { margin: 8px auto 12px; font-size: 12.5px; color: var(--ink-2); }

/* 사업자 정보(전자상거래법 표기) */
.biz-info { margin: 36px 0 12px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 11.5px; line-height: 1.8; color: var(--ink-3); text-align: center; word-break: keep-all; }
.biz-info b { font-weight: 600; color: var(--ink-2); }

/* 차단한 사람 */
.block-list { list-style: none; margin: 20px 0 0; padding: 0; }
.block-list li { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.block-list li span { flex: 1; font-weight: 600; }
.block-list li small { color: var(--ink-3); font-size: 12px; }
.auth-consent { margin: 18px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.auth-consent a { color: var(--ink-2); }
/* 구독 화면: 버튼 아래에도 안내 · 링크가 이어지므로 아래로 끌어당기지 않는다 */
.sticky-cta.sub-cta { margin-bottom: 0; }

/* 입체 책 돌려 보기(표지 · 마지막 확인) */
.stage { position: relative; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.stage.dragging { cursor: grabbing; }
.stage::after { content: ''; position: absolute; left: 50%; bottom: 18px; width: 210px; height: 22px; margin-left: -105px; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 40, 10, 0.22), transparent); pointer-events: none; }
.stage.final { height: 330px; }
.stage.final .book3d { --w: 170px; --h: 279px; }
.b-top, .b-bottom { left: 0; width: var(--w); height: var(--spine); top: calc(50% - var(--spine) / 2); background: repeating-linear-gradient(0deg, #f4efe3 0 1px, #e5dece 1px 2px); }
.b-top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); }
.b-bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); }
.spin-hint { margin: -6px 0 10px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* 성경 일독 · 책갈피 */
.ribbon { display: inline-block; width: 10px; height: 16px; background: var(--ribbon, #e9705c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); vertical-align: -2px; }
.ribbon.sm { position: absolute; top: -2px; right: 8px; width: 8px; height: 13px; }
.readthru { margin: 18px 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); }
.rt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rt-head b { font: 600 17px/1.3 var(--serif); }
.rt-head small { font-size: 12.5px; color: var(--ink-3); }
.rt-head em { font-style: normal; font-weight: 700; color: var(--ribbon, #e9705c); }
.rt-bar { height: 8px; margin: 12px 0 14px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.rt-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ribbon, #e9705c); }
.rt-go { display: flex; align-items: center; justify-content: center; gap: 8px; }
.rt-go .ribbon { background: #fff; }
.rt-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.shelf .book, .chapters a { position: relative; }
.shelf .book { background-image: linear-gradient(var(--ribbon, #e9705c), var(--ribbon, #e9705c)); background-size: var(--p, 0%) 3px; background-repeat: no-repeat; background-position: 0 100%; }
.shelf .book.done { border-color: var(--ribbon, #e9705c); }
.chapters a.read { background: #efe7d8; color: var(--ink-2); }
.chapters a.marked { border-color: var(--ribbon, #e9705c); font-weight: 700; }
.mark-btn { display: inline-grid; place-items: center; }
.mark-btn .ribbon { background: var(--ink-3); opacity: 0.55; }
.mark-btn.on .ribbon { background: var(--ribbon, #e9705c); opacity: 1; }
.read-done { margin: 26px 0 8px; text-align: center; }
.read-ok { margin: 0 0 4px; font: 600 15px/1.4 var(--serif); color: var(--ink-2); }
/* 성경 책장 칸은 「나의 기도 책」 .book 모양과 겹치지 않게 */
.shelf .book { margin-top: 0; padding: 12px 4px; min-width: 0; box-shadow: none; background-color: rgba(250, 247, 240, 0.55); border-radius: 6px; word-break: keep-all; }
.shelf .book:hover { background-color: var(--sheet); }

/* 열둘과 일흔: 목장 도전 */
.challenge-card { display: block; margin: 18px 0 0; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); color: inherit; text-decoration: none; }
.challenge-card.done { border-color: var(--seal); background: var(--seal-soft); }
.ch-top { display: flex; justify-content: space-between; align-items: baseline; }
.ch-more { font-size: 12.5px; color: var(--ink-3); }
.ch-title { display: block; margin: 6px 0 12px; font: 600 17px/1.4 var(--serif); word-break: keep-all; }
.ch-seats { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.ch-seats i { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.ch-seats i.on { border-color: var(--seal); background: var(--seal); }
.ch-me { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ch-me small { flex: none; font-size: 12.5px; color: var(--ink-2); }
.ch-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: inherit; background: var(--seal); }
.ch-note { display: block; margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--ink-3); word-break: keep-all; }
.ch-banner { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 12px 16px; border: 1px solid var(--seal); border-radius: 10px; background: var(--seal-soft); color: inherit; text-decoration: none; }
.ch-banner b { flex: none; font: 600 15px/1.3 var(--serif); color: var(--seal); }
.ch-banner span { flex: 1; font-size: 12.5px; color: var(--ink-2); word-break: keep-all; }
.ch-banner i { font-style: normal; color: var(--ink-3); }
.group-card .g-ch { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
.group-card .g-ch.done { color: var(--seal); font-weight: 600; }

.challenge { padding-bottom: 24px; }
.challenge p { margin: 0 0 14px; font: 400 15.5px/1.95 var(--serif); color: var(--ink); word-break: keep-all; }
.ch-headline { margin: 6px 0 14px; font: 700 34px/1.25 var(--serif); letter-spacing: 0.02em; }
.challenge .ch-lead { padding: 16px 18px; border-radius: 10px; background: var(--sheet); font: 400 14.5px/1.85 var(--sans); color: var(--ink-2); }
.challenge .ch-lead b { color: var(--ink); }
.ch-coupon { display: grid; gap: 6px; margin: 0 0 8px; padding: 16px 18px; border: 1px solid var(--seal); border-radius: 10px; background: var(--seal-soft); text-align: center; }
.ch-coupon b { font: 600 17px/1.4 var(--serif); color: var(--seal); }
.ch-coupon span { font-size: 13px; color: var(--ink-2); }
.ch-coupon .btn { margin-top: 6px; }
.ch-h { display: flex; align-items: center; gap: 10px; margin: 38px 0 14px; font: 600 18px/1.4 var(--serif); word-break: keep-all; }
.ch-h span { flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 50%; background: var(--seal); color: #fff; font: 700 16px/1 var(--serif); }
.ch-verse { margin: 20px 0 6px; padding: 16px 18px; border-left: 3px solid var(--seal); border-radius: 0 8px 8px 0; background: var(--sheet); }
.challenge .ch-verse p { margin: 0 0 8px; font: 500 16px/1.85 var(--serif); }
.ch-verse a { display: block; text-align: right; font-size: 13px; color: var(--ink-3); text-decoration: none; }
.challenge .ch-key { margin: 16px 0; padding: 18px; text-align: center; font: 600 16.5px/2 var(--serif); color: var(--seal); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ch-rules { margin: 30px 0 22px; padding: 18px 18px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); }
.ch-rules > b { font: 600 15px/1.4 var(--serif); }
.ch-rules ul { margin: 10px 0 12px; padding-left: 18px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); word-break: keep-all; }
.ch-rules li { margin-bottom: 6px; }
.ch-rules li b { color: var(--ink); }

/* 종이책 주문: 쿠폰 쓰기 */
.coupon-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--seal); border-radius: 8px; background: var(--seal-soft); cursor: pointer; }
.coupon-row input { margin-top: 3px; accent-color: var(--seal); }
.coupon-row b { display: block; font: 600 14.5px/1.4 var(--serif); }
.coupon-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.stepper button:disabled { opacity: 0.35; }
