:root {
  --ink: #0d0c09;
  --ink-soft: #15130e;
  --panel: #1b1711;
  --panel-strong: #241d14;
  --paper: #e6d4ad;
  --paper-deep: #c5aa75;
  --gold: #c99d50;
  --gold-hot: #edcf8b;
  --moon: #7fa0ad;
  --carmine: #913529;
  --verdigris: #597565;
  --text: #f0e5cf;
  --muted: rgba(240, 229, 207, 0.66);
  --line: rgba(233, 210, 164, 0.18);
  --line-soft: rgba(233, 210, 164, 0.09);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --serif: "Instrument Serif", "Noto Serif SC", serif;
  --cn-serif: "Noto Serif SC", serif;
  --sans: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  z-index: 120;
  top: 10px;
  left: 12px;
  padding: 10px 16px;
  border: 2px solid var(--gold-hot);
  border-radius: 999px;
  color: #160f08;
  background: var(--gold-hot);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 50% 8%, rgba(75, 95, 106, 0.28), transparent 28rem),
    radial-gradient(circle at 15% 48%, rgba(119, 67, 38, 0.18), transparent 26rem),
    linear-gradient(rgba(230, 212, 173, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 212, 173, 0.018) 1px, transparent 1px),
    repeating-linear-gradient(12deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px),
    var(--ink);
  background-size: auto, auto, 46px 46px, 46px 46px, auto, auto;
  overflow-x: hidden;
}

button,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--gold-hot);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(13, 12, 9, 0.86);
}

:where(input, textarea, select):focus-visible {
  border-color: var(--gold-hot);
}

body.is-modal-open {
  overflow: hidden;
}

.grain,
.paper-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 2;
  opacity: 0.12;
  background-image:
    radial-gradient(rgba(239, 219, 178, 0.6) 0.45px, transparent 0.45px),
    radial-gradient(rgba(239, 219, 178, 0.24) 0.35px, transparent 0.35px);
  background-position: 0 0, 12px 18px;
  background-size: 24px 24px;
  mix-blend-mode: screen;
}

.paper-vignette {
  z-index: 1;
  background:
    radial-gradient(circle at center, transparent 0 42%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 22%, rgba(0, 0, 0, 0.38));
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(197, 157, 80, 0.13), transparent 24rem),
    #080704;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader:not(.is-visible) {
  opacity: 0;
  visibility: hidden;
}

.loader-card {
  position: relative;
  width: 112px;
  height: 164px;
  border-radius: 13px;
  background:
    repeating-linear-gradient(90deg, rgba(63, 44, 23, 0.14) 0 1px, transparent 1px 7px),
    var(--paper);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48), inset 0 0 0 8px rgba(66, 43, 22, 0.08);
  animation: loaderFloat 4.6s ease-in-out infinite;
}

.loader-card::before,
.loader-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(71, 48, 28, 0.32);
  border-radius: inherit;
}

.loader-card::before {
  inset: 9px;
}

.loader-card::after {
  inset: 24px 32px;
  border-radius: 999px;
}

.loader-door {
  position: absolute;
  left: 42px;
  top: 37px;
  width: 28px;
  height: 84px;
  border: 2px solid rgba(60, 41, 24, 0.44);
  border-radius: 999px 999px 4px 4px;
}

.loader-eye {
  position: absolute;
  left: 47px;
  top: 74px;
  width: 18px;
  height: 10px;
  border: 1px solid rgba(60, 41, 24, 0.55);
  border-radius: 50%;
}

.loader-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.86;
}

