/* ============================================================
   月隐塔罗 — VOID TAROT
   Brutalist void design system:
   #050505 void / grain overlay / editorial serif × mono /
   hairline grid / wireframe sphere / curtain & glitch motion
   ============================================================ */

:root {
  color-scheme: light;
  --void: #020101;
  --void-2: #0a0a0a;
  --bone: #ebe7df;
  --bone-dim: rgba(235, 231, 223, 0.62);
  --bone-faint: rgba(235, 231, 223, 0.34);
  --hairline: rgba(235, 231, 223, 0.16);
  --hairline-soft: rgba(235, 231, 223, 0.07);
  --topic-accent: #e0566a;
  --topic-accent-soft: rgba(224, 86, 106, 0.2);
  --font-serif: "Playfair Display", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
  --radius: 0px;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-curtain: cubic-bezier(0.76, 0, 0.24, 1);
  /* 微信 X5 的 env(safe-area-inset-*) 常返回错误的大值 → 钳到合理上限；
     老 X5 不支持 min() 时第二条声明失效，回落到 0（底栏正常高度） */
  --safe-top: 0px;
  --safe-top: min(env(safe-area-inset-top, 0px), 44px);
  --safe-bottom: 0px;
  --safe-bottom: min(env(safe-area-inset-bottom, 0px), 34px);
  font-family: var(--font-mono);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  display: grid;
  justify-content: center;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--bone);
  background: #000;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: var(--void);
  background: var(--topic-accent);
}

:focus-visible {
  outline: 1px solid var(--topic-accent);
  outline-offset: 2px;
}

/* ---- full-screen film grain ------------------------------- */

.grain {
  position: fixed;
  inset: -40px;
  z-index: 80;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grainShift 1.4s steps(4) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-12px, 8px);
  }

  50% {
    transform: translate(10px, -10px);
  }

  75% {
    transform: translate(-8px, -6px);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* ---- 收集小庆祝 toast：抽到从未见过的牌 ------------------- */
.collect-toast {
  position: fixed;
  top: calc(62px + var(--safe-top));
  left: 50%;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(min(100vw, 480px) - 40px);
  padding: 9px 14px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(16px);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
}

.collect-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.collect-toast.is-paywall {
  top: calc(78px + var(--safe-top));
  z-index: 120;
  align-items: flex-start;
  width: calc(min(100vw, 480px) - 28px);
  max-width: calc(min(100vw, 480px) - 28px);
  padding: 12px 15px;
  border-color: rgba(255, 59, 79, 0.7);
  background: rgba(10, 10, 12, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 59, 79, 0.1);
  font-size: 0.68rem;
  line-height: 1.55;
}

.collect-toast.is-paywall .collect-text {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.collect-toast[hidden] {
  display: none;
}

.collect-mark {
  flex: none;
  color: var(--topic-accent);
  font-size: 0.82rem;
  line-height: 1;
}

.collect-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.collect-count {
  flex: none;
  white-space: nowrap;
  color: var(--bone-dim);
}

/* ---- custom cursor (desktop only) ------------------------- */

.cursor {
  display: none;
}

@media (pointer: fine) {

  body:not(.reduced-motion),
  body:not(.reduced-motion) a,
  body:not(.reduced-motion) button,
  body:not(.reduced-motion) textarea {
    cursor: none;
  }

  .cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: block;
    pointer-events: none;
    mix-blend-mode: difference;
  }

  .cursor-dot,
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
  }

  .cursor-dot {
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    background: #fff;
  }

  .cursor-ring {
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    transition: width 320ms var(--ease-out), height 320ms var(--ease-out),
      margin 320ms var(--ease-out), opacity 320ms ease;
  }

  .cursor.is-hover .cursor-ring {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    opacity: 0.95;
  }

  .cursor.is-hidden {
    opacity: 0;
  }
}

/* ---- desktop void garnish around the frame ----------------- */

@media (min-width: 860px) {
  body::before {
    position: fixed;
    top: 50%;
    left: 30px;
    content: "月隐塔罗 — VOID TAROT — MMXXVI";
    color: var(--bone-faint);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: translateY(-50%);
  }

  body::after {
    position: fixed;
    right: 30px;
    bottom: 28px;
    content: "31.2304°N — 121.4737°E\A SIGNAL: STEADY";
    color: var(--bone-faint);
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.2em;
    line-height: 1.9;
    text-align: right;
    text-transform: uppercase;
    white-space: pre;
  }
}

/* ---- app frame --------------------------------------------- */

.app {
  position: relative;
  display: grid;
  /* 3 个子元素：topbar / app-content / bottom-tabbar。
     必须是 3 行——多一行 auto 会让 app-content 落到 auto 行(撑高不滚动)、
     底栏落到 1fr 行(被拉伸过高)。 */
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100vw, 480px);
  height: 100svh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  border-right: 1px solid var(--hairline-soft);
  border-left: 1px solid var(--hairline-soft);
  /* 径向暗角：中心极淡提亮、边缘压到纯黑 → 深夜纵深氛围（最底层，不碰内容） */
  background: radial-gradient(125% 88% at 50% 30%, #0d0d12, #060608 44%, #000 100%);
}

/* 虚空中央的一缕柔光，衬在内容之下（不影响可读性） */
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(64% 40% at 50% 25%, rgba(213, 222, 235, 0.05), transparent 72%);
}

.void-sphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.topbar,
.insight-bar,
.app-content,
.bottom-tabbar {
  position: relative;
  z-index: 1;
}

/* ---- topbar ------------------------------------------------ */

.topbar {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(56px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 14px 10px;
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(5, 5, 5, 0.95);
}

.top-actions {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--bone);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid var(--bone-dim);
  border-radius: 50%;
}

.brand-mark::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--hairline) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--hairline) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.brand-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  content: "";
  background: var(--topic-accent);
  transform: translate(-50%, -50%);
}

.brand-name {
  display: grid;
  gap: 2px;
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1;
}

.brand-name small {
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.void-clock {
  flex: 0 0 auto;
  color: var(--bone-dim);
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.sibling-link {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--hairline);
  color: var(--bone-dim);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.sibling-link:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
  background: rgba(235, 231, 223, 0.04);
}

.session-chip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(34vw, 130px);
  overflow: hidden;
  padding: 6px 8px;
  border: 1px solid var(--hairline);
  color: var(--bone-dim);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.download-app-btn {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--topic-accent);
  color: var(--topic-accent);
  background: var(--topic-accent-soft);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 200ms ease, transform 200ms ease, background-color 200ms ease;
  white-space: nowrap;
}

.download-app-btn:hover {
  opacity: 0.95;
  transform: translateY(-0.5px);
  background-color: rgba(224, 86, 106, 0.28);
}

.download-app-btn:active {
  opacity: 0.8;
  transform: translateY(0);
}

.audio-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--hairline);
  color: var(--bone-dim);
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.audio-toggle:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
}

.audio-toggle.is-active {
  border-color: var(--topic-accent);
  color: var(--topic-accent);
  background: var(--topic-accent-soft);
}

.audio-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.5;
}

.topbar .top-actions>#audioToggle {
  width: 27px;
  height: 27px;
}

.topbar .top-actions>#audioToggle svg {
  width: 14px;
  height: 14px;
}

/* ---- insight strip ----------------------------------------- */

.insight-bar {
  z-index: 4;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 14px 10px;
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(14px);
  animation: bootFade 700ms ease 220ms both;
}

.insight-bar div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.insight-bar span {
  flex: 0 0 auto;
  color: var(--bone-faint);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.insight-bar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-bar p {
  display: -webkit-box;
  margin-bottom: 0;
  overflow: hidden;
  color: var(--bone-faint);
  font-size: 0.68rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ---- scroll container -------------------------------------- */

.app-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 14px 16px;
  scrollbar-width: none;
}

/* 纵向滚动区里子项不被压缩（内容多时溢出滚动，与原 grid 行为一致） */
.app-content>* {
  flex-shrink: 0;
}

/* 页脚免责声明推到滚动区最底 */
.app-content>.notice {
  margin-top: auto;
}

.app-content::-webkit-scrollbar {
  display: none;
}

/* scroll-velocity skew (driven by void.js) */
.app-content>* {
  transform: skewY(var(--skew, 0deg));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.reader {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

/* ---- hero copy --------------------------------------------- */

.reader-copy {
  padding: 6px 2px 0;
}

.reader-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  width: 100%;
}

.moon-phase {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--bone);
  white-space: nowrap;
  animation: trackIn 900ms var(--ease-out) 180ms both;
}

.app[data-stage="spread"] .moon-phase {
  display: none;
}

.moon-phase-glyph {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-flex;
  line-height: 0;
  opacity: 0.92;
}

.moon-phase-glyph svg {
  vertical-align: middle;
  width: 18px;
  height: 18px;
}

.moon-phase-name {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--bone-dim);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--bone-dim);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  animation: trackIn 900ms var(--ease-out) 260ms both;
}

h1+.eyebrow {
  margin-top: 6px;
}

.eyebrow i {
  color: var(--topic-accent);
  font-style: normal;
}

.eyebrow::after {
  flex: 1 1 auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--hairline), transparent);
}

.eyebrow.mirror-header-style {
  color: var(--topic-accent);
}

.eyebrow.mirror-header-style i {
  display: none;
}

.eyebrow.mirror-header-style::before {
  width: 22px;
  height: 1px;
  content: "";
  background: currentColor;
  flex: none;
}

.eyebrow.mirror-header-style::after {
  display: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 7.6vw, 2.3rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.12;
}

h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

h1 .line>span {
  display: inline-block;
  animation: bootLine 1000ms var(--ease-out) both;
}

h1 .line:nth-child(1)>span {
  animation-delay: 340ms;
}

h1 .line:nth-child(2)>span {
  animation-delay: 460ms;
}

h1 em {
  color: var(--topic-accent);
  font-style: italic;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.2;
}

.reader-status {
  max-width: 34em;
  margin-bottom: 0;
  margin-top: 6px;
  color: var(--bone-dim);
  font-size: 0.7rem;
  line-height: 1.75;
  animation: bootRise 800ms var(--ease-out) 620ms both;
}

.reader-status:empty {
  display: none;
}

/* ---- arcana marquee ----------------------------------------- */

.void-marquee {
  width: calc(100% + 28px);
  margin: 0 -14px;
  overflow: hidden;
  padding: 12px 0;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  animation: bootFade 900ms ease 760ms both;
}

.marquee-track {
  display: inline-flex;
  align-items: baseline;
  gap: 28px;
  width: max-content;
  animation: marqueeScroll 46s linear infinite;
}

.void-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  color: transparent;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(235, 231, 223, 0.32);
  transition: color 260ms ease, -webkit-text-stroke-color 260ms ease;
}

.marquee-track span:hover {
  color: var(--bone);
  -webkit-text-stroke-color: transparent;
}

.marquee-track i {
  color: var(--topic-accent);
  font-size: 0.6rem;
  font-style: normal;
  transform: translateY(-4px);
}

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

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

/* ---- calibration panel -------------------------------------- */

.calibration-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  width: calc(100% + 28px);
  max-width: none;
  min-height: 432px;
  margin: 0 -14px;
  padding: 26px 0 16px;
  overflow: hidden;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(16px);
  animation: bootRise 900ms var(--ease-out) 700ms both;
  transition: min-height 420ms var(--ease-out), border-color 360ms ease;
}

/* ghost step numeral */
.calibration-panel::before {
  position: absolute;
  top: -18px;
  right: 6px;
  content: "01";
  color: transparent;
  font-family: var(--font-serif);
  font-size: 7.6rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  -webkit-text-stroke: 1px rgba(235, 231, 223, 0.12);
  transition: -webkit-text-stroke-color 320ms ease;
}

.calibration-panel[data-step="mood"]::before {
  content: "02";
}

.calibration-panel[data-step="time"]::before {
  content: "03";
}

.calibration-panel.is-complete::before {
  content: "✦";
  -webkit-text-stroke-color: var(--topic-accent-soft);
}

.calibration-panel::after {
  position: absolute;
  top: 26px;
  left: 0;
  content: "CALIBRATION";
  color: var(--bone-faint);
  font-size: 0.5rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  opacity: 0.7;
  pointer-events: none;
}

.calibration-panel.is-cutting .calibration-head,
.calibration-panel.is-cutting .calibration-progress,
.calibration-panel.is-cutting .calibration-stack {
  animation: lensCut 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.calibration-panel.is-complete {
  min-height: 250px;
  border-color: var(--hairline);
}

.calibration-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: none;
  padding: 0 22px;
}

.calibration-head span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.calibration-head span::before {
  width: 22px;
  height: 1px;
  content: "";
  background: currentColor;
}

.calibration-head strong {
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.62rem;
  font-weight: 900;
  line-height: 1.16;
}

.calibration-head p {
  margin-bottom: 0;
  color: var(--bone-faint);
  font-size: 0.66rem;
  line-height: 1.7;
}

.calibration-progress {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 0 22px;
}

.calibration-progress span {
  flex: 1 1 0;
  height: 1px;
  background: var(--hairline);
  transform-origin: left center;
  transition: background 280ms ease, height 280ms ease;
}

.calibration-progress span.is-active {
  height: 2px;
  background: var(--topic-accent);
}

.calibration-stack {
  position: relative;
  z-index: 1;
  min-height: 196px;
  transition: min-height 360ms ease;
}

.calibration-panel.is-complete .calibration-stack {
  min-height: 0;
}

.control-group {
  display: grid;
  gap: 12px;
}

.calibration-card {
  position: absolute;
  inset: 0;
  align-content: start;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 260ms ease, transform 320ms var(--ease-out);
}

.calibration-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.calibration-panel.is-complete .calibration-card {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

.control-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  color: var(--bone-faint);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.control-label::after {
  flex: 1 1 auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--hairline), transparent);
}

