:root {
  --bg: #f4f0e5;
  --paper: #fffdf6;
  --ink: #243f32;
  --muted: #626c5e;
  --line: #ddd6c5;
  --green: #284c3b;
  --green-deep: #183629;
  --green-light: #345544;
  --soft: #e8eddf;
  --gold: #b39861;
  --gold-light: #e2cfa6;
  --danger: #9b403b;
  --focus: #55775b;
  --radius: 18px;
  --font-display: "Noto Serif TC", "Songti TC", PMingLiU, Georgia, serif;
  --font-body: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --text-body: 18px;
  --text-support: 17px;
  --leading-reading: 1.8;
  --measure-reading: 35em;
  --scroll-thumb: #949b88;
  --scroll-track: var(--bg);
  --scroll-hover: var(--green);
  --scroll-active: var(--green-deep);
  --motion-flip: 950ms;
}
* { box-sizing: border-box; scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--scroll-track); }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 2px solid var(--scroll-track); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
*::-webkit-scrollbar-thumb:active { background: var(--scroll-active); }
html { scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.8 var(--font-body); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at 48% 20%, var(--paper), transparent 72%); }
button, input, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { touch-action: manipulation; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: var(--green-deep); }
/* Keep the HTML hidden state authoritative over component display rules. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-header { max-width: 1180px; margin: auto; padding: 26px 38px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { border: 0; background: none; color: var(--green); padding: 0; text-align: left; font: 29px/1.2 Georgia, serif; letter-spacing: -.7px; min-height: 44px; }
.brand::before { content: "◇"; color: var(--gold); font-size: 22px; margin-right: 10px; vertical-align: 2px; }
.brand span { display: block; font: 10px/1.5 var(--font-body); letter-spacing: 2px; margin: 7px 0 0 32px; color: var(--muted); }
.brand:hover { color: var(--green-deep); }
.demo { font-size: 12px; color: var(--muted); text-align: right; }
.demo::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: 2px; }
main { max-width: 1120px; margin: 34px auto 56px; padding: 0 30px; }
.layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 50px; align-items: start; }
.side { padding: 30px 0; position: sticky; top: 18px; }
.eyebrow, .kicker { font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.side h2 { font: 400 28px/1.65 var(--font-display); letter-spacing: .5px; margin: 21px 0 13px; }
.side p { font-size: 13px; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 17px; }
.steps li { font-size: 13px; display: flex; gap: 13px; align-items: center; color: var(--muted); }
.steps i { font-style: normal; display: grid; place-items: center; border: 1px solid var(--line); width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; font: 12px Georgia, serif; }
.steps .active { color: var(--green); font-weight: 600; }
.steps .active i { color: var(--paper); background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px var(--soft); }
.steps .complete i { border-color: var(--gold); background: var(--soft); color: var(--green); }
.small { font-size: 12px; color: var(--muted); }
.side .divider { border-top: 1px solid var(--line); padding-top: 20px; line-height: 1.9; }
.panel { position: relative; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px 42px; min-height: 560px; box-shadow: 0 10px 28px -20px #1b342b35; }
.panel::before { content: ""; position: absolute; top: -1px; left: 38px; width: 52px; height: 2px; background: var(--gold); }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.progress-label span:last-child { font-size: 11px; }
.track { height: 3px; background: var(--soft); border-radius: 3px; margin-bottom: 34px; overflow: hidden; }
.track div { height: 100%; background: var(--green); transition: width 220ms ease; }
.screen h1 { font: 400 29px/1.6 var(--font-display); letter-spacing: .3px; margin: 10px 0 14px; text-wrap: pretty; }
.screen h1:focus { outline: none; }
.screen .intro { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 26px; }
.kicker { color: var(--green); }
.layout[data-screen="welcome"] { display: block; max-width: 820px; margin: auto; }
.layout[data-screen="welcome"] .side { display: none; }
.layout[data-screen="welcome"] .panel { padding: 12px 42px 30px; min-height: 0; border: 0; background: transparent; box-shadow: none; }
.layout[data-screen="welcome"] .panel::before { display: none; }
.welcome { text-align: center; }
.welcome .kicker { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.welcome .kicker::before, .welcome .kicker::after { content: ""; width: 30px; height: 1px; background: var(--line); }
.welcome .hero-title { font-size: clamp(34px, 4vw, 46px); line-height: 1.5; letter-spacing: 1px; margin: 22px 0 17px; }
.welcome .intro { margin-bottom: 4px; }
.welcome .actions { justify-content: center; margin-top: 0; }
.welcome .primary { min-width: 220px; }
.welcome .welcome-meta { font-size: 12px; letter-spacing: .7px; color: var(--muted); margin: 15px 0; }
.welcome .prototype-note { max-width: 460px; margin: 22px auto 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.card-fan { --card-width: 140px; --card-height: 229px; position: relative; display: flex; justify-content: center; align-items: center; min-height: 305px; margin: 12px auto 18px; isolation: isolate; perspective: 1400px; }
.card-fan::before, .card-fan::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 370px; max-width: 100%; height: 240px; border: 1px solid #b3986130; border-radius: 50%; transform: translate(-50%, -50%) rotate(-8deg); pointer-events: none; }
.card-fan::after { width: 340px; height: 218px; border-color: #b398611d; }
.fan-card { width: var(--card-width); height: var(--card-height); flex: 0 0 var(--card-width); position: relative; z-index: 2; }
.fan-card:first-child { transform: rotate(-14deg) translate(27px, 15px); }
.fan-card:nth-child(2) { transform: translateY(-6px); z-index: 3; }
.fan-card:last-child { transform: rotate(14deg) translate(-27px, 15px); }
.foil-back { width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 17px; border: 1px solid transparent; border-radius: 74px 74px 8px 8px; color: var(--gold-light); background: linear-gradient(150deg, var(--green-light), var(--green-deep)) padding-box, linear-gradient(140deg, #93794a, var(--gold-light), #927846, #ccb17b) border-box; box-shadow: 0 3px 4px #18362912, 0 16px 22px -12px #18362966; overflow: hidden; }
.foil-back::before { content: ""; position: absolute; inset: 9px; border: 1px solid #d3bd8766; border-radius: 64px 64px 3px 3px; }
.foil-emblem { position: relative; display: grid; place-items: center; width: 72px; height: 90px; border: 1px solid #d3bd8759; border-radius: 36px 36px 0 0; }
.foil-emblem::before { content: ""; position: absolute; width: 46px; height: 46px; border: 1px solid #d3bd8759; border-radius: 50%; top: 17px; }
.foil-emblem::after { content: ""; position: absolute; top: -13px; left: calc(50% - 2px); width: 4px; height: 4px; border: 1px solid var(--gold-light); transform: rotate(45deg); }
.foil-sprout { position: relative; width: 1px; height: 27px; background: var(--gold-light); transform: rotate(9deg); opacity: .85; margin-top: 7px; }
.foil-sprout::before, .foil-sprout::after { content: ""; position: absolute; width: 13px; height: 9px; border: 1px solid var(--gold-light); border-radius: 1px 9px; }
.foil-sprout::before { left: -13px; top: 7px; transform: rotate(18deg); }
.foil-sprout::after { left: 1px; top: -1px; transform: rotate(-65deg); }
.foil-brand { font: 13px Georgia, serif; letter-spacing: .7px; }
.foil-rule { width: 26px; height: 1px; background: #d3bd8780; position: relative; }
.foil-rule::after { content: ""; position: absolute; left: 12px; top: -1px; width: 3px; height: 3px; transform: rotate(45deg); background: var(--gold-light); }
.options { display: grid; gap: 10px; }
.topics { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: block; text-align: left; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 17px 44px 17px 18px; color: var(--ink); transition: background 160ms ease, border-color 160ms ease; }
.choice:hover { background: var(--bg); border-color: var(--gold); }
.choice:active { background: var(--soft); }
.choice.selected { border-color: var(--green); background: var(--soft); }
.choice.selected::after { content: "✓"; position: absolute; right: 16px; top: 18px; color: var(--green); font-size: 15px; }
.choice strong { display: block; font-size: 15px; font-weight: 500; }
.choice span { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; margin: 22px 0; cursor: pointer; padding: 6px 0; }
.check input { width: 19px; height: 19px; flex-shrink: 0; margin-top: 4px; accent-color: var(--green); }
textarea, input[type="text"] { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 16px; color: var(--ink); font-size: 16px; }
textarea { resize: none; min-height: 180px; max-height: 520px; line-height: 1.9; overflow-y: auto; }
textarea:focus, input:focus { border-color: var(--green); }
textarea[aria-invalid="true"], input[aria-invalid="true"] { border-color: var(--line); }
textarea::placeholder, input::placeholder { color: var(--muted); opacity: 1; }
label.field { display: block; font-size: 14px; margin: 23px 0 9px; }
.count { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 9px; font-size: 11px; color: var(--muted); }
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); color: var(--ink); font-size: 13px; }
.chip:hover { border-color: var(--gold); background: var(--bg); }
.chip.selected { background: var(--green); color: var(--paper); border-color: var(--green); }
.chip.selected::before { content: "✓ "; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.primary, .secondary, .plain, .back { min-height: 44px; transition: background 160ms ease, color 160ms ease, border-color 160ms ease; }
.primary { padding: 13px 26px; border: 1px solid var(--green); border-radius: 30px; color: var(--paper); background: var(--green); font-size: 14px; }
.primary:hover:not(:disabled) { background: var(--green-deep); border-color: var(--green-deep); }
.primary:active:not(:disabled) { background: var(--green-light); }
.secondary { padding: 11px 20px; border: 1px solid var(--line); border-radius: 30px; color: var(--ink); background: transparent; font-size: 13px; }
.secondary:hover:not(:disabled) { border-color: var(--green); background: var(--soft); }
.plain { border: 0; background: none; color: var(--muted); padding: 10px 6px; font-size: 13px; }
.plain:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.error { color: var(--danger); font-size: 13px; line-height: 1.8; margin-top: 16px; }
.error:empty { margin: 0; }
.note { padding: 17px 19px; background: var(--soft); border-radius: 10px; font-size: 12px; color: var(--muted); margin: 23px 0; line-height: 1.9; }
.note b { color: var(--ink); font-weight: 500; }
.back { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0 8px 0 0; margin: -10px 0 14px; }
.back:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.summary { border-left: 2px solid var(--gold); padding: 3px 0 3px 18px; margin: 24px 0; }
.summary p { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.tag { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.draw-screen .intro, .reveal-screen .intro { text-align: center; }
.draw-screen h1, .reveal-screen h1, .draw-screen .kicker, .reveal-screen .kicker { text-align: center; }
.draw-screen .actions, .reveal-screen .actions { justify-content: center; }
.draw-screen .card-fan { --card-width: 118px; --card-height: 200px; min-height: 266px; }
.draw-screen .foil-emblem { width: 62px; height: 78px; }
.draw-screen .foil-emblem::before { width: 40px; height: 40px; }
.reveal-fan { --card-width: 134px; --card-height: 236px; min-height: 300px; }
.reveal-card { border: 0; padding: 0; color: var(--ink); background: none; perspective: 1000px; transition: translate 300ms ease; }
.reveal-card:disabled { opacity: 1; cursor: default; }
.reveal-card:focus-visible { outline-offset: 7px; }
.reveal-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform var(--motion-flip) cubic-bezier(.2, .75, .2, 1); }
.reveal-card.is-revealed { translate: 0 -11px; }
.reveal-card.is-revealed .reveal-inner { transform: rotateY(180deg); }
.reveal-back, .reveal-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.reveal-front { transform: rotateY(180deg); border: 1px solid var(--gold); padding: 5px; border-radius: 7px; background: var(--paper); overflow: hidden; box-shadow: 0 12px 20px -10px #18362955; }
.reveal-front .card-art { border-radius: 3px; height: 100%; }
.reveal-front::after { content: ""; position: absolute; inset: -30%; pointer-events: none; opacity: 0; background: linear-gradient(112deg, transparent 42%, #fff5cf 48%, #d7b76f 51%, transparent 57%); transform: translateX(-120%); }
.reveal-card.is-revealed .reveal-front::after { animation: gold-sweep 1100ms 280ms both; }
.reveal-status { text-align: center; min-height: 26px; color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.reveal-screen .actions { min-height: 48px; }
.reveal-note { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.draws { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px 0; align-items: start; }
.tarot { border: 1px solid var(--line); border-radius: 9px; text-align: center; background: var(--bg); color: var(--ink); padding: 8px; }
.tarot strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.6; margin: 7px 0 2px; }
.tarot small { font-size: 11px; color: var(--muted); }
.card-art { width: 100%; aspect-ratio: 300 / 527; display: grid; place-items: center; background: var(--paper); border-radius: 4px; overflow: hidden; }
.card-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-image-fallback { padding: 8px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.position { font-size: 11px; text-align: center; color: var(--muted); margin-top: 9px; line-height: 1.6; }
.result-head { padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.result-head h2 { font: 400 27px/1.6 var(--font-display); margin: 0 0 10px; }
.reading { margin: 27px 0; }
.reading h3 { font-size: 15px; font-weight: 500; margin: 0 0 9px; }
.reading p { font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.reading ol { padding-left: 23px; color: var(--muted); font-size: 14px; }
.reading li { padding-left: 5px; margin: 12px 0; }
.reading li::marker { color: var(--green); }
.links { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 26px; display: grid; gap: 10px; }
.links .choice { background: var(--bg); }
details { font-size: 13px; margin: 20px 0; color: var(--muted); }
summary { min-height: 44px; padding: 10px 0; color: var(--green); }
summary:hover { color: var(--green-deep); }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 0 30px 28px; color: var(--muted); font-size: 11px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.privacy-link { min-height: 44px; border: 0; background: none; padding: 8px 0; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.privacy-link:hover { color: var(--green); }
#toast { position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--green); color: var(--paper); padding: 13px 20px; border-radius: 14px; z-index: 9; font-size: 13px; max-width: min(90%, 520px); text-align: center; box-shadow: 0 5px 24px #18362926; }
#toast:empty { display: none; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 30px; color: var(--ink); max-width: 540px; width: calc(100% - 36px); max-height: calc(100dvh - 40px); overflow: auto; }
dialog::backdrop { background: #172c2370; }
dialog h2 { font: 400 25px/1.5 var(--font-display); padding-right: 30px; margin-top: 4px; }
dialog p { font-size: 14px; overflow-wrap: anywhere; }
dialog .close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; font-size: 25px; color: var(--muted); border-radius: 50%; }
dialog .close:hover { background: var(--soft); color: var(--green); }
.wait { display: flex; gap: 7px; margin: 28px 0; }
.wait span { height: 7px; width: 7px; background: var(--green); border-radius: 50%; animation: pulse 1s infinite; }
.wait span:nth-child(2) { animation-delay: .2s; }
.wait span:nth-child(3) { animation-delay: .4s; }
.line-account { max-width: 1180px; margin: 0 auto; padding: 12px 38px 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.line-status { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; flex: 1; text-align: right; }
.line-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.line-controls button { min-height: 44px; }
@media (hover: hover) { .reveal-card:hover:not(:disabled) { translate: 0 -8px; } }
@keyframes gold-sweep { 0% { transform: translateX(-120%); opacity: 0; } 35%, 65% { opacity: .32; } 100% { transform: translateX(120%); opacity: 0; } }
@keyframes pulse { 50% { opacity: .3; transform: translateY(-4px); } }
@media (max-width: 800px) {
  .site-header { padding: 21px 22px 18px; }
  .brand { font-size: 25px; }
  .brand span { font-size: 9px; letter-spacing: 1.4px; }
  .demo { max-width: 120px; font-size: 11px; line-height: 1.7; }
  main { padding: 0 20px; margin: 22px auto 32px; }
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; padding: 0; }
  .side h2, .side p, .side .divider, .side .eyebrow { display: none; }
  .steps { display: flex; justify-content: space-between; margin: 0 0 24px; gap: 7px; }
  .steps li { flex-direction: column; gap: 7px; font-size: 11px; }
  .steps i { width: 25px; height: 25px; flex-basis: 25px; }
  .panel { padding: 27px; min-height: 490px; }
  .screen h1 { font-size: 26px; }
  .progress-label span:last-child { display: none; }
  .layout[data-screen="welcome"] .panel { padding: 14px 0 20px; }
  .welcome .hero-title { font-size: 34px; }
  .welcome .intro { font-size: 13px; }
  .card-fan { --card-width: 110px; --card-height: 184px; min-height: 260px; margin-top: 10px; }
  .card-fan::before { width: 286px; height: 210px; }
  .card-fan::after { width: 260px; height: 188px; }
  .foil-back { gap: 13px; }
  .foil-emblem { width: 58px; height: 76px; }
  .foil-emblem::before { width: 38px; height: 38px; }
  .foil-brand { font-size: 11px; letter-spacing: .4px; }
  .draw-screen .card-fan { --card-width: 98px; --card-height: 170px; min-height: 240px; }
  .reveal-fan { --card-width: 104px; --card-height: 183px; min-height: 250px; }
  .reveal-fan .foil-emblem { width: 54px; height: 71px; }
  .reveal-fan .foil-emblem::before { width: 35px; height: 35px; }
  .draws { gap: 9px; }
  .result-head h2 { font-size: 24px; }
  .line-account { padding: 12px 22px 0; justify-content: flex-start; }
  .line-status { text-align: left; flex-basis: 100%; }
  .line-controls .secondary { padding: 8px 18px; }
  .site-footer { padding: 0 22px 22px; gap: 2px; }
}
@media (max-width: 420px) {
  .site-header { padding-inline: 18px; gap: 10px; }
  .brand { font-size: 23px; }
  .brand::before { font-size: 19px; margin-right: 7px; }
  .brand span { font-size: 8px; margin-left: 26px; letter-spacing: 1.1px; }
  main { padding: 0 14px; }
  .panel { padding: 23px 19px; }
  .panel::before { left: 24px; }
  .steps li { font-size: 10px; }
  .topics { grid-template-columns: 1fr; }
  .welcome .hero-title { font-size: 30px; }
  .welcome .card-fan { --card-width: 103px; --card-height: 175px; }
  .actions { gap: 10px; }
  .primary { padding: 12px 22px; }
  .screen h1 { font-size: 24px; }
  .tarot { padding: 5px; }
  .tarot strong { font-size: 12px; }
  .position { font-size: 10px; }
  .reveal-fan { --card-width: 94px; --card-height: 165px; }
  .reveal-card .foil-back { gap: 10px; }
  .reveal-card .foil-emblem { height: 63px; width: 49px; }
  .reveal-card .foil-emblem::before { width: 31px; height: 31px; top: 14px; }
  .reveal-card .foil-sprout { scale: .85; }
  .reveal-screen .actions { gap: 6px; }
  .reveal-note { font-size: 11px; }
}
/* Reduced motion overrides every decorative animation and transition. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { * { scrollbar-color: auto; } button, .choice, .tarot, .foil-back, .reveal-front { border-color: ButtonText; } .primary { background: ButtonFace; color: ButtonText; } }

/* Exploration folio. The accepted welcome screen keeps its original styles. */
:where(.layout:not([data-screen="welcome"])) {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
}
:where(.layout:not([data-screen="welcome"])) .side {
  overflow: hidden;
  padding: 30px 24px 26px;
  border: 1px solid var(--green-light);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--green-light), var(--green-deep) 72%);
  color: var(--paper);
}
:where(.layout:not([data-screen="welcome"])) .side::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid #e2cfa62b;
  border-radius: 11px;
  pointer-events: none;
}
:where(.layout:not([data-screen="welcome"])) .side .eyebrow { color: var(--gold-light); font-size: 10px; letter-spacing: 1.4px; }
:where(.layout:not([data-screen="welcome"])) .side h2 { font-size: 21px; line-height: 1.75; letter-spacing: 0; margin-block: 22px 16px; }
:where(.layout:not([data-screen="welcome"])) .side p,
:where(.layout:not([data-screen="welcome"])) .side .divider { color: #e8eddfcc; font-size: 12px; }
:where(.layout:not([data-screen="welcome"])) .side .divider { border-color: #e2cfa633; margin-top: 28px; padding-top: 20px; }
:where(.layout:not([data-screen="welcome"])) .steps { gap: 22px; margin: 32px 0; }
:where(.layout:not([data-screen="welcome"])) .steps li { position: relative; color: #e8eddfbf; font-size: 12px; gap: 12px; }
:where(.layout:not([data-screen="welcome"])) .steps li:not(:last-child)::after { content: ""; position: absolute; height: 16px; width: 1px; top: 31px; left: 13px; background: #e2cfa64d; }
:where(.layout:not([data-screen="welcome"])) .steps i { border-color: #e2cfa650; color: var(--gold-light); }
:where(.layout:not([data-screen="welcome"])) .steps .active { color: var(--paper); }
:where(.layout:not([data-screen="welcome"])) .steps .active i { background: var(--gold-light); color: var(--green-deep); border-color: var(--gold-light); box-shadow: 0 0 0 4px #e2cfa61a; }
:where(.layout:not([data-screen="welcome"])) .steps .complete i { color: var(--gold-light); border-color: var(--gold); background: transparent; }
:where(.layout:not([data-screen="welcome"])) .panel { padding: 32px 38px 36px; min-height: 540px; box-shadow: 0 14px 38px -30px #18362966; }
:where(.layout:not([data-screen="welcome"])) .panel::before { left: 38px; width: 68px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
:where(.layout:not([data-screen="welcome"])) .progress-label { margin-bottom: 9px; font-size: 11px; letter-spacing: .5px; }
:where(.layout:not([data-screen="welcome"])) .track { height: 2px; margin-bottom: 24px; }
:where(.layout:not([data-screen="welcome"])) .track div { background: linear-gradient(90deg, var(--green), var(--gold)); }
:where(.layout:not([data-screen="welcome"])) .screen { animation: folio-enter 260ms ease both; }
:where(.layout:not([data-screen="welcome"])) .screen h1 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.55; letter-spacing: .6px; margin: 16px 0 12px; overflow-wrap: anywhere; }
:where(.layout:not([data-screen="welcome"])) .screen .intro { max-width: 39em; margin-bottom: 26px; font-size: 14px; line-height: 1.85; }
:where(.layout:not([data-screen="welcome"])) .actions { padding-top: 22px; margin-top: 28px; border-top: 1px solid var(--line); gap: 14px; }
:where(.layout:not([data-screen="welcome"])) .primary { min-height: 48px; padding-inline: 27px; box-shadow: 0 5px 12px -9px var(--green-deep); }
:where(.layout:not([data-screen="welcome"])) .screen-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.screen-topline .back { margin: 0; min-height: 36px; }
.screen-topline .kicker { text-align: right; font-size: 10px; letter-spacing: 1px; margin-left: auto; }
.subprogress { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); margin: 10px 0 18px; }
.subprogress::before { content: ""; width: 22px; height: 1px; background: var(--gold); flex-shrink: 0; }
.flow-section { min-width: 0; margin-top: 26px; }
.flow-section + .flow-section { padding-top: 24px; border-top: 1px solid var(--line); }
.flow-section:first-child { margin-top: 0; }
.section-heading { font-size: 15px; font-weight: 500; line-height: 1.7; margin: 0 0 12px; letter-spacing: .2px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.field-label-row label.field { margin: 0; font-size: 15px; }
.field-optional { flex-shrink: 0; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .4px; }
.flow-section label.field { margin-top: 0; }
.flow-aside { font-size: 12px; color: var(--muted); line-height: 1.85; margin: 12px 0 0; }
.flow-section textarea { display: block; border-radius: 10px; background: var(--paper); padding: 17px 18px; box-shadow: inset 0 2px 7px #243f3204; scroll-margin-block: 24px max(24px, env(safe-area-inset-bottom)); }
.flow-section textarea::placeholder { opacity: 1; }
.field--story textarea { min-height: 200px; background-image: linear-gradient(180deg, #e8eddf24, transparent 60%); }
.field--short textarea { min-height: 94px; }
.field--question textarea { min-height: 116px; }
.flow-section .count { font-size: 11px; gap: 8px; margin-top: 8px; }
.flow-section .count span:last-child { white-space: nowrap; margin-left: auto; }
.mood-section .section-heading { margin-bottom: 12px; }
.mood-section .chips { gap: 8px; }
.mood-section .chip { background: transparent; }
.mood-section .chip.selected { background: var(--green); }
:where(.layout:not([data-screen="welcome"])) .choice { border-radius: 12px; overflow-wrap: anywhere; }
:where(.layout:not([data-screen="welcome"])) .choice:active:not(:disabled) { transform: translateY(1px); }
.choice .choice-copy { display: block; margin: 0; min-width: 0; color: inherit; }
.choice .choice-copy > span { margin-top: 5px; }
.choice .choice-icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 7px; margin: 0 0 17px; border: 1px solid #b3986166; border-radius: 50% 50% 8px 8px; color: var(--green); background: #e8eddf66; }
.choice-icon svg { width: 100%; height: 100%; stroke: currentColor; }
.choice .choice-check { position: absolute; display: grid; place-items: center; width: 20px; height: 20px; top: 17px; right: 15px; margin: 0; color: var(--green); border: 1px solid var(--line); border-radius: 50%; font-size: 11px; line-height: 1; }
.choice:not(.selected) .choice-check { color: transparent; }
.choice.selected .choice-check::before { content: "✓"; }
.choice:has(.choice-check).selected::after { content: none; }
.topics { gap: 12px; }
.topics .choice { padding: 20px 18px 18px; min-height: 151px; }
.topics .choice strong { font-family: var(--font-display); font-size: 18px; letter-spacing: .3px; font-weight: 400; }
.topics .choice:nth-child(3n + 2) { background: #e8eddf4d; }
.topics .choice:nth-child(3n + 3) { background: #e2cfa61f; }
.topics .choice:hover { border-color: var(--gold); box-shadow: 0 5px 15px -12px var(--green); }
.topics .choice.selected { color: var(--paper); background: var(--green); border-color: var(--green); }
.topics .choice.selected .choice-copy > span { color: var(--soft); }
.topics .choice.selected .choice-icon { color: var(--gold-light); background: #e2cfa60d; border-color: #e2cfa680; }
.topics .choice.selected .choice-check { color: var(--green); background: var(--gold-light); border-color: var(--gold-light); }
.mode-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mode-options .choice { padding: 23px 21px; min-height: 168px; }
.mode-options .choice strong { font: 400 20px/1.6 var(--font-display); }
.mode-options .choice .choice-copy > span { font-size: 13px; }
.mode-options .choice.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.expect-options { gap: 9px; }
.expect-options .choice { padding: 13px 46px 13px 16px; }
.expect-options .choice .choice-copy > span { margin-top: 3px; }
.expect-options .choice.selected { border-color: var(--green); background: var(--soft); }
.horizon-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.horizon-options .choice { padding: 12px 33px 12px 13px; min-height: 65px; }
.horizon-options .choice strong { font-size: 13px; }
.horizon-options .choice .choice-copy > span { font-size: 11px; line-height: 1.65; margin-top: 3px; }
.horizon-options .choice .choice-check { top: 15px; right: 10px; width: 16px; height: 16px; font-size: 9px; }
.review-layout { display: grid; gap: 24px; }
.story-note { position: relative; padding: 23px 24px; border: 1px solid var(--line); border-radius: 2px 12px 12px; background: linear-gradient(135deg, #e2cfa61a, transparent 55%), var(--paper); }
.story-note::before { content: ""; position: absolute; top: -1px; left: 24px; width: 36px; height: 2px; background: var(--gold); }
.story-note .section-heading { font: 400 21px/1.65 var(--font-display); }
.story-note > p { font-size: 14px; line-height: 1.95; color: var(--muted); }
.story-note .story-excerpt { color: var(--ink); margin: 14px 0; }
.story-note .summary { margin-block: 14px; padding-left: 14px; }
.story-note .summary p { line-height: 1.95; }
.story-note details { margin: 13px 0 0; }
.story-note details > summary { font-size: 12px; }
.story-note textarea { background: var(--paper); }
.review-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 16px 0; font-size: 11px; color: var(--muted); }
.review-meta > span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.review-notice { border: 1px solid var(--line); border-radius: 8px; padding: 12px 15px; margin: 0 0 18px; color: var(--ink); background: var(--soft); font-size: 13px; line-height: 1.85; }
.review-notice .plain { display: block; color: var(--green); padding-left: 0; }
.question-note { position: relative; border: 1px solid var(--green-light); border-radius: 14px; padding: 25px 24px; background: var(--green); color: var(--paper); }
.question-note::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px; background: linear-gradient(90deg, var(--gold-light), transparent); }
.question-note .section-heading { font: 400 23px/1.6 var(--font-display); color: var(--paper); }
.question-note > .tag, .next-steps > .tag { color: var(--gold-light); }
.question-note .field-label-row, .question-note label.field { color: var(--paper); }
.question-note .field-optional, .question-note .flow-aside, .question-note .count { color: var(--soft); }
.question-note textarea { color: var(--ink); background: var(--paper); border-color: var(--gold-light); margin-top: 16px; }
.question-note textarea:focus-visible { outline-color: var(--gold-light); }
.question-options { display: grid; gap: 9px; margin-top: 15px; }
.question-template { position: relative; width: 100%; text-align: left; border: 1px solid #e2cfa659; border-radius: 9px; padding: 13px 36px 13px 15px; color: var(--soft); background: transparent; font-size: 13px; line-height: 1.8; min-height: 48px; overflow-wrap: anywhere; transition: background 160ms ease, border-color 160ms ease; }
.question-template:hover { border-color: var(--gold-light); background: #e2cfa60d; }
.question-template > span { display: block; font-size: 10px; color: var(--gold-light); letter-spacing: .7px; margin-bottom: 5px; }
.question-template > strong { display: block; font-size: inherit; font-weight: 400; }
.question-template:focus-visible { outline-color: var(--gold-light); }
.question-template.selected { border-color: var(--gold-light); background: #e2cfa61a; color: var(--paper); }
.question-template.selected::after { content: "✓"; position: absolute; right: 13px; top: 13px; color: var(--gold-light); }
.question-template:active { background: #e2cfa626; }
.review-actions { margin-top: 0; }
.ritual-stage { position: relative; padding-top: 3px; text-align: center; }
.ritual-stage .intro { max-width: none; }
.ritual-stage .screen-topline { min-height: 44px; }
.ritual-stage #ritualHint { min-height: 1.85em; }
.ritual-question { max-width: 34em; margin: 18px auto 24px; padding: 18px 24px; border-block: 1px solid var(--line); font: 400 18px/1.9 var(--font-display); color: var(--green); overflow-wrap: anywhere; }
.ritual-question .tag { display: block; margin-bottom: 9px; font: 11px/1.7 var(--font-body); letter-spacing: 1px; }
.ritual-question p { margin: 6px 0 0; }
#ritualCards { min-height: 300px; display: grid; align-items: center; }
.ritual-stage .card-fan { margin-block: 2px 12px; --card-width: 128px; --card-height: 225px; min-height: 285px; }
.ritual-stage .reveal-fan { --card-width: 128px; --card-height: 225px; }
.ritual-stage .foil-emblem { width: 62px; height: 78px; }
.ritual-stage .foil-emblem::before { width: 40px; height: 40px; }
.ritual-stage .card-fan::before { width: 390px; height: 245px; }
.ritual-stage .card-fan::after { width: 345px; height: 218px; }
.ritual-actions { min-height: 110px; margin-top: 10px; }
:where(.layout:not([data-screen="welcome"])) .ritual-actions .actions { border-top: 0; justify-content: center; padding-top: 8px; margin-top: 4px; }
.ritual-caption { max-width: 35em; margin: 16px auto 0; color: var(--muted); font-size: 11px; line-height: 1.9; text-align: center; }
.reading-header { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 26px; }
.reading-header h1 { margin-bottom: 12px; }
.reading-header > p { font: 400 22px/1.8 var(--font-display); color: var(--ink); margin: 12px 0 16px; overflow-wrap: anywhere; }
.reading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.reading-meta > span + span::before { content: "·"; color: var(--gold); margin-right: 10px; }
.reading-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.reading-toolbar .flow-aside { margin: 0; }
.reading-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; max-width: 100%; margin-left: auto; }
.reading-tools .plain { font-size: 12px; padding-inline: 4px; }
.reading-toolbar .secondary { font-size: 12px; padding: 8px 16px; }
.reading-deck { padding: 22px 18px 17px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #e8eddf66, #f4f0e533); }
.reading-deck.draws { gap: 18px; margin: 24px 0; }
.reading-deck > .draws { gap: 18px; margin: 0; }
.reading-deck .tarot { max-width: 158px; margin-inline: auto; background: var(--paper); border-color: #b3986166; padding: 7px; box-shadow: 0 8px 18px -15px var(--green-deep); }
.reading-deck .position { margin-top: 11px; font-size: 11px; color: var(--green); }
.reading-chapter { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 15px; margin-top: 28px; padding-top: 27px; border-top: 1px solid var(--line); }
.chapter-number { display: grid; place-items: center; align-self: start; width: 34px; height: 34px; border: 1px solid var(--gold); border-radius: 50%; font: 15px/1 Georgia, serif; color: var(--green); }
.chapter-copy { min-width: 0; }
.chapter-copy h2, .chapter-copy h3 { font: 400 22px/1.65 var(--font-display); margin: 0 0 7px; }
.chapter-copy .tag { color: var(--muted); }
.chapter-copy p { font-size: 14px; line-height: 1.95; margin: 11px 0 0; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.chapter-copy p:last-child { color: var(--ink); }
.next-steps { padding: 24px; border-radius: 12px; margin: 32px 0; background: var(--green); color: var(--paper); }
.next-steps h2, .next-steps h3 { font: 400 22px/1.6 var(--font-display); color: var(--paper); margin: 0 0 16px; }
.next-steps ol { margin: 0; padding-left: 21px; color: var(--soft); font-size: 14px; line-height: 1.9; }
.next-steps li { padding-left: 7px; margin: 12px 0; }
.next-steps li::marker { color: var(--gold-light); font-family: Georgia, serif; }
.reading-footer { margin-top: 26px; }
.reading-footer > h2 { font: 400 23px/1.65 var(--font-display); margin: 0 0 10px; }
.reading-footer > p { font-size: 13px; line-height: 1.85; color: var(--muted); }
.feedback-block { padding-block: 22px; border-block: 1px solid var(--line); margin-top: 28px; }
.feedback-block h2, .feedback-block h3 { font-size: 14px; font-weight: 500; margin: 0 0 14px; }
.feedback-block .chips { gap: 7px; }
.feedback-block .chip { font-size: 12px; padding-inline: 13px; }
.feedback-block .small { font-size: 11px; margin: 10px 0 0; }
.followup-links { display: grid; gap: 12px; margin-top: 26px; }
.followup-links .choice { padding: 18px 40px 18px 18px; background: transparent; }
.followup-links .choice strong { font-family: var(--font-display); font-size: 17px; font-weight: 400; }
.followup-links .choice:hover { background: var(--soft); }
.followup-links .choice::after { content: "↗"; position: absolute; right: 17px; top: 17px; color: var(--green); font-size: 17px; }
.followup-links .choice[data-action="download"]::after { content: "↓"; }
.comfort-extra { margin: 25px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.comfort-extra > summary { display: list-item; font-size: 13px; }
.comfort-extra > summary .field-optional { float: right; margin-left: 8px; }
@keyframes folio-enter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) and (min-width: 801px) {
  :where(.layout:not([data-screen="welcome"])) { grid-template-columns: 195px minmax(0, 1fr); gap: 22px; }
  :where(.layout:not([data-screen="welcome"])) .side { padding-inline: 21px; }
  :where(.layout:not([data-screen="welcome"])) .side h2 { font-size: 18px; }
  :where(.layout:not([data-screen="welcome"])) .panel { padding-inline: 27px; }
}
@media (max-width: 800px) {
  :where(.layout:not([data-screen="welcome"])) { display: block; }
  :where(.layout:not([data-screen="welcome"])) .side { position: static; padding: 4px 0 16px; border: 0; border-radius: 0; background: none; overflow: visible; }
  :where(.layout:not([data-screen="welcome"])) .side::before { content: none; }
  :where(.layout:not([data-screen="welcome"])) .steps { margin: 0; gap: 5px; }
  :where(.layout:not([data-screen="welcome"])) .steps li { font-size: 10px; color: var(--muted); gap: 8px; }
  :where(.layout:not([data-screen="welcome"])) .steps li:not(:last-child)::after { width: calc(100% - 40px); height: 1px; top: 14px; left: calc(50% + 20px); background: var(--line); }
  :where(.layout:not([data-screen="welcome"])) .steps i { border-color: var(--line); color: var(--muted); background: transparent; }
  :where(.layout:not([data-screen="welcome"])) .steps .active { color: var(--green); }
  :where(.layout:not([data-screen="welcome"])) .steps .active i { background: var(--green); color: var(--paper); border-color: var(--green); box-shadow: 0 0 0 4px var(--soft); }
  :where(.layout:not([data-screen="welcome"])) .steps .complete i { background: var(--soft); border-color: var(--gold); color: var(--green); }
  :where(.layout:not([data-screen="welcome"])) .panel { padding: 25px 26px 28px; min-height: 0; }
  :where(.layout:not([data-screen="welcome"])) .panel::before { left: 26px; width: 46px; }
  :where(.layout:not([data-screen="welcome"])) .track { margin-bottom: 17px; }
  :where(.layout:not([data-screen="welcome"])) #subphase { display: inline; font-size: 10px; }
  :where(.layout:not([data-screen="welcome"])) .screen h1 { margin-top: 13px; font-size: 27px; }
  :where(.layout:not([data-screen="welcome"])) .screen .intro { font-size: 13px; margin-bottom: 23px; }
  :where(.layout:not([data-screen="welcome"])) .actions { padding-top: 20px; margin-top: 25px; }
  .screen-topline .back { min-height: 36px; }
  .subprogress { margin-bottom: 15px; font-size: 10px; }
  .flow-section { margin-top: 23px; }
  .flow-section + .flow-section { padding-top: 21px; }
  .field--story textarea { min-height: 180px; }
  .field--short textarea { min-height: 92px; }
  .field--question textarea { min-height: 116px; }
  .mode-options { gap: 10px; }
  .mode-options .choice { padding: 20px 17px; min-height: 160px; }
  .mode-options .choice strong { font-size: 18px; }
  .story-note, .question-note { padding: 21px 20px; }
  .review-layout { gap: 19px; }
  .ritual-question { padding: 16px 10px; font-size: 17px; margin-block: 16px 19px; }
  #ritualCards { min-height: 252px; }
  .ritual-stage .card-fan { --card-width: 108px; --card-height: 190px; min-height: 244px; margin-bottom: 6px; }
  .ritual-stage .card-fan::before { width: 300px; height: 212px; }
  .ritual-stage .card-fan::after { width: 273px; height: 194px; }
  .ritual-stage #ritualHint { min-height: 3.7em; }
  .ritual-actions { min-height: 110px; }
  .ritual-caption { margin-top: 12px; }
  .reading-deck { padding: 16px 10px 14px; }
  .reading-deck.draws { gap: 10px; }
  .reading-deck > .draws { gap: 10px; }
  .reading-chapter { gap: 11px; grid-template-columns: 29px minmax(0, 1fr); padding-top: 24px; margin-top: 24px; }
  .chapter-number { width: 28px; height: 28px; font-size: 13px; }
  .chapter-copy h2, .chapter-copy h3 { font-size: 20px; }
  .next-steps { padding: 22px 21px; margin-block: 27px; }
  .next-steps h2, .next-steps h3 { font-size: 21px; }
}
@media (max-width: 420px) {
  :where(.layout:not([data-screen="welcome"])) .panel { padding: 20px 18px 25px; }
  :where(.layout:not([data-screen="welcome"])) .panel::before { left: 18px; }
  :where(.layout:not([data-screen="welcome"])) .screen h1 { font-size: 25px; line-height: 1.6; letter-spacing: .2px; }
  :where(.layout:not([data-screen="welcome"])) .primary { width: 100%; padding-inline: 17px; min-height: 49px; }
  :where(.layout:not([data-screen="welcome"])) .actions > .plain { min-height: 44px; margin-inline: auto; }
  :where(.layout:not([data-screen="welcome"])) .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .topics .choice { padding: 16px 12px 14px; min-height: 155px; }
  .topics .choice strong { font-size: 16px; }
  .topics .choice .choice-copy > span { font-size: 11px; line-height: 1.8; }
  .topics .choice .choice-icon { width: 35px; height: 39px; margin-bottom: 13px; }
  .topics .choice .choice-check { top: 14px; right: 10px; width: 17px; height: 17px; font-size: 10px; }
  .mode-options { grid-template-columns: 1fr; }
  .mode-options .choice { min-height: 110px; display: block; padding: 20px 35px 20px 18px; }
  .mode-options .choice .choice-icon { margin: 3px 0 0; }
  .mode-options .choice .choice-check { right: 10px; top: 20px; width: 16px; height: 16px; }
  .mode-options .choice strong { font-size: 18px; }
  .mode-options .choice .choice-copy > span { font-size: 12px; }
  .expect-options .choice { padding: 12px 35px 12px 13px; }
  .expect-options .choice strong { font-size: 14px; }
  .expect-options .choice .choice-copy > span { font-size: 11px; }
  .expect-options .choice .choice-check { right: 10px; top: 15px; width: 17px; height: 17px; }
  .horizon-options .choice { padding: 11px 26px 11px 10px; }
  .horizon-options .choice strong { font-size: 12px; }
  .horizon-options .choice .choice-check { right: 7px; }
  .field-label-row { gap: 8px; }
  .field-label-row label.field { font-size: 14px; }
  .flow-section textarea { padding: 14px; }
  .flow-section .count { font-size: 10px; }
  .mood-section .chips { gap: 7px; }
  .mood-section .chip { font-size: 12px; padding-inline: 12px; }
  .story-note, .question-note { padding: 19px 16px; }
  .story-note .section-heading { font-size: 20px; }
  .question-note .section-heading { font-size: 21px; }
  .question-template { padding: 12px 30px 12px 12px; font-size: 12px; }
  .question-template.selected::after { right: 11px; }
  #ritualCards { min-height: 239px; }
  .ritual-stage .card-fan { --card-width: 98px; --card-height: 172px; min-height: 233px; }
  .ritual-stage .card-fan::before { width: 280px; height: 194px; }
  .ritual-stage .card-fan::after { width: 255px; height: 177px; }
  .ritual-actions .actions { gap: 5px; }
  .ritual-actions { min-height: 150px; }
  .ritual-stage .foil-emblem { width: 49px; height: 63px; }
  .ritual-stage .foil-emblem::before { width: 31px; height: 31px; top: 14px; }
  .ritual-stage .foil-back { gap: 11px; }
  .ritual-question { font-size: 16px; padding-inline: 7px; }
  .reading-deck.draws { gap: 8px; }
  .reading-header > p { font-size: 20px; }
  .reading-footer > h2 { font-size: 21px; }
  .reading-deck > .draws { gap: 8px; }
  .reading-deck { padding-inline: 8px; }
  .reading-deck .tarot { padding: 4px; }
  .reading-deck .tarot strong { font-size: 12px; }
  .reading-deck .position { font-size: 10px; line-height: 1.8; }
  .reading-chapter { grid-template-columns: 25px minmax(0, 1fr); gap: 9px; }
  .chapter-number { width: 25px; height: 25px; }
  .chapter-copy h2, .chapter-copy h3 { font-size: 19px; }
  .chapter-copy p, .next-steps ol { font-size: 14px; }
  .next-steps { padding: 21px 17px; }
  .followup-links .choice { padding-inline: 15px 33px; }
  .followup-links .choice strong { font-size: 16px; }
}
@media (max-width: 350px) {
  :where(.layout:not([data-screen="welcome"])) .panel { padding-inline: 14px; }
  :where(.layout:not([data-screen="welcome"])) .screen h1 { font-size: 23px; }
  :where(.layout:not([data-screen="welcome"])) .steps li { font-size: 9px; }
  .screen-topline .kicker { letter-spacing: 0; }
  .topics .choice { padding-inline: 10px; }
  .topics .choice strong { font-size: 15px; }
  .ritual-stage .card-fan { --card-width: 80px; --card-height: 141px; min-height: 218px; }
  #ritualCards { min-height: 224px; }
  .reading-deck.draws { gap: 5px; }
  .reading-deck > .draws { gap: 5px; }
  .reading-deck { padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  :where(.layout:not([data-screen="welcome"])) .screen { animation: none; }
}
@media (forced-colors: active) {
  :where(.layout:not([data-screen="welcome"])) .side,
  .question-note, .next-steps { color: CanvasText; background: Canvas; border-color: CanvasText; }
  :where(.layout:not([data-screen="welcome"])) .side p,
  :where(.layout:not([data-screen="welcome"])) .side .divider,
  :where(.layout:not([data-screen="welcome"])) .steps li,
  .question-note .section-heading, .question-note .count,
  .question-template, .next-steps h2, .next-steps h3, .next-steps ol { color: CanvasText; }
  .topics .choice.selected, .question-template.selected { color: HighlightText; background: Highlight; border-color: Highlight; }
}

/* Reading scale: 18px prose, 17px guidance, and about 35 full-width characters. */
.story-note > p:not(.flow-aside), .story-note .summary p, .summary p,
.reading p, .reading ol, .chapter-copy p, .next-steps ol,
#resultStory > p, dialog p, textarea, input[type="text"] {
  font-size: var(--text-body);
  line-height: var(--leading-reading);
}
.screen .intro, :where(.layout:not([data-screen="welcome"])) .screen .intro,
.welcome .welcome-meta, .welcome .prototype-note, .flow-aside,
.question-template, .reading-footer > p, .note, .review-notice,
.check, .reveal-status, .reveal-note, .ritual-caption, .error, #toast {
  font-size: var(--text-support);
  line-height: var(--leading-reading);
}
.options .choice strong, .followup-links .choice strong { font-size: var(--text-body); }
:is(.topics, .mode-options, .expect-options, .horizon-options, .followup-links) .choice .choice-copy > span {
  font-size: var(--text-support);
  line-height: var(--leading-reading);
}
.field-label-row label.field, label.field, .mood-section .chip, .feedback-block .chip,
.comfort-extra > summary, .story-note details > summary, #resultStory > summary {
  font-size: var(--text-support);
  line-height: var(--leading-reading);
}
.flow-section .count span:first-child { font-size: var(--text-support); line-height: var(--leading-reading); }
.ritual-question { font-size: var(--text-body); line-height: var(--leading-reading); }
.primary, .secondary, .plain, .back { font-size: 16px; }
.reading-tools .plain { font-size: 16px; }
.screen .intro, .story-note > p, .story-note .summary p, .summary p,
.reading p, .chapter-copy p, .next-steps li, #resultStory > p,
.reading-footer > p, .flow-aside, .note, dialog p {
  max-inline-size: var(--measure-reading);
}
.welcome .intro { margin-inline: auto; }
.ritual-stage .intro { margin-inline: auto; }
@media (min-width: 801px) {
  .flow-section textarea { max-inline-size: calc(var(--measure-reading) + 38px); }
}
@media (max-width: 600px) {
  :where(.layout:not([data-screen="welcome"])) .topics { grid-template-columns: 1fr; }
  .topics .choice { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 12px; min-height: 0; padding: 18px 34px 18px 14px; }
  .topics .choice .choice-icon { width: 36px; height: 40px; margin: 3px 0 0; }
  .topics .choice .choice-check { top: 20px; }
  .field-label-row { flex-wrap: wrap; }
  .question-note .count { display: block; }
  .question-note .count span { display: block; }
  .question-note .count span:last-child { text-align: right; margin-top: 4px; }
  .reading-chapter { grid-template-columns: 1fr; gap: 12px; }
}