.loader-copy {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.loader-actions,
.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.is-busy {
  pointer-events: none;
}

.button.is-busy::after {
  content: "";
  width: 13px;
  height: 13px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: buttonSpin 0.72s linear infinite;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button-paper {
  color: #21170f;
  background:
    linear-gradient(120deg, rgba(255, 252, 235, 0.65), transparent 45%),
    linear-gradient(90deg, #f0dfb8, #d4af6a);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.button-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.38), transparent 42%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.button-paper:hover::before {
  transform: translateX(120%);
}

.button > * {
  position: relative;
  z-index: 1;
}

.button-ghost,
.button-small {
  color: var(--text);
  background: rgba(230, 212, 173, 0.055);
  border: 1px solid var(--line);
}

.button-small {
  min-height: 42px;
  padding: 0 16px;
  font-size: 12px;
}

.lang-switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.lang-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(230, 212, 173, 0.055);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-chip.is-active {
  color: #21170f;
  background: var(--gold-hot);
  border-color: transparent;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 22px;
  right: 22px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(13, 12, 9, 0.62);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding-left: 10px;
}

.wordmark span {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.wordmark small,
.kicker {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  gap: 8px;
}

.topnav a {
  padding: 12px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.topnav a:hover {
  color: var(--text);
  background: rgba(230, 212, 173, 0.06);
}

#sound-toggle {
  justify-self: end;
}

.ritual-dock {
  --dock-offset-y: 0px;
  position: fixed;
  z-index: 42;
  left: 50%;
  bottom: 18px;
  display: inline-flex;
  gap: 6px;
  max-width: calc(100vw - 28px);
  padding: 8px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0%, rgba(237, 207, 139, 0.14), transparent 36%),
    rgba(9, 7, 5, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  transform: translateX(-50%) translateY(var(--dock-offset-y));
  backdrop-filter: blur(16px);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ritual-dock.is-intro-hidden {
  --dock-offset-y: 18px;
  opacity: 0;
  pointer-events: none;
}

.ritual-dock a,
.ritual-dock button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(240, 229, 207, 0.62);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: transform 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.ritual-dock a:hover,
.ritual-dock button:hover,
.ritual-dock a.is-active {
  color: #21170f;
  background: var(--gold-hot);
  transform: translateY(-3px);
}

.ritual-dock button[data-dock-action="draw"] {
  color: #21170f;
  background: linear-gradient(90deg, #f0dfb8, #d4af6a);
}

.ritual-dock [data-dock-optional] {
  opacity: 0.78;
}

.toast-region {
  position: fixed;
  z-index: 90;
  top: 104px;
  right: 22px;
  display: grid;
  width: min(360px, calc(100vw - 28px));
  gap: 10px;
  pointer-events: none;
}

.toast-card {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(237, 207, 139, 0.18);
  border-radius: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(237, 207, 139, 0.16), transparent 42%),
    rgba(10, 8, 5, 0.82);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  transform: translateX(16px);
  opacity: 0;
  animation: toastIn 0.34s ease forwards;
  backdrop-filter: blur(14px);
}

.toast-card.is-leaving {
  animation: toastOut 0.24s ease forwards;
}

.toast-card span {
  color: var(--gold-hot);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toast-card strong {
  font-family: var(--cn-serif);
  font-size: 18px;
  line-height: 1.16;
}

.toast-card small {
  color: var(--muted);
  line-height: 1.45;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 22px;
}

.account-modal[hidden] {
  display: none;
}

.account-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 3, 0.72);
  backdrop-filter: blur(16px);
}

.account-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  padding: 26px;
  border: 1px solid rgba(237, 207, 139, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 0%, rgba(237, 207, 139, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 48%),
    rgba(13, 11, 8, 0.92);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.account-dialog-head,
.account-session,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-dialog h2 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.9;
}

.account-note,
.account-session span {
  color: var(--muted);
  line-height: 1.65;
}

.account-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.account-form label {
  display: grid;
  gap: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.account-form input {
  min-height: 50px;
  border: 1px solid rgba(230, 212, 173, 0.18);
  border-radius: 15px;
  color: var(--text);
  background: #100e0a;
  padding: 0 14px;
}

.account-session {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(127, 160, 173, 0.2);
  border-radius: 18px;
  background: rgba(127, 160, 173, 0.06);
}

main {
  position: relative;
  z-index: 3;
  padding: 112px 22px 56px;
}

.hero {
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 430px);
  align-items: center;
  gap: 42px;
}

.hero-copy {
  max-width: 960px;
}

.kicker {
  margin: 0 0 18px;
}

h1,
h2,
h3,
.specimen-title,
blockquote {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(3.6rem, 6.3vw, 6.8rem);
  line-height: 0.94;
}

.hero p,
.section-head p,
.ritual-hint,
.hero-specimen p,
.flow-grid p,
.result-card p,
.reading-copy h3 {
  color: var(--muted);
  line-height: 1.72;
}

.hero-copy > p:not(.kicker) {
  max-width: 620px;
  margin: 24px 0;
  font-size: 17px;
}

.hero-actions {
  justify-content: flex-start;
}

.hero-specimen {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --spot-x: 50%;
  --spot-y: 38%;
  display: grid;
  gap: 18px;
  justify-items: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(237, 207, 139, 0.2), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 48%),
    rgba(28, 22, 15, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(-2deg) perspective(1100px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.hero-specimen::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 244, 208, 0.14), transparent 34%),
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(255, 244, 208, 0.18), transparent 18rem);
  opacity: 0.72;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-specimen:hover {
  border-color: rgba(237, 207, 139, 0.36);
}

.hero-specimen > * {
  position: relative;
  z-index: 1;
}

.hero-oracle {
  min-height: 620px;
  align-content: center;
}

.hero-oracle-aura {
  position: absolute;
  inset: 9%;
  z-index: 0;
  border: 1px dashed rgba(237, 207, 139, 0.18);
  border-radius: 999px;
  transform: rotate(-12deg);
  animation: oracleAuraSpin 24s linear infinite;
}

.hero-oracle-aura::before,
.hero-oracle-aura::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--gold-hot);
  box-shadow: 0 0 28px rgba(237, 207, 139, 0.62);
}

.hero-oracle-aura::before {
  left: 18%;
  top: 5%;
}

.hero-oracle-aura::after {
  right: 12%;
  bottom: 11%;
}

.hero-card-stack {
  position: relative;
  width: min(100%, 330px);
  height: 455px;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(calc(var(--tilt-y) * 0.8)) rotateY(calc(var(--tilt-x) * -0.8));
}

.hero-card-stack-compact {
  width: min(100%, 260px);
  height: 355px;
  margin: 6px auto 18px;
}

.hero-stack-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76%;
  transform-origin: 50% 72%;
  will-change: transform;
}

.hero-stack-card-front {
  transform: translate3d(-50%, -50%, 84px) rotate(-2deg);
  animation: heroCardFront 8s ease-in-out infinite;
}

.hero-stack-card-mid {
  transform: translate3d(-56%, -48%, 24px) rotate(-14deg);
  opacity: 0.94;
  animation: heroCardMid 8s ease-in-out infinite;
}

.hero-stack-card-back {
  transform: translate3d(-43%, -46%, -28px) rotate(13deg);
  opacity: 0.82;
  animation: heroCardBack 8s ease-in-out infinite;
}

.hero-orbit-note {
  position: absolute;
  z-index: 2;
  padding: 9px 13px;
  border: 1px solid rgba(237, 207, 139, 0.18);
  border-radius: 999px;
  color: rgba(240, 229, 207, 0.72);
  background: rgba(10, 8, 5, 0.58);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: heroChipFloat 6.4s ease-in-out infinite;
}

.hero-orbit-note-a {
  left: 8%;
  top: 18%;
}

.hero-orbit-note-b {
  right: 7%;
  top: 43%;
  animation-delay: -2.1s;
}

.hero-orbit-note-c {
  left: 14%;
  bottom: 22%;
  animation-delay: -4.2s;
}

