:root {
  color-scheme: dark;
  --ink: #171310;
  --ink-soft: #28211d;
  --paper: #f5efe5;
  --paper-deep: #e9dfd1;
  --paper-light: #fffaf1;
  --red: #a62522;
  --red-bright: #d84032;
  --gold: #c7a25e;
  --gold-light: #f0d89d;
  --muted: #8d8178;
  --line: rgba(42, 32, 25, .13);
  --shadow: 0 20px 60px rgba(0, 0, 0, .24);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #0c0b0a; }

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 5%, #32251f 0, transparent 34rem),
    #0c0b0a;
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.app-shell { width: min(100%, 480px); min-height: 100vh; margin: 0 auto; overflow: hidden; background: var(--ink); box-shadow: var(--shadow); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(17, 16, 15, .88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff9eb; font-weight: 800; text-decoration: none; letter-spacing: -.04em; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-light); font-family: Georgia, serif; font-size: 16px; }
.trust-pill { color: #c8bdb2; font-size: 10px; letter-spacing: .02em; }
.small-link { color: var(--gold-light); font-size: 12px; text-decoration: none; }

.hero { position: relative; min-height: min(900px, calc(100svh - 58px)); background: #100e0d; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 27%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 25%, rgba(10,8,7,.28) 47%, rgba(10,8,7,.96) 88%, #171310 100%); }
.hero-copy { position: absolute; right: 0; bottom: max(28px, var(--safe-bottom)); left: 0; z-index: 2; padding: 28px 22px; text-align: center; }
.eyebrow { margin: 0 0 12px; color: var(--gold-light); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--red); }
.hero h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(34px, 10vw, 48px); font-weight: 700; line-height: 1.15; letter-spacing: -.065em; text-shadow: 0 2px 24px #000; }
.hero-copy > p:not(.eyebrow) { max-width: 390px; margin: 18px auto 24px; color: #d7cec5; font-size: 14px; line-height: 1.75; }
.primary-btn, .ghost-btn {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
}
.primary-btn { width: 100%; padding: 0 20px; color: #fff; background: linear-gradient(135deg, var(--red-bright), #8d1d1b); box-shadow: 0 12px 28px rgba(166, 37, 34, .32), inset 0 1px rgba(255,255,255,.18); }
.primary-btn:active, .ghost-btn:active { transform: scale(.98); }
.primary-btn:disabled { cursor: wait; opacity: .55; }
.hero-cta { font-size: 16px; }
.trust-row { display: flex; justify-content: center; gap: 14px; margin-top: 16px; color: #aaa098; font-size: 10px; }
.trust-row span::before { content: "✓"; margin-right: 4px; color: var(--gold); }

.wizard { color: var(--ink); background: var(--paper); }
.section-pad { padding: 32px 20px 42px; }
.progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.progress-head h2 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 26px; line-height: 1.3; letter-spacing: -.055em; }
.progress-head > span { flex: 0 0 auto; color: var(--red); font-size: 12px; font-weight: 800; }
.progress-track { height: 3px; margin: 20px 0 30px; overflow: hidden; border-radius: 2px; background: #ded3c5; }
.progress-track span { display: block; width: 25%; height: 100%; background: var(--red); transition: width .28s ease; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { display: block; width: 100%; margin: 0 0 8px; font-family: Georgia, "Noto Serif KR", serif; font-size: 23px; font-weight: 800; letter-spacing: -.045em; }
.field-help { margin: 0 0 24px; color: #746961; font-size: 13px; line-height: 1.65; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-stack { display: grid; gap: 10px; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice > span { display: flex; min-height: 82px; padding: 15px; flex-direction: column; justify-content: center; border: 1px solid #d6cabd; border-radius: 17px; background: rgba(255,255,255,.48); transition: .18s ease; }
.choice.wide > span { min-height: 70px; }
.choice b { font-size: 15px; }
.choice small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.choice input:checked + span { border-color: var(--red); background: #fff8ed; box-shadow: 0 0 0 2px rgba(166,37,34,.10), 0 8px 24px rgba(69,45,33,.07); }
.choice input:focus-visible + span { outline: 3px solid rgba(35,116,255,.3); }
.sub-question { margin: 28px 0 12px; font-size: 14px; }
.text-field { display: grid; gap: 8px; }
.text-field > span, .field-label { color: #5f554e; font-size: 12px; font-weight: 800; }
.text-field input, .text-field select {
  width: 100%;
  height: 58px;
  padding: 0 15px;
  border: 1px solid #d5c8ba;
  border-radius: 15px;
  outline: none;
  color: var(--ink);
  background: #fffaf2;
}
.text-field input:focus, .text-field select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(166,37,34,.10); }
.leap-field { margin-top: 22px; }
.leap-field .choice-grid { margin-top: 9px; }
.time-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.time-colon { padding-bottom: 17px; font-size: 20px; font-weight: 800; }
.check-row { display: flex; gap: 11px; margin-top: 24px; padding: 15px; border: 1px solid #d9cebf; border-radius: 15px; background: rgba(255,255,255,.45); }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); }
.check-row span { display: grid; gap: 4px; }
.check-row b { font-size: 13px; }
.check-row small { color: #756b63; font-size: 11px; line-height: 1.5; }
.legal-links { display: flex; gap: 14px; margin: 12px 0 0 47px; }
.legal-links a { color: #77675d; font-size: 10px; }
.form-error { min-height: 22px; margin: 18px 0 4px; color: var(--red); font-size: 12px; line-height: 1.45; }
.wizard-actions { display: flex; gap: 10px; }
.wizard-actions .ghost-btn { flex: 0 0 32%; color: #4f443d; border: 1px solid #d3c7ba; background: transparent; }
.wizard-actions .primary-btn { flex: 1; }

.loading-scene { position: relative; min-height: calc(100svh - 58px); }
.loading-scene > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loading-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,7,6,.18), rgba(10,7,6,.88)); }
.loading-overlay { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; padding: 38px 24px max(48px, calc(var(--safe-bottom) + 30px)); text-align: center; }
.loading-overlay h2 { margin: 0 0 26px; font-family: Georgia, "Noto Serif KR", serif; font-size: 27px; letter-spacing: -.045em; }
.orbit { position: relative; width: 62px; height: 62px; margin: 0 auto 22px; border: 1px solid rgba(240,216,157,.3); border-radius: 50%; animation: spin 2.7s linear infinite; }
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px solid rgba(240,216,157,.18); border-radius: 50%; }
.orbit::before { inset: 9px; }
.orbit::after { inset: 20px; background: rgba(166,37,34,.45); }
.orbit span { position: absolute; top: -4px; left: 27px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 16px var(--gold-light); }
@keyframes spin { to { transform: rotate(1turn); } }
.loading-list { display: grid; gap: 10px; max-width: 310px; margin: 0 auto; padding: 0; list-style: none; color: #afa59e; text-align: left; font-size: 12px; }
.loading-list li { display: flex; align-items: center; gap: 9px; }
.loading-list li > span { width: 7px; height: 7px; border-radius: 50%; background: #6b625d; transition: .2s; }
.loading-list li.done { color: #fff3dd; }
.loading-list li.done > span { background: var(--gold-light); box-shadow: 0 0 10px var(--gold); }

.results { color: var(--ink); background: var(--paper); }
.result-cover { position: relative; min-height: 690px; overflow: hidden; color: #fff; background: #110f0d; }
.result-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(12,10,9,.2) 36%, rgba(12,10,9,.96) 91%); }
.result-cover-copy { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; padding: 25px 22px 34px; }
.result-cover h1 { margin: 5px 0 14px; font-family: Georgia, "Noto Serif KR", serif; font-size: 33px; line-height: 1.25; letter-spacing: -.06em; }
.result-cover p:not(.eyebrow) { margin: 0; color: #d9d0c8; font-size: 13px; line-height: 1.7; }
.verified-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.verified-line span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #e6ded5; background: rgba(20,16,14,.48); font-size: 10px; backdrop-filter: blur(8px); }
.result-section { padding: 34px 19px; }
.result-section.alt { background: var(--paper-deep); }
.section-title { margin: 0 0 7px; font-family: Georgia, "Noto Serif KR", serif; font-size: 25px; letter-spacing: -.05em; }
.section-desc { margin: 0 0 22px; color: #746961; font-size: 12px; line-height: 1.6; }
.star-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.star-card { padding: 17px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper-light); }
.star-card small { display: block; color: var(--red); font-size: 10px; font-weight: 800; }
.star-card b { display: block; margin-top: 4px; font-family: Georgia, "Noto Serif KR", serif; font-size: 20px; }
.chart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.palace { min-height: 116px; padding: 9px 7px; border: 1px solid rgba(111,83,62,.16); border-radius: 9px; background: #fff9ef; }
.palace.soul { border-color: var(--red); background: #fff2e5; box-shadow: inset 0 0 0 1px rgba(166,37,34,.18); }
.palace-head { display: flex; justify-content: space-between; gap: 4px; font-size: 9px; }
.palace-head b { font-size: 11px; }
.palace-stars { margin-top: 8px; color: #5d4a3d; font-family: Georgia, "Noto Serif KR", serif; font-size: 11px; line-height: 1.55; }
.palace-stars strong { color: var(--red); }
.palace-age { display: block; margin-top: 7px; color: #9b8a7e; font-size: 8px; }
.reading-chapter { position: relative; margin-top: 16px; padding: 26px 19px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper-light); box-shadow: 0 10px 30px rgba(67,43,30,.06); }
.chapter-number { position: absolute; top: 15px; right: 18px; color: rgba(166,37,34,.17); font-family: Georgia, serif; font-size: 44px; font-weight: 700; line-height: 1; }
.reading-chapter .chapter-kicker { max-width: 78%; margin: 0 0 6px; color: var(--red); font-size: 10px; font-weight: 800; }
.reading-chapter h3 { max-width: 85%; margin: 0 0 18px; font-family: Georgia, "Noto Serif KR", serif; font-size: 23px; line-height: 1.35; letter-spacing: -.045em; }
.reading-chapter p { margin: 0 0 14px; color: #413832; font-size: 14px; line-height: 1.95; }
.evidence { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; padding-top: 15px; border-top: 1px dashed #dbcebf; }
.evidence span { padding: 6px 9px; border-radius: 999px; color: #79544a; background: #efe2d2; font-size: 9px; }
.locked-section { position: relative; padding: 38px 19px 46px; overflow: hidden; color: var(--paper); background: #191513; }
.locked-section::before { content: ""; position: absolute; inset: 0; opacity: .16; background: radial-gradient(circle at 90% 10%, var(--red) 0, transparent 19rem); }
.locked-section > * { position: relative; }
.locked-list { display: grid; gap: 9px; margin: 23px 0; }
.locked-card { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.035); }
.lock-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--gold-light); background: rgba(199,162,94,.12); }
.locked-card span { display: grid; gap: 3px; }
.locked-card b { font-size: 13px; }
.locked-card small { color: #9d938b; font-size: 10px; }
.price-box { margin: 25px 0 14px; padding: 20px; border: 1px solid rgba(240,216,157,.24); border-radius: 18px; text-align: center; background: rgba(199,162,94,.07); }
.price-box small { color: #c8bdb5; }
.price-box del { margin-left: 8px; color: #8d827b; }
.price-box strong { display: block; margin-top: 4px; color: #fff4db; font-size: 28px; }
.price-box em { display: inline-block; margin-top: 7px; padding: 4px 8px; border-radius: 999px; color: #ffe0db; background: var(--red); font-size: 10px; font-style: normal; font-weight: 800; }
.microcopy { margin: 12px 0 0; color: #a9a09a; font-size: 10px; line-height: 1.6; text-align: center; }
.boundary-note { margin-top: 15px; padding: 12px; border-radius: 12px; color: #735b31; background: #fff1c9; font-size: 11px; line-height: 1.6; }

.sticky-pay { position: fixed; right: 0; bottom: 0; left: 0; z-index: 70; display: flex; width: min(100%, 480px); margin: 0 auto; padding: 10px 12px calc(10px + var(--safe-bottom)); align-items: center; gap: 12px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(18,15,13,.94); backdrop-filter: blur(18px); box-shadow: 0 -12px 30px rgba(0,0,0,.28); }
.sticky-pay > div { display: grid; flex: 1; }
.sticky-pay small { color: #aaa098; font-size: 9px; }
.sticky-pay b { color: #fff; font-size: 18px; }
.sticky-pay button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 13px; color: #fff; background: var(--red); font-weight: 800; }

.site-footer { padding: 36px 20px calc(90px + var(--safe-bottom)); color: #8f8781; background: #11100f; font-size: 11px; line-height: 1.7; }
.site-footer strong { color: #d6cec6; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 13px; margin: 14px 0; }
.site-footer a { color: #b2aaa4; text-decoration: none; }

.report-shell { color: var(--ink); background: var(--paper); }
.report-hero { position: relative; min-height: 600px; overflow: hidden; color: #fff; }
.report-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.report-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(12,10,9,.87)); }
.report-hero > div { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; padding: 34px 22px; }
.report-hero h1 { margin: 0 0 10px; font-family: Georgia, "Noto Serif KR", serif; font-size: 37px; letter-spacing: -.06em; }
.report-hero p:not(.eyebrow) { color: #d6cdc4; font-size: 13px; line-height: 1.65; }
.report-body { padding: 24px 18px 50px; }
.paid-intro { margin: 0 0 24px; padding: 20px; border: 1px solid #d8ccbd; border-radius: 18px; background: #fff9ef; }
.paid-intro h2 { margin: 0 0 8px; font-family: Georgia, "Noto Serif KR", serif; }
.paid-intro p { margin: 0; color: #655b53; font-size: 13px; line-height: 1.8; }
.paid-chapter { margin: 14px 0; padding: 24px 19px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper-light); }
.paid-chapter > small { color: var(--red); font-size: 10px; font-weight: 800; }
.paid-chapter h2 { margin: 8px 0 10px; font-family: Georgia, "Noto Serif KR", serif; font-size: 24px; line-height: 1.35; letter-spacing: -.05em; }
.paid-chapter .lead { color: #735e51; font-weight: 700; }
.paid-chapter p { color: #403832; font-size: 14px; line-height: 1.95; }
.action-box { margin-top: 18px; padding: 14px; border-left: 3px solid var(--red); border-radius: 0 12px 12px 0; background: #f1e5d6; }
.action-box b { font-size: 11px; }
.action-box ul { margin: 8px 0 0; padding-left: 18px; color: #5e5149; font-size: 12px; line-height: 1.7; }
.skeleton-card { height: 220px; margin: 12px 0; border-radius: 18px; background: linear-gradient(90deg, #e9ddce 20%, #f5ebdf 38%, #e9ddce 58%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.retry-box { padding: 24px; text-align: center; }
.retry-box p { color: #655b53; font-size: 13px; line-height: 1.7; }

.standalone { display: grid; min-height: 100svh; padding: 22px; place-items: center; background: radial-gradient(circle at 50% 25%, #33221d, #0d0c0b 65%); }
.status-card { width: min(100%, 420px); padding: 34px 24px; border: 1px solid rgba(255,255,255,.1); border-radius: 24px; text-align: center; background: rgba(32,26,23,.92); box-shadow: var(--shadow); }
.status-icon { display: grid; width: 56px; height: 56px; margin: 0 auto 18px; place-items: center; border-radius: 50%; color: #fff; background: #317b4d; font-size: 25px; }
.status-card.error .status-icon { background: var(--red); }
.status-card h1 { margin: 0 0 12px; font-family: Georgia, "Noto Serif KR", serif; font-size: 27px; letter-spacing: -.045em; }
.status-card p { color: #c0b7b0; font-size: 13px; line-height: 1.7; }
.status-card .test-notice { padding: 11px; border-radius: 10px; color: #e7d1a2; background: rgba(199,162,94,.1); font-size: 10px; }
.link-btn { display: grid; margin-top: 20px; place-items: center; text-decoration: none; }

.legal-page { min-height: 100vh; color: var(--ink); background: var(--paper); }
.legal-page .topbar { color: #fff; }
.legal-content { padding: 32px 21px 70px; }
.legal-content h1 { margin: 0 0 8px; font-family: Georgia, "Noto Serif KR", serif; font-size: 32px; letter-spacing: -.055em; }
.legal-content .updated { margin: 0 0 30px; color: #877b72; font-size: 11px; }
.legal-content section { padding: 20px 0; border-top: 1px solid #ded2c4; }
.legal-content h2 { margin: 0 0 10px; font-size: 17px; }
.legal-content p, .legal-content li { color: #504741; font-size: 13px; line-height: 1.8; }
.legal-content ul { padding-left: 20px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.legal-table th, .legal-table td { padding: 10px 7px; border: 1px solid #dacdbd; vertical-align: top; text-align: left; }
.legal-table th { background: #eadfd1; }

.toast { position: fixed; right: 18px; bottom: calc(82px + var(--safe-bottom)); left: 18px; z-index: 100; width: min(calc(100% - 36px), 444px); margin: auto; padding: 13px 16px; border-radius: 12px; color: #fff; background: #312824; box-shadow: 0 12px 30px rgba(0,0,0,.3); font-size: 12px; text-align: center; }

@media (min-width: 481px) {
  .app-shell { border-right: 1px solid rgba(255,255,255,.08); border-left: 1px solid rgba(255,255,255,.08); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
