:root {
  color-scheme: dark;
  --bg: #0b0d24;
  --panel: rgba(17, 20, 49, 0.78);
  --panel-strong: rgba(9, 11, 32, 0.92);
  --ink: #f2f4ff;
  --muted: #cbd1f2;
  --magic-primary: #9b8cff;
  --magic-dim: rgba(155, 140, 255, 0.22);
  --blue: #7ebcff;
  --rose: #de7ecd;
  --line: rgba(225, 224, 255, 0.17);
  --shadow: rgba(0, 0, 0, 0.42);
  --max-width: 460px;
  --phase-bg: #0b0d24;
  --phase-bg-2: #17143a;
  --phase-accent: rgba(151, 130, 255, 0.64);
  --phase-secondary: rgba(126, 188, 255, 0.3);
  --phase-glow: rgba(132, 143, 255, 0.3);
  --phase-panel: rgba(17, 20, 49, 0.78);
  --phase-line: rgba(210, 218, 255, 0.22);
  --phase-muted: #cbd1f2;
  --phase-ink: #f2f4ff;
  --phase-mist: rgba(172, 153, 255, 0.17);
  --buttonColorHyperframes: 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, var(--phase-glow), rgba(16, 17, 31, 0) 34%),
    linear-gradient(155deg, var(--phase-bg-2), var(--phase-bg));
  transition: background-color 760ms ease, color 760ms ease;
}

body[data-motion-phase="cover"],
body:not([data-motion-phase]) {
  --phase-bg: #090b1d;
  --phase-bg-2: #151334;
  --phase-accent: rgba(132, 143, 255, 0.58);
  --phase-secondary: rgba(126, 188, 255, 0.24);
  --phase-glow: rgba(120, 135, 255, 0.26);
  --phase-panel: rgba(14, 17, 43, 0.8);
  --phase-line: rgba(202, 212, 255, 0.2);
  --phase-muted: #c5ccec;
  --phase-mist: rgba(166, 146, 255, 0.15);
}

body[data-motion-phase="ready"],
body[data-motion-phase="start-transition"] {
  --phase-bg: #0d1023;
  --phase-bg-2: #1a1740;
  --phase-accent: rgba(138, 148, 255, 0.68);
  --phase-secondary: rgba(194, 206, 255, 0.28);
  --phase-glow: rgba(138, 148, 255, 0.34);
  --phase-panel: rgba(18, 20, 45, 0.78);
  --phase-line: rgba(206, 216, 255, 0.24);
  --phase-muted: #d4d6f4;
  --phase-mist: rgba(149, 159, 255, 0.18);
}

body[data-motion-phase="question"],
body[data-motion-phase="fate-commit"] {
  --phase-bg: #0b0d25;
  --phase-bg-2: #21194a;
  --phase-accent: rgba(166, 132, 255, 0.72);
  --phase-secondary: rgba(92, 226, 238, 0.28);
  --phase-glow: rgba(151, 130, 255, 0.38);
  --phase-panel: rgba(19, 17, 52, 0.8);
  --phase-line: rgba(210, 218, 255, 0.26);
  --phase-muted: #d5d6f5;
  --phase-mist: rgba(128, 154, 255, 0.2);
}

body[data-motion-phase="sensing"],
body[data-motion-phase="result"],
body[data-motion-phase="english"],
body[data-motion-phase="transform"],
body[data-motion-phase="chinese"],
body[data-motion-phase="settle"] {
  --phase-bg: #0c0e27;
  --phase-bg-2: #24194c;
  --phase-accent: rgba(184, 157, 255, 0.62);
  --phase-secondary: rgba(92, 226, 238, 0.32);
  --phase-glow: rgba(166, 143, 255, 0.3);
  --phase-panel: rgba(17, 17, 45, 0.82);
  --phase-line: rgba(211, 218, 255, 0.22);
  --phase-muted: #d3d5f0;
  --phase-mist: rgba(126, 188, 255, 0.16);
}

button {
  font: inherit;
  letter-spacing: 0;
}

#magicCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 34%, var(--phase-glow), rgba(16, 17, 31, 0) 32%),
    radial-gradient(circle at 74% 18%, var(--phase-secondary), rgba(16, 17, 31, 0) 24%),
    linear-gradient(155deg, rgba(138, 148, 255, 0.08), rgba(151, 130, 255, 0.04) 48%, rgba(16, 17, 31, 0)),
    linear-gradient(26deg, var(--phase-mist), rgba(16, 17, 31, 0) 42%),
    var(--phase-bg);
  transition: filter 760ms ease, opacity 760ms ease;
}

body[data-motion-phase="ready"] #magicCanvas,
body[data-motion-phase="start-transition"] #magicCanvas {
  animation: hfCoolPortal 5600ms ease-in-out infinite alternate;
}

body[data-motion-phase="question"] #magicCanvas,
body[data-motion-phase="fate-commit"] #magicCanvas {
  animation: hfVioletGate 5200ms ease-in-out infinite alternate;
}

body[data-motion-phase="sensing"] #magicCanvas,
body[data-motion-phase="result"] #magicCanvas,
body[data-motion-phase="english"] #magicCanvas,
body[data-motion-phase="transform"] #magicCanvas,
body[data-motion-phase="chinese"] #magicCanvas,
body[data-motion-phase="settle"] #magicCanvas {
  animation: hfAlchemyBlend 6200ms ease-in-out infinite alternate;
}

#scene3dCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  overflow: hidden;
  perspective: 980px;
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.12;
  background-image:
    linear-gradient(var(--phase-line) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 244, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  animation: hfPhaseDrift 11000ms linear infinite;
}

.screen {
  position: fixed;
  inset: 0;
  display: none;
  min-height: 100dvh;
  overflow-y: auto;
  padding: calc(22px + env(safe-area-inset-top)) 16px
    calc(22px + env(safe-area-inset-bottom));
  z-index: 2;
}

.screen.is-active {
  display: grid;
  place-items: center;
}

.screen-sensing {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.screen-inner {
  width: 100%;
  max-width: var(--max-width);
  min-height: min(730px, calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
  position: relative;
}

.screen-inner.compact {
  min-height: min(620px, calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
}

.screen-cover {
  z-index: 6;
  background:
    radial-gradient(circle at 50% 42%, var(--phase-glow), rgba(16, 17, 31, 0) 28%),
    rgba(12, 13, 26, 0.84);
}

.screen-cover .screen-inner {
  animation: fadeLift 900ms ease both;
}

.screen-ready .screen-inner {
  z-index: 1;
}

.screen-ready::before,
.screen-ready::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.screen-ready::before {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(213, 224, 255, 0.3), rgba(138, 148, 255, 0.13) 18%, rgba(16, 17, 31, 0) 44%),
    conic-gradient(from 30deg at 50% 50%, rgba(138, 148, 255, 0), rgba(138, 148, 255, 0.22), rgba(201, 184, 255, 0.14), rgba(138, 148, 255, 0));
  filter: blur(12px);
  transform: scale(0.54) rotate(-14deg);
}

.screen-ready::after {
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(225, 232, 255, 0.18), rgba(138, 148, 255, 0.1) 22%, rgba(16, 17, 31, 0) 47%),
    linear-gradient(90deg, rgba(12, 13, 28, 0.82), rgba(16, 17, 31, 0), rgba(12, 13, 28, 0.82));
  transform: perspective(900px) rotateX(66deg) scale(0.72);
  transform-origin: 50% 58%;
  filter: blur(8px);
}

.screen-question::before,
.screen-question::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.screen-question::before {
  background:
    radial-gradient(circle at 50% 42%, rgba(183, 200, 255, 0.3), rgba(151, 130, 255, 0.11) 20%, rgba(9, 11, 29, 0) 48%),
    conic-gradient(from 160deg at 50% 43%, rgba(151, 130, 255, 0), rgba(151, 130, 255, 0.22), rgba(207, 215, 255, 0.12), rgba(151, 130, 255, 0));
  filter: blur(16px);
  transform: scale(1.7) rotate(120deg);
}

.screen-question::after {
  background: radial-gradient(ellipse at 50% 42%, rgba(221, 227, 255, 0.2), rgba(151, 130, 255, 0.1) 24%, rgba(9, 11, 29, 0) 52%);
  filter: blur(10px);
  transform: perspective(900px) rotateX(22deg) scale(1.6);
  transform-origin: 50% 45%;
}

.screen-question .screen-inner {
  z-index: 1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 2.12rem;
  line-height: 1.18;
  font-weight: 760;
}

h2 {
  font-size: 1.52rem;
  line-height: 1.24;
  font-weight: 730;
}

.kicker {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.lead,
.ritual-copy,
.disclaimer,
.tiny-note {
  max-width: 24rem;
  color: var(--muted);
  line-height: 1.75;
}

.lead,
.ritual-copy {
  font-size: 1rem;
}

.disclaimer {
  font-size: 0.88rem;
}

.tiny-note {
  min-height: 1.2rem;
  font-size: 0.78rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.magic-panel,
.result-panel,
.save-panel {
  position: relative;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 18px;
  border: 1px solid var(--phase-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(239, 244, 255, 0.06), transparent),
    var(--phase-panel);
  box-shadow: 0 24px 70px var(--shadow), inset 0 0 32px var(--phase-mist);
  backdrop-filter: blur(18px);
  padding: 26px 20px;
  transform-style: preserve-3d;
}

.magic-panel {
  overflow: hidden;
}

.magic-panel > * {
  position: relative;
  z-index: 2;
}

.magic-panel::before,
.magic-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.magic-panel::before {
  inset: -36%;
  opacity: 0;
  background:
    conic-gradient(from 18deg, transparent, var(--phase-accent), transparent 24%),
    conic-gradient(from 212deg, transparent, var(--phase-secondary), transparent 32%);
  filter: blur(10px);
  transform: rotate(-24deg) scale(0.78);
}

.magic-panel::after {
  inset: 18%;
  opacity: 0;
  border: 1px solid var(--phase-line);
  border-radius: 50%;
  box-shadow:
    0 0 38px var(--phase-glow),
    inset 0 0 34px var(--phase-mist);
  transform: scale(0.58) rotate(18deg);
}

.book-sigil {
  width: 126px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  animation: floatSoft 2200ms ease-in-out infinite;
}

body[data-motion-phase="cover"] .book-sigil {
  animation: coverSigilAwaken 3000ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="cover"] .cover-inner h1 {
  animation: coverTitleGlow 3000ms ease both;
}

.auth-form {
  width: min(100%, 320px);
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 8px;
}

.auth-code-input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(202, 212, 255, 0.46);
  border-radius: 8px;
  background: rgba(8, 10, 28, 0.58);
  color: var(--ink);
  box-shadow:
    inset 0 0 24px rgba(138, 148, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.2);
  font-size: 1.18rem;
  font-weight: 760;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-code-input::placeholder {
  color: rgba(203, 209, 242, 0.58);
  font-size: 0.92rem;
  font-weight: 520;
  letter-spacing: 0;
}

.auth-code-input:focus {
  border-color: rgba(225, 232, 255, 0.88);
  background: rgba(10, 12, 34, 0.78);
  box-shadow:
    inset 0 0 28px rgba(138, 148, 255, 0.18),
    0 0 0 3px rgba(138, 148, 255, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.28);
}

.auth-form[data-auth-tone="error"] .auth-code-input {
  border-color: rgba(255, 145, 170, 0.82);
  box-shadow:
    inset 0 0 24px rgba(255, 145, 170, 0.1),
    0 0 0 3px rgba(255, 145, 170, 0.12);
}

.auth-submit-button {
  min-width: min(100%, 180px);
  min-height: 46px;
}

.auth-submit-button:disabled,
.auth-code-input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-status {
  color: var(--phase-muted);
}

.auth-form[data-auth-tone="error"] .auth-status {
  color: #ffb7c7;
}

.auth-form[data-auth-tone="success"] .auth-status {
  color: #c8ffe5;
}

.book-sigil::before,
.book-sigil::after,
.book-sigil span,
.book-sigil i {
  content: "";
  position: absolute;
  border: 1px solid rgba(151, 130, 255, 0.56);
}

.book-sigil::before {
  inset: 12px;
  transform: rotate(45deg);
  box-shadow: 0 0 32px rgba(151, 130, 255, 0.26);
}

.book-sigil::after {
  inset: 34px;
  border-radius: 50%;
  border-color: rgba(124, 167, 199, 0.48);
  animation: rotateSlow 8s linear infinite;
}

.book-sigil span {
  width: 74px;
  height: 92px;
  border-radius: 7px;
  background: rgba(239, 244, 255, 0.06);
}

.book-sigil i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--magic-primary);
  box-shadow: 0 0 26px rgba(151, 130, 255, 0.66);
}

.button {
  position: relative;
  min-width: 160px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  isolation: isolate;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.button::before,
.button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.button::before {
  inset: -90%;
  opacity: 0;
  background: conic-gradient(from 0deg, transparent, rgba(223, 231, 255, 0.5), transparent 24%);
  transform: rotate(0deg) scale(0.64);
}

.button::after {
  inset: 16%;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 226, 255, 0.52), transparent 62%);
  filter: blur(10px);
  transform: scale(0.6);
}

.button.primary {
  color: #f2f4ff;
  font-weight: 760;
  background: linear-gradient(180deg, #9e92ff, #5950aa);
  border-color: rgba(207, 215, 255, 0.72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), 0 0 20px rgba(151, 130, 255, 0.16);
}

.image-button {
  display: inline-grid;
  place-items: center;
  width: min(100%, 360px);
  height: 62px;
  min-height: 62px;
  padding: 0 24px;
  border-radius: 10px;
  background: transparent;
  transform-style: preserve-3d;
}

.image-button::before,
.image-button::after {
  z-index: 1;
}

.button-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.button-label {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.image-button.is-click-feedback .button-art {
  animation: imageButtonArtPressGlow 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.image-button.is-click-feedback .button-label {
  animation: imageButtonLabelPress 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#startButton {
  min-width: min(100%, 190px);
  color: rgba(242, 246, 255, 0.96);
  border-color: rgba(203, 219, 255, 0.82);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(138, 148, 255, 0.3),
    0 0 70px rgba(201, 184, 255, 0.12),
    inset 0 0 22px rgba(218, 229, 255, 0.2);
  text-shadow:
    0 1px 8px rgba(12, 10, 26, 0.72),
    0 0 18px rgba(222, 230, 255, 0.4);
  animation: mysticButtonAwaken 3200ms ease-in-out infinite;
}

#startButton::before {
  opacity: 0.32;
  background:
    conic-gradient(from 0deg, rgba(138, 148, 255, 0), rgba(216, 226, 255, 0.54), rgba(138, 148, 255, 0.28), rgba(138, 148, 255, 0));
  animation: startButtonRunesIdle 6200ms linear infinite;
}

#startButton::after {
  inset: 10%;
  opacity: 0.32;
  background:
    radial-gradient(circle at 50% 50%, rgba(239, 244, 255, 0.46), rgba(138, 148, 255, 0.2) 34%, rgba(138, 148, 255, 0) 68%);
  animation: startButtonCoreIdle 2400ms ease-in-out infinite;
}

#readyButton {
  min-width: min(100%, 190px);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  color: rgba(237, 240, 255, 0.94);
  border-color: rgba(214, 221, 255, 0.86);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(151, 130, 255, 0.22),
    inset 0 0 18px rgba(225, 231, 255, 0.28);
  text-shadow:
    0 2px 7px rgba(8, 7, 28, 0.96),
    0 0 18px rgba(183, 200, 255, 0.58);
}

