/* 운세 시리즈 서비스 사이트 공통 바탕 — 어쩌다 타로 style.css의 토큰·레이아웃·버튼·시트·패널 규격을 그대로 재사용(사이트별 :root 변수로 색만 바꾼다) */
:root {
  --bg: #0d1028;
  --bg-2: #171b40;
  --line: rgba(226, 185, 107, 0.3);
  --gold: #e2b96b;
  --gold-soft: #f3dca8;
  --gold-hot: #ffd98a;
  --text: #ecebf7;
  --muted: #a3a6c9;
  --paper: #f6efdf;
  --ink: #2b2219;
  --ink-soft: #6a5b47;
  --danger: #e2564b;
  --c: #5b3a9a; /* 고른 점성술사의 색 */
  --rw: 92px;   /* 리본 카드 너비 */
  --font-head: 'Gowun Batang', 'Noto Serif KR', serif;
  --font-body: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-roman: 'IM Fell English SC', 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  word-break: keep-all; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
a { color: var(--gold-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sky {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #ffe9b8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 38%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 77% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 71%, #ffe9b8 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 84%, #fff 50%, transparent 51%),
    radial-gradient(ellipse 90% 60% at 50% -10%, #2a2f6e 0%, transparent 70%),
    linear-gradient(180deg, #0d1028 0%, #12153a 60%, #0d1028 100%);
}
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* 상단 */
.topbar {
  width: 100%; max-width: 560px; margin-inline: auto; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(13,16,40,.97), rgba(13,16,40,.78) 70%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; color: var(--gold); font: 700 clamp(1.35rem, 5vw, 1.7rem)/1.2 var(--font-head); letter-spacing: .04em; }
.brand-moon { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset -6px -2px 0 0 var(--gold); transform: rotate(-20deg); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--gold-soft); cursor: pointer; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn[hidden] { display: none; }
.nav-back { flex: none; }
.top-action { margin-left: auto; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.04); color: var(--gold-soft); font-size: .82rem; cursor: pointer; }
:is(.icon-btn, .brand, .top-action, .cta, .ghost, .topic, .reader, .provider, .history-item, .danger, .text-danger):focus-visible { outline: 2px solid var(--gold-hot); outline-offset: 3px; }

main { width: 100%; max-width: 560px; margin: 0 auto; padding: 4px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.screen { display: none; }
.screen.is-active { display: block; animation: screenIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; text-wrap: balance; }
h2 { font-size: 1.45rem; line-height: 1.35; text-align: center; color: var(--gold-soft); }
.eyebrow { margin: 0 0 4px; text-align: center; color: var(--gold); font-size: .85rem; letter-spacing: .12em; }

/* 홈 배너 */
.hero { position: relative; overflow: hidden; aspect-ratio: 2 / 1; border-radius: 18px; border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(13,16,40,.9), 0 0 0 4px var(--line), 0 12px 30px rgba(0,0,0,.4); margin: 4px 0 20px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-copy { position: absolute; inset: 0 0 auto; padding: 7% 12% 18%; text-align: center; background: linear-gradient(180deg, rgba(8,10,30,.72), rgba(8,10,30,.35) 65%, transparent); }
.hero .eyebrow { color: var(--gold-hot); font-size: .78rem; }
.hero h1 { font-size: clamp(1.05rem, 4.7vw, 1.5rem); line-height: 1.4; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); }

/* 주제 버튼: 실제 카드 그림을 부채꼴로 */
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.topic {
  position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer; padding: 0;
  border: 2px solid var(--gold); border-radius: 16px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(13,16,40,.9), 0 0 0 4px var(--line), 0 10px 24px rgba(0,0,0,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.topic:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px rgba(13,16,40,.9), 0 0 0 4px var(--gold), 0 0 26px rgba(226,185,107,.35); }
.topic:active { transform: scale(.97); }
.topic.wide { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.topic-art {
  position: relative; height: 150px; display: block; overflow: hidden;
  background:
    radial-gradient(circle at 50% 70%, rgba(255,217,138,.28), transparent 60%),
    radial-gradient(1px 1px at 20% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 80% 30%, #ffe9b8 50%, transparent 51%), radial-gradient(1px 1px at 65% 12%, #fff 50%, transparent 51%),
    linear-gradient(170deg, #3a1f5c, #161437);
}
.topic.wide .topic-art { height: auto; min-height: 140px; width: 46%; flex: none; }
.topic-art img { position: absolute; left: 50%; bottom: -12%; width: 46%; aspect-ratio: 480 / 752; object-fit: cover; border-radius: 6px; box-shadow: 0 6px 14px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.4); transform-origin: 50% 120%; transition: transform .35s cubic-bezier(.2,1.3,.4,1); }
.topic-art.one img { width: 50%; transform: translateX(-50%) rotate(-3deg); bottom: -16%; }
.topic-art.three img:nth-child(1) { transform: translateX(-50%) rotate(-16deg); }
.topic-art.three img:nth-child(2) { transform: translateX(-50%) rotate(0deg); z-index: 1; bottom: -8%; }
.topic-art.three img:nth-child(3) { transform: translateX(-50%) rotate(16deg); }
.topic:hover .topic-art.three img:nth-child(1) { transform: translateX(-50%) rotate(-22deg); }
.topic:hover .topic-art.three img:nth-child(3) { transform: translateX(-50%) rotate(22deg); }
.topic:hover .topic-art.one img { transform: translateX(-50%) rotate(0deg) translateY(-6px); }
.topic-body { padding: 12px 14px 14px; }
.topic.wide .topic-body { align-self: center; }
.topic-body strong { display: block; font: 700 1.12rem/1.3 var(--font-head); color: #fff; }
.topic-body span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.topic-body small { display: inline-block; margin-top: 8px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--gold); font-size: .76rem; }
.site-foot { margin-top: 26px; text-align: center; color: var(--muted); font-size: .8rem; }
.site-foot p { margin: 4px 0 0; opacity: .8; }

/* 점성술사 */
.reader-list { display: grid; gap: 14px; margin-top: 18px; }
.reader {
  display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; text-align: left; cursor: pointer;
  padding: 10px; border-radius: 18px; border: 2px solid color-mix(in srgb, var(--rc) 60%, var(--gold));
  background: linear-gradient(110deg, color-mix(in srgb, var(--rc) 45%, #0d1028), #141838 70%); transition: transform .25s, box-shadow .25s;
}
.reader:hover { transform: translateY(-2px); box-shadow: 0 0 24px color-mix(in srgb, var(--rc) 60%, transparent); }
.reader img { width: 112px; height: 140px; object-fit: cover; object-position: 50% 12%; border-radius: 12px; }
.reader b { display: block; font: 700 1.2rem/1.3 var(--font-head); color: #fff; }
.reader .tag { display: inline-block; margin: 4px 0 6px; padding: 1px 8px; border-radius: 99px; background: rgba(0,0,0,.28); color: var(--gold-soft); font-size: .78rem; }
.reader q { display: block; color: var(--text); font-size: .92rem; line-height: 1.5; quotes: '“' '”'; }

/* 질문 */
.consult { display: flex; gap: 12px; align-items: flex-end; margin: 6px 0 22px; }
.consult-face { width: 76px; height: 76px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 70%, transparent); }
.bubble { position: relative; padding: 12px 16px; border-radius: 18px 18px 18px 4px; background: var(--paper); color: var(--ink); font-size: .98rem; line-height: 1.55; box-shadow: 3px 3px 0 color-mix(in srgb, var(--c) 80%, #000); }
.field { display: block; }
.field-label { display: block; margin-bottom: 6px; color: var(--gold-soft); font-size: .9rem; }
.field-label em { color: var(--muted); font-style: normal; }
.textarea-wrap { position: relative; display: block; }
textarea { width: 100%; resize: none; padding: 12px 14px 28px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); font: inherit; line-height: 1.5; }
textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,185,107,.18); }
textarea::placeholder { color: #7d80a6; }
.count { position: absolute; right: 12px; bottom: 8px; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.hint { margin: 8px 0 16px; color: var(--muted); font-size: .85rem; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 10px; color: var(--muted); font-size: .9rem; }
.price-row strong { color: var(--gold-hot); font: 700 1.25rem var(--font-head); font-variant-numeric: tabular-nums; }
.fine { margin: 10px 0 0; color: var(--muted); font-size: .78rem; text-align: center; line-height: 1.5; }

.cta { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; cursor: pointer; border: 0; border-radius: 99px; padding: 0 20px; background: linear-gradient(180deg, #f6d48c, #d39f43); color: #2b1a05; font: 700 1.08rem/1 var(--font-head); box-shadow: 0 6px 20px rgba(226,185,107,.35), inset 0 1px 0 rgba(255,255,255,.6); position: relative; overflow: hidden; }
.cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); animation: sweep 2.8s 1s infinite; }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .5; cursor: default; }
.cta:disabled::after { display: none; }
.cta[hidden] { display: none; }
.ghost { display: block; width: 100%; min-height: 48px; margin-top: 10px; cursor: pointer; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.04); color: var(--gold-soft); font-size: .95rem; }
.ghost[hidden] { display: none; }
.danger { min-height: 48px; border: 0; border-radius: 99px; background: var(--danger); color: #fff; font-weight: 700; cursor: pointer; }
.text-danger { display: block; margin: 18px auto 0; border: 0; background: none; color: #ff9a92; font-size: .85rem; cursor: pointer; text-decoration: underline; }
@keyframes sweep { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }

/* 결제 */
.pay-summary { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; margin: 16px 0 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.pay-summary img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.pay-summary b { display: block; font-family: var(--font-head); }
.pay-summary span { color: var(--muted); font-size: .85rem; }
.pay-summary strong { color: var(--gold-hot); font: 700 1.15rem var(--font-head); }
.test-badge { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255,217,138,.12); color: var(--gold-soft); font-size: .8rem; text-align: center; }
#payment-method, #payment-agreement { border-radius: 14px; overflow: hidden; background: #fff; margin-bottom: 10px; }
#payment-method:empty, #payment-agreement:empty { display: none; }
.error { margin: 8px 0; color: #ff9a92; font-size: .88rem; text-align: center; }
.error[hidden] { display: none; }

/* 카드 공통 */
.tcard { position: relative; width: var(--cw, 90px); aspect-ratio: 480 / 752; perspective: 900px; }
.tcard .inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3,1.4,.5,1); }
.tcard.open .inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 6% / 4%; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.back { background: #1a1d4d url(img/cards/back.webp) center / cover; box-shadow: 0 4px 12px rgba(0,0,0,.5), 0 0 0 1px rgba(226,185,107,.5); }
.front { transform: rotateY(180deg); background: var(--paper); box-shadow: 0 4px 14px rgba(0,0,0,.5); color: var(--ink); }
.front-in { position: absolute; inset: 0; transition: transform .6s .2s cubic-bezier(.3,1.3,.5,1); }
.tcard.reversed.open .front-in { transform: rotate(180deg); }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.front .num { position: absolute; top: 2.5%; left: 50%; transform: translateX(-50%); width: 20%; height: 5.2%; display: grid; place-items: center; font: 400 calc(var(--cw, 90px) * .085)/1 var(--font-roman); color: var(--ink); }
.front .name { position: absolute; left: 4%; right: 4%; bottom: 2.6%; height: 9%; display: grid; place-items: center; font: 700 calc(var(--cw, 90px) * .095)/1 var(--font-head); color: var(--ink); letter-spacing: .06em; white-space: nowrap; }
.front::after { content: ''; position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%); transform: translateX(-130%); pointer-events: none; }
.tcard.shine .front::after { animation: shine 1.2s .55s ease-out both; }
@keyframes shine { to { transform: translateX(130%); } }

/* 카드 고르기 */
.pick-title { font-size: 1.3rem; }
.pick-sub { margin: 4px 0 12px; text-align: center; color: var(--muted); font-size: .9rem; }
.slots { display: flex; justify-content: center; gap: 12px; min-height: 138px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.slot-box { width: 72px; aspect-ratio: 480 / 752; border-radius: 8px; border: 1.5px dashed rgba(226,185,107,.55); display: grid; place-items: center; color: rgba(226,185,107,.6); font: 700 1.2rem var(--font-head); transition: border-color .3s, box-shadow .3s; }
.slot.next .slot-box { border-color: var(--gold-hot); box-shadow: 0 0 18px rgba(255,217,138,.45); animation: slotPulse 1.4s ease-in-out infinite; }
.slot .tcard { --cw: 72px; animation: landed .5s cubic-bezier(.3,1.6,.5,1) both; }
.slot .tcard .back { animation: glow 2.4s ease-in-out infinite; }
.slot-label { color: var(--gold-soft); font-size: .78rem; }
@keyframes slotPulse { 50% { box-shadow: 0 0 4px rgba(255,217,138,.2); } }
@keyframes landed { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes glow { 50% { box-shadow: 0 0 22px rgba(255,217,138,.8), 0 0 0 1px rgba(255,217,138,.9); } }

.table { position: relative; margin: 6px -16px 0; }
.shuffle-stack { position: absolute; left: 50%; top: 40px; width: var(--rw); aspect-ratio: 480 / 752; margin-left: calc(var(--rw) / -2); z-index: 3; pointer-events: none; transition: opacity .35s, transform .35s; }
.shuffle-stack .tcard { position: absolute; inset: 0; --cw: var(--rw); }
.shuffle-stack .tcard:nth-child(odd) { --dir: -1; } .shuffle-stack .tcard:nth-child(even) { --dir: 1; }
.shuffle-stack.on .tcard { animation: riffle .46s ease-in-out calc(var(--i) * 18ms) 3 alternate; }
.shuffle-stack.out { opacity: 0; transform: scale(.6); }
@keyframes riffle { 50% { transform: translate(calc(var(--dir) * 74px), -14px) rotate(calc(var(--dir) * 12deg)); } }

.ribbon {
  display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 44px calc(50% - var(--rw) / 2) 34px; min-height: 250px; outline: none; visibility: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.ribbon.dealt { visibility: visible; }
.ribbon::-webkit-scrollbar { display: none; }
.rcard { flex: none; width: var(--rw); scroll-snap-align: center; border: 0; padding: 0; background: none; cursor: pointer; transition: width .35s ease, margin .35s ease, opacity .3s; }
.ribbon.dealt .rcard { animation: dealIn .55s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i) * 32ms); }
@keyframes dealIn { from { opacity: 0; transform: translateY(-90px) scale(.4); } }
.rcard .tcard { --cw: var(--rw); transform: translateY(var(--y, 0px)) rotate(var(--r, 0deg)) scale(var(--s, 1)); transform-origin: 50% 80%; transition: transform .12s linear, filter .2s; filter: brightness(var(--b, .75)); }
.rcard.center .tcard { filter: brightness(1.05) drop-shadow(0 0 14px rgba(255,217,138,.9)); }
.rcard.center .tcard .back { box-shadow: 0 0 0 2px var(--gold-hot), 0 10px 26px rgba(0,0,0,.6); }
.rcard.gone { width: 0; margin-right: -10px; opacity: 0; pointer-events: none; }
.ribbon:focus-visible .rcard.center .tcard .back { box-shadow: 0 0 0 3px #fff; }
.deck-hint { margin: -10px 16px 0; text-align: center; color: var(--gold-soft); font-size: .88rem; min-height: 1.6em; }
.pick-btn { width: auto; min-width: 220px; margin: 12px auto 0; }

.flyer { position: fixed; z-index: 65; pointer-events: none; margin: 0 !important; filter: drop-shadow(0 0 16px rgba(255,217,138,.95)); }

/* 결과 */
.result-q { margin: 6px auto 0; max-width: 32ch; text-align: center; color: var(--text); font-size: .95rem; }
.result-q[hidden] { display: none; }
.reveal-row { display: flex; justify-content: center; align-items: flex-start; gap: 12px; margin: 22px 0 6px; flex-wrap: wrap; }
.reveal-row .slot { gap: 8px; }
.reveal-row .tcard { --cw: clamp(96px, 28vw, 130px); cursor: pointer; }
.reveal-row.single .tcard { --cw: clamp(150px, 46vw, 200px); }
.reveal-row .tcard:not(.open) { animation: floaty 2.6s ease-in-out infinite; }
.reveal-row .tcard:not(.open) .back { animation: glow 2.4s ease-in-out infinite; }
.reveal-row .tcard:not(.open)::after { content: '터치'; position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); padding: 1px 8px; border-radius: 99px; background: rgba(13,16,40,.8); color: var(--gold-hot); font-size: .72rem; letter-spacing: .2em; z-index: 2; }
.reveal-row .slot-label { font-size: .85rem; }
.rev-badge { display: none; padding: 1px 8px; border-radius: 99px; background: rgba(146,54,65,.85); color: #fff; font-size: .72rem; }
.slot.is-reversed.opened .rev-badge { display: inline-block; animation: landed .4s both; }
@keyframes floaty { 50% { transform: translateY(-6px); } }

/* 공개 연출 */
.spotlight { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(40,26,70,.82), rgba(5,6,20,.95) 70%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.spotlight[hidden] { display: none; }
.spotlight.in { animation: fadeIn .3s both; }
.rays { position: absolute; left: 50%; top: 40%; width: 160vmax; aspect-ratio: 1; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(255,217,138,.16) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0 10%, transparent 45%); mask: radial-gradient(circle, #000 0 10%, transparent 45%); opacity: 0; transition: opacity .6s; }
.spotlight.lit .rays { opacity: 1; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.spot-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(92vw, 360px); padding: 16px; }
.tcard.big { --cw: min(54vw, 220px); }
.spotlight .tcard.big { animation: rise .55s cubic-bezier(.2,1.3,.4,1) both; }
.spotlight.lit .tcard.big .front { box-shadow: 0 0 46px rgba(255,217,138,.75); }
@keyframes rise { from { transform: translateY(40vh) scale(.4) rotate(-12deg); opacity: 0; } }
.spot-text { text-align: center; min-height: 92px; opacity: 0; transform: translateY(8px); transition: opacity .5s .3s, transform .5s .3s; }
.spotlight.lit .spot-text { opacity: 1; transform: none; }
.spot-pos { margin: 0; color: var(--gold); font-size: .85rem; letter-spacing: .14em; }
.spot-name { font-size: 1.7rem; color: #fff; text-shadow: 0 0 18px rgba(255,217,138,.8); }
.spot-name .en { display: block; font: 400 .95rem var(--font-roman); color: var(--gold-soft); letter-spacing: .08em; }
.spot-name .rev { margin-left: 6px; font-size: .9rem; color: #ffb3bd; }
.spot-kw { margin: 4px 0 0; color: var(--gold-soft); font-size: .92rem; }
.spot-stage .cta { opacity: 0; pointer-events: none; transition: opacity .4s .6s; max-width: 280px; }
.spotlight.lit .spot-stage .cta { opacity: 1; pointer-events: auto; }
.spotlight.flash::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(255,240,200,.95), transparent 55%); animation: flash .7s ease-out both; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, 0); } }

/* 풀이 (웹툰 칸) */
.reading { display: grid; gap: 16px; margin-top: 26px; }
.reading[hidden], .end-actions[hidden] { display: none; }
.panel { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 16px 14px; border-radius: 6px; background: var(--paper); color: var(--ink); border: 3px solid #1d1530; box-shadow: 5px 5px 0 color-mix(in srgb, var(--c) 85%, #000); animation: panelIn .6s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--d, 0) * 180ms); }
.panel:nth-child(even) { transform: rotate(.6deg); }
.panel:nth-child(odd) { transform: rotate(-.5deg); }
@keyframes panelIn { from { opacity: 0; translate: 0 26px; scale: .96; } }
.panel .mini { --cw: 70px; }
.panel h4 { margin: 0 0 2px; font: 700 1.02rem/1.35 var(--font-head); }
.panel h4 small { margin-left: 4px; color: var(--ink-soft); font: 400 .78rem var(--font-body); }
.panel .say { margin: 6px 0 0; font-size: .95rem; line-height: 1.62; }
.panel .kw { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.panel .kw span { padding: 0 7px; border-radius: 99px; background: rgba(0,0,0,.07); font-size: .74rem; color: var(--ink-soft); }
.panel.summary img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
.answer { display: inline-block; margin: 2px 0 4px; padding: 2px 12px; border-radius: 99px; background: var(--c); color: #fff; font: 700 1.05rem/1.6 var(--font-head); }
.dots { display: inline-block; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.end-actions { margin-top: 22px; }

/* 내 기록 */
.history-list, #pending-list { display: grid; gap: 10px; margin-top: 16px; }
.history-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
.history-item .thumbs { display: flex; }
.history-item .thumbs img { width: 34px; aspect-ratio: 480 / 752; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.history-item .thumbs img + img { margin-left: -14px; }
.history-item b { display: block; font-family: var(--font-head); }
.history-item span { display: block; color: var(--muted); font-size: .82rem; }
.history-item.pending { border-color: var(--gold); background: rgba(255,217,138,.08); }
.empty { margin: 30px 0; text-align: center; color: var(--muted); }
.account-box { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.account-box p { margin: 0 0 6px; color: var(--muted); font-size: .85rem; }

/* 로그인·팝업 */
.sheet-dim { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.6); }
.sheet-dim[hidden] { display: none; }
.sheet { position: relative; width: 100%; max-width: 480px; padding: 26px max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); border-radius: 22px 22px 0 0; background: #151842; border-top: 1px solid var(--line); animation: sheetUp .35s cubic-bezier(.2,1,.3,1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet h3 { text-align: center; color: var(--gold-soft); font-size: 1.25rem; }
.sheet-sub { margin: 6px 0 18px; text-align: center; color: var(--muted); font-size: .88rem; }
.sheet-close { position: absolute; right: 10px; top: 10px; }
.login-buttons { display: grid; gap: 10px; }
.provider { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100%, 320px); margin-inline: auto; min-height: 46px; border: 0; border-radius: 6px; font-weight: 700; font-size: .98rem; cursor: pointer; }
.provider img { width: 20px; height: 20px; object-fit: contain; }
.provider:disabled { opacity: .45; cursor: default; }
.provider-apple { background: #000; color: #fff; }
.provider-naver { background: #03a94d; color: #fff; }
.provider-kakao { background: #fee500; color: rgba(0,0,0,.85); }
.provider-google { background: #fff; border: 1px solid #747775; color: #1f1f1f; }
#confirm { align-items: center; padding: 16px; }
.dialog { width: 100%; max-width: 360px; padding: 22px 20px 18px; border-radius: 20px; background: #151842; border: 1px solid var(--line); }
.dialog h3 { color: #fff; font-size: 1.15rem; }
.dialog p { color: var(--muted); font-size: .92rem; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions .ghost { margin: 0; }

.toast { position: fixed; left: 50%; top: 50%; z-index: 90; transform: translate(-50%, -50%); max-width: min(86vw, 340px); padding: 12px 18px; border-radius: 12px; background: rgba(17,17,17,.92); color: #fff; font-size: .9rem; text-align: center; }
.toast[hidden] { display: none; }

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

/* 운세 시리즈 이전: 무료 미리보기 뒤 상세 풀이 안내(결제 유도) */
.paywall { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; margin-top: 18px; padding: 18px 16px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(226,185,107,.12), rgba(255,255,255,.03)); }
.paywall[hidden] { display: none; }
.paywall > img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
.paywall .cta, .paywall .fine { grid-column: 1 / -1; }
.paywall-say { margin: 0 0 8px; color: var(--gold-soft); font-family: var(--font-head); }
.paywall-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: .88rem; }
.panel:not(:has(.tcard)) { grid-template-columns: 1fr; }
.say.closing { margin-top: 8px; font-style: italic; color: var(--ink-soft); }
.series { --series-accent: var(--gold); --series-line: var(--line); --series-ink: var(--text); }