.chip-row {
  display: grid;
  grid-auto-columns: minmax(138px, 43%);
  grid-auto-flow: column;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 22px 22px;
  counter-reset: contextCard;
  scroll-padding-inline: 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.context-chip {
  position: relative;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 3px;
  min-height: 148px;
  padding: 18px 15px 14px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 900;
  text-align: left;
  background: rgba(10, 10, 10, 0.6);
  counter-increment: contextCard;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 200ms ease, background 200ms ease,
    transform 280ms var(--ease-out);
}

.context-chip::before {
  position: absolute;
  top: 12px;
  left: 14px;
  content: counter(contextCard, decimal-leading-zero);
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  transition: color 200ms ease;
}

.chip-en {
  order: 1;
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.context-chip::after {
  order: 2;
  display: block;
  margin-top: 4px;
  color: var(--bone-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  line-height: 1.5;
  content: attr(data-scene);
}

.context-chip:hover {
  border-color: var(--bone-dim);
  transform: translateY(-3px);
}

.context-chip:active {
  transform: translateY(-1px) scale(0.99);
}

.context-chip.is-active {
  border-color: var(--topic-accent);
  background:
    linear-gradient(160deg, var(--topic-accent-soft), transparent 55%),
    rgba(10, 10, 10, 0.72);
  box-shadow: inset 0 0 0 1px var(--topic-accent-soft);
  transform: translateY(-5px);
}

.context-chip.is-active::before {
  color: var(--topic-accent);
}

.calibration-card.is-active .control-label,
.calibration-card.is-active .context-chip {
  animation: sceneItemIn 560ms var(--ease-out) both;
}

.calibration-card.is-active .context-chip:nth-child(1) {
  animation-delay: 40ms;
}

.calibration-card.is-active .context-chip:nth-child(2) {
  animation-delay: 90ms;
}

.calibration-card.is-active .context-chip:nth-child(3) {
  animation-delay: 140ms;
}

.calibration-card.is-active .context-chip:nth-child(4) {
  animation-delay: 190ms;
}

.calibration-card.is-active .context-chip:nth-child(5) {
  animation-delay: 240ms;
}

.calibration-summary {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 22px;
}

.calibration-summary::before {
  flex: 0 0 auto;
  margin-right: 12px;
  color: var(--topic-accent);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  content: "已入局 //";
}

.calibration-panel.is-complete .calibration-summary {
  padding-top: 5px;
}

.calibration-summary button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 28px;
  overflow: hidden;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--hairline);
  color: var(--bone-dim);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  transition: color 200ms ease;
}

.calibration-summary button:hover {
  color: var(--bone);
}

/* ---- gated reading flow ------------------------------------- */

.reading-flow {
  display: grid;
  gap: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(18px);
  transition: max-height 620ms var(--ease-out), opacity 420ms ease,
    transform 520ms var(--ease-out), visibility 0ms linear 620ms;
}

.app.is-calibrated .reading-flow {
  max-height: 1080px;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0ms;
}

/* ---- 场景流：四幕 ----------------------------------------------- */

.act {
  display: none;
  gap: 12px;
}

.app[data-stage="question"] .act-question,
.app[data-stage="spread"] .act-spread,
.app[data-stage="ritual"] .act-ritual,
.app[data-stage="reading"] .act-reading {
  display: grid;
  animation: actIn 720ms var(--ease-out) both;
}

/* 解读面板只在第五幕（解读/对话）出现 */
.app:not([data-stage="reading"]) .reading-panel {
  display: none;
}

@keyframes actIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.act-head {
  display: grid;
  gap: 10px;
  padding: 6px 2px 0;
}

.act-head span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.act-head span::before {
  width: 22px;
  height: 1px;
  content: "";
  background: currentColor;
}

.act-head strong {
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.2;
}

.act-head p {
  margin: 0;
  color: var(--bone-faint);
  font-size: 0.66rem;
  line-height: 1.7;
}

.act-head p.is-warn {
  color: var(--topic-accent);
}

.act-next {
  justify-self: stretch;
  width: 100%;
}

.question-anchor-hint {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--bone-faint);
  font-size: 0.68rem;
  line-height: 1.6;
}

.question-anchor-hint.is-show {
  animation: anchorHintIn 360ms var(--ease-out) both;
}

@keyframes anchorHintIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.act-back {
  justify-self: start;
  padding: 6px 0;
  border: 0;
  color: var(--bone-faint);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  background: transparent;
  cursor: pointer;
  transition: color 200ms ease;
}

.act-back:hover {
  color: var(--bone);
}

/* 第三幕：牌阵变成全宽选项列表（游戏式选择） */
.act-spread .spread-tabs {
  grid-template-columns: 1fr;
  gap: 9px;
  border: 0;
}

.act-spread .spread-tab {
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
}

.act-spread .spread-tab span {
  font-size: 1.05rem;
}

.act-spread .spread-tab small {
  font-size: 0.62rem;
  white-space: normal;
}

/* ---- question field ----------------------------------------- */

.question-field {
  position: relative;
  display: grid;
  gap: 9px;
  width: 100%;
}

.question-field label {
  color: var(--bone-dim);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.label-en {
  margin-left: 8px;
  color: var(--bone-faint);
  letter-spacing: 0.3em;
}

.question-field textarea {
  width: 100%;
  min-height: 120px;
  scroll-margin-bottom: 120px;
  padding: 12px 40px 24px 12px;
  resize: none;
  border: 1px solid var(--hairline);
  border-radius: 0;
  outline: none;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  caret-color: var(--topic-accent);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 220ms ease, background 220ms ease;
}

.question-field textarea:focus {
  border-color: var(--topic-accent);
  background: rgba(255, 255, 255, 0.035);
}

.question-clear {
  position: absolute;
  right: 11px;
  bottom: 10px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--hairline);
  color: var(--bone-dim);
  cursor: pointer;
  background: rgba(5, 5, 5, 0.72);
  opacity: 0.82;
  transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease, background 180ms ease;
}

.question-clear[hidden] {
  display: none;
}

.question-clear::before,
.question-clear::after {
  position: absolute;
  width: 11px;
  height: 1px;
  content: "";
  background: currentColor;
}

.question-clear::before {
  transform: rotate(45deg);
}

.question-clear::after {
  transform: rotate(-45deg);
}

.question-clear:hover,
.question-clear:focus-visible {
  border-color: var(--topic-accent);
  color: var(--bone);
  background: rgba(224, 86, 106, 0.12);
  opacity: 1;
}

.question-field textarea.needs-anchor {
  animation: anchorPulse 720ms var(--ease-out) both;
}

@keyframes anchorPulse {

  0%,
  100% {
    border-color: var(--hairline);
    box-shadow: none;
  }

  35% {
    border-color: var(--topic-accent);
    box-shadow: inset 0 0 0 1px var(--topic-accent-soft), 0 0 28px rgba(224, 86, 106, 0.16);
  }
}

.question-field textarea::placeholder {
  color: var(--bone-faint);
}

.question-tools {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.text-button {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  background: transparent;
  isolation: isolate;
  cursor: pointer;
  transition: color 260ms ease, border-color 260ms ease;
}

.text-button::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--bone);
  transform: translateY(101%);
  transition: transform 380ms var(--ease-curtain);
}

.text-button:hover {
  border-color: var(--bone);
  color: var(--void);
}

.text-button:hover::before {
  transform: translateY(0);
}

.question-mirror {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 8px 0 8px 12px;
  border-left: 2px solid var(--topic-accent);
  color: var(--bone-dim);
  font-size: 0.64rem;
  line-height: 1.6;
}

/* ---- spread tabs --------------------------------------------- */

.spread-recommend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--bone-faint);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.spread-more {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  color: var(--bone);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.spread-more:hover {
  border-color: var(--topic-accent);
  color: var(--topic-accent);
}

.spread-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  width: 100%;
  border: 0;
  counter-reset: spreadTab;
}

.spread-tab {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone-dim);
  text-align: left;
  background: transparent;
  counter-increment: spreadTab;
  cursor: pointer;
  transition: background 240ms ease, color 240ms ease;
}

.spread-tab:first-child {
  border-left: 1px solid var(--hairline);
}

.spread-tab::before {
  display: none;
}

.spread-thumb {
  position: relative;
  width: 76px;
  height: 56.3px;
  overflow: hidden;
  border: 1px solid rgba(235, 231, 223, 0.22);
  background:
    radial-gradient(circle at 50% 50%, rgba(235, 231, 223, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
}

@supports (aspect-ratio: 1) {
  .spread-thumb {
    height: auto;
    aspect-ratio: var(--thumb-ratio, 1.35);
  }
}

.spread-thumb::before,
.spread-thumb::after {
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%;
  height: 1px;
  content: "";
  background: rgba(235, 231, 223, 0.08);
}

.spread-thumb::after {
  inset: 0 auto auto 50%;
  width: 1px;
  height: 100%;
}

.spread-thumb i {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: var(--thumb-card-width, 12%);
  height: 0;
  padding-bottom: 19.08%;
  border: 1px solid rgba(235, 231, 223, 0.64);
  background: rgba(235, 231, 223, 0.12);
  box-shadow: 0 0 10px rgba(229, 203, 119, 0.08);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
}

@supports (aspect-ratio: 1) {
  .spread-thumb i {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 2 / 3.18;
  }
}

.spread-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.spread-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 240ms ease;
}

.spread-tab.is-premium::after {
  position: absolute;
  top: 10px;
  right: 9px;
  content: "高级";
  padding: 3px 6px;
  border: 1px solid var(--topic-accent);
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.spread-tab.is-premium.is-active::after {
  color: var(--void);
}

.spread-premium {
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  color: var(--topic-accent);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  vertical-align: middle;
}

.spread-tab.is-active .spread-premium {
  color: rgba(5, 5, 5, 0.72);
}

.spread-copy small {
  min-width: 0;
  overflow: hidden;
  color: var(--bone-faint);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  line-height: 1.55;
  overflow-wrap: anywhere;
  transition: color 240ms ease;
}

.spread-tab:hover {
  background: rgba(255, 255, 255, 0.03);
}

.spread-tab.is-active {
  color: rgba(5, 5, 5, 0.64);
  background: var(--bone);
}

.spread-tab.is-active .spread-copy strong {
  color: var(--void);
}

.spread-tab.is-active .spread-copy small {
  color: rgba(5, 5, 5, 0.62);
}

.spread-tab.is-active .spread-thumb {
  border-color: rgba(5, 5, 5, 0.38);
  background:
    radial-gradient(circle at 50% 50%, rgba(5, 5, 5, 0.16), transparent 42%),
    rgba(5, 5, 5, 0.04);
}

.spread-tab.is-active .spread-thumb::before,
.spread-tab.is-active .spread-thumb::after {
  background: rgba(5, 5, 5, 0.12);
}

.spread-tab.is-active .spread-thumb i {
  border-color: rgba(5, 5, 5, 0.66);
  background: rgba(5, 5, 5, 0.12);
}

/* ---- deck stage ----------------------------------------------- */

.deck-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 180px;
  padding: 12px 0 2px;
}

/* rotating sigil: hairline circle + crosshair */
.deck-stage::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(64vw, 250px);
  height: min(64vw, 250px);
  content: "";
  border: 1px solid rgba(235, 231, 223, 0.12);
  border-radius: 50%;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.1) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.1) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  transform: translate(-50%, -54%);
  opacity: 0.8;
  pointer-events: none;
  animation: sigilSpin 80s linear infinite;
}

@supports (aspect-ratio: 1) {
  .deck-stage::before {
    height: auto;
    aspect-ratio: 1;
  }
}

@keyframes sigilSpin {
  from {
    transform: translate(-50%, -54%) rotate(0deg);
  }

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

.deck-fan,
.draw-button,
.ritual-text {
  position: relative;
  z-index: 1;
}

.deck-fan {
  position: relative;
  width: min(86vw, 430px);
  height: 156px;
}

.deck-card {
  position: absolute;
  left: calc(50% - 47px);
  bottom: 2px;
  width: 94px;
  height: 149.5px;
  border: 1px solid rgba(235, 231, 223, 0.34);
  border-radius: 0;
  background: #0a0a0a;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 120%;
}

@supports (aspect-ratio: 1) {
  .deck-card {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.deck-card::before,
.deck-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.deck-card::before {
  inset: 7px;
  border: 1px solid rgba(235, 231, 223, 0.14);
}

.deck-card::after {
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(235, 231, 223, 0.4);
  border-radius: 50%;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.22) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.22) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  transform: translate(-50%, -50%);
}

/* ---- draw button (curtain + magnetic) -------------------------- */

.draw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 184px;
  min-height: 48px;
  height: 48px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid var(--bone-dim);
  border-radius: 0;
  color: var(--bone);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-indent: 0.32em;
  background: transparent;
  isolation: isolate;
  cursor: pointer;
  transition: color 320ms ease, border-color 320ms ease,
    opacity 300ms ease, transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 洗牌中淡出隐藏洗牌按钮，避免挡住星尘汇聚动画 */
.app.is-shuffling .deck-stage .draw-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.95);
}

.draw-button::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--bone);
  transform: translateY(101%);
  transition: transform 440ms var(--ease-curtain);
}

.draw-button:hover {
  border-color: var(--bone);
  color: var(--void);
}

.draw-button:hover::before {
  transform: translateY(0);
}

.draw-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.draw-button.is-locked {
  border-color: rgba(235, 231, 223, 0.22);
  color: rgba(235, 231, 223, 0.42);
  background: rgba(255, 255, 255, 0.012);
  opacity: 1;
}

.draw-button.is-locked::before {
  display: none;
}

.draw-button.is-locked .draw-icon {
  opacity: 0.52;
}

.ritual-text {
  min-height: 18px;
  color: var(--bone-faint);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
}

.draw-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.draw-icon::before,
.draw-icon::after {
  position: absolute;
  inset: 2px 4px;
  content: "";
  border: 1px solid currentColor;
  transform: rotate(-12deg);
  transition: transform 320ms var(--ease-out);
}

.draw-icon::after {
  transform: translate(4px, -2px) rotate(10deg);
}

.draw-button:hover .draw-icon::before {
  transform: rotate(-22deg);
}

.draw-button:hover .draw-icon::after {
  transform: translate(5px, -3px) rotate(18deg);
}

/* ---- spread board / cards --------------------------------------- */

.spread-board {
  display: grid;
  grid-template-columns: repeat(var(--spread-count, 1), minmax(0, 132px));
  justify-content: center;
  gap: 12px;
  min-height: 222px;
  padding: 2px 0 0;
}

.tarot-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-width: 0;
  height: 200px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(235, 231, 223, 0.55);
  border-radius: 0;
  color: #0c0c0c;
  background: var(--bone);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(22px) rotate(var(--card-tilt, 0deg));
  transition: opacity 360ms ease, transform 560ms var(--ease-out);
}

@supports (aspect-ratio: 1) {
  .tarot-card {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.tarot-card.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--card-tilt, 0deg));
}

.tarot-card::before {
  position: absolute;
  inset: 6px;
  z-index: 1;
  content: "";
  border: 1px solid rgba(5, 5, 5, 0.55);
  pointer-events: none;
}