#readyButton .button-art {
  -webkit-user-drag: none;
}

#readyButton::before {
  inset: -96%;
  opacity: 0;
  background:
    conic-gradient(from 28deg, rgba(207, 215, 255, 0), rgba(224, 228, 255, 0.52), rgba(151, 130, 255, 0.24), rgba(85, 73, 176, 0.18), rgba(207, 215, 255, 0));
  transform: rotate(0deg) scale(0.66);
}

#readyButton::after {
  inset: 9%;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(236, 239, 255, 0.52), rgba(151, 130, 255, 0.24) 36%, rgba(85, 73, 176, 0.1) 54%, rgba(151, 130, 255, 0) 72%);
  filter: blur(10px);
  transform: scale(0.68);
}

.button.secondary {
  color: var(--ink);
  background: rgba(239, 244, 255, 0.07);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.delayed-action {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.delayed-action.is-ready {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: fateButtonAura 3200ms ease-in-out infinite;
}

.delayed-action.is-ready::before {
  opacity: 0.36;
  animation: fateRuneOrbit 5200ms linear infinite;
}

.delayed-action.is-ready::after {
  opacity: 0.52;
  animation: fateButtonGlow 2800ms ease-in-out infinite;
}

#readyButton.is-ready {
  animation: fateButtonMysticAwaken 3200ms ease-in-out infinite;
}

#readyButton.is-ready::before {
  opacity: 0.42;
  animation: readyFateRuneOrbit 5800ms linear infinite;
}

#readyButton.is-ready::after {
  opacity: 0.48;
  animation: readyFateCoreIdle 2600ms ease-in-out infinite;
}

.question-ritual-stage {
  position: relative;
  width: 100%;
  min-height: clamp(370px, 58vh, 430px);
  display: grid;
  place-items: center;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.question-guidance {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 18px;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  transition:
    opacity 120ms linear,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 320ms ease;
}

.hold-magic-seal {
  position: absolute;
  width: min(78vw, 310px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate3d(0, 18px, -80px) scale(0.72) rotateX(28deg);
  transform-style: preserve-3d;
  filter: blur(12px);
  pointer-events: none;
  transition:
    opacity 160ms linear,
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 360ms ease;
  will-change: opacity, transform, filter;
}

.hold-magic-seal::before,
.hold-magic-seal::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.hold-magic-seal::before {
  inset: 4%;
  background: radial-gradient(circle, rgba(232, 237, 255, 0.12), rgba(151, 130, 255, 0.05) 38%, rgba(138, 148, 255, 0.07) 58%, transparent 72%);
  box-shadow: 0 0 42px rgba(151, 130, 255, 0.16), inset 0 0 42px rgba(138, 148, 255, 0.08);
  filter: blur(4px);
}

.hold-magic-seal::after {
  inset: 23%;
  border: 1px solid rgba(188, 201, 255, 0.24);
  box-shadow: 0 0 28px rgba(178, 192, 255, 0.18), inset 0 0 24px rgba(201, 184, 255, 0.12);
}

.magic-seal-svg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateZ(18px) rotate(-10deg);
  filter: drop-shadow(0 0 8px rgba(151, 130, 255, 0.12));
  will-change: transform, filter;
}

.seal-base {
  stroke: rgba(151, 130, 255, 0.2);
  stroke-width: 1.2;
}

.seal-progress {
  fill: none;
  stroke: #dfe7ff;
  stroke-width: 2.4;
  stroke-dasharray: 1;
  filter:
    drop-shadow(0 0 5px rgba(232, 237, 255, 0.96))
    drop-shadow(0 0 12px rgba(151, 130, 255, 0.72));
  transition: stroke-dashoffset 36ms linear;
}

.seal-progress-outer {
  stroke-dashoffset: var(--seal-outer-offset, 1);
}

.seal-progress-runes {
  stroke: #d9d8ff;
  stroke-dashoffset: var(--seal-runes-offset, 1);
}

.seal-progress-geometry {
  stroke-dashoffset: var(--seal-geometry-offset, 1);
}

.seal-progress-core {
  stroke: #f4f7ff;
  stroke-width: 2.8;
  stroke-dashoffset: var(--seal-core-offset, 1);
}

.seal-orbit-mark {
  position: absolute;
  z-index: 3;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: #eef2ff;
  box-shadow: 0 0 10px #eef2ff, 0 0 24px rgba(151, 130, 255, 0.84);
}

.seal-orbit-mark-one {
  top: 6%;
  left: 49%;
}

.seal-orbit-mark-two {
  right: 10%;
  bottom: 24%;
}

.seal-vessel-emergence {
  position: absolute;
  z-index: 5;
  width: 62%;
  opacity: 0;
  transform: translate3d(0, 34px, -160px) rotateX(58deg) scale(0.16);
  transform-style: preserve-3d;
  filter: blur(12px) brightness(1.4) drop-shadow(0 20px 32px rgba(0, 0, 0, 0.38));
  will-change: opacity, transform, filter;
  -webkit-user-drag: none;
}

body[data-hold-state="charging"] .question-guidance,
body[data-hold-state="completing"] .question-guidance,
body[data-hold-state="armed"] .question-guidance,
body[data-hold-state="cancelled"] .question-guidance,
body[data-hold-state="transitioning"] .question-guidance {
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  filter: blur(10px);
}

body[data-hold-state="charging"] .hold-magic-seal,
body[data-hold-state="completing"] .hold-magic-seal,
body[data-hold-state="armed"] .hold-magic-seal,
body[data-hold-state="cancelled"] .hold-magic-seal,
body[data-hold-state="transitioning"] .hold-magic-seal {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
  filter: blur(0);
}

body[data-hold-state="cancelled"] .seal-progress {
  transition-duration: var(--hold-rollback-duration, 350ms);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-hold-state="charging"] .magic-seal-svg {
  animation: chargingSealOrbit 4800ms linear infinite;
}

body[data-hold-state="charging"] .seal-orbit-mark {
  opacity: 0.58;
}

body[data-hold-state="armed"] .seal-orbit-mark {
  opacity: 1;
}

body[data-hold-state="armed"] .hold-magic-seal {
  animation: armedSealPulse 1100ms ease-in-out infinite alternate;
}

body[data-hold-state="armed"] .magic-seal-svg {
  animation: armedSealOrbit 2600ms linear infinite;
}

body[data-hold-state="charging"] #readyButton.is-ready,
body[data-hold-state="completing"] #readyButton.is-ready {
  animation: none;
  transform: translate3d(0, var(--hold-button-depth, 2px), 0)
    scale(var(--hold-button-scale, 0.98));
  filter: brightness(var(--hold-button-brightness, 1.04)) saturate(1.12);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(151, 130, 255, 0.34),
    inset 0 3px 18px rgba(236, 239, 255, 0.46),
    inset 0 -5px 15px rgba(58, 49, 132, 0.3);
  transition:
    transform 52ms linear,
    filter 80ms linear,
    box-shadow 100ms linear;
  will-change: transform, filter;
}

body[data-hold-state="charging"] #readyButton.is-ready::before,
body[data-hold-state="completing"] #readyButton.is-ready::before {
  animation: none;
  opacity: 0.7;
  transform: rotate(0deg) scale(var(--hold-button-glow-scale, 0.62));
  filter: blur(0.4px);
  transition: transform 70ms linear, opacity 90ms linear, filter 90ms linear;
}

body[data-hold-state="charging"] #readyButton.is-ready::after,
body[data-hold-state="completing"] #readyButton.is-ready::after {
  animation: none;
  opacity: var(--hold-button-core-opacity, 0.58);
  transform: scale(0.82);
  filter: blur(7px);
  transition: opacity 70ms linear, filter 90ms linear;
}

body[data-hold-state="charging"] #readyButton .button-art,
body[data-hold-state="completing"] #readyButton .button-art {
  filter: contrast(1.04) saturate(1.08);
  transform: translateY(1px) scale(0.995);
  transition: transform 70ms linear, filter 90ms linear;
}

body[data-hold-state="charging"] #readyButton .button-label,
body[data-hold-state="completing"] #readyButton .button-label {
  transform: translateY(1px) scale(0.99);
  text-shadow:
    0 2px 8px rgba(8, 7, 28, 0.98),
    0 0 15px rgba(224, 233, 255, 0.5);
  transition: transform 70ms linear, text-shadow 90ms linear;
}

body[data-hold-state="armed"] #readyButton.is-ready {
  animation: readyButtonHoldPulse 1100ms ease-in-out infinite;
  transform: translate3d(0, 4px, 0) scale(0.96);
  filter: brightness(1.18) saturate(1.12);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.44),
    0 0 22px rgba(151, 130, 255, 0.42),
    inset 0 3px 20px rgba(236, 239, 255, 0.54),
    inset 0 -6px 16px rgba(58, 49, 132, 0.34);
}

body[data-hold-state="armed"] #readyButton.is-ready::before {
  opacity: 0.78;
  animation: readyButtonHoldRune 2200ms linear infinite;
}

body[data-hold-state="armed"] #readyButton.is-ready::after {
  opacity: 0.86;
  animation: readyButtonHoldCore 1100ms ease-in-out infinite;
}

body[data-hold-state="armed"] #readyButton .button-art {
  filter: contrast(1.06) saturate(1.1);
  transform: translateY(1px) scale(0.995);
}

body[data-hold-state="armed"] #readyButton .button-label {
  transform: translateY(1px) scale(0.99);
  text-shadow:
    0 2px 9px rgba(6, 6, 24, 1),
    0 0 18px rgba(224, 233, 255, 0.58);
}

body[data-hold-state="cancelled"] #readyButton.is-ready {
  animation: none;
  transform: translate3d(0, 0, 0) scale(1);
  filter: brightness(1) saturate(1.05);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(151, 130, 255, 0.24),
    0 0 58px rgba(194, 206, 255, 0.1),
    inset 0 0 22px rgba(225, 231, 255, 0.24);
  transition:
    transform var(--hold-rollback-duration, 350ms) cubic-bezier(0.4, 0, 0.2, 1),
    filter var(--hold-rollback-duration, 350ms) cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow var(--hold-rollback-duration, 350ms) cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-hold-state="cancelled"] #readyButton.is-ready::before {
  animation: none;
  opacity: 0.42;
  transform: rotate(0deg) scale(0.68);
  filter: blur(0);
  transition:
    transform var(--hold-rollback-duration, 350ms) cubic-bezier(0.4, 0, 0.2, 1),
    opacity var(--hold-rollback-duration, 350ms) linear,
    filter var(--hold-rollback-duration, 350ms) linear;
}

body[data-hold-state="cancelled"] #readyButton.is-ready::after {
  animation: none;
  opacity: 0.32;
  transform: scale(0.74);
  filter: blur(12px);
  transition:
    transform var(--hold-rollback-duration, 350ms) cubic-bezier(0.4, 0, 0.2, 1),
    opacity var(--hold-rollback-duration, 350ms) linear,
    filter var(--hold-rollback-duration, 350ms) linear;
}

body[data-hold-state="cancelled"] #readyButton .button-art,
body[data-hold-state="cancelled"] #readyButton .button-label {
  transform: translateY(0) scale(1);
  filter: none;
  transition:
    transform var(--hold-rollback-duration, 350ms) cubic-bezier(0.4, 0, 0.2, 1),
    filter var(--hold-rollback-duration, 350ms) linear;
}

body[data-motion-phase="fate-commit"] .hold-magic-seal {
  animation: sealReleasePortal 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="fate-commit"] .seal-vessel-emergence {
  animation: sealVesselEmergence 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.breath-orb {
  width: 184px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(151, 130, 255, 0.5);
  animation: breathe 5.8s ease-in-out infinite;
  background:
    radial-gradient(circle at 50% 48%, rgba(214, 221, 255, 0.1), rgba(151, 130, 255, 0.04) 46%, rgba(9, 11, 29, 0) 68%);
}

.breath-orb::before,
.breath-orb::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(124, 167, 199, 0.26);
}

.breath-orb::before {
  inset: 20px;
  border-color: rgba(207, 215, 255, 0.34);
}

.breath-orb::after {
  inset: 46px;
  border-color: rgba(151, 130, 255, 0.34);
}

.book-card,
.summon-card {
  width: 66px;
  height: 96px;
  border-radius: 8px;
  border: 1px solid rgba(151, 130, 255, 0.7);
  background:
    linear-gradient(145deg, rgba(151, 130, 255, 0.16), transparent 50%),
    rgba(239, 244, 255, 0.07);
  box-shadow: 0 0 32px rgba(151, 130, 255, 0.2);
}

.summon-stage {
  width: 264px;
  height: 264px;
  position: relative;
  display: grid;
  place-items: center;
}

.summon-stage::before,
.summon-stage::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  pointer-events: none;
}

.summon-stage::before {
  background:
    conic-gradient(from 120deg, transparent, rgba(151, 130, 255, 0.24), rgba(201, 184, 255, 0.14), transparent 38%),
    radial-gradient(circle, rgba(138, 148, 255, 0.15), transparent 62%);
  filter: blur(8px);
  opacity: 0.72;
  animation: glyphSweep 3600ms ease-in-out infinite;
}

.summon-stage::after {
  inset: 36px;
  border: 1px solid rgba(239, 244, 255, 0.08);
  box-shadow:
    0 0 38px rgba(151, 130, 255, 0.16),
    inset 0 0 34px rgba(138, 148, 255, 0.13);
  animation: stageHalo 2600ms ease-in-out infinite alternate;
}

.rune-ring {
  position: absolute;
  border: 1px solid rgba(151, 130, 255, 0.54);
  transform: rotate(45deg);
  box-shadow: 0 0 30px rgba(151, 130, 255, 0.12);
}

.ring-one {
  inset: 22px;
  animation: rotateSlow 5.6s linear infinite;
}

.ring-two {
  inset: 56px;
  border-color: rgba(201, 184, 255, 0.48);
  border-radius: 50%;
  animation: rotateReverse 4.2s linear infinite;
}

.summon-card {
  width: 92px;
  height: 132px;
  animation: cardAwaken 1400ms ease-in-out infinite alternate;
  z-index: 2;
}

.summon-glow {
  position: absolute;
  width: 120px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 188, 255, 0.3), rgba(201, 184, 255, 0.13) 44%, transparent 68%);
  filter: blur(6px);
  animation: glowPulse 1600ms ease-in-out infinite alternate;
}

