/* 재회두수 — a night sky for the waiting, warm paper for the reading. */
:root {
  --night: #070a1a;
  --night-2: #10142c;
  --ink: #f5eedf;
  --muted: #b9b2cc;
  --faint: #7d7797;
  --gold: #ecd09a;
  --me: #f6dcaa;
  --them: #ddb6f6;
  --lilac: #b7b1f2;
  --teal: #8fd8cb;
  --rose: #eaa9bb;
  --line: rgba(236, 208, 154, 0.2);
  --glass: rgba(16, 20, 44, 0.62);
  --paper: #fbf7ef;
  --paper-2: #f3ecdf;
  --paper-ink: #23203a;
  --paper-muted: #6a6483;
  --paper-gold: #9a7a3a;
  --serif: 'Gowun Batang', 'Nanum Myeongjo', 'AppleMyungjo', 'Batang', serif;
  --sans: 'Pretendard', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --r: 22px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.78 var(--sans); min-height: 100svh; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 32px, 760px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 600px); margin-inline: auto; }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--muted); }
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
main, header, footer { position: relative; z-index: 1; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { font-family: var(--serif); font-size: 20px; letter-spacing: 0.06em; color: var(--ink); text-decoration: none; display: inline-flex; gap: 10px; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 16px; }

/* Hero */
.hero h1 span { white-space: nowrap; }
.hero { width: min(100% - 32px, 980px); min-height: calc(100svh - 74px); display: grid; align-content: end; padding: 0 0 12svh; text-align: center; }
.hero .eyebrow { font-size: 12px; letter-spacing: 0.32em; color: var(--gold); }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 7vw, 54px); line-height: 1.3; margin: 14px 0 16px; text-shadow: 0 0 40px rgba(7, 10, 26, 0.9); }
.hero p { color: var(--muted); margin: 0 auto; max-width: 28em; text-shadow: 0 0 20px rgba(7, 10, 26, 0.95); }
.legend { display: flex; justify-content: center; gap: 18px; font-size: 13px; color: var(--muted); margin: 22px 0 0; flex-wrap: wrap; }
.legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: var(--c); box-shadow: 0 0 10px var(--c); vertical-align: 1px; }
.scroll-cue { margin-top: 28px; }

.promise { padding: 10svh 0 6svh; }
.promise h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 5vw, 32px); text-align: center; margin: 0 0 28px; line-height: 1.5; }
.pillars { display: grid; gap: 12px; }
.pillar { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; backdrop-filter: blur(8px); }
.pillar .n { font-family: var(--serif); color: var(--gold); font-size: 26px; line-height: 1.2; }
.pillar b { display: block; font-weight: 600; margin-bottom: 2px; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }

/* Buttons */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 15px 28px; font-weight: 600; cursor: pointer; background: linear-gradient(135deg, #f3dcae, #e2bf86); color: #1b1630; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; box-shadow: 0 10px 40px -12px rgba(236, 208, 154, 0.55); transition: transform 0.15s, filter 0.15s; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.small { padding: 9px 16px; min-height: 40px; font-size: 14px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }

/* Conversation */
.talk { padding: 4svh 0 10svh; }
.talk-card { background: var(--glass); border: 1px solid var(--line); border-radius: 28px; padding: 28px 22px 22px; backdrop-filter: blur(14px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); }
.progress { height: 2px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; margin-bottom: 22px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--me), var(--them)); transition: width 0.5s ease; }
.q-step { animation: rise 0.45s ease both; }
.q-step .kicker { font-size: 12px; letter-spacing: 0.2em; color: var(--gold); }
.q-step h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 5.4vw, 28px); line-height: 1.45; margin: 6px 0 6px; }
.q-step .hint { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.q { margin: 0 0 22px; border: 0; padding: 0; }
.q legend, .label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 9px; padding: 0; }
.q legend small { color: var(--faint); }
.row { display: grid; gap: 8px; grid-template-columns: 1.3fr 1fr 1fr; }
.row.two { grid-template-columns: 1fr 1fr; }
input[type='number'], input[type='text'], select, textarea { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 13px 14px; min-height: 52px; }
select option { background: var(--night-2); }
textarea { min-height: 190px; resize: vertical; line-height: 1.7; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span { display: inline-block; padding: 11px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.15); font-size: 15px; background: rgba(255, 255, 255, 0.03); transition: all 0.18s; }
.chip input:checked + span { background: rgba(236, 208, 154, 0.15); border-color: var(--gold); color: var(--gold); box-shadow: 0 0 22px -6px rgba(236, 208, 154, 0.6); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.chips.stack { display: grid; }
.chips.stack .chip span { display: block; border-radius: 16px; padding: 14px 16px; }
.reply { min-height: 1.6em; margin: 4px 0 14px; color: var(--me); font-family: var(--serif); font-size: 16.5px; line-height: 1.6; opacity: 0; transform: translateY(6px); transition: all 0.5s ease; }
.reply.on { opacity: 1; transform: none; }
.reply::before { content: '✦ '; color: var(--gold); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; margin: 12px 0; }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: #e2bf86; flex: none; }
.check small { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 2px; }
.prompts { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.prompts button { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.counter { text-align: right; font-size: 12px; color: var(--faint); margin-top: 4px; }
.nav { display: flex; gap: 10px; margin-top: 8px; }
.nav .btn:last-child { margin-left: auto; }
.error { color: var(--rose); font-size: 14px; min-height: 1.4em; margin: 6px 0 0; }

/* Loading */
.searching { position: fixed; inset: 0; z-index: 5; display: grid; place-items: end center; padding-bottom: 16svh; text-align: center; pointer-events: none; }
.searching .line { font-family: var(--serif); font-size: clamp(20px, 5vw, 26px); min-height: 1.6em; transition: opacity 0.4s; text-shadow: 0 0 30px var(--night); }
.searching .ticker { margin-top: 10px; font-size: 13px; letter-spacing: 0.2em; color: var(--gold); min-height: 1.4em; font-variant-numeric: tabular-nums; }

/* Result */
.result { padding: 0 0 8svh; }
.reveal { min-height: 88svh; display: grid; align-content: end; text-align: center; padding-bottom: 8svh; }
.reveal .eyebrow { font-size: 12px; letter-spacing: 0.32em; color: var(--gold); }
.reveal h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 10vw, 64px); margin: 10px 0 6px; text-shadow: 0 0 50px rgba(246, 220, 170, 0.35); }
.reveal .sub { color: var(--muted); }
.fade { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
.fade.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.sheet { background: var(--paper); color: var(--paper-ink); border-radius: 28px; padding: 30px 22px; margin: 16px 0; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8); }
.sheet .kicker { font-size: 12px; letter-spacing: 0.2em; color: var(--paper-gold); }
.sheet h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 5vw, 27px); line-height: 1.45; margin: 4px 0 14px; }
.sheet h4 { font-size: 15.5px; margin: 22px 0 8px; color: #7a5d24; }
.sheet p { margin: 0 0 12px; }
.sheet .big { font-family: var(--serif); font-size: 19px; line-height: 1.85; }
.sheet ul { padding-left: 20px; margin: 0 0 12px; }
.sheet li { margin-bottom: 5px; }
.sheet .muted, .sheet .note { color: var(--paper-muted); }
.sheet .note { font-size: 13.5px; line-height: 1.7; }
.quote { font-family: var(--serif); font-size: 19px; line-height: 1.7; border-left: 2px solid #d9bd85; padding: 2px 0 2px 16px; margin: 16px 0; color: #4a3f6a; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.tags span { background: var(--paper-2); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; }
.facts { font-size: 14px; color: var(--paper-muted); }
details.more summary { cursor: pointer; color: var(--paper-gold); font-size: 14px; margin-top: 8px; }

.journey svg { width: 100%; height: auto; display: block; margin: 8px 0 4px; overflow: visible; }
.journey .path { fill: none; stroke: #d9bd85; stroke-width: 1.5; stroke-dasharray: 3 5; }
.journey .node { fill: var(--paper); stroke: #c9a865; stroke-width: 1.5; }
.journey .node.done { fill: #e9d7ae; }
.journey .node.now { fill: #e2bf86; stroke: #9a7a3a; }
.journey .halo { fill: rgba(226, 191, 134, 0.35); transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite; }
.journey text { font-size: 12px; fill: var(--paper-muted); text-anchor: middle; font-family: var(--sans); }
.journey text.now { fill: var(--paper-ink); font-weight: 700; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: 0.2; } }
.why { list-style: none; padding: 0; margin: 10px 0 0; }
.why li { position: relative; padding-left: 18px; color: var(--paper-muted); font-size: 15px; }
.why li::before { content: '·'; position: absolute; left: 4px; color: var(--paper-gold); }

.night { background: linear-gradient(180deg, rgba(16, 20, 44, 0.85), rgba(10, 13, 32, 0.9)); border: 1px solid var(--line); border-radius: 28px; padding: 28px 22px; margin: 16px 0; backdrop-filter: blur(10px); }
.night h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; margin: 4px 0 12px; }
.night .kicker { font-size: 12px; letter-spacing: 0.2em; color: var(--gold); }
.card-text { font-family: var(--serif); font-size: 18.5px; line-height: 1.9; }
.systems { display: grid; gap: 14px; margin-top: 18px; }
.system { display: grid; grid-template-columns: 88px 1fr 34px; gap: 10px; align-items: center; font-size: 14.5px; }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--c); box-shadow: 0 0 12px var(--c); transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.system small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin-top: -6px; }
.sky-strip { width: 100%; height: auto; display: block; margin-top: 14px; }
.sky-line { fill: none; stroke: rgba(183, 177, 242, 0.25); stroke-width: 1; }
.sky-day { fill: #fff6e6; opacity: 0; animation: twinkle 0.6s ease forwards; }
.sky-day.chosen { fill: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
@keyframes twinkle { to { opacity: var(--a); } }
.sky-day.chosen { animation-name: twinkleOn; }
@keyframes twinkleOn { to { opacity: 1; } }
.sky-label { font-size: 11px; fill: var(--faint); text-anchor: middle; }
.sky-label.chosen { fill: var(--gold); }
.notice { font-size: 13px; color: var(--faint); line-height: 1.7; margin: 10px 0 0; }

.step-title { font-family: var(--serif); font-size: 24px; margin: 4px 0 12px; line-height: 1.45; }
.bubbles { display: grid; gap: 8px; margin: 14px 0; }
.bubble { justify-self: end; max-width: 92%; background: #e9dfff; color: #2c2450; border-radius: 18px 18px 4px 18px; padding: 10px 14px; font-size: 15px; line-height: 1.6; }
.bubble.hint { justify-self: start; background: var(--paper-2); color: var(--paper-muted); border-radius: 18px 18px 18px 4px; }
.watch { border-top: 1px dashed #e0d4bd; padding-top: 12px; margin-top: 14px; font-size: 15px; }
.watch b { color: var(--paper-gold); font-weight: 600; margin-right: 6px; }
.avoid { border-left: 3px solid var(--rose); background: #fbf0f2; border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.avoid b { display: block; color: #9a3f5a; margin-bottom: 4px; }
.because { font-size: 12.5px; color: var(--paper-muted); margin-top: 10px; }
.because span { display: inline-block; background: var(--paper-2); border-radius: 6px; padding: 2px 8px; margin: 3px 4px 0 0; }
.care { background: #fff5e3; border: 1px solid #e7c98f; color: #5b4416; border-radius: 16px; padding: 16px; margin: 14px 0; }
.closing { text-align: center; padding: 10svh 0 6svh; }
.closing p { font-family: var(--serif); font-size: clamp(21px, 5vw, 26px); line-height: 1.7; max-width: 20em; margin: 0 auto; text-shadow: 0 0 30px var(--night); }
.closing small { display: block; color: var(--gold); letter-spacing: 0.2em; font-size: 12px; margin-bottom: 14px; }
.next-q { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.next-q li { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-family: var(--serif); font-size: 17px; }
.next-q li::before { content: 'Q. '; color: var(--gold); }

/* Products */
.tiers { display: grid; gap: 10px; margin-top: 14px; }
.tier { position: relative; display: block; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px; padding: 16px 18px; cursor: pointer; background: rgba(255, 255, 255, 0.025); transition: all 0.2s; }
.tier input { position: absolute; opacity: 0; }
.tier:has(input:checked) { border-color: var(--gold); background: rgba(236, 208, 154, 0.08); box-shadow: 0 0 30px -12px rgba(236, 208, 154, 0.5); }
.tier .head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.tier .price { color: var(--gold); white-space: nowrap; }
.tier ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; margin: 16px 0 6px; }
.total b { color: var(--gold); font-size: 22px; }
.status { padding: 14px 16px; border-radius: 14px; background: rgba(143, 216, 203, 0.1); border: 1px solid rgba(143, 216, 203, 0.4); margin: 10px 0; }
.status.warn { background: rgba(234, 169, 187, 0.1); border-color: rgba(234, 169, 187, 0.45); }
.keybox { border: 1px dashed var(--gold); border-radius: 18px; padding: 18px; background: rgba(236, 208, 154, 0.06); }
.keybox code { display: block; word-break: break-all; font-size: 12.5px; color: var(--gold); margin: 8px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs button { border: 1px solid var(--line); background: var(--glass); color: var(--muted); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.tabs button[aria-selected='true'] { background: var(--gold); color: #1b1630; border-color: var(--gold); }
.cand { border-top: 1px solid #ece2cf; padding: 18px 0 6px; }
.cand .date { font-family: var(--serif); font-size: 21px; }
.cand .role { color: var(--paper-gold); font-size: 14px; font-weight: 600; }
.cand .idx { font-size: 13px; color: var(--paper-muted); margin: 2px 0 10px; }
.ev { font-size: 14.5px; margin: 8px 0; padding-left: 12px; border-left: 2px solid #8fd8cb; }
.ev.c { border-color: var(--rose); }
.ev b { display: block; font-size: 13.5px; }
.sheet .step { display: grid; gap: 2px; padding: 11px 0; border-top: 1px solid #ece2cf; }
.sheet .step b { font-size: 14px; color: #7a5d24; }
footer { padding: 40px 0 60px; color: var(--faint); font-size: 12.5px; text-align: center; line-height: 1.8; }
footer a { color: var(--muted); }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } .pillar { grid-template-columns: 1fr; } .sheet, .night { padding: 40px 38px; } }
@media (max-width: 420px) { .card-text, .sheet .big { font-size: 17px; } .talk-card { padding: 24px 16px 18px; } .row { grid-template-columns: 1.2fr 1fr 1fr; } .system { grid-template-columns: 76px 1fr 30px; } }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1; transform: none; transition: none; } .q-step { animation: none; } .journey .halo { animation: none; } .sky-day { animation: none; opacity: var(--a); } }