.card-art {
  display: none;
}

.tarot-card.has-art {
  color: var(--bone);
}

.tarot-card.has-art::before {
  border-color: rgba(235, 231, 223, 0.3);
}

.tarot-card.has-art .card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background-image: var(--card-art);
  background-position: center;
  background-size: cover;
}

.tarot-card.has-art.is-reversed .card-art {
  transform: rotate(180deg);
}

.tarot-card.has-art .card-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.66));
}

/* 活牌：抽牌结果牌阵上，牌面 cinemagraph 叠在静态 .card-art 之上，
   加载成功淡入循环播放，失败/不支持则隐藏、露出静态牌面。文字芯片自带底色，仍清晰。 */
.card-art-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
}

.tarot-card.has-art.is-reversed .card-art-video {
  transform: rotate(180deg);
}

.card-art-video::-webkit-media-controls,
.card-art-video::-webkit-media-controls-enclosure,
.card-art-video::-webkit-media-controls-panel,
.card-art-video::-webkit-media-controls-play-button,
.card-art-video::-webkit-media-controls-start-playback-button,
.card-art-video::-webkit-media-controls-timeline,
.card-art-video::-webkit-media-controls-current-time-display,
.card-art-video::-webkit-media-controls-time-remaining-display,
.card-art-video::-webkit-media-controls-volume-slider,
.card-art-video::-webkit-media-controls-mute-button,
.card-detail-video::-webkit-media-controls,
.card-detail-video::-webkit-media-controls-enclosure,
.card-detail-video::-webkit-media-controls-panel,
.card-detail-video::-webkit-media-controls-play-button,
.card-detail-video::-webkit-media-controls-start-playback-button,
.card-detail-video::-webkit-media-controls-timeline,
.card-detail-video::-webkit-media-controls-current-time-display,
.card-detail-video::-webkit-media-controls-time-remaining-display,
.card-detail-video::-webkit-media-controls-volume-slider,
.card-detail-video::-webkit-media-controls-mute-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  -webkit-appearance: none;
}

.card-art-video.is-living {
  opacity: 1;
}

/* RGB-split glitch on hover */
.tarot-card.has-art .card-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image: var(--card-art);
  background-position: center;
  background-size: cover;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.tarot-card.has-art:hover .card-art::after {
  opacity: 0.8;
  animation: rgbSplit 480ms steps(3) infinite;
}

@keyframes rgbSplit {
  0% {
    transform: translate(2px, 0);
    clip-path: inset(6% 0 62% 0);
    filter: hue-rotate(80deg) saturate(3);
  }

  34% {
    transform: translate(-3px, 1px);
    clip-path: inset(48% 0 14% 0);
    filter: hue-rotate(-70deg) saturate(3);
  }

  67% {
    transform: translate(1px, -1px);
    clip-path: inset(26% 0 40% 0);
    filter: hue-rotate(160deg) saturate(2.4);
  }

  100% {
    transform: translate(2px, 1px);
    clip-path: inset(70% 0 4% 0);
    filter: hue-rotate(40deg) saturate(3);
  }
}

.tarot-card.has-art .card-position {
  width: fit-content;
  min-height: 0;
  padding: 3px 6px;
  border: 0;
  color: rgba(235, 231, 223, 0.85);
  background: rgba(5, 5, 5, 0.66);
}

.tarot-card.has-art .card-orb {
  opacity: 0;
}

.tarot-card.has-art .card-title {
  display: none;
}

.card-open-cue {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 4px 6px;
  border: 1px solid rgba(235, 231, 223, 0.24);
  color: rgba(235, 231, 223, 0.72);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(5, 5, 5, 0.48);
  opacity: 0.72;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms var(--ease-out);
}

.tarot-card:focus-visible .card-open-cue,
.tarot-card:hover .card-open-cue {
  opacity: 1;
}

.card-position {
  position: relative;
  z-index: 2;
  width: fit-content;
  min-height: 0;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(5, 5, 5, 0.4);
  color: rgba(12, 12, 12, 0.66);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.card-orb {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  margin-top: 6px;
  color: transparent;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  font-weight: 900;
  -webkit-text-stroke: 1.4px rgba(12, 12, 12, 0.78);
}

.card-title {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  align-self: end;
  min-width: 0;
}

.card-title strong {
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
}

.card-title span {
  color: rgba(12, 12, 12, 0.55);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spread-board.is-layout {
  position: relative;
  display: block;
  width: min(100%, 680px);
  max-width: 100%;
  min-height: 0;
  height: 504px;
  margin: 0 auto;
  padding: 0;
}

@supports (aspect-ratio: 1) {
  .spread-board.is-layout {
    height: auto;
    aspect-ratio: var(--spread-ratio, 1.35);
  }
}

.spread-board.is-layout .tarot-card {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: var(--layout-card-width, 18%);
  height: 195px;
  transform: translate(-50%, calc(-50% + 22px)) rotate(var(--card-tilt, 0deg));
}

@supports (aspect-ratio: 1) {
  .spread-board.is-layout .tarot-card {
    height: auto;
  }
}

.spread-board.is-layout .tarot-card.is-visible {
  transform: translate(-50%, -50%) rotate(var(--card-tilt, 0deg));
}

.spread-board.is-layout .card-position {
  box-sizing: border-box;
  max-width: 4.8rem;
  overflow: hidden;
  padding-bottom: 2px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spread-board.is-layout.is-wide .tarot-card {
  padding: 8px;
}

.spread-board.is-layout.is-wide .card-orb {
  font-size: 1.78rem;
}

.spread-board.is-layout.is-wide .card-title strong {
  font-size: 0.78rem;
}

.spread-board.is-layout.is-wide .card-title span {
  display: none;
}

.spread-board.is-layout.is-many .tarot-card {
  padding: 6px;
}

.spread-board.is-layout.is-many .card-position {
  box-sizing: border-box;
  max-width: none;
  padding: 2px 4px;
  font-size: 0.4rem;
  letter-spacing: 0;
}

.spread-board.is-layout.is-many .card-orb,
.spread-board.is-layout.is-many .card-title {
  display: none;
}

/* ---- reading panel ----------------------------------------------- */

.reading-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--hairline-soft);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(22px);
  transition: opacity 420ms ease;
  position: relative;
}

.reading-panel.is-gated {
  display: none;
}

.reading-context {
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--hairline);
  color: var(--bone-dim);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reading-context:empty {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head .eyebrow {
  margin-bottom: 7px;
  animation: none;
}

.panel-head .eyebrow::after {
  display: none;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease;
}

.icon-button:hover {
  border-color: var(--bone);
  background: var(--bone);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--bone);
  stroke-linecap: square;
  stroke-width: 1.5;
  transition: stroke 240ms ease;
}

.icon-button:hover svg {
  stroke: var(--void);
}

.summary {
  margin-bottom: 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.75;
}

.result-list {
  display: grid;
  gap: 12px;
  counter-reset: resultItem;
}

.result-list .empty-state {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.015);
}

.result-list .empty-state p {
  margin: 0;
  color: var(--bone-dim);
  font-size: 0.86rem;
  line-height: 1.7;
}

.result-list .empty-state .draw-button {
  width: 100%;
  min-height: 44px;
  font-size: 0.78rem;
}

.result-item {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--hairline-soft);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.015);
  counter-increment: resultItem;
}

.result-item::before {
  position: absolute;
  top: 12px;
  right: 13px;
  content: "— " counter(resultItem, decimal-leading-zero);
  color: var(--bone-faint);
  font-size: 0.54rem;
  letter-spacing: 0.18em;
}

.result-item h3 {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
  padding-right: 44px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.3;
}

.result-item h3 span {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--topic-accent);
  color: var(--topic-accent);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* 牌名前的象征徽标（花色/编号），给标题一个视觉锚点 */
.result-item h3 .result-glyph {
  flex: none;
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: rgba(235, 231, 223, 0.025);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}

.result-item p {
  margin-bottom: 0;
  color: var(--bone-dim);
  font-size: 0.82rem;
  line-height: 1.7;
}

.reading-layers {
  display: grid;
  gap: 10px;
}

.reading-layers p {
  display: grid;
  gap: 5px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--topic-accent);
  font-family: var(--font-serif);
  background: transparent;
}

