:root {
  /* 분위기 A "몽환적인 밤하늘" (2026-12-01): 짙은 남색 → 라일락 → 복숭아빛 밤하늘, 반투명 유리 패널.
     예전 이름(--gold, --gold-2)은 그대로 두고 강조색을 라일락·복숭아로 바꿨다. */
  --bg: #14122e;
  --bg-2: #2b2460;
  --panel: rgba(255, 255, 255, 0.075);
  --line: rgba(201, 182, 255, 0.3);
  --text: #f4f0ff;
  --muted: #c6bce6;
  --gold: #c9b6ff;
  --gold-2: #ffd6e2;
  --rose: #ffaec4;
  --peach: #ffb8c8;
  --glow: rgba(255, 184, 200, 0.45);
  --grad: linear-gradient(100deg, #c9b6ff 0%, #e8b9e6 55%, #ffb8c8 100%);
  --paper: #f7f0e1;
  --ink: #2a2140;
  --major: #6b4bb8;
  --wands: #d5622f;
  --cups: #2f7fc4;
  --swords: #6a7d93;
  --pentacles: #3f9a5c;
  --radius: 16px;
  --card-w: 92px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(70% 45% at 85% 100%, rgba(255, 184, 200, 0.28), transparent 70%) fixed,
    radial-gradient(80% 50% at 10% 85%, rgba(201, 182, 255, 0.22), transparent 70%) fixed,
    linear-gradient(180deg, #14122e 0%, #1f1a48 38%, #342a6b 72%, #54408a 100%) fixed,
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
.sky {
  position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0.85;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 48%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 84%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 58% 30%, #ffe9a8 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 5% 55%, #e8dcff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 64% 74%, #ffd6e2 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 66%, #fff 50%, transparent 51%);
  animation: sky-twinkle 6s ease-in-out infinite alternate;
}
@keyframes sky-twinkle { from { opacity: 0.6; } to { opacity: 0.95; } }
@media (prefers-reduced-motion: reduce) { .sky { animation: none; } }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}
[hidden] { display: none !important; }

/* 오른쪽 위 언어 드롭다운 */
.topbar { display: flex; justify-content: flex-end; margin: -6px 0 4px; }
.lang { position: relative; z-index: 30; }
.topbar { gap: 8px; align-items: center; }
.sound-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  color: var(--muted); cursor: pointer;
}
.sound-btn svg { width: 19px; height: 19px; }
.sound-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.sound-btn.on { color: var(--gold); border-color: rgba(201, 182, 255, 0.45); }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 10px 6px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lang-btn:hover, .lang.open .lang-btn { background: rgba(255, 255, 255, 0.12); }
.lang .flag { display: inline-flex; width: 24px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); flex: none; }
.lang .flag svg { width: 100%; height: 100%; display: block; }
.lang .caret { color: var(--muted); font-size: 11px; transition: transform 0.15s ease; }
.lang.open .caret { transform: rotate(180deg); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px; margin: 0; padding: 6px; list-style: none;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.lang-list [role=option] {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px;
}
.lang-list [role=option]:hover, .lang-list [role=option]:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.lang-list .selected { color: var(--gold-2); font-weight: 600; }
.lang-list .check { margin-left: auto; color: var(--gold); }
h1, h2, h3 { font-family: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", "Noto Serif KR", serif; font-weight: 700; line-height: 1.3; }
.hero h1 { text-shadow: 0 0 22px rgba(201, 182, 255, 0.55); }
.eyebrow { margin: 0; color: var(--gold); letter-spacing: 0.24em; font-size: 12px; font-weight: 600; }
.loading, .error { text-align: center; color: var(--muted); padding: 48px 0; }
.error { color: var(--rose); }

/* 버튼 */
.btn {
  appearance: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 20px; font: inherit; font-weight: 600; color: var(--text);
  background: var(--panel); cursor: pointer; min-height: 46px;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.primary {
  border-color: transparent; color: #241b4a;
  background: var(--grad);
  box-shadow: 0 6px 24px rgba(255, 184, 200, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; margin-top: 8px; font-size: 17px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

/* 홈 */
.hero { text-align: center; padding: 28px 0 12px; }
.hero h1 { font-size: 34px; margin: 6px 0 8px; }
.lead { color: var(--muted); margin: 0; }
.group { display: block; border: 0; padding: 0; margin: 26px 0 0; min-width: 0; }
.group legend, .group .legend { display: block; font-weight: 700; margin-bottom: 10px; padding: 0; }
.legend small { color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 9px 16px; font: inherit; cursor: pointer; min-height: 42px;
}
.chip[aria-checked="true"] { background: var(--grad); color: #241b4a; border-color: transparent; font-weight: 700; box-shadow: 0 0 14px rgba(255, 184, 200, 0.35); }
.spreads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.spread-opt {
  text-align: left; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: var(--radius); padding: 14px; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.spread-opt[aria-checked="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(201, 182, 255, 0.1); }
.spread-name { font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.spread-name small { color: var(--gold); font-weight: 600; white-space: nowrap; flex: none; padding-top: 1px; }
.spread-desc { color: var(--muted); font-size: 13px; line-height: 1.45; margin-bottom: 6px; }
.spread-price { align-self: flex-start; margin-top: auto; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(201, 182, 255, 0.5); color: var(--gold-2); font-size: 11px; font-weight: 600; }
/* 화면 아래 약관·사업자 정보 */
.site-foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); line-height: 1.7; }
.site-foot a { color: var(--muted); }
.site-foot .biz { margin: 6px 0 0; word-break: keep-all; }
/* 약관·방침 문서 */
.doc { line-height: 1.75; }
.doc h1 { font-size: 24px; margin: 18px 0 14px; }
.doc h2 { font-size: 17px; margin: 28px 0 8px; color: var(--gold-2); }
.doc a { color: var(--gold); }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; min-width: 90px; }
.doc th { color: var(--gold); font-weight: 600; }
.spread-opt.soon { opacity: 0.62; cursor: default; }
.spread-price.soon { border-color: var(--line); color: var(--muted); }
.spread-soon { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.spread-price.free { border-color: rgba(120, 200, 150, 0.5); color: #9fe0b5; }
.question input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; outline: none;
}
.question input:focus { border-color: var(--gold); }
#btn-start { margin-top: 28px; }

/* 상단 바 */
.bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bar .btn { padding: 8px 12px; min-height: 40px; font-weight: 500; }
.bar-title { margin-left: auto; color: var(--gold); font-weight: 600; font-size: 14px; text-align: right; }
.guide { color: var(--muted); text-align: center; margin: 10px 0 14px; min-height: 1.6em; }

/* 고르기: 섞기 → 나누기 → 펼쳐서 고르기 */
.steps { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 4px 0 0; counter-reset: step; }
.steps li {
  counter-increment: step; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid transparent;
}
.steps li::before {
  content: counter(step); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); font-weight: 700;
}
.steps li + li { margin-left: 2px; }
.steps li.current { color: var(--text); border-color: var(--line); }
.steps li.current::before { background: var(--gold); color: #21183a; }
.steps li.done::before { content: "✓"; background: rgba(201, 182, 255, 0.3); color: var(--gold-2); }

/* 카드 뒷면 (덱·묶음·부채꼴·결과 카드 공통) */
.back, .card-back {
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, transparent 29%, rgba(255, 184, 200, 0.55) 30.5%, transparent 33%),
    radial-gradient(1px 1px at 22% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 82%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 70% 76%, #ffe9a8 50%, transparent 51%),
    repeating-linear-gradient(45deg, rgba(201, 182, 255, 0.1) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #4a3d92, #211a4a 70%);
  border: 1px solid rgba(201, 182, 255, 0.7);
  box-shadow: 0 3px 10px rgba(10, 6, 30, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* 테이블 건너편 타로술사 + 벨벳 테이블보: 카드는 허공이 아니라 테이블 위에 놓인다 */
.reader-figure { position: relative; width: min(100%, 340px); margin: -4px auto -104px; pointer-events: none; transition: width 0.3s ease; }
.reader-figure svg { display: block; width: 100%; height: auto; overflow: visible; }
/* 겹침 순서: 몸(뒤 층)은 테이블보 뒤, 팔·손·소품(앞 층)은 카드와 날아가는 카드(.flying)보다 위 */
.reader-figure .rd-back { position: relative; z-index: 0; }
.reader-figure .rd-front { position: absolute; left: 0; top: 0; z-index: 60; }
/* 손이 카드 쪽으로 뻗을 때 소매는 어깨를 기준으로 늘어나고 기운다 (readerReach) */
.rd-sleeve { transform-box: view-box; }
.rd-arm-l .rd-sleeve { transform-origin: 143px 118px; }
.rd-arm-r .rd-sleeve { transform-origin: 257px 118px; }
.rd-hand { transform-box: fill-box; transform-origin: 50% 60%; }
/* 가만히 있을 때도 손이 아주 조금 숨 쉬듯 움직인다 (두 손 박자를 다르게) */
.rd-hand-idle { transform-box: fill-box; transform-origin: 50% 80%; animation: rd-hand-idle 5.5s ease-in-out infinite; }
.rd-arm-r .rd-hand-idle { animation-duration: 6.7s; animation-delay: -2.1s; }
.rd-fingers { transform-box: fill-box; transform-origin: 50% 0%; }
@keyframes rd-hand-idle { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 35% { transform: translate(0.6px, -0.8px) rotate(-1.2deg); } 70% { transform: translate(-0.4px, 0.3px) rotate(0.8deg); } }
@media (prefers-reduced-motion: reduce) { .rd-hand-idle { animation: none; } }
[data-phase="pick"] .reader-figure, #screen-result .reader-figure { width: min(72%, 250px); margin-bottom: -66px; }
/* 결과 판은 테이블보를 덜 기울여 윗변이 높으므로 덜 겹쳐야 얼굴이 가려지지 않는다 */
#screen-result .reader-figure { margin-bottom: -40px; }
.rd-body { animation: rd-breathe 6s ease-in-out infinite; transform-origin: 50% 100%; }
.rd-flame { animation: rd-flicker 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.rd-flame-2 { animation-duration: 2.3s; animation-delay: -0.7s; }
@keyframes rd-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
@keyframes rd-flicker { 0%, 100% { transform: scale(1, 1); opacity: 1; } 30% { transform: scale(0.92, 1.08); } 60% { transform: scale(1.05, 0.94); opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .rd-body, .rd-flame { animation: none; } }

.cloth { position: relative; z-index: 1; isolation: isolate; margin: 0 -16px 10px; padding: 84px 16px 14px; } /* 위쪽은 타로술사의 허리가 테이블 뒤로 들어가는 자리 */
.cloth::before, .cloth::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  transform: perspective(760px) rotateX(24deg); transform-origin: 50% 100%;
}
/* 앞으로 갈수록 넓어지는 테이블 면 + 앞 모서리 두께 */
.cloth::before {
  inset: 0;
  border-radius: 22px 22px 8px 8px;
  background:
    radial-gradient(1px 1px at 18% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 62% 70%, #ffe9a8 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 78%, #fff 50%, transparent 51%),
    radial-gradient(85% 70% at 50% 42%, rgba(255, 184, 200, 0.16), transparent 62%),
    radial-gradient(120% 100% at 50% 30%, #3e3384 0%, #29215e 55%, #1a1540 100%);
  box-shadow: inset 0 0 50px rgba(8, 5, 25, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 0 -1px #120e2c, 0 22px 34px rgba(8, 5, 25, 0.6);
}
/* 금실 테두리 */
.cloth::after { inset: 9px 12px 8px; border: 1px solid rgba(201, 182, 255, 0.5); border-radius: 16px 16px 5px 5px; }
@media (min-width: 600px) { .cloth { margin-left: 0; margin-right: 0; } }

.table {
  position: relative; height: 220px; margin: 0; border-radius: 24px;
  display: grid; place-items: center;
}
.stack {
  --w: 100px; --h: 166px;
  position: relative; width: var(--w); height: var(--h); padding: 0; border: 0; background: none; cursor: pointer;
  transform: perspective(700px) rotateX(20deg); /* 테이블에 눕힌 각도 */
}
/* 테이블에 닿은 그림자 */
.stack::after, .pile-cards::after {
  content: ""; position: absolute; left: -6%; right: -14%; bottom: -12px; height: 22px; z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent); pointer-events: none;
}
.stack .half { position: absolute; inset: 0; }
.layer { position: absolute; inset: 0; transform: translate(calc(var(--l) * -1.2px), calc(var(--l) * -1.2px)); }
.stack .half.right .layer { transform: translate(calc(var(--l) * -1.2px + 0.6px), calc(var(--l) * -1.2px - 0.6px)); }
.stack:hover:not(:disabled) .half.left { transform: rotate(-1.5deg); }
.stack:hover:not(:disabled) .half.right { transform: rotate(1.5deg); }
.stack .half { transition: transform 0.2s ease; }
/* 세 뭉치 섞기: 뭉치 단위로 JS(shuffleMotion)가 움직인다 */
.riffle-layer { position: absolute; inset: 0; pointer-events: none; transform-origin: 50% 100%; }
.riffle-glow {
  position: absolute; inset: -30%; border-radius: 50%; pointer-events: none; z-index: 40; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 184, 200, 0.75), rgba(255, 184, 200, 0.15) 55%, transparent);
}
.shuffle-pile { position: absolute; inset: 0; will-change: transform; }
.riffle-card { position: absolute; inset: 0; will-change: transform; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.counter { text-align: center; color: var(--gold-2); min-height: 1.6em; margin: 0 0 6px; font-weight: 600; }
.text-btn {
  display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted);
  font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px;
}

/* 세 묶음 커트 */
.piles { display: block; }
.pile {
  --w: 84px; --h: 140px;
  position: absolute; left: 50%; top: 50%; width: var(--w); padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translate(-50%, -44%); transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.3s;
}
.piles.spread .pile { transform: translate(calc(-50% + var(--p) * 108px), -44%); }
.pile-cards { position: relative; width: var(--w); height: var(--h); display: block; }
.pile-label { font-size: 12px; }
.pile-cards { transform: perspective(600px) rotateX(20deg); transition: transform 0.2s ease; }
.piles.spread .pile:hover .pile-cards { transform: perspective(600px) rotateX(20deg) translateY(-6px); }
.pile.chosen .pile-cards { transform: perspective(600px) rotateX(20deg) translateY(-14px); filter: drop-shadow(0 0 12px rgba(255, 184, 200, 0.6)); }
.pile.chosen { z-index: 3; color: var(--gold-2); }
.piles.gathered .pile { transform: translate(-50%, -44%); }
.piles.gathered .pile:not(.chosen) { z-index: 1; }
.piles.gathered .pile-label { opacity: 0; }

/* 스프레드 자리 */
.slots { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; padding: 0; margin: 4px 0 10px; }
.slot-mini { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.slot-card {
  width: 34px; height: 56px; border-radius: 6px; border: 1px dashed var(--line);
  display: grid; place-items: center; font-size: 12px; color: var(--muted);
}
.slot-mini.filled .slot-card {
  border: 1px solid rgba(201, 182, 255, 0.55); color: transparent;
  background:
    repeating-linear-gradient(45deg, rgba(201, 182, 255, 0.12) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, #3a2a72, #1d1540);
  box-shadow: 0 0 10px rgba(255, 184, 200, 0.35);
}
.slot-name { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.25; word-break: keep-all; }
.slot-mini.filled .slot-name { color: var(--text); }
.slot-mini.filled { cursor: pointer; }
.slot-mini.filled:hover .slot-card, .slot-mini.filled:focus-visible .slot-card { outline: 2px solid var(--gold); outline-offset: 2px; }
.slot-mini.filled:focus-visible { outline: none; }

/* 부채꼴로 펼친 덱 (좌우로 밀어서 본다) */
.fan-wrap {
  overflow-x: auto; overflow-y: hidden; margin: 0 -16px; padding: 30px 16px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.fan-wrap::-webkit-scrollbar { display: none; }
.fan {
  --cw: 76px; --ch: 127px; --step: 27px;
  position: relative; height: calc(var(--ch) + 60px);
  transform: perspective(900px) rotateX(16deg); transform-origin: 50% 100%; /* 테이블 위에 펼친 각도 */
  width: calc(var(--step) * (var(--n) - 1) + var(--cw));
}
.fan-card {
  position: absolute; left: calc(var(--i) * var(--step)); top: 0; width: var(--cw); height: var(--ch);
  padding: 0; cursor: pointer; transform-origin: 50% 120%;
  /* 가운데가 높고 양끝이 내려가는 완만한 호 + 손으로 펼친 듯한 작은 흔들림(--j) */
  transform: translateY(calc(var(--t) * var(--t) * 46px + var(--jy) * 1px)) rotate(calc(var(--t) * 26deg + var(--j) * 1deg));
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.2s ease;
  opacity: 0;
  box-shadow: -2px 5px 9px rgba(0, 0, 0, 0.5);
}
.fan.dealt .fan-card { opacity: 1; transition: transform 0.25s ease, opacity 0.45s ease calc(var(--i) * 7ms), box-shadow 0.2s ease; }
.fan-card:not(:disabled):hover, .fan-card:focus-visible {
  transform: translateY(calc(var(--t) * var(--t) * 46px - 22px)) rotate(calc(var(--t) * 26deg + var(--j) * 1deg));
  box-shadow: 0 0 14px rgba(255, 184, 200, 0.55); z-index: 2;
}
.fan-card.taken { opacity: 0 !important; pointer-events: none; }
.fan.complete .fan-card:not(.taken) { opacity: 0.35; cursor: default; }
.flying { position: fixed; z-index: 50; pointer-events: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 184, 200, 0.5); }
.hint { text-align: center; color: var(--muted); font-size: 12px; margin: 0 0 96px; }

.sticky-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; gap: 10px; justify-content: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.sticky-actions .btn { flex: 1; max-width: 240px; }

/* 결과 보드 */
.board { display: grid; justify-content: center; gap: 14px 10px; margin: 8px 0 18px; }
.board-one { --card-w: 150px; grid-template-columns: var(--card-w); }
.board-row { --card-w: min(104px, 28vw); grid-template-columns: repeat(3, var(--card-w)); }
.board-year12 { --card-w: min(78px, 21vw); grid-template-columns: repeat(4, var(--card-w)); }
.board-celtic {
  --card-w: min(64px, 18vw);
  grid-template-columns: repeat(4, var(--card-w));
  grid-template-areas:
    ".  c3 .  s10"
    "c5 c1 c6 s9"
    ".  c4 .  s8"
    ".  .  .  s7";
  column-gap: 8px;
  position: relative;
}
.board-celtic .slot:nth-child(n+7) { margin-left: 10px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: var(--card-w); position: relative; }
.slot.cross { z-index: 2; }
.slot.cross .card { transform: rotate(90deg) translateX(-8%); }
.slot.cross { position: absolute; }
.slot.cross .slot-caption { display: none; }
.board-celtic .slot:first-child { position: relative; }
.cross-note { display: block; }
.slot-caption { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
.slot-caption b { color: var(--gold); }
.orient { display: block; color: var(--rose); min-height: 1.3em; opacity: 0; transition: opacity 0.3s; }
.card.flipped + .slot-caption .orient { opacity: 1; }

.card { width: var(--card-w); aspect-ratio: 3 / 5; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; }
.card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card.instant .card-inner { transition: none; }
.card-back, .card-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-back { border-radius: 9px; }
.card-front {
  transform: rotateY(180deg);
  border-radius: 9px; background: var(--paper); color: var(--ink);
  border: 3px solid var(--tone); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px color-mix(in srgb, var(--tone) 50%, transparent), 0 6px 18px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 8% 6%; text-align: center; overflow: hidden;
}
.card-front.is-reversed { transform: rotateY(180deg) rotate(180deg); }
/* 카드 그림: 앞면 전체를 덮는다 (역방향이면 앞면째 180° 돌아가 그림도 거꾸로) */
.card-front.has-art { padding: 0; border-width: 2px; background: #f3ead4; }
.card-front.has-art > :not(.face-art) { visibility: hidden; }
.face-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.slot-caption .card-name { display: block; color: var(--text); font-weight: 600; opacity: 0; transition: opacity 0.3s; }
.card.flipped + .slot-caption .card-name { opacity: 1; }
/* 리더 고르기 */
.reader-pick { border: 0; padding: 0; margin: 0 0 14px; }
.reader-pick legend { font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.reader-opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin-bottom: 8px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03);
}
.reader-opt.on { border-color: var(--gold); background: rgba(201, 182, 255, 0.1); box-shadow: 0 0 0 1px var(--gold) inset; }
.reader-opt input { position: absolute; opacity: 0; pointer-events: none; }
.reader-opt:has(input:focus-visible) { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.reader-mark {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", serif; font-weight: 700; font-size: 18px; color: #21183a;
}
.reader-mark.counselor { background: radial-gradient(circle at 30% 30%, #ffd9cf, #e9a3a3); }
.reader-mark.mystic { background: radial-gradient(circle at 30% 30%, #d9cfff, #8f7ae6); }
.reader-text { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.reader-text b { color: var(--text); font-size: 15px; }
.reader-text small { color: var(--gold); font-weight: 600; font-size: 12px; }
.ai-text .ai-h { margin: 18px 0 6px; font-size: 15px; color: var(--gold-2); font-family: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", serif; }
.ai-text .ai-h:first-child { margin-top: 4px; }
.ai-text p { margin: 0 0 10px; }

/* 카드 자세히 보기 */
.card-more { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.card-more summary { cursor: pointer; color: var(--gold); font-weight: 600; font-size: 14px; list-style: none; }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: " ▾"; font-size: 11px; }
.card-more[open] summary::after { content: " ▴"; }
.card-more .essence { font-weight: 600; color: var(--gold-2); margin: 10px 0; }
.more-row h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.more-row p { margin: 0; }
.more-row .imagery { margin: 0; padding-left: 18px; }
.more-row .imagery li { margin: 3px 0; }
.more-row .reflect { font-style: italic; }

/* 프리미엄 관심 테스트 */
.art-credit { color: var(--muted); font-size: 11px; text-align: center; opacity: 0.8; margin: 0 0 6px; }
.tone-major { --tone: var(--major); }
.tone-wands { --tone: var(--wands); }
.tone-cups { --tone: var(--cups); }
.tone-swords { --tone: var(--swords); }
.tone-pentacles { --tone: var(--pentacles); }
.face-label { font-family: Georgia, "Times New Roman", serif; font-weight: 700; color: var(--tone); font-size: calc(var(--card-w) * 0.15); line-height: 1; }
.face-symbol { width: 52%; color: var(--tone); display: block; }
.face-symbol svg { display: block; width: 100%; height: auto; fill: currentColor; stroke: currentColor; }
.face-title { font-weight: 800; font-size: calc(var(--card-w) * 0.13); line-height: 1.2; word-break: keep-all; }
.face-sub { font-size: calc(var(--card-w) * 0.075); color: #6d6487; line-height: 1.2; }
.board-celtic .face-sub, .board-year12 .face-sub { display: none; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }

/* 해석 */
.reading { margin-top: 26px; animation: rise 0.5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reading-head { text-align: center; margin-bottom: 18px; }
.reading-head h2 { font-size: 24px; margin: 6px 0 0; word-break: keep-all; }
.reading-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.reading-cards > li, .panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(10, 6, 30, 0.35);
  scroll-margin: 20px;
}
.pos { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; }
.pos b { color: var(--gold); }
.pos span { color: var(--muted); }
.reading-cards h3 { margin: 6px 0 8px; font-size: 19px; }
.reading-cards p:last-child { margin: 8px 0 0; }
.badge { font-family: inherit; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(201, 182, 255, 0.16); color: var(--gold-2); vertical-align: middle; }
.badge.rev { background: rgba(240, 143, 176, 0.16); color: var(--rose); }
.keywords { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.keywords li { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.panel { margin-top: 12px; }
.panel h3 { margin: 0 0 8px; font-size: 17px; color: var(--gold-2); }
.panel ul { margin: 0; padding-left: 18px; }
.panel li + li { margin-top: 6px; }
.panel .keywords { padding-left: 0; } /* 패널 안 키워드 칩: 목록 들여쓰기·줄 간격을 받지 않게 */
.panel .keywords li + li { margin-top: 0; }
.ai-panel { border-color: rgba(201, 182, 255, 0.45); background: linear-gradient(160deg, rgba(107, 75, 184, 0.18), rgba(255, 255, 255, 0.04)); }
.ai-status { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.ai-status:empty { display: none; }
.ai-text { white-space: pre-wrap; word-break: keep-all; line-height: 1.75; }
.ai-text:not(:empty) { margin-bottom: 12px; }
.ai-text.writing::after { content: "▍"; color: var(--gold); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ai-choice { display: flex; flex-direction: column; gap: 5px; }
.ai-choice .btn { width: 100%; }
.ai-choice small { color: var(--muted); font-size: 12px; text-align: center; }
.ai-usage {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed rgba(201, 182, 255, 0.45); background: rgba(0, 0, 0, 0.18); font-size: 13px;
}
.ai-usage h4 { margin: 0 0 8px; font-size: 13px; color: var(--gold-2); }
.ai-usage p { margin: 0; color: var(--muted); }
.ai-usage dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 8px; }
.ai-usage dt { color: var(--muted); }
.ai-usage dd { margin: 0; font-variant-numeric: tabular-nums; word-break: break-all; }
.ai-usage-note { font-size: 11px; }
.disclaimer { color: var(--muted); font-size: 12px; text-align: center; margin: 20px 0 6px; }

@media (min-width: 640px) {
  .spreads { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .board-row { --card-w: 130px; }
  .board-year12 { --card-w: 92px; grid-template-columns: repeat(6, var(--card-w)); }
  .board-celtic { --card-w: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* 풀이 미리 보기 (목차형) */
.ai-teaser { margin: 4px 0 14px; padding: 14px 16px; border-radius: 12px; border: 1px dashed rgba(201, 182, 255, 0.45); background: rgba(255, 255, 255, 0.03); }
.ai-teaser[hidden] { display: none; }
.teaser-title { margin: 0 0 8px; font-weight: 700; color: var(--gold-2); font-family: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", serif; }
.teaser-greeting { margin: 0 0 10px; font-style: italic; line-height: 1.7; }
.teaser-lead { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.teaser-sections { margin: 0; padding-left: 22px; line-height: 1.8; }
.ai-end { height: 1px; }

/* 마음 안전장치 · 행동으로 끝맺기 · 같은 질문 반복 완충 (이용자 심리 보고서 2~4순위) */
.safety { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(240, 143, 176, 0.5); background: rgba(240, 143, 176, 0.08); }
.safety h3 { color: var(--rose); }
.safety a { color: var(--gold-2); font-weight: 600; }
.safety-note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.closing { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.closing-lead { color: var(--muted); margin: 0 0 10px; }
.closing dl { margin: 0; }
.closing dt { font-size: 13px; color: var(--gold); margin-top: 10px; }
.closing dd { margin: 4px 0 0; }
.closing .reflect { font-style: italic; }
.closing-end { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.ai-disclosure { color: var(--muted); font-size: 12px; margin: -2px 0 10px; }
.repeat-dialog { max-width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: var(--text); }
.repeat-dialog::backdrop { background: rgba(8, 5, 18, 0.7); }
.repeat-dialog h2 { margin: 0 0 8px; font-size: 18px; color: var(--gold-2); }
.repeat-dialog p { margin: 0 0 16px; line-height: 1.6; }
.repeat-dialog .actions { display: flex; flex-direction: column; gap: 8px; }
.pay-dialog .pay-price { margin: 0 0 10px; font-size: 24px; font-weight: 800; color: var(--gold-2); }
.pay-dialog .pay-includes { margin: 0 0 12px; padding-left: 18px; line-height: 1.7; }
.pay-dialog .pay-note { font-size: 12px; color: var(--muted); }
.pay-dialog .pay-picked { margin: 0 0 10px; color: var(--gold-2); }
.pay-dialog .pay-age { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.pay-dialog .pay-age input { margin-top: 3px; accent-color: #c9b6ff; }
.pay-dialog .pay-capped { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 184, 200, 0.12); line-height: 1.6; }

/* 마음 한 줄 · 질문 다듬기 · 회고 · 기록 · 공유 질문 선택 (이용자 심리 보고서 5~9순위) */
.question .help, .history .help { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.question-hint { margin: -4px 0 14px; }
.hint-lead { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.hint-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hint-chip { text-align: left; }
.hint-chips + .hint-notice { margin-top: 10px; }
.hint-notice { margin: 0; font-size: 13px; color: var(--muted); padding: 8px 12px; border-left: 2px solid var(--gold); }
.revisit { margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.revisit h2 { margin: 0 0 6px; font-size: 16px; color: var(--gold-2); }
.revisit-about, .revisit-reply { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.revisit-reply { color: var(--text); margin: 0; }
.revisit-actions { display: flex; gap: 8px; margin-top: 10px; }
.history { margin-top: 22px; }
.history summary { cursor: pointer; color: var(--gold-2); }
.history ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.history-item { width: 100%; display: grid; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.history-meta, .history-cards, .history-mood { font-size: 12px; color: var(--muted); }
.reading-mood { margin: 6px 0 0; color: var(--muted); }
.reader-need { display: block; font-size: 12px; color: var(--gold); margin-bottom: 2px; }
.teaser-focus { margin: 0 0 6px; font-size: 14px; color: var(--gold-2); }
.share-q { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

/* 조금 더 이야기하기 (질문 나무) · 내 이야기 */
.story-price { margin: 4px 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
/* 이야기 나무: 고른 길만 자란다 */
.story-path { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; align-items: center; }
.story-path li { position: relative; }
.story-path li + li { margin-top: 18px; }
.story-path li + li::before { content: ""; position: absolute; left: 50%; top: -18px; width: 2px; height: 18px; margin-left: -1px; background: var(--gold); transform-origin: top; }
.story-path .path-ghost::before, .story-path .path-fruit:not(.filled)::before { background: none; border-left: 2px dashed rgba(201, 182, 255, 0.5); width: 0; }
.path-node { padding: 4px 14px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-2); background: rgba(201, 182, 255, 0.1); font-size: 13px; max-width: 260px; text-align: center; }
.path-node.root { font-size: 12px; color: var(--muted); border-color: var(--line); background: none; }
.path-ghost { margin-top: 12px !important; }
.path-ghost::before { top: -12px !important; height: 12px !important; }
.ghost-fork { display: block; width: 120px; height: 34px; overflow: visible; }
.ghost-fork path, .ghost-fork circle { fill: none; stroke: rgba(201, 182, 255, 0.5); stroke-width: 1.5; stroke-dasharray: 3 4; }
.path-fruit { padding: 6px 14px; border-radius: 8px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; max-width: 280px; text-align: center; transition: border-color .3s, background .3s, color .3s; }
.path-fruit.filled { border-style: solid; border-color: var(--rose); color: var(--text); background: rgba(240, 143, 176, 0.1); font-style: italic; }
.path-fruit.ripe { animation: ripe .7s ease-out; }
.story-path li.grow { animation: grow .45s ease-out both; }
.story-path li.grow::before { animation: stem .3s ease-out both; }
@keyframes grow { from { opacity: 0; transform: translateY(-6px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes stem { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ripe { 40% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(240, 143, 176, 0.18); } 100% { transform: none; box-shadow: none; } }
/* 결과: 카드 해설 안 "내 고민에 비추면" */
.card-body .card-text { margin: 8px 0 0; line-height: 1.7; }
.card-body.ai .card-text, .card-body.ai .card-ask { animation: rise .4s ease-out; }
.card-ask { margin: 12px 0 0; padding: 9px 12px; border-left: 3px solid var(--gold); background: rgba(201, 182, 255, 0.07); color: var(--gold-2); line-height: 1.6; }
.card-body .apply-note { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .story-path li.grow, .story-path li.grow::before, .path-fruit.ripe { animation: none; }
}
.story-q { font-size: 20px; margin: 0 0 16px; color: var(--gold-2); line-height: 1.4; }
.story-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.story-chip { text-align: left; }
.story-chip.unsure { color: var(--muted); border-style: dashed; }
.story-body .question input { width: 100%; }
.story-body .btn.wide { margin-top: 12px; }
.my-story { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(201, 182, 255, 0.06); }
.my-story-tags { margin: 0; color: var(--gold); font-size: 14px; }
.my-story-text { margin: 6px 0 0; font-style: italic; }
.my-story-link { margin: 10px 0 0; line-height: 1.6; }

/* 해설을 읽는 동안 뽑은 카드 줄 (화면 위에 붙음, 카드 68×114) */
.card-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; gap: 10px; justify-content: safe center; overflow-x: auto;
  padding: 8px 16px calc(8px); background: rgba(18, 13, 36, 0.94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); transform: translateY(-110%); transition: transform 0.25s ease; scrollbar-width: none;
}
.card-strip.on { transform: none; }
.card-strip::-webkit-scrollbar { display: none; }
.strip-card { position: relative; flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.strip-card.active { border-color: var(--gold); }
.strip-face { display: block; width: 68px; height: 114px; border-radius: 6px; overflow: hidden; background: var(--paper); }
.strip-face.tone-major { background: var(--major); }
.strip-face.tone-wands { background: var(--wands); }
.strip-face.tone-cups { background: var(--cups); }
.strip-face.tone-swords { background: var(--swords); }
.strip-face.tone-pentacles { background: var(--pentacles); }
.strip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-face.is-reversed img { transform: rotate(180deg); }
.strip-num { position: absolute; left: 4px; bottom: 4px; min-width: 18px; padding: 0 4px; border-radius: 5px; font-size: 12px; line-height: 18px; text-align: center; background: rgba(0, 0, 0, 0.65); color: #fff; }
@media (prefers-reduced-motion: reduce) { .card-strip { transition: none; } }
.reading-cards > li, .my-story { scroll-margin-top: 152px; } /* 위에 붙는 카드 줄(카드 114px) 아래로 */

/* 카드 전체의 흐름 */
.flow-path { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; }
.flow-path li { display: grid; gap: 1px; align-content: start; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.flow-path li + li { margin-top: 0; }
.flow-path small { font-size: 11px; color: var(--muted); }
.flow-path span { font-size: 14px; }
.flow-path .tone-light { border-color: rgba(201, 182, 255, 0.7); background: rgba(201, 182, 255, 0.1); }
.flow-path .tone-heavy { border-color: rgba(106, 125, 147, 0.8); background: rgba(106, 125, 147, 0.14); }
.flow-legend { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.flow-legend li { display: inline-flex; align-items: center; gap: 6px; }
.flow-legend i { width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--line); }
.flow-legend .tone-light i { border-color: rgba(201, 182, 255, 0.7); background: rgba(201, 182, 255, 0.1); }
.flow-legend .tone-heavy i { border-color: rgba(106, 125, 147, 0.8); background: rgba(106, 125, 147, 0.14); }
.flow-lines p { margin: 0 0 10px; line-height: 1.7; }
.flow-sum { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(201, 182, 255, 0.07); border: 1px solid var(--line); }
.flow-sum .flow-sum-title { margin: 0 0 6px; font-size: 12px; color: var(--gold); }
.flow-sum dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 8px; }
.flow-sum dt { color: var(--muted); font-size: 13px; }
.flow-sum dd { margin: 0; color: var(--gold-2); }
.flow-sum p { margin: 0; line-height: 1.65; }

/* 결과 맨 끝 AI 비용 (테스트 서버에서만) */
.cost-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 10px; font-size: 14px; }
.cost-panel dt { color: var(--muted); }
.cost-panel dd { margin: 0; overflow-wrap: anywhere; }
.cost-panel .cost-total { padding-top: 6px; border-top: 1px solid var(--line); color: var(--gold-2); font-weight: 600; }
.unpick-hint { margin: 2px 0 6px; text-align: center; font-size: 12px; color: var(--muted); }
/* 고르기 테이블은 길어서 같은 각도면 윗변이 너무 내려간다: 덜 기울이고 자리 줄을 테이블 위로 */
.cloth-pick { padding-top: 58px; }
.cloth-pick::before, .cloth-pick::after { transform: perspective(1600px) rotateX(12deg); }
/* 결과 판도 테이블 위에: 판 높이가 스프레드마다 달라 덜 기울인다 */
.cloth-board { padding: 80px 16px 18px; margin-bottom: 14px; }
.cloth-board::before, .cloth-board::after { transform: perspective(1600px) rotateX(10deg); }
.cloth-board .board { margin: 0; }

/* 산 리딩의 AI 풀이(맨 위)와 무료 결과의 이어 보기 제안 */
.ai-paid { border-color: rgba(255, 184, 200, 0.45); box-shadow: 0 8px 30px rgba(10, 6, 30, 0.35), 0 0 24px rgba(255, 184, 200, 0.18); }
.ai-reader-line { margin: 0 0 6px; color: var(--gold-2); font-weight: 700; }
.ai-block + .ai-block { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.ai-other { display: grid; gap: 6px; margin-top: 16px; }
.ai-other small { color: var(--muted); }
.upsell { border-color: rgba(201, 182, 255, 0.55); background: linear-gradient(180deg, rgba(201, 182, 255, 0.16), rgba(255, 184, 200, 0.08)); }
.upsell p { line-height: 1.65; }
.keep p { line-height: 1.65; }
.keep-status { color: var(--muted); }
.keep-link { width: 100%; font: inherit; font-size: 13px; color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin: 4px 0 10px; }
.keep-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.keep-actions .btn { flex: 1 1 140px; }
.keep-private { margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.keep-delete { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.keep-viewing { font-size: 13px; color: var(--muted); text-align: center; }
.history-kept { margin-left: 6px; padding: 0 6px; border-radius: 999px; border: 1px solid rgba(201, 182, 255, 0.5); font-size: 10px; color: var(--gold); }
.upsell-fresh { margin-top: 8px; }
.upsell-more { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.upsell-more-lead { margin: 0; font-size: 12px; color: var(--muted); }
.upsell-link {
  font: inherit; font-size: 13px; text-align: left; color: var(--gold-2); cursor: pointer; line-height: 1.5;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
.upsell-link:hover, .upsell-link:focus-visible { border-color: var(--gold); }
.upsell .upsell-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* 오늘의 카드 · 시즌 배너 · 홈 시작 버튼 */
.season { margin: 6px 0 4px; }
.season-btn {
  width: 100%; display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid rgba(255, 184, 200, 0.5); color: var(--text); font: inherit;
  background: linear-gradient(100deg, rgba(201, 182, 255, 0.22), rgba(255, 184, 200, 0.2));
}
.season-btn b { color: var(--gold-2); }
.season-btn span { font-size: 13px; color: var(--muted); }
.daily { margin-top: 12px; }
.daily-body { display: flex; gap: 14px; align-items: center; }
.daily-back { flex: none; width: 74px; height: 123px; padding: 0; cursor: pointer; animation: daily-glow 2.4s ease-in-out infinite; }
@keyframes daily-glow { 0%, 100% { box-shadow: 0 0 10px rgba(255, 184, 200, 0.25); } 50% { box-shadow: 0 0 22px rgba(255, 184, 200, 0.6); } }
@media (prefers-reduced-motion: reduce) { .daily-back { animation: none; } }
.daily-hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.daily-art { flex: none; width: 84px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(201, 182, 255, 0.7); animation: rise .5s ease-out; }
.daily-art.is-reversed { transform: rotate(180deg); }
.daily-body.open { align-items: flex-start; }
.daily-text { min-width: 0; }
.daily-name { margin: 0 0 6px; font-weight: 700; }
.daily-msg { margin: 8px 0 6px; line-height: 1.6; }
.daily-next { margin: 0; font-size: 12px; color: var(--muted); }
.daily-sub { font-size: 12px; font-weight: 500; color: var(--muted); }
.daily-ask { margin-top: 10px; padding: 8px 14px; font-size: 13px; }
.daily-ask-note { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.daily-pair .pair-cards { display: flex; justify-content: center; gap: 18px; margin: 4px 0 10px; }
.daily-pair figure { margin: 0; width: 84px; text-align: center; }
.daily-pair img { width: 84px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(201, 182, 255, 0.7); }
.daily-pair img.is-reversed { transform: rotate(180deg); }
.daily-pair figcaption { margin-top: 6px; font-size: 12px; line-height: 1.4; }
.daily-pair figcaption b { display: block; color: var(--gold); font-size: 11px; }
.daily-pair p { margin: 0; line-height: 1.65; }
.home-actions { margin-top: 14px; }
.home-actions .btn.wide { margin-top: 6px; }
