:root {
  --bg: #1c1224;
  --surface: #2e1d3a;
  --surface-2: #3a2748;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6efe3;
  --muted: #b9a8c9;
  --accent: #e2b86b;
  --accent-2: #f3d9a4;
  --gold: #c9a45c;
  --candle: #f3c98b;
  --lavender: #d9cdea;
  --cream: #f6efe3;
  --glow: rgba(226, 184, 107, 0.45);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: "Pretendard", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  min-height: 100dvh;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; }
.serif { font-family: "Noto Serif KR", serif; }

#sky {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(110, 70, 150, 0.35), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(201, 164, 92, 0.12), transparent 60%);
}
#sky::before, #sky::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff8, transparent),
    radial-gradient(1px 1px at 80% 10%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 30% 70%, #fff7, transparent),
    radial-gradient(1px 1px at 60% 40%, #fff5, transparent),
    radial-gradient(1px 1px at 90% 80%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 45% 15%, #fff8, transparent),
    radial-gradient(1px 1px at 15% 90%, #fff5, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
#sky::after { transform: translate(37%, 23%); animation-delay: 3s; }
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 1; } }

#app {
  position: relative; max-width: 440px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.screen { flex: 1; display: flex; flex-direction: column; padding: 0 20px 32px; animation: fade 0.6s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade { from { opacity: 0; transform: translateY(14px) scale(0.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.topbar { height: 56px; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; margin: 0 -12px; }
.topbar .back { width: 48px; height: 48px; display: grid; place-items: center; font-size: 22px; }
.topbar .step { text-align: center; font-size: 15px; }
.topbar .step b { font-weight: 700; }

/* 공통 버튼 */
.btn {
  height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600; width: 100%; transition: opacity 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(180deg, #f8e2b6, #d9ad62); color: #2a1a10;
  box-shadow: 0 6px 24px -6px var(--glow);
}
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.7); width: auto; padding: 0 24px; flex-shrink: 0; }
.btn:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.btn-row { display: flex; gap: 12px; margin-top: auto; padding-top: 24px; }

/* 랜딩 */
.landing { text-align: center; justify-content: center; gap: 28px; padding-top: 40px; }
.brand { font-size: 13px; letter-spacing: 0.3em; color: var(--gold); }
.moon {
  width: 120px; height: 120px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff5e1, #f0d29c 45%, #b98a4a 100%);
  box-shadow: 0 0 60px rgba(240, 210, 156, 0.45), 0 0 140px rgba(201, 164, 92, 0.2);
  position: relative;
}
.moon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 70% 40%, var(--bg) 0 42%, transparent 43%);
  opacity: 0.85;
}
.landing h1 { font-size: 30px; line-height: 1.4; font-weight: 600; }
.landing h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 14px var(--glow); }
.landing p.lead { color: var(--muted); line-height: 1.6; font-size: 15px; }
.fan-preview { display: flex; justify-content: center; height: 150px; margin: 8px 0; }
.fan-preview .card-back { width: 74px; height: 121px; margin: 0 -14px; transform-origin: 50% 120%; }

/* 폼 */
.form-head { padding-top: 28px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; }
.form-head h2 { font-size: 21px; font-weight: 600; }
.form-head p { color: var(--muted); font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.field label { font-weight: 600; font-size: 15px; padding: 0 2px; }
.field .opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.input {
  height: 50px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06);
  color: var(--text); padding: 0 14px; font-size: 16px; outline: none; width: 100%;
}
.input:focus { border-color: var(--accent); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { color: #111; }
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.chip {
  height: 50px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06);
  font-size: 16px; transition: all 0.15s;
}
.chip.on { border-color: var(--gold); background: rgba(201, 164, 92, 0.22); color: var(--accent-2); font-weight: 600; box-shadow: 0 0 12px rgba(201, 164, 92, 0.25); }

/* 카드 */
.card-back {
  border-radius: 6px; position: relative; overflow: hidden;
  background: #3a2748 var(--card-back, url("/assets/hanna/card_back.webp")) center / cover no-repeat;
  border: 1px solid rgba(201, 164, 92, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.card-face {
  aspect-ratio: 18 / 31; width: 100%; border-radius: 8px; position: relative; overflow: hidden;
  background: linear-gradient(170deg, #fbf4e6, #ecdcbc);
  color: #3a2a1c; display: flex; flex-direction: column; align-items: center;
  box-shadow: inset 0 0 0 4px #fbf4e6, inset 0 0 0 5px #b48a4c;
  font-family: "Noto Serif KR", serif;
}
.card-face.photo { background: #f4ede0; box-shadow: none; }
.card-face.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-face.photo .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14% 4px 6%; text-align: center;
  background: linear-gradient(transparent, rgba(8, 6, 16, 0.85) 45%);
  color: #f6e7c6; font-size: clamp(9px, 2.8vw, 12px); font-weight: 700; line-height: 1.3; letter-spacing: 0.02em;
}
.card-face.photo .cap span { display: block; font-size: 0.8em; color: var(--gold); letter-spacing: 0.15em; }
.card-face.photo.lg .cap { font-size: 16px; }
.card-face .num { margin-top: 9%; font-size: clamp(10px, 3.4vw, 15px); letter-spacing: 0.1em; font-weight: 700; }
.card-face svg { width: 62%; flex: 1; }
.card-face .name { margin-bottom: 9%; font-size: clamp(9px, 3vw, 13px); font-weight: 700; text-align: center; padding: 0 6px; line-height: 1.25; }
.card-face.lg .num { font-size: 18px; }
.card-face.lg .name { font-size: 16px; }

/* 카드 고르기 */
.pick-head { text-align: center; padding: 8px 0 18px; color: var(--muted); font-size: 15px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.slot { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.slot .holder {
  width: 100%; aspect-ratio: 18 / 31; border-radius: 8px; border: 1px dashed rgba(201, 164, 92, 0.5);
  display: grid; place-items: center; color: rgba(201, 164, 92, 0.6); font-size: 26px;
}
.slot .holder .card-back { width: 100%; height: 100%; animation: drop 0.35s ease; }
@keyframes drop { from { transform: translateY(40px) scale(0.8); opacity: 0; } }
.slot span { font-size: 12px; background: rgba(255, 255, 255, 0.08); padding: 4px 8px; border-radius: 5px; }

.deck { position: relative; height: 330px; margin: 0 -20px; overflow: hidden; }
.deck-row { position: absolute; left: 0; right: 0; height: 110px; }
.deck .card-back {
  position: absolute; width: 56px; height: 92px; transition: transform 0.2s, opacity 0.3s;
}
.deck .card-back:hover, .deck .card-back:focus-visible { transform: translateY(-14px) rotate(var(--r)); outline: none; box-shadow: 0 0 18px var(--glow); }
.deck .card-back.taken { opacity: 0; pointer-events: none; }
.deck.shuffling .card-back { animation: shuffle 0.6s ease; }
@keyframes shuffle { 50% { transform: translateX(var(--dx)) rotate(0); } }
.pick-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 20px; }
.link-btn { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; align-self: center; padding: 6px; }

/* 결과 */
.result { padding-top: 0; }
.result-hero { text-align: center; padding: 22px 0 8px; }
.result-hero .sub { font-size: 20px; font-weight: 300; text-shadow: 0 0 10px var(--accent-2); }
.result-hero .big { font-size: 44px; color: var(--accent); text-shadow: 0 0 10px var(--glow); line-height: 1.35; font-weight: 600; }
.result-hero .q { font-size: 24px; font-weight: 300; }

.spread { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 10px; }
.spread .slot .flip { width: 100%; aspect-ratio: 18 / 31; perspective: 800px; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.flip.open .flip-inner { transform: rotateY(180deg); }
.flip-inner > * { position: absolute; inset: 0; backface-visibility: hidden; }
.flip-inner .card-face { transform: rotateY(180deg); box-shadow: inset 0 0 0 4px #fbf4e6, inset 0 0 0 5px #b48a4c, 0 0 14px var(--glow); }
.flip-inner .card-face.photo { box-shadow: 0 0 14px var(--glow); }

.panel {
  margin-top: 28px; border: 1px solid var(--accent); border-radius: 20px; padding: 32px 18px 24px;
  box-shadow: 0 0 14px rgba(201, 164, 92, 0.4); background: rgba(10, 6, 10, 0.7);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.panel .label { color: rgba(255, 255, 255, 0.8); }
.panel h3 { font-size: 22px; font-weight: 600; }
.gauge { width: 200px; height: 110px; }
.gauge-box { width: 100%; background: var(--surface-2); border-radius: 10px; padding: 18px 16px; text-align: center; }
.gauge-box .pct { font-size: 32px; font-weight: 700; background: linear-gradient(135deg, #fff 40%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gauge-box hr { border: 0; border-top: 1px dashed rgba(255, 255, 255, 0.3); margin: 12px 0; }
.gauge-box p { font-size: 14px; line-height: 1.6; font-weight: 300; }
.traits { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.trait {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px 0 18px; border-radius: 10px;
  background: #0a0508; box-shadow: 0 0 3px rgba(243, 201, 139, 0.6); font-size: 14px;
}
.trait b { width: 56px; flex-shrink: 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trait span { flex: 1; color: rgba(255, 255, 255, 0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trait i { font-style: normal; font-size: 11px; color: rgba(201, 164, 92, 0.5); }
.blur { filter: blur(4px); user-select: none; }

.card-detail {
  margin-top: 20px; border-radius: 24px; padding: 2px; background: var(--accent-2); box-shadow: 0 0 10px var(--glow);
}
.card-detail > div {
  border-radius: 22px; background: #000; padding: 22px 30px 28px; text-align: center; position: relative; overflow: hidden;
}
.card-detail > div::before {
  content: ""; position: absolute; inset: 30px 0 auto; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(201, 164, 92, 0.55), transparent);
}
.card-detail .pos { position: relative; color: var(--accent); font-size: 13px; letter-spacing: 0.1em; margin-bottom: 14px; }
.card-detail .face-wrap { position: relative; width: 60%; margin: 0 auto; }
.card-detail h4 { position: relative; margin-top: 16px; font-size: 26px; font-weight: 700; background: linear-gradient(#fff 20%, var(--accent) 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-detail .ko { position: relative; color: var(--muted); font-size: 13px; margin-top: 4px; }
.card-detail .tags { position: relative; display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.card-detail .tags span { font-size: 12px; color: var(--accent); border: 1px solid #8a6a3a; background: rgba(201, 164, 92, 0.12); padding: 4px 9px; border-radius: 4px; }
.card-detail p { position: relative; margin-top: 18px; font-size: 14px; line-height: 1.6; }

.locked { margin-top: 40px; }
.locked-item { border-radius: 14px; background: var(--surface); padding: 16px; margin-bottom: 14px; position: relative; overflow: hidden; }
.locked-item h5 { font-size: 15px; display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.locked-item h5 em { font-style: normal; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: rgba(201, 164, 92, 0.2); color: var(--accent); font-size: 13px; }
.locked-item p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.locked-item h5 .src { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
.locked-item.lock h5 .src { margin-right: 26px; }
.locked-item.lock p { filter: blur(5px); user-select: none; }
.locked-item.lock::after {
  content: "🔒"; position: absolute; right: 16px; top: 14px; font-size: 16px;
}

.offer {
  margin-top: 36px; border-radius: 22px; background: linear-gradient(180deg, #fff, #f3e9da); color: #2a1a22; padding: 26px 22px 22px;
}
.offer h3 { text-align: center; color: #8a5a2b; font-size: 22px; font-family: "Noto Serif KR", serif; margin-bottom: 18px; }
.offer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.offer li { font-size: 15px; display: flex; gap: 8px; }
.offer li::before { content: "♥"; color: #c9a45c; }
.price-line { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; }
.price-line s { color: #999; }
.badge { background: #b0864a; color: #fff; border-radius: 99px; font-size: 12px; padding: 2px 8px; margin-right: 6px; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid #e6d6bd; margin-top: 10px; padding-top: 14px; }
.price-total strong { font-size: 30px; }
.offer .btn { margin-top: 18px; }
.sticky-cta {
  position: sticky; bottom: 0; margin: 24px -20px -32px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 35%);
}
.note { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 20px; text-align: center; }

/* 결제 */
.checkout h2 { font-size: 20px; padding: 10px 0 18px; }
.box { background: var(--surface); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.product-row { display: flex; justify-content: space-between; align-items: center; }
.product-row .t { font-weight: 600; }
.product-row .p { text-align: right; }
.product-row .p s { color: var(--muted); font-size: 13px; display: block; }
.product-row .p b { color: var(--accent); margin-right: 6px; }
.box h4 { font-size: 15px; margin-bottom: 10px; }
.box .hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.box .hint.err { color: #f2a07b; }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method { height: 52px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-size: 15px; position: relative; }
.method.on { border-color: var(--accent); background: rgba(201, 164, 92, 0.12); }
.method small { position: absolute; top: -8px; right: 8px; background: var(--accent); color: #1a0f16; font-size: 11px; padding: 1px 6px; border-radius: 99px; font-weight: 700; }
.sum .row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: var(--muted); }
.sum .row.disc { color: var(--accent); }
.sum .row.total { color: var(--text); font-size: 17px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.agree { display: flex; flex-direction: column; gap: 12px; }
.agree label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.agree input { width: 18px; height: 18px; accent-color: var(--accent); }
.agree .all { font-weight: 700; font-size: 15px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.test-banner { font-size: 12px; text-align: center; color: var(--gold); border: 1px dashed rgba(232, 201, 138, 0.5); border-radius: 8px; padding: 8px; margin-bottom: 14px; }

.overlay { position: fixed; inset: 0; background: rgba(5, 3, 10, 0.85); display: grid; place-items: center; z-index: 10; animation: fade 0.3s; }
.overlay .spinner { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(201, 164, 92, 0.2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto 18px; }
.overlay p { text-align: center; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 전체 풀이 */
.full .locked-item p { color: var(--text); }
.full .locked-item { border: 1px solid rgba(201, 164, 92, 0.25); }
.restart { margin-top: 18px; }

/* ---------- 윤서하 장면 ---------- */
.scene-screen { position: relative; min-height: 100dvh; padding: 0 22px calc(28px + env(safe-area-inset-bottom)); justify-content: flex-end; overflow: hidden; }
.scene-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.scene-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center top; animation: breathe 14s ease-in-out infinite alternate; }
.scene-bg.blur img { filter: blur(14px) brightness(0.55); transform: scale(1.12); animation: none; }
@keyframes breathe { from { transform: scale(1.02); } to { transform: scale(1.08) translateY(-1%); } }
.scene-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(28, 18, 36, 0.15) 0%, transparent 28%, rgba(28, 18, 36, 0.55) 52%, rgba(20, 12, 26, 0.96) 80%); }
.topbar.over { position: absolute; top: 0; left: 10px; right: 10px; z-index: 3; margin: 0; }
.topbar.over .back { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.scene-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 18px; padding-top: 50vh; }
.say { font-size: 18px; line-height: 1.65; text-align: center; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85); min-height: 3.3em; }
.say.small { min-height: auto; font-size: 16px; color: var(--lavender); }
.say.in { animation: sayIn 0.5s ease; }
@keyframes sayIn { from { opacity: 0; transform: translateY(6px); } }
.answer, .rise { animation: rise 0.6s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.form-card { background: rgba(28, 18, 36, 0.55); border: 1px solid rgba(201, 164, 92, 0.25); border-radius: 16px; padding: 18px 18px 4px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.input.under { background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.35); border-radius: 0; padding: 0 2px; }
.input.under:focus { border-bottom-color: var(--gold); }
.field.line label { color: var(--lavender); }
.sentence { display: flex; flex-direction: column; gap: 12px; font-size: 17px; text-align: center; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.sentence p { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-input, .inline-select {
  font: inherit; font-size: 16px; color: var(--text); background-color: rgba(46, 29, 58, 0.88);
  border: 1px solid rgba(201, 164, 92, 0.55); border-radius: 10px; height: 42px; padding: 0 12px; text-align: center;
}
.inline-input { width: 120px; }
.inline-select {
  appearance: none; -webkit-appearance: none; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 15px) 18px, calc(100% - 10px) 18px; background-size: 5px 5px; background-repeat: no-repeat;
}
.inline-select option { color: #111; }
.inline-input:focus, .inline-select:focus { outline: none; border-color: var(--candle); box-shadow: 0 0 0 3px rgba(243, 201, 139, 0.2); }
.sentence small, .q-meta small { color: var(--muted); font-size: 12px; text-shadow: none; }
.question {
  width: 100%; min-height: 110px; resize: none; background: rgba(46, 29, 58, 0.88); border: 1px solid rgba(201, 164, 92, 0.45);
  border-radius: 12px; padding: 14px; color: var(--text); font: inherit; font-size: 16px; line-height: 1.6; /* 16px 미만이면 아이폰이 확대한다 */
}
.question:focus { outline: none; border-color: var(--candle); }
.q-meta { display: flex; justify-content: space-between; }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

/* ---------- 시네마틱 인트로 ---------- */
.intro { position: relative; min-height: 100dvh; padding: 0; overflow: hidden; justify-content: flex-end; }
.intro-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; transform: scale(1.12); }
.intro-shot.on { opacity: 1; animation: kenburns 5s ease-out forwards; }
.intro-shot:last-of-type.on { animation: kenburnsOut 6s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.14); } to { transform: scale(1.02) translateY(-1.5%); } }
@keyframes kenburnsOut { from { transform: scale(1.18); } to { transform: scale(1); } }
.intro-mist { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 40%, rgba(28, 18, 36, 0.7) 62%, rgba(20, 12, 26, 0.97) 85%); }
.intro-copy { position: relative; z-index: 2; padding: 0 24px calc(30px + env(safe-area-inset-bottom)); text-align: center; display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(16px); transition: opacity 1.2s ease, transform 1.2s ease; }
.intro-copy.on { opacity: 1; transform: none; }
.intro-copy .brand { color: var(--gold); font-size: 11px; letter-spacing: 0.35em; }
.intro-copy .logo { font-size: 18px; color: var(--accent-2); letter-spacing: 0.2em; }
.intro-copy h1 { font-size: 34px; font-weight: 700; background: linear-gradient(180deg, #fff6e2, #d9ad62); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(226, 184, 107, 0.45)); }
.intro-copy p { color: var(--lavender); line-height: 1.6; font-size: 15px; }
.intro-copy small { color: var(--muted); font-size: 11px; }

/* ---------- 카드 뽑기 의식 ---------- */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
.pick-screen { position: relative; min-height: 100dvh; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); overflow: clip; }
.pick-bg { position: absolute; inset: 0; z-index: 0; }
.pick-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: brightness(0.42) saturate(1.1); animation: breathe 16s ease-in-out infinite alternate; }
.pick-shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(28, 18, 36, 0.2), rgba(20, 12, 26, 0.55) 45%, rgba(16, 10, 22, 0.95) 85%); }
.hanna-line { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 58px 0 16px; }
.avatar {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--gold);
  background: var(--avatar, url("/assets/hanna/intro_5.webp")) 50% 16% / 300% no-repeat; box-shadow: 0 0 14px rgba(201, 164, 92, 0.45);
}
.bubble {
  flex: 1; min-height: 48px; padding: 11px 14px; font-size: 15px; line-height: 1.5;
  background: rgba(28, 18, 36, 0.7); border: 1px solid rgba(201, 164, 92, 0.32); border-radius: 16px 16px 16px 4px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.bubble.in { animation: sayIn 0.45s ease; }
.pslots { position: relative; z-index: 3; display: flex; justify-content: center; gap: 14px; }
.pslot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 96px; }
.pslot-card {
  width: 62px; height: 106px; border-radius: 8px; border: 1px dashed rgba(201, 164, 92, 0.6); background: rgba(28, 18, 36, 0.45);
  display: grid; place-items: center; color: rgba(201, 164, 92, 0.75); font-family: "Noto Serif KR", serif; font-size: 22px; transition: box-shadow 0.4s;
}
.pslot-card .card-back { width: 100%; height: 100%; border-radius: 7px; }
.pslot.filled .pslot-card { border-style: solid; border-color: var(--candle); box-shadow: 0 0 20px rgba(243, 201, 139, 0.55); }
.pslot.pop .pslot-card { animation: pop 0.55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(1.3); } }
.pslot em { font-style: normal; font-size: 11.5px; color: var(--lavender); background: rgba(28, 18, 36, 0.65); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.ritual { position: relative; z-index: 2; height: min(48vh, 380px); margin: 6px -16px 0; }
.riffle { position: absolute; inset: 0; }
.rcard { position: absolute; left: 50%; top: 46%; width: 66px; height: 112px; margin-top: calc(var(--i) * -1.4px); transform: translate(-50%, -50%); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); }
.riffle:not(.go) .rcard { animation: idleBob 3s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.2s); }
@keyframes idleBob { to { transform: translate(-50%, calc(-50% - 6px)); } }
.riffle.go .rcard:nth-child(odd) { animation: riffleL 2s cubic-bezier(.55, 0, .3, 1) forwards; animation-delay: calc(var(--i) * 18ms); }
.riffle.go .rcard:nth-child(even) { animation: riffleR 2s cubic-bezier(.55, 0, .3, 1) forwards; animation-delay: calc(var(--i) * 18ms); }
@keyframes riffleL {
  0% { transform: translate(-50%, -50%); }
  20% { transform: translate(calc(-50% - 82px), -50%) rotate(-18deg); }
  40% { transform: translate(-50%, calc(-50% - 8px)) rotate(0); }
  58% { transform: translate(calc(-50% - 62px), -50%) rotate(-11deg); }
  76% { transform: translate(-50%, -50%) scale(1.06); }
  100% { transform: translate(-50%, 30%) scale(0.6); opacity: 0; }
}
@keyframes riffleR {
  0% { transform: translate(-50%, -50%); }
  20% { transform: translate(calc(-50% + 82px), -50%) rotate(18deg); }
  40% { transform: translate(-50%, calc(-50% - 8px)) rotate(0); }
  58% { transform: translate(calc(-50% + 62px), -50%) rotate(11deg); }
  76% { transform: translate(-50%, -50%) scale(1.06); }
  100% { transform: translate(-50%, 30%) scale(0.6); opacity: 0; }
}
.wheel { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; animation: fadeIn 0.8s ease; transition: opacity 0.7s; }
.wheel.done { opacity: 0; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; } }
.wcard {
  position: absolute; left: 50%; top: calc(150px + var(--R)); width: 66px; height: 112px; margin: -56px 0 0 -33px;
  border-radius: 7px; padding: 0; transition: box-shadow 0.25s, filter 0.25s; filter: brightness(0.85); will-change: transform;
}
.wcard.focus { filter: brightness(1.12); box-shadow: 0 0 0 1px rgba(243, 201, 139, 0.95), 0 0 22px rgba(243, 201, 139, 0.75); }
.wheel-hint { position: absolute; left: 0; right: 0; bottom: 6px; z-index: 3; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 0.25em; animation: hint 1.8s ease-in-out infinite alternate; }
@keyframes hint { from { opacity: 0.35; } to { opacity: 0.9; } }
/* 화면이 낮아도 버튼이 항상 보이도록 하단에 붙인다 (sticky가 동작하려면 .pick-screen이 overflow: clip이어야 함) */
.pick-cta { position: sticky; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 8px; }
.riffle:not(.go) { cursor: pointer; }
.fly-ghost { position: fixed; z-index: 60; border-radius: 7px; pointer-events: none; box-shadow: 0 0 28px rgba(243, 201, 139, 0.85); }

/* ---------- 리딩 대기 ---------- */
.reading .scene-bg img { filter: brightness(0.8); }
.orbit { position: absolute; left: 50%; top: 61%; z-index: 2; width: 0; height: 0; perspective: 700px; transform-style: preserve-3d; }
.orb { position: absolute; left: -26px; top: -44px; width: 52px; height: 88px; transform-style: preserve-3d; animation: orbit 6s linear infinite; animation-delay: calc(var(--k) * -2s); }
.orb .card-back { width: 100%; height: 100%; border-radius: 6px; box-shadow: 0 0 22px rgba(243, 201, 139, 0.7); animation: bob 2.4s ease-in-out infinite alternate; }
@keyframes orbit { from { transform: rotateY(0deg) translateZ(118px) rotateY(0deg); } to { transform: rotateY(360deg) translateZ(118px) rotateY(-360deg); } }
@keyframes bob { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
.candle { position: relative; height: 6px; margin: 4px 8px 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.wax { position: relative; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8a6a3a, #f3c98b); animation: wax linear forwards; }
@keyframes wax { to { width: 100%; } }
.flame {
  position: absolute; right: -6px; top: -15px; width: 12px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6d8, #f3c98b 45%, rgba(243, 140, 60, 0) 72%);
  filter: drop-shadow(0 0 8px #f3c98b); animation: flicker 0.16s infinite alternate;
}
@keyframes flicker { to { transform: scale(0.9, 1.08) translateX(1px); } }
.reading.flash::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(circle at 50% 35%, rgba(255, 240, 205, 0.95), transparent 62%); animation: flash 0.9s ease-out forwards; }
@keyframes flash { from { opacity: 0; } 30% { opacity: 1; } to { opacity: 0; } }

/* ---------- 웹툰형 무료 미리보기 ---------- */
.teaser { padding: 0; }
.teaser > .topbar { position: absolute; top: 0; left: 8px; right: 8px; z-index: 6; margin: 0; }
.teaser > .topbar .back { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }
.wt {
  color: #3a2a1c; padding-bottom: 36px;
  background-color: #f3eadb;
  background-image: radial-gradient(rgba(120, 90, 60, 0.07) 1px, transparent 1.2px), radial-gradient(rgba(120, 90, 60, 0.05) 1px, transparent 1.2px);
  background-size: 6px 6px, 9px 9px; background-position: 0 0, 3px 4px;
}
.wt-panel { position: relative; margin: 0 16px 20px; border: 2px solid #2a1d33; border-radius: 6px; background: #2a1d33; }
.wt-panel img { width: 100%; display: block; border-radius: 4px; }
.wt-panel.tall { margin: 0 0 6px; border: 0; border-radius: 0; }
.wt-panel.tall img { border-radius: 0; }
.wt-panel.dark { margin: 0 0 22px; border-color: var(--gold); }
.wt-bubble {
  position: absolute; z-index: 2; max-width: 74%; padding: 10px 16px; border-radius: 22px;
  background: #fff; color: #241a2c; border: 2px solid #241a2c; box-shadow: 3px 3px 0 rgba(36, 26, 44, 0.85);
  font-size: 15px; line-height: 1.5; font-weight: 600; text-align: center;
  opacity: 0; transform: scale(0.4); transition: transform 0.5s cubic-bezier(.3, 1.7, .5, 1) 0.3s, opacity 0.3s 0.3s;
}
.wt-bubble.in { opacity: 1; transform: none; }
.wt-bubble::after { content: ""; position: absolute; width: 12px; height: 12px; background: inherit; border-right: 2px solid #241a2c; border-bottom: 2px solid #241a2c; bottom: -8px; left: 28px; transform: rotate(45deg); }
.wt-bubble.tl { top: 14px; left: 12px; } .wt-bubble.tr { top: 14px; right: 12px; }
.wt-bubble.bl { bottom: 16px; left: 12px; } .wt-bubble.br { bottom: 16px; right: 12px; }
.wt-bubble.bl::after, .wt-bubble.br::after { top: -8px; bottom: auto; transform: rotate(225deg); }
.wt-bubble.tr::after, .wt-bubble.br::after { left: auto; right: 28px; }
.wt-bubble.small { font-family: "Nanum Pen Script", cursive; font-size: 24px; font-weight: 400; padding: 2px 16px; }
.wt-bubble.ghost { background: rgba(255, 255, 255, 0.9); border-style: dashed; box-shadow: none; font-weight: 500; }
.wt-gap { padding: 22px 0 4px; text-align: center; }
.wt-narr { font-size: 13px; color: #8a7058; letter-spacing: 0.08em; }
.wt-narr::before, .wt-narr::after { content: " ✦ "; color: #c9a45c; }
.wt-spread { margin: 14px 16px 10px; }
.wt .slot span { background: rgba(58, 42, 28, 0.08); color: #3a2a1c; }
.sd-say { display: flex; align-items: flex-end; gap: 4px; margin: 4px 16px 18px; }
.sd-say.right { flex-direction: row-reverse; }
.sd { width: 92px; height: auto; flex-shrink: 0; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18)); }
.sd-say.in .sd { animation: wiggle 0.9s ease; }
@keyframes wiggle { 0% { transform: scale(0.5) rotate(-10deg); } 55% { transform: scale(1.08) rotate(4deg); } 100% { transform: none; } }
.sd-bubble { margin-bottom: 30px; padding: 10px 14px; border-radius: 18px; background: #fff; color: #241a2c; border: 2px solid #241a2c; box-shadow: 3px 3px 0 rgba(36, 26, 44, 0.85); font-size: 14px; font-weight: 600; line-height: 1.5; }
.wt-card { margin: 8px 16px 24px; padding: 22px 18px; text-align: center; background: #fffaf2; border: 1.5px solid #c9a45c; border-radius: 18px; box-shadow: 0 8px 24px rgba(80, 50, 30, 0.12); }
.wt-card-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.wt-card .gauge path:first-of-type { stroke: rgba(58, 42, 28, 0.12); }
.gauge-num { margin-top: -18px; font-size: 40px; font-weight: 800; color: #8a5a2b; }
.gauge-msg { margin: 6px 0 12px; font-size: 14px; line-height: 1.6; color: #5b4636; }
.chips-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chips-row span { padding: 4px 10px; border-radius: 99px; background: #f1e3c9; color: #7a5a32; font-size: 12px; }
.temps { text-align: left; border-top: 1px dashed #d9c3a0; padding-top: 14px; }
.temps-title { margin-bottom: 10px; font-size: 13px; color: #7a6250; }
.temp { margin-bottom: 12px; }
.temp-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.temp-head span { color: #8a6a3a; }
.temp-bar { height: 8px; border-radius: 99px; background: #efe2cc; overflow: hidden; }
.temp-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c9a45c, #e07a5f); transition: width 1.4s cubic-bezier(.2, .8, .2, 1) 0.3s; }
.temp.in .temp-bar i { width: var(--w); }
.frame { position: relative; margin: 0 16px 22px; padding: 22px 20px; background: #fffaf2; border: 4px double #3a2a1c; border-radius: 4px; box-shadow: 0 6px 18px rgba(80, 50, 30, 0.12); }
.frame-title { margin-bottom: 10px; text-align: center; font-size: 17px; }
.frame-title em { font-style: normal; font-weight: 700; color: #8a5a2b; }
.frame-text { font-size: 14.5px; line-height: 1.75; }
.frame .blur { filter: blur(5px); user-select: none; }
.lock-badge { position: absolute; top: -16px; right: 16px; width: 36px; height: 36px; display: grid; place-items: center; font-size: 17px; background: #fffaf2; border: 1.5px solid #3a2a1c; border-radius: 50%; }
.locked-frame.in .lock-badge { animation: shake 0.6s ease 0.6s; }
@keyframes shake { 25% { transform: rotate(-14deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-6deg); } }
.peek { position: absolute; left: -10px; bottom: -26px; width: 70px; }
.q-note { margin: 0 16px 8px; padding: 12px 16px; background: #fff; border-left: 3px solid #c9a45c; transform: rotate(-1deg); }
.q-note small { font-size: 11px; color: #8a6a3a; }
.q-note p { font-family: "Nanum Pen Script", cursive; font-size: 23px; line-height: 1.3; }

/* ---------- 판매 구간 ---------- */
.sale { padding: 34px 16px 30px; background: linear-gradient(180deg, #23162d, var(--bg) 30%); }
.sale .hanna-line { margin: 0 0 18px; }
.offer-card { position: relative; overflow: hidden; margin-bottom: 30px; padding: 26px 20px 20px; border-radius: 22px; color: #2a1a22; background: linear-gradient(180deg, #fffaf2, #f3e6cf); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.offer-hanna { position: absolute; top: -6px; right: -34px; width: 170px; -webkit-mask-image: radial-gradient(ellipse 70% 62% at 62% 36%, #000 52%, transparent 78%); mask-image: radial-gradient(ellipse 70% 62% at 62% 36%, #000 52%, transparent 78%); }
.offer-card h3 { position: relative; max-width: 64%; margin-bottom: 14px; font-size: 22px; color: #5a3a1a; }
.checks { position: relative; display: grid; gap: 8px; max-width: 72%; margin-bottom: 18px; list-style: none; }
.checks li { position: relative; padding-left: 24px; font-size: 14px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #c9a45c; color: #fff; font-size: 11px; }
.offer-card .btn { margin-top: 16px; }
.problem { margin: 34px 0; text-align: center; }
.problem-q { margin-bottom: 16px; font-size: 24px; }
.problem-panel { position: relative; margin-bottom: 18px; }
.problem-panel img { width: 100%; display: block; border-radius: 14px; filter: grayscale(0.35) brightness(0.75); }
.problem-a { font-size: 18px; line-height: 1.6; color: var(--lavender); }
.problem-a mark { background: linear-gradient(transparent 55%, rgba(201, 164, 92, 0.55) 55%); color: var(--text); font-weight: 700; }
.problem-turn { margin-top: 22px; font-size: 26px; color: var(--accent-2); text-shadow: 0 0 14px var(--glow); }
.point { margin-bottom: 14px; padding: 22px 18px; text-align: center; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(201, 164, 92, 0.25); border-radius: 18px; }
.point-tag { display: inline-block; margin-bottom: 10px; padding: 3px 10px; font-size: 11px; letter-spacing: 0.15em; color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; }
.point h4 { margin-bottom: 8px; font-size: 20px; }
.point p { font-size: 14px; line-height: 1.6; color: var(--lavender); }
.collage { display: flex; gap: 6px; margin-top: 14px; }
.collage img { flex: 1; min-width: 0; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 1px solid rgba(201, 164, 92, 0.4); }
.collage img:nth-child(2) { transform: translateY(10px); }
.qa { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; text-align: left; }
.qa-q { align-self: flex-end; max-width: 80%; padding: 9px 13px; border-radius: 16px 16px 4px 16px; background: var(--gold); color: #2a1a10; font-size: 14px; }
.qa-a { align-self: flex-start; max-width: 85%; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: #fffaf2; color: #2a1a22; font-size: 14px; }
.toc { margin: 6px 0 30px; list-style: none; }
.toc li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(201, 164, 92, 0.2); border-radius: 14px; }
.toc li img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }
.toc small { display: block; font-size: 11px; letter-spacing: 0.1em; color: var(--gold); }
.toc b { font-size: 15px; }
.toc .sd-say { margin: 0 0 10px; }
.toc .sd { width: 74px; }
.letter { margin: 22px 0 26px; }
.letter > img { width: 100%; display: block; border-radius: 16px 16px 0 0; }
.letter-paper {
  padding: 22px 22px 26px; border-radius: 0 0 16px 16px; color: #3a2a1c; background-color: #fbf3e4;
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(160, 120, 80, 0.18) 31px 32px);
  font-family: "Nanum Pen Script", cursive; font-size: 21px; line-height: 1.52;
}
.letter-paper p { margin-bottom: 10px; }
.letter-paper .sign { margin-top: 14px; text-align: right; }
.biz { margin-top: 14px; font-size: 11px; line-height: 1.7; text-align: center; color: var(--muted); }
.teaser .sticky-cta { margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }

/* ---------- 웹툰형 유료 결과 ---------- */
.result-wt > .topbar.over .back { color: #fff; }
.wax { transition: width 0.4s ease; }
.reading-error { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.headline-frame {
  position: relative; margin: 22px 16px 18px; padding: 26px 22px 24px; text-align: center;
  background: radial-gradient(circle at 50% 0%, #fff8e6, #f6e7c8); border: 1.5px solid #c9a45c; border-radius: 18px;
  box-shadow: 0 0 0 5px #f3eadb, 0 0 0 6.5px #c9a45c, 0 10px 30px rgba(140, 100, 40, 0.25);
}
.headline-frame small { display: block; margin-bottom: 10px; font-size: 11px; letter-spacing: 0.25em; color: #a07a3c; }
.headline-frame p { min-height: 3em; font-size: 20px; font-weight: 700; line-height: 1.55; color: #4a2f14; }
.summary-card, .answer-body { margin: 6px 16px 26px; padding: 18px 18px 6px; background: #fffaf2; border: 1px solid #e3cfa9; border-radius: 16px; box-shadow: 0 6px 18px rgba(80, 50, 30, 0.1); font-size: 15px; line-height: 1.8; }
.summary-card p, .answer-body p, .rsec-body p { margin-bottom: 12px; }
.summary-who { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: #8a5a2b; }
.summary-who .avatar { width: 32px; height: 32px; border-width: 1px; box-shadow: none; }
.rsec { margin: 0 0 30px; }
.rsec-head { position: relative; margin: 0 16px; border-radius: 16px 16px 0 0; overflow: hidden; }
.rsec-head img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; }
.rsec-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(28, 18, 36, 0.85)); }
.rsec-title { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff; }
.rsec-title small { font-size: 11px; letter-spacing: 0.2em; color: var(--accent-2); }
.rsec-title h3 { font-size: 20px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.rsec-bubble { display: flex; align-items: flex-start; gap: 8px; margin: -16px 26px 0; position: relative; z-index: 2; }
.rsec-bubble .avatar { width: 40px; height: 40px; }
.rsec-bubble p {
  margin-top: 18px; padding: 10px 14px; background: #fff; color: #241a2c; border: 2px solid #241a2c; border-radius: 4px 18px 18px 18px;
  box-shadow: 3px 3px 0 rgba(36, 26, 44, 0.85); font-size: 14.5px; font-weight: 600; line-height: 1.5;
  opacity: 0; transform: scale(0.6); transform-origin: top left; transition: transform 0.45s cubic-bezier(.3, 1.7, .5, 1) 0.35s, opacity 0.3s 0.35s;
}
.rsec.in .rsec-bubble p { opacity: 1; transform: none; }
.rsec-gauge { margin: 14px 16px 0; text-align: center; }
.rsec-gauge .gauge path:first-of-type { stroke: rgba(58, 42, 28, 0.12); }
.rsec-body { margin: 14px 16px 8px; padding: 18px 18px 6px; background: #fffaf2; border: 1px solid #e3cfa9; border-radius: 0 0 16px 16px; font-size: 15px; line-height: 1.85; color: #3a2a1c; }
.rsec .sd-say { margin-top: 0; }
.answer-card .q-note { margin-bottom: 12px; }
.actions-card { margin: 0 16px 26px; padding: 20px 18px; background: #2e1d3a; color: var(--text); border-radius: 18px; box-shadow: 0 10px 26px rgba(46, 29, 58, 0.35); }
.actions-card h4 { margin-bottom: 12px; font-size: 18px; color: var(--accent-2); }
.act { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px dashed rgba(201, 164, 92, 0.3); font-size: 15px; line-height: 1.5; cursor: pointer; }
.act input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold); flex-shrink: 0; }
.act input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--gold); }
.result-wt .letter { margin: 0 16px 26px; }
.sale.end { display: flex; flex-direction: column; gap: 10px; padding: 26px 16px calc(30px + env(safe-area-inset-bottom)); }

/* ---------- 7장 스프레드 ---------- */
.pslots.many { gap: 5px; }
.pslots.many .pslot { width: calc((100% - (var(--n) - 1) * 5px) / var(--n)); max-width: 64px; gap: 5px; }
.pslots.many .pslot-card { width: 100%; height: auto; aspect-ratio: 18 / 31; font-size: 14px; border-radius: 6px; }
.pslots.many .pslot em { font-size: 10.5px; padding: 2px 3px; white-space: nowrap; text-align: center; line-height: 1.2; }
.pslot.filled { cursor: pointer; }
.spread.spread7 { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 8px; }
.spread.spread7 .slot { width: calc((100% - 24px) / 4); }
.spread.spread7 .slot span { font-size: 10.5px; padding: 3px 5px; }
.spread.spread7 .card-face.photo .cap { font-size: 9px; }
.orbit .orb { animation-delay: calc(var(--k) * -6s / var(--n, 3)); }
.orbit.many .orb { width: 40px; height: 68px; left: -20px; top: -34px; }
.wait-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 결과: 카드 그림 읽기 · 신호 · 카톡 · 할 것/피할 것 ---------- */
.card-read { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 12px; background: #f6ecd9; border-radius: 12px; border: 1px dashed #d4b98a; }
.cr-card { width: 64px; flex-shrink: 0; }
.cr-card .card-face { border-radius: 6px; box-shadow: 0 4px 10px rgba(60, 40, 20, 0.25); }
.cr-card .card-face.photo .cap { display: none; }
.cr-text small { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: 0.08em; color: #a07a3c; }
.cr-text p { margin: 0; font-size: 14px; line-height: 1.65; color: #4a3520; }
.signals-card { margin: 0 16px 26px; padding: 22px 18px; background: #fffaf2; border: 1.5px solid #c9a45c; border-radius: 18px; box-shadow: 0 8px 22px rgba(80, 50, 30, 0.1); }
.signals-card h4, .dodont h4 { font-size: 18px; color: #4a2f14; margin-bottom: 4px; }
.signals-card .sub, .msg-card .sub { font-size: 12.5px; color: #8a7058; margin-bottom: 12px; }
.signals-card ul { list-style: none; display: grid; gap: 10px; }
.signals-card li { position: relative; padding: 10px 12px 10px 34px; background: #f6ecd9; border-radius: 10px; font-size: 14.5px; line-height: 1.55; }
.signals-card li::before { content: "✦"; position: absolute; left: 12px; top: 10px; color: #c9a45c; }
.msg-card { margin: 0 16px 26px; padding: 18px; background: #2e1d3a; border-radius: 18px; color: var(--text); }
.msg-card .summary-who { color: var(--accent-2); }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.chat-row { display: flex; justify-content: flex-end; }
.chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: #fee500; color: #191919; font-size: 14.5px; line-height: 1.5; text-align: left; position: relative; transition: transform 0.15s; }
.chat-bubble:active { transform: scale(0.97); }
.chat-bubble.copied::after { content: "복사됐어요"; position: absolute; top: -22px; right: 6px; font-size: 11px; color: var(--accent-2); }
.msg-card .sub { color: var(--muted); }
.dodont { display: grid; gap: 12px; margin: 0 16px 26px; }
.dodont .do { padding: 18px; background: #2e1d3a; color: var(--text); border-radius: 18px; }
.dodont .do h4 { color: var(--accent-2); }
.dodont .dont { padding: 18px; background: #fffaf2; border: 1px solid #e3cfa9; border-radius: 18px; }
.dodont .dont ul { list-style: none; display: grid; gap: 8px; margin-top: 8px; }
.dodont .dont li { position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.55; color: #3a2a1c; }
.dodont .dont li::before { content: "✕"; position: absolute; left: 2px; color: #c0643f; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .wt-bubble, .rsec-bubble p { opacity: 1 !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 홈 (상품 목록 앱 화면) ---------- */
body.is-hub { background: #0d0a12; }
body.is-hub #sky { opacity: 0.55; }
.hub { padding: 0 0 120px; }
.hub-top { display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 6px; }
.hub-top span { font-size: 21px; font-weight: 700; color: var(--accent-2); letter-spacing: -0.02em; }
.hub-top small { font-size: 10.5px; letter-spacing: 0.22em; color: var(--muted); }

/* 분야 탭 */
.cat-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 12px 20px; scrollbar-width: none; background: linear-gradient(#0d0a12 70%, rgba(13, 10, 18, 0)); }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button { flex: none; padding: 9px 17px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: #cfc3dc; border: 1px solid transparent; transition: 0.2s; }
.cat-tabs button.on { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)); border-color: rgba(255, 255, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px rgba(0, 0, 0, 0.4); }

/* 포스터 캐러셀 */
.hero { position: relative; margin-top: 6px; }
.hero-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 11% 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-count { position: absolute; top: 16px; right: calc(11% + 12px); z-index: 2; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.poster { position: relative; display: block; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff; background: #1d1526; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.poster.big { flex: 0 0 100%; aspect-ratio: 3 / 4; scroll-snap-align: center; transform: scale(0.93); opacity: 0.55; transition: transform 0.45s cubic-bezier(.2, .8, .2, 1), opacity 0.45s; }
.poster.big.on { transform: none; opacity: 1; }
.poster.small { aspect-ratio: 3 / 4; border-radius: 14px; }
.poster-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 22%, transparent 48%, rgba(10, 4, 16, 0.92) 100%); }
.poster-cat { position: absolute; top: 12px; left: 12px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(226, 184, 107, 0.92); color: #2a1a10; }
.poster-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 20px; display: grid; gap: 6px; }
.poster-text small { font-size: 12.5px; color: #e9dcf3; opacity: 0.9; }
.poster-text strong { font-size: 30px; line-height: 1.18; letter-spacing: -0.03em; background: linear-gradient(180deg, #fff6df, #e2b86b 70%, #b98a3e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(226, 184, 107, 0.35)); }
.poster-text em { font-style: normal; font-size: 12px; color: #cdbfdc; display: flex; justify-content: space-between; gap: 8px; }
.poster.small .poster-text { padding: 12px; gap: 3px; }
.poster.small .poster-text strong { font-size: 17px; }
.poster.small .poster-text small { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-size: 12px; color: #fff; font-weight: 600; white-space: nowrap; }
.price b { color: #ff8a8a; }

/* 섹션 */
.hub-sec { padding: 20px 20px 4px; }
.sec-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.sec-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 1px solid rgba(226, 184, 107, 0.6); }
.sec-head b { display: block; font-size: 15.5px; }
.sec-head small { font-size: 11.5px; color: var(--muted); }
.sec-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.row-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 6px; }
.row-scroll::-webkit-scrollbar { display: none; }
.mini-card { flex: 0 0 132px; text-decoration: none; color: var(--text); display: grid; gap: 4px; }
.mini-card img { width: 132px; height: 176px; object-fit: cover; object-position: 50% 22%; border-radius: 12px; background: #1d1526; }
.mini-card b { font-size: 13.5px; line-height: 1.35; }
.mini-card small { font-size: 11.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-empty { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.7; padding: 60px 20px 10px; }
.hub .biz { margin-top: 28px; padding: 0 20px; }

/* 검색 · 보관함 */
.search { display: flex; gap: 8px; align-items: center; margin: 10px 20px 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: 15px; min-width: 0; }
.results { display: grid; gap: 4px; }
.box-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 20px; text-decoration: none; color: var(--text); }
.box-row img { width: 56px; height: 74px; object-fit: cover; object-position: 50% 22%; border-radius: 9px; background: #1d1526; }
.box-row b { font-size: 15px; display: block; }
.box-row small { font-size: 12px; color: var(--muted); }
.box-row > span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.box-row > span.on { color: var(--accent); font-weight: 600; }

/* 하단 탭바 (떠 있는 유리 막대) */
.tabbar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; width: min(400px, calc(100% - 28px)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border-radius: 26px; background: rgba(46, 34, 58, 0.62); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5); }
.tabbar a { display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 20px; text-decoration: none; color: #b9aac8; font-size: 11px; font-weight: 600; transition: 0.2s; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a.on { color: #fff; background: rgba(255, 255, 255, 0.14); }
.tabbar a.on svg { fill: rgba(255, 255, 255, 0.92); stroke: #fff; }


/* ---------- 연출 강화 ---------- */
/* 소리 켜기/끄기 */
.sound-toggle { position: fixed; z-index: 40; top: max(10px, env(safe-area-inset-top)); right: max(10px, calc(50% - 210px)); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(28, 18, 36, 0.55); border: 1px solid rgba(226, 184, 107, 0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.sound-toggle svg { width: 19px; height: 19px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle svg path:first-child { fill: var(--accent-2); }
.sound-toggle:not(.off) .w { animation: waves 1.6s ease-in-out infinite; }
.sound-toggle.off { opacity: 0.7; }
@keyframes waves { 50% { opacity: 0.35; } }

/* 마법진 */
.sigil { position: absolute; pointer-events: none; z-index: 1; }
.sigil svg { width: 100%; height: 100%; overflow: visible; }
.sigil g { fill: none; stroke: rgba(243, 217, 164, 0.75); stroke-width: 0.6; transform-origin: 100px 100px; }
.sigil .sg-inner path { fill: rgba(243, 217, 164, 0.55); stroke: none; }
.sigil .sg-outer { animation: spinSlow 60s linear infinite; }
.sigil .sg-inner { animation: spinSlow 40s linear infinite reverse; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.intro-sigil { width: 118vw; max-width: 520px; aspect-ratio: 1; left: 50%; bottom: -22%; transform: translateX(-50%); opacity: 0; transition: opacity 2.4s ease; mix-blend-mode: screen; filter: drop-shadow(0 0 5px rgba(226, 184, 107, 0.5)); }
.intro:has(.intro-copy.on) .intro-sigil { opacity: 0.28; }
.intro-sigil .sg-inner path { fill: rgba(243, 217, 164, 0.3); }
.reading-sigil { width: 320px; aspect-ratio: 1; left: 50%; top: 61%; transform: translate(-50%, -50%); opacity: 0.4; mix-blend-mode: screen; animation: sigilPulse 3s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(226, 184, 107, 0.7)); }
@keyframes sigilPulse { 50% { opacity: 0.7; filter: drop-shadow(0 0 18px rgba(243, 201, 139, 0.95)); } }

/* 인트로 제목에 빛이 흐른다 */
.intro-copy h1 { background: linear-gradient(110deg, #d9ad62 0%, #fff6e2 20%, #d9ad62 40%, #d9ad62 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; animation: titleShine 4.5s ease-in-out infinite; }
@keyframes titleShine { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }

/* 주요 버튼이 숨 쉬듯 */
.sticky-cta .btn-primary, .intro-copy .btn-primary, #handover { animation: beat 2.6s ease-in-out infinite; }
@keyframes beat { 0%, 70%, 100% { transform: none; box-shadow: 0 6px 20px rgba(226, 184, 107, 0.25); } 78% { transform: scale(1.035); box-shadow: 0 8px 30px rgba(243, 201, 139, 0.6); } 86% { transform: scale(0.995); } }
.btn:active, .chip:active, .poster:active, .mini-card:active { transform: scale(0.96); transition: transform 0.08s; }

/* 카드 뽑기: 다 고르면 슬롯이 빛난다 */
.pslot.glow .pslot-card { animation: slotGlow 1.8s ease-out; }
@keyframes slotGlow { 0% { box-shadow: 0 0 0 0 rgba(243, 201, 139, 0.9); } 40% { box-shadow: 0 0 22px 6px rgba(243, 201, 139, 0.7); } 100% { box-shadow: 0 0 10px 0 rgba(243, 201, 139, 0.25); } }
.wcard.focus { animation: focusPulse 1.4s ease-in-out infinite; }
@keyframes focusPulse { 50% { box-shadow: 0 0 0 1px rgba(255, 236, 190, 1), 0 0 34px rgba(243, 201, 139, 0.95); } }

/* 카드 뒤집기: 뒤집힐 때 살짝 튀어 오른다 */
.flip.open { animation: flipHop 0.8s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes flipHop { 40% { transform: translateY(-10px) scale(1.06); } }

/* 웹툰 말풍선이 통통 튀며 나타난다 */
.wt-bubble.in { animation: bubblePop 0.55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bubblePop { from { transform: scale(0.6); opacity: 0; } }

/* 결과 항목: 머리 그림이 밝아지며 펼쳐진다 */
.rsec .rsec-head img { transition: filter 1.2s ease, transform 1.2s ease; filter: brightness(0.6) saturate(0.7); transform: scale(1.06); }
.rsec.in .rsec-head img { filter: none; transform: none; }

/* 편지: 접힌 종이가 펼쳐지듯 */
.letter .letter-paper { transform-origin: top center; }
.letter.in .letter-paper { animation: unfold 1.1s cubic-bezier(.2, .8, .2, 1); }
@keyframes unfold { from { transform: perspective(700px) rotateX(-70deg); opacity: 0; } }

/* 게이지 숫자가 반짝 */
.gauge-num b { display: inline-block; text-shadow: 0 0 18px rgba(243, 201, 139, 0.65); }
.in .gauge-num b { animation: numGlow 1.6s ease-out; }
@keyframes numGlow { 0% { transform: scale(0.7); } 70% { transform: scale(1.12); } 100% { transform: none; } }

/* 홈 포스터: 가운데 카드가 천천히 확대되고 제목에 빛이 흐른다 */
.poster.big.on img { animation: posterZoom 9s ease-in-out infinite alternate; }
@keyframes posterZoom { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1.5%); } }
.poster.big.on .poster-text strong { background: linear-gradient(110deg, #e2b86b 0%, #fffaf0 18%, #e2b86b 36%, #b98a3e 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; animation: titleShine 4s ease-in-out infinite; }
.poster.big::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 236, 190, 0.18); }
.poster.big.on::after { box-shadow: inset 0 0 0 1px rgba(255, 236, 190, 0.45), inset 0 0 40px rgba(226, 184, 107, 0.15); }

@media (prefers-reduced-motion: reduce) {
  .sigil g, .reading-sigil, .intro-copy h1, .sticky-cta .btn-primary, .intro-copy .btn-primary, #handover, .wcard.focus, .poster.big.on img, .poster.big.on .poster-text strong { animation: none !important; }
}

/* ---------- 결제 (토스 결제위젯) ---------- */
.toss-box { background: #fff; color: #191f28; padding: 6px 0; overflow: hidden; }
.toss-box #toss-methods:empty::before { content: "결제 수단을 불러오는 중…"; display: block; padding: 24px; text-align: center; font-size: 13px; color: #8b95a1; }

/* ---------- 약관 페이지 (site.js) ---------- */
.legal { padding-bottom: 40px; }
.legal-body { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(201, 164, 92, 0.25); border-radius: 16px; padding: 22px 20px; line-height: 1.75; font-size: 14px; color: var(--text); }
.legal-body h1 { font-size: 20px; margin-bottom: 14px; }
.legal-body h2 { font-size: 15px; margin: 20px 0 6px; color: var(--candle, #f3c98b); }
.legal-body ul { padding-left: 18px; margin: 6px 0; }
.legal-body li { margin: 4px 0; }
.legal-body a, .biz a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-date { margin-top: 22px; opacity: 0.7; font-size: 13px; }
.checkout .agree a { color: var(--accent); }
.checkout .biz { margin: 6px 0 90px; }