.reading-layers strong {
  color: var(--topic-accent);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-tags span {
  color: var(--bone-dim);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.result-tags span::before {
  content: "[ ";
  color: var(--bone-faint);
}

.result-tags span::after {
  content: " ]";
  color: var(--bone-faint);
}

/* ---- footer notice ------------------------------------------------ */

.notice {
  display: grid;
  gap: 7px;
  padding: 6px 4px 12px;
  color: var(--bone-faint);
  font-size: 0.6rem;
  line-height: 1.7;
  text-align: center;
}

.notice-meta {
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---- bottom tabbar ------------------------------------------------- */

.bottom-tabbar {
  z-index: 5;
  display: none !important;
  /* display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); */
  gap: 0;
  min-height: calc(58px + var(--safe-bottom));
  padding: 0 0 var(--safe-bottom);
  border-top: 1px solid var(--hairline-soft);
  background: rgba(5, 5, 5, 0.95);
}

.tab-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 6px 2px;
  border: 0;
  border-left: 1px solid var(--hairline-soft);
  border-radius: 0;
  color: var(--bone-faint);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  background: transparent;
  cursor: pointer;
  transition: color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.tab-item:first-child {
  border-left: 0;
}

.tab-item svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.4;
}

.tab-item:hover {
  color: var(--bone-dim);
}

.tab-item.is-active {
  color: var(--bone);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 2px 0 var(--topic-accent);
}

/* ---- preview page (cards-preview.html) ----------------------------- */

body.preview-body {
  display: block;
  overflow-y: auto;
  background: var(--void);
  scrollbar-width: none;
}

body.preview-body::-webkit-scrollbar {
  display: none;
}

.preview-page {
  display: grid;
  gap: 26px;
  width: min(100%, 1180px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(26px + var(--safe-top)) 18px calc(30px + var(--safe-bottom));
}

.preview-head {
  display: grid;
  gap: 12px;
}

.preview-head .brand {
  margin-bottom: 12px;
}

.preview-head h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.card-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 18px;
  counter-reset: galleryCard;
}

.card-gallery article {
  display: grid;
  gap: 10px;
  min-width: 0;
  counter-increment: galleryCard;
}

.card-gallery img {
  display: block;
  width: 100%;
  height: 235px;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--void-2);
  transition: border-color 240ms ease, transform 320ms var(--ease-out);
}

@supports (aspect-ratio: 1) {
  .card-gallery img {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.card-gallery article:hover img {
  border-color: var(--bone-dim);
  transform: translateY(-4px);
}

.missing-card {
  display: grid;
  place-items: center;
  width: 100%;
  height: 235px;
  border: 1px dashed var(--hairline);
  border-radius: 0;
  color: var(--bone-faint);
  font-family: var(--font-serif);
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.015);
}

@supports (aspect-ratio: 1) {
  .missing-card {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.card-gallery strong {
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: 900;
}

.card-gallery strong::before {
  margin-right: 8px;
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  content: counter(galleryCard, decimal-leading-zero);
}

/* ---- shuffle ritual ------------------------------------------------- */

.is-shuffling .deck-card {
  animation: shuffle 720ms ease-in-out both;
  animation-delay: calc(var(--i) * 36ms);
}

.is-shuffling .deck-stage::before {
  animation: sigilPulse 900ms ease-in-out both;
}

@keyframes shuffle {
  0% {
    transform: translateX(0) rotate(var(--angle));
  }

  42% {
    transform: translateX(calc(var(--shift) * 1px)) translateY(-12px) rotate(calc(var(--angle) + 11deg));
  }

  100% {
    transform: translateX(0) rotate(var(--angle));
  }
}

@keyframes sigilPulse {
  0% {
    border-color: rgba(235, 231, 223, 0.12);
    opacity: 0.5;
    transform: translate(-50%, -54%) scale(0.97);
  }

  52% {
    border-color: var(--topic-accent);
    opacity: 1;
    transform: translate(-50%, -54%) scale(1.05) rotate(6deg);
  }

  100% {
    border-color: rgba(235, 231, 223, 0.12);
    opacity: 0.8;
    transform: translate(-50%, -54%) scale(1);
  }
}

/* ---- boot / reveal keyframes ----------------------------------------- */

@keyframes bootFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes bootRise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bootLine {
  from {
    transform: translateY(112%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes trackIn {
  from {
    letter-spacing: 0.7em;
    opacity: 0;
  }

  to {
    letter-spacing: 0.42em;
    opacity: 1;
  }
}

@keyframes lensCut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  44% {
    opacity: 0.25;
    transform: translateY(-8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sceneItemIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- responsive -------------------------------------------------------- */

@media (min-width: 860px) {
  .app {
    width: 430px;
    max-height: 920px;
    border-right: 1px solid var(--hairline-soft);
    border-left: 1px solid var(--hairline-soft);
    box-shadow: 0 0 90px rgba(0, 0, 0, 0.8);
  }

  .deck-stage {
    min-height: 198px;
  }
}

@media (max-width: 430px) {
  .app {
    width: 100vw;
    border-right: 0;
    border-left: 0;
  }

  .void-clock {
    display: none;
  }

  .calibration-panel {
    min-height: 410px;
    padding: 24px 0 15px;
  }

  .calibration-head,
  .calibration-progress,
  .control-label,
  .calibration-summary {
    padding-right: 20px;
    padding-left: 20px;
  }

  .calibration-head strong {
    font-size: 1.5rem;
  }

  .calibration-panel::before {
    font-size: 6.4rem;
  }

  .chip-row {
    grid-auto-columns: minmax(132px, 44%);
    padding: 0 20px 22px;
    scroll-padding-inline: 20px;
  }

  .context-chip {
    min-height: 140px;
    padding: 17px 14px 13px;
    font-size: 1.1rem;
  }

  .question-tools {
    display: grid;
  }

  .spread-tab {
    min-height: 64px;
    padding: 11px 8px 9px;
  }

  .spread-tab span {
    font-size: 0.88rem;
  }

  .deck-fan {
    height: 140px;
  }

  .deck-card {
    left: calc(50% - 40px);
    width: 80px;
  }

  .spread-board {
    grid-template-columns: repeat(var(--spread-count, 1), minmax(0, 104px));
    gap: 8px;
    min-height: 178px;
  }

  .tarot-card {
    padding: 8px;
  }

  .spread-tab span {
    font-size: 0.76rem;
  }

  .card-orb {
    font-size: 2rem;
  }

  .card-title strong {
    font-size: 0.78rem;
  }
}

/* ---- daily draw -------------------------------------------------------- */

.daily-strip {
  border: 1px solid var(--hairline-soft);
  background: rgba(15, 15, 18, 0.95);
}

/* 开始抽牌流程后（离开问题首页）隐藏「今日一牌」入口 */
.app:not([data-stage="question"]) .daily-strip {
  display: none;
}

.daily-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  color: var(--bone);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.daily-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 900;
}

.daily-label small {
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.daily-date {
  flex: 1 1 auto;
  color: var(--bone-faint);
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

.daily-streak {
  padding: 3px 7px;
  border: 1px solid var(--topic-accent);
  color: var(--topic-accent);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.daily-caret {
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--bone-dim);
  border-bottom: 1px solid var(--bone-dim);
  transform: rotate(45deg);
  transition: transform 280ms var(--ease-out);
}

.daily-toggle[aria-expanded="true"] .daily-caret {
  transform: rotate(225deg) translate(-2px, -2px);
}

.daily-enter {
  color: var(--topic-accent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

/* ---- 第二幕半：问题镜像中场 ----------------------------------------- */

.mirror-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 34px 26px;
  overflow: hidden;
  background: radial-gradient(circle at 28% 22%, rgba(22, 18, 24, 0.92), rgba(5, 5, 5, 0.99) 72%);
  animation: dailyFade 520ms ease;
}

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

.mirror-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 22% 28%, rgba(235, 231, 223, 0.32), transparent),
    radial-gradient(1px 1px at 72% 18%, rgba(235, 231, 223, 0.24), transparent),
    radial-gradient(1px 1px at 38% 72%, rgba(235, 231, 223, 0.28), transparent),
    radial-gradient(1px 1px at 84% 64%, rgba(235, 231, 223, 0.2), transparent),
    radial-gradient(2px 2px at 58% 84%, rgba(235, 231, 223, 0.16), transparent);
}

.mirror-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  width: min(100%, 460px);
}

.mirror-eyebrow {
  margin: 0;
  color: var(--topic-accent);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.mirror-eyebrow.is-listening::after {
  content: " ···";
  animation: caretBlink 1.1s steps(1) infinite;
}

.mirror-lines {
  display: grid;
  gap: 18px;
}

.mirror-surface {
  margin: 0;
  min-height: 1.5em;
  color: var(--bone-faint);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* 核心：被说中的那句——大字、亮、压住整屏 */
.mirror-deeper {
  margin: 0;
  min-height: 1.4em;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.46rem;
  font-weight: 900;
  line-height: 1.48;
  letter-spacing: 0.01em;
}

.mirror-frame {
  margin: 0;
  min-height: 1.5em;
  padding-left: 14px;
  border-left: 1px solid var(--topic-accent);
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.75;
}

.mirror-surface.is-typing::after,
.mirror-deeper.is-typing::after,
.mirror-frame.is-typing::after {
  content: "▍";
  color: var(--topic-accent);
  animation: caretBlink 0.9s steps(1) infinite;
}

.mirror-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 10px;
  animation: dailyRevealIn 620ms var(--spring-soft, cubic-bezier(0.2, 0.82, 0.2, 1));
}

.mirror-actions[hidden] {
  display: none;
}

.mirror-rephrase {
  padding: 8px 2px;
  border: 0;
  color: var(--bone-faint);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  transition: color 200ms ease;
}

.mirror-actions .draw-button {
  flex: 0 0 100%;
  max-width: 260px;
}

.mirror-rephrase:hover {
  color: var(--bone);
}

/* ---- 今日一牌：全屏抽卡仪式 ----------------------------------------- */

.daily-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 28px 22px;
  overflow: hidden;
  background: radial-gradient(circle at 72% 26%, rgba(20, 18, 22, 0.9), rgba(5, 5, 5, 0.98) 70%);
  animation: dailyFade 420ms ease;
}

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

/* 星尘 */
.daily-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(235, 231, 223, 0.35), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(235, 231, 223, 0.25), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(235, 231, 223, 0.3), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(235, 231, 223, 0.2), transparent),
    radial-gradient(1px 1px at 12% 80%, rgba(235, 231, 223, 0.25), transparent),
    radial-gradient(2px 2px at 60% 85%, rgba(235, 231, 223, 0.18), transparent);
}

.daily-void {
  display: none;
}

.daily-close {
  position: absolute;
  top: calc(16px + var(--safe-top));
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone-dim);
  font-size: 0.9rem;
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, opacity 300ms ease;
}

.daily-close:hover {
  border-color: var(--bone);
  color: var(--bone);
}

.daily-stage {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 430px);
  text-align: center;
  overflow: visible;
  height: 100vh;
}

.daily-stage.is-reveal {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.daily-stage.is-reveal .daily-container {
  display: none;
}

.daily-stage-eyebrow {
  margin: 0;
  color: var(--topic-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.daily-stage-date {
  margin: 0 0 4px;
  color: var(--bone-faint);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
}

/* —— 抽牌：三张背面牌 —— */

.daily-topic-stage[hidden],
.daily-pick-stage[hidden] {
  display: none !important;
}

.daily-topic-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.daily-topic-prompt {
  margin: 20px 0 35px;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--bone);
  line-height: 1.7;
  letter-spacing: 0.08em;
}

.daily-topics {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 280px;
}

.daily-topic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(235, 231, 223, 0.22);
  border-radius: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 220ms ease, color 220ms ease, background-color 220ms ease;
}

.daily-topic-btn:hover,
.daily-topic-btn:active {
  border-color: var(--topic-accent);
  color: var(--bone);
  background-color: rgba(235, 231, 223, 0.03);
}

.daily-pick-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}



.prompt-intro {
  font-size: 0.82rem;
  color: var(--topic-accent);
  letter-spacing: 0.12em;
  margin-bottom: 20px !important;
}

.daily-container {
  display: grid;
  height: 40%;
  padding-top: 1%;
  gap: 10px;
}

.prompt-main {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.prompt-sub {
  font-size: 0.78rem;
  color: var(--bone-faint);
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.prompt-chosen {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.1em;
  margin: 50px 0 !important;
}

.daily-cards {
  position: relative;
  width: 100%;
  height: 55vh;
  perspective: 1000px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  margin-top: 0;
}

.daily-cards:active {
  cursor: grabbing;
}

.daily-deck-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 90px;
  height: 144px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: url('card-back.webp') center / cover no-repeat;
  cursor: pointer;
  backface-visibility: hidden;
  border: 1px solid #61460c;
  will-change: transform, opacity;
}

.daily-deck-card .card-num {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  color: rgba(220, 200, 180, 0.7);
  pointer-events: none;
  line-height: 1;
  opacity: 0;
}

.daily-cards.is-touching .daily-deck-card .card-num {
  opacity: 1;
}

@supports (aspect-ratio: 1) {
  .daily-deck-card {
    height: auto;
    aspect-ratio: 2 / 3.2;
  }
}

/* 图腾和 shimmer 已移除，用背景图替代 */
.daily-deck-card span,
.daily-deck-card span::before,
.daily-deck-card span::after,
.daily-deck-card::after,
.daily-deck-card::before,
.daily-deck-card-shimmer {
  display: none;
}

/* 选中态（仅此时才启用 transition） */
.daily-deck-card.is-chosen {
  z-index: 999 !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.daily-deck-card.is-dismissed {
  opacity: 0 !important;
  transform: translate3d(0, 80px, -50px) scale(0.7) !important;
  pointer-events: none !important;
  transition: transform 0.6s ease, opacity 0.5s ease !important;
}

/* —— 揭示：浮动英雄牌（同一 DOM 节点全程复用） —— */

.daily-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 0 20px;
  box-sizing: border-box;
  pointer-events: none;
}

.daily-hero[hidden] {
  display: none !important;
}

/* 英雄牌容器：承载从牌轮提升出来的选中牌 */
.daily-hero-card {
  position: relative;
  width: auto;
  height: auto;
  flex: 1 1 auto;
  max-height: 100vh; /* 彻底放开卡牌最大高度限制，使其在Flex流中自适应撑满全部剩余空间 */
  min-height: 120px;
  perspective: 1100px;
  flex-shrink: 0;
  pointer-events: auto;
}

.daily-hero.is-content-visible .daily-hero-card {
  flex: 1 1 auto;
  max-height: 100vh;
  min-height: 120px;
}

@supports (aspect-ratio: 1) {
  .daily-hero-card {
    aspect-ratio: 2 / 3.2;
  }
}

/* 英雄牌内的翻牌容器（JS 动态注入） */
.daily-hero-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1200ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.daily-hero-flip.is-flipped {
  transform: rotateY(180deg);
}

.daily-hero-flip-back,
.daily-hero-flip-front {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.daily-hero-flip-back {
  background: url('card-back.webp') center / cover no-repeat;
}

.daily-hero-flip-front {
  display: grid;
  place-items: center;
  color: transparent;
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-style: italic;
  font-weight: 900;
  background: var(--bone);
  -webkit-text-stroke: 1.4px rgba(12, 12, 12, 0.78);
  transform: rotateY(180deg);
}

.daily-hero-flip-front.has-art {
  background: var(--bone) center / cover no-repeat;
  -webkit-text-stroke: 0;
}

.daily-hero-flip-front.is-reversed {
  transform: rotateY(180deg) rotate(180deg);
}

/* 英雄牌下方的解牌内容淡入（空间从飞入起即在DOM中预留，消除高度跳变） */
.daily-hero .daily-reveal-name,
.daily-hero .daily-reveal-note,
.daily-hero .daily-reveal-ask-box {
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease,
              transform 600ms cubic-bezier(0.25, 1, 0.5, 1);
}

.daily-hero.is-content-visible .daily-reveal-name,
.daily-hero.is-content-visible .daily-reveal-note,
.daily-hero.is-content-visible .daily-reveal-ask-box {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.daily-hero.is-content-visible .daily-reveal-note {
  transition-delay: 100ms;
}

.daily-hero.is-content-visible .daily-reveal-ask-box {
  transition-delay: 200ms;
}

.daily-reveal-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.daily-reveal-note {
  max-width: 30em;
  margin: auto 0 0;
  padding: 0 16px;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.6;
  flex-shrink: 1;
  overflow-y: auto;
  height: 110px;
  scrollbar-width: none;
}

.daily-reveal-note::-webkit-scrollbar {
  display: none;
}

.daily-reveal-note.is-waiting {
  color: var(--bone-faint);
  letter-spacing: 0.08em;
}

.daily-reveal-note.is-typing::after {
  content: "▍";
  color: var(--topic-accent);
  animation: caretBlink 0.9s steps(1) infinite;
}

.daily-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  padding: 0 16px;
}

/* —— 首页每日一牌提问引导语 —— */
.question-field label.daily-guide {
  display: block;
  color: var(--topic-accent);
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: normal;
  line-height: 1.55;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: 8px;
  text-align: left;
}

/* —— 「带着它问一局」CTA —— */
.daily-ask-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(235, 231, 223, 0.85);
  border-radius: 0;
  color: #050505;
  color: var(--void);
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #ebe7df;
  background: var(--bone);
  cursor: pointer;
  overflow: hidden;
  transition: opacity 200ms ease;
}

.daily-ask-cta:active {
  opacity: 0.75;
}

.daily-ask-cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.daily-ask-arrow {
  display: inline-block;
  font-weight: 400;
  margin-left: 6px;
}

@keyframes dailyFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes dailyFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes dailyHalo {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.94);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.06);
  }
}

/* 发牌：每张从牌堆方向旋着落位 */
@keyframes dailyDeal {
  from {
    opacity: 0;
    transform: translate(-60px, -52px) rotate(-24deg) scale(0.7);
  }

  to {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

/* 揭示：从小到大旋转放大入场 */
@keyframes dailyRevealIn {
  from {
    opacity: 0;
    transform: scale(0.42) translateY(12px) rotate(-12deg);
  }

  55% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0);
  }
}

.daily-body {
  display: flex;
  gap: 14px;
  padding: 4px 14px 14px;
  border-top: 1px solid var(--hairline-soft);
}

.daily-body[hidden] {
  display: none;
}

.daily-card-face {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 64px;
  height: 102px;
  margin-top: 12px;
  border: 1px solid var(--hairline);
  color: transparent;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 900;
  background: #0a0a0a center / cover no-repeat;
  -webkit-text-stroke: 1px rgba(235, 231, 223, 0.5);
}

@supports (aspect-ratio: 1) {
  .daily-card-face {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.daily-copy {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 8px;
  padding-top: 12px;
}

.daily-copy strong {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 900;
}

.daily-copy p {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1.7;
}

.daily-copy .text-button {
  justify-self: start;
}

.daily-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
}

/* —— 每日一牌内嵌提问框 —— */
.daily-reveal-ask-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  padding: 0 16px;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-top: 14px;
}

.daily-ask-input-container {
  position: relative;
  border: 1px solid var(--topic-accent-soft);
  background: rgba(255, 86, 106, 0.015);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.daily-ask-input-container:focus-within {
  border-color: var(--topic-accent);
  box-shadow: 0 0 12px rgba(224, 86, 106, 0.15), inset 0 0 6px rgba(224, 86, 106, 0.05);
}

.daily-ask-input-container::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 6px;
  width: 2px;
  height: 10px;
  background: var(--topic-accent);
  opacity: 0.85;
}

.daily-ask-input-container textarea {
  width: 100%;
  padding: 10px 12px 10px 16px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none;
  caret-color: var(--topic-accent);
  box-sizing: border-box;
  display: block;
}

.daily-ask-submit {
  width: 100%;
  min-height: 42px;
  font-size: 0.86rem;
  justify-content: center;
  background: var(--bone);
  color: var(--void);
  border: 1px solid var(--bone);
  font-weight: 700;
  overflow: visible !important;
  animation: buttonBreathe 2s ease-in-out infinite;
  transition: background-color 220ms ease, border-color 220ms ease, transform 220ms var(--spring-soft, cubic-bezier(0.19, 1, 0.22, 1)), box-shadow 220ms ease;
}

.daily-ask-submit::before {
  display: none !important;
}

.daily-ask-submit:hover {
  background: #fff;
  border-color: #fff;
  color: var(--void);
  transform: scale(1.03) !important;
  box-shadow: 0 0 36px rgba(224, 86, 106, 0.95), 0 0 16px rgba(224, 86, 106, 0.5) !important;
  animation: none;
}

@keyframes buttonBreathe {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(224, 86, 106, 0.35), 0 0 4px rgba(224, 86, 106, 0.15);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 28px rgba(224, 86, 106, 0.85), 0 0 10px rgba(224, 86, 106, 0.4);
    transform: scale(1.012);
  }
}

/* ---- oracle reading -------------------------------------------------- */

.oracle-mirror {
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--topic-accent);
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.85;
}

