:root {
    color-scheme: dark;
    --color-night: #15182b;
    --color-indigo: #252a4a;
    --color-indigo-soft: #303655;
    --color-paper: #f1eadb;
    --color-paper-dark: #d8ccb7;
    --color-gold: #b79a63;
    --color-gold-muted: #857252;
    --color-ink: #24232b;
    --color-danger: #a85d5d;
    --color-muted: #a8a6b6;
    --line: rgba(183, 154, 99, .34);
    --shadow: 0 26px 70px rgba(4, 6, 18, .32);
    --radius: 22px;
    --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--color-night); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100svh;
    color: var(--color-paper);
    background:
        radial-gradient(circle at 14% 16%, rgba(106, 82, 151, .34), transparent 34rem),
        radial-gradient(circle at 88% 46%, rgba(31, 101, 126, .22), transparent 38rem),
        radial-gradient(circle at 52% 96%, rgba(100, 64, 112, .18), transparent 32rem),
        linear-gradient(155deg, #1d2038 0%, #16192f 48%, #111a2b 100%);
    font: 16px/1.75 var(--font-sans);
    overflow-x: clip;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0; opacity: .42;
    background-image:
        radial-gradient(circle, rgba(225, 204, 154, .42) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(163, 180, 219, .28) 0 1px, transparent 1.3px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
    background-position: 0 0, 17px 29px, 0 0;
    background-size: 47px 47px, 79px 79px, 80px 80px;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25));
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25));
}
body::after {
    content: ""; position: fixed; z-index: 0; inset: auto -18vw -22vh auto; width: 72vw; height: 60vh;
    pointer-events: none; border-radius: 50%; opacity: .26; filter: blur(70px);
    background: conic-gradient(from 210deg, rgba(97,66,139,.75), rgba(32,98,121,.55), rgba(183,154,99,.12), rgba(97,66,139,.75));
}
a { color: inherit; text-underline-offset: .24em; text-decoration-color: rgba(183, 154, 99, .64); }
a:hover { color: #fff7e8; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid #d7bd87;
    outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.skip-link {
    position: fixed; top: 8px; left: 8px; z-index: 1000; padding: .65rem 1rem;
    background: var(--color-paper); color: var(--color-ink); transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.site-header {
    position: relative; z-index: 20; width: min(1120px, 100%); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: max(14px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 12px;
}
.site-header nav { display: flex; gap: clamp(.8rem, 3vw, 1.5rem); font-size: .84rem; color: var(--color-paper-dark); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--font-serif); letter-spacing: .12em; }
.brand--small { min-height: 44px; }
.brand-mark {
    position: relative; display: inline-block; width: 24px; height: 24px; border: 1px solid var(--color-gold); border-radius: 50%;
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: var(--color-gold); opacity: .72; }
.brand-mark::before { width: 1px; height: 30px; top: -4px; left: 11px; }
.brand-mark::after { width: 30px; height: 1px; top: 11px; left: -4px; }
main { position: relative; z-index: 1; }
.site-footer {
    position: relative; z-index: 1; width: min(860px, calc(100% - 32px)); margin: 2rem auto 0;
    padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    color: var(--color-muted); font-size: .78rem; text-align: center;
}
.site-footer p { max-width: 720px; margin: 0 auto 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem 1.2rem; }

.journey { width: 100%; }
.journey-step {
    width: min(720px, calc(100% - 28px)); margin: 0 auto;
    min-height: calc(100svh - 78px); min-height: calc(100dvh - 78px);
    padding: clamp(34px, 7vw, 72px) 0 calc(48px + env(safe-area-inset-bottom));
}
.journey-step[hidden] { display: none; }
.hero {
    width: min(1080px, calc(100% - 28px)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(230px, .85fr);
    gap: clamp(2rem, 7vw, 6rem); align-items: center;
}
.hero-copy { max-width: 590px; }
.eyebrow { margin: 0 0 .8rem; color: var(--color-gold); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.28; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3rem, 10vw, 6.4rem); letter-spacing: .08em; }
h2 { font-size: clamp(1.8rem, 6vw, 3rem); }
.hero-lede { max-width: 36rem; margin: 1.6rem 0 0; color: var(--color-paper-dark); font-size: clamp(1rem, 2.7vw, 1.14rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    padding: .72rem 1.35rem; border: 1px solid transparent; border-radius: 999px;
    font-weight: 650; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.button--primary { color: #181725; background: linear-gradient(120deg, #cbb17c, var(--color-gold)); box-shadow: 0 8px 28px rgba(183, 154, 99, .18); }
.button--ghost { color: var(--color-paper); background: rgba(37, 42, 74, .66); border-color: var(--line); }
.button--text { color: var(--color-paper-dark); background: transparent; }
.button--danger { color: #fff; background: var(--color-danger); }
.danger { color: #d89191; }
.quiet-links { display: flex; gap: 1rem; margin-top: 1.15rem; color: var(--color-muted); font-size: .8rem; }
.hero-card-stage { position: relative; display: grid; place-items: center; min-height: 520px; perspective: 900px; }
.hero-card-back {
    width: min(300px, 72vw); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px;
    filter: saturate(.82) contrast(1.04); box-shadow: var(--shadow); animation: cardFloat 7s ease-in-out infinite;
}
.card-shadow { position: absolute; width: 54%; height: 28px; bottom: 6%; background: rgba(0,0,0,.45); filter: blur(16px); border-radius: 50%; animation: shadowFloat 7s ease-in-out infinite; }
.disclaimer-compact { grid-column: 1 / -1; margin: -1rem 0 0; text-align: center; color: var(--color-muted); font-size: .76rem; }
@keyframes cardFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes shadowFloat { 0%, 100% { opacity: .44; transform: scale(1); } 50% { opacity: .28; transform: scale(.88); } }

.panel { padding-left: clamp(0px, 3vw, 24px); padding-right: clamp(0px, 3vw, 24px); }
.panel--wide { width: min(980px, calc(100% - 24px)); }
.step-heading { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 2rem; }
.step-heading > span {
    display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto;
    border: 1px solid var(--line); border-radius: 50%; color: var(--color-gold); font: .78rem var(--font-serif);
}
.step-heading p { margin: 0 0 .15rem; color: var(--color-muted); font-size: .78rem; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.topic-card {
    appearance: none; min-height: 140px; padding: 1.1rem; color: var(--color-paper); text-align: left;
    background: linear-gradient(145deg, rgba(45, 50, 84, .9), rgba(28, 32, 56, .9));
    border: 1px solid rgba(183, 154, 99, .2); border-radius: 18px; cursor: pointer;
}
.topic-card:hover, .topic-card[aria-checked="true"] { border-color: var(--color-gold); background: #303655; }
.topic-card strong { display: block; margin-top: .8rem; font: 600 1.05rem var(--font-serif); }
.topic-card small { display: block; color: var(--color-muted); margin-top: .18rem; line-height: 1.5; }
.line-icon { display: block; position: relative; width: 34px; height: 28px; color: var(--color-gold); }
.line-icon::before, .line-icon::after { content: ""; position: absolute; border: 1px solid currentColor; }
.line-icon--link::before { width: 17px; height: 10px; border-radius: 12px; transform: rotate(-35deg); top: 7px; }
.line-icon--link::after { width: 17px; height: 10px; border-radius: 12px; transform: rotate(-35deg); top: 11px; left: 14px; }
.line-icon--path::before { width: 28px; height: 20px; border-width: 0 0 1px 1px; border-radius: 0 0 0 20px; }
.line-icon--path::after { width: 7px; height: 7px; border-width: 1px 1px 0 0; right: 1px; bottom: 3px; transform: rotate(45deg); }
.line-icon--fork::before { width: 1px; height: 24px; border: 0; background: currentColor; left: 16px; }
.line-icon--fork::after { width: 22px; height: 16px; border-width: 1px 1px 0 0; transform: rotate(-45deg); left: 5px; top: -2px; }
.line-icon--rings::before { width: 25px; height: 25px; border-radius: 50%; }
.line-icon--rings::after { width: 13px; height: 13px; border-radius: 50%; left: 6px; top: 6px; }
.line-icon--sun::before { width: 22px; height: 22px; border-radius: 50%; left: 5px; top: 3px; }
.line-icon--sun::after { width: 32px; height: 1px; border: 0; background: currentColor; top: 14px; left: 0; transform: rotate(45deg); box-shadow: 0 0 0 0 currentColor; }
.line-icon--line::before { width: 32px; height: 16px; border-width: 0 0 1px 0; border-radius: 50%; transform: rotate(-9deg); }
.line-icon--line::after { width: 5px; height: 5px; border-radius: 50%; right: 0; bottom: 6px; background: currentColor; }
.step-actions { display: flex; gap: .8rem; justify-content: space-between; align-items: center; margin-top: 2rem; padding-bottom: env(safe-area-inset-bottom); }

.question-field { display: block; }
.question-field > span, .suggestions > p { display: block; margin-bottom: .55rem; color: var(--color-paper-dark); font-weight: 650; }
.question-field textarea, .admin-form textarea {
    display: block; width: 100%; resize: vertical; min-height: 150px; padding: 1rem;
    color: var(--color-paper); background: rgba(28, 32, 56, .78); border: 1px solid var(--line); border-radius: 16px;
    font-size: 16px; line-height: 1.7;
}
.question-field small { display: block; margin-top: .35rem; text-align: right; color: var(--color-muted); }
.suggestions { margin-top: 1.4rem; }
#suggestion-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.suggestion-chip {
    appearance: none; min-height: 44px; padding: .55rem .85rem; color: var(--color-paper-dark);
    background: rgba(37,42,74,.72); border: 1px solid var(--line); border-radius: 999px; text-align: left; cursor: pointer;
}
.question-guide { margin-top: 1.4rem; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.question-guide summary { min-height: 48px; padding: .72rem 1rem; cursor: pointer; color: var(--color-paper-dark); }
.guide-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0 1rem 1rem; color: var(--color-muted); font-size: .82rem; }
.guide-columns strong { color: var(--color-paper); }
.guide-columns p { margin: .35rem 0; }

.spread-browser { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: .5rem; align-items: center; }
.spread-list { display: grid; min-width: 0; }
.spread-card {
    appearance: none; width: 100%; min-height: 228px; display: none; grid-template-columns: 1fr auto;
    align-content: center; gap: .8rem; padding: clamp(1.1rem, 5vw, 1.7rem); color: var(--color-paper); text-align: left;
    background: linear-gradient(145deg, rgba(57, 54, 96, .88), rgba(27, 37, 65, .9));
    border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 42px rgba(5,8,24,.24); cursor: pointer;
}
.spread-card.is-current { display: grid; animation: spreadEnter .28s ease-out; }
.spread-card:hover, .spread-card[aria-pressed="true"] { border-color: var(--color-gold); background: var(--color-indigo-soft); }
.spread-card strong { font: 600 clamp(1.12rem, 5vw, 1.4rem) var(--font-serif); }
.spread-card p { margin: .5rem 0 0; color: var(--color-muted); font-size: .86rem; line-height: 1.65; }
.spread-card em { color: var(--color-gold); font-style: normal; font-size: .76rem; }
.spread-positions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem; }
.spread-positions span { padding: .2rem .5rem; border: 1px solid rgba(183,154,99,.2); border-radius: 99px; color: var(--color-paper-dark); font-size: .7rem; }
.spread-pagination, .draw-pagination { display: flex; align-items: center; justify-content: center; gap: .8rem; min-height: 38px; color: var(--color-muted); font-size: .75rem; }
.page-dots { display: inline-flex; gap: .35rem; }
.page-dots i { display: block; width: 5px; height: 5px; border-radius: 99px; background: rgba(216,204,183,.28); transition: width .2s ease, background .2s ease; }
.page-dots i.is-current { width: 18px; background: var(--color-gold); }
.page-arrow {
    appearance: none; display: grid; place-items: center; width: 44px; height: 52px; padding: 0;
    color: var(--color-paper); background: rgba(37,42,74,.62); border: 1px solid var(--line); border-radius: 999px;
    font: 2rem/1 var(--font-serif); cursor: pointer;
}
.page-arrow:disabled { opacity: .24; cursor: default; }
@keyframes spreadEnter { from { opacity: 0; transform: translateX(12px); } }
.skeleton-card { height: 116px; border-radius: 18px; background: linear-gradient(100deg, #252a4a 10%, #303655 35%, #252a4a 60%); background-size: 200% 100%; animation: skeleton 1.4s infinite; }
@keyframes skeleton { to { background-position-x: -200%; } }
.switch-row { display: flex; align-items: center; gap: .65rem; min-height: 44px; margin-top: 1rem; color: var(--color-paper-dark); font-size: .86rem; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--color-gold); }

.center-step { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.center-step h2 { max-width: 620px; }
.center-step .muted { max-width: 590px; }
.breath-scene { position: relative; width: 180px; height: 180px; margin-bottom: 1.8rem; filter: drop-shadow(0 0 28px rgba(183,154,99,.13)); }
.breath-orbit, .breath-light { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.breath-orbit { border: 1px solid rgba(203,177,124,.66); animation: breathOrbit 3.2s cubic-bezier(.42,0,.34,1) infinite; }
.breath-orbit--outer { width: 100%; height: 100%; }
.breath-orbit--middle { width: 72%; height: 72%; animation-delay: .14s; animation-direction: reverse; }
.breath-orbit--inner { width: 43%; height: 43%; animation-delay: .28s; }
.breath-light {
    width: 24%; height: 24%; background: radial-gradient(circle, rgba(239,220,177,.82), rgba(183,154,99,.08) 68%, transparent 70%);
    box-shadow: 0 0 36px rgba(203,177,124,.34); animation: breathLight 3.2s ease-in-out infinite;
}
@keyframes breathOrbit {
    0%,100% { transform: translate(-50%, -50%) scale(.72) rotate(0deg); opacity: .34; }
    48%,55% { transform: translate(-50%, -50%) scale(1) rotate(120deg); opacity: 1; }
}
@keyframes breathLight {
    0%,100% { transform: translate(-50%, -50%) scale(.72); opacity: .42; }
    50% { transform: translate(-50%, -50%) scale(1.42); opacity: 1; }
}
.breath-cue { margin: 1.1rem 0 0; color: var(--color-gold); font: 1.4rem var(--font-serif); letter-spacing: .18em; }
.breath-count { margin: .55rem 0 1.5rem; color: var(--color-muted); font-size: .82rem; }
.muted { color: var(--color-muted); }
.shuffle-table {
    position: relative; display: grid; place-items: center; width: min(500px, 94vw); height: min(430px, 56vh);
    min-height: 330px; margin: .8rem auto .2rem; perspective: 1100px;
}
.shuffle-table::after {
    content: ""; position: absolute; left: 50%; bottom: 5%; width: 58%; height: 30px; border-radius: 50%;
    background: rgba(0,0,0,.42); filter: blur(17px); transform: translateX(-50%); pointer-events: none;
}
.shuffle-deck {
    appearance: none; position: relative; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; color: inherit;
    background: transparent; touch-action: pan-y; user-select: none; cursor: grab; outline: none;
}
.shuffle-deck:active { cursor: grabbing; }
.shuffle-deck:focus-visible { border-radius: 20px; box-shadow: 0 0 0 3px rgba(203,177,124,.35); }
.shuffle-packet {
    position: absolute; left: 50%; top: 50%; display: block; width: min(190px, 43vw); aspect-ratio: 2 / 3;
    border-radius: 13px; transform: translate(-50%, -50%); transform-style: preserve-3d;
    will-change: transform, opacity; pointer-events: none;
}
.shuffle-packet::before, .shuffle-packet::after {
    content: ""; position: absolute; inset: 0; border: 1px solid rgba(183,154,99,.38); border-radius: inherit;
    background: #202644; transform: translate(5px, 5px); box-shadow: 0 18px 36px rgba(0,0,0,.25);
}
.shuffle-packet::after { transform: translate(9px, 9px); opacity: .72; }
.shuffle-packet img {
    position: relative; z-index: 2; display: block; width: 100%; height: 100%; object-fit: cover;
    border: 1px solid rgba(203,177,124,.58); border-radius: inherit; box-shadow: 0 22px 42px rgba(0,0,0,.34);
}
.shuffle-packet--left { z-index: 1; transform: translate(calc(-50% - 5px), calc(-50% + 3px)) rotate(-1.4deg); }
.shuffle-packet--right { z-index: 2; transform: translate(calc(-50% + 5px), calc(-50% - 1px)) rotate(1.4deg); }
.shuffle-packet--top {
    z-index: 3; transform: translate(calc(-50% + var(--drag-x, 0px)), -50%) rotate(var(--drag-r, 0deg));
    transition: transform .18s ease-out;
}
.shuffle-glow {
    position: absolute; z-index: 0; left: 50%; top: 50%; width: 230px; height: 230px; border-radius: 50%;
    background: radial-gradient(circle, rgba(183,154,99,.16), transparent 68%); transform: translate(-50%, -50%);
    opacity: .35; pointer-events: none;
}
.shuffle-deck.is-shuffling .shuffle-packet--left { animation: riffleLeft 1.32s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.is-shuffling .shuffle-packet--right { animation: riffleRight 1.32s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.is-shuffling .shuffle-packet--top { animation: cutPacket 1.32s cubic-bezier(.2,.7,.2,1); transition: none; }
.shuffle-deck.is-shuffling .shuffle-glow { animation: shuffleGlow 1.32s ease-out; }
.shuffle-deck.is-waiting .shuffle-packet { filter: saturate(.72); }
@keyframes riffleLeft {
    0%,100% { transform: translate(calc(-50% - 5px), calc(-50% + 3px)) rotate(-1.4deg); }
    22% { transform: translate(calc(-93% - 10px), calc(-50% + 12px)) rotate(-9deg); }
    45% { transform: translate(calc(-86% - 4px), calc(-50% - 3px)) rotate(-5deg); }
    70% { transform: translate(calc(-58% - 5px), calc(-50% + 4px)) rotate(2deg); }
}
@keyframes riffleRight {
    0%,100% { transform: translate(calc(-50% + 5px), calc(-50% - 1px)) rotate(1.4deg); }
    22% { transform: translate(calc(-7% + 10px), calc(-50% + 12px)) rotate(9deg); }
    45% { transform: translate(calc(-14% + 4px), calc(-50% - 3px)) rotate(5deg); }
    70% { transform: translate(calc(-42% + 5px), calc(-50% + 1px)) rotate(-2deg); }
}
@keyframes cutPacket {
    0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
    18% { transform: translate(-50%, calc(-50% - 26px)) rotate(-2deg); opacity: .9; }
    38% { transform: translate(-20%, calc(-50% - 8px)) rotate(8deg); opacity: .2; }
    58% { transform: translate(-75%, calc(-50% - 5px)) rotate(-7deg); opacity: .2; }
    78% { transform: translate(-50%, calc(-50% - 16px)) rotate(1deg); opacity: .86; }
    100% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
}
@keyframes shuffleGlow {
    0%,100% { transform: translate(-50%, -50%) scale(.75); opacity: .2; }
    55% { transform: translate(-50%, -50%) scale(1.34); opacity: .72; }
}
.status-copy { min-height: 1.7rem; color: var(--color-gold); font-size: .84rem; }
.preference-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1.1rem; color: var(--color-muted); font-size: .78rem; }
.preference-row label { display: flex; align-items: center; min-height: 44px; gap: .4rem; }
.preference-row input { width: 20px; height: 20px; accent-color: var(--color-gold); }

.draw-browser { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: .45rem; width: 100%; }
.fan-viewport {
    width: 100%; min-width: 0; overflow: hidden; padding: .45rem; touch-action: pan-y;
    border: 1px solid rgba(183,154,99,.16); border-radius: 24px;
    background: radial-gradient(circle at 50% 46%, rgba(103,83,144,.22), rgba(16,23,43,.38) 66%);
    box-shadow: inset 0 0 45px rgba(4,7,22,.28);
}
.card-fan {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr);
    gap: clamp(.35rem, 2vw, .7rem); width: 100%; min-height: clamp(310px, 45dvh, 420px); align-items: center; justify-items: center;
}
.fan-card {
    appearance: none; position: relative; width: min(100%, 82px); max-height: 128px; aspect-ratio: 2 / 3;
    padding: 0; background: url("/assets/cards/back/card-back-small.webp") center/cover no-repeat;
    border: 1px solid var(--color-gold-muted); border-radius: 8px; box-shadow: 0 12px 24px rgba(0,0,0,.28);
    cursor: pointer; transition: transform .26s ease-out, opacity .2s ease, border-color .2s ease;
}
.fan-card > span {
    position: absolute; right: 5px; bottom: 4px; min-width: 22px; padding: .05rem .25rem; border-radius: 99px;
    color: rgba(241,234,219,.86); background: rgba(13,18,36,.72); font-size: .58rem; letter-spacing: .08em;
}
.fan-card:hover, .fan-card:focus-visible { z-index: 10; transform: translateY(-5px) scale(1.035); box-shadow: 0 17px 30px rgba(0,0,0,.4); }
.fan-card.is-selected { opacity: .25; filter: grayscale(.8); pointer-events: none; }
.draw-pagination { justify-content: space-between; width: min(250px, 74%); margin: .15rem auto 0; }
.progress-track { width: min(440px, 90%); height: 3px; margin: .55rem auto; background: rgba(183,154,99,.18); border-radius: 9px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--color-gold); transition: width .3s ease; }
.locked-slots { display: flex; justify-content: center; gap: .55rem; min-height: 46px; margin-top: .45rem; }
.locked-slot { display: grid; place-items: center; width: 30px; height: 44px; border: 1px solid var(--color-gold); border-radius: 5px; color: var(--color-gold); font: .68rem var(--font-serif); background: rgba(37,42,74,.6); }

.reveal-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; justify-items: center;
    gap: .7rem .55rem; width: min(650px, 100%); margin: .7rem auto 0;
}
.reveal-grid[data-count="1"] { grid-template-columns: minmax(0, 150px); justify-content: center; }
.reveal-grid[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem .3rem; }
.reveal-grid[data-count="5"] .reveal-meta { min-height: 54px; }
.reveal-grid[data-count="5"] .reveal-meta h3 { font-size: .88rem; }
.reveal-grid[data-count="5"] .reveal-meta p { font-size: .75rem; }
.reveal-card-wrap { width: 100%; min-width: 0; text-align: center; opacity: .82; transition: opacity .2s ease, transform .2s ease; }
.reveal-card-wrap.is-active { opacity: 1; transform: translateY(-3px); }
.flip-card { appearance: none; width: min(100%, 132px); aspect-ratio: 825 / 1429; margin: 0 auto; padding: 0; border: 0; background: transparent; perspective: 1000px; cursor: pointer; }
.flip-card__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.72,.2,1); }
.flip-card.is-revealed .flip-card__inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; display: block; border-radius: 13px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow); }
.flip-face--back { z-index: 2; background: url("/assets/cards/back/card-back-small.webp") center/cover no-repeat; border: 1px solid var(--color-gold-muted); }
.flip-face--front { z-index: 1; transform: rotateY(180deg); background: var(--color-paper); }
.flip-card.is-revealed .flip-face--front { z-index: 3; }
.tarot-face-image { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--color-paper); }
.tarot-face-image.is-reversed { transform: rotate(180deg); }
.reveal-meta { min-height: 58px; margin-top: .45rem; overflow-wrap: anywhere; }
.reveal-meta h3 { font-size: clamp(.86rem, 3.5vw, 1.08rem); }
.reveal-meta p { margin: .08rem 0; color: var(--color-muted); font-size: .75rem; line-height: 1.45; }
.keyword-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .5rem; }
.keyword-list span { padding: .22rem .55rem; color: var(--color-paper-dark); border: 1px solid var(--line); border-radius: 99px; font-size: .7rem; }
.reveal-detail {
    width: min(650px, 100%); margin: .85rem auto 0; padding: 1rem;
    text-align: left; background: linear-gradient(145deg, rgba(49,52,89,.86), rgba(24,39,62,.82));
    border: 1px solid rgba(183,154,99,.28); border-radius: 18px; box-shadow: 0 16px 40px rgba(5,8,22,.2); overflow-wrap: anywhere;
}
.reveal-detail__placeholder { min-height: 86px; display: grid; place-items: center; margin: 0; color: var(--color-muted); text-align: center; }
.reveal-detail__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.reveal-detail__heading .eyebrow { margin-bottom: .18rem; }
.reveal-detail__heading h3 { font-size: 1.25rem; }
.reveal-detail__subtitle, .reveal-detail__attributes { margin: .15rem 0 0; color: var(--color-muted); font-size: .75rem; }
.reveal-detail__order { flex: 0 0 auto; color: var(--color-gold); font: .78rem var(--font-serif); }
.reveal-detail .keyword-list { justify-content: flex-start; margin-top: .7rem; }
.reveal-detail__meaning { margin: .75rem 0 0; color: var(--color-paper-dark); font: .88rem/1.75 var(--font-serif); }
.reveal-detail__attributes { padding-top: .65rem; border-top: 1px solid rgba(183,154,99,.16); line-height: 1.7; }
.reveal-reference { margin-top: .45rem; }
.reveal-reference summary { min-height: 36px; padding-block: .45rem; color: var(--color-gold); font-size: .8rem; cursor: pointer; }
#interpret-button { display: flex; margin: .85rem auto 0; }

.reading-summary { padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.reading-question { color: var(--color-paper-dark); font: 1.05rem/1.8 var(--font-serif); }
.reading-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: .7rem; width: 100%; padding: .75rem 0; }
.reading-thumbs figure { min-width: 0; margin: 0; text-align: center; }
.reading-thumbs img { display: block; width: min(100%, 104px); aspect-ratio: 825/1429; margin: 0 auto; object-fit: contain; border-radius: 6px; background: var(--color-paper); }
.reading-thumbs figcaption { min-height: 2.8em; margin-top: .35rem; color: var(--color-paper-dark); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.interpret-status { display: flex; align-items: center; gap: .55rem; min-height: 48px; margin-top: 1rem; color: var(--color-gold); font-size: .82rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-gold); box-shadow: 0 0 0 6px rgba(183,154,99,.1); animation: statusPulse 1.5s infinite; }
@keyframes statusPulse { 50% { opacity: .35; transform: scale(.7); } }
.interpret-output {
    min-height: 280px; padding: clamp(1rem, 4vw, 2rem); color: var(--color-ink);
    background: var(--color-paper); border-radius: 18px; box-shadow: var(--shadow);
    white-space: pre-wrap; overflow-wrap: anywhere; font: 1rem/1.95 var(--font-serif);
}
.rendered-markdown { white-space: normal; }
.rendered-markdown h1, .rendered-markdown h2, .rendered-markdown h3, .rendered-markdown h4 {
    margin: 1.55rem 0 .55rem; color: var(--color-ink); letter-spacing: 0; text-wrap: pretty;
}
.rendered-markdown h3 { font-size: 1.38rem; }
.rendered-markdown h4 { font-size: 1.15rem; }
.rendered-markdown p { margin: .65rem 0; }
.rendered-markdown p, .rendered-markdown li { color: var(--color-ink); }
.rendered-markdown ul, .rendered-markdown ol { margin: .55rem 0 .9rem; padding-left: 1.35rem; }
.rendered-markdown li + li { margin-top: .35rem; }
.rendered-markdown blockquote { margin: .9rem 0; padding: .65rem .9rem; color: #514b51; background: rgba(183,154,99,.1); border-left: 3px solid var(--color-gold); }
.rendered-markdown hr { height: 1px; margin: 1.3rem 0; border: 0; background: rgba(36,35,43,.16); }
.interpret-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.interpret-actions .button { flex: 1 1 160px; }
.share-option { justify-content: center; }
.share-result { overflow-wrap: anywhere; text-align: center; color: var(--color-gold); }

.safety-panel { max-width: 660px; padding-top: 9vh; }
.safety-panel h2 { margin-bottom: 1rem; }
.exercise-list { display: grid; gap: .7rem; margin-top: 1.5rem; }
.exercise-list p { margin: 0; padding: .85rem 1rem; border-left: 2px solid var(--color-gold); background: rgba(37,42,74,.6); }
.onboarding { width: min(480px, calc(100% - 28px)); padding: 0; color: var(--color-paper); background: #20243f; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.onboarding::backdrop { background: rgba(8,10,22,.82); backdrop-filter: blur(6px); }
.onboarding form { padding: clamp(1.5rem, 7vw, 2.5rem); text-align: center; }
.onboarding h2 { margin-bottom: .8rem; }
.onboarding p:not(.eyebrow) { color: var(--color-paper-dark); }
.onboarding .button { width: 100%; margin-top: 1rem; }
.dialog-mark { width: 58px; height: 58px; margin: 0 auto 1.2rem; border: 1px solid var(--color-gold); border-radius: 50%; position: relative; }
.dialog-mark::before, .dialog-mark::after { content: ""; position: absolute; background: var(--color-gold); }
.dialog-mark::before { width: 1px; height: 76px; top: -10px; left: 28px; }
.dialog-mark::after { height: 1px; width: 76px; top: 28px; left: -10px; }

.paper-page { width: min(720px, calc(100% - 32px)); min-height: 70svh; margin: 4rem auto; padding: clamp(1.5rem, 6vw, 4rem); color: var(--color-ink); background: var(--color-paper); border-radius: 20px; box-shadow: var(--shadow); }
.paper-page--wide { width: min(900px, calc(100% - 24px)); }
.paper-page h1 { margin-bottom: 1.5rem; font-size: clamp(2.2rem, 7vw, 4rem); letter-spacing: .02em; }
.paper-page h2 { color: var(--color-ink); font-size: 1.25rem; }
.paper-page p { color: #4a4651; }
.paper-page .eyebrow { color: #76613e; }
.paper-page .button--ghost { color: var(--color-ink); background: transparent; border-color: rgba(36,35,43,.22); }
.paper-page__actions { margin-top: 2rem; }
.history-list { display: grid; gap: .75rem; margin-top: 2rem; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid rgba(36,35,43,.15); border-radius: 14px; }
.history-item h2 { margin: .1rem 0; }
.history-item small { color: #6f6a73; }
.history-actions { display: flex; gap: .4rem; }
.history-actions .button { min-height: 44px; padding: .5rem .8rem; }
.empty-state { padding: 3rem 1rem; text-align: center; }
.shared-reading .reading-question { padding: 1rem; background: rgba(36,35,43,.05); border-radius: 12px; }
.shared-reading .reading-thumbs img { width: 82px; }
.shared-reading .reading-thumbs figcaption { color: #625851; }
.shared-reading .interpret-output { box-shadow: none; padding: 0; }
.share-disclaimer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(36,35,43,.14); font-size: .8rem; }
.offline-page, .error-page { width: min(620px, calc(100% - 32px)); margin: auto; padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: .7rem 1rem; color: var(--color-ink); background: var(--color-paper); border-radius: 99px; box-shadow: var(--shadow); font-size: .82rem; }

@media (max-width: 720px) {
    .site-header nav a:nth-child(2) { display: none; }
    .hero { grid-template-columns: 1fr; padding-top: 2rem; }
    .hero-copy { text-align: center; }
    .hero-lede { margin-inline: auto; }
    .hero-actions, .quiet-links { justify-content: center; }
    .hero-card-stage { min-height: 380px; }
    .hero-card-back { width: min(230px, 58vw); }
    .disclaimer-compact { margin-top: 0; }
    [data-step="spread"], [data-step="draw"], [data-step="reveal"] { padding-top: 1rem; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
    [data-step="spread"] .step-heading, [data-step="draw"] .step-heading, [data-step="reveal"] .step-heading { margin-bottom: .75rem; }
    [data-step="draw"] .step-heading, [data-step="reveal"] .step-heading { align-items: center; }
    .draw-instruction, .reveal-instruction { margin: 0 0 .45rem; font-size: .78rem; line-height: 1.55; }
    [data-step="shuffle"] {
        justify-content: flex-start; min-height: calc(100dvh - 70px); padding: clamp(.8rem, 3dvh, 1.6rem) 14px calc(.8rem + env(safe-area-inset-bottom));
    }
    [data-step="shuffle"] .eyebrow { margin-bottom: .35rem; }
    [data-step="shuffle"] h2 { font-size: clamp(1.65rem, 8vw, 2.35rem); }
    [data-step="shuffle"] > .muted { margin: .45rem 0 0; font-size: .78rem; line-height: 1.6; }
    .shuffle-table { width: min(420px, 100%); height: clamp(230px, 38dvh, 300px); min-height: 0; margin: .2rem auto 0; }
    .shuffle-packet { width: min(138px, 35vw); }
    .shuffle-glow { width: 185px; height: 185px; }
    .status-copy { margin: .2rem 0 0; min-height: 1.4rem; }
    .preference-row { margin: .1rem 0 .55rem; }
    .preference-row label { min-height: 36px; }
}
@media (max-width: 430px) {
    .site-header { padding-inline: 14px; }
    .site-header nav { gap: .8rem; }
    .topic-grid { grid-template-columns: 1fr; }
    .topic-card { min-height: 112px; }
    .guide-columns { grid-template-columns: 1fr; }
    .step-actions { position: sticky; bottom: 0; z-index: 10; margin-inline: -14px; padding: .8rem 14px calc(.8rem + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(21,24,43,.96) 72%, transparent); }
    .step-actions .button--primary { flex: 1; }
    .spread-browser { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: .35rem; }
    .spread-browser .page-arrow, .draw-browser .page-arrow { width: 38px; height: 48px; }
    .spread-card { min-height: clamp(210px, 34dvh, 245px); }
    .draw-browser { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: .3rem; }
    .draw-browser .page-arrow { width: 36px; }
    .card-fan { min-height: clamp(300px, 43dvh, 390px); }
    .fan-card { width: min(100%, 76px); max-height: 119px; }
    .reveal-grid { gap: .5rem .38rem; }
    .reveal-grid[data-count="1"] { grid-template-columns: minmax(0, 132px); }
    .reveal-detail { padding: .85rem; }
    .history-item { align-items: flex-start; flex-direction: column; }
    .history-actions { width: 100%; }
    .history-actions .button { flex: 1; }
}
@media (max-width: 360px) {
    h1 { font-size: 2.75rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .button { width: 100%; }
    .card-fan { min-height: 286px; }
    .fan-card { width: min(100%, 66px); max-height: 104px; }
    .interpret-actions .button { flex-basis: 100%; }
}
@media (min-width: 768px) {
    .spread-browser { display: block; }
    .spread-browser > .page-arrow, .spread-pagination { display: none; }
    .spread-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spread-card { display: grid; min-height: 150px; }
    .journey-step { padding-top: 7rem; }
}
@media (min-width: 1024px) {
    .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .hero-card-back, .card-shadow, .breath-orbit, .breath-light, .shuffle-packet, .shuffle-glow { animation: none !important; }
    .flip-card__inner { transform: none !important; }
    .flip-face--back { display: block; }
    .flip-card.is-revealed .flip-face--back { display: none; }
    .flip-face--front { transform: none; opacity: 0; }
    .flip-card.is-revealed .flip-face--front { opacity: 1; }
    .fan-card { transform: none; margin-left: 0; }
}
@media (update: slow) {
    .flip-card__inner { transform: none !important; transition: opacity .18s ease; }
    .flip-face--back { display: block; }
    .flip-card.is-revealed .flip-face--back { display: none; }
    .flip-face--front { transform: none; opacity: 0; }
    .flip-card.is-revealed .flip-face--front { opacity: 1; }
}

/* Product flow refinement: compact spreads, tactile deck and focused card table. */
.question-classification {
    margin-top: 1rem; padding: 1rem 1.05rem; border: 1px solid rgba(183,154,99,.42); border-radius: 16px;
    background: linear-gradient(140deg, rgba(59,58,94,.72), rgba(25,38,59,.72));
}
.question-classification strong { display: block; font-family: var(--font-serif); font-size: 1.05rem; }
.question-classification p { margin: .35rem 0 .7rem; color: var(--color-paper-dark); font-size: .86rem; line-height: 1.65; }
.question-reframes { display: flex; flex-wrap: wrap; gap: .45rem; }
.question-classification > .button { margin-top: .8rem; min-height: 42px; }

.spread-list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.8vw, 16px); width: 100%;
}
.spread-card {
    position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr;
    align-content: start; gap: .35rem .45rem; min-height: 150px; padding: 1rem; border-radius: 18px; min-width: 0;
    background: linear-gradient(145deg, rgba(50,52,88,.78), rgba(25,37,61,.86)); box-shadow: 0 13px 28px rgba(5,8,24,.17);
}
.spread-card strong { min-width: 0; font-size: clamp(.9rem, 3.8vw, 1.18rem); line-height: 1.35; overflow-wrap: anywhere; }
.spread-card em { align-self: start; white-space: nowrap; }
.spread-card p { grid-column: 1 / -1; margin: .1rem 0 0; font-size: clamp(.75rem, 2.7vw, .82rem); line-height: 1.52; overflow-wrap: anywhere; }
.spread-card .spread-check {
    position: absolute; bottom: .55rem; right: .55rem; display: grid; place-items: center; width: 18px; height: 18px;
    color: #1b1c2f; background: var(--color-gold); border-radius: 50%; opacity: 0; transform: scale(.8); font-size: .7rem;
}
.spread-card[aria-pressed="true"] { border-color: var(--color-gold); background: linear-gradient(145deg, rgba(62,65,105,.94), rgba(32,45,70,.96)); }
.spread-card[aria-pressed="true"] .spread-check { opacity: 1; transform: scale(1); }
.spread-card[aria-pressed="true"] p { padding-right: 1rem; }
.spread-selection-detail {
    margin-top: .8rem; padding: .85rem 1rem; border: 1px solid rgba(183,154,99,.25); border-radius: 16px;
    background: rgba(22,31,53,.58);
}
.spread-selection-detail .eyebrow { margin-bottom: .2rem; }
.spread-detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.spread-detail-heading h3 { min-width: 0; font-size: 1rem; overflow-wrap: anywhere; }
.spread-detail-heading span { flex: 0 0 auto; color: var(--color-gold); font-size: .76rem; }
.spread-selection-detail > p:not(.eyebrow) { margin: .25rem 0 .55rem; color: var(--color-muted); font-size: .76rem; line-height: 1.5; }

.shuffle-assist { margin: -.35rem 0 0; color: rgba(216,204,183,.72); font-size: .76rem; }
.shuffle-deck { transition: opacity .34s ease, transform .34s ease; }
.shuffle-deck.is-pressed { transform: scale(.97); }
.shuffle-deck.is-leaving { opacity: 0; transform: scale(.94); }
.shuffle-layer {
    position: absolute; left: 50%; top: 50%; display: block; width: min(188px, 43vw); aspect-ratio: 2 / 3;
    border-radius: 13px; transform: translate(-50%, -50%); transform-origin: center; pointer-events: none;
}
.shuffle-deck.is-shuffling .shuffle-layer, .shuffle-deck.is-pressed .shuffle-layer { will-change: transform; }
.shuffle-layer img { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid rgba(203,177,124,.52); border-radius: inherit; box-shadow: 0 16px 32px rgba(0,0,0,.24); }
.shuffle-layer--1 { z-index: 1; transform: translate(calc(-50% + 10px), calc(-50% + 9px)) rotate(1.5deg); opacity: .58; }
.shuffle-layer--2 { z-index: 2; transform: translate(calc(-50% - 7px), calc(-50% + 7px)) rotate(-1.2deg); opacity: .66; }
.shuffle-layer--3 { z-index: 3; transform: translate(calc(-50% + 6px), calc(-50% + 5px)) rotate(.9deg); opacity: .76; }
.shuffle-layer--4 { z-index: 4; transform: translate(calc(-50% - 4px), calc(-50% + 3px)) rotate(-.7deg); opacity: .84; }
.shuffle-layer--5 { z-index: 5; transform: translate(calc(-50% + 2px), calc(-50% + 1px)) rotate(.35deg); opacity: .92; }
.shuffle-layer--6 { z-index: 6; transform: translate(calc(-50% + var(--drag-x, 0px)), -50%) rotate(var(--drag-r, 0deg)); transition: transform .16s ease-out; }
.shuffle-deck.shuffle-split .shuffle-layer--6 { animation: shuffleSplitLeft .78s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.shuffle-split .shuffle-layer--5 { animation: shuffleSplitRight .78s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.shuffle-split .shuffle-layer--4 { animation: shuffleInterleave .78s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.shuffle-cut .shuffle-layer--6 { animation: shuffleCutTop .78s cubic-bezier(.2,.7,.2,1); }
.shuffle-deck.shuffle-cut .shuffle-layer--4 { animation: shuffleCutBottom .78s cubic-bezier(.2,.7,.2,1); }
.shuffle-deck.shuffle-scatter .shuffle-layer--6 { animation: shuffleScatterA .78s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.shuffle-scatter .shuffle-layer--5 { animation: shuffleScatterB .78s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.shuffle-scatter .shuffle-layer--4 { animation: shuffleScatterC .78s cubic-bezier(.22,.72,.2,1); }
.shuffle-deck.shuffle-split .shuffle-glow, .shuffle-deck.shuffle-cut .shuffle-glow, .shuffle-deck.shuffle-scatter .shuffle-glow { animation: shuffleGlowSoft .78s ease-out; }
.shuffle-deck.is-guided { animation: deckGuide .9s ease-in-out 2; }
.shuffle-deck.is-waiting .shuffle-layer { filter: saturate(.78); }
.shuffle-requirement { display: block; margin-top: .35rem; color: var(--color-muted); font-size: .7rem; }
@keyframes shuffleSplitLeft { 0%,100% { transform: translate(-50%,-50%); } 20% { transform: translate(calc(-50% - 18px),-50%) rotate(-6deg); } 52% { transform: translate(calc(-50% + 6px),calc(-50% - 3px)) rotate(2deg); } }
@keyframes shuffleSplitRight { 0%,100% { transform: translate(calc(-50% + 2px),calc(-50% + 1px)); } 20% { transform: translate(calc(-50% + 20px),calc(-50% + 2px)) rotate(7deg); } 58% { transform: translate(calc(-50% - 5px),calc(-50% + 1px)) rotate(-2deg); } }
@keyframes shuffleInterleave { 0%,100% { transform: translate(calc(-50% - 4px),calc(-50% + 3px)); } 30% { transform: translate(calc(-50% - 10px),calc(-50% - 2px)) rotate(-3deg); } 62% { transform: translate(calc(-50% + 8px),calc(-50% + 2px)) rotate(2deg); } }
@keyframes shuffleCutTop { 0%,100% { transform: translate(-50%,-50%); } 22% { transform: translate(calc(-50% + 4px),calc(-50% - 22px)) rotate(2deg); } 48% { transform: translate(calc(-50% + 18px),calc(-50% + 7px)) rotate(5deg); } 72% { transform: translate(calc(-50% - 5px),calc(-50% + 2px)); } }
@keyframes shuffleCutBottom { 0%,100% { transform: translate(calc(-50% - 4px),calc(-50% + 3px)); } 28% { transform: translate(calc(-50% - 6px),calc(-50% + 18px)) rotate(-2deg); } 58% { transform: translate(calc(-50% - 12px),calc(-50% - 5px)) rotate(-4deg); } }
@keyframes shuffleScatterA { 0%,100% { transform: translate(-50%,-50%); } 25% { transform: translate(calc(-50% - 18px),calc(-50% - 5px)) rotate(-6deg); } 58% { transform: translate(calc(-50% + 7px),calc(-50% + 2px)) rotate(2deg); } }
@keyframes shuffleScatterB { 0%,100% { transform: translate(calc(-50% + 2px),calc(-50% + 1px)); } 28% { transform: translate(calc(-50% + 20px),calc(-50% + 3px)) rotate(7deg); } 62% { transform: translate(calc(-50% - 6px),calc(-50% + 1px)) rotate(-2deg); } }
@keyframes shuffleScatterC { 0%,100% { transform: translate(calc(-50% - 4px),calc(-50% + 3px)); } 30% { transform: translate(calc(-50% - 10px),calc(-50% + 9px)) rotate(-3deg); } 64% { transform: translate(calc(-50% + 9px),calc(-50% - 2px)) rotate(3deg); } }
@keyframes shuffleGlowSoft { 0%,100% { transform: translate(-50%,-50%) scale(.84); opacity: .22; } 52% { transform: translate(-50%,-50%) scale(1.08); opacity: .5; } }
@keyframes deckGuide { 0%,100% { transform: scale(1); } 50% { transform: scale(1.015); } }

[data-step="draw"] { position: relative; max-width: 780px; }
[data-step="draw"]::before {
    content: ""; position: absolute; z-index: -1; left: 50%; top: 46%; width: min(760px, 108vw); height: min(620px, 76dvh);
    transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle, rgba(88,77,132,.2), rgba(20,29,51,.05) 58%, transparent 74%); pointer-events: none;
}
.step-heading--draw { justify-content: flex-start; }
.interpret-status:not(.is-generating) .status-dot { animation: none; box-shadow: none; }
.draw-lede { max-width: 38rem; margin: -.45rem 0 .15rem; color: var(--color-paper-dark); font-family: var(--font-serif); line-height: 1.6; }
.fan-viewport { padding: .5rem 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; touch-action: pan-y; }
.card-fan {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 16px 12px;
    width: min(430px, 100%); min-height: 430px; margin: 0 auto; padding: 4px clamp(20px, 5vw, 28px); align-items: center; justify-items: center;
}
.fan-card-wrap { display: grid; place-items: center; width: 100%; min-width: 0; }
.fan-card {
    width: min(88px, 100%); max-height: none; border: 1px solid rgba(183,154,99,.62); border-radius: 8px;
    box-shadow: 0 9px 18px rgba(3,5,17,.34), 0 1px 0 rgba(241,234,219,.08) inset;
    opacity: 1; animation: fanCardIn .3s ease-out backwards; animation-delay: var(--stagger, 0ms);
}
.fan-card > span { display: none; }
.fan-card::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(203,177,124,.18); border-radius: 5px; pointer-events: none; }
.fan-card:active { transform: scale(.97); transition-duration: .12s; }
.fan-card.is-candidate { z-index: 2; animation: none; opacity: 1; transform: translateY(-6px) scale(1.04); border-color: #d1b77e; box-shadow: 0 12px 22px rgba(3,5,17,.42), 0 0 16px rgba(183,154,99,.13); }
.card-fan.has-candidate .fan-card:not(.is-candidate):not(.is-committed) { opacity: .66; }
.fan-card.is-committed { animation: none; opacity: .24; filter: grayscale(.65); cursor: default; }
.fan-card.is-committed:hover { transform: none; }
.page-from-right { animation: pageFromRight .3s ease-out; }
.page-from-left { animation: pageFromLeft .3s ease-out; }
.draw-pagination { justify-content: center; gap: 1rem; width: 100%; margin: .3rem auto 0; font-size: .78rem; }
.draw-page-button {
    appearance: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--color-paper);
    background: rgba(27,36,62,.56); border: 1px solid var(--line); border-radius: 50%; font: 1.55rem/1 var(--font-serif); cursor: pointer;
}
.draw-page-button:disabled { opacity: .25; cursor: default; }
.draw-choice { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .1rem 1rem; width: min(430px, 100%); margin: .55rem auto 0; }
.draw-choice strong { font-family: var(--font-serif); font-size: .92rem; }
.draw-choice small { color: var(--color-muted); font-size: .75rem; line-height: 1.5; }
.draw-choice .button { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; }
.locked-slots { min-height: 36px; margin-top: .35rem; }
.locked-slot { width: 24px; height: 32px; color: rgba(183,154,99,.72); background: transparent; }
.locked-slot.is-filled { color: #1b1c2f; background: var(--color-gold); }
@keyframes fanCardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pageFromRight { from { opacity: 0; transform: translateX(26px); } }
@keyframes pageFromLeft { from { opacity: 0; transform: translateX(-26px); } }

.structured-reading { white-space: normal; }
.structured-reading section + section { margin-top: 1.6rem; padding-top: 1.35rem; border-top: 1px solid rgba(36,35,43,.13); }
.structured-reading h3 { margin: 0 0 .55rem; color: #342f35; font-size: 1.28rem; }
.structured-reading h4 { margin: .75rem 0 .3rem; color: #40383d; font-size: 1.04rem; }
.structured-reading p { margin: .45rem 0; color: var(--color-ink); }
.structured-reading ol { margin: .55rem 0; padding-left: 1.35rem; }
.structured-reading li + li { margin-top: .45rem; }
.interpret-card-meta { color: #776b62 !important; font: .78rem/1.5 var(--font-sans) !important; }
.interpret-disclaimer { margin-top: 1.6rem !important; padding-top: 1rem; border-top: 1px solid rgba(36,35,43,.14); color: #6f6867 !important; font: .75rem/1.65 var(--font-sans) !important; }
.source-note { margin: 0 0 .75rem; padding: .65rem .8rem; color: #6e5938; background: rgba(183,154,99,.13); border: 1px solid rgba(183,154,99,.25); border-radius: 10px; font-size: .78rem; }

@media (max-width: 720px) {
    [data-step="spread"] { min-height: calc(100dvh - 66px); padding-inline: 0; }
    [data-step="spread"] .spread-list { gap: 12px; }
    .spread-card { min-height: clamp(135px, 19dvh, 150px); padding: .8rem; border-radius: 16px; }
    .spread-selection-detail { margin-top: .65rem; padding: .7rem .8rem; }
    [data-step="spread"] .switch-row { margin-top: .45rem; min-height: 36px; }
    [data-step="spread"] .step-actions { margin-top: .45rem; }
    .shuffle-assist { margin-top: .2rem; font-size: .75rem; line-height: 1.5; }
    .shuffle-layer { width: min(142px, 36vw); }
    .shuffle-requirement { margin-top: .15rem; }
    [data-step="draw"] { min-height: calc(100dvh - 66px); padding-top: .6rem; padding-bottom: calc(.65rem + env(safe-area-inset-bottom)); }
    [data-step="draw"] .step-heading { margin-bottom: .35rem; }
    .draw-lede { margin-top: -.1rem; font-size: .8rem; line-height: 1.5; }
    .card-fan { min-height: 0; gap: 16px 12px; padding: 8px clamp(20px, 6vw, 28px); }
    .fan-card { width: min(86px, 10.6dvh, 100%); }
    .draw-choice { padding-inline: 4px; }
    .reveal-grid[data-count="5"] { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem .5rem; max-width: 380px; }
    .reveal-grid[data-count="5"] .reveal-card-wrap { grid-column: span 2; }
    .reveal-grid[data-count="5"] .reveal-card-wrap:nth-child(4) { grid-column: 2 / span 2; }
    .reveal-grid[data-count="3"] .flip-card { width: min(88px, 13dvh, 100%); }
    .reveal-grid[data-count="5"] .flip-card { width: min(66px, 9dvh, 100%); }
    .reveal-grid[data-count="5"] .reveal-meta { min-height: 0; margin-top: .3rem; }
    .reveal-grid[data-count="5"] .reveal-meta h3 { font-size: .82rem; }
    .reveal-detail { padding: .8rem .9rem; }
    .reveal-detail__meaning { margin-top: .55rem; line-height: 1.65; }
    .reveal-detail .keyword-list { margin-top: .45rem; }
    .reveal-detail__attributes { padding-top: .45rem; }
}
@media (max-width: 430px) {
    .spread-card strong { font-size: clamp(.9rem, 3.7vw, 1rem); }
    .spread-card p { font-size: .75rem; }
    .spread-card em { font-size: .75rem; }
    .spread-detail-heading h3 { font-size: .9rem; }
    .spread-selection-detail > p:not(.eyebrow) { display: block; font-size: .75rem; }
    .spread-positions span { font-size: .75rem; line-height: 1.45; }
    .card-fan { width: 100%; }
    .draw-choice { grid-template-columns: 1fr auto; }
    .draw-choice .button { padding-inline: 1rem; }
}
@media (max-width: 375px) {
    .reveal-grid[data-count="5"] { row-gap: .35rem; }
    .reveal-grid[data-count="5"] + .reveal-detail { margin-top: .35rem; padding-block: .65rem; }
    .spread-list { gap: 12px; }
    .spread-card { min-height: 135px; padding: .7rem; }
    .spread-card strong { font-size: .9rem; }
    .spread-card p { font-size: .75rem; line-height: 1.5; }
    .card-fan { gap: 14px 10px; padding-inline: 20px; }
    .draw-choice { gap: .1rem .6rem; }
    .draw-choice .button { padding-inline: .8rem; }
}
@media (min-width: 768px) {
    [data-step="spread"] { width: min(1020px, calc(100% - 48px)); padding-top: clamp(2.5rem, 7vh, 5rem); }
    .spread-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .spread-card { min-height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
    .shuffle-layer, .shuffle-deck, .fan-card, .card-fan { animation: none !important; }
    .shuffle-deck, .shuffle-deck.is-leaving, .fan-card, .fan-card:hover, .fan-card:focus-visible, .fan-card:active, .card-fan, .reveal-card-wrap.is-active { transform: none; }
    .shuffle-layer--6 { transform: translate(-50%, -50%); }
    .fan-card { opacity: 1; }
    .shuffle-layer--1, .shuffle-layer--2, .shuffle-layer--3 { opacity: .58; }
    .shuffle-layer--4, .shuffle-layer--5 { opacity: .8; }
    .fan-card.is-candidate { transform: none; border-width: 2px; }
    .fan-card.is-committed { opacity: .24; }
    .card-fan.has-candidate .fan-card:not(.is-candidate):not(.is-committed) { opacity: .66; }
}
