:root {
  --navy: #1F2A4A;
  --cream: #FBF6EC;
  --pink: #F6D5D9;
  --pink-ink: #8A3F4F;
  --card: #FFFDF8;
  --muted: #5B6175;
  --line: #E6DCCB;
  --serif: "Gowun Batang", "Nanum Myeongjo", serif;
  --sans: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--navy);
  font: 16px/1.6 var(--sans);
  word-break: keep-all;
  -webkit-text-size-adjust: 100%;
}
main, main:focus-visible { outline: none; }
.wrap { max-width: 440px; margin: 0 auto; padding: 24px 20px 40px; }
.proto-banner {
  background: var(--navy); color: #fff; font-size: 13px; text-align: center; padding: 6px 12px;
}
h1, h2, .letter { font-family: var(--serif); }
h1 { font-size: 30px; line-height: 1.35; margin: 8px 0 12px; }
h2 { font-size: 22px; line-height: 1.4; margin: 0 0 16px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }

/* 연이 그림 자리 */
.yeoni {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px dashed var(--line); border-radius: 16px;
  padding: 14px 16px; margin: 0 0 20px; color: var(--muted); font-size: 13px;
}
.yeoni svg { flex: none; width: 44px; height: 44px; }

/* 진행 표시 */
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.progress .bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--navy); transition: width .25s ease-out; }
.progress span { font-size: 13px; color: var(--muted); min-width: 44px; text-align: right; }

/* 버튼 */
button { font: inherit; color: inherit; cursor: pointer; }
.btn {
  display: block; width: 100%; min-height: 52px; border: 0; border-radius: 12px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 17px; padding: 12px 16px;
  transition: opacity .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); font-weight: 500; }
.row { display: flex; gap: 10px; margin-top: 24px; }
.row .btn.ghost { flex: 0 0 96px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; min-height: 44px; padding: 0 4px; font-size: 14px; }
:focus-visible { outline: 3px solid var(--pink-ink); outline-offset: 2px; }

/* 선택지 */
.choices { display: grid; gap: 10px; }
.choice {
  min-height: 52px; text-align: left; padding: 12px 16px; border-radius: 12px;
  background: var(--card); border: 1.5px solid var(--line); font-size: 16px;
}
.choice[aria-pressed="true"] { border-color: var(--navy); background: var(--pink); font-weight: 700; }
.seg { display: flex; gap: 8px; margin-bottom: 12px; }
.seg .choice { flex: 1; text-align: center; }

/* 입력칸 */
input[type=text], input[type=date], input[type=time], textarea {
  width: 100%; font: inherit; color: var(--navy); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 52px;
}
textarea { min-height: 140px; resize: vertical; }
.ymd { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
select {
  font: inherit; color: var(--navy); background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 10px; min-height: 52px; width: 100%;
}
select:focus { border-color: var(--navy); outline: none; }
input:focus, textarea:focus { border-color: var(--navy); outline: none; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.count { text-align: right; font-size: 13px; color: var(--muted); margin-top: 6px; }
.error { color: var(--pink-ink); font-size: 14px; margin-top: 8px; min-height: 1.6em; }

/* 대기 */
.wait { text-align: center; padding-top: 48px; }
.dots { display: inline-flex; gap: 8px; margin: 20px 0; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); animation: bob 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* 맛보기 · 목차 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(31,42,74,.04); }
.letter { font-size: 18px; line-height: 1.7; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--pink-ink); background: var(--pink); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.times { list-style: none; padding: 0; margin: 8px 0 0; }
.times li { padding: 10px 0; border-top: 1px solid var(--line); }
.times li:first-child { border-top: 0; }
.toc { list-style: none; padding: 0; margin: 0; counter-reset: t; }
.toc li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.toc li:first-child { border-top: 0; }
.toc li svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.toc li .blur { margin-left: auto; width: 64px; height: 10px; border-radius: 5px; background: var(--line); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.pillars div { background: var(--cream); border-radius: 12px; padding: 10px 4px; display: flex; flex-direction: column; gap: 2px; }
.pillars b { font-size: 26px; letter-spacing: 2px; writing-mode: horizontal-tb; }
.pillars span { font-size: 13px; }
.price { font-family: var(--serif); font-size: 32px; font-weight: 700; margin: 4px 0; }
.notice { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.notice li { padding: 4px 0; }
.notice li.strong { color: var(--navy); font-weight: 700; }
.done { background: var(--pink); border-radius: 12px; padding: 14px 16px; margin-top: 12px; font-size: 15px; }

footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.7; }

.fade { animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
