/* 노스님 디자인: 한지 바탕, 먹, 붉은 낙관 인장 하나만 포인트 */
:root {
  --paper: #f3eee4;
  --paper2: #eae3d5;
  --card: #f7f3eb;
  --ink: #1f1c19;
  --muted: #57514a;
  --line: #d6ccb8;
  --line2: #a99e8a;
  --accent: #a8321f;
  --accent-dark: #7e2416;
  --gold: #8a6a2a;
  --wood: #4f7a43; --fire: #b8432b; --earth: #a7792b; --metal: #7d7f86; --water: #2f5f8a;
  --serif-title: "Song Myung", "Gowun Batang", serif;
  --serif: "Gowun Batang", serif;
  --sans: "Gowun Dodum", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
main { max-width: 560px; margin: 0 auto; padding: 0 0 48px; }
h1, h2, h3 { font-family: var(--serif); }
h2 { font-size: 21px; margin: 0 0 16px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* 상단 */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 18px var(--serif-title); }
.seal-sm {
  width: 30px; height: 30px; border-radius: 4px; background: var(--accent); color: var(--paper);
  font: 18px var(--serif-title); display: grid; place-items: center;
}
.top-cta { font-size: 14px; color: var(--ink); text-decoration: none; border: 1px solid var(--ink); border-radius: 4px; padding: 4px 12px; }

/* 첫 화면 */
.hero { position: relative; padding: 40px 20px 44px; overflow: hidden; }
.vert {
  position: absolute; right: 16px; top: 28px; writing-mode: vertical-rl;
  font: 15px var(--serif-title); letter-spacing: .4em; color: var(--line2); text-orientation: upright;
}
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .1em; color: var(--accent); }
.hook12 { display: flex; align-items: flex-end; gap: 12px; margin: 4px 0 20px; }
.hook12 .big { font: 120px/0.9 var(--serif-title); }
.hook12-t { font: 22px/1.35 var(--serif-title); padding-bottom: 6px; }
.hero h1 { font-size: 22px; line-height: 1.6; margin: 0 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); margin: 0 0 24px; }
.cta {
  display: flex; align-items: center; justify-content: center; height: 56px; border-radius: 4px;
  background: var(--accent); color: #fff; text-decoration: none; font: 700 17px var(--serif);
}
.cta:hover { background: var(--accent-dark); color: #fff; }
.sub { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* 공통 구역 */
.sec { padding: 40px 20px; }
.sec.alt { background: var(--paper2); }
.note { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 0; }
.note.left { text-align: left; margin: -6px 0 16px; }

.stamp {
  flex: none; width: 40px; height: 40px; border: 2px solid var(--accent); color: var(--accent); border-radius: 3px;
  font: 22px var(--serif-title); display: inline-grid; place-items: center;
}
.words { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.words li { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.words p { margin: 0; font-family: var(--serif); }
.words .k { font: 13px var(--sans); color: var(--muted); }
.blur { filter: blur(5px); user-select: none; }

.scenes { display: grid; gap: 10px; }
.scenes p { margin: 0; padding: 16px 18px; background: var(--paper); border-left: 3px solid var(--ink); font-family: var(--serif); }
.scenes b { color: var(--accent); font-weight: 700; }
.answer { text-align: center; font: 700 20px/1.6 var(--serif); margin: 28px 0 0; }
.answer em { font-style: normal; border-bottom: 2px solid var(--accent); }

.sec.dark { background: var(--ink); color: var(--paper); padding: 0 0 36px; }
.monk-img { display: block; width: 100%; height: auto; }
.ai-note { text-align: center; font-size: 12px; color: #c9c1b2; margin: 12px 20px 20px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 20px; }
.three div { border: 1px solid #57514a; border-radius: 4px; padding: 12px 8px; text-align: center; }
.three b { display: block; font: 18px var(--serif-title); }
.three span { font-size: 12px; color: #c9c1b2; }

.months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.m { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.m-box { width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; display: grid; place-items: center; background: var(--card); }
.m-dot { display: block; border-radius: 50%; background: var(--ink); }
.m-seal { width: 30px; height: 30px; border-radius: 3px; background: var(--accent); color: var(--paper); font: 17px var(--serif-title); display: grid; place-items: center; transform: rotate(-4deg); }
.m-label { font: 14px var(--serif-title); }

.toc { padding-left: 22px; margin: 0; }
.toc li { padding: 6px 0; font-family: var(--serif); font-weight: 700; }
.toc small { display: block; color: var(--muted); font: 400 13px var(--sans); }
.placeholder { text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: 4px; padding: 24px; margin: 0; font-size: 14px; }

/* 입력 · 결과 카드 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 22px 20px; margin: 16px 16px; }
#form { scroll-margin-top: 70px; border-color: var(--ink); }
#form h2 { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
#form h2 .stamp { width: 34px; height: 34px; font-size: 19px; }
label { display: block; font-weight: 400; margin-bottom: 14px; }
input, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line2); border-radius: 4px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { margin-bottom: 6px; }
.seg label, .chips label, .check {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; padding: 8px 14px;
  border: 1px solid var(--line2); border-radius: 4px; cursor: pointer; background: var(--paper);
}
.seg label:has(input:checked), .chips label:has(input:checked), .check:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.seg input, .chips input, .check input { width: auto; margin: 0; accent-color: var(--accent); }
.check { margin-bottom: 14px; }
.seg .check { margin-bottom: 6px; }
.check:has(input:disabled) { opacity: .45; cursor: default; }
.hint, .method { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.method { margin: 8px 0 0; text-align: center; }

button {
  width: 100%; height: 54px; font: 700 16px var(--serif); cursor: pointer;
  color: #fff; background: var(--ink); border: 0; border-radius: 4px;
}
button:disabled { opacity: .5; cursor: wait; }
.pay { background: var(--accent); margin-top: 8px; }
.pay:hover { background: var(--accent-dark); }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); width: auto; display: block; margin: 16px; width: calc(100% - 32px); }
.error { color: var(--accent); margin: 12px 0 0; }

.monk-wait { font-family: var(--serif); }
.monk-wait small { color: var(--muted); font-family: var(--sans); }
.monk {
  font: 17px/1.8 var(--serif); margin: 0 0 20px; padding: 18px 20px; background: var(--ink); color: var(--paper); border-radius: 4px;
}
.summary { font: 700 17px/1.8 var(--serif); margin: 18px 0 12px; }
.pillars { width: 100%; border-collapse: separate; border-spacing: 6px 0; text-align: center; table-layout: fixed; }
.pillars th { color: var(--muted); font-weight: 400; font-size: 13px; padding: 4px; }
.pillars td { padding: 8px 2px; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); background: var(--paper); }
.pillars tr:nth-child(2) td { border-top: 1px solid var(--ink); }
.pillars tr:nth-child(3) td { border-bottom: 1px solid var(--ink); }
.pillars .char { font: 20px/1.3 var(--serif-title); display: block; word-break: keep-all; }
.pillars .god { font-size: 11px; color: var(--muted); }
.pillars td.me .char { color: var(--accent); }
.elements { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.elements span { font-size: 13px; padding: 2px 10px; border-radius: 3px; color: #fff; }

.preview { list-style: none; padding: 0; margin: 0 0 8px; }
.preview li { padding: 12px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); }
.tag { display: inline-block; font: 700 12px var(--sans); color: var(--accent); margin-right: 8px; }

.report h3 { font: 700 18px var(--serif); margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.report h3:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.report dt { font-weight: 700; margin-top: 10px; color: var(--muted); font-size: 14px; }
.report dd { margin: 2px 0 0; font-family: var(--serif); }
.report ol { padding-left: 20px; margin: 4px 0; }
.report > .monk { margin-top: 24px; }
.links { display: grid; gap: 8px; text-align: center; }
.links a { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 4px; text-decoration: none; }
.pay-link { background: var(--ink); color: var(--paper); }
.pay-link:hover { color: var(--paper); }
.ghost-link { border: 1px solid var(--ink); color: var(--ink); }

.spinner { width: 36px; height: 36px; margin: 8px auto 12px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer.biz { color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; padding: 28px 20px 8px; margin-top: 24px; border-top: 1px solid var(--line); }
footer.biz p { margin: 0 0 10px; }
footer.biz .disclaimer { font-size: 13px; }
footer.biz a { color: var(--muted); }