.vessel-stage {
  width: min(82vw, 344px);
  height: min(72vw, 304px);
  perspective: 980px;
  transform-style: preserve-3d;
}

.parchment-swarm {
  position: absolute;
  inset: -14%;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
  transform-style: preserve-3d;
}

.parchment-slip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--slip-w, 34px);
  aspect-ratio: 1;
  border: 0;
  opacity: 0;
  background: url("../assets/images/parchment-roll.png") center / contain no-repeat;
  filter:
    drop-shadow(0 4px 6px rgba(8, 5, 3, 0.48))
    drop-shadow(0 0 8px rgba(151, 130, 255, 0.2));
  transform: translate3d(var(--from-x), var(--from-y), var(--from-z, 0)) rotateX(var(--pitch, 0deg)) rotateZ(var(--rot-start)) scale(0.74);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
}

.answer-vessel {
  position: relative;
  z-index: 4;
  width: min(76vw, 316px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  filter: drop-shadow(0 22px 54px rgba(0, 0, 0, 0.4));
}

.answer-vessel::before,
.answer-vessel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.answer-vessel::before {
  z-index: 0;
  inset: 23% 8% 18%;
  background: radial-gradient(ellipse, rgba(231, 236, 255, 0.4), rgba(126, 176, 255, 0.18) 38%, rgba(72, 62, 161, 0.08) 56%, transparent 72%);
  filter: blur(17px);
  transform: translateZ(-34px) scale(1.08);
}

.answer-vessel::after {
  z-index: 1;
  left: 13%;
  right: 13%;
  bottom: 5%;
  height: 16%;
  background: radial-gradient(ellipse, rgba(126, 188, 255, 0.24), rgba(74, 63, 166, 0.08) 48%, transparent 72%);
  filter: blur(10px);
  transform: translateZ(-20px);
}

.vessel-art,
.vessel-front-mask,
.vessel-bowl,
.vessel-mouth,
.vessel-light,
.vessel-sigil {
  position: absolute;
  pointer-events: none;
}

.vessel-art {
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 22px 24px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 18px rgba(151, 130, 255, 0.16));
  transform: translateZ(10px);
  user-select: none;
  -webkit-user-drag: none;
}

.vessel-front-mask {
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: polygon(0 38%, 100% 38%, 100% 100%, 0 100%);
  filter:
    drop-shadow(0 18px 20px rgba(0, 0, 0, 0.32))
    drop-shadow(0 0 12px rgba(151, 130, 255, 0.12));
  transform: translateZ(46px);
  user-select: none;
  -webkit-user-drag: none;
}

.vessel-vortex {
  position: absolute;
  left: 16%;
  top: 29%;
  z-index: 3;
  width: 68%;
  height: 21%;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(205, 217, 255, 0.18), rgba(20, 19, 50, 0.42) 46%, rgba(7, 9, 24, 0.82) 78%),
    rgba(9, 10, 28, 0.72);
  box-shadow:
    inset 0 0 28px rgba(5, 7, 19, 0.84),
    inset 0 0 18px rgba(172, 191, 255, 0.24),
    0 0 24px rgba(113, 95, 225, 0.16);
  transform: translateZ(30px) perspective(860px) rotateX(62deg);
  transform-style: preserve-3d;
  isolation: isolate;
  pointer-events: none;
}

.vessel-vortex-layer,
.vessel-vortex-core {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity, filter;
}

.vessel-vortex-layer {
  inset: -30%;
  -webkit-mask-image: radial-gradient(ellipse, #000 0 58%, rgba(0, 0, 0, 0.72) 70%, transparent 84%);
  mask-image: radial-gradient(ellipse, #000 0 58%, rgba(0, 0, 0, 0.72) 70%, transparent 84%);
}

.vortex-outer {
  opacity: 0.82;
  background:
    radial-gradient(ellipse at 24% 42%, transparent 0 28%, rgba(108, 181, 255, 0.68) 36%, rgba(108, 181, 255, 0.12) 44%, transparent 55%),
    radial-gradient(ellipse at 78% 58%, transparent 0 31%, rgba(190, 211, 255, 0.5) 39%, rgba(99, 81, 209, 0.14) 48%, transparent 59%);
}

.vortex-middle {
  inset: -12%;
  opacity: 0.72;
  background:
    radial-gradient(ellipse at 64% 34%, transparent 0 25%, rgba(239, 244, 255, 0.62) 34%, rgba(207, 217, 255, 0.13) 44%, transparent 55%),
    radial-gradient(ellipse at 32% 70%, transparent 0 27%, rgba(118, 92, 225, 0.42) 36%, rgba(76, 64, 170, 0.12) 46%, transparent 58%);
}

.vortex-inner {
  inset: 8%;
  opacity: 0.78;
  background:
    radial-gradient(ellipse at 46% 48%, rgba(244, 247, 255, 0.72), rgba(139, 123, 255, 0.36) 30%, rgba(70, 58, 158, 0.12) 48%, transparent 68%),
    radial-gradient(ellipse at 68% 58%, rgba(190, 202, 255, 0.44), transparent 52%);
  -webkit-mask-image: radial-gradient(ellipse, #000 0 66%, transparent 86%);
  mask-image: radial-gradient(ellipse, #000 0 66%, transparent 86%);
}

.vessel-vortex-core {
  inset: 31%;
  z-index: 2;
  background:
    radial-gradient(circle, rgba(247, 249, 255, 0.98), rgba(177, 192, 255, 0.66) 30%, rgba(91, 78, 196, 0.28) 56%, transparent 76%);
  box-shadow:
    0 0 18px rgba(255, 244, 196, 0.84),
    0 0 36px rgba(102, 83, 214, 0.34);
  filter: blur(0);
}

.vessel-bowl {
  display: none;
}

.vessel-mouth {
  z-index: 5;
  width: 68%;
  height: 21%;
  top: 29%;
  border: 1px solid rgba(220, 228, 255, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(239, 243, 255, 0.36), rgba(126, 188, 255, 0.18) 32%, rgba(81, 69, 180, 0.1) 56%, transparent 73%);
  box-shadow:
    0 0 34px rgba(151, 130, 255, 0.26),
    inset 0 0 22px rgba(98, 80, 207, 0.18);
  transform: translateZ(28px) perspective(860px) rotateX(62deg);
}

.vessel-light {
  z-index: 5;
  width: 38%;
  top: 29%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(244, 247, 255, 0.86), rgba(126, 188, 255, 0.34) 25%, rgba(79, 66, 177, 0.12) 50%, transparent 72%);
  filter: blur(7px);
  mix-blend-mode: screen;
  opacity: 0.62;
  transform: translateZ(38px) translateY(-8%);
}

.vessel-sigil {
  display: none;
  z-index: 5;
  width: 45%;
  top: 27%;
  aspect-ratio: 1;
  border: 1px solid rgba(201, 211, 255, 0.3);
  border-radius: 50%;
  box-shadow:
    0 0 24px rgba(151, 130, 255, 0.14),
    inset 0 0 24px rgba(106, 86, 218, 0.12);
  transform: translateZ(32px) rotate(18deg);
}

body[data-motion-phase="sensing"] .parchment-slip {
  animation: parchmentFlyToVessel var(--duration, 1500ms) cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0ms) both;
}

body[data-motion-phase="sensing"] .answer-vessel {
  animation: vesselRiseFromSeal 3840ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="sensing"] .vessel-light {
  animation: vesselLightBuild 4200ms ease-in-out both;
}

body[data-motion-phase="sensing"] .vessel-mouth {
  animation: vesselMouthPulse 1600ms ease-in-out infinite alternate;
}

body[data-motion-phase="sensing"] .vessel-vortex {
  animation: vesselVortexGather 4200ms ease-in-out both;
}

body[data-motion-phase="sensing"] .vortex-outer {
  animation: vesselVortexOuter 4200ms ease-in-out infinite alternate;
}

body[data-motion-phase="sensing"] .vortex-middle {
  animation: vesselVortexMiddle 3100ms ease-in-out infinite alternate;
}

body[data-motion-phase="sensing"] .vortex-inner {
  animation: vesselVortexInner 1900ms ease-in-out infinite alternate;
}

body[data-motion-phase="sensing"] .vessel-vortex-core {
  animation: vesselVortexCore 1600ms ease-in-out infinite alternate;
}

.answer-view {
  background:
    radial-gradient(circle at 50% 40%, rgba(201, 184, 255, 0.14), transparent 30%),
    radial-gradient(circle at 42% 58%, rgba(151, 130, 255, 0.12), transparent 32%);
}

.result-panel {
  min-height: min(620px, calc(100dvh - 60px));
  position: relative;
  overflow: hidden;
}

.result-panel::before,
.result-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.result-panel::before {
  inset: -28%;
  background:
    conic-gradient(from 40deg, transparent, rgba(151, 130, 255, 0.18), transparent 26%),
    conic-gradient(from 220deg, transparent, rgba(201, 184, 255, 0.18), transparent 30%);
  opacity: 0;
  filter: blur(9px);
  transform: rotate(0deg) scale(0.88);
}

.result-panel::after {
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(239, 244, 255, 0.08), transparent),
    radial-gradient(circle at 50% 45%, rgba(201, 184, 255, 0.18), rgba(151, 130, 255, 0.12) 34%, transparent 50%);
  opacity: 0;
  transform: translateX(-38%) scaleX(0.72);
  mix-blend-mode: screen;
}

.result-panel.show-english::after {
  animation: veilReveal 1500ms ease-out both;
}

.result-panel.show-chinese::before {
  animation: glyphSweep 2600ms ease-out both;
}

.mist {
  position: absolute;
  inset: 12%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(151, 130, 255, 0.16), transparent 46%),
    radial-gradient(circle at 42% 56%, rgba(201, 184, 255, 0.2), transparent 38%);
  filter: blur(24px);
  opacity: 0.68;
  mix-blend-mode: screen;
  animation: mistDrift 5.8s ease-in-out infinite alternate;
}

.answer-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
}

.answer-en,
.answer-zh {
  max-width: 24rem;
  overflow-wrap: anywhere;
  transition:
    opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1100ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.answer-en {
  color: var(--phase-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(12px);
  text-shadow: 0 0 22px rgba(201, 184, 255, 0.18);
}

.answer-zh {
  min-height: 3.2rem;
  color: var(--ink);
  font-size: 2.08rem;
  line-height: 1.34;
  font-weight: 780;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  filter: blur(16px);
  text-shadow: 0 0 30px rgba(151, 130, 255, 0.2);
}

.result-panel.show-english .answer-en {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.result-panel.transforming .answer-en {
  opacity: 0.36;
  transform: translateY(-14px) scale(0.96);
  filter: blur(5px);
}

.result-panel.show-chinese .answer-zh {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: answerGlint 1450ms ease-out both;
}

.result-panel.show-chinese .answer-en {
  opacity: 0.58;
}

.result-panel {
  min-height: min(690px, calc(100dvh - 52px));
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(151, 130, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(239, 244, 255, 0.045), transparent),
    var(--phase-panel);
}

.result-panel > .kicker,
.result-panel .disclaimer,
.result-panel .button-row {
  position: relative;
  z-index: 4;
}

.result-panel .answer-stage {
  min-width: 0;
  max-width: 100%;
  min-height: 360px;
  align-content: center;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.floating-parchment {
  position: relative;
  z-index: 3;
  width: min(100%, 640px);
  max-width: 100%;
  min-width: 0;
  min-height: clamp(188px, 52vw, 250px);
  display: grid;
  place-items: center;
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
  transform-style: preserve-3d;
  filter: blur(0) brightness(1);
  will-change: transform, opacity, filter;
}

.result-vessel-handoff {
  position: absolute;
  left: 50%;
  top: 76%;
  z-index: 1;
  width: min(58vw, 224px);
  aspect-ratio: 1;
  opacity: 0;
  transform: translate3d(-50%, -50%, -40px) scale(0.94);
  transform-style: preserve-3d;
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.result-vessel-art,
.result-vessel-front,
.result-vessel-vortex {
  position: absolute;
  pointer-events: none;
}

.result-vessel-art,
.result-vessel-front {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.result-vessel-art {
  z-index: 1;
  filter:
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 16px rgba(151, 130, 255, 0.18));
}

.result-vessel-front {
  z-index: 4;
  clip-path: polygon(0 38%, 100% 38%, 100% 100%, 0 100%);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.24));
}

.result-vessel-vortex {
  left: 16%;
  top: 29%;
  z-index: 2;
  width: 68%;
  height: 21%;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(221, 229, 255, 0.3), rgba(23, 20, 56, 0.42) 44%, rgba(6, 8, 23, 0.82) 76%);
  box-shadow: inset 0 0 18px rgba(4, 6, 17, 0.8), 0 0 20px rgba(129, 112, 255, 0.22);
  transform: translateZ(24px) perspective(860px) rotateX(62deg);
  isolation: isolate;
}

.result-vortex-layer {
  position: absolute;
  inset: -24%;
  border-radius: 50%;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse, #000 0 62%, transparent 84%);
  mask-image: radial-gradient(ellipse, #000 0 62%, transparent 84%);
}

.result-vortex-outer {
  opacity: 0.82;
  background:
    radial-gradient(ellipse at 24% 42%, transparent 0 28%, rgba(108, 181, 255, 0.68) 36%, transparent 54%),
    radial-gradient(ellipse at 78% 58%, transparent 0 31%, rgba(190, 211, 255, 0.5) 39%, transparent 58%);
}

.result-vortex-middle {
  inset: -8%;
  opacity: 0.7;
  background:
    radial-gradient(ellipse at 64% 34%, transparent 0 25%, rgba(239, 244, 255, 0.62) 34%, transparent 54%),
    radial-gradient(ellipse at 32% 70%, transparent 0 27%, rgba(118, 92, 225, 0.42) 36%, transparent 57%);
}

.result-vortex-inner {
  inset: 12%;
  opacity: 0.84;
  background:
    radial-gradient(ellipse at 46% 48%, rgba(244, 247, 255, 0.72), rgba(139, 123, 255, 0.36) 30%, transparent 66%),
    radial-gradient(ellipse at 68% 58%, rgba(190, 202, 255, 0.44), transparent 52%);
}

.screen-result.is-active .result-vessel-handoff {
  animation: resultVesselHandoff 1450ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen-result.is-active .result-vortex-outer {
  animation: vesselVortexOuter 1450ms linear both;
}

.screen-result.is-active .result-vortex-middle {
  animation: vesselVortexMiddle 1450ms linear both;
}

.screen-result.is-active .result-vortex-inner {
  animation: vesselVortexInner 1450ms linear both;
}

.result-parchment-roll {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: clamp(76px, 27vw, 132px);
  aspect-ratio: 1;
  opacity: 0;
  object-fit: contain;
  transform: translate(-50%, -50%) translate3d(0, 70px, -120px) rotateX(68deg) rotateZ(-12deg) scale(0.18);
  transform-origin: 50% 50%;
  filter: blur(0) brightness(1.24) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.32));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, opacity, filter;
}

.parchment-answer {
  position: relative;
  z-index: 2;
  --roll-mid-left: clamp(-116px, -18vw, -70px);
  --roll-open-left: clamp(-278px, -43vw, -162px);
  --roll-mid-right: clamp(70px, 18vw, 116px);
  --roll-open-right: clamp(162px, 43vw, 278px);
  width: min(100%, 604px);
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 944 / 338;
  min-height: 132px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  row-gap: clamp(10px, 2.8vw, 16px);
  padding: clamp(22px, 6.4vw, 58px) clamp(34px, 9vw, 96px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  clip-path: inset(0 49.5% 0 49.5% round 2px);
  transform: rotateX(18deg) rotateZ(-1deg) translateY(5px) scale(0.98);
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
}

.parchment-answer::before,
.parchment-answer::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.parchment-answer::before {
  inset: 11% 7%;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255, 248, 210, 0.18), transparent 52%),
    linear-gradient(90deg, transparent, rgba(255, 251, 221, 0.18), transparent);
  mix-blend-mode: screen;
  opacity: 0;
}

.parchment-answer::after {
  inset: -12%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(151, 130, 255, 0.3), transparent 56%),
    radial-gradient(ellipse at 50% 50%, rgba(201, 184, 255, 0.18), transparent 68%);
  opacity: 0;
  filter: blur(8px);
  mix-blend-mode: screen;
}