.oracle-mirror.is-typing::after {
  content: "▍";
  color: var(--topic-accent);
  animation: caretBlink 0.9s steps(1) infinite;
}

.oracle-mirror.is-waiting {
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.oracle-mirror.is-waiting::after,
.reader-status.is-waiting::after,
.layer-content.is-waiting::after,
.next-step.is-waiting::after {
  content: "";
  animation: loadingDots 1.5s infinite;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@keyframes loadingDots {

  0%,
  100% {
    content: "·";
  }

  33% {
    content: "··";
  }

  66% {
    content: "···";
  }
}


.next-step {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--topic-accent);
}

.next-step strong {
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.next-step p {
  margin: 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.7;
}

.boundary-note-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--bone-dim);
}

.boundary-note-block strong {
  color: var(--bone);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.boundary-note-block p {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  line-height: 1.75;
}

.boundary-note-block .boundary-hotline {
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

/* ---- 第五幕：月隐对话 ---------------------------------------------- */

.oracle-chat {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
  animation: actIn 700ms var(--ease-out) both;
}

.oracle-chat[hidden] {
  display: none;
}

.chat-head {
  display: grid;
  gap: 6px;
}

.chat-head span {
  color: var(--topic-accent);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.chat-head strong {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 900;
}

.chat-thread {
  display: grid;
  gap: 10px;
}

.chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.75;
}

.chat-bubble.is-oracle {
  justify-self: start;
  border-left: 2px solid var(--topic-accent);
  color: var(--bone-dim);
  background: rgba(255, 255, 255, 0.015);
}

.chat-bubble.is-user {
  justify-self: end;
  border: 1px solid var(--hairline);
  color: var(--bone);
}

.chat-bubble.is-typing-bubble {
  color: var(--bone-faint);
  animation: caretBlink 1.1s steps(1) infinite;
}

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-suggest button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone-dim);
  font-size: 0.66rem;
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease;
}

.chat-suggest button:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
}

/* 追问输入：textarea + 麦克风 + 发送 合成一条统一描边栏，竖线分隔，整体聚焦亮 accent。 */
.chat-input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 220ms ease;
}

.chat-input-row:focus-within {
  border-color: var(--topic-accent);
}

.chat-input-row textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 12px 14px;
  resize: none;
  border: 0;
  border-radius: 0;
  outline: none;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  caret-color: var(--topic-accent);
  background: transparent;
}

.chat-input-row textarea:disabled {
  opacity: 0.45;
}

/* 第五幕对话区的「按住说话」麦克风：并入输入栏，左侧竖线分隔 */
.chat-mic {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  align-self: stretch;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone-dim);
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: color 200ms ease, background 200ms ease;
}

.chat-mic[hidden] {
  display: none;
}

.chat-mic svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-mic:hover {
  color: var(--bone);
  background: rgba(235, 231, 223, 0.04);
}

.chat-mic.is-rec {
  color: var(--topic-accent);
  background: var(--topic-accent-soft);
  animation: voiceBreathe 0.9s ease-in-out infinite;
}

.chat-mic.is-cancel {
  color: var(--bone-dim);
  background: rgba(235, 231, 223, 0.06);
  animation: none;
}

.chat-mic.is-busy {
  cursor: wait;
  color: var(--bone-faint);
}

/* 发送按钮并入输入栏：去掉独立边框，左侧竖线分隔 */
.chat-input-row .text-button {
  align-self: stretch;
  min-height: 0;
  border: 0;
  border-left: 1px solid var(--hairline);
}

/* 输入栏下方一行教学提示：明确「可打字、也可按住说话」 */
.chat-input-hint {
  margin-top: 7px;
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.chat-input-hint[hidden] {
  display: none;
}

/* ---- records view ----------------------------------------------------- */

.records-panel {
  display: none;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(22px);
}

.app[data-view="records"] .reader,
.app[data-view="records"] .reading-panel,
.app[data-view="records"] .notice {
  display: none;
}

.app[data-view="records"] .records-panel {
  display: grid;
}

.records-empty {
  margin: 0;
  padding: 52px 22px;
  color: var(--bone-dim);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.7;
  text-align: center;
}

.records-empty-mark {
  display: block;
  margin-bottom: 14px;
  color: var(--bone-faint);
  font-size: 1.8rem;
  line-height: 1;
}

.revisit-banner {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--topic-accent);
}

.revisit-banner strong {
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.5;
}

.revisit-banner p {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  line-height: 1.65;
}

.revisit-banner span {
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

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

.revisit-actions button,
.record-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone-dim);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease;
}

.revisit-actions button:hover,
.record-actions button:hover {
  border-color: var(--bone);
  color: var(--void);
  background: var(--bone);
}

.records-list {
  display: grid;
  gap: 10px;
}

.record-item {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
}

.record-item header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
  color: var(--bone-faint);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.record-item header i {
  color: var(--topic-accent);
  font-style: normal;
}

.record-cards {
  color: var(--bone-dim);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.record-summary {
  margin: 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.86rem;
  line-height: 1.65;
}

.record-detail {
  display: none;
  gap: 9px;
  padding-top: 4px;
  border-top: 1px solid var(--hairline-soft);
}

.record-item.is-open .record-detail {
  display: grid;
}

.record-detail p {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  line-height: 1.65;
}

.record-detail strong {
  display: block;
  margin-bottom: 3px;
  color: var(--topic-accent);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.record-actions {
  display: flex;
  gap: 8px;
}

/* ---- proof & quota -------------------------------------------------------- */

.proof-line {
  margin: 10px 0 0;
  color: var(--bone-faint);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.quota-line {
  position: relative;
  z-index: 1;
  color: var(--bone-faint);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-align: center;
}

.quota-line.has-pass {
  color: var(--topic-accent);
}

/* ---- mine view ------------------------------------------------------------ */

.mine-panel {
  display: none;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(22px);
}

.app[data-view="mine"] .reader,
.app[data-view="mine"] .reading-panel,
.app[data-view="mine"] .notice {
  display: none;
}

.app[data-view="mine"] .mine-panel {
  display: grid;
}

.pass-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--hairline);
}

.pass-card.is-active {
  border-color: var(--topic-accent);
}

.pass-card strong {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 900;
}

.pass-card.is-active strong {
  color: var(--topic-accent);
}

.pass-card span,
.pass-loading {
  color: var(--bone-dim);
  font-size: 0.64rem;
  line-height: 1.7;
}

.redeem-row {
  display: flex;
  gap: 10px;
}

.redeem-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  outline: none;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  caret-color: var(--topic-accent);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 220ms ease;
}

.redeem-row input:focus {
  border-color: var(--topic-accent);
}

.redeem-row input::placeholder {
  color: var(--bone-faint);
  text-transform: none;
}

.redeem-msg {
  margin: 0;
  color: var(--topic-accent);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.redeem-msg.is-ok {
  color: #2de0b0;
}

.mine-hint {
  margin: 0;
  color: var(--bone-faint);
  font-size: 0.62rem;
  line-height: 1.7;
}

.monthly-block {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
}

.monthly-button {
  min-width: 0;
  justify-self: start;
}

.month-report {
  display: grid;
  gap: 12px;
  padding: 16px 14px;
  border: 1px solid var(--hairline);
}

.month-report header {
  color: var(--bone-faint);
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.month-opening,
.month-echo {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  line-height: 1.75;
}

.month-opening {
  color: var(--bone);
  padding-left: 12px;
  border-left: 2px solid var(--topic-accent);
}

.month-cards {
  display: grid;
  gap: 10px;
}

.month-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.month-card-face {
  flex: 0 0 auto;
  width: 52px;
  height: 83px;
  border: 1px solid var(--hairline);
  background: #0a0a0a center / cover no-repeat;
}

@supports (aspect-ratio: 1) {
  .month-card-face {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.month-card-copy {
  display: grid;
  gap: 4px;
}

.month-card-copy strong {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 900;
}

.month-card-copy p {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  line-height: 1.65;
}

.month-theme {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
}

.month-advice {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--topic-accent);
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1.65;
}

.month-advice strong {
  color: var(--topic-accent);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---- portrait（月隐的记事本）------------------------------------------- */

.portrait-block {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
}

.portrait-view {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--hairline);
}

.portrait-meta {
  margin: 0;
  color: var(--bone-faint);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portrait-view p,
.portrait-view div {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.84rem;
  line-height: 1.7;
}

.portrait-view strong {
  display: block;
  margin-bottom: 3px;
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.portrait-view ul {
  margin: 0;
  padding-left: 18px;
}

.portrait-view li {
  margin-bottom: 4px;
}

/* ---- 牌库陈列 ----------------------------------------------------------- */

.gallery-block {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
}

.gallery-count {
  color: var(--topic-accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 6px;
}

.gallery-card {
  position: relative;
  height: 0;
  padding-bottom: 159%;
  border: 1px solid var(--hairline-soft);
  border-radius: 0;
  background: #0a0a0a center / cover no-repeat;
}

@supports (aspect-ratio: 1) {
  .gallery-card {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 2 / 3.18;
  }
}

/* 亮牌可点开深读档案 */
button.gallery-card {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.18s var(--spring-soft, ease), box-shadow 0.18s ease;
}

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

button.gallery-card:active {
  transform: scale(0.96);
}

button.gallery-card:focus-visible {
  outline: 1px solid var(--bone-dim);
  outline-offset: 2px;
}

/* 没遇见：暗处的剪影 */
.gallery-card.is-locked {
  border-color: rgba(235, 231, 223, 0.06);
  background:
    linear-gradient(160deg, #0c0a0e, #070707);
  opacity: 0.5;
}

.gallery-card.is-locked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(235, 231, 223, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* 遇见过：亮起 */
.gallery-card.is-seen {
  border-color: rgba(235, 231, 223, 0.32);
  box-shadow: inset 0 0 0 1px rgba(235, 231, 223, 0.08);
}

.gallery-card.is-seen.has-art {
  box-shadow: inset 0 0 0 1px rgba(235, 231, 223, 0.14), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.gallery-card.no-art {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #15131a, #0a0a0a);
}

.gallery-sym {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--bone-dim);
}

/* ---- card detail archive ----------------------------------------------- */

.card-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
}

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

body.card-detail-open {
  overflow: hidden;
}

.card-detail-sheet {
  position: relative;
  width: min(100vw, 480px);
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--hairline-soft);
  border-left: 1px solid var(--hairline-soft);
  color: var(--bone);
  background: var(--void);
  scrollbar-width: thin;
}

.card-detail-close {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: max(14px, calc((100vw - 480px) / 2 + 14px));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(235, 231, 223, 0.24);
  color: var(--bone);
  background: rgba(5, 5, 5, 0.52);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.card-detail-hero {
  position: relative;
  min-height: min(62svh, 560px);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--void-2);
}

.card-detail-art {
  position: absolute;
  inset: -5% 0 0;
  background-position: center 20%;
  background-size: cover;
  filter: saturate(1.03) contrast(1.04);
  transform: scale(1.04);
}

.card-detail-overlay.is-reversed .card-detail-art {
  transform: scale(1.04) rotate(180deg);
}

.card-detail-video {
  position: absolute;
  inset: -5% 0 0;
  width: 100%;
  height: 105%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.card-detail-overlay.is-reversed .card-detail-video {
  transform: scale(1.04) rotate(180deg);
}

.card-detail-video.is-playing {
  opacity: 1;
}

.card-detail-art:not(.has-art) {
  background:
    radial-gradient(circle at 45% 28%, var(--topic-accent-soft), transparent 34%),
    repeating-linear-gradient(90deg, rgba(235, 231, 223, 0.07) 0 1px, transparent 1px 38px),
    var(--void-2);
}

.card-detail-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.18), transparent 34%, rgba(5, 5, 5, 0.96)),
    linear-gradient(90deg, rgba(5, 5, 5, 0.64), transparent 18%, transparent 82%, rgba(5, 5, 5, 0.64));
}

.card-detail-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 10px;
  padding: 0 22px 24px;
}

.card-detail-title span {
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.card-detail-title h2 {
  margin: 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 14vw, 5.4rem);
  font-weight: 900;
  line-height: 0.92;
  text-shadow: 0 24px 60px rgba(0, 0, 0, 0.62);
}

.card-detail-title p {
  max-width: 34em;
  margin: 0;
  color: rgba(235, 231, 223, 0.78);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.8;
}

.card-detail-body {
  display: grid;
  gap: 16px;
  padding: 26px 22px calc(44px + var(--safe-bottom));
}

.card-detail-body h2,
.card-detail-body h3,
.card-detail-body h4 {
  margin: 14px 0 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-weight: 900;
  line-height: 1.25;
}

.card-detail-body h2 {
  font-size: 1.42rem;
}

.card-detail-body h3 {
  font-size: 1.08rem;
}

.card-detail-body p,
.card-detail-body li,
.card-detail-body blockquote {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.94rem;
  line-height: 1.92;
}

.card-detail-body p:first-child {
  color: rgba(235, 231, 223, 0.84);
  font-size: 1.02rem;
}

.card-detail-body blockquote {
  padding: 12px 14px;
  border-left: 2px solid var(--topic-accent);
  color: rgba(235, 231, 223, 0.84);
  background: rgba(255, 255, 255, 0.035);
}

.card-detail-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.card-detail-body strong {
  color: var(--bone);
  font-weight: 900;
}

.glossary-link {
  display: inline;
  margin: 0 1px;
  padding: 0 0.16em 0.08em;
  border: 0;
  border-bottom: 1px solid rgba(223, 196, 118, 0.72);
  border-radius: 0;
  color: #f0d487;
  background: linear-gradient(180deg, transparent 52%, rgba(223, 196, 118, 0.14) 52%);
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
}

.glossary-link:active {
  color: var(--bone);
  background: rgba(223, 196, 118, 0.22);
}

.glossary-rail {
  display: grid;
  gap: 10px;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(235, 231, 223, 0.12);
  border-bottom: 1px solid rgba(235, 231, 223, 0.12);
}

.glossary-rail>span {
  color: var(--topic-accent);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.glossary-rail>div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.glossary-rail>div::-webkit-scrollbar {
  display: none;
}

.glossary-chip {
  flex: 0 0 auto;
  max-width: 11em;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(223, 196, 118, 0.35);
  color: rgba(242, 231, 194, 0.9);
  background: rgba(223, 196, 118, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.glossary-chip:active {
  border-color: rgba(223, 196, 118, 0.72);
  color: var(--bone);
  background: rgba(223, 196, 118, 0.16);
}

.card-detail-loading,
.card-detail-empty {
  padding: 20px 0;
  border-top: 1px solid var(--hairline-soft);
}

/* ---- glossary archive --------------------------------------------------- */

.glossary-overlay {
  position: fixed;
  inset: 0;
  z-index: 89;
  display: grid;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
}

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

body.glossary-open {
  overflow: hidden;
}

.glossary-sheet {
  position: relative;
  width: min(100vw, 480px);
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--hairline-soft);
  border-left: 1px solid var(--hairline-soft);
  color: var(--bone);
  background: var(--void);
  scrollbar-width: thin;
}

.glossary-close {
  position: fixed;
  top: calc(14px + var(--safe-top));
  left: max(14px, calc((100vw - 480px) / 2 + 14px));
  z-index: 4;
  min-width: 54px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(235, 231, 223, 0.24);
  color: var(--bone);
  background: rgba(5, 5, 5, 0.58);
  backdrop-filter: blur(14px);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.glossary-hero {
  position: relative;
  min-height: min(66svh, 590px);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--void-2);
}

.glossary-cover {
  position: absolute;
  inset: -3% 0 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.02) contrast(1.04);
  transform: scale(1.035);
}

.glossary-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.08), transparent 40%, rgba(5, 5, 5, 0.96)),
    linear-gradient(90deg, rgba(5, 5, 5, 0.58), transparent 26%, transparent 74%, rgba(5, 5, 5, 0.58));
}

.glossary-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 10px;
  padding: 0 22px 24px;
}

