/* Black, gloomy, quiet (the Black Myth: Wukong rule): her face is the page, words are small and spaced. */
:root {
  color-scheme: dark;
  --ink: #060606;
  --bone: #e8e0cd;
  --dim: #9c937f;
  --gold: #c9a35a;
  --gold-hi: #f0d79a;
  --gold-lo: #7d5f27;
  --blood: #8f1414;
  --caps: "Marcellus SC", "Trajan Pro", Georgia, serif;
  --display: Marcellus, Georgia, serif;
  --text: "EB Garamond", Garamond, Georgia, serif;
  --brush: "Zhi Mang Xing", "STKaiti", KaiTi, serif;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--bone); font: 500 19px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }

/* Scene: phone band at the top (tall on arrival, shorter after scrolling); desktop full screen. */
.scene { position: fixed; top: 0; left: 0; right: 0; z-index: 3; height: 44svh; overflow: hidden; background: var(--ink); }
@supports (animation-timeline: scroll()) {
  .scene { animation: band linear both; animation-timeline: scroll(root); animation-range: 0 320px; }
  @keyframes band { from { height: 64svh; } to { height: 42svh; } }
}
.still, .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: contrast(1.06) saturate(.88) brightness(.92); transition: opacity .5s ease; }
.clip { opacity: 0; }
.clip.on { opacity: 1; }
.flash { opacity: 0; }
.flash.on { opacity: 1; }
.scene.breathe .still:not(.flash) { animation: push 20s ease-in-out infinite alternate; }
@keyframes push { to { transform: scale(1.05); } }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; opacity: .7; }
.shade { position: absolute; inset: 0; background:
  radial-gradient(90% 70% at 50% 30%, transparent 40%, rgba(6,6,6,.55) 85%),
  linear-gradient(180deg, rgba(6,6,6,.45) 0%, transparent 16%, transparent 58%, var(--ink) 100%); }
.grain { position: fixed; inset: -50%; z-index: 4; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, 3%); } }

.seal-mark { position: fixed; z-index: 5; top: max(14px, env(safe-area-inset-top)); left: 16px; writing-mode: vertical-rl; padding: 8px 5px; border-radius: 2px; background: var(--blood); color: #f6e7cf; font: 400 20px/1 var(--brush); box-shadow: inset 0 0 0 2px rgba(246,231,207,.3); }
.sound { position: fixed; z-index: 5; top: max(14px, env(safe-area-inset-top)); right: 16px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--gold); font: 400 13px/1 var(--caps); letter-spacing: .3em; text-shadow: 0 1px 8px #000; }
.sound::before { content: ""; display: inline-block; width: 14px; height: 12px; margin-right: 10px; vertical-align: -1px; background: currentColor;
  clip-path: polygon(0 30%, 30% 30%, 62% 0, 62% 100%, 30% 70%, 0 70%, 0 30%, 72% 30%, 80% 22%, 92% 50%, 80% 78%, 72% 70%, 76% 50%, 72% 30%); }
.sound.muted { color: var(--dim); }
.sound.muted::before { clip-path: polygon(0 30%, 30% 30%, 62% 0, 62% 100%, 30% 70%, 0 70%); }

/* The column of words. */
.column { position: relative; z-index: 2; width: min(100%, 560px); margin: 0 auto; padding: calc(64svh + 4px) 22px 48px; }
@supports not (animation-timeline: scroll()) { .column { padding-top: calc(44svh + 8px); } }
.brand { display: none; }
.kicker { margin: 0; font: 400 12px/1 var(--caps); letter-spacing: .5em; color: var(--gold); }
.intro h1 { margin: 14px 0 0; font: 400 clamp(32px, 9vw, 64px)/1.04 var(--display); letter-spacing: .05em; color: var(--bone); text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,.9); }
.sub { margin: 16px 0 0; font: italic 500 21px/1.3 var(--text); color: rgba(232,224,205,.8); }