.parchment-texture {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  filter:
    drop-shadow(0 26px 46px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 34px rgba(151, 130, 255, 0.22));
  clip-path: inset(0 0 0 0);
  will-change: clip-path, opacity, filter;
}

.paper-roll {
  position: absolute;
  z-index: 3;
  top: 14%;
  width: clamp(18px, 5vw, 30px);
  height: 74%;
  border-radius: 48% 52% 44% 56% / 8% 9% 91% 92%;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 96%, rgba(42, 20, 9, 0.72), rgba(81, 48, 24, 0.28) 28%, transparent 48%),
    linear-gradient(90deg, rgba(72, 38, 15, 0.62), rgba(221, 180, 107, 0.12) 28%, rgba(255, 239, 186, 0.2) 58%, rgba(86, 43, 16, 0.58)),
    url("../assets/images/parchment-strip.png") center / cover no-repeat;
  background-blend-mode: multiply, soft-light, normal;
  box-shadow:
    0 12px 20px rgba(0, 0, 0, 0.25),
    inset 5px 0 9px rgba(255, 244, 200, 0.2),
    inset -7px 0 10px rgba(54, 25, 9, 0.32);
  filter: drop-shadow(0 0 18px rgba(151, 130, 255, 0.18));
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.paper-roll::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: -2%;
  height: 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(31, 14, 5, 0.88) 0 28%, rgba(91, 50, 20, 0.68) 42%, rgba(224, 184, 112, 0.34) 62%, transparent 74%);
  box-shadow: inset 0 1px 2px rgba(255, 229, 168, 0.16);
}

.roll-left {
  left: 50%;
  transform-origin: 72% 50%;
}

.roll-right {
  right: 50%;
  transform-origin: 28% 50%;
}

.parchment-answer .answer-zh,
.parchment-answer .answer-en {
  position: relative;
  z-index: 4;
  max-width: 100%;
  margin: 0;
  color: #2b1b0d;
  opacity: 0;
  filter: blur(13px);
  transform: translateY(12px) scale(0.98);
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 238, 181, 0.34),
    0 0 10px rgba(69, 38, 14, 0.08);
}

.parchment-answer .answer-zh {
  grid-row: 1;
  min-height: 0;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", "SimSun", serif;
  font-size: clamp(1.48rem, 6.7vw, 2.16rem);
  line-height: 1.12;
  font-weight: 700;
  text-wrap: balance;
  transform: translateY(-8px) scale(0.98);
}

.parchment-answer .answer-en {
  grid-row: 2;
  font-family: "Papyrus", "Cochin", "Book Antiqua", "Palatino Linotype", "Palatino", "Georgia", serif;
  font-size: clamp(0.9rem, 3.65vw, 1.16rem);
  line-height: 1.22;
  font-weight: 600;
  color: rgba(54, 35, 18, 0.78);
  text-wrap: balance;
}

.parchment-reminder {
  max-width: 20rem;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(8px);
}

.result-panel .button-row {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  filter: blur(8px);
  width: min(100%, 352px);
  flex-wrap: nowrap;
}

.result-panel.parchment-arrived .result-parchment-roll {
  animation: resultParchmentRollEmerge 1200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-panel.parchment-unfurling .result-parchment-roll {
  animation: resultParchmentRollHandoff 720ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.result-panel.parchment-unfurling .parchment-answer {
  animation: parchmentUnfurl 1180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-panel.parchment-unfurling .parchment-texture {
  animation: parchmentTextureReveal 1180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-panel.parchment-unfurling .roll-left {
  animation: paperRollLeft 1180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-panel.parchment-unfurling .roll-right {
  animation: paperRollRight 1180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-panel.parchment-unfurled .parchment-answer {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: none;
}

.result-panel.parchment-unfurled .parchment-texture {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.result-panel.parchment-unfurled .paper-roll {
  opacity: 0;
  filter: blur(0) brightness(1.18);
}

.result-panel.parchment-unfurled .parchment-answer::before {
  opacity: 0.58;
}

.result-panel.parchment-unfurled .parchment-answer::after {
  opacity: 0.7;
}

.result-panel.parchment-revealed .answer-zh,
.result-panel.parchment-revealed .answer-en {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.result-panel.parchment-revealed .answer-zh {
  animation: parchmentInkBloom 1160ms ease-out both;
}

.result-panel.parchment-revealed .parchment-reminder,
.result-panel.parchment-revealed .button-row {
  animation: resultLowerContentIn 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-panel.parchment-settled .floating-parchment {
  opacity: 1;
  filter: blur(0) brightness(1);
  animation: parchmentHover 4200ms ease-in-out infinite;
}

#againButton,
#saveButton {
  flex: 1 1 0;
  width: calc((100% - 12px) / 2);
  min-width: 0;
  max-width: 176px;
  height: 54px;
  min-height: 54px;
  padding: 0 10px;
  font-size: clamp(0.9rem, 4.1vw, 0.98rem);
}

#againButton {
  color: rgba(255, 248, 232, 0.96);
  border-color: rgba(203, 219, 255, 0.76);
  text-shadow: 0 0 14px rgba(222, 230, 255, 0.34);
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34), 0 0 26px rgba(138, 148, 255, 0.22);
}

#saveButton {
  color: rgba(242, 246, 255, 0.96);
  border-color: rgba(203, 219, 255, 0.76);
  text-shadow:
    0 1px 8px rgba(12, 10, 26, 0.72),
    0 0 16px rgba(222, 230, 255, 0.34);
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34), 0 0 26px rgba(138, 148, 255, 0.22);
}

.result-panel.parchment-settled #againButton {
  animation: mysticButtonAwaken 3600ms ease-in-out infinite;
}

.result-panel.parchment-settled #saveButton {
  animation: fateButtonMysticAwaken 3600ms ease-in-out infinite;
}

body[data-motion-phase="ready"] .magic-panel,
body[data-motion-phase="start-transition"] .magic-panel,
body[data-motion-phase="question"] .breath-orb,
body[data-motion-phase="fate-commit"] .breath-orb,
body[data-motion-phase="sensing"] .summon-stage,
body[data-motion-phase="result"] .result-panel,
body[data-motion-phase="english"] .result-panel,
body[data-motion-phase="transform"] .result-panel,
body[data-motion-phase="chinese"] .result-panel {
  will-change: transform, filter, opacity;
}

body[data-motion-phase="ready"] .magic-panel {
  animation: panelArrive 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body[data-motion-phase="start-transition"] .magic-panel {
  animation: readyPanelThroughGate 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] .screen-ready::before {
  animation: spaceGateOpen 760ms cubic-bezier(0.16, 1, 0.3, 1) both, spaceTunnelDraw 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] .screen-ready::after {
  animation: newSpaceVeil 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] .screen-ready .screen-inner {
  animation: portalDepthShift 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] .magic-panel::before {
  animation: startPortalGlyph 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] .magic-panel::after {
  animation: startPortalRing 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] #startButton {
  animation: startPortalPress 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] #startButton::before {
  animation: startButtonSigil 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="start-transition"] #startButton::after {
  animation: startButtonCore 760ms ease-out both;
}

body[data-motion-phase="question"] .breath-orb {
  box-shadow:
    0 0 34px rgba(151, 130, 255, 0.13),
    inset 0 0 28px rgba(124, 167, 199, 0.08);
  animation: breathOrbGateArrive 760ms cubic-bezier(0.16, 1, 0.3, 1) both, breathe 5.8s ease-in-out 760ms infinite;
}

body[data-motion-phase="question"] .screen-question::before {
  animation: questionPortalReveal 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="question"] .screen-question::after {
  animation: questionPortalVeil 760ms ease-out both;
}

body[data-motion-phase="question"] .screen-question .screen-inner {
  animation: questionContentArrive 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="fate-commit"] .breath-orb {
  animation: fateOrbCollapse 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow:
    0 0 64px rgba(151, 130, 255, 0.28),
    inset 0 0 44px rgba(124, 167, 199, 0.16);
}

body[data-motion-phase="question"] .book-card {
  animation: cardHover3d 4200ms ease-in-out infinite;
  transform-style: preserve-3d;
}

body[data-motion-phase="fate-commit"] .book-card {
  animation: fateCardSeal 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-style: preserve-3d;
}

body[data-motion-phase="fate-commit"] .screen-question::before {
  animation: fateSealSpacePulse 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="fate-commit"] .screen-question::after {
  animation: fateSealVeilPulse 520ms ease-out both;
}

body[data-motion-phase="fate-commit"] #readyButton {
  animation: readyFateDestinyPress 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="fate-commit"] #readyButton::before,
#readyButton.is-committing::before {
  animation: readyFateSealBreakOpen 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="fate-commit"] #readyButton::after,
#readyButton.is-committing::after {
  animation: readyFateCoreBurst 620ms ease-out both;
}

body[data-motion-phase="sensing"] .summon-stage {
  animation: stageConverge 4200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-motion-phase="sensing"] .ring-one {
  animation-duration: 2400ms;
}

body[data-motion-phase="sensing"] .ring-two {
  animation-duration: 1800ms;
}