.hero-metric-row {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-metric-row span {
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  border: 1px solid rgba(237, 207, 139, 0.14);
  border-radius: 16px;
  color: rgba(240, 229, 207, 0.54);
  background: rgba(10, 8, 5, 0.42);
  font-size: 10px;
  text-transform: uppercase;
}

.hero-metric-row b {
  color: var(--gold-hot);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.specimen-card {
  width: min(100%, 290px);
  aspect-ratio: 0.68;
  padding: 10px;
  border-radius: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(55, 38, 22, 0.11) 0 1px, transparent 1px 6px),
    var(--paper);
  box-shadow: inset 0 0 0 1px rgba(65, 43, 25, 0.22), 0 28px 60px rgba(0, 0, 0, 0.4);
}

.specimen-face {
  position: relative;
  height: 100%;
  border: 1px solid rgba(69, 48, 28, 0.28);
  border-radius: 12px;
  overflow: hidden;
  color: #251a10;
  background:
    radial-gradient(circle at 50% 36%, rgba(244, 235, 208, 0.68), transparent 16%),
    radial-gradient(circle at 50% 45%, #192d58 0 18%, transparent 19%),
    conic-gradient(from 180deg at 50% 45%, #152543, #7b879e, #17294d, #a7824d, #152543);
}

.specimen-face-star {
  background:
    radial-gradient(circle at 50% 36%, rgba(240, 229, 207, 0.86), transparent 9%),
    radial-gradient(circle at 34% 32%, rgba(237, 207, 139, 0.62), transparent 5%),
    radial-gradient(circle at 67% 29%, rgba(237, 207, 139, 0.5), transparent 4%),
    conic-gradient(from 210deg at 50% 50%, #17324c, #7fa0ad, #203c55, #d0a957, #17324c);
}

.specimen-face-sun {
  background:
    radial-gradient(circle at 50% 39%, #f1dc9d 0 16%, transparent 17%),
    repeating-conic-gradient(from 0deg at 50% 39%, rgba(237, 207, 139, 0.72) 0 6deg, transparent 6deg 14deg),
    linear-gradient(150deg, #7d2f24, #d0a25b 46%, #293855);
}

.specimen-face::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(42, 29, 18, 0.36);
  border-radius: 10px;
}

.specimen-number {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(37, 26, 16, 0.72);
  font-weight: 800;
  letter-spacing: 0.2em;
}

.specimen-moon {
  position: absolute;
  left: 50%;
  top: 27%;
  width: 106px;
  height: 106px;
  transform: translateX(-50%);
  border: 2px solid rgba(232, 208, 155, 0.78);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(232, 208, 155, 0.06);
}

.specimen-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: #21170f;
  font-size: 42px;
  line-height: 0.88;
  text-align: center;
}

.specimen-title em {
  font-family: var(--cn-serif);
  font-size: 22px;
  font-style: normal;
  letter-spacing: 0;
}

.ticker-band {
  overflow: hidden;
  margin: 24px -22px 56px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.ticker-track {
  display: inline-flex;
  gap: 28px;
  min-width: max-content;
  padding: 16px 0;
  animation: ticker 26s linear infinite;
}

.ticker-track span {
  color: rgba(240, 229, 207, 0.78);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.ritual-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  min-height: 176vh;
}

.ritual-panel {
  position: sticky;
  top: 108px;
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow);
}

.ritual-steps {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 54%),
    rgba(255, 248, 233, 0.025);
}

.ritual-steps span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ritual-steps b {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.ritual-panel h2,
.section-head h2,
.result-card h2 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.9;
}

.ritual-panel textarea,
.ritual-panel select {
  width: 100%;
  border: 1px solid rgba(230, 212, 173, 0.18);
  border-radius: 15px;
  color: var(--text);
  background: #100e0a;
}

.question-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.question-presets button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(230, 212, 173, 0.055);
  font-size: 12px;
  transition: transform 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.question-presets button:hover,
.question-presets button.is-active {
  color: #21170f;
  background: var(--gold-hot);
  transform: translateY(-2px);
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.scenario-hint {
  min-height: 22px;
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.scenario-hint.is-selected {
  color: var(--gold-hot);
}

.scenario-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(233, 210, 164, 0.15);
  border-radius: 22px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(237, 207, 139, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 246, 221, 0.06), rgba(8, 7, 4, 0.22)),
    rgba(16, 13, 9, 0.86);
  text-align: left;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.scenario-card:hover,
.scenario-card.is-active {
  transform: translateX(4px);
  border-color: rgba(233, 210, 164, 0.34);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.scenario-card.is-active::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-hot);
  box-shadow: 0 0 0 5px rgba(237, 207, 139, 0.1), 0 0 18px rgba(237, 207, 139, 0.72);
  animation: statusPulse 1.5s ease-in-out infinite;
}

.scenario-card.is-featured {
  background:
    radial-gradient(circle at 12% 18%, rgba(237, 207, 139, 0.2), transparent 45%),
    linear-gradient(135deg, rgba(237, 207, 139, 0.08), rgba(30, 19, 8, 0.18)),
    rgba(20, 16, 10, 0.92);
}

.scenario-card span {
  grid-row: 1 / span 2;
  align-self: center;
  padding-right: 12px;
  border-right: 1px solid rgba(233, 210, 164, 0.15);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.scenario-card strong {
  grid-column: 2;
  font-family: var(--cn-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
}

.scenario-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.ritual-panel textarea {
  min-height: 128px;
  margin-top: 12px;
  padding: 16px;
  resize: vertical;
  line-height: 1.6;
}

.question-coach {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(233, 210, 164, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(237, 207, 139, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(43, 32, 20, 0.72), rgba(12, 10, 7, 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.question-coach[data-mood="ready"] {
  border-color: rgba(127, 160, 173, 0.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(127, 160, 173, 0.16), transparent 34%),
    rgba(10, 20, 22, 0.5);
}

.question-coach[data-mood="rewrite"],
.question-coach[data-mood="needs-work"] {
  border-color: rgba(237, 207, 139, 0.28);
}

.question-coach div:first-child {
  display: grid;
  gap: 4px;
}

.question-coach span,
.journal-prompts span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.question-coach strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.question-coach p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.question-coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.question-coach-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  line-height: 1.35;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.question-coach-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(237, 207, 139, 0.36);
  background: rgba(237, 207, 139, 0.09);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.field-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ritual-panel select {
  min-height: 48px;
  padding: 0 12px;
}

.draw-button {
  width: 100%;
  margin-top: 16px;
}

.beginner-hint {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(127, 160, 173, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 20%, rgba(127, 160, 173, 0.16), transparent 42%),
    rgba(127, 160, 173, 0.055);
}

.beginner-hint span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.beginner-hint strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.ritual-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ritual-progress.is-active {
  opacity: 1;
  transform: translateY(0);
}

.ritual-progress span {
  display: block;
  width: 0%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hot));
  box-shadow: 0 0 18px rgba(237, 207, 139, 0.4);
}

.ritual-progress strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ritual-hint {
  margin: 16px 0 0;
  font-size: 13px;
}

.stage-wrap {
  position: sticky;
  top: 92px;
  height: calc(100vh - 112px);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 48%, rgba(201, 157, 80, 0.12), transparent 19rem),
    radial-gradient(circle at 50% 110%, rgba(75, 95, 106, 0.24), transparent 26rem),
    linear-gradient(rgba(230, 212, 173, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 212, 173, 0.024) 1px, transparent 1px),
    #0b0a07;
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  box-shadow: var(--shadow);
  perspective: 1600px;
  contain: layout paint;
}

.stage-wrap[data-scene="relationship"] {
  background:
    radial-gradient(circle at 52% 43%, rgba(147, 61, 75, 0.2), transparent 22rem),
    radial-gradient(circle at 50% 110%, rgba(75, 95, 106, 0.22), transparent 26rem),
    linear-gradient(rgba(230, 212, 173, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 212, 173, 0.024) 1px, transparent 1px),
    #0b0a07;
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.stage-wrap[data-scene="anxiety"] {
  background:
    radial-gradient(circle at 52% 43%, rgba(84, 120, 128, 0.22), transparent 22rem),
    radial-gradient(circle at 50% 110%, rgba(75, 95, 106, 0.22), transparent 26rem),
    linear-gradient(rgba(230, 212, 173, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 212, 173, 0.024) 1px, transparent 1px),
    #0b0a07;
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.stage-wrap[data-scene="career"] {
  background:
    radial-gradient(circle at 52% 43%, rgba(201, 157, 80, 0.2), transparent 22rem),
    radial-gradient(circle at 50% 110%, rgba(75, 95, 106, 0.22), transparent 26rem),
    linear-gradient(rgba(230, 212, 173, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 212, 173, 0.024) 1px, transparent 1px),
    #0b0a07;
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.spark {
  position: absolute;
  z-index: 8;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold-hot);
  box-shadow: 0 0 18px rgba(237, 207, 139, 0.8);
  pointer-events: none;
}

.stage-label {
  position: absolute;
  z-index: 4;
  top: 22px;
  color: rgba(240, 229, 207, 0.44);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.stage-label-left {
  left: 24px;
}

.stage-label-right {
  right: 24px;
}

.stage-guide {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  padding: 9px 16px;
  border: 1px solid rgba(233, 210, 164, 0.14);
  border-radius: 999px;
  color: rgba(240, 229, 207, 0.56);
  background: rgba(8, 7, 4, 0.42);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.stage-intent {
  position: absolute;
  z-index: 7;
  top: 58px;
  left: 24px;
  display: grid;
  width: min(310px, calc(100% - 48px));
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(233, 210, 164, 0.15);
  border-radius: 18px;
  background: rgba(8, 7, 4, 0.42);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.stage-intent span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.stage-intent strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-family: var(--cn-serif);
  font-size: 16px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stage-intent small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stage-readiness {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 24px;
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(233, 210, 164, 0.14);
  border-radius: 999px;
  background: rgba(8, 7, 4, 0.5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.stage-readiness span {
  position: relative;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(240, 229, 207, 0.48);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.stage-readiness span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.7;
}

.stage-readiness span.is-active {
  color: #21170f;
  background: var(--gold-hot);
  transform: translateY(-1px);
}

.stage-readiness span.is-active::before {
  animation: statusPulse 1.5s ease-in-out infinite;
}

.shuffle-status {
  position: absolute;
  z-index: 7;
  left: 24px;
  bottom: 24px;
  display: grid;
  max-width: 320px;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(237, 207, 139, 0.12), transparent 42%),
    rgba(8, 7, 4, 0.48);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.stage-wrap.is-shuffling {
  border-color: rgba(237, 207, 139, 0.32);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42), inset 0 0 80px rgba(237, 207, 139, 0.06);
}

.stage-wrap.is-shuffling .stage-ring-b {
  animation-duration: 9s;
  border-color: rgba(237, 207, 139, 0.28);
}

.stage-wrap.is-revealed {
  border-color: rgba(127, 160, 173, 0.32);
}

.shuffle-status span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.shuffle-status strong {
  font-family: var(--cn-serif);
  font-size: 20px;
}

.shuffle-status small {
  color: var(--muted);
  line-height: 1.5;
}

.stage-tooltip {
  position: absolute;
  z-index: 9;
  left: var(--tooltip-x, 50%);
  top: var(--tooltip-y, 50%);
  display: grid;
  min-width: 190px;
  max-width: 260px;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(237, 207, 139, 0.18);
  border-radius: 16px;
  opacity: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(237, 207, 139, 0.14), transparent 46%),
    rgba(9, 7, 5, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  transform: translate3d(-50%, calc(-100% - 18px), 0) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.stage-tooltip.is-visible {
  opacity: 1;
  transform: translate3d(-50%, calc(-100% - 22px), 0) scale(1);
}

.stage-tooltip span {
  color: var(--gold-hot);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.stage-tooltip strong {
  font-family: var(--cn-serif);
  font-size: 18px;
  line-height: 1.12;
}

.stage-tooltip small {
  color: var(--muted);
  line-height: 1.45;
}

.stage-halo,
.stage-ring {
  position: absolute;
  left: 50%;
  top: 55%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.stage-halo-a {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(201, 157, 80, 0.24), transparent 65%);
  filter: blur(8px);
}

.stage-halo-b {
  top: 34%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(127, 160, 173, 0.18), transparent 70%);
  filter: blur(11px);
}

.stage-ring-a {
  width: min(78vw, 900px);
  height: min(30vw, 330px);
  border: 1px solid rgba(230, 212, 173, 0.13);
}

.stage-ring-b {
  width: min(62vw, 720px);
  height: min(22vw, 250px);
  border: 1px dashed rgba(201, 157, 80, 0.16);
  transform: translate(-50%, -50%) rotate(-8deg);
  animation: stageRingDrift 18s linear infinite;
}

.three-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
}

.result-shell {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 22px;
  padding-top: 76px;
}

.result-card,
.reading-copy,
.flow-grid article,
.library-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.034), transparent 46%),
    var(--panel);
  box-shadow: var(--shadow);
}

.result-card {
  padding: 24px;
}

.result-card h2 {
  max-width: 9ch;
}

.result-mini-card {
  position: relative;
  width: min(100%, 310px);
  aspect-ratio: 0.68;
  margin: 28px auto 0;
  padding: 18px;
  border-radius: 18px;
  color: #261a10;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 246, 216, 0.78), transparent 17%),
    radial-gradient(circle at 50% 44%, var(--result-a, #1b2f5c) 0 22%, transparent 23%),
    conic-gradient(from 160deg at 50% 48%, var(--result-a, #1b2f5c), var(--result-b, #7a889f), var(--result-c, #c99d50), var(--result-a, #1b2f5c)),
    var(--paper);
  box-shadow: inset 0 0 0 10px rgba(66, 43, 22, 0.08), 0 24px 58px rgba(0, 0, 0, 0.34);
}

.result-mini-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(58, 39, 24, 0.35);
  border-radius: 12px;
}

.result-mini-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 68px;
  width: 68%;
  aspect-ratio: 0.666;
  transform: translateX(-50%);
  border: 1px solid rgba(45, 31, 20, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(238, 220, 178, 0.04), rgba(0, 0, 0, 0.14)),
    var(--card-image),
    var(--atlas-image);
  background-position: center, center, var(--atlas-x, 0%) var(--atlas-y, 0%);
  background-size: cover, cover, var(--atlas-size, 400% 600%);
  box-shadow:
    inset 0 0 0 5px rgba(239, 220, 179, 0.1),
    0 18px 35px rgba(37, 26, 16, 0.22);
}

#result-number {
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.22em;
}

#result-name,
#result-zh {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  text-align: center;
  text-shadow: 0 1px 12px rgba(236, 216, 174, 0.55);
}

#result-name {
  bottom: 58px;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 0.9;
}

#result-zh {
  bottom: 32px;
  font-family: var(--cn-serif);
  font-style: normal;
}

.share-ticket {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(233, 210, 164, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(237, 207, 139, 0.18), transparent 34%),
    linear-gradient(120deg, rgba(237, 207, 139, 0.12), transparent 52%),
    rgba(8, 7, 4, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.share-ticket span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.share-ticket strong {
  font-family: var(--cn-serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.share-ticket small {
  color: var(--muted);
  line-height: 1.55;
}

.share-ticket .share-return-copy {
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px dashed rgba(233, 210, 164, 0.2);
  color: var(--gold-hot);
  font-size: 12px;
}

.share-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.share-stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(233, 210, 164, 0.13);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  text-align: center;
}

.share-stats b {
  color: var(--text);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 0.9;
}

.reading-copy {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.result-progress {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(237, 207, 139, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(237, 207, 139, 0.12), transparent 40%),
    rgba(255, 248, 233, 0.03);
}

.result-progress p {
  margin: 0;
}

.result-progress small {
  color: var(--muted);
  line-height: 1.55;
}

.spread-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.spread-nav button {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(237, 207, 139, 0.14);
  border-radius: 18px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(11, 10, 7, 0.18)),
    rgba(14, 12, 9, 0.5);
  text-align: left;
  transition: transform 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.spread-nav button:hover,
.spread-nav button.is-active {
  transform: translateY(-3px);
  border-color: rgba(237, 207, 139, 0.38);
  color: var(--text);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.spread-nav button.is-new {
  border-color: rgba(127, 160, 173, 0.42);
  box-shadow: 0 0 0 1px rgba(127, 160, 173, 0.2), 0 14px 28px rgba(0, 0, 0, 0.24);
}

.spread-nav span,
.spread-nav strong {
  display: block;
}

.spread-nav span {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.spread-nav strong {
  font-family: var(--cn-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}

.spread-nav.is-celtic-cross {
  position: relative;
  grid-template-columns: 0.82fr 1fr 1.08fr 1fr 0.32fr 0.92fr;
  grid-template-rows: repeat(4, minmax(72px, 1fr));
  min-height: 374px;
  gap: 8px;
  padding: 6px;
  border-radius: 20px;
  background:
    linear-gradient(rgba(237, 207, 139, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(237, 207, 139, 0.05) 1px, transparent 1px) 0 0 / 16.666% 100%,
    rgba(8, 7, 5, 0.24);
}

.spread-nav.is-celtic-cross::before {
  content: "中心交叉";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  color: rgba(237, 207, 139, 0.2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  transform: translate(-50%, -50%);
}

.spread-nav.is-celtic-cross button {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 249, 232, 0.14), transparent 40%),
    linear-gradient(165deg, #3a2b19, #17120b);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.24);
}

.spread-nav.is-celtic-cross button::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(235, 211, 165, 0.16);
  border-radius: 8px;
  pointer-events: none;
}

.spread-nav.is-celtic-cross button:hover,
.spread-nav.is-celtic-cross button.is-active {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(237, 207, 139, 0.66);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(237, 207, 139, 0.16);
}

.spread-nav.is-celtic-cross button.is-active {
  z-index: 4;
}

.spread-nav.is-celtic-cross span {
  margin-bottom: 4px;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.spread-nav.is-celtic-cross strong {
  font-size: clamp(13px, 1.4vw, 17px);
}

.spread-nav.is-celtic-cross button[data-index="0"] {
  grid-column: 3;
  grid-row: 2;
  margin: 10px 6px;
}

.spread-nav.is-celtic-cross button[data-index="1"] {
  z-index: 3;
  grid-column: 3;
  grid-row: 2;
  min-height: 42px;
  margin: auto -18px;
  padding: 6px 14px;
  background: linear-gradient(90deg, #25180c, #513c20, #25180c);
}

.spread-nav.is-celtic-cross button[data-index="1"] span,
.spread-nav.is-celtic-cross button[data-index="1"] strong {
  display: inline;
}

.spread-nav.is-celtic-cross button[data-index="1"] span::after {
  content: " · ";
}

.spread-nav.is-celtic-cross button[data-index="2"] {
  grid-column: 3;
  grid-row: 3;
}

.spread-nav.is-celtic-cross button[data-index="3"] {
  grid-column: 2;
  grid-row: 2;
}

.spread-nav.is-celtic-cross button[data-index="4"] {
  grid-column: 3;
  grid-row: 1;
}

.spread-nav.is-celtic-cross button[data-index="5"] {
  grid-column: 4;
  grid-row: 2;
}

.spread-nav.is-celtic-cross button[data-index="6"] {
  grid-column: 6;
  grid-row: 4;
}

.spread-nav.is-celtic-cross button[data-index="7"] {
  grid-column: 6;
  grid-row: 3;
}

.spread-nav.is-celtic-cross button[data-index="8"] {
  grid-column: 6;
  grid-row: 2;
}

.spread-nav.is-celtic-cross button[data-index="9"] {
  grid-column: 6;
  grid-row: 1;
}

.reading-copy article {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.reading-copy .challenge-card {
  padding: 18px;
  border: 1px solid rgba(237, 207, 139, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(237, 207, 139, 0.12), transparent 42%),
    rgba(237, 207, 139, 0.045);
}

.reading-copy .spread-story-card {
  padding: 18px;
  border: 1px solid rgba(237, 207, 139, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 16%, rgba(237, 207, 139, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 56%),
    rgba(14, 12, 9, 0.44);
}

.reading-copy .oracle-thread-card {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(201, 169, 111, 0.26);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(232, 216, 182, 0.075) 1px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(245, 232, 198, 0.09), rgba(92, 64, 32, 0.055)),
    #21180f;
}

.oracle-thread-card::before {
  content: "";
  position: absolute;
  top: 66px;
  bottom: 26px;
  left: 30px;
  width: 1px;
  background: linear-gradient(180deg, rgba(231, 202, 142, 0.78), rgba(231, 202, 142, 0.1));
}

.oracle-thread {
  position: relative;
  display: grid;
  gap: 10px;
}

.oracle-message {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px 14px 13px 28px;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  text-align: left;
}

.oracle-message::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #21180f;
  border-radius: 50%;
  background: var(--gold-hot);
  box-shadow: 0 0 0 1px rgba(237, 207, 139, 0.58);
}

.oracle-message span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.oracle-message strong {
  font-family: var(--cn-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.oracle-message p {
  margin: 1px 0 0;
  color: rgba(240, 229, 207, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.oracle-message-question {
  background: rgba(255, 247, 228, 0.035);
}

.oracle-message-answer {
  border: 1px solid rgba(237, 207, 139, 0.18);
  background: rgba(16, 11, 6, 0.32);
}

.oracle-message-next {
  cursor: pointer;
  border: 1px dashed rgba(237, 207, 139, 0.32);
  background: rgba(237, 207, 139, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.oracle-message-next:hover {
  transform: translateX(4px);
  border-color: rgba(237, 207, 139, 0.68);
  background: rgba(237, 207, 139, 0.13);
}

.oracle-thread-action {
  width: fit-content;
  min-height: 44px;
  padding-inline: 18px;
}

.spread-story {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.spread-story button {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 16px 14px 20px;
  border: 1px solid rgba(233, 210, 164, 0.14);
  border-radius: 18px;
  color: var(--muted);
  text-align: left;
  background:
    linear-gradient(90deg, rgba(237, 207, 139, 0.075), transparent 42%),
    rgba(255, 255, 255, 0.025);
  transition: transform 0.22s ease, border-color 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.spread-story button::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: rgba(237, 207, 139, 0.16);
}

.spread-story button:hover,
.spread-story button.is-active {
  transform: translateY(-2px);
  border-color: rgba(237, 207, 139, 0.38);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(237, 207, 139, 0.13), transparent 54%),
    rgba(237, 207, 139, 0.045);
}

.spread-story button.is-active::before {
  background: var(--gold-hot);
  box-shadow: 0 0 16px rgba(237, 207, 139, 0.42);
}

.spread-story span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.spread-story strong {
  color: var(--text);
  font-family: var(--cn-serif);
  font-size: 20px;
  line-height: 1.1;
}

.spread-story small,
.spread-story em {
  color: inherit;
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.spread-story em {
  color: rgba(240, 229, 207, 0.62);
}

.reading-copy .integration-card {
  padding: 18px;
  border: 1px solid rgba(127, 160, 173, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 18%, rgba(127, 160, 173, 0.16), transparent 40%),
    rgba(127, 160, 173, 0.05);
}

.reading-copy .journal-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 48%),
    rgba(12, 10, 7, 0.42);
}

.reading-copy p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reading-copy h3 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.followup-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.followup-prompts button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(233, 210, 164, 0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  line-height: 1.3;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.followup-prompts button:hover {
  transform: translateY(-2px);
  border-color: rgba(233, 210, 164, 0.34);
  background: rgba(237, 207, 139, 0.09);
}

.first-run-meter {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(237, 207, 139, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(237, 207, 139, 0.1), transparent 56%),
    rgba(255, 255, 255, 0.03);
}

.first-run-meter span {
  display: inline-grid;
  min-width: 56px;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #21170f;
  background: var(--gold-hot);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.first-run-meter strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.first-reading-checklist {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid rgba(237, 207, 139, 0.14);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(237, 207, 139, 0.045);
  line-height: 1.5;
  list-style: none;
}

.first-reading-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(233, 210, 164, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.first-reading-checklist li::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(237, 207, 139, 0.32);
  border-radius: 999px;
  background: rgba(8, 7, 4, 0.36);
  box-shadow: inset 0 0 0 4px rgba(8, 7, 4, 0.26);
}

.first-reading-checklist li.is-complete {
  color: var(--text);
  border-color: rgba(127, 160, 173, 0.24);
  background: rgba(127, 160, 173, 0.07);
  transform: translateX(2px);
}

.first-reading-checklist li.is-complete::before {
  content: "✓";
  display: grid;
  place-items: center;
  color: #102022;
  border-color: transparent;
  background: var(--gold-hot);
  box-shadow: 0 0 16px rgba(237, 207, 139, 0.25);
  font-size: 12px;
  font-weight: 900;
}

.journal-mood {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journal-mood button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(233, 210, 164, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.22s ease, border-color 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.journal-mood button:hover,
.journal-mood button.is-active {
  transform: translateY(-2px);
  border-color: rgba(237, 207, 139, 0.38);
  color: #21170f;
  background: var(--gold-hot);
}

.journal-field {
  display: grid;
  gap: 8px;
}

.journal-field span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.journal-field input,
.journal-field textarea {
  width: 100%;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 16px;
  color: var(--text);
  background: rgba(8, 7, 4, 0.4);
  line-height: 1.6;
}

.journal-field input {
  min-height: 46px;
  padding: 0 14px;
}

.journal-field textarea {
  min-height: 116px;
  padding: 14px;
  resize: vertical;
}

.journal-prompts {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(237, 207, 139, 0.22);
  border-radius: 18px;
  background: rgba(237, 207, 139, 0.045);
}

.journal-prompts div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journal-prompts button {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(12, 10, 7, 0.42);
  font-size: 12px;
  line-height: 1.45;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.journal-prompts button:hover {
  transform: translateY(-2px);
  border-color: rgba(237, 207, 139, 0.36);
  background: rgba(237, 207, 139, 0.09);
}

.journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.revisit-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(127, 160, 173, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 18%, rgba(127, 160, 173, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(237, 207, 139, 0.08), transparent 58%),
    rgba(10, 16, 17, 0.52);
  overflow: hidden;
}

.revisit-card[hidden] {
  display: none;
}

.revisit-card::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 46px;
  height: 46px;
  background:
    linear-gradient(135deg, rgba(237, 207, 139, 0.22), rgba(237, 207, 139, 0.02) 48%, transparent 50%);
  border-bottom-left-radius: 16px;
}

.revisit-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.revisit-card strong {
  color: var(--text);
  font-family: var(--cn-serif);
  font-size: 22px;
  line-height: 1.12;
}

.revisit-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.revisit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#journal-status {
  color: var(--muted);
  line-height: 1.55;
}

#resume-note {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

blockquote {
  margin: 8px 0 0;
  padding: 22px;
  border-left: 1px solid var(--gold);
  color: var(--text);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.94;
}

.result-actions {
  justify-content: flex-start;
}

.secondary-result-actions .button {
  min-height: 44px;
}

.library-shell,
.flow-shell,
.faq-shell {
  padding-top: 92px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.review-queue {
  display: grid;
  grid-template-columns: 0.85fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.review-queue[hidden] {
  display: none;
}

.review-queue-head,
.review-card {
  padding: 18px;
  border: 1px solid rgba(237, 207, 139, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 18%, rgba(127, 160, 173, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 58%),
    rgba(16, 13, 9, 0.72);
}

.review-queue-head {
  border-color: rgba(127, 160, 173, 0.22);
  background:
    radial-gradient(circle at 10% 18%, rgba(127, 160, 173, 0.18), transparent 42%),
    rgba(9, 15, 16, 0.7);
}

.review-queue-head span,
.review-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.review-queue-head strong,
.review-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-family: var(--cn-serif);
  font-size: 22px;
  line-height: 1.12;
}

.review-queue-head p,
.review-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.review-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.review-card small {
  color: rgba(240, 229, 207, 0.58);
  line-height: 1.45;
}

.review-card .button {
  width: fit-content;
  margin-top: 4px;
}

.diary-toolbar,
.diary-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(230, 212, 173, 0.052), rgba(230, 212, 173, 0.018)),
    rgba(16, 13, 9, 0.78);
  box-shadow: var(--shadow);
}

.diary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.resume-code-form {
  display: grid;
  min-width: min(360px, 100%);
  gap: 8px;
}

.resume-code-form label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.resume-code-form div {
  display: flex;
  gap: 8px;
}

.resume-code-form input {
  min-height: 44px;
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(230, 212, 173, 0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 7, 4, 0.72);
  padding: 0 14px;
  text-transform: uppercase;
}

.resume-code-form small {
  color: var(--muted);
  line-height: 1.45;
}

.diary-toolbar span,
.diary-reading span,
.timeline-entry span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.diary-toolbar strong {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.55;
}

.diary-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.diary-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 16px;
  margin-top: 16px;
}

.diary-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.diary-panel h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.diary-list,
.diary-timeline {
  display: grid;
  gap: 12px;
}

.diary-reading,
.timeline-entry,
.diary-empty {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(233, 210, 164, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(237, 207, 139, 0.09), transparent 36%),
    rgba(9, 8, 6, 0.44);
}

.diary-reading strong,
.timeline-entry strong,
.diary-empty strong {
  font-family: var(--cn-serif);
  font-size: 21px;
  line-height: 1.12;
}

.diary-reading small,
.timeline-entry p,
.timeline-entry small,
.diary-empty span {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.timeline-entry {
  position: relative;
  padding-left: 20px;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(rgba(237, 207, 139, 0.5), transparent);
}

.recent-card,
.recent-empty {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(230, 212, 173, 0.05), rgba(230, 212, 173, 0.02)),
    rgba(16, 13, 9, 0.82);
  box-shadow: var(--shadow);
}

.recent-card {
  display: grid;
  gap: 14px;
}

.recent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-meta span,
.recent-card small {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recent-card h3,
.recent-empty h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.recent-card p,
.recent-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.recent-journal {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(127, 160, 173, 0.22);
  border-radius: 999px;
  color: rgba(240, 229, 207, 0.72);
  background: rgba(127, 160, 173, 0.06);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-card .button {
  justify-self: flex-start;
}

.recent-empty {
  display: grid;
  place-items: start;
}

.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(
    circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(237, 207, 139, 0.22),
    transparent 24rem
  );
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

.tilted-surface {
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  transform-style: preserve-3d;
}

.poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.poster-overlay[hidden] {
  display: none;
}

.poster-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 3, 0.76);
  backdrop-filter: blur(16px);
}

.poster-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 0.72fr);
  gap: 22px;
  width: min(1120px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(233, 210, 164, 0.2);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 42%),
    rgba(15, 12, 8, 0.94);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.58);
}

.poster-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.poster-copy h2 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.88;
}

.poster-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#poster-status {
  color: var(--muted);
  line-height: 1.6;
}

.poster-preview {
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(233, 210, 164, 0.16);
  border-radius: 24px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 10px),
    rgba(255, 248, 233, 0.04);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

#poster-canvas {
  display: block;
  width: min(100%, 420px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.section-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-head h2 {
  max-width: 12ch;
}

.card-library {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.library-card {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 16px;
  color: #251a10;
  background:
    repeating-linear-gradient(90deg, rgba(55, 38, 22, 0.075) 0 1px, transparent 1px 7px),
    var(--paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.library-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
}

.library-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(57, 39, 24, 0.26);
  border-radius: 18px;
}

.library-card strong,
.library-card em,
.library-card span,
.library-card p {
  position: relative;
  z-index: 1;
}

.library-card span {
  display: block;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.library-card strong {
  display: block;
  margin-top: 372px;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 0.92;
  text-align: center;
}

.library-card em {
  display: block;
  margin-top: 8px;
  font-family: var(--cn-serif);
  font-style: normal;
  text-align: center;
}

.library-card p {
  margin: 28px 8px 0;
  color: rgba(37, 26, 16, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.library-image {
  position: absolute;
  left: 50%;
  top: 48px;
  width: min(72%, 230px);
  aspect-ratio: 0.666;
  border: 1px solid rgba(48, 32, 19, 0.3);
  border-radius: 12px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(240, 220, 176, 0.08), rgba(0, 0, 0, 0.12)),
    var(--card-image),
    var(--atlas-image),
    conic-gradient(var(--card-a), var(--card-b), var(--card-c), var(--card-a));
  background-position: center, center, var(--atlas-x, 0%) var(--atlas-y, 0%), center;
  background-size: cover, cover, var(--atlas-size, 400% 600%), cover;
  box-shadow:
    inset 0 0 0 6px rgba(236, 215, 174, 0.1),
    0 12px 26px rgba(54, 36, 20, 0.22);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.library-card:hover .library-image {
  transform: translateX(-50%) translateY(-5px) scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.topics-grid,
.faq-grid,
.seo-page-grid,
.recent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.topic-card,
.faq-item,
.seo-page-card,
.seo-feature-card,
.seo-step-card {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(230, 212, 173, 0.05), rgba(230, 212, 173, 0.02)),
    rgba(16, 13, 9, 0.82);
  box-shadow: var(--shadow);
}

.topic-card {
  display: block;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 210, 164, 0.34);
}

.topic-card span {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.topic-card h3,
.faq-item h3,
.seo-page-card h3,
.seo-feature-card h3,
.seo-step-card h3 {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 28px;
  line-height: 0.96;
}

.topic-card p,
.faq-item p,
.seo-page-card p,
.seo-feature-card p,
.seo-step-card p,
.seo-page-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-page-main {
  max-width: 1240px;
}

.seo-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.seo-page-copy,
.seo-page-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(230, 212, 173, 0.05), rgba(230, 212, 173, 0.02)),
    rgba(14, 11, 8, 0.84);
  box-shadow: var(--shadow);
}

.seo-page-copy h1 {
  margin: 12px 0 18px;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.92;
}

.seo-page-panel h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

.seo-page-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.seo-hero-motion {
  min-height: 560px;
  align-content: center;
}

.seo-hero-motion h2,
.seo-hero-motion ul {
  position: relative;
  z-index: 2;
}

.seo-page-section {
  padding-top: 92px;
}

.seo-rich-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 18px;
  align-items: start;
}

.seo-longform {
  display: grid;
  gap: 18px;
}

.seo-longform article {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.seo-longform h2,
.seo-longform h3 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.98;
}

.seo-longform p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.seo-feature-grid,
.seo-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.seo-step-card span {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.seo-aside-list {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 112px;
}

.flow-grid article {
  padding: 20px;
}

.flow-grid span {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.flow-grid h3 {
  margin: 30px 0 12px;
  font-size: 28px;
  line-height: 0.96;
}

.api-preview {
  margin: 18px 0 0;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: rgba(240, 229, 207, 0.76);
  background: #080704;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(33, 23, 15, 0.24);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(33, 23, 15, 0);
    transform: scale(1.18);
  }
}

@keyframes buttonSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

@keyframes stageRingDrift {
  from {
    transform: translate(-50%, -50%) rotate(-8deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(352deg);
  }
}

@keyframes oracleAuraSpin {
  from {
    transform: rotate(-12deg);
  }

  to {
    transform: rotate(348deg);
  }
}

@keyframes heroCardFront {
  0%,
  100% {
    transform: translate3d(-50%, -50%, 84px) rotate(-2deg);
  }

  45% {
    transform: translate3d(-49%, -53%, 96px) rotate(1.5deg);
  }

  72% {
    transform: translate3d(-51%, -49%, 88px) rotate(-4deg);
  }
}

@keyframes heroCardMid {
  0%,
  100% {
    transform: translate3d(-56%, -48%, 24px) rotate(-14deg);
  }

  42% {
    transform: translate3d(-61%, -50%, 34px) rotate(-19deg);
  }

  74% {
    transform: translate3d(-53%, -47%, 26px) rotate(-10deg);
  }
}

@keyframes heroCardBack {
  0%,
  100% {
    transform: translate3d(-43%, -46%, -28px) rotate(13deg);
  }

  48% {
    transform: translate3d(-38%, -49%, -18px) rotate(18deg);
  }

  76% {
    transform: translate3d(-45%, -45%, -24px) rotate(10deg);
  }
}

@keyframes heroChipFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 36px);
  }

  50% {
    transform: translate3d(0, -12px, 54px);
  }
}

@keyframes loaderFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-12px) rotate(3deg);
  }
}

@media (max-width: 1180px) {
  .hero,
  .ritual-shell,
  .result-shell,
  .diary-layout,
  .flow-grid,
  .seo-page-hero,
  .poster-dialog,
  .seo-rich-layout {
    grid-template-columns: 1fr;
  }

  .ritual-panel,
  .stage-wrap {
    position: relative;
    top: auto;
  }

  .ritual-shell {
    min-height: auto;
  }

  .card-library,
  .topics-grid,
  .seo-page-grid,
  .review-queue,
  .recent-grid,
  .seo-feature-grid,
  .seo-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seo-aside-list {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr auto;
    border-radius: 22px;
  }

  .wordmark small,
  .topnav {
    display: none;
  }

  .lang-switch {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 8px;
  }

  .ritual-dock {
    left: 12px;
    right: 12px;
    bottom: 10px;
    overflow-x: auto;
    justify-content: flex-start;
    transform: translateY(var(--dock-offset-y));
  }

  .ritual-dock a,
  .ritual-dock button {
    min-width: max-content;
    padding: 0 12px;
  }

  .ritual-dock [data-dock-optional] {
    display: none;
  }

  .toast-region {
    top: 132px;
    left: 14px;
    right: 14px;
    width: auto;
  }

  main {
    padding: 96px 14px 82px;
  }

  .ticker-band {
    margin-left: -14px;
    margin-right: -14px;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 13vw, 4.7rem);
  }

  .hero-oracle,
  .seo-hero-motion {
    min-height: 560px;
  }

  .hero-card-stack {
    width: min(100%, 280px);
    height: 390px;
  }

  .hero-card-stack-compact {
    width: min(100%, 236px);
    height: 320px;
  }

  .hero-orbit-note {
    display: none;
  }

  .hero-metric-row {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .loader-actions,
  .result-actions,
  .diary-toolbar,
  .diary-toolbar-actions,
  .resume-code-form div,
  .question-coach-actions,
  .journal-prompts div,
  .revisit-actions,
  .journal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grid,
  .card-library,
  .topics-grid,
  .faq-grid,
  .seo-page-grid,
  .scenario-grid,
  .review-queue,
  .recent-grid,
  .seo-feature-grid,
  .seo-step-grid {
    grid-template-columns: 1fr;
  }

  .spread-nav.is-celtic-cross {
    grid-template-columns: 0.78fr 1fr 1.08fr 1fr 0.2fr 0.9fr;
    grid-template-rows: repeat(4, minmax(62px, 1fr));
    min-height: 316px;
    gap: 5px;
    padding: 4px;
  }

  .spread-nav.is-celtic-cross button {
    min-width: 0;
    padding: 7px 5px;
  }

  .spread-nav.is-celtic-cross button[data-index="1"] {
    margin-inline: -12px;
    padding-inline: 9px;
  }

  .spread-nav.is-celtic-cross span {
    overflow-wrap: anywhere;
  }

  .spread-nav.is-celtic-cross strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .poster-overlay {
    padding: 12px;
  }

  .poster-dialog {
    max-height: 94vh;
    padding: 16px;
    border-radius: 22px;
  }

  .poster-preview {
    min-height: auto;
    padding: 12px;
  }

  .poster-copy h2 {
    font-size: clamp(2.6rem, 12vw, 4.1rem);
  }

  .stage-guide {
    max-width: calc(100% - 32px);
    text-align: center;
    white-space: normal;
  }

  .stage-readiness {
    bottom: 14px;
    max-width: calc(100% - 24px);
    overflow-x: auto;
  }

  .stage-intent {
    top: 62px;
    left: 16px;
    width: min(290px, calc(100% - 32px));
  }

  .stage-readiness span {
    min-width: max-content;
    padding: 0 10px;
  }

  .stage-wrap {
    min-height: 760px;
    height: 760px;
  }

  .stage-ring-a,
  .stage-ring-b {
    width: 88vw;
    height: 46vw;
  }

  .result-card h2,
  .ritual-panel h2,
  .section-head h2 {
    font-size: clamp(2.8rem, 13vw, 4.4rem);
  }
}

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