.ask { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-top: 34px; }
.field { display: grid; gap: 7px; flex: 1 1 150px; }
.field:has(#hour) { flex: 2 1 230px; }
.field span { font: 400 11px/1 var(--caps); letter-spacing: .32em; color: var(--dim); }
.field input, .field select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid rgba(201,163,90,.4); border-radius: 0; background: rgba(6,6,6,.55); color: var(--bone); font: 500 18px/1 var(--text); }
.field select { padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-size: 5px 5px; background-position: right 16px center, right 11px center; background-repeat: no-repeat; }
.field select option { background: #111; }
.field input::-webkit-calendar-picker-indicator { filter: invert(.75) sepia(1) saturate(3); cursor: pointer; }
.field input:focus, .field select:focus { border-color: var(--gold-hi); outline: none; }

/* The brushed gold button: a stroke of gold leaf, rough at the edges. */
.brush { position: relative; min-height: 56px; padding: 0 30px; border: 0; color: #1a1106; font: 400 21px/1 var(--display); letter-spacing: .08em;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-lo) 100%);
  clip-path: polygon(1% 14%, 10% 3%, 38% 7%, 66% 0, 95% 9%, 100% 42%, 97% 90%, 68% 100%, 34% 94%, 6% 100%, 0 68%); transition: filter .2s ease, transform .2s ease; }
.brush:hover { filter: brightness(1.12); }
.brush:active { transform: scale(.98); }
.brush:disabled { filter: grayscale(.6) brightness(.6); cursor: wait; }
.brush.red { width: 100%; min-height: 64px; color: #f6e7cf; background: linear-gradient(180deg, #b52020 0%, var(--blood) 60%, #4a0909 100%); }
.brush.small { min-height: 48px; padding: 0 26px; font-size: 18px; }
.status { flex-basis: 100%; margin: 4px 0 0; min-height: 1.2em; color: var(--dim); font-size: 16px; }

/* The conversation, kept like a quiet ledger in the column. */
.thread { display: flex; flex-direction: column; gap: 14px; margin-top: 40px; }
.thread:empty { display: none; }
.thread .msg { scroll-margin-bottom: 14vh; animation: rise .6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.msg.me { color: var(--dim); font: italic 500 18px/1.4 var(--text); }
.msg.me > div::before { content: "You: "; font: normal 400 11px/1 var(--caps); letter-spacing: .3em; color: var(--gold); }
.msg.verdict > div { font: 400 clamp(26px, 6.4vw, 36px)/1.15 var(--display); letter-spacing: .03em; color: var(--gold-hi); }
.fu { position: relative; padding: 2px 0 2px 46px; font: 500 20px/1.45 var(--text); color: var(--bone); }
.fu::before { content: attr(data-mark); position: absolute; left: 0; top: 2px; width: 30px; text-align: center; font: 400 26px/1 var(--brush); color: #c42a1f; }
.fu.care { color: var(--gold-hi); font-style: italic; }
.typing { display: inline-flex; gap: 7px; padding: 8px 0 8px 46px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .3; animation: bob 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; } .typing i:nth-child(3) { animation-delay: .36s; }
@keyframes bob { 40% { opacity: 1; } }

/* Film subtitles under her (desktop only). */
.subtitles { display: none; }

.after { margin-top: 34px; }
.quiet { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 18px; }
.quiet button { min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid rgba(201,163,90,.35); background: none; color: var(--bone); font: 400 13px/1 var(--caps); letter-spacing: .28em; }
.quiet button:hover { color: var(--gold-hi); border-color: var(--gold-hi); }
.email { margin-top: 24px; padding: 22px 0 0; border-top: 1px solid rgba(201,163,90,.3); }
.email h2 { margin: 0; font: 400 26px/1.15 var(--display); letter-spacing: .04em; color: var(--gold-hi); }
.email p { margin: 10px 0 0; color: rgba(232,224,205,.85); }
.email form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.email input { flex: 1 1 220px; min-height: 48px; padding: 0 14px; border: 1px solid rgba(201,163,90,.4); background: rgba(6,6,6,.6); color: var(--bone); }
.foot { margin-top: 64px; color: var(--dim); font-size: 15px; }
.foot p { margin: 6px 0; }

/* The verdict: a red seal pressed down hard. */
.stamp { position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; gap: 22px; pointer-events: none; background: radial-gradient(circle, rgba(143,20,20,.35), rgba(6,6,6,.4) 60%, transparent); animation: fadeout 2s ease forwards; }
.stamp .seal { display: grid; place-items: center; min-width: min(46vw, 250px); padding: 22px 26px; border-radius: 6px; background: var(--blood); box-shadow: inset 0 0 0 6px var(--blood), inset 0 0 0 9px #f2dfc2, 0 0 90px rgba(143,20,20,.8); animation: slam .5s cubic-bezier(.3,1.5,.5,1) both; }
.stamp .seal span { font: 400 min(20vw, 112px)/.95 var(--brush); color: #fbefdc; writing-mode: vertical-rl; letter-spacing: .04em; }
.stamp p { margin: 0; font: 400 clamp(26px, 6vw, 48px)/1.1 var(--display); letter-spacing: .08em; color: var(--gold-hi); text-shadow: 0 4px 30px #000; animation: up .6s .3s both; }
@keyframes slam { from { transform: scale(3) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(-4deg); opacity: 1; } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }
@keyframes fadeout { 0%, 74% { opacity: 1; } to { opacity: 0; } }
body.shake .column, body.shake .subtitles { animation: shake .45s linear; }
@keyframes shake { 15% { transform: translate(-7px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-4px, -2px); } 60% { transform: translate(3px, 3px); } 80% { transform: translate(-1px, 1px); } }

/* Desktop: she fills the screen; words sit in the dark on the left; her current line is a subtitle under her. */
@media (min-width: 900px) {
  .scene { position: fixed; inset: 0; height: auto; z-index: 0; animation: none; }
  .still, .clip { object-position: 78% 30%; }
  .shade { background:
    radial-gradient(48% 82% at 80% 34%, transparent 38%, rgba(6,6,6,.45) 75%, rgba(6,6,6,.75) 100%),
    linear-gradient(90deg, rgba(6,6,6,.96) 0%, rgba(6,6,6,.82) 40%, transparent 60%),
    linear-gradient(0deg, rgba(6,6,6,.9) 0%, transparent 30%); }
  .seal-mark { left: auto; right: 40px; top: 32px; font-size: 26px; padding: 10px 6px; }
  .sound { top: auto; bottom: 30px; right: 40px; }
  /* The words end just before her staff (about 52% across at any desktop size), so the dark gap between them stays small. */
  .column { --w: min(36vw, 600px); margin: 0 0 0 max(44px, calc(28.75vw - var(--w) / 2)); width: var(--w); padding: 34px 0 40px; display: flex; flex-direction: column; min-height: 100vh; }
  .intro { margin-top: auto; }
  .foot { margin-top: auto; padding-top: 48px; }
  .brand { display: block; margin: 0 0 24px; font: 400 13px/1 var(--caps); letter-spacing: .4em; color: rgba(232,224,205,.7); }
  .intro h1 { font-size: clamp(42px, 4.2vw, 66px); }
  .subtitles { display: block; position: fixed; z-index: 5; right: 4vw; bottom: 7vh; width: min(560px, 38vw); text-align: center; pointer-events: none; transition: opacity .4s ease; }
  .subtitles .who { font: 400 12px/1 var(--caps); letter-spacing: .45em; color: var(--gold); }
  .subtitles p { margin: 10px 0 0; font: 500 clamp(22px, 1.9vw, 30px)/1.32 var(--text); color: #fff8ea; text-shadow: 0 2px 2px #000, 0 0 26px rgba(0,0,0,.95); }
  .subtitles p:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #embers, .grain { display: none; }
}

/* ---------- Mystery: the opening, the light, the chart, the incense ---------- */
@property --hole { syntax: '<length>'; inherits: false; initial-value: 0px; }

/* Opening curtain: black, one candle, a whisper. On open, a hole grows from the flame and the dark lifts. */
.curtain { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 30px; background: var(--ink);
  -webkit-mask: radial-gradient(circle at 50% 58%, transparent var(--hole), #000 calc(var(--hole) + 120px));
          mask: radial-gradient(circle at 50% 58%, transparent var(--hole), #000 calc(var(--hole) + 120px)); }
.curtain.open { animation: lift 2.2s cubic-bezier(.6,0,.2,1) forwards; pointer-events: none; }
.curtain.instant { display: none; }
@keyframes lift { 0% { --hole: 0px; } 80% { --hole: 120vmax; opacity: 1; } 100% { --hole: 140vmax; opacity: 0; visibility: hidden; } }
.candle { position: relative; width: 14px; height: 70px; margin-top: 40px; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #cfc2a4, #f3ead4 45%, #b9ab8c); box-shadow: 0 0 80px 20px rgba(255,170,60,.12); }
.candle i { position: absolute; left: 50%; bottom: 100%; width: 12px; height: 26px; margin-left: -6px; border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: radial-gradient(circle at 50% 75%, #fff8d8 0 18%, #ffcc55 35%, #ff7a1a 70%, transparent 72%); filter: blur(.4px); transform-origin: 50% 100%; animation: flame 1.8s ease-in-out infinite; }
.candle i::after { content: ""; position: absolute; inset: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(255,180,80,.35), transparent 60%); animation: halo 2.6s ease-in-out infinite; }
@keyframes flame { 0%, 100% { transform: scale(1) rotate(-2deg); } 30% { transform: scale(1.06, .94) rotate(2deg); } 60% { transform: scale(.95, 1.08) rotate(-1deg); } }
@keyframes halo { 50% { opacity: .6; transform: scale(1.12); } }
.whisper { margin: 0; font: italic 500 clamp(20px, 2.2vw, 28px)/1.3 var(--text); color: rgba(232,224,205,.85); letter-spacing: .02em; opacity: 0; animation: whisper 1.6s .5s ease forwards; }
@keyframes whisper { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } to { opacity: 1; filter: blur(0); transform: none; } }

/* The words arrive only after the dark lifts, one after another. */
.column > *, .seal-mark, .sound, .subtitles { transition: opacity 1.2s ease, transform 1.2s ease; }
body:not(.revealed) .column > *, body:not(.revealed) .seal-mark, body:not(.revealed) .sound, body:not(.revealed) .subtitles { opacity: 0; transform: translateY(8px); }
body.revealed .intro { transition-delay: .5s; }
body.revealed .ask { transition-delay: 1.1s; }
body.revealed .subtitles { transition-delay: 1.6s; }
body.revealed .foot { transition-delay: 1.8s; }

/* A pool of candle light in her picture that follows your hand; the rest of the room stays dark. */
.veil { position: absolute; inset: 0; pointer-events: none; transition: background .3s ease;
  background: radial-gradient(circle 34vmax at var(--x, 80%) var(--y, 36%), rgba(255,170,80,.08) 0%, transparent 38%, rgba(6,6,6,.5) 75%, rgba(6,6,6,.7) 100%); }

/* The chart in the reading: gold lines draw themselves palace by palace; her chosen palace burns red when the seal lands. */
.msg.chart { margin: 6px 0 4px; }
.chart-svg { display: block; width: min(100%, 420px); height: auto; overflow: visible; }
.chart-svg rect { fill: rgba(6,6,6,.35); stroke: var(--gold); stroke-width: 1; stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.1s ease forwards; animation-delay: calc(var(--i, 0) * .12s); }
.chart-svg .centre rect { stroke: rgba(201,163,90,.5); animation-delay: 1.5s; }
.chart-svg text { text-anchor: middle; dominant-baseline: middle; opacity: 0; animation: ink .8s ease forwards; animation-delay: calc(var(--i, 0) * .12s + .5s); }
.chart-svg .st { font: 400 17px/1 var(--brush); fill: rgba(232,224,205,.75); }
.chart-svg .se { font: 400 12.5px/1 var(--caps); fill: var(--bone); letter-spacing: .08em; }
.chart-svg .pn { font: 400 13px/1 var(--caps); fill: var(--gold); letter-spacing: .14em; }
.chart-svg .cz { font: 400 40px/1 var(--brush); fill: rgba(240,215,154,.55); animation-delay: 1.8s; }
.chart-svg .ck { font: 400 11px/1 var(--caps); fill: var(--dim); letter-spacing: .3em; animation-delay: 1.7s; }
.chart-svg .cn { font: 400 26px/1 var(--display); fill: var(--gold-hi); letter-spacing: .06em; animation-delay: 1.9s; }
.chart-cap { margin: 10px 0 0; max-width: 420px; color: var(--dim); font: italic 500 16px/1.4 var(--text); }
.sealed .soul rect, .ghost.sealed .soul rect { fill: rgba(143,20,20,.55); stroke: #d23a2a; stroke-width: 2; transition: fill .6s ease; }
.sealed .soul .pn, .sealed .soul .se { fill: #f6d3c4; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }

/* Desktop: a faint copy of the chart hangs in the air between you and her. */
.ghost { display: none; }
@media (min-width: 900px) {
  /* The faint chart floats in the dark margin to the left of the words. */
  .ghost { display: block; position: fixed; z-index: 1; left: calc(28.75vw + min(36vw, 600px) / 2 + 2vw); top: 50%; width: min(calc(55vw - 28.75vw - min(36vw, 600px) / 2), 46vh); transform: translate(0, -50%) rotate(-4deg); opacity: 0; pointer-events: none; mix-blend-mode: screen; transition: opacity 2s ease; }
  .ghost.on { opacity: .26; animation: drift 14s ease-in-out infinite alternate; }
  .ghost .chart-svg { width: 100%; }
  .ghost .chart-svg rect { fill: none; }
  @keyframes drift { to { transform: translate(2%, -52%) rotate(-2deg); } }
}

/* Hold to light the incense: a stick that burns from the left while you hold; smoke when lit. */
.incense { --p: 0; min-width: 0; white-space: nowrap; isolation: isolate; user-select: none; -webkit-user-select: none; touch-action: none; overflow: visible; }
.incense::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(255,140,40,.55) calc(var(--p) * 100%), transparent calc(var(--p) * 100% + 2px)); mix-blend-mode: multiply; transition: background .05s linear; }
.incense::after { content: ""; position: absolute; left: calc(var(--p) * 100%); top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ff8a2a; box-shadow: 0 0 12px 4px rgba(255,120,30,.8); opacity: calc(var(--p) * 4); }
.incense.lit { animation: smoke 1.2s ease-in-out infinite; }
@keyframes smoke { 50% { filter: brightness(1.18) drop-shadow(0 -6px 10px rgba(240,215,154,.35)); } }

/* Reduced motion: the chart is drawn at once instead of line by line (its animations are off). */
@media (prefers-reduced-motion: reduce) {
  .chart-svg rect { stroke-dashoffset: 0; }
  .chart-svg text { opacity: 1; }
}

/* ---------- One screen, no scrolling: the ask screen, then the reading screen ---------- */
html, body { height: 100%; overflow: hidden; }
.scene { animation: none; height: 44svh; transition: height .8s ease; }
body.stage-read .scene { height: 36svh; }
.column { padding-top: calc(44svh + 6px); height: 100svh; display: flex; flex-direction: column; transition: padding-top .8s ease; }
body.stage-read .column { padding-top: calc(36svh + 6px); }
.phone-only { display: none; }
.privacy { display: none; }

/* Ask screen (phone first): compact title, two rows of fields. */
.intro h1 { font-size: clamp(28px, 8vw, 64px); }
.sub { margin-top: 8px; font-size: 18px; }
.ask { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.ask .field:has(#hour) { flex: none; }
.ask .status { grid-column: 1 / -1; margin: 0; min-height: 0; }
.ask .brush.incense { min-height: 48px; padding: 0 12px; font-size: 16px; align-self: end; }
.foot { margin-top: auto; padding-top: 10px; font-size: 13px; }
.foot p { margin: 0; }

/* Reading screen: the form gives way to the reading. */
body.stage-read .intro, body.stage-read .ask { display: none; }
.thread { margin-top: 0; gap: 8px; }
.msg.me { font-size: 15px; }
.msg.verdict > div { font-size: clamp(20px, 5.4vw, 28px); line-height: 1.15; }
.fu { font-size: 16.5px; line-height: 1.35; padding-left: 34px; }
.fu::before { font-size: 20px; width: 24px; }
.typing { padding-left: 34px; }
.thread .msg.chart { display: none; } /* phones: the chart opens from a button */
.after { margin-top: 12px; }
.brush.red { min-height: 52px; font-size: 18px; }
.quiet { gap: 4px 18px; margin-top: 8px; }
.quiet button { font-size: 11px; letter-spacing: .2em; min-height: 40px; }
.phone-only { display: inline-block; }
body.stage-read .foot p:not(:first-child) { display: none; }

/* Overlays: the email box and, on phones, the chart. */
.sheet:not([hidden]), .chart-sheet:not([hidden]) { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 520px); max-height: 90svh; overflow: auto; margin: 0; padding: 26px 22px 22px; border: 1px solid rgba(201,163,90,.45); background: #0b0b0b; box-shadow: 0 0 0 100vmax rgba(0,0,0,.7); }
.chart-sheet .chart-svg { width: 100%; }
.close { position: absolute; top: 6px; right: 8px; width: 44px; height: 44px; border: 0; background: none; color: var(--gold); font: 400 28px/1 var(--display); }

/* Desktop: the words centred in the dark left part; the reading puts the chart beside her lines. */
@media (min-width: 900px) {
  .scene, body.stage-read .scene { height: auto; }
  .column, body.stage-read .column { height: 100vh; min-height: 0; padding-top: 30px; padding-bottom: 26px; }
  .intro h1 { font-size: clamp(40px, 4vw, 64px); }
  .sub { font-size: 21px; margin-top: 14px; }
  .ask { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
  .ask .field:has(#hour) { flex: 2 1 230px; }
  .ask .brush.incense { min-height: 56px; padding: 0 30px; font-size: 21px; }
  .privacy { display: block; margin-top: 6px !important; }
  .foot { font-size: 14px; }
  body.stage-read .thread { margin-top: auto; display: grid; grid-template-columns: minmax(0, min(46%, 280px)) 1fr; column-gap: 26px; row-gap: 10px; align-items: start; }
  .thread .msg.me { grid-column: 1 / -1; }
  .thread .msg.chart { display: block; grid-column: 1; grid-row: 2 / span 8; margin: 0; }
  .thread .msg:not(.me):not(.chart) { grid-column: 2; }
  .chart-cap { font-size: 14px; }
  .msg.verdict > div { font-size: clamp(22px, 1.9vw, 30px); }
  .fu { font-size: 17.5px; }
  .phone-only { display: none; }
  .ghost { display: none; }
}

/* Short screens: tighten further so nothing has to scroll. */
@media (max-height: 760px) {
  .fu { font-size: 15.5px; }
  .msg.verdict > div { font-size: 20px; }
  .intro h1 { font-size: clamp(26px, 7vw, 46px); }
}
/* Short phones (iPhone SE size): a shorter band while she reads, so the whole reading still fits. */
@media (max-width: 899px) and (max-height: 720px) {
  body.stage-read .scene { height: 27svh; }
  body.stage-read .column { padding-top: calc(27svh + 4px); }
  .msg.me { display: none; }
  .fu { font-size: 14.5px; line-height: 1.3; }
  .msg.verdict > div { font-size: 18px; }
  .brush.red { min-height: 46px; font-size: 16px; }
}
/* Phone form: born and "calls you" side by side, the hour on its own row (its labels are long), the incense button full width. */
@media (max-width: 899px) {
  .ask { grid-template-columns: 1fr 1fr; grid-template-areas: "born calls" "hour hour" "go go" "st st"; row-gap: 8px; }
  .ask .field:has(#birthday) { grid-area: born; }
  .ask .field:has(#gender) { grid-area: calls; }
  .ask .field:has(#hour) { grid-area: hour; }
  .ask .brush.incense { grid-area: go; min-height: 50px; font-size: 18px; }
  .ask .status { grid-area: st; }
}
/* Overlays must sit above her band: the column must not trap them in its own layer. */
.column { z-index: auto; }
@media (max-width: 899px) and (max-height: 720px) {
  .scene { height: 36svh; }
  .column { padding-top: calc(36svh + 4px); }
  .kicker { display: none; }
  .intro h1 { font-size: 26px; margin-top: 0; }
  .sub { font-size: 16px; margin-top: 4px; }
  .ask { margin-top: 12px; }
}

/* ---------- The incense burner: press and hold; the sticks catch from the top, smoke rises, then let go ---------- */
.censer { --p: 0; --cw: 76px; position: relative; display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; color: var(--bone); text-align: left; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.censer-art { position: relative; flex: none; width: var(--cw); height: calc(var(--cw) * 1.5); }
.censer-art img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; pointer-events: none;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%); mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  filter: brightness(calc(.85 + var(--p) * .35)) drop-shadow(0 0 calc(var(--p) * 18px) rgba(255,140,50,.55)); transition: filter .2s; }
.sticks { position: absolute; left: 38%; right: 38%; bottom: calc(var(--cw) * 0.7); height: calc(var(--cw) * 0.62); display: flex; justify-content: space-between; align-items: flex-end; }
.stick { position: relative; width: 2px; height: calc(100% - var(--p) * 18%); border-radius: 1px; background: linear-gradient(#5a2a12 0 70%, #b88a4a 70%); transition: height .1s linear; }
.stick:nth-child(1) { transform: rotate(-9deg); transform-origin: bottom; height: calc(88% - var(--p) * 16%); }
.stick:nth-child(3) { transform: rotate(9deg); transform-origin: bottom; height: calc(92% - var(--p) * 16%); }
.ember { position: absolute; left: 50%; top: -2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #ff9a3a;
  box-shadow: 0 0 6px 2px rgba(255,120,30,.9); opacity: min(1, calc(var(--p) * 3)); }
.smoke { position: absolute; left: 50%; bottom: 100%; width: 14px; height: calc(var(--cw) * .7); margin-left: -7px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 100%, rgba(225,215,195,.55), transparent 70%); filter: blur(3px); opacity: calc(var(--p) * .8);
  animation: smokeUp 2.6s ease-in infinite; transform-origin: bottom; }
.smoke.s2 { animation-delay: 1.3s; }
@keyframes smokeUp { 0% { transform: translateY(4px) scaleY(.4) translateX(0); opacity: 0; } 30% { opacity: calc(var(--p) * .8); } 100% { transform: translateY(calc(var(--cw) * -.5)) scaleY(1.3) translateX(6px); opacity: 0; } }
.censer.lit .ember { box-shadow: 0 0 10px 4px rgba(255,140,40,1); }
.censer.lit .smoke { opacity: .9; }
.censer-label { font: 400 15px/1.3 var(--caps); letter-spacing: .22em; color: var(--gold-hi); max-width: 16ch; }
.censer.lit .censer-label { color: #ffcf80; text-shadow: 0 0 12px rgba(255,150,50,.7); }
.censer:hover .censer-art img { filter: brightness(1.05) drop-shadow(0 0 10px rgba(255,140,50,.35)); }
.censer:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 6px; }
.censer:disabled { opacity: .5; cursor: wait; }
.ask .censer { grid-area: go; justify-self: start; }
@media (min-width: 900px) { .censer { --cw: 104px; gap: 20px; } .censer-label { font-size: 16px; } }
@media (max-width: 899px) { .censer { --cw: 64px; } .ask .censer { justify-self: center; } }
@media (max-width: 899px) and (max-height: 720px) { .censer { --cw: 50px; } .censer-label { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .smoke { display: none; } }
.censer-art { height: calc(var(--cw) * 1.42); }
.smoke { width: 18px; margin-left: -9px; background: radial-gradient(ellipse at 50% 100%, rgba(235,225,205,.75), transparent 70%); }
@media (min-width: 900px) { .censer { --cw: 124px; } .ask { margin-top: 22px; } .column, body.stage-read .column { padding-top: 24px; } }
@media (max-width: 899px) { .ask { row-gap: 6px; } .censer { --cw: 62px; } }
/* Short laptops: a smaller burner so the ask screen still fits. */
@media (min-width: 900px) and (max-height: 800px) { .censer { --cw: 92px; } .ask { margin-top: 16px; } .intro h1 { font-size: clamp(36px, 3.5vw, 54px); } }

/* Desktop form: three fields on one even row, the burner centred below them like an altar, its words underneath. */
@media (min-width: 900px) {
  .ask { display: grid; grid-template-columns: 1fr 1.45fr 1.15fr; grid-template-areas: "born hour calls" "go go go" "st st st"; column-gap: 12px; row-gap: 0; align-items: end; }
  .ask .field:has(#birthday) { grid-area: born; }
  .ask .field:has(#hour) { grid-area: hour; flex: none; }
  .ask .field:has(#gender) { grid-area: calls; }
  .ask .field { min-width: 0; }
  .ask .field input, .ask .field select { padding: 0 12px; font-size: 17px; }
  .ask .field select { padding-right: 28px; }
  .ask .censer { grid-area: go; justify-self: center; flex-direction: column; gap: 6px; margin-top: 18px; text-align: center; }
  .ask .censer-label { max-width: none; }
  .ask .status { grid-area: st; text-align: center; }
}
@media (min-width: 900px) { .ask .censer { gap: 0; } .ask .censer-label { margin-top: -10px; } }

/* The headline: her words in gold, a soft candle glow. */
.intro h1 em { font-style: normal; color: var(--gold-hi); text-shadow: 0 0 28px rgba(240,180,90,.35), 0 2px 30px rgba(0,0,0,.9); }
@media (max-width: 899px) and (max-height: 660px) { .intro h1 { font-size: 24px; } }
@media (min-width: 900px) { .intro h1 { font-size: clamp(36px, 3.3vw, 56px); text-wrap: balance; } }
@media (max-width: 899px) and (max-height: 660px) { .intro h1 { font-size: 22px; } .sub { font-size: 15px; } }