body[data-motion-phase="sensing"] .summon-card {
  animation: cardSummonLocked 4200ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

body[data-motion-phase="sensing"] .summon-glow {
  animation: glowConverge 4200ms ease-in-out both;
}

body[data-motion-phase="result"] .result-panel {
  animation: resultPortalIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body[data-motion-phase="english"] .mist {
  animation: mistDrift 5.8s ease-in-out infinite alternate, mistClarify 1500ms ease-out both;
}

body[data-motion-phase="transform"] .answer-en {
  letter-spacing: 0.03em;
  text-shadow:
    0 0 14px rgba(124, 167, 199, 0.42),
    0 0 36px rgba(151, 130, 255, 0.18);
}

body[data-motion-phase="transform"] .result-panel::before {
  animation: glyphSweep 1900ms ease-out both;
}

body[data-motion-phase="chinese"] .answer-zh {
  animation: answerGlint 1450ms ease-out both, chineseMaterialize 1100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body[data-motion-phase="settle"] .result-panel {
  animation: resultSettle 1300ms ease-out both;
}

.share-image {
  display: block;
  width: min(100%, 286px);
  aspect-ratio: 3 / 4;
  max-height: 56dvh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.share-image.is-loading {
  color: transparent;
  font-size: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(191, 183, 255, 0.38), rgba(89, 103, 225, 0.12) 34%, transparent 64%),
    #111329;
  box-shadow:
    0 0 24px rgba(132, 118, 255, 0.22),
    0 18px 46px rgba(0, 0, 0, 0.34);
  animation: shareImageLoadingPulse 1400ms ease-in-out infinite alternate;
}

@keyframes shareImageLoadingPulse {
  from {
    filter: brightness(0.86);
    box-shadow:
      0 0 18px rgba(132, 118, 255, 0.16),
      0 18px 46px rgba(0, 0, 0, 0.34);
  }
  to {
    filter: brightness(1.12);
    box-shadow:
      0 0 34px rgba(171, 160, 255, 0.34),
      0 18px 46px rgba(0, 0, 0, 0.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .share-image.is-loading {
    animation: none;
  }
}

.save-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.saved-action-row {
  flex-wrap: nowrap;
  gap: 10px;
}

.saved-action-button {
  flex: 1 1 0;
  width: calc((100% - 10px) / 2);
  min-width: 0;
  max-width: none;
  height: 56px;
  min-height: 56px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: clamp(0.9rem, 4vw, 1rem);
  font-weight: 760;
}

.saved-action-back {
  color: rgba(242, 246, 255, 0.98);
  border-color: rgba(205, 219, 255, 0.78);
  box-shadow:
    0 13px 30px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(138, 148, 255, 0.22),
    inset 0 0 18px rgba(218, 229, 255, 0.16);
  text-shadow:
    0 1px 8px rgba(12, 10, 26, 0.76),
    0 0 16px rgba(222, 230, 255, 0.4);
}

.saved-action-again {
  color: rgba(237, 240, 255, 0.96);
  border-color: rgba(214, 221, 255, 0.84);
  box-shadow:
    0 13px 30px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(151, 130, 255, 0.22),
    inset 0 0 18px rgba(225, 231, 255, 0.24);
  text-shadow: 0 1px 0 rgba(222, 229, 255, 0.42);
}

.saved-action-back::before,
.saved-action-again::before {
  inset: -105%;
  opacity: 0.34;
  transform: rotate(0deg) scale(0.68);
}

.saved-action-back::before {
  background: conic-gradient(from 0deg, transparent, rgba(224, 232, 255, 0.56), rgba(138, 148, 255, 0.24), transparent 42%);
}

.saved-action-again::before {
  background: conic-gradient(from 20deg, transparent, rgba(225, 232, 255, 0.62), rgba(151, 130, 255, 0.28), transparent 44%);
}

.saved-action-back::after,
.saved-action-again::after {
  opacity: 0.26;
  transform: scale(0.84);
}

body[data-screen="saved"] .saved-action-back {
  animation: mysticButtonAwaken 3600ms ease-in-out infinite;
}

body[data-screen="saved"] .saved-action-again {
  animation: fateButtonMysticAwaken 3600ms ease-in-out infinite;
}

body[data-screen="saved"] .saved-action-back::before,
body[data-screen="saved"] .saved-action-again::before {
  animation: startButtonRunesIdle 6800ms linear infinite;
}

.noscript-warning {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 12px 14px;
  text-align: center;
}

@keyframes coverExit {
  0%,
  82% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes hfPhaseDrift {
  0% {
    transform: translate3d(-14px, -10px, 0) scale(1);
    opacity: 0.08;
  }
  50% {
    transform: translate3d(10px, 12px, 0) scale(1.02);
    opacity: 0.14;
  }
  100% {
    transform: translate3d(-14px, -10px, 0) scale(1);
    opacity: 0.08;
  }
}

@keyframes hfCoolPortal {
  0% {
    filter: saturate(1.02) brightness(0.96) hue-rotate(0deg);
  }
  48% {
    filter: saturate(1.2) brightness(1.08) hue-rotate(4deg);
  }
  100% {
    filter: saturate(1.08) brightness(1.02) hue-rotate(-3deg);
  }
}

@keyframes hfVioletGate {
  0% {
    filter: saturate(1.02) brightness(0.98) hue-rotate(0deg);
  }
  50% {
    filter: saturate(1.16) brightness(1.1) hue-rotate(-4deg);
  }
  100% {
    filter: saturate(1.04) brightness(1.02) hue-rotate(2deg);
  }
}

@keyframes hfAlchemyBlend {
  0% {
    filter: saturate(1.04) brightness(0.98) hue-rotate(-2deg);
  }
  46% {
    filter: saturate(1.18) brightness(1.08) hue-rotate(6deg);
  }
  100% {
    filter: saturate(1.08) brightness(1.04) hue-rotate(-3deg);
  }
}

@keyframes coverSigilAwaken {
  0% {
    opacity: 0;
    transform: translateY(12px) rotateX(18deg) scale(0.82);
    filter: blur(12px) brightness(0.72);
  }
  28% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0) brightness(1.04);
  }
  68% {
    transform: translateY(-8px) rotateZ(2deg) scale(1.05);
    filter: blur(0) brightness(1.18);
  }
  100% {
    opacity: 0.92;
    transform: translateY(-2px) rotateZ(-1deg) scale(1.12);
    filter: blur(1px) brightness(1.32);
  }
}

@keyframes coverTitleGlow {
  0% {
    opacity: 0;
    transform: translateY(10px);
    text-shadow: 0 0 0 rgba(151, 130, 255, 0);
  }
  28% {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 18px rgba(151, 130, 255, 0.16);
  }
  78% {
    opacity: 1;
    text-shadow:
      0 0 18px rgba(151, 130, 255, 0.22),
      0 0 46px rgba(124, 167, 199, 0.14);
  }
  100% {
    opacity: 0.62;
    transform: translateY(-8px);
    text-shadow:
      0 0 24px rgba(151, 130, 255, 0.36),
      0 0 66px rgba(124, 167, 199, 0.2);
  }
}

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes rotateSlow {
  to {
    transform: rotate(405deg);
  }
}

@keyframes rotateReverse {
  to {
    transform: rotate(-315deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 24px rgba(151, 130, 255, 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 54px rgba(124, 167, 199, 0.18);
  }
}

@keyframes cardAwaken {
  from {
    transform: translateY(7px) rotateY(-12deg);
    filter: blur(1.4px);
  }
  to {
    transform: translateY(-7px) rotateY(14deg);
    filter: blur(0);
  }
}

@keyframes glowPulse {
  from {
    opacity: 0.42;
    transform: scale(0.9);
  }
  to {
    opacity: 0.96;
    transform: scale(1.15);
  }
}

@keyframes glyphSweep {
  0% {
    opacity: 0;
    transform: rotate(-18deg) scale(0.86);
  }
  35% {
    opacity: 0.74;
  }
  100% {
    opacity: 0;
    transform: rotate(164deg) scale(1.08);
  }
}

@keyframes stageHalo {
  from {
    opacity: 0.36;
    transform: scale(0.94) rotate(-3deg);
  }
  to {
    opacity: 0.82;
    transform: scale(1.04) rotate(3deg);
  }
}

@keyframes veilReveal {
  0% {
    opacity: 0;
    transform: translateX(-42%) scaleX(0.58);
    filter: blur(16px);
  }
  35% {
    opacity: 0.82;
  }
  100% {
    opacity: 0;
    transform: translateX(48%) scaleX(1.24);
    filter: blur(3px);
  }
}

@keyframes answerGlint {
  0% {
    text-shadow:
      0 0 4px rgba(239, 244, 255, 0.12),
      0 0 26px rgba(151, 130, 255, 0.16);
  }
  42% {
    text-shadow:
      0 0 12px rgba(239, 244, 255, 0.5),
      0 0 44px rgba(151, 130, 255, 0.36),
      0 0 68px rgba(124, 167, 199, 0.22);
  }
  100% {
    text-shadow:
      0 0 5px rgba(239, 244, 255, 0.12),
      0 0 30px rgba(151, 130, 255, 0.18);
  }
}

@keyframes chargingSealOrbit {
  0% {
    transform: translateZ(18px) rotate(-10deg);
    filter: drop-shadow(0 0 8px rgba(151, 130, 255, 0.12));
  }
  100% {
    transform: translateZ(18px) rotate(350deg);
    filter: drop-shadow(0 0 16px rgba(151, 130, 255, 0.26));
  }
}

@keyframes armedSealOrbit {
  0% {
    transform: translateZ(18px) rotate(-10deg) scale(1);
  }
  100% {
    transform: translateZ(18px) rotate(350deg) scale(1);
  }
}

@keyframes armedSealPulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
    filter: brightness(1) drop-shadow(0 0 10px rgba(151, 130, 255, 0.18));
  }
  100% {
    transform: translate3d(0, 0, 24px) scale(1.035) rotateX(-2deg);
    filter: brightness(1.24) drop-shadow(0 0 28px rgba(191, 204, 255, 0.42));
  }
}

@keyframes sealReleasePortal {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
    filter: blur(0) brightness(1.16);
  }
  48% {
    opacity: 1;
    transform: translate3d(0, -4px, 46px) scale(1.08) rotateX(-5deg);
    filter: blur(0) brightness(1.72);
  }
  100% {
    opacity: 0.3;
    transform: translate3d(0, 8px, -76px) scale(1.3) rotateX(18deg);
    filter: blur(7px) brightness(2.05);
  }
}

@keyframes sealVesselEmergence {
  0% {
    opacity: 0;
    transform: translate3d(0, 34px, -160px) rotateX(58deg) scale(0.16);
    filter: blur(0) brightness(1.4) drop-shadow(0 20px 32px rgba(0, 0, 0, 0.38));
  }
  38% {
    opacity: 0.74;
    filter: blur(0) brightness(1.62) drop-shadow(0 20px 36px rgba(0, 0, 0, 0.4));
  }
  100% {
    opacity: 0.96;
    transform: translate3d(0, 4px, -24px) rotateX(18deg) scale(0.42);
    filter: blur(0) brightness(1.18) drop-shadow(0 22px 42px rgba(0, 0, 0, 0.42));
  }
}

@keyframes vesselRiseFromSeal {
  0% {
    opacity: 0.96;
    transform: translate3d(0, 4px, -24px) rotateX(18deg) scale(0.42);
    filter: blur(0) brightness(1.18) drop-shadow(0 22px 42px rgba(0, 0, 0, 0.42));
  }
  19% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
    filter: blur(0) brightness(1.08) drop-shadow(0 22px 54px rgba(0, 0, 0, 0.4));
  }
  68% {
    opacity: 1;
    transform: translate3d(0, -2px, 14px) rotateX(-3deg) scale(1.04);
    filter: blur(0) brightness(1.18) drop-shadow(0 24px 62px rgba(0, 0, 0, 0.42));
  }
  100% {
    opacity: 1;
    transform: translate3d(0, -3px, 24px) rotateX(-5deg) scale(1.08);
    filter: blur(0) brightness(1.28) drop-shadow(0 26px 68px rgba(0, 0, 0, 0.44));
  }
}

@keyframes mistDrift {
  from {
    transform: translate(-8px, 6px) scale(0.98);
    opacity: 0.54;
  }
  to {
    transform: translate(8px, -5px) scale(1.06);
    opacity: 0.86;
  }
}

@keyframes panelArrive {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes readyPanelPortal {
  0% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0) brightness(1);
  }
  42% {
    opacity: 1;
    transform: translateY(-4px) rotateX(8deg) scale(1.018);
    filter: blur(0) brightness(1.18);
  }
  100% {
    opacity: 0.08;
    transform: translateY(24px) rotateX(-16deg) scale(0.88);
    filter: blur(18px) brightness(1.36);
  }
}

@keyframes readyPanelThroughGate {
  0% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0) brightness(1);
  }
  24% {
    opacity: 1;
    transform: translateY(-5px) rotateX(5deg) scale(1.018);
    filter: blur(0) brightness(1.12);
  }
  54% {
    opacity: 0.86;
    transform: translateY(-2px) rotateX(18deg) scale(0.94);
    filter: blur(5px) brightness(1.28);
  }
  78% {
    opacity: 0.44;
    transform: translateY(16px) rotateX(-34deg) scale(0.72);
    filter: blur(14px) brightness(1.45);
  }
  100% {
    opacity: 0;
    transform: translateY(38px) rotateX(-58deg) scale(0.48);
    filter: blur(26px) brightness(1.18);
  }
}

@keyframes mysticButtonAwaken {
  0%,
  100% {
    filter: brightness(1) saturate(1);
    box-shadow:
      0 18px 42px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(138, 148, 255, 0.24),
      inset 0 0 20px rgba(218, 229, 255, 0.2);
  }
  50% {
    filter: brightness(1.13) saturate(1.12);
    box-shadow:
      0 20px 46px rgba(0, 0, 0, 0.4),
      0 0 38px rgba(138, 148, 255, 0.38),
      0 0 76px rgba(201, 184, 255, 0.18),
      inset 0 0 28px rgba(232, 238, 255, 0.34);
  }
}

@keyframes startButtonRunesIdle {
  to {
    transform: rotate(360deg) scale(0.88);
  }
}

@keyframes startButtonCoreIdle {
  0%,
  100% {
    opacity: 0.24;
    transform: scale(0.78);
  }
  50% {
    opacity: 0.52;
    transform: scale(1.08);
  }
}

@keyframes spaceGateOpen {
  0% {
    opacity: 0;
    transform: scale(0.42) rotate(-18deg);
    filter: blur(22px) brightness(0.8);
  }
  24% {
    opacity: 0.88;
    transform: scale(0.84) rotate(34deg);
    filter: blur(10px) brightness(1.24);
  }
  64% {
    opacity: 0.96;
    transform: scale(1.42) rotate(116deg);
    filter: blur(4px) brightness(1.48);
  }
  100% {
    opacity: 0.2;
    transform: scale(2.08) rotate(184deg);
    filter: blur(20px) brightness(1.22);
  }
}

@keyframes spaceTunnelDraw {
  0% {
    clip-path: circle(0% at 50% 52%);
  }
  28% {
    clip-path: circle(28% at 50% 52%);
  }
  72% {
    clip-path: circle(68% at 50% 52%);
  }
  100% {
    clip-path: circle(112% at 50% 52%);
  }
}

@keyframes newSpaceVeil {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateX(72deg) scale(0.58);
    filter: blur(18px) brightness(0.86);
  }
  34% {
    opacity: 0.58;
    transform: perspective(900px) rotateX(58deg) scale(0.96);
    filter: blur(10px) brightness(1.18);
  }
  72% {
    opacity: 0.86;
    transform: perspective(900px) rotateX(38deg) scale(1.36);
    filter: blur(6px) brightness(1.38);
  }
  100% {
    opacity: 0.12;
    transform: perspective(900px) rotateX(8deg) scale(2.18);
    filter: blur(22px) brightness(1.42);
  }
}

@keyframes portalDepthShift {
  0% {
    transform: translateZ(0) scale(1);
  }
  22% {
    transform: translateZ(24px) scale(0.97);
  }
  58% {
    transform: translateZ(86px) scale(1.06);
  }
  100% {
    transform: translateZ(-180px) scale(0.62);
  }
}

@keyframes questionPortalReveal {
  0% {
    opacity: 0.84;
    transform: scale(1.92) rotate(164deg);
    filter: blur(18px) brightness(1.34);
    clip-path: circle(12% at 50% 42%);
  }
  42% {
    opacity: 0.68;
    transform: scale(1.22) rotate(78deg);
    filter: blur(10px) brightness(1.24);
    clip-path: circle(52% at 50% 42%);
  }
  100% {
    opacity: 0;
    transform: scale(0.82) rotate(18deg);
    filter: blur(20px) brightness(1);
    clip-path: circle(96% at 50% 42%);
  }
}

@keyframes questionPortalVeil {
  0% {
    opacity: 0.72;
    transform: perspective(900px) rotateX(18deg) scale(1.48);
    filter: blur(16px) brightness(1.32);
  }
  50% {
    opacity: 0.38;
    transform: perspective(900px) rotateX(34deg) scale(1.08);
    filter: blur(8px) brightness(1.14);
  }
  100% {
    opacity: 0;
    transform: perspective(900px) rotateX(58deg) scale(0.72);
    filter: blur(18px) brightness(1);
  }
}

@keyframes questionContentArrive {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.9);
    filter: blur(16px) brightness(1.24);
  }
  54% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
    filter: blur(3px) brightness(1.12);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes breathOrbGateArrive {
  0% {
    opacity: 0;
    transform: scale(0.48) rotateX(54deg);
    filter: blur(18px) brightness(1.36);
  }
  56% {
    opacity: 1;
    transform: scale(1.12) rotateX(8deg);
    filter: blur(3px) brightness(1.18);
  }
  100% {
    opacity: 1;
    transform: scale(0.96) rotateX(0deg);
    filter: blur(0) brightness(1);
  }
}

@keyframes startPortalGlyph {
  0% {
    opacity: 0;
    transform: rotate(-32deg) scale(0.58);
  }
  45% {
    opacity: 0.84;
    transform: rotate(92deg) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: rotate(186deg) scale(1.28);
  }
}

@keyframes startPortalRing {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(12deg);
  }
  48% {
    opacity: 0.74;
    transform: scale(1.05) rotate(74deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.65) rotate(128deg);
  }
}

@keyframes startPortalPress {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  20% {
    opacity: 1;
    filter: brightness(1.18);
  }
  58% {
    opacity: 0.82;
    filter: brightness(1.42);
  }
  100% {
    opacity: 0;
    filter: brightness(1.2) blur(2px);
  }
}