.glossary-title span {
  color: var(--topic-accent);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.glossary-title h2 {
  max-width: 7.5em;
  margin: 0;
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: clamp(2.45rem, 13vw, 5rem);
  font-weight: 900;
  line-height: 0.94;
  text-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.glossary-title p {
  max-width: 35em;
  margin: 0;
  color: rgba(235, 231, 223, 0.78);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.76;
}

.glossary-body {
  padding-bottom: calc(52px + var(--safe-bottom));
}

/* ---- share overlay ------------------------------------------------------ */

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(12px);
}

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

.share-sheet {
  display: grid;
  gap: 12px;
  width: min(86vw, 350px);
}

.share-sheet img {
  display: block;
  width: 100%;
  height: 466px;
  object-fit: cover;
  border: 1px solid var(--hairline);
  background: var(--void-2);
}

@media (max-width: 520px) {
  .share-sheet img {
    height: 400px;
  }
}

@supports (aspect-ratio: 1) {
  .share-sheet img {
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

.share-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--bone-faint);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.share-actions div {
  display: inline-flex;
  gap: 8px;
}

.share-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: background 240ms ease, color 240ms ease;
}

.share-actions button:hover {
  color: var(--void);
  background: var(--bone);
}

/* ---- paywall sheet ------------------------------------------------------ */

.paywall-overlay,
.redraw-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.54) 34%, rgba(0, 0, 0, 0.88) 100%);
  backdrop-filter: blur(10px);
}

.paywall-overlay[hidden],
.redraw-overlay[hidden] {
  display: none;
}

.paywall-sheet,
.redraw-sheet {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  max-height: 64dvh;
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--hairline);
  border-bottom: 0;
  color: var(--bone);
  background:
    radial-gradient(circle at 18% 0%, var(--topic-accent-soft), transparent 34%),
    rgba(5, 5, 5, 0.96);
  box-shadow: 0 -28px 80px rgba(0, 0, 0, 0.72);
  animation: paywallRise 360ms var(--ease-out) both;
}

@keyframes paywallRise {
  from {
    opacity: 0;
    transform: translateY(36px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.paywall-handle {
  justify-self: center;
  width: 46px;
  height: 3px;
  margin: 2px 0 4px;
  background: rgba(235, 231, 223, 0.28);
}

.paywall-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.paywall-head h2 {
  margin: 5px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 7vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

.paywall-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline);
  color: var(--bone);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.paywall-copy {
  margin: 0;
  color: var(--bone-dim);
  font-size: 0.86rem;
  line-height: 1.75;
}

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

.paywall-plan {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 116px;
  padding: 12px 9px;
  border: 1px solid var(--hairline);
  color: var(--bone-dim);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease, color 220ms ease, transform 220ms var(--ease-out);
}

.paywall-plan span {
  color: var(--bone-faint);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.paywall-plan strong {
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 1.34rem;
  font-weight: 900;
  line-height: 1;
}

.paywall-plan small {
  color: var(--bone-faint);
  font-size: 0.58rem;
  line-height: 1.45;
}

.paywall-plan.is-active {
  border-color: var(--topic-accent);
  color: var(--bone);
  background:
    linear-gradient(160deg, var(--topic-accent-soft), transparent 58%),
    rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.paywall-plan.is-active strong,
.paywall-plan.is-active span {
  color: var(--topic-accent);
}

.paywall-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.paywall-actions .draw-button {
  width: 100%;
  min-height: 48px;
}

.paywall-actions .text-button {
  min-height: 48px;
}

.redraw-actions {
  display: grid;
  gap: 10px;
}

.redraw-actions .draw-button,
.redraw-actions .text-button {
  width: 100%;
  min-height: 48px;
}

.paywall-status {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--bone-faint);
  font-size: 0.68rem;
  line-height: 1.6;
}

.paywall-app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--topic-accent);
  border-radius: 0;
  color: var(--void);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--topic-accent);
  cursor: pointer;
  transition: opacity 220ms ease, transform 220ms ease;
  box-shadow: 0 0 12px var(--topic-accent-soft);
  animation: paywallAppBreathe 2s ease-in-out infinite;
}

.paywall-app-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.paywall-app-btn:active {
  opacity: 0.85;
  transform: translateY(0);
}

.paywall-app-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  animation: none;
}

@keyframes paywallAppBreathe {

  0%,
  100% {
    box-shadow: 0 0 8px var(--topic-accent-soft);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 16px var(--topic-accent), 0 0 4px var(--topic-accent-soft);
    transform: scale(1.015);
  }
}

/* ---- reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }
}

/* ============================================================
   READABILITY PASS — 字号与对比度统一上调
   原则：正文内容 ≥ 0.86rem；功能标签 ≥ 0.62rem；
   内容性文字一律用 bone-dim 以上，faint 只留给纯装饰
   ============================================================ */

:root {
  --bone-dim: rgba(235, 231, 223, 0.74);
  --bone-faint: rgba(235, 231, 223, 0.5);
  --hairline: rgba(235, 231, 223, 0.2);
}

/* 顶部与状态 */
.insight-bar span {
  font-size: 0.6rem;
}

.insight-bar strong {
  font-size: 0.94rem;
}

.insight-bar p {
  color: var(--bone-dim);
  font-size: 0.78rem;
}

.session-chip {
  font-size: 0.62rem;
}

.void-clock {
  font-size: 0.62rem;
}

.tab-item {
  font-size: 0.64rem;
  color: rgba(235, 231, 223, 0.55);
}

/* Hero 与幕 */
.eyebrow {
  font-size: 0.6rem;
}

.reader-status {
  color: var(--bone-dim);
  font-size: 0.8rem;
}

.proof-line {
  color: var(--bone-dim);
  font-size: 0.62rem;
}

.act-head span {
  font-size: 0.6rem;
}

.act-head p {
  color: var(--bone-dim);
  font-size: 0.78rem;
}

.act-back {
  font-size: 0.66rem;
}

/* 校准 */
.calibration-head span {
  font-size: 0.6rem;
}

.calibration-head p {
  color: var(--bone-dim);
  font-size: 0.78rem;
}

.control-label {
  font-size: 0.62rem;
}

.context-chip::before {
  font-size: 0.62rem;
}

.chip-en {
  font-size: 0.56rem;
}

.context-chip::after {
  font-size: 0.7rem;
}

.calibration-summary button {
  font-size: 0.7rem;
}

/* 问题与牌阵 */
.question-field label {
  font-size: 0.68rem;
}

.question-mirror {
  color: var(--bone-dim);
  font-size: 0.78rem;
}

.text-button {
  font-size: 0.66rem;
}

.spread-tab span {
  font-size: 0.92rem;
}

.spread-tab small {
  font-size: 0.64rem;
}

.act-spread .spread-tab span {
  font-size: 1.08rem;
}

.act-spread .spread-tab small {
  font-size: 0.72rem;
}

/* 仪式与抽牌 */
.ritual-text {
  font-size: 0.64rem;
}

.quota-line {
  font-size: 0.64rem;
  color: var(--bone-dim);
}

.quota-line.has-pass {
  color: var(--topic-accent);
}

.draw-button {
  font-size: 0.78rem;
}

/* 牌面 */
.card-position {
  font-size: 0.58rem;
}

.card-title strong {
  font-size: 0.96rem;
}

.card-title span {
  font-size: 0.56rem;
}

/* 解读面板 */
.reading-context {
  font-size: 0.64rem;
}

.oracle-mirror {
  font-size: 1.04rem;
}

.summary {
  font-size: 1.05rem;
}

.result-item h3 {
  font-size: 1.12rem;
}

.result-item h3 span {
  font-size: 0.58rem;
}

.result-item p {
  font-size: 0.96rem;
}

.reading-layers strong {
  font-size: 0.6rem;
}

.result-tags span {
  font-size: 0.68rem;
  color: var(--bone-dim);
}

.next-step strong {
  font-size: 0.6rem;
}

.next-step p {
  font-size: 0.92rem;
}

.boundary-note-block strong {
  font-size: 0.6rem;
}

.boundary-note-block p {
  font-size: 0.9rem;
}

.boundary-note-block .boundary-hotline {
  font-size: 0.7rem;
}

/* 对话 */
.chat-head span {
  font-size: 0.58rem;
}

.chat-head strong {
  font-size: 1.18rem;
}

.chat-bubble {
  font-size: 0.94rem;
}

.chat-suggest button {
  font-size: 0.72rem;
  min-height: 36px;
}

.chat-input-row textarea {
  font-size: 0.94rem;
}

/* 今日一牌 */
.daily-date {
  font-size: 0.62rem;
}

.daily-streak {
  font-size: 0.56rem;
}

.daily-copy strong {
  font-size: 0.98rem;
}

.daily-copy p {
  font-size: 0.88rem;
}

/* 记录 */
.records-empty {
  font-size: 0.78rem;
}

.record-item header {
  font-size: 0.6rem;
}

.record-cards {
  font-size: 0.72rem;
}

.record-summary {
  font-size: 0.92rem;
}

.record-detail p {
  font-size: 0.84rem;
}

.revisit-banner strong {
  font-size: 0.98rem;
}

.revisit-banner p {
  font-size: 0.86rem;
}

.revisit-banner span {
  font-size: 0.6rem;
}

.revisit-actions button,
.record-actions button {
  font-size: 0.64rem;
}

/* 我的与月报 */
.pass-card span,
.pass-loading {
  font-size: 0.76rem;
  color: var(--bone-dim);
}

.mine-hint {
  color: var(--bone-dim);
  font-size: 0.74rem;
}

.redeem-msg {
  font-size: 0.72rem;
}

.redeem-row input {
  font-size: 0.8rem;
}

.month-report header {
  font-size: 0.6rem;
}

.month-opening,
.month-echo {
  font-size: 0.9rem;
}

.month-card-copy strong {
  font-size: 0.88rem;
}

.month-card-copy p {
  font-size: 0.84rem;
}

.month-theme {
  font-size: 1.14rem;
}

.month-advice {
  font-size: 0.88rem;
}

.month-advice strong {
  font-size: 0.6rem;
}

/* 页脚 */
.notice {
  color: var(--bone-faint);
  font-size: 0.68rem;
}

.notice-meta {
  color: var(--bone-faint);
  font-size: 0.58rem;
}

/* ============================================================
   FLOW REWORK — 资深用户反馈落地
   1) 取消校准门控，开屏即问题  2) 快捷提问  3) 亲手抽牌
   4) 今日一牌抽取式  5) 解读页降噪（强调色只留结构线）
   ============================================================ */

/* 1) reading-flow 不再被校准门控 */
.reading-flow,
.app.is-calibrated .reading-flow {
  max-height: none;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: none;
}

h1 {
  font-size: clamp(1.7rem, 7vw, 2.1rem);
}

/* ---- 语音输入 ---------------------------------------------------------- */

/* 模式显隐：语音模式藏键盘区，键盘模式藏语音按钮 */
.app[data-inputmode="voice"] .act-question .question-field,
.app[data-inputmode="voice"] .act-question .quick-ask {
  display: none;
}

.app[data-inputmode="keyboard"] .voice-input {
  display: none;
}

/* 输入方式分段切换：语音 | 键盘。放在输入区正上方，选中段亮起 + accent 底栏，一眼可辨。 */
.input-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--hairline);
}

.input-mode-switch[hidden] {
  display: none;
}

.mode-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 0;
  border: 0;
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  background: transparent;
  cursor: pointer;
  transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.mode-seg+.mode-seg {
  border-left: 1px solid var(--hairline);
}

.mode-seg svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}

.mode-seg:hover {
  color: var(--bone-dim);
}

.mode-seg.is-active {
  color: var(--bone);
  background: rgba(235, 231, 223, 0.05);
  box-shadow: inset 0 -2px 0 var(--topic-accent);
}

.mode-seg.is-active:hover {
  color: var(--bone);
}

.mode-seg:disabled {
  cursor: default;
  opacity: 0.45;
}

.mode-seg:disabled:hover {
  color: var(--bone-faint);
}

.voice-input {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 14px 0 6px;
}

.voice-hold {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 116px;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 220ms ease, background 220ms ease;
}

.voice-hold:hover {
  border-color: var(--bone-dim);
}

.voice-mic {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--topic-accent);
  border-radius: 50%;
  color: var(--topic-accent);
  /* 静态时轻轻呼吸，暗示「可以说」 */
  animation: voiceBreathe 3.4s ease-in-out infinite;
}