@keyframes startButtonSigil {
  0% {
    opacity: 0;
    transform: rotate(0deg) scale(0.44);
  }
  45% {
    opacity: 0.72;
    transform: rotate(142deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(260deg) scale(1.24);
  }
}

@keyframes startButtonCore {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  32% {
    opacity: 0.88;
    transform: scale(1.12);
  }
  100% {
    opacity: 0;
    transform: scale(1.72);
  }
}

@keyframes imageButtonArtPressGlow {
  0% {
    filter: brightness(1) saturate(1);
  }
  22% {
    filter: brightness(0.94) saturate(1.08);
  }
  54% {
    filter: brightness(1.42) saturate(1.32);
  }
  100% {
    filter: brightness(1.12) saturate(1.12);
  }
}

@keyframes imageButtonLabelPress {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  34% {
    opacity: 0.92;
    filter: brightness(1.28);
  }
  100% {
    opacity: 1;
    filter: brightness(1.08);
  }
}

@keyframes fateButtonMysticAwaken {
  0%,
  100% {
    filter: brightness(1) saturate(1.05);
    box-shadow:
      0 18px 42px rgba(0, 0, 0, 0.4),
      0 0 28px rgba(151, 130, 255, 0.24),
      0 0 58px rgba(194, 206, 255, 0.1),
      inset 0 0 22px rgba(225, 231, 255, 0.24);
  }
  48% {
    filter: brightness(1.16) saturate(1.22);
    box-shadow:
      0 21px 48px rgba(0, 0, 0, 0.42),
      0 0 38px rgba(151, 130, 255, 0.38),
      0 0 82px rgba(194, 206, 255, 0.18),
      inset 0 0 30px rgba(225, 231, 255, 0.38);
  }
}

@keyframes readyButtonHoldPulse {
  0%,
  100% {
    transform: translate3d(0, 4px, 0) scale(0.96);
    filter: brightness(1.18) saturate(1.12);
  }
  50% {
    transform: translate3d(0, 3.8px, 0) scale(0.963);
    filter: brightness(1.22) saturate(1.15);
  }
}

@keyframes readyButtonHoldRune {
  0% {
    transform: rotate(0deg) scale(0.48);
    filter: blur(0.4px);
  }
  100% {
    transform: rotate(360deg) scale(0.48);
    filter: blur(0.4px);
  }
}

@keyframes readyButtonHoldCore {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.78);
    filter: blur(8px);
  }
  50% {
    opacity: 0.9;
    transform: scale(0.86);
    filter: blur(6px);
  }
}

@keyframes readyFateRuneOrbit {
  0% {
    transform: rotate(0deg) scale(0.68);
    filter: blur(0);
  }
  48% {
    transform: rotate(174deg) scale(0.9);
    filter: blur(0.4px);
  }
  100% {
    transform: rotate(360deg) scale(0.68);
    filter: blur(0);
  }
}

@keyframes readyFateCoreIdle {
  0%,
  100% {
    opacity: 0.32;
    transform: scale(0.74);
    filter: blur(12px);
  }
  50% {
    opacity: 0.64;
    transform: scale(1.14);
    filter: blur(8px);
  }
}

@keyframes readyFateDestinyPress {
  0% {
    transform: translateY(4px) scale(0.96);
    filter: brightness(1.18) saturate(1.18);
  }
  18% {
    transform: translateY(2px) perspective(700px) rotateX(8deg) scale(0.95);
    filter: brightness(0.92) saturate(1.08);
  }
  52% {
    transform: translateY(-3px) perspective(700px) rotateX(-10deg) scale(1.07);
    filter: brightness(1.52) saturate(1.36);
  }
  100% {
    transform: translateY(4px) perspective(700px) rotateX(18deg) scale(0.94);
    filter: brightness(1.22) saturate(1.18) blur(1px);
  }
}

@keyframes readyFateSealBreakOpen {
  0% {
    opacity: 0;
    transform: rotate(-110deg) scale(0.32);
    filter: blur(2px);
  }
  32% {
    opacity: 0.94;
    transform: rotate(28deg) scale(0.96);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: rotate(228deg) scale(1.72);
    filter: blur(8px);
  }
}

@keyframes readyFateCoreBurst {
  0% {
    opacity: 0;
    transform: scale(0.42);
    filter: blur(12px);
  }
  28% {
    opacity: 0.96;
    transform: scale(1.04);
    filter: blur(5px);
  }
  100% {
    opacity: 0;
    transform: scale(2.05);
    filter: blur(18px);
  }
}

@keyframes fateSealSpacePulse {
  0% {
    opacity: 0;
    transform: scale(1.72) rotate(126deg);
    filter: blur(18px) brightness(1.05);
    clip-path: circle(10% at 50% 48%);
  }
  42% {
    opacity: 0.78;
    transform: scale(1.08) rotate(42deg);
    filter: blur(7px) brightness(1.42);
    clip-path: circle(48% at 50% 48%);
  }
  100% {
    opacity: 0;
    transform: scale(0.78) rotate(-18deg);
    filter: blur(18px) brightness(1.18);
    clip-path: circle(98% at 50% 48%);
  }
}

@keyframes fateSealVeilPulse {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateX(60deg) scale(0.62);
    filter: blur(18px) brightness(1.08);
  }
  46% {
    opacity: 0.42;
    transform: perspective(900px) rotateX(22deg) scale(1.08);
    filter: blur(8px) brightness(1.32);
  }
  100% {
    opacity: 0;
    transform: perspective(900px) rotateX(-18deg) scale(1.52);
    filter: blur(20px) brightness(1);
  }
}

@keyframes cardHover3d {
  0%,
  100% {
    transform: translateY(4px) rotateX(7deg) rotateY(-13deg);
  }
  50% {
    transform: translateY(-8px) rotateX(-5deg) rotateY(14deg);
  }
}

@keyframes fateButtonAura {
  0%,
  100% {
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.32),
      0 0 20px rgba(151, 130, 255, 0.16);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 18px 38px rgba(0, 0, 0, 0.34),
      0 0 26px rgba(151, 130, 255, 0.32),
      0 0 52px rgba(124, 167, 199, 0.12);
    filter: brightness(1.08);
  }
}

@keyframes fateButtonGlow {
  0%,
  100% {
    transform: scale(0.72);
    opacity: 0.28;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.62;
  }
}

@keyframes fateRuneOrbit {
  to {
    transform: rotate(360deg) scale(0.92);
  }
}

@keyframes fateButtonPress {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  22% {
    transform: translateY(2px) scale(0.96);
    filter: brightness(0.94);
  }
  58% {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.42);
  }
  100% {
    transform: translateY(0) scale(1.01);
    filter: brightness(1.18);
  }
}

@keyframes fateCommitRing {
  0% {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
  }
  34% {
    opacity: 0.86;
    transform: rotate(40deg) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: rotate(190deg) scale(1.48);
  }
}

@keyframes fateCommitCore {
  0% {
    opacity: 0;
    transform: scale(0.46);
  }
  30% {
    opacity: 0.95;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes fateOrbCollapse {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0) brightness(1);
  }
  48% {
    opacity: 1;
    transform: scale(1.08) rotate(8deg);
    filter: blur(0) brightness(1.28);
  }
  100% {
    opacity: 0.82;
    transform: scale(0.82) rotate(-14deg);
    filter: blur(5px) brightness(1.18);
  }
}

@keyframes fateCardSeal {
  0% {
    transform: translateY(4px) rotateX(7deg) rotateY(-13deg) scale(1);
    filter: blur(0) brightness(1);
  }
  45% {
    transform: translateY(-12px) rotateX(28deg) rotateY(18deg) scale(1.12);
    filter: blur(0) brightness(1.48);
  }
  100% {
    transform: translateY(2px) rotateX(68deg) rotateY(-22deg) scale(0.82);
    filter: blur(5px) brightness(1.1);
  }
}

@keyframes stageConverge {
  0% {
    transform: scale(0.88) rotate(-2deg);
    filter: blur(1.5px) brightness(0.82);
  }
  42% {
    transform: scale(1.04) rotate(2deg);
    filter: blur(0.6px) brightness(1.18);
  }
  100% {
    transform: scale(1.12) rotate(0deg);
    filter: blur(0) brightness(1.36);
  }
}

@keyframes cardSummonLocked {
  0% {
    opacity: 0.46;
    transform: translateY(18px) rotateX(64deg) rotateY(-26deg) scale(0.82);
    filter: blur(6px);
  }
  38% {
    opacity: 0.82;
    transform: translateY(2px) rotateX(28deg) rotateY(14deg) scale(1);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(-8px) rotateX(8deg) rotateY(0deg) scale(1.08);
    filter: blur(0);
  }
}

@keyframes glowConverge {
  0% {
    opacity: 0.24;
    transform: scale(0.72);
  }
  58% {
    opacity: 0.86;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1.34);
  }
}

@keyframes parchmentFlyToVessel {
  0% {
    opacity: 0;
    transform: translate3d(var(--from-x), var(--from-y), var(--from-z, 0)) rotateX(var(--pitch, 0deg)) rotateY(-18deg) rotateZ(var(--rot-start)) scale(0.66);
    filter: blur(0) brightness(0.82) drop-shadow(0 4px 6px rgba(8, 5, 3, 0.42));
  }
  14% {
    opacity: 0.94;
    filter: blur(0) brightness(1.04) drop-shadow(0 5px 7px rgba(8, 5, 3, 0.46));
  }
  46% {
    opacity: 1;
    transform: translate3d(var(--apex-x), var(--apex-y), 110px) rotateX(var(--pitch-mid)) rotateY(24deg) rotateZ(var(--rot-mid)) scale(1.02);
  }
  76% {
    opacity: 1;
    transform: translate3d(var(--approach-x), var(--approach-y), 92px) rotateX(-10deg) rotateY(-12deg) rotateZ(var(--rot-end)) scale(0.76);
  }
  92% {
    opacity: 0.92;
    transform: translate3d(var(--mouth-x), var(--mouth-y), 48px) rotateX(52deg) rotateY(18deg) rotateZ(var(--rot-end)) scale(0.42);
    filter: blur(0) brightness(1.28) drop-shadow(0 0 10px rgba(151, 130, 255, 0.36));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--mouth-x), var(--sink-y), -44px) rotateX(72deg) rotateY(28deg) rotateZ(var(--rot-end)) scale(0.06);
    filter: blur(0) brightness(1.62) drop-shadow(0 0 10px rgba(151, 130, 255, 0.42));
  }
}

@keyframes vesselAwaken {
  0% {
    opacity: 0.76;
    transform: translateY(16px) rotateX(16deg) scale(0.88);
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.34)) brightness(0.88);
  }
  36% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: drop-shadow(0 22px 54px rgba(0, 0, 0, 0.4)) brightness(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(-2px) rotateX(-5deg) scale(1.08);
    filter: drop-shadow(0 24px 68px rgba(0, 0, 0, 0.42)) brightness(1.28);
  }
}

@keyframes vesselLightBuild {
  0% {
    opacity: 0.36;
    transform: translateY(-2%) scale(0.62);
    filter: blur(7px) brightness(0.9);
  }
  52% {
    opacity: 0.82;
    transform: translateY(-6%) scale(1.08);
    filter: blur(5px) brightness(1.32);
  }
  100% {
    opacity: 1;
    transform: translateY(-8%) scale(1.52);
    filter: blur(8px) brightness(1.78);
  }
}

@keyframes vesselMouthPulse {
  0% {
    transform: translateZ(28px) perspective(860px) rotateX(62deg) scale(0.96);
    box-shadow:
      0 0 34px rgba(151, 130, 255, 0.28),
      inset 0 0 26px rgba(104, 84, 214, 0.2);
  }
  100% {
    transform: translateZ(34px) perspective(860px) rotateX(62deg) scale(1.05);
    box-shadow:
      0 0 54px rgba(151, 130, 255, 0.46),
      inset 0 0 36px rgba(104, 84, 214, 0.3);
  }
}

@keyframes vesselVortexGather {
  0% {
    opacity: 0.38;
    filter: brightness(0.82) saturate(0.88);
  }
  48% {
    opacity: 0.88;
    filter: brightness(1.16) saturate(1.08);
  }
  100% {
    opacity: 1;
    filter: brightness(1.42) saturate(1.18);
  }
}

@keyframes vesselVortexOuter {
  from {
    transform: translate3d(-7%, 3%, 0) rotate(-16deg) scale(1.08, 0.84);
  }
  to {
    transform: translate3d(6%, -4%, 0) rotate(42deg) scale(0.94, 1.12);
  }
}

@keyframes vesselVortexMiddle {
  from {
    transform: translate3d(6%, -3%, 0) rotate(24deg) scale(0.9, 1.08);
  }
  to {
    transform: translate3d(-5%, 4%, 0) rotate(-36deg) scale(1.1, 0.9);
  }
}

@keyframes vesselVortexInner {
  from {
    transform: translate3d(-3%, 2%, 0) rotate(-12deg) scale(1.08, 0.94);
  }
  to {
    transform: translate3d(3%, -2%, 0) rotate(28deg) scale(0.72, 0.82);
  }
}

@keyframes vesselVortexCore {
  from {
    opacity: 0.62;
    transform: scale(1.08);
    filter: blur(0) brightness(1.04);
  }
  to {
    opacity: 1;
    transform: scale(0.72);
    filter: blur(0) brightness(1.58);
  }
}

@keyframes resultVesselHandoff {
  0% {
    opacity: 1;
    transform: translate3d(-50%, -50%, -40px) scale(1.04);
    filter: blur(0) brightness(1.2);
  }
  58% {
    opacity: 0.9;
    transform: translate3d(-50%, -49%, -62px) scale(0.98);
    filter: blur(0) brightness(1.06);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -43%, -120px) scale(0.72);
    filter: blur(0) brightness(0.7);
  }
}

@keyframes resultParchmentRollEmerge {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate3d(0, 70px, -120px) rotateX(68deg) rotateZ(-12deg) scale(0.18);
    filter: blur(0) brightness(1.28) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.28));
  }
  12% {
    opacity: 0.94;
    transform: translate(-50%, -50%) translate3d(0, 48px, -20px) rotateX(48deg) rotateZ(-8deg) scale(0.38);
    filter: blur(0) brightness(1.48) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.3));
  }
  38% {
    opacity: 1;
    transform: translate(-50%, -50%) translate3d(0, -48px, 120px) rotateX(22deg) rotateZ(6deg) scale(0.78);
    filter: blur(0) brightness(1.34) drop-shadow(0 18px 26px rgba(0, 0, 0, 0.32));
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) translate3d(0, -10px, 32px) rotateX(7deg) rotateZ(-2deg) scale(1.08);
    filter: blur(0) brightness(1.12) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.34));
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translate3d(0, 0, 0) rotateX(0deg) rotateZ(0deg) scale(1);
    filter: blur(0) brightness(1) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.32));
  }
}

@keyframes resultParchmentRollHandoff {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate3d(0, 0, 0) rotateX(0deg) scale(1);
    filter: blur(0) brightness(1.08) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.3));
  }
  42% {
    opacity: 0.52;
    transform: translate(-50%, -50%) translate3d(0, 0, 22px) rotateX(8deg) scale(0.72, 0.94);
    filter: blur(0) brightness(1.24) drop-shadow(0 14px 24px rgba(0, 0, 0, 0.24));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate3d(0, 0, -40px) rotateX(18deg) scale(0.3, 0.82);
    filter: blur(0) brightness(1.5) drop-shadow(0 0 20px rgba(151, 130, 255, 0.28));
  }
}

@keyframes parchmentFlyFromVessel {
  0% {
    opacity: 0;
    transform: translate3d(0, 70px, -180px) rotateX(72deg) rotateZ(-10deg) scale(0.18);
    filter: blur(0) brightness(1.18);
  }
  28% {
    opacity: 0.98;
    transform: translate3d(0, -36px, 120px) rotateX(28deg) rotateZ(5deg) scale(0.68);
    filter: blur(0) brightness(1.48);
  }
  68% {
    opacity: 1;
    transform: translate3d(0, -8px, 24px) rotateX(7deg) rotateZ(-2deg) scale(1.04);
    filter: blur(0) brightness(1.16);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateZ(0deg) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes parchmentUnfurl {
  0% {
    opacity: 0.18;
    clip-path: inset(0 49.5% 0 49.5% round 2px);
    transform: rotateX(18deg) rotateZ(-1deg) translateY(5px) scale(0.98);
    filter: brightness(1.22) blur(0);
  }
  46% {
    opacity: 1;
    clip-path: inset(0 23% 0 23% round 2px);
    transform: rotateX(8deg) rotateZ(0.8deg) translateY(1px) scale(0.995);
    filter: brightness(1.14) blur(0);
  }
  72% {
    opacity: 1;
    clip-path: inset(0 2% 0 2% round 2px);
    transform: rotateX(-2deg) rotateZ(-0.4deg) translateY(-1px) scale(1);
    filter: brightness(1.06) blur(0);
  }
  88% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: rotateX(1.4deg) rotateZ(0.2deg) translateY(1px) scale(1);
    filter: brightness(1.02) blur(0);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: none;
    filter: brightness(1) blur(0);
  }
}

@keyframes parchmentTextureReveal {
  0% {
    opacity: 0.78;
    clip-path: inset(0 0 0 0);
    filter:
      drop-shadow(0 18px 34px rgba(0, 0, 0, 0.28))
      drop-shadow(0 0 28px rgba(151, 130, 255, 0.46))
      brightness(1.3)
      blur(0);
  }
  32% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter:
      drop-shadow(0 24px 42px rgba(0, 0, 0, 0.32))
      drop-shadow(0 0 46px rgba(151, 130, 255, 0.38))
      brightness(1.18)
      blur(0);
  }
  70% {
    opacity: 1;
    clip-path: inset(0 3% 0 3%);
    filter:
      drop-shadow(0 28px 50px rgba(0, 0, 0, 0.36))
      drop-shadow(0 0 36px rgba(151, 130, 255, 0.24))
      brightness(1.08)
      blur(0);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter:
      drop-shadow(0 26px 46px rgba(0, 0, 0, 0.36))
      drop-shadow(0 0 34px rgba(151, 130, 255, 0.22))
      brightness(1)
      blur(0);
  }
}

@keyframes paperRollLeft {
  0% {
    opacity: 1;
    transform: translateX(-8px) rotateZ(-4deg) rotateY(62deg) scale(0.74, 0.66);
    filter: blur(0) brightness(1.24);
  }
  44% {
    opacity: 1;
    transform: translateX(var(--roll-mid-left)) rotateZ(-2deg) rotateY(44deg) scale(0.96, 0.9);
    filter: blur(0) brightness(1.12);
  }
  82% {
    opacity: 1;
    transform: translateX(var(--roll-open-left)) rotateZ(1.5deg) rotateY(22deg) scale(0.86, 1);
    filter: blur(0) brightness(1.04);
  }
  100% {
    opacity: 0;
    transform: translateX(var(--roll-open-left)) rotateZ(0deg) rotateY(8deg) scale(0.82, 1);
    filter: blur(0) brightness(1.1);
  }
}

@keyframes paperRollRight {
  0% {
    opacity: 1;
    transform: translateX(8px) rotateZ(4deg) rotateY(-62deg) scale(0.74, 0.66);
    filter: blur(0) brightness(1.24);
  }
  44% {
    opacity: 1;
    transform: translateX(var(--roll-mid-right)) rotateZ(2deg) rotateY(-44deg) scale(0.96, 0.9);
    filter: blur(0) brightness(1.12);
  }
  82% {
    opacity: 1;
    transform: translateX(var(--roll-open-right)) rotateZ(-1.5deg) rotateY(-22deg) scale(0.86, 1);
    filter: blur(0) brightness(1.04);
  }
  100% {
    opacity: 0;
    transform: translateX(var(--roll-open-right)) rotateZ(0deg) rotateY(-8deg) scale(0.82, 1);
    filter: blur(0) brightness(1.1);
  }
}

@keyframes parchmentInkBloom {
  0% {
    text-shadow: 0 0 28px rgba(88, 48, 17, 0);
  }
  46% {
    text-shadow:
      0 0 18px rgba(88, 48, 17, 0.28),
      0 0 38px rgba(151, 130, 255, 0.28);
  }
  100% {
    text-shadow: 0 1px 0 rgba(255, 244, 205, 0.28);
  }
}

@keyframes resultLowerContentIn {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes parchmentHover {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateZ(0deg) scale(1);
  }
  50% {
    transform: translate3d(0, -9px, 0) rotateX(2deg) rotateZ(0.8deg) scale(1.01);
  }
}

@keyframes resultPortalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    filter: blur(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes mistClarify {
  0% {
    opacity: 0.9;
    filter: blur(32px);
  }
  100% {
    opacity: 0.58;
    filter: blur(22px);
  }
}

@keyframes chineseMaterialize {
  0% {
    clip-path: inset(48% 0 48% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes resultSettle {
  from {
    filter: brightness(1.08);
  }
  to {
    filter: brightness(1);
  }
}

@media (max-width: 390px) {
  .screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 1.86rem;
  }

  h2 {
    font-size: 1.34rem;
  }

  .button {
    width: 100%;
  }

  .magic-panel,
  .result-panel,
  .save-panel {
    padding: 22px 16px;
  }

  .result-panel .answer-stage {
    min-height: 310px;
  }

  .floating-parchment {
    min-height: 180px;
  }

  .parchment-answer {
    padding-inline: clamp(30px, 8.5vw, 40px);
  }

  .answer-zh {
    font-size: 1.72rem;
  }

  .summon-stage {
    width: 220px;
    height: 220px;
  }

  .vessel-stage {
    width: min(76vw, 296px);
    height: min(68vw, 264px);
  }

  .answer-vessel {
    width: min(74vw, 288px);
  }

  .saved-action-button {
    width: calc((100% - 8px) / 2);
    height: 54px;
    min-height: 54px;
    padding-inline: 8px;
  }

  .saved-action-row {
    gap: 8px;
  }

  .breath-orb {
    width: 156px;
  }
}

@media (max-height: 640px) {
  .screen-inner {
    align-content: start;
    gap: 14px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .book-sigil {
    width: 96px;
  }

  .breath-orb {
    width: 138px;
  }

  .summon-stage {
    width: 190px;
    height: 190px;
  }

  .answer-stage {
    min-height: 190px;
  }
}

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

  .hold-magic-seal,
  .magic-seal-svg,
  .seal-vessel-emergence {
    transform: none !important;
  }

  body[data-hold-state="armed"] #readyButton.is-ready {
    animation: none !important;
    transform: translate3d(0, 4px, 0) scale(0.96) !important;
  }

  .vessel-vortex,
  .vessel-vortex-layer,
  .vessel-vortex-core {
    animation: none !important;
  }

  .vessel-mouth-radiance::after {
    animation: none !important;
  }
}

/* Continuous vessel ritual: one level, eye-line scene from hold to result. */
.screen-ritual {
  overflow: hidden;
  overscroll-behavior: none;
}

.ritual-inner {
  min-height: min(760px, calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 10px;
}

.ritual-audio-controls {
  position: fixed;
  z-index: 40;
  top: calc(22px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  display: flex;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 220ms ease;
}

body[data-screen="ready"] .ritual-audio-controls,
body[data-screen="ritual"] .ritual-audio-controls {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

body[data-screen="ready"] #soundEffectsToggleButton {
  display: none;
}

.audio-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  color: #e9edff;
  border: 1px solid rgba(207, 216, 255, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(139, 199, 255, 0.28), transparent 58%),
    rgba(18, 20, 55, 0.78);
  box-shadow:
    0 0 0 1px rgba(145, 132, 255, 0.12) inset,
    0 7px 20px rgba(3, 6, 28, 0.34),
    0 0 16px rgba(132, 143, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease,
    box-shadow 180ms ease, filter 180ms ease, transform 120ms ease;
}

.audio-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 180ms ease, transform 180ms ease;
}

.audio-toggle::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 2px;
  border-radius: 2px;
  background: #f0b2de;
  box-shadow: 0 0 7px rgba(222, 126, 205, 0.62);
  opacity: 0;
  transform: rotate(-45deg) scaleX(0.6);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.audio-toggle:active {
  transform: scale(0.92);
}

.audio-toggle:focus-visible {
  outline: 2px solid #c9d8ff;
  outline-offset: 3px;
}

.audio-toggle.is-disabled {
  color: rgba(213, 217, 242, 0.54);
  border-color: rgba(184, 189, 225, 0.24);
  background: rgba(13, 15, 42, 0.7);
  box-shadow: 0 6px 16px rgba(3, 6, 28, 0.28);
  filter: saturate(0.65);
}

.audio-toggle.is-disabled svg {
  opacity: 0.58;
  transform: scale(0.92);
}

.audio-toggle.is-disabled::after {
  opacity: 0.92;
  transform: rotate(-45deg) scaleX(1);
}

.ritual-stage {
  --charge-progress: 0;
  --sigil-outer-progress: 0;
  --sigil-middle-progress: 0;
  --sigil-core-progress: 0;
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  height: 100%;
  min-height: 570px;
  isolation: isolate;
  perspective: 900px;
  overflow: hidden;
}

.question-guidance {
  position: absolute;
  z-index: 5;
  top: 54px;
  left: 50%;
  width: min(100%, 410px);
  display: grid;
  justify-items: center;
  gap: 10px;
  transform: translateX(-50%);
  opacity: 1;
  transition: opacity 260ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.question-guidance .ritual-copy {
  font-size: clamp(0.88rem, 3.7vw, 1rem);
  line-height: 1.68;
}

.vessel-charge-stage {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 58%;
  width: min(90vw, 400px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.vessel-charge-stage::before,
.vessel-charge-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.vessel-charge-stage::before {
  z-index: -1;
  inset: 9% -12% -3%;
  opacity: calc(0.14 + var(--charge-progress) * 0.76);
  background:
    radial-gradient(ellipse, rgba(205, 214, 255, 0.52), rgba(143, 132, 255, 0.2) 42%, rgba(89, 102, 231, 0.08) 61%, transparent 78%);
  filter: blur(calc(3px + var(--charge-progress) * 7px)) brightness(calc(0.94 + var(--charge-progress) * 0.56));
  transform: scale(calc(0.82 + var(--charge-progress) * 0.48));
  will-change: opacity, transform, filter;
}

.vessel-charge-stage::after {
  z-index: 4;
  left: 22%;
  right: 22%;
  bottom: 16%;
  height: 8%;
  opacity: 0.54;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.66), transparent 72%);
}

.vessel-3d-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transform-origin: center;
  object-fit: contain;
  pointer-events: none;
}

.vessel-3d-canvas.is-visible {
  opacity: 1;
  visibility: visible;
}

.vessel-load-error {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: min(76vw, 18rem);
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(153, 190, 255, 0.76);
  border-radius: 6px;
  color: rgba(238, 240, 255, 0.94);
  background: rgba(15, 18, 55, 0.9);
  box-shadow: 0 0 24px rgba(113, 104, 255, 0.38);
  transform: translate(-50%, -50%);
  font: inherit;
}

.vessel-load-error[hidden] {
  display: none;
}

.vessel-charge-sigil {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 49%;
  width: 100.3%;
  aspect-ratio: 1;
  opacity: calc(0.1 + var(--charge-progress) * 0.86);
  transform: translate(-50%, -50%) scale(calc(0.86 + var(--charge-progress) * 0.18));
  transform-origin: center;
  filter:
    drop-shadow(0 0 calc(5px + var(--charge-progress) * 9px) rgba(163, 152, 255, 0.5))
    drop-shadow(0 0 calc(12px + var(--charge-progress) * 18px) rgba(93, 111, 255, 0.28));
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: opacity, transform, filter;
}

.charge-sigil-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: center;
  animation: chargeSigilOrbit 18s linear infinite;
}

.sigil-track,
.sigil-fill {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.sigil-track {
  stroke: rgba(155, 163, 255, 0.32);
  stroke-width: 1;
  opacity: calc(0.12 + var(--charge-progress) * 0.22);
}

.sigil-fill {
  stroke: rgba(218, 225, 255, 0.96);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sigil-progress-stroke {
  stroke-dasharray: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke-dashoffset 34ms linear, opacity 100ms linear;
}

.sigil-fill-outer {
  stroke-width: 1.8;
  opacity: calc(0.08 + var(--sigil-outer-progress) * 0.92);
  filter: drop-shadow(0 0 5px rgba(144, 157, 255, 0.78));
}

.sigil-fill-outer .sigil-progress-stroke {
  stroke-dashoffset: calc(1 - var(--sigil-outer-progress));
}

.sigil-fill-middle {
  stroke: rgba(190, 182, 255, 0.96);
  stroke-width: 1.55;
  opacity: calc(0.06 + var(--sigil-middle-progress) * 0.94);
  filter: drop-shadow(0 0 6px rgba(136, 118, 255, 0.82));
}

.sigil-fill-middle .sigil-progress-stroke {
  stroke-dashoffset: calc(1 - var(--sigil-middle-progress));
}

.sigil-fill-core {
  stroke: rgba(235, 241, 255, 0.98);
  stroke-width: 2.1;
  opacity: calc(0.04 + var(--sigil-core-progress) * 0.96);
  filter:
    drop-shadow(0 0 7px rgba(208, 218, 255, 0.92))
    drop-shadow(0 0 14px rgba(122, 128, 255, 0.58));
}

.sigil-fill-core .sigil-progress-stroke {
  stroke-dashoffset: calc(1 - var(--sigil-core-progress));
}

.ritual-stage[data-charge-complete="true"] .sigil-progress-stroke {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}

body[data-hold-state="transitioning"] .vessel-charge-sigil {
  animation: chargeSigilCompletePulse 980ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

@keyframes chargeSigilCompletePulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 14px rgba(163, 152, 255, 0.66))
      drop-shadow(0 0 30px rgba(93, 111, 255, 0.38));
  }
  42% {
    filter:
      drop-shadow(0 0 24px rgba(225, 232, 255, 0.94))
      drop-shadow(0 0 48px rgba(132, 118, 255, 0.68));
  }
}

.vessel-mouth-radiance {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 37%;
  width: clamp(180px, 72%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: calc(0.06 + var(--charge-progress) * 0.84);
  transform: translate(-50%, -50%) scale(calc(0.64 + var(--charge-progress) * 0.5));
  transform-origin: center;
  background: radial-gradient(
    circle,
    rgba(245, 248, 255, 0.94) 0 5%,
    rgba(202, 191, 255, 0.48) 19%,
    rgba(126, 137, 255, 0.2) 44%,
    transparent 74%
  );
  mix-blend-mode: screen;
  will-change: transform, opacity;
  pointer-events: none;
}

.vessel-mouth-radiance::before,
.vessel-mouth-radiance::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.vessel-mouth-radiance::before {
  inset: 44%;
  border-radius: 50%;
  opacity: calc(0.1 + var(--charge-progress) * 0.88);
  background: rgba(245, 248, 255, 0.94);
  box-shadow:
    0 0 18px rgba(229, 236, 255, 0.88),
    0 0 42px rgba(171, 155, 255, 0.7),
    0 0 76px rgba(101, 119, 255, 0.42);
}

.vessel-mouth-radiance::after {
  inset: -28%;
  border-radius: 50%;
  opacity: calc(0.02 + var(--charge-progress) * 0.7);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(179, 165, 255, 0.56) 0deg 1deg,
    transparent 3deg 15deg,
    rgba(184, 201, 255, 0.34) 17deg 17.8deg,
    transparent 20deg 31deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 0 13%, #000 25% 64%, transparent 80%);
  mask-image: radial-gradient(circle, transparent 0 13%, #000 25% 64%, transparent 80%);
  animation: vesselMouthRadianceOrbit 8s linear infinite;
  transform-origin: center;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .charge-sigil-svg,
  body[data-hold-state="transitioning"] .vessel-charge-sigil {
    animation: none !important;
  }

  .sigil-progress-stroke {
    transition: none;
  }
}

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

.parchment-swarm {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 37%;
  width: 1px;
  height: 1px;
  overflow: visible;
  transform-style: preserve-3d;
  pointer-events: none;
}

.screen-ritual .parchment-slip {
  position: absolute;
  left: 0;
  top: 0;
  aspect-ratio: 1;
  margin-right: 0;
  margin-bottom: 0;
  border-radius: 2px 8px 8px 2px;
  opacity: 0;
  background: url("../assets/images/parchment-roll.png") center / contain no-repeat;
  will-change: transform, opacity;
  pointer-events: none;
}

body[data-hold-state="charging"] .question-guidance,
body[data-hold-state="completing"] .question-guidance,
body[data-hold-state="cancelling"] .question-guidance,
body[data-hold-state="armed"] .question-guidance,
body[data-hold-state="transitioning"] .question-guidance {
  opacity: 0;
  transform: translate(-50%, -10px) scale(0.98);
}

body[data-hold-state="charging"] .vessel-charge-stage,
body[data-hold-state="completing"] .vessel-charge-stage,
body[data-hold-state="cancelling"] .vessel-charge-stage,
body[data-hold-state="armed"] .vessel-charge-stage {
  transform: translate(-50%, -54%) scale(1.03);
}

.screen-ritual #readyButton {
  z-index: 12;
  width: min(100%, 410px);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transform: translate3d(0, var(--hold-button-depth, 0), 0) scale(var(--hold-button-scale, 1));
  transition: opacity 300ms ease, transform 90ms linear, filter 160ms ease;
}

.screen-ritual #readyButton .button-art {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

body[data-hold-state="charging"] .screen-ritual #readyButton,
body[data-hold-state="completing"] .screen-ritual #readyButton,
body[data-hold-state="armed"] .screen-ritual #readyButton {
  filter: brightness(var(--hold-button-brightness, 1.08));
}

body[data-hold-state="completing"] .screen-ritual #readyButton {
  pointer-events: none;
}

body[data-ritual-phase]:not([data-ritual-phase="idle"]) .screen-ritual #readyButton {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) scale(0.92);
}