.voice-mic svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes voiceBreathe {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.voice-label {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.voice-timer {
  margin-top: 4px;
  color: var(--topic-accent);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.voice-hint {
  margin: 0;
  color: var(--bone-faint);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* 录音中：麦克风停止呼吸、波形脉动、边框点亮 */
.voice-input.is-recording .voice-hold {
  border-color: var(--topic-accent);
  background: var(--topic-accent-soft);
}

.voice-input.is-recording .voice-mic {
  animation: none;
  border-color: transparent;
  color: transparent;
}

.voice-wave {
  position: absolute;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 38px;
}

.voice-input.is-recording .voice-wave {
  display: flex;
}

.voice-input.is-recording .voice-mic {
  display: none;
}

.voice-wave i {
  width: 3px;
  height: 8px;
  background: var(--topic-accent);
  animation: voiceWave 0.9s ease-in-out infinite;
}

.voice-wave i:nth-child(2) {
  animation-delay: 0.12s;
}

.voice-wave i:nth-child(3) {
  animation-delay: 0.24s;
}

.voice-wave i:nth-child(4) {
  animation-delay: 0.36s;
}

.voice-wave i:nth-child(5) {
  animation-delay: 0.48s;
}

@keyframes voiceWave {

  0%,
  100% {
    height: 8px;
    opacity: 0.5;
  }

  50% {
    height: 30px;
    opacity: 1;
  }
}

/* 上滑取消：转成警示态 */
.voice-input.is-cancel .voice-hold {
  border-color: var(--bone-dim);
  background: rgba(235, 231, 223, 0.06);
}

.voice-input.is-cancel .voice-wave i {
  background: var(--bone-dim);
}

.voice-input.is-cancel .voice-label {
  color: var(--bone-dim);
}

/* 转写中 */
.voice-input.is-transcribing .voice-hold {
  border-color: var(--hairline);
  cursor: wait;
}

.voice-input.is-transcribing .voice-mic {
  animation: voiceBreathe 1s ease-in-out infinite;
}

/* 2) 快捷提问 */
.quick-ask {
  display: grid;
  gap: 10px;
}

.quick-ask[hidden] {
  display: none;
}

.quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-topics button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--bone-dim);
  font-size: 0.78rem;
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.quick-topics button:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
}

.quick-topics button.is-active {
  border-color: var(--topic-accent);
  color: var(--bone);
}

.quick-questions {
  display: grid;
  gap: 7px;
}

.quick-questions button {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease;
  animation: quickQuestionIn 360ms var(--ease-out) both;
}

.quick-questions button:nth-child(1) {
  animation-delay: 20ms;
}

.quick-questions button:nth-child(2) {
  animation-delay: 55ms;
}

.quick-questions button:nth-child(3) {
  animation-delay: 90ms;
}

.quick-questions button:nth-child(4) {
  animation-delay: 125ms;
}

.quick-questions button:nth-child(5) {
  animation-delay: 160ms;
}

.quick-questions button:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
}

@keyframes quickQuestionIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3) 亲手抽牌：整副 78 张横向摊开、左右滑动挑选 */
.deck-fan button.deck-card {
  padding: 0;
  cursor: pointer;
}

.deck-fan.is-picking {
  display: flex;
  align-items: flex-end;
  width: calc(100% + 28px);
  height: 178px;
  margin: 0 -14px;
  padding: 26px 36px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* 两端淡出，暗示「还能往两边滑」 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.deck-fan.is-picking[data-draw-mode="auto"] {
  padding-left: calc(50% - 30px);
}

.deck-fan.is-picking::-webkit-scrollbar {
  display: none;
}

.deck-fan.is-picking .deck-card {
  position: relative;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: 60px;
  margin-left: -32px;
  /* 重叠，露出 28px 可点条带 */
  scroll-snap-align: center;
  transition: transform 240ms var(--spring-pop, var(--ease-out)), border-color 180ms ease, box-shadow 240ms ease;
}

.deck-fan.is-picking .deck-card:first-child {
  margin-left: 8px;
}

.deck-fan.is-picking .deck-card:last-child {
  margin-right: 8px;
}

.deck-fan.is-picking .deck-card:hover,
.deck-fan.is-picking .deck-card.is-focused {
  z-index: 5;
  border-color: var(--bone-dim);
  transform: translateY(-14px);
}

.deck-fan.is-picking .deck-card.is-picked {
  z-index: 6;
  border-color: var(--topic-accent);
  box-shadow: 0 0 0 1px var(--topic-accent-soft), 0 22px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-24px);
}

/* 选项卡布局样式 */
.draw-mode-switch {
  width: 220px;
  margin: 0 auto 16px;
}

.draw-mode-switch span::before {
  display: none !important;
  content: none !important;
}

#ritualHint {
  text-align: center;
}


/* 4) 今日一牌：三选一抽取 */
.daily-pick {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  padding-top: 12px;
}

.daily-pick p {
  margin: 0;
  color: var(--bone-dim);
  font-family: var(--font-serif);
  font-size: 0.88rem;
}

.daily-pick-row {
  display: flex;
  gap: 12px;
}

.daily-pick-row button {
  position: relative;
  width: 64px;
  height: 102px;
  border: 1px solid rgba(235, 231, 223, 0.34);
  border-radius: 0;
  background: #0a0a0a;
  cursor: pointer;
  transition: transform 260ms var(--ease-out), border-color 200ms ease;
}

@supports (aspect-ratio: 1) {
  .daily-pick-row button {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.daily-pick-row button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  content: "";
  border: 1px solid rgba(235, 231, 223, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.daily-pick-row button:hover {
  border-color: var(--bone-dim);
  transform: translateY(-6px);
}

.daily-body {
  flex-wrap: wrap;
}

.daily-result {
  display: flex;
  flex: 1 1 auto;
  gap: 14px;
}

.daily-result[hidden],
.daily-pick[hidden] {
  display: none;
}

/* 5) 解读页降噪：强调色只留结构线，文字回归骨白 */
.reading-layers strong {
  color: var(--bone-faint);
}

.reading-layers p {
  border-left-color: var(--hairline);
}

.result-item h3 span {
  border-color: var(--hairline);
  color: var(--bone-dim);
}

.oracle-mirror {
  border-left-color: rgba(235, 231, 223, 0.4);
}

.chat-bubble.is-oracle {
  border-left-color: rgba(235, 231, 223, 0.3);
}

.chat-head span,
.next-step strong,
.month-advice strong {
  color: var(--bone-dim);
}

.question-mirror {
  border-left-color: rgba(235, 231, 223, 0.4);
}

/* 牌阵推荐与真实布阵：覆盖旧版按钮字号/横排规则 */
.act-spread .spread-tab {
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 88px;
  padding: 10px 12px;
}

.act-spread .spread-copy strong {
  color: var(--bone);
  font-size: 1.02rem;
  line-height: 1.15;
}

.act-spread .spread-copy small {
  color: var(--bone-faint);
  font-size: 0.64rem;
  line-height: 1.55;
  white-space: normal;
}

.act-spread .spread-tab.is-active .spread-copy strong {
  color: var(--void);
}

.act-spread .spread-tab.is-active .spread-copy small {
  color: rgba(5, 5, 5, 0.62);
}

@media (max-width: 520px) {
  .spread-recommend-head {
    align-items: flex-start;
    font-size: 0.56rem;
    line-height: 1.5;
  }

  .act-spread .spread-tab {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 82px;
    gap: 10px;
    padding: 9px 10px;
  }

  .spread-thumb {
    width: 68px;
    height: 50.4px;
  }

  @supports (aspect-ratio: 1) {
    .spread-thumb {
      height: auto;
    }
  }

  .act-spread .spread-copy strong {
    font-size: 0.94rem;
  }

  .act-spread .spread-copy small {
    font-size: 0.6rem;
  }

  .tarot-card {
    height: 140px;
  }

  @supports (aspect-ratio: 1) {
    .tarot-card {
      height: auto;
    }
  }

  .spread-board.is-layout {
    width: min(100%, 390px);
    height: 288px;
  }

  @supports (aspect-ratio: 1) {
    .spread-board.is-layout {
      height: auto;
    }
  }

  .spread-board.is-layout .tarot-card {
    height: 110px;
  }

  @supports (aspect-ratio: 1) {
    .spread-board.is-layout .tarot-card {
      height: auto;
    }
  }

  .spread-board.is-layout .card-open-cue {
    display: none;
  }
}

/* ---- spread reveal: full-screen card ceremony ------------------- */

.spread-reveal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 5, 0.96);
  opacity: 0;
  animation: revealOverlayIn 600ms ease forwards;
  overflow: hidden;
}

.spread-reveal-overlay.is-leaving {
  animation: revealOverlayOut 600ms ease forwards;
  pointer-events: none;
}

/* 中央光晕 */
.spread-reveal-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(80vw, 420px);
  height: min(80vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(235, 231, 223, 0.10) 0%,
      rgba(235, 231, 223, 0.04) 40%,
      transparent 70%);
  transform: translate(-50%, -50%) scale(0.6);
  animation: revealGlow 5000ms ease forwards;
  pointer-events: none;
}

@supports (aspect-ratio: 1) {
  .spread-reveal-glow {
    height: auto;
    aspect-ratio: 1;
  }
}

/* 旋转的仪式圆环 */
.spread-reveal-sigil {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(60vw, 320px);
  height: min(60vw, 320px);
  border: 1px solid rgba(235, 231, 223, 0.08);
  border-radius: 50%;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.06) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.06) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  transform: translate(-50%, -50%);
  animation: revealSigil 5000ms linear forwards;
  pointer-events: none;
}

@supports (aspect-ratio: 1) {
  .spread-reveal-sigil {
    height: auto;
    aspect-ratio: 1;
  }
}

/* 全屏模式下的牌阵容器 */
.spread-reveal-board {
  position: relative;
  width: min(88vw, 480px);
  height: 356px;
  z-index: 1;
}

@media (max-width: 520px) {
  .spread-reveal-board {
    height: 252px;
  }
}

@supports (aspect-ratio: 1) {
  .spread-reveal-board {
    height: auto;
    aspect-ratio: var(--reveal-ratio, 1.35);
  }
}

/* 全屏中的单张牌 */
.spread-reveal-card {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: var(--reveal-card-width, 20%);
  height: 153px;
  transform-style: preserve-3d;
  perspective: 800px;
  transform: translate(-50%, -50%);
}

@media (max-width: 520px) {
  .spread-reveal-card {
    height: 108px;
  }
}

@supports (aspect-ratio: 1) {
  .spread-reveal-card {
    height: auto;
    aspect-ratio: 2 / 3.18;
  }
}

.spread-reveal-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  animation: revealCardFlip var(--flip-duration, 600ms) var(--flip-delay, 0ms) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 牌背面 */
.spread-reveal-card-back {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  border: 1px solid rgba(235, 231, 223, 0.34);
  background: #0a0a0a;
  display: grid;
  place-items: center;
}

.spread-reveal-card-back::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  left: 7px;
  border: 1px solid rgba(235, 231, 223, 0.14);
}

.spread-reveal-card-back::after {
  content: "";
  width: 30px;
  height: 30px;
  border: 1px solid rgba(235, 231, 223, 0.4);
  border-radius: 50%;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.22) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(235, 231, 223, 0.22) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

/* 牌正面 */
.spread-reveal-card-front {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  backface-visibility: hidden;
  border: 1px solid rgba(235, 231, 223, 0.55);
  background: var(--bone);
  color: #0c0c0c;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 8px;
  overflow: hidden;
}

.spread-reveal-card-front::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  left: 6px;
  border: 1px solid rgba(5, 5, 5, 0.55);
  pointer-events: none;
  z-index: 1;
}

/* 有牌面画时覆盖前景 */
.spread-reveal-card-front.has-art {
  color: var(--bone);
}

.spread-reveal-card-front.has-art::before {
  border-color: rgba(235, 231, 223, 0.3);
}

.spread-reveal-card-front .reveal-card-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-position: center;
  background-size: cover;
  z-index: 0;
}

.spread-reveal-card-front.is-reversed .reveal-card-art {
  transform: rotate(180deg);
}

.spread-reveal-card-front .reveal-card-art::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.66));
}

.spread-reveal-card-front .reveal-card-position {
  position: relative;
  z-index: 2;
  width: fit-content;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.spread-reveal-card-front .reveal-card-position.on-art {
  padding: 3px 6px;
  color: rgba(235, 231, 223, 0.85);
  background: rgba(5, 5, 5, 0.66);
  border: 0;
}

.spread-reveal-card-front .reveal-card-position:not(.on-art) {
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(5, 5, 5, 0.4);
  color: rgba(12, 12, 12, 0.66);
}

.spread-reveal-card-front .reveal-card-name {
  position: relative;
  z-index: 2;
  align-self: end;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.spread-reveal-card-front.has-art .reveal-card-name {
  display: none;
}

/* 整张牌入场（从中心飞到目标位置） */
.spread-reveal-card {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  animation: revealCardEnter var(--enter-duration, 500ms) var(--enter-delay, 0ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 底部文字 */
.spread-reveal-text {
  position: absolute;
  bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  color: rgba(235, 231, 223, 0.45);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0;
  animation: revealTextIn 800ms 400ms ease forwards;
}

/* ---- reveal keyframes ---- */

@keyframes revealOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes revealOverlayOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes revealGlow {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }

  20% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  60% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

@keyframes revealSigil {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0.6;
  }

  to {
    transform: translate(-50%, -50%) rotate(120deg);
    opacity: 0;
  }
}

@keyframes revealCardEnter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes revealCardFlip {
  from {
    transform: rotateY(180deg);
  }

  to {
    transform: rotateY(0deg);
  }
}

@keyframes revealTextIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 跳过提示 */
.spread-reveal-skip {
  position: absolute;
  bottom: calc(max(env(safe-area-inset-bottom, 0px), 16px) + 28px);
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  color: rgba(235, 231, 223, 0.25);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  opacity: 0;
  animation: revealTextIn 600ms 3500ms ease forwards;
  cursor: pointer;
}

.reading-lock-overlay {
  display: none;
}

.reading-panel.is-locked {
  max-height: none;
  overflow: visible;
}

.reading-panel.is-locked .reading-lock-overlay {
  display: none;
}

.reading-panel.is-locked.show-lock-btn .reading-lock-overlay {
  display: flex;
  position: sticky;
  bottom: -16px;
  height: 120px;
  z-index: 10;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.9) 50%, rgba(5, 5, 5, 0.98) 100%);
  align-items: center;
  justify-content: center;
  padding-bottom: 12px;
  cursor: pointer;
  pointer-events: auto;
  margin-left: -16px;
  margin-right: -16px;
  width: calc(100% + 32px);
}

/* 未解锁状态下关键文字打码模糊效果 */
.reading-panel.is-locked .result-item:not(:first-of-type) .layer-sees .layer-content:not(.is-waiting),
.reading-panel.is-locked .result-item:not(:first-of-type) .layer-connects .layer-content:not(.is-waiting),
.reading-panel.is-locked .result-item:not(:first-of-type) .layer-action .layer-content:not(.is-waiting),
.reading-panel.is-locked .next-step:not(.is-waiting) .step-content {
  filter: blur(6px);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
  display: inline-block;
  width: 100%;
}

.is-lock-block {
  position: relative;
  cursor: pointer;
}

.is-lock-block::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f2eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  pointer-events: none;
  opacity: 0.95;
}