.ritual-result-layer {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  gap: 12px;
  padding: 8px 0 2px;
  opacity: 0;
  pointer-events: none;
}

.ritual-result-step,
.ritual-result-layer .floating-parchment,
.ritual-result-layer .parchment-reminder,
.ritual-result-layer .ritual-actions {
  opacity: 0;
}

.ritual-result-layer .floating-parchment {
  position: relative;
  width: min(100%, 440px);
  min-height: 250px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.ritual-result-layer .result-parchment-roll {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 55%;
  width: min(54vw, 220px);
  opacity: 0;
  transform: translate(-50%, 90px) scale(0.24) rotate(-10deg);
  pointer-events: none;
}

.ritual-result-layer .parchment-answer {
  position: relative;
  width: 100%;
  aspect-ratio: 3.25 / 1;
  display: grid;
  place-items: center;
  padding: 28px clamp(34px, 9vw, 54px);
  clip-path: inset(0 49.5% 0 49.5%);
  opacity: 0;
  transform-origin: center;
}

.ritual-result-layer .parchment-texture {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.ritual-result-layer .answer-copy {
  position: relative;
  z-index: 3;
  width: 82%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 14px);
  opacity: 0;
}

.ritual-result-layer .answer-zh,
.ritual-result-layer .answer-en {
  width: 100%;
  color: #25170c;
  text-align: center;
  text-wrap: balance;
}

.ritual-result-layer .answer-zh {
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: clamp(1.28rem, 5.6vw, 2rem);
  line-height: 1.2;
}

.ritual-result-layer .answer-en {
  font-family: Papyrus, Cochin, Palatino, serif;
  font-size: clamp(0.78rem, 3.15vw, 1rem);
  line-height: 1.28;
}

.ritual-result-layer .parchment-reminder {
  max-width: 92%;
}

.ritual-actions {
  width: 100%;
}

body[data-ritual-phase="result"] .ritual-result-layer,
body[data-ritual-phase="roll-emerge"] .ritual-result-layer,
body[data-ritual-phase="unfurl"] .ritual-result-layer,
body[data-ritual-phase="copy"] .ritual-result-layer,
body[data-ritual-phase="reminder"] .ritual-result-layer,
body[data-ritual-phase="actions"] .ritual-result-layer,
body[data-ritual-phase="settled"] .ritual-result-layer {
  opacity: 1;
}

body[data-ritual-phase="result"] .ritual-result-step,
body[data-ritual-phase="roll-emerge"] .ritual-result-step,
body[data-ritual-phase="unfurl"] .ritual-result-step,
body[data-ritual-phase="copy"] .ritual-result-step,
body[data-ritual-phase="reminder"] .ritual-result-step,
body[data-ritual-phase="actions"] .ritual-result-step,
body[data-ritual-phase="settled"] .ritual-result-step {
  opacity: 1;
  transition: opacity 560ms ease;
}

body[data-ritual-phase="roll-emerge"] .ritual-result-layer .floating-parchment,
body[data-ritual-phase="unfurl"] .ritual-result-layer .floating-parchment,
body[data-ritual-phase="copy"] .ritual-result-layer .floating-parchment,
body[data-ritual-phase="reminder"] .ritual-result-layer .floating-parchment,
body[data-ritual-phase="actions"] .ritual-result-layer .floating-parchment,
body[data-ritual-phase="settled"] .ritual-result-layer .floating-parchment {
  opacity: 1;
  transition: opacity 420ms ease;
}

body[data-ritual-phase="roll-emerge"] .result-parchment-roll,
body[data-ritual-phase="unfurl"] .result-parchment-roll,
body[data-ritual-phase="copy"] .result-parchment-roll,
body[data-ritual-phase="reminder"] .result-parchment-roll,
body[data-ritual-phase="actions"] .result-parchment-roll,
body[data-ritual-phase="settled"] .result-parchment-roll {
  animation: ritualRollEmerge 1680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-ritual-phase="unfurl"] .parchment-answer,
body[data-ritual-phase="copy"] .parchment-answer,
body[data-ritual-phase="reminder"] .parchment-answer,
body[data-ritual-phase="actions"] .parchment-answer,
body[data-ritual-phase="settled"] .parchment-answer {
  animation: ritualParchmentUnfurl 950ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-ritual-phase="copy"] .answer-copy,
body[data-ritual-phase="reminder"] .answer-copy,
body[data-ritual-phase="actions"] .answer-copy,
body[data-ritual-phase="settled"] .answer-copy {
  opacity: 1;
  transition: opacity 760ms ease;
}

body[data-ritual-phase="copy"] .ritual-result-layer .answer-zh,
body[data-ritual-phase="copy"] .ritual-result-layer .answer-en,
body[data-ritual-phase="reminder"] .ritual-result-layer .answer-zh,
body[data-ritual-phase="reminder"] .ritual-result-layer .answer-en,
body[data-ritual-phase="actions"] .ritual-result-layer .answer-zh,
body[data-ritual-phase="actions"] .ritual-result-layer .answer-en,
body[data-ritual-phase="settled"] .ritual-result-layer .answer-zh,
body[data-ritual-phase="settled"] .ritual-result-layer .answer-en {
  opacity: 1;
}

body[data-ritual-phase="reminder"] .parchment-reminder,
body[data-ritual-phase="actions"] .parchment-reminder,
body[data-ritual-phase="settled"] .parchment-reminder {
  opacity: 1;
  transition: opacity 700ms ease;
}

body[data-ritual-phase="actions"] .ritual-actions,
body[data-ritual-phase="settled"] .ritual-actions {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 900ms ease;
}

body[data-ritual-phase="roll-emerge"] .vessel-charge-stage,
body[data-ritual-phase="unfurl"] .vessel-charge-stage,
body[data-ritual-phase="copy"] .vessel-charge-stage,
body[data-ritual-phase="reminder"] .vessel-charge-stage,
body[data-ritual-phase="actions"] .vessel-charge-stage,
body[data-ritual-phase="settled"] .vessel-charge-stage {
  opacity: 0;
  transform: translate(-50%, -58%) scale(0.86);
}

/* Result milestones accumulate so later phases cannot restart earlier motion. */
.ritual-stage.is-result .ritual-result-layer {
  opacity: 1;
}

.ritual-stage.is-result .ritual-result-step {
  opacity: 1;
  transition: opacity 560ms ease;
}

.ritual-stage.is-roll-emerge .floating-parchment {
  opacity: 1;
  transition: opacity 420ms ease;
}

.ritual-stage.is-roll-emerge .result-parchment-roll {
  animation: ritualRollEmerge 1680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ritual-stage.is-unfurl .result-parchment-roll {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -12px) scale(0.52);
  transition: opacity 360ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ritual-stage.is-unfurl .parchment-answer {
  animation: ritualParchmentUnfurl 950ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ritual-stage.is-unfurl .parchment-texture {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.ritual-stage.is-copy .answer-copy,
.ritual-stage.is-copy .answer-zh,
.ritual-stage.is-copy .answer-en {
  opacity: 1;
  transition: opacity 760ms ease;
}

.ritual-stage.is-copy .parchment-answer .answer-zh,
.ritual-stage.is-copy .parchment-answer .answer-en {
  filter: none;
  transform: none;
}

.ritual-stage.is-reminder .parchment-reminder {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 700ms ease;
}

.ritual-stage.is-actions .ritual-actions {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 900ms ease;
}

.ritual-stage.is-roll-emerge .vessel-charge-stage {
  opacity: 0;
  transform: translate(-50%, -58%) scale(0.86);
}

@keyframes armedVesselLight {
  from { opacity: 0.78; }
  to { opacity: 1; }
}

@keyframes ritualRollEmerge {
  0% {
    opacity: 0;
    clip-path: inset(0 0 82% 0);
    transform: translate3d(
      calc(-50% + var(--flight-start-x, 0px)),
      var(--flight-start-y, 120px),
      -28px
    ) rotateZ(-13deg) rotateY(42deg) scale(0.18);
  }
  20% {
    opacity: 1;
    clip-path: inset(0 0 38% 0);
    transform: translate3d(
      calc(-50% + var(--flight-lip-x, 0px)),
      var(--flight-lip-y, 72px),
      0
    ) rotateZ(-6deg) rotateY(28deg) scale(0.38);
  }
  58% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate3d(
      calc(-50% + var(--flight-apex-x, 0px)),
      var(--flight-apex-y, -52px),
      36px
    ) rotateZ(6deg) rotateY(-12deg) scale(0.82);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate3d(-50%, 0, 0) rotateZ(0) rotateY(0) scale(1);
  }
}

@keyframes ritualParchmentUnfurl {
  0% {
    opacity: 0.32;
    clip-path: inset(0 49.5% 0 49.5%);
    transform: rotateX(18deg) scale(0.94);
  }
  68% {
    opacity: 1;
    clip-path: inset(0 1.5% 0 1.5%);
    transform: rotateX(-2deg) scale(1.01);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@keyframes ritualRollEmergeReduced {
  from {
    opacity: 0;
    clip-path: inset(0 0 20% 0);
    transform: translate3d(-50%, 22px, 0) scale(0.72);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate3d(-50%, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-ritual-phase="roll-emerge"] .result-parchment-roll,
  body[data-ritual-phase="unfurl"] .result-parchment-roll,
  body[data-ritual-phase="copy"] .result-parchment-roll,
  body[data-ritual-phase="reminder"] .result-parchment-roll,
  body[data-ritual-phase="actions"] .result-parchment-roll,
  body[data-ritual-phase="settled"] .result-parchment-roll,
  .ritual-stage.is-roll-emerge .result-parchment-roll {
    animation-name: ritualRollEmergeReduced;
    animation-duration: 1680ms !important;
    animation-iteration-count: 1 !important;
  }

  body[data-ritual-phase="unfurl"] .parchment-answer,
  body[data-ritual-phase="copy"] .parchment-answer,
  body[data-ritual-phase="reminder"] .parchment-answer,
  body[data-ritual-phase="actions"] .parchment-answer,
  body[data-ritual-phase="settled"] .parchment-answer,
  .ritual-stage.is-unfurl .parchment-answer {
    animation-duration: 950ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 390px) {
  .ritual-stage {
    min-height: 560px;
  }

  .vessel-charge-stage {
    top: 57%;
    width: min(96vw, 390px);
  }

  .ritual-result-layer .floating-parchment {
    width: 100%;
    min-height: 236px;
  }

  .ritual-result-layer .parchment-answer {
    padding-inline: 26px;
  }

  .ritual-result-layer .answer-copy {
    width: 84%;
  }
}

@media (max-height: 700px) {
  .ritual-stage {
    min-height: 470px;
  }

  .question-guidance .ritual-copy {
    font-size: 0.82rem;
    line-height: 1.54;
  }

  .vessel-charge-stage {
    top: 58%;
    width: min(96vw, 76vh, 360px);
  }

  .ritual-result-layer {
    grid-template-rows: auto minmax(210px, 1fr) auto auto;
    gap: 7px;
  }

  .ritual-result-layer .floating-parchment {
    min-height: 210px;
  }
}