.lock-overlay-text {
  --accent-dark: color-mix(in srgb, var(--btn-accent, var(--topic-accent)) 10%, #020101);
  --accent-mid: color-mix(in srgb, var(--btn-accent, var(--topic-accent)) 35%, #020101);
  --accent-main: var(--btn-accent, var(--topic-accent));
  --accent-light: color-mix(in srgb, var(--btn-accent, var(--topic-accent)) 80%, #ffffff);

  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 42px;
  border: 1px solid var(--accent-main);
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-mid) 35%, var(--accent-light) 50%, var(--accent-mid) 65%, var(--accent-dark) 100%);
  background-size: 400% 100%;
  background-position: 100% 0;
  color: #f5f2eb;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
  margin-top: 0;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent-main) 25%, transparent);
  transition: all 400ms var(--ease-out);
  animation: themeShimmer 4s infinite linear, buttonThemeGlow 2.5s infinite alternate ease-in-out;
}

.lock-overlay-text::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f2eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: filter 300ms var(--ease-out);
}

.lock-overlay-text:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 32px color-mix(in srgb, var(--accent-main) 95%, transparent);
  border-color: var(--accent-light);
}

@keyframes themeShimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -300% 0;
  }
}

@keyframes buttonThemeGlow {
  0% {
    box-shadow: 0 4px 15px color-mix(in srgb, var(--accent-main) 30%, transparent);
    border-color: color-mix(in srgb, var(--accent-main) 60%, transparent);
  }

  100% {
    box-shadow: 0 4px 32px color-mix(in srgb, var(--accent-main) 85%, transparent);
    border-color: var(--accent-light);
  }
}

/* ---------------- 引导式追问浮层样式 ---------------- */
.followup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.followup-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.followup-sheet {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 36px 28px;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.followup-scroll-area {
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: none;
  min-height: 0;
  margin: 0 -12px;
  padding: 0 12px 10px 12px;
}
.followup-scroll-area::-webkit-scrollbar {
  display: none;
}

.followup-overlay.is-active .followup-sheet {
  transform: translateY(0);
}

.followup-head,
.followup-q-text,
.followup-actions {
  flex-shrink: 0;
}

.followup-head h2 {
  font-size: 13px;
  font-weight: 400;
  color: var(--dim, #888);
  margin: 10px 0 28px 0;
  line-height: 1.6;
}

.followup-q-text {
  font-family: var(--font-serif, "Noto Serif SC", serif);
  font-size: 18px;
  color: var(--fg, #e0e0e0);
  line-height: 1.5;
  margin-bottom: 28px;
  min-height: 54px;
  animation: followupFadeIn 0.4s ease;
}

@keyframes followupFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.followup-input-container textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
  margin-bottom: 28px;
}

.followup-input-container textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.followup-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.followup-actions .draw-button {
  width: 100%;
}

.followup-actions .text-button {
  background: none;
  border: none;
  color: var(--dim, #888);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s;
}

.followup-actions .text-button:hover {
  color: #fff;
}

/* 选项按钮列表 */
.followup-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.followup-option-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ebe7df;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}

.followup-option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.followup-option-btn:active {
  transform: translateY(0);
}

@media (max-height: 700px), (max-width: 400px) {
  .followup-sheet {
    padding: 24px 20px;
    max-height: 92vh;
  }
  .followup-head h2 {
    margin: 8px 0 20px 0;
  }
  .followup-q-text {
    margin-bottom: 20px;
    font-size: 16px;
  }
  .followup-input-container textarea {
    margin-bottom: 20px;
  }
  .followup-options-list {
    margin-bottom: 16px;
  }
}

/* Loading 弹窗样式 */
.followup-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.followup-loading-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.followup-loading-box {
  text-align: center;
}

.followup-loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(235, 231, 223, 0.85);
  border-radius: 50%;
  margin: 0 auto 16px auto;
  animation: followupSpin 1s linear infinite;
}

.followup-loading-text {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(235, 231, 223, 0.6);
  animation: followupPulse 1.8s ease-in-out infinite;
}

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

@keyframes followupPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.95;
  }
}

.followup-option-btn.is-loading-sweep,
.followup-next-btn.is-loading-sweep {
  pointer-events: none;
  background: rgba(10, 10, 10, 0.6) !important;
  color: var(--bone-dim) !important;
  border: 1px dashed var(--bone-dim) !important;
  animation: followupPulse 1.5s infinite ease-in-out !important;
}

/* 抽牌上方牌阵与换牌阵按钮布局 */
.ritual-spread-wrapper {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 8px;
}

.app[data-stage="ritual"] .act-ritual .ritual-spread-wrapper,
.app[data-stage="reading"] .act-ritual .ritual-spread-wrapper {
  display: flex;
  animation: actIn 720ms var(--ease-out) both;
}

.btn-change-spread {
  margin: 0;
  padding: 6px 0;
}

.app[data-stage="reading"] .btn-change-spread {
  display: none !important;
}

.app[data-stage="reading"] .act-ritual {
  display: grid !important;
}

.app[data-stage="reading"] .act-ritual .act-head> :not(.ritual-spread-wrapper) {
  display: none !important;
}

.app[data-stage="reading"] .act-ritual .deck-stage {
  display: none !important;
}

/* 牌阵占位卡牌暗色夜空主题风格 */
.tarot-card.is-placeholder {
  background: #0d0d0d;
  border-color: rgba(235, 231, 223, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.tarot-card.is-placeholder::before {
  border-color: rgba(235, 231, 223, 0.06);
}

.tarot-card.is-placeholder .card-position {
  border-bottom-color: rgba(235, 231, 223, 0.18);
  color: var(--bone-dim);
}

.tarot-card.is-placeholder .card-orb {
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(235, 231, 223, 0.4);
}

.tarot-card.is-placeholder .card-title strong {
  color: var(--bone);
}

.tarot-card.is-placeholder .card-title span {
  color: var(--bone-faint);
}

/* 牌阵当前抽牌槽位高亮动画 */
.tarot-card.is-placeholder.is-current {
  border-color: var(--topic-accent);
  animation: currentPulse 2s infinite ease-in-out;
}

@keyframes currentPulse {

  0%,
  100% {
    border-color: rgba(235, 231, 223, 0.25);
    box-shadow: 0 0 8px rgba(235, 231, 223, 0.15), 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  50% {
    border-color: var(--topic-accent);
    box-shadow: 0 0 18px rgba(235, 231, 223, 0.45), 0 10px 30px rgba(0, 0, 0, 0.6);
  }
}

/* 全屏卡牌抽取弹出层 */
.single-reveal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #000;
  animation: actIn 400ms var(--ease-out) both;
}

.single-reveal-overlay[hidden] {
  display: none !important;
}

.single-reveal-content {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: padding 0.6s ease;
}

.single-reveal-overlay.is-flash-sparking .single-reveal-content {
  justify-content: flex-start;
  padding-top: max(5vh, 20px);
  padding-bottom: 40px;
  overflow-y: auto;
  scrollbar-width: none;
}
.single-reveal-overlay.is-flash-sparking .single-reveal-content::-webkit-scrollbar {
  display: none;
}

.single-reveal-card {
  opacity: 1 !important;
  transform: none !important;
}

.single-reveal-card:not(.shrinking-card-anim) {
  width: calc(100vw - 48px) !important;
  height: calc((100vw - 48px) * 1.59) !important;
  margin: 0 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
  border-radius: 6px !important;
  border: 1px solid rgba(235, 231, 223, 0.3) !important;
  background: var(--bone);
  color: #0c0c0c;
  padding: 14px !important;
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  flex-shrink: 0;
}

.single-reveal-overlay.is-flash-sparking .single-reveal-card:not(.shrinking-card-anim) {
  width: calc(55vw - 48px) !important;
  height: calc((55vw - 48px) * 1.59) !important;
}

@media (min-aspect-ratio: 1/1.59) {
  .single-reveal-card:not(.shrinking-card-anim) {
    height: calc(100vh - 48px) !important;
    width: calc((100vh - 48px) / 1.59) !important;
  }
  .single-reveal-overlay.is-flash-sparking .single-reveal-card:not(.shrinking-card-anim) {
    height: calc(45vh) !important;
    width: calc(45vh / 1.59) !important;
  }
}

.single-reveal-card:not(.shrinking-card-anim)::before {
  inset: 6px !important;
}

.single-reveal-card .card-position {
  display: block !important;
  border-bottom-color: rgba(5, 5, 5, 0.2);
  color: rgba(12, 12, 12, 0.6);
}

.single-reveal-card:not(.shrinking-card-anim) .card-position {
  font-size: 0.75rem !important;
  padding-bottom: 4px !important;
}

.single-reveal-card .card-orb {
  display: grid !important;
  -webkit-text-stroke: 1.4px rgba(12, 12, 12, 0.78);
}

.single-reveal-card:not(.shrinking-card-anim) .card-orb {
  font-size: 3.5rem !important;
}

.single-reveal-card .card-title {
  display: grid !important;
}

.single-reveal-card:not(.shrinking-card-anim) .card-title strong {
  font-size: 1.25rem !important;
}

.single-reveal-card:not(.shrinking-card-anim) .card-title span {
  font-size: 0.7rem !important;
}

.single-reveal-card.has-art .card-orb,
.single-reveal-card.has-art .card-position,
.single-reveal-card.has-art .card-title {
  z-index: 3;
  color: var(--bone);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.single-reveal-card.has-art .card-position {
  border-bottom-color: rgba(235, 231, 223, 0.35) !important;
}

.single-reveal-card.has-art .card-orb {
  -webkit-text-stroke: 1.4px var(--bone) !important;
}

.single-reveal-card .card-title strong {
  color: #0c0c0c;
}

.single-reveal-card .card-title span {
  color: rgba(12, 12, 12, 0.55);
}

.single-reveal-card.has-art .card-title strong {
  color: var(--bone);
}

.single-reveal-card.has-art .card-title span {
  color: var(--bone-dim);
}

.single-reveal-btn {
  margin-top: 32px;
  flex-shrink: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 44px;
  padding: 0 24px;
  border: 1px solid rgba(235, 231, 223, 0.25);
  border-radius: 0;
  background: rgba(10, 10, 10, 0.8);
  color: var(--bone);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 200ms ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.single-reveal-btn[hidden] {
  display: none !important;
}

.single-reveal-btn:hover {
  background: var(--bone);
  color: #0a0a0a;
  border-color: var(--bone);
}

/* 飞回收缩动画过渡类 */
.shrinking-card-anim {
  position: fixed !important;
  z-index: 10000 !important;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
  transform-origin: top left !important;
  pointer-events: none !important;
  margin: 0 !important;
  background: var(--bone) !important;
  color: #0c0c0c !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.shrinking-card-anim.has-art .card-art {
  display: block;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: var(--card-art);
}

/* ---- Sticky Spread Nav --------------------------------------- */

/* ---------------- 单牌展示界面的 Flash Spark 交互 ---------------- */
.flash-spark-container {
  width: 90%;
  max-width: 360px;
  margin: 20px auto 0;
  text-align: center;
  color: var(--fg, #e0e0e0);
  font-size: 15px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  animation: flashSparkFadeIn 0.4s ease forwards;
}
@keyframes flashSparkFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.flash-spark-title {
  font-size: 0.85rem;
  color: #c5a880;
  margin-bottom: 12px;
  letter-spacing: 0.15em;
  font-weight: 600;
  opacity: 0.85;
  text-align: center;
}
.flash-spark-text {
  min-height: 48px;
  margin-bottom: 16px;
  font-family: var(--font-serif, "Noto Serif SC", serif);
}
.flash-spark-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  animation: flashSparkFadeIn 0.4s ease forwards;
}
.flash-spark-option-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(235, 231, 223, 0.15);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--fg, #e0e0e0);
  font-size: 14px;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.flash-spark-option-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(235, 231, 223, 0.3);
  transform: translateY(-1px);
}

.flash-spark-input-row {
  display: flex;
  gap: 8px;
  animation: flashSparkFadeIn 0.4s ease forwards;
}
.flash-spark-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.flash-spark-input-row input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
}
.flash-spark-input-row .text-button {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--fg, #e0e0e0);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
.flash-spark-input-row .text-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sticky-spread-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  scrollbar-width: none; /* Firefox */
}
.sticky-spread-nav::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.sticky-spread-nav.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-mini-card {
  flex: 0 0 auto;
  width: 40px;
  height: 60px;
  background-color: var(--bone);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.sticky-mini-card.has-art .mini-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: var(--card-art);
}

.sticky-mini-card.is-reversed .mini-art {
  transform: rotate(180deg);
}

.sticky-mini-card.is-active {
  opacity: 1;
  transform: scale(1.1) translateY(2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 0 1.5px var(--btn-accent, #fff);
  z-index: 2;
}

/* 神秘牌 ? 样式 */
.sticky-mini-card.is-mystery {
  background: #222;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  font-weight: 300;
  font-family: var(--font-en);
}
.sticky-mini-card.is-mystery.is-active {
  border: 1px solid var(--btn-accent, #fff);
  color: var(--bone);
}

/* 正在输出的呼吸效果 */
@keyframes breathing-glow {
  0% { background-color: rgba(255, 255, 255, 0.0); border-color: rgba(255, 255, 255, 0.1); }
  50% { background-color: rgba(255, 255, 255, 0.35); border-color: rgba(255, 255, 255, 1); }
  100% { background-color: rgba(255, 255, 255, 0.0); border-color: rgba(255, 255, 255, 0.1); }
}
.sticky-mini-card.is-generating::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid transparent;
  animation: breathing-glow 1.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 10;
}