:root {
  --bg: #0a0a0a;
  --fg: #faf4e6;
  --accent: #c9a96e;
  --transition-page: 450ms;
  --fg-soft: #e2d4bc;
  --fg-dim: #a49784;
  --line: rgba(244, 235, 219, 0.22);
  --line-soft: rgba(244, 235, 219, 0.09);
}

* { box-sizing: border-box; }
[hidden] {
  display: none !important;
}
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
}

.app, .hero { width: 100%; height: 100%; }
.hero { position: relative; }

#ripple-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("./assets/rill-water-bg.png") center top / cover no-repeat;
  z-index: 1;
}

.hero-content {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1440px;
  height: 1024px;
  transform-origin: top center;
  z-index: 4;
}

.hero-logo-ribbon {
  position: absolute;
  width: 246.5px;
  height: 984px;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* "此镜" — Chinese signature below the RiLL logo. CN-only.
   Hidden via [hidden] attr when not on home default; further hidden via
   CSS when UI lang isn't Chinese. */
.hero-logo-subtitle {
  display: none;
}
:lang(zh) .hero-logo-subtitle:not([hidden]) {
  display: block;
  position: absolute;
  top: 143px;
  left: 50%;
  transform: translateX(calc(-50% - 28px));
  margin: 0;
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 25px;
  font-weight: 400;
  color: #faf4e6;
  letter-spacing: 0.17em;
  opacity: 0.3;
  text-align: center;
  pointer-events: none;
}

.home-hit {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 120px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 50;
}

.top-link {
  position: absolute;
  top: 40px;
  background: transparent;
  border: 0;
  padding: 0;
  color: #faf4e6;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0.2px;
}
.top-link-left { left: 60px; }
.top-link-right { right: 60px; }

/* Menu toggle picks up the same hover/transition treatment as the lang opts. */
#menu-toggle {
  cursor: pointer;
  transition: color 0.3s ease;
}
#menu-toggle:hover { color: var(--accent); }

.lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0;
}

.lang-opt {
  background: transparent;
  border: 0;
  padding: 0;
  color: #faf4e6;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: color 0.3s ease;
}

#lang-zh {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "Cormorant Garamond", serif;
  font-size: 20px;
}

.lang-opt:hover { color: var(--accent); }

.lang-opt.is-active {
  color: var(--accent);
}

.lang-sep {
  color: #faf4e6;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  line-height: 30px;
}

.back-arrow {
  position: absolute;
  top: 228px;
  left: 60px;
  z-index: 120;
  pointer-events: auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: #faf4e6;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: opacity var(--transition-page) ease, transform var(--transition-page) ease;
}

.back-arrow:hover {
  opacity: 0.82;
  transform: translateX(-3px);
}

.hero-quote,
.hero-philosophy,
.reflection-kicker,
.reflection-title {
  margin: 0;
  text-align: center;
  transition: opacity var(--transition-page) ease, transform var(--transition-page) ease;
}

.hero-quote {
  position: absolute;
  top: 400px;
  left: 50%;
  transform: translateX(-50%);
  width: 903px;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 56px;
  font-style: normal;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.128px;
  color: #faf4e6;
}

.hero-philosophy {
  position: absolute;
  top: 300px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 288px;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 24px;
  line-height: 36px;
  letter-spacing: 0.07px;
  text-align: left;
}

.hero-philosophy-more {
  position: absolute;
  top: 610px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  background: none;
  border: 0;
  padding: 6px 10px;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #c9a96e;
  cursor: pointer;
  transition: opacity 250ms ease;
}
.hero-philosophy-more:hover { opacity: 0.7; }
body.is-philosophy .hero-philosophy-more { display: inline-block; }
:lang(zh) .hero-philosophy-more {
  top: 580px;
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: none;
}

.reflection-kicker {
  position: absolute;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-style: normal;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #faf4e6;
  white-space: nowrap;
  text-align: center;
}

.reflection-title {
  position: absolute;
  top: 400px;
  left: 50%;
  transform: translateX(-50%);
  width: 734px;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 34px;
  font-style: normal;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.128px;
  color: #faf4e6;
}

.enter-btn {
  position: absolute;
  top: 588px;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: 120px;
  height: 44px;
  border-radius: 50px;
  border: 1px solid #faf4e6;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #faf4e6;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 500;
  line-height: 15px;
  letter-spacing: 0.8px;
  text-align: center;
  cursor: pointer;
  transition: opacity var(--transition-page) ease, transform var(--transition-page) ease, border-color var(--transition-page) ease, box-shadow var(--transition-page) ease;
}

.enter-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.35);
  opacity: 0.96;
  transform: translateX(-50%) translateY(-1px);
}

.mode-select {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% - 10px), -50%);
  width: auto;
  display: flex;
  justify-content: center;
  gap: 190px;
  align-items: center;
}

.mode-card {
  width: 199px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.mode-card-left {
  width: 196px;
}

.mode-icon {
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.mode-icon-tarot {
  width: 208px;
  height: 212px;
  aspect-ratio: 49 / 50;
}

.mode-icon-meihua {
  width: 211px;
  height: 212px;
  aspect-ratio: 199 / 200;
}

.mode-title {
  margin: 10px 0 0;
  color: #fff;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.249px;
}

.mode-title-cn {
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.mode-subtext {
  margin: 10px 0 0;
  color: #8a8a8a;
  text-align: center;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.314px;
}

.mode-enter-btn {
  position: static;
  transform: none;
  margin-top: 32px;
}

.mode-enter-btn:hover {
  transform: translateY(-1px);
}

.mode-soon {
  margin: 32px 0 0;
  color: #8a8a8a;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 25.6px;
  letter-spacing: -0.312px;
}

.intent-select {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 980px;
  display: flex;
  justify-content: center;
  gap: 130px;
  align-items: center;
}

.intent-card {
  position: relative;
  width: 240px;
  border: 0;
  background: transparent;
  color: #faf4e6;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.intent-card::before {
  content: "";
  position: absolute;
  top: 180px;
  left: 50%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(201, 169, 110, 0.42) 0%,
    rgba(201, 169, 110, 0.22) 32%,
    rgba(201, 169, 110, 0.08) 58%,
    transparent 78%);
  filter: blur(18px);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.5s ease;
  animation: intent-spotlight 4.2s ease-in-out infinite;
}

.intent-card:nth-child(1)::before { animation-delay: 0s; }
.intent-card:nth-child(2)::before { animation-delay: 0.7s; }
.intent-card:nth-child(3)::before { animation-delay: 1.4s; }

@keyframes intent-spotlight {
  0%, 100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.95);
  }
  50% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

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

.intent-card:hover {
  transform: translateY(-10px);
  opacity: 1;
}

.intent-card:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.18);
  background: radial-gradient(closest-side,
    rgba(255, 225, 170, 0.6) 0%,
    rgba(201, 169, 110, 0.32) 32%,
    rgba(201, 169, 110, 0.12) 58%,
    transparent 78%);
  animation: none;
}

.intent-card:active {
  transform: translateY(-4px);
}

.intent-image {
  display: block;
  width: 240px;
  height: 384px;
  object-fit: contain;
  margin: 0 auto;
  animation: intent-float 4.2s ease-in-out infinite;
  transition: filter 0.45s ease;
  will-change: transform;
}

.intent-card:nth-child(1) .intent-image { animation-delay: 0s; }
.intent-card:nth-child(2) .intent-image { animation-delay: 0.7s; }
.intent-card:nth-child(3) .intent-image { animation-delay: 1.4s; }

@keyframes intent-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.intent-card:hover .intent-image {
  filter: drop-shadow(0 10px 28px rgba(255, 220, 180, 0.28));
}

.intent-caption {
  position: relative;
  display: inline-block;
  margin-top: 20px;
  padding-bottom: 6px;
  color: #faf4e6;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 20px;
  line-height: 33px;
  letter-spacing: 1.089px;
  font-weight: 400;
  white-space: nowrap;
  transition: opacity var(--transition-page) ease, transform var(--transition-page) ease, font-weight var(--transition-page) ease;
}

.intent-caption::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 1px;
  background: rgba(250, 244, 230, 0.35);
  transform: translateX(-50%);
  transition: width 0.45s ease, background 0.45s ease, opacity 0.45s ease;
  animation: intent-underline-pulse 2.6s ease-in-out infinite;
}

@keyframes intent-underline-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.intent-card:hover .intent-caption::after {
  width: 88%;
  background: var(--accent);
  opacity: 1;
  animation: none;
}

.intent-num {
  color: #faf4e6;
  transition: color var(--transition-page) ease;
}

.intent-card:hover .intent-num {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .intent-image,
  .intent-caption::after,
  .intent-card::before {
    animation: none;
  }
}

.intent-entry {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1440px;
  height: 1024px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intent-entry-title {
  margin: 170px 0 0;
  width: 641px;
  color: #faf4e6;
  text-align: center;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 36px;
  font-style: normal;
  font-weight: 400;
  line-height: 46.8px;
  letter-spacing: 1.089px;
}

.intent-entry-copy {
  margin: 81px 0 0;
  width: 641px;
  color: #faf4e6;
  text-align: center;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 36px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.128px;
}

.intent-entry-hints {
  margin: 39px 0 0;
  color: #8a8a8a;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 25.6px;
  letter-spacing: -0.312px;
}

.intent-entry-input {
  margin-top: 47px;
  width: 560px;
  height: auto;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.2px;
  padding: 10px 4px;
  outline: none;
  text-align: center;
  transition: border-color var(--transition-page) ease;
}

.intent-entry-input::placeholder {
  color: var(--fg-dim);
  opacity: 0.7;
}

.intent-entry-input:focus {
  border-bottom-color: var(--accent);
}

.intent-entry-begin {
  position: static;
  transform: none;
  margin-top: 59px;
}

.intent-entry-begin:hover {
  transform: translateY(-1px);
}

.intent-animation-stage {
  margin-top: 20px;
  width: 560px;
  height: 120px;
  border-radius: 12px;
  border: 1px dashed rgba(250, 244, 230, 0.2);
}

.pre-stage {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1440px;
  height: 1024px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.pre-stage-title {
  margin: 170px 0 0;
  width: 641px;
  color: #faf4e6;
  text-align: center;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 28px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 1.089px;
}

.pre-stage-copy {
  position: absolute;
  top: 426px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: 800px;
  color: #faf4e6;
  text-align: center;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 48px;
  font-style: normal;
  font-weight: 400;
  line-height: 57.6px;
  letter-spacing: -0.128px;
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: 2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.pre-stage.show-guide .pre-stage-copy {
  opacity: 1;
}

.pre-stage-pick-hint {
  position: absolute;
  top: 300px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(250, 244, 230, 0.85);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.249px;
  opacity: 0;
  transition: opacity 280ms ease;
  z-index: 2;
}

.pre-stage.show-deck .pre-stage-pick-hint {
  opacity: 1;
}

.pre-deck {
  position: absolute;
  top: 57%;
  left: 50%;
  width: calc(100% - 180px);
  max-width: 1220px;
  height: 620px;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
  z-index: 2;
}

.pre-stage.show-deck .pre-deck {
  opacity: 1;
  pointer-events: auto;
}

.pre-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 158px;
  height: 258px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform: translate(-50%, -50%) scale(0.9);
  transform-origin: center 148%;
  transition: transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 420ms ease;
  will-change: transform, opacity;
  opacity: 0;
}

.pre-stage.show-deck .pre-card {
  transform: translate(calc(-50% + (var(--i) - 10.5) * 39px), calc(-50% + var(--y, 0px))) rotate(calc((var(--i) - 10.5) * 3.6deg));
  opacity: 1;
}

.pre-stage.show-deck .pre-card:hover {
  transform: translate(calc(-50% + (var(--i) - 10.5) * 39px), calc(-50% + var(--y, 0px) - 11px)) rotate(calc((var(--i) - 10.5) * 3.6deg)) scale(1.03);
}

.pre-card:nth-child(1), .pre-card:nth-child(22) { --y: -86px; }
.pre-card:nth-child(2), .pre-card:nth-child(21) { --y: -72px; }
.pre-card:nth-child(3), .pre-card:nth-child(20) { --y: -60px; }
.pre-card:nth-child(4), .pre-card:nth-child(19) { --y: -49px; }
.pre-card:nth-child(5), .pre-card:nth-child(18) { --y: -39px; }
.pre-card:nth-child(6), .pre-card:nth-child(17) { --y: -30px; }
.pre-card:nth-child(7), .pre-card:nth-child(16) { --y: -22px; }
.pre-card:nth-child(8), .pre-card:nth-child(15) { --y: -16px; }
.pre-card:nth-child(9), .pre-card:nth-child(14) { --y: -10px; }
.pre-card:nth-child(10), .pre-card:nth-child(13) { --y: -5px; }
.pre-card:nth-child(11), .pre-card:nth-child(12) { --y: 0px; }

.pre-card.is-faded {
  opacity: 0;
}

.pre-card.is-selected {
  z-index: 6;
  transform: translate(-50%, -50%) rotate(0deg) scale(1.08) !important;
}

.pre-card-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pre-card.is-revealed .pre-card-inner {
  transform: rotateY(180deg);
}

.pre-card-face {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
}

.pre-card-back {
  border: 1.6px solid rgba(250, 244, 230, 0.52);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, rgba(255, 255, 255, 0) 1px 7px),
    radial-gradient(circle at 26% 18%, rgba(250, 244, 230, 0.2), transparent 44%),
    radial-gradient(circle at 72% 78%, rgba(201, 169, 110, 0.18), transparent 52%),
    linear-gradient(145deg, rgba(16, 17, 22, 0.97), rgba(6, 7, 10, 0.98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.pre-card-front {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: rgba(12, 12, 16, 0.92);
  transform: rotateY(180deg);
  border: 1.4px solid rgba(250, 244, 230, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.pre-card-front.is-reversed {
  transform: rotateY(180deg) rotate(180deg);
}

.reading-result,
.guidance-result {
  --rill-reading-primary: #f5ecd8;
  --rill-reading-secondary: #e2d8c4;
  --rill-reading-soft: rgba(226, 216, 196, 0.92);
}

.guidance-result,
.guidance-result * {
  font-family: "Satoshi Variable", sans-serif;
}

.reading-result {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: 1160px;
}

.guidance-result {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: 1160px;
}

.reading-title {
  margin: 0;
  color: var(--rill-reading-primary);
  text-align: center;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 26px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.07px;
}

.reading-layout {
  margin-top: 44px;
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

.reading-left {
  width: 320px;
  margin-top: -32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reading-card-image {
  display: block;
  flex-shrink: 0;
  width: min(210px, 100%);
  max-width: 100%;
  height: auto;
  max-height: min(420px, 70vh);
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(250, 244, 230, 0.35);
  background: rgba(12, 12, 16, 0.5);
}

.reading-card-image.is-reversed {
  transform: rotate(180deg);
}

.reading-card-name {
  margin: 24px 0 0;
  color: var(--rill-reading-primary);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.249px;
  text-align: center;
}

.reading-card-keywords {
  margin: 20px 0 0;
  color: var(--fg-dim);
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  text-align: center;
}

.reading-card-summary {
  margin: 24px 0 0;
  color: #faf4e6;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0.2px;
  text-align: center;
}

.reading-right {
  width: 776px;
}

.reading-main-flow {
  position: relative;
}

.reading-core {
  margin: 0 0 32px;
  color: var(--fg-soft);
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: 30px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
  max-width: 640px;
  transition: opacity 0.35s ease;
}

.reading-result.is-reading-loading .reading-core.is-reading-loading,
.reading-scroll.is-reading-loading .reading-core.is-reading-loading {
  animation: reading-pulse 2.4s ease-in-out infinite;
}

@keyframes reading-pulse {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

.reading-body {
  margin-top: 8px;
}

.reading-error-wrap {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px;
  text-align: center;
}

.reading-error-msg {
  margin: 0;
  color: var(--rill-reading-secondary);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 18px;
  line-height: 1.5;
}

.advice-loading.is-reading-loading {
  animation: reading-pulse 2.4s ease-in-out infinite;
  margin: 0;
  color: var(--rill-reading-secondary);
  font-size: 18px;
  text-align: center;
}

/* Advice Card — Layer 2 opening (italic serif, matches .reading-core so the
 * first sentence of every reading is visually unified) */
.advice-closing {
  margin: 0 0 32px 0;
  color: var(--fg-soft);
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: 30px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
  max-width: 640px;
}
.advice-closing:empty {
  display: none;
}

/* Advice Card — Layer 3 body paragraphs */
.advice-body {
  margin: 0 0 30px 0;
  max-width: 640px;
}

.advice-body .advice-block p {
  margin: 0 0 10px;
  color: var(--fg-soft);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
}

.advice-body .advice-block p:last-child {
  margin-bottom: 0;
}

/* Advice Card — Layer 4 takeaway (action) with gold left bar */
.advice-action {
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--accent);
  color: var(--fg);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.1px;
  max-width: 640px;
}
.advice-action:empty {
  display: none;
}

.guidance-inline-action {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

#session-end-quote:empty::before {
  content: "";
  display: block;
  min-height: 2.8em;
}

.reading-scroll.is-scroll-locked,
.reading-scroll.is-reading-loading,
.reading-scroll.is-advice-loading {
  scroll-snap-type: none;
  scroll-behavior: auto;
  overflow: hidden;
}

.reading-scroll {
  position: relative;
  height: 620px;
  overflow-y: auto;
  padding-right: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 110, 0) rgba(255, 255, 255, 0);
  transition: scrollbar-color 220ms ease;
}

.reading-result .reading-scroll::after {
  content: "";
  position: sticky;
  display: block;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  margin-top: -72px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 3;
}

.guidance-result .reading-scroll {
  scroll-snap-type: none;
}

.guidance-result .reading-main-flow {
  min-height: 620px;
}

.guidance-result .reading-screen {
  min-height: 620px;
}

.guidance-result .reading-screen-main {
  display: flex;
  flex-direction: column;
}

.guidance-result .guidance-inline-action {
  width: 100%;
  max-width: 640px;
  justify-content: center;
}

.reading-screen {
  min-height: 0;
}

.reading-point + .reading-point {
  margin-top: 32px;
}

.reading-point::before {
  content: "◇";
  display: block;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: 0;
}

.reading-point h4 {
  margin: 0;
  color: var(--rill-reading-primary);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 19px;
  font-style: normal;
  font-weight: 500;
  line-height: 27px;
  letter-spacing: -0.1px;
}

.reading-point p {
  margin: 10px 0 0;
  color: var(--fg);
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.1px;
}

.reading-hook {
  margin: 28px 0 0;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--accent);
}
.reading-hook:empty {
  display: none;
}

.reading-point strong {
  color: var(--rill-reading-primary);
  font-weight: 600;
}

/* Angle titles arrive wrapped in **bold** markdown — keep the h4's own weight */
.reading-point h4 strong {
  font-weight: inherit;
  color: inherit;
}

.reading-core strong {
  font-weight: 600;
}

.takeaway-title strong {
  font-weight: 600;
}

.reading-next {
  margin-top: 14px;
}

.reading-result .reading-screen-takeaway {
  display: block;
  min-height: 0;
  margin-top: 36px;
  padding-bottom: 90px;
}

.guidance-result .reading-screen-takeaway {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 620px;
  margin-top: 0;
  padding-bottom: 10px;
}

.takeaway-panel {
  width: 100%;
  padding: 0;
}

.takeaway-title {
  margin: 0;
  padding: 6px 0 6px 20px;
  border-left: 2px solid var(--accent);
  color: var(--fg);
  text-align: left;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 28px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2px;
  max-width: 640px;
}

.takeaway-actions {
  margin-top: 68px;
  display: flex;
  justify-content: center;
  gap: 36px;
}

.takeaway-btn {
  width: 210px;
  height: 48px;
  border-radius: 50px;
  border: 1px solid #faf4e6;
  background: rgba(0, 0, 0, 0.25);
  color: #faf4e6;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity var(--transition-page) ease, transform var(--transition-page) ease, border-color var(--transition-page) ease;
}

.takeaway-btn-wide {
  width: 240px;
}

.takeaway-btn:hover {
  border-color: var(--accent);
  opacity: 0.96;
  transform: translateY(-1px);
}

.takeaway-btn.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a120a;
  font-weight: 500;
  letter-spacing: 1.2px;
}

.takeaway-btn.is-primary:hover {
  filter: brightness(1.08);
  opacity: 1;
  border-color: var(--accent);
}

.takeaway-btn.is-ghost {
  opacity: 0.5;
  border-color: rgba(250, 244, 230, 0.2);
}

.takeaway-btn.is-ghost:hover {
  opacity: 0.78;
  border-color: rgba(250, 244, 230, 0.45);
}

.round-dots {
  margin: 0 0 26px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.round-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(250, 244, 230, 0.22);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.round-dots .dot.done {
  background: rgba(250, 244, 230, 0.45);
}

.round-dots .dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.ending-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
}

.ending-title {
  margin: 0;
  color: #faf4e6;
  text-align: center;
  font-family: "Satoshi Variable", "Noto Sans SC", system-ui, sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.guidance-farewell-screen .guidance-farewell-text {
  margin: 0;
  max-width: 960px;
  padding: 0 28px;
  color: #f5ecd8;
  text-align: center;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ending-return-btn {
  position: static;
  transform: none;
  width: 100px;
  border: 1px solid #faf4e6;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ending-return-btn:hover {
  transform: translateY(-1px);
}

.reading-scroll::-webkit-scrollbar {
  width: 8px;
}

.reading-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0);
  border-radius: 10px;
  transition: background 220ms ease;
}

.reading-scroll::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0);
  border-radius: 10px;
  transition: background 220ms ease;
}

.reading-scroll:hover {
  scrollbar-color: rgba(201, 169, 110, 0.65) rgba(255, 255, 255, 0.08);
}

.reading-scroll:hover::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.reading-scroll:hover::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.65);
}

.reading-scroll:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 110, 0.9);
}


.chapter-row {
  position: absolute;
  top: 680px;
  left: 50%;
  transform: translateX(-50%);
  width: 628px;
  display: flex;
  justify-content: space-between;
}

.chapter-index {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 0 8px;
  color: #faf4e6;
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 20px;
  line-height: 46.8px;
  letter-spacing: 1.089px;
  font-weight: 400;
  cursor: pointer;
  transition: transform 0.45s ease, opacity 0.45s ease, font-weight var(--transition-page) ease;
}

.chapter-index::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 1px;
  background: rgba(250, 244, 230, 0.35);
  transform: translateX(-50%);
  transition: width 0.45s ease, background 0.45s ease, opacity 0.45s ease;
  animation: chapter-underline-pulse 2.6s ease-in-out infinite;
}

.chapter-row .chapter-index:nth-child(1)::after { animation-delay: 0s; }
.chapter-row .chapter-index:nth-child(2)::after { animation-delay: 0.7s; }
.chapter-row .chapter-index:nth-child(3)::after { animation-delay: 1.4s; }

@keyframes chapter-underline-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.chapter-index:hover {
  transform: translateY(-6px);
  opacity: 1;
}

.chapter-index:active {
  transform: translateY(-2px);
}

.chapter-index:hover::after {
  width: 92%;
  background: var(--accent);
  opacity: 1;
  animation: none;
}

.chapter-index:hover .chapter-num {
  color: var(--accent);
}

.chapter-num { color: #faf4e6; transition: color var(--transition-page) ease; }
.chapter-label { color: #faf4e6; }

.chapter-index.is-active .chapter-num { color: var(--accent); }
.chapter-index.is-active::after {
  width: 100%;
  background: var(--accent);
  opacity: 1;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .chapter-index::after { animation: none; }
}

.hero-proverb {
  position: absolute;
  top: 934px;
  left: 50%;
  transform: translateX(-50%);
  width: 334px;
  margin: 0;
  text-align: center;
  color: #faf4e6;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.hero-proverb.is-small-note {
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0.3px;
  color: #a49784;
}

.home-flash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  transition: none;
}
.home-flash.is-on {
  opacity: 0;
  visibility: hidden;
  transition: none;
}

/* ==========================================================================
   Daily Anchor — postcard version (Design Library §8, §9 example B)
   Accessed via homepage chapter-03 click.
   ========================================================================== */

.daily-anchor {
  position: absolute;
  top: 170px;
  left: 50%;
  transform: translateX(-50%);
  width: 980px;
  max-height: 824px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 110, 0) rgba(255, 255, 255, 0);
  transition: scrollbar-color 220ms ease;
}
.daily-anchor::-webkit-scrollbar {
  width: 8px;
}
.daily-anchor::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0);
  border-radius: 10px;
  transition: background 220ms ease;
}
.daily-anchor::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0);
  border-radius: 10px;
  transition: background 220ms ease;
}
.daily-anchor:hover {
  scrollbar-color: rgba(201, 169, 110, 0.65) rgba(255, 255, 255, 0.08);
}
.daily-anchor:hover::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}
.daily-anchor:hover::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.65);
}

.postcard {
  position: relative;
  width: 980px;
  padding: 54px 60px 36px 54px;
  border: 1px solid var(--line-soft);
  background: #17110e;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  box-sizing: border-box;
  z-index: 1;
}

body.is-daily .hero-logo-ribbon {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.postcard::before,
.postcard::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.postcard::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.postcard::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.postcard-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.postcard-card-frame {
  position: relative;
  width: 240px;
  height: 400px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #000;
}
.postcard-card-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  pointer-events: none;
}
.postcard-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.postcard-card-image.is-reversed {
  transform: rotate(180deg);
}

.postcard-date-stamp {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stamp-line-top {
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.stamp-line-bot {
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--fg-dim);
  opacity: 0.85;
}

.postcard-right {
  display: block;
}

/*
 * ═══════════════════════════════════════════════════════════════════
 * DAILY ANCHOR POSTCARD — DESIGN LIBRARY (canonical hierarchy)
 * ═══════════════════════════════════════════════════════════════════
 * Reading order (right column, top → bottom):
 *   ① Card name + orientation  → .postcard-name
 *   ② 3 keywords (UPPERCASE)    → .postcard-keywords
 *   ③ Takeaway / core proverb   → .postcard-core      (italic serif, opens the card)
 *   ④ Color / Object / Moment   → .postcard-anchors   (3-column anchor grid)
 *   ⑤ Final takeaway (gold bar) → .postcard-takeaway  (closing CTA sentence)
 *
 * Also applied to the reading-result page in parallel:
 *   .reading-core        ≈ ③ (Cormorant italic, serves same role)
 *   .takeaway-title      ≈ ⑤ (gold left bar, closing sentence)
 * Keep these two sets in visual parity whenever the spec moves.
 */

/* ① Card name — Satoshi 20/500, --fg */
.postcard-name {
  margin: 0 0 20px 0;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--fg);
}

/* ② Keywords — Satoshi 14/400, UPPERCASE, letter-spacing 1.8, --fg-dim */
.postcard-keywords {
  margin: 0 0 32px 0;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ③ Takeaway / core proverb — Cormorant Italic 29/400/1.4, --fg-soft, max-width 560 */
.postcard-core {
  margin: 0 0 44px 0;
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-style: italic;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-soft);
  max-width: 560px;
}
.postcard-core:empty {
  display: none;
}

/* ④ Color / Object / Moment — 3-column anchor grid.
 *    Spec note: Color value may optionally be +1 size step (16 → 17/18)
 *    for quick scanning. Not currently applied. */
.postcard-anchors {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  padding-bottom: 6px;
  margin: 0 0 32px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 32px;
}
.anchor-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anchor-key {
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.anchor-val {
  margin: 0;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--fg-soft);
}

/* ⑤ Final takeaway — Satoshi 22/500/1.45, 1px gold left bar, --fg, max-width 580.
 *    Always one line, never split into paragraphs; closing sentence of the card. */
.postcard-takeaway {
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--accent);
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.1px;
  color: var(--fg);
  max-width: 580px;
}
.postcard-takeaway:empty {
  display: none;
}

/* Got it button — pill style via .takeaway-btn, only override margin for layout */
.daily-got-it {
  margin-top: 36px;
}

/* "Already opened today" reminder */
.daily-come-back {
  margin: 14px 0 0 0;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--fg-dim);
  opacity: 0.6;
  letter-spacing: 0.2px;
  text-align: center;
}

/* Chinese-only font rules. EN UI is intentionally untouched.
   Excludes top-left lang toggle and top-right Menu (always EN). */
:lang(zh) .hero-quote,
:lang(zh) .reflection-kicker,
:lang(zh) .reflection-title,
:lang(zh) .hero-proverb,
:lang(zh) .pre-stage-title,
:lang(zh) .pre-stage-copy,
:lang(zh) .intent-entry-title,
:lang(zh) .intent-entry-copy {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
}

:lang(zh) .hero-philosophy,
:lang(zh) .intent-entry-hints,
:lang(zh) .intent-entry-input,
:lang(zh) .pre-stage-pick-hint {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

/* Buttons: CN sans (黑体 / 苹方), never serif. Weight inherits from each
   button's own rule (typically 500). */
:lang(zh) .enter-btn,
:lang(zh) .mode-enter-btn,
:lang(zh) .intent-entry-begin,
:lang(zh) .takeaway-btn,
:lang(zh) .daily-got-it,
:lang(zh) .ending-return-btn,
:lang(zh) #guidance-back-btn,
:lang(zh) #guidance-farewell-home-btn,
:lang(zh) .mode-title,
:lang(zh) .mode-subtext,
:lang(zh) .mode-soon {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

/* No italic in CN — applies to <em> from inline markdown AND elements that
   default to italic (reading-core, advice-closing, postcard-core). */
:lang(zh) em,
:lang(zh) .reading-core,
:lang(zh) .advice-closing,
:lang(zh) .postcard-core {
  font-style: normal;
}

/* Session-end / closing lines use 宋体 in CN.
   .advice-closing  — last line in advice card body
   .ending-title    — final takeaway after a normal session ends
   .guidance-farewell-text — final closing line after advice card flow */
:lang(zh) .advice-closing,
:lang(zh) .ending-title,
:lang(zh) .guidance-farewell-text {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
}

/* Chapter labels (01/02/03 序·照见·当下) feel small in CN; bump up. */
:lang(zh) .chapter-index {
  font-size: 24px;
}

/* ============================================================
   Menu (overlay + panel with internal nav ↔ detail switching)
   Lives OUTSIDE design-canvas → uses raw viewport units.
   Detail views (Traces / Archive / Taya) render INSIDE the panel
   on the same pearl background; Back returns to nav, Close closes
   the whole menu.
   ============================================================ */

body.menu-open {
  overflow: hidden;
}

/* Overlay covers the full viewport but fades in from transparent (top)
   to 0.20 dark, so the top-bar stays untouched and the boundary is a
   soft gradient instead of a hard horizontal line. */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(7px) saturate(85%);
  -webkit-backdrop-filter: blur(7px) saturate(85%);
  /* Mask the top so the RiLL logo + chrome row stay fully clear.
     Below the panel-top zone, the dim + blur fade in. */
  mask-image: linear-gradient(
    to bottom,
    transparent 0px,
    transparent 120px,
    black 220px,
    black 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0px,
    transparent 120px,
    black 220px,
    black 100%
  );
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-panel {
  position: fixed;
  top: 170px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  /* Pearl image, with a heavier dark layer on top so the panel fully
     obscures any homepage text behind it and reads moodier. */
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url('./assets/menu-bg-pearl.png') center center / cover no-repeat,
    #2a2a2a;
  /* Soft diffuse shadow outward — softens the hard rectangle edge into
     the surrounding overlay so the panel doesn't read as a cut-out box. */
  box-shadow: 0 0 120px 40px rgba(0, 0, 0, 0.55);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms ease;
  overflow: hidden;
}
.menu-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Back button (only visible when a detail view is active).
   Minimal text + underline accent — no pill background. */
.menu-back {
  position: absolute;
  top: 37px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: #faf4e6;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 4px 6px 6px;
  cursor: pointer;
  transition: opacity var(--transition-page) ease, transform var(--transition-page) ease;
  z-index: 4;
  opacity: 0.7;
}
.menu-back::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 1px;
  background: #faf4e6;
  opacity: 0.18;
}
.menu-back:hover {
  opacity: 1;
}
.menu-back-label { line-height: 1; }

/* ----------------------------------------
   Nav state (3 items, vertically distributed below header)
---------------------------------------- */
.menu-items {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 72px;
  padding: 80px 0 60px;
  box-sizing: border-box;
}
.menu-item {
  display: block;
  border: 0;
  background: transparent;
  color: #faf4e6;
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.2px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  padding: 12px 24px;
  transition: color 0.3s ease;
}
.menu-item:hover {
  color: var(--accent);
}

/* ----------------------------------------
   Detail views (rendered inside the panel, scrollable)
---------------------------------------- */
.menu-detail {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 95px 60px 60px;
  box-sizing: border-box;
  color: #faf4e6;
}
/* Native scrollbar hidden — we render our own moon indicator instead. */
.menu-detail { scrollbar-width: none; }
.menu-detail::-webkit-scrollbar { width: 0; display: none; }

/* Moon phase scroll indicator — drifts down the right edge and waxes
   from new moon to full as you scroll. Only shown when content overflows. */
.menu-moon {
  position: absolute;
  top: 80px;
  right: 22px;
  width: 34px;
  height: 34px;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 280ms ease;
  will-change: transform;
}
.menu-moon.is-visible { opacity: 1; }
.menu-moon-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(201, 169, 110, 0.25));
}
.menu-moon-dark {
  fill: rgba(250, 244, 230, 0.1);
  stroke: rgba(250, 244, 230, 0.25);
  stroke-width: 1.2;
}
.menu-moon-lit {
  fill: #f4e6c4;
}

/* ========================================
   Letters — index list + article view
   ======================================== */

/* Index (table of contents) */
.letters-index {
  max-width: 460px;
  margin: 0 auto;
}
.letters-eyebrow {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 40px;
  text-align: center;
}
.letters-eyebrow-zh { display: none; }
:lang(zh) .letters-eyebrow-en { display: none; }
:lang(zh) .letters-eyebrow-zh { display: block; }
:lang(zh) .letters-eyebrow {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 17px;
  letter-spacing: 6px;
  text-transform: none;
}

.letters-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.letters-list li {
  border-top: 1px solid rgba(250, 244, 230, 0.10);
}
.letters-list li:last-child {
  border-bottom: 1px solid rgba(250, 244, 230, 0.10);
}
.letter-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 22px 4px;
  text-align: left;
  cursor: pointer;
  color: #faf4e6;
  transition: padding-left 250ms ease;
}
.letter-link:hover {
  padding-left: 12px;
}
.letter-link-meta {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.78);
  transition: color 0.3s ease;
}
.letter-link-title {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.1px;
  line-height: 1.2;
  color: #faf4e6;
  transition: color 0.3s ease;
}
.letter-link:hover .letter-link-title,
.letter-link:hover .letter-link-meta {
  color: var(--accent);
}
.letter-link-title-zh { display: none; }
:lang(zh) .letter-link-title-en { display: none; }
:lang(zh) .letter-link-title-zh { display: block; }
:lang(zh) .letter-link-title {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 28px;
}

/* Article (single Letter) */
.letter-article {
  max-width: 560px;
  margin: 0 auto;
}
.letter-eyebrow {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.letter-headline {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 38px;
  font-weight: 300;
  color: #faf4e6;
  margin: 0 0 56px;
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.letter-headline-zh { display: none; }
:lang(zh) .letter-headline-en { display: none; }
:lang(zh) .letter-headline-zh { display: block; }
:lang(zh) .letter-headline {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

.letter-body p {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 20px;
  line-height: 1.75;
  color: #faf4e6;
  margin: 0 0 24px;
}
:lang(zh) .letter-body p {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: 10px;
}
.letter-body-zh { display: none; }
:lang(zh) .letter-body-zh { display: block; }
:lang(zh) .letter-body-en { display: none; }

.letter-section {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c9a96e;
  margin: 48px 0 18px;
}
.letter-body > .letter-section:first-child { margin-top: 0; }
:lang(zh) .letter-section {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 17px;
  letter-spacing: 3px;
  text-transform: none;
  font-weight: 500;
}

.letter-quote {
  margin: 0 0 22px;
  padding-left: 18px;
  border-left: 1px solid rgba(201, 169, 110, 0.5);
  color: rgba(250, 244, 230, 0.82);
}
.letter-quote p { margin: 0 0 10px; font-size: 19px; }
.letter-quote p:last-child { margin-bottom: 0; }

.letter-sign {
  margin-top: 32px !important;
  color: rgba(250, 244, 230, 0.75);
  font-size: 17px !important;
}

.letter-contact {
  list-style: none;
  padding: 32px 0 0;
  margin: 64px 0 0;
  border-top: 1px solid rgba(250, 244, 230, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.letter-contact li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: baseline;
}
.letter-contact-label {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(250, 244, 230, 0.45);
}
.letter-contact-label-zh { display: none; }
:lang(zh) .letter-contact-label-en { display: none; }
:lang(zh) .letter-contact-label-zh { display: inline; }
:lang(zh) .letter-contact-label {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 1px;
  text-transform: none;
  font-size: 12px;
}
.letter-contact-value {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  color: #faf4e6;
  text-decoration: none;
  transition: color 250ms ease;
}
.letter-contact-value:hover { color: #c9a96e; }

/* ========================================
   Archive — sign-in gate + signed-in account strip
   ======================================== */
.archive-gate {
  max-width: 380px;
  margin: 24px auto 0;
  text-align: center;
}
.archive-gate-eyebrow {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.archive-gate-eyebrow-zh { display: none; }
:lang(zh) .archive-gate-eyebrow-en { display: none; }
:lang(zh) .archive-gate-eyebrow-zh { display: block; }
:lang(zh) .archive-gate-eyebrow {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: none;
}
.archive-gate-title {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 300;
  color: #faf4e6;
  line-height: 1.4;
  margin: 0 0 44px;
  letter-spacing: -0.1px;
}
.archive-gate-title-zh { display: none; }
:lang(zh) .archive-gate-title-en { display: none; }
:lang(zh) .archive-gate-title-zh { display: block; }
:lang(zh) .archive-gate-title {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: left;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-label {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(250, 244, 230, 0.82);
}
.auth-input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(250, 244, 230, 0.28);
  padding: 10px 2px;
  color: #faf4e6;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  letter-spacing: 0.2px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}
.auth-input:focus {
  border-bottom-color: var(--accent);
}
.auth-input:-webkit-autofill {
  -webkit-text-fill-color: #faf4e6;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 99999s ease-in-out 0s;
}
.auth-message {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #d68a8a;
  margin: 0;
}
.auth-message.is-success {
  color: var(--accent);
}
.auth-submit {
  margin-top: 6px;
  background: transparent;
  border: 1px solid rgba(201, 169, 110, 0.55);
  color: var(--accent);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 0;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.auth-submit:hover:not(:disabled) {
  background: rgba(201, 169, 110, 0.10);
  color: #faf4e6;
  border-color: var(--accent);
}
.auth-submit:disabled {
  opacity: 0.5;
  cursor: progress;
}
.auth-toggle {
  text-align: center;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  color: rgba(250, 244, 230, 0.55);
  margin: 8px 0 0;
}
.auth-toggle-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0 0 0 4px;
  transition: color 0.3s ease;
}
.auth-toggle-btn:hover {
  color: #faf4e6;
}

/* Signed-in account strip (bottom of Archive content) */
.archive-account {
  border-top: 1px solid rgba(250, 244, 230, 0.10);
  margin: 56px auto 0;
  max-width: 460px;
  padding: 22px 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 1.6px;
}
.archive-account-email {
  color: rgba(250, 244, 230, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.archive-account-signout {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0 4px 12px;
  transition: color 0.3s ease;
}
.archive-account-signout:hover {
  color: #faf4e6;
}

/* ============================================================
   Archive page — full-state view (peer of hero/reflection/daily)
   Uses arc-* / anc-* class namespace per design ref.
   ============================================================ */
.archive-page {
  position: absolute;
  inset: 0;
  padding: 130px 60px 60px;
  color: #faf4e6;
  z-index: 5;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18));
}
/* Only apply display:flex when not hidden — otherwise the class rule beats
   the [hidden] UA rule (same specificity, author wins) and the section leaks. */
.archive-page:not([hidden]) {
  display: flex;
  flex-direction: column;
}
body.is-archive .hero-bg { opacity: 0.5; }

.arc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(250,244,230,0.06);
  margin-bottom: 44px;
  /* Locked height — keeps the tab labels at the exact same Y regardless of
     which tab is active or what content sits below. */
  height: 60px;
  box-sizing: border-box;
}

/* Back-to-home arrow now lives where the Archive title used to. */
.arc-back-btn {
  background: transparent;
  border: 0;
  color: rgba(250, 244, 230, 0.7);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.3s ease, transform 0.3s ease;
}
.arc-back-btn:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

.arc-tabs {
  display: flex;
  gap: 36px;
  align-items: baseline;
}
.arc-tab {
  background: transparent;
  border: 0;
  /* Always 2px so the box never changes height between active/inactive — the
     bottom border color is what swaps, not its width. */
  border-bottom: 2px solid rgba(250,244,230,0.12);
  color: rgba(250,244,230,0.7);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 2px;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.arc-tab:hover {
  color: #faf4e6;
  border-bottom-color: rgba(201, 169, 110, 0.5);
}
.arc-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.arc-tab-zh { display: none; }
:lang(zh) .arc-tab-en { display: none; }
:lang(zh) .arc-tab-zh { display: inline; }
/* Chinese characters in Satoshi fall back to a thin system font and read
   far smaller than the EN setting. Force a serif Chinese face + bigger
   size + tighter caps treatment for ZH. */
:lang(zh) .arc-tab {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 22px;
  letter-spacing: 4px;
  text-transform: none;
  font-weight: 500;
}

/* Sign-in gate inside archive page */
.arc-gate {
  max-width: 380px;
  margin: 32px auto 0;
  text-align: center;
  flex: 1;
}
.arc-gate-eyebrow {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.arc-gate-eyebrow-zh { display: none; }
:lang(zh) .arc-gate-eyebrow-en { display: none; }
:lang(zh) .arc-gate-eyebrow-zh { display: block; }
:lang(zh) .arc-gate-eyebrow {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: none;
}
.arc-gate-title {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 300;
  color: #faf4e6;
  line-height: 1.4;
  margin: 0 0 44px;
  letter-spacing: -0.1px;
}
.arc-gate-title-zh { display: none; }
:lang(zh) .arc-gate-title-en { display: none; }
:lang(zh) .arc-gate-title-zh { display: block; }
:lang(zh) .arc-gate-title {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

/* A1 Anchor tab */
.arc-tab-pane { flex: 1; }
.arc-anchor {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
}

.anc-day-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.anc-view-all {
  justify-self: start;
  background: transparent;
  border: 0;
  color: rgba(250,244,230,0.55);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  transition: color 0.3s ease;
}
.anc-view-all:hover { color: var(--accent); }
.anc-view-all-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.anc-view-all-zh { display: none; }
:lang(zh) .anc-view-all-en { display: none; }
:lang(zh) .anc-view-all-zh { display: inline; letter-spacing: 4px; }
:lang(zh) .anc-view-all {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 17px;
  letter-spacing: 4px;
  text-transform: none;
  font-weight: 400;
}

/* Scrubber + arrows live together as a single centered group. */
.anc-scrubber-wrap {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 18px;
}
.anc-scrubber {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 880px;
}
.anc-ds-day {
  flex: 1;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0 6px;
  cursor: pointer;
  opacity: 0.55;
  border-bottom: 1px solid transparent;
  transition: opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  min-width: 0;
  color: inherit;
  position: relative;
}
/* New-month marker — small accent label floating above the day-1 cell. */
.anc-ds-month {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  opacity: 1;
}
:lang(zh) .anc-ds-month {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: none;
}
.anc-ds-day:hover { opacity: 0.9; }
.anc-ds-day.has::after {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  margin-top: -2px;
}
.anc-ds-day.active {
  opacity: 1;
  border-bottom-color: var(--accent);
  background: rgba(201,169,110,0.06);
}
.anc-moon { width: 28px; height: 28px; display: block; transition: filter 0.3s ease; }
.anc-ds-num {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  color: rgba(250,244,230,0.7);
  letter-spacing: 1px;
}
.anc-ds-day.active .anc-ds-num { color: #faf4e6; font-weight: 500; }
/* Today gets a clearly distinct treatment: gold-bold number + a soft
   gold halo around the moon. Strong enough to read at a glance even
   when today happens not to be the active selection. */
.anc-ds-day.is-today .anc-ds-num { color: var(--accent); font-weight: 600; }
.anc-ds-day.is-today .anc-moon {
  filter: drop-shadow(0 0 6px rgba(201, 169, 110, 0.55));
}

.anc-day-nav-btn {
  background: transparent;
  border: 0;
  color: rgba(250,244,230,0.55);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  transition: color 0.3s ease, opacity 0.3s ease;
  font-family: inherit;
  opacity: 0.85;
}
.anc-day-nav-btn:hover { color: var(--accent); opacity: 1; }

/* Presence card */
.anc-presence {
  background: rgba(20,20,22,0.55);
  border: 1px solid rgba(250,244,230,0.06);
  border-radius: 4px;
  padding: 56px 64px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
  flex: 1;
}
.anc-presence-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.anc-card-img-frame {
  width: 260px;
  height: 420px;
  background: rgba(0,0,0,0.3);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}
.anc-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.anc-card-img.is-reversed { transform: rotate(180deg); }
.anc-card-date {
  margin-top: 18px;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 4px;
  text-align: center;
  color: #faf4e6;
}
.anc-card-date-top { display: block; }
.anc-card-date-bot {
  display: block;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 5px;
  margin-top: 6px;
}

.anc-presence-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.anc-pb-name {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 500;
  margin: 0;
}
.anc-pb-keys {
  color: rgba(250,244,230,0.55);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
}
.anc-pb-quote {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 28px;
  line-height: 1.45;
  color: #faf4e6;
  margin: 6px 0;
  max-width: 600px;
}
.anc-pb-divider {
  height: 1px;
  background: rgba(250,244,230,0.06);
  margin: 4px 0;
}
.anc-pb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  max-width: 620px;
}
.anc-pb-col-key {
  color: rgba(250,244,230,0.55);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-weight: 400;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
}
.anc-pb-col-val {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #faf4e6;
  margin: 0;
}
.anc-pb-proverb {
  margin-top: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  color: #faf4e6;
  line-height: 1.5;
  max-width: 580px;
}

.anc-empty {
  text-align: center;
  padding: 100px 20px;
  color: rgba(250,244,230,0.55);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.anc-empty-line { margin: 0; }
.anc-empty-zh { display: none; }
:lang(zh) .anc-empty-en { display: none; }
:lang(zh) .anc-empty-zh { display: block; }
:lang(zh) .anc-empty-line {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 18px;
  letter-spacing: 2px;
}
.anc-empty-pull {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.3s ease, transform 0.3s ease;
}
.anc-empty-pull:hover {
  color: #faf4e6;
  transform: translateX(3px);
}
.anc-empty-pull-zh { display: none; }
:lang(zh) .anc-empty-pull-en { display: none; }
:lang(zh) .anc-empty-pull-zh {
  display: inline;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 16px;
  letter-spacing: 2px;
}

.anc-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: rgba(250,244,230,0.55);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  padding-top: 4px;
  margin-top: auto;  /* pin to bottom of arc-anchor so the share row aligns
                        with Reflection's Expand button across tab switches */
}
/* Count line is intentionally hidden — Tong asked to drop the "共 X 个锚" string. */
.anc-count { display: none; }
.anc-share-icons {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.anc-share-ic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(250,244,230,0.12);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(250,244,230,0.7);
  transition: all 0.25s ease;
  padding: 0;
}
.anc-share-ic:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.anc-share-ic svg { width: 18px; height: 18px; display: block; }

/* ========================================
   A2 — Reflection tab (day moon timeline + selected day's questions)
   ======================================== */
.arc-reflection { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ref-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
  flex: 1;
  min-height: 0;
}

/* === LEFT: day moon timeline + Expand button === */
.ref-days {
  border-right: 1px solid rgba(250, 244, 230, 0.06);
  padding-right: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(250,244,230,0.12) transparent;
}
.ref-days::-webkit-scrollbar { width: 4px; }
.ref-days::-webkit-scrollbar-thumb { background: rgba(250,244,230,0.12); }

.ref-days-header {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(250, 244, 230, 0.55);
  margin: 0 0 32px;
}
.ref-days-header-zh { display: none; }
:lang(zh) .ref-days-header-en { display: none; }
:lang(zh) .ref-days-header-zh {
  display: inline;
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: none;
}

/* Fixed month header above the day list — shows today's month so the
   number-only rows always have orientation context. */
.ref-days-month {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--accent);
}
:lang(zh) .ref-days-month {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: normal;
  font-size: 19px;
  letter-spacing: 2px;
}

.ref-days-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Vertical line through moon centers (moon 22px → center 11px from left edge). */
.ref-days-list::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: rgba(250, 244, 230, 0.10);
  z-index: 0;
}

.ref-day-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
  position: relative;
  z-index: 1;
  opacity: 0.4;
  transition: opacity 0.25s ease, padding-left 0.25s ease;
  color: inherit;
  font-family: inherit;
}
.ref-day-row.has { opacity: 0.78; }
.ref-day-row:hover { opacity: 0.95; padding-left: 4px; }
.ref-day-row.is-active { opacity: 1; }
.ref-day-row .anc-moon {
  width: 22px;
  height: 22px;
  display: block;
  background: var(--bg);  /* mask the connecting line */
  border-radius: 50%;
  transition: filter 0.3s ease;
}
.ref-day-row.has .anc-moon {
  filter: drop-shadow(0 0 4px rgba(201, 169, 110, 0.35));
}
.ref-day-row.is-active .anc-moon {
  filter: drop-shadow(0 0 8px rgba(201, 169, 110, 0.7));
}
/* Gold dot at the right end of any day-row with sessions — visible content marker. */
.ref-day-row.has::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(201, 169, 110, 0.6);
}
.ref-day-num {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: rgba(250, 244, 230, 0.78);
  font-weight: 500;
  min-width: 24px;
}
.ref-day-row.is-today .ref-day-num {
  color: var(--accent);
}
.ref-day-row.is-active .ref-day-num {
  color: var(--accent);
  font-weight: 600;
}
.ref-day-month {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(201, 169, 110, 0.7);
  margin-left: 4px;
}
:lang(zh) .ref-day-month {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 1px;
  text-transform: none;
  font-size: 12px;
}

/* Per-day empty state (right pane when selected day has no sessions) */
.ref-day-pane-empty {
  padding: 24px 0 0;
}
.ref-day-empty-block {
  text-align: left;
}

/* Scroll-down affordance — sits between the day list and the Expand button.
   Click bumps the list down; hovering kicks off a continuous slow scroll.
   margin-top:auto pins this + the Expand below it to the bottom of the rail. */
.ref-days-scroll-down {
  margin-top: auto;
  padding: 10px 0;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(250, 244, 230, 0.4);
  transition: color 0.3s ease, transform 0.3s ease;
}
.ref-days-scroll-down:hover {
  color: var(--accent);
  transform: translateY(2px);
}
.ref-days-scroll-down svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Expand button — pinned at bottom of the day axis, opens a fuller date picker */
.ref-days-expand {
  margin-top: 4px;
  padding: 18px 0 8px;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(250, 244, 230, 0.08);
  color: rgba(250, 244, 230, 0.55);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}
.ref-days-expand:hover { color: var(--accent); }
.ref-days-expand-ic svg {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.85;
}
/* EN / ZH single-language toggle — never both at once. */
.ref-days-expand-zh { display: none; }
:lang(zh) .ref-days-expand-en { display: none; }
:lang(zh) .ref-days-expand-zh {
  display: inline;
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 2px;
  text-transform: none;
  font-size: 14px;
}
:lang(zh) .ref-days-expand { letter-spacing: 2px; text-transform: none; }

/* Empty state (no sessions at all yet) */
.ref-days-empty {
  padding: 24px 0;
  text-align: left;
}
.ref-empty-line {
  margin: 0 0 12px;
  color: rgba(250, 244, 230, 0.55);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
}
.ref-empty-zh { display: none; }
:lang(zh) .ref-empty-en { display: none; }
:lang(zh) .ref-empty-zh {
  display: block;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 16px;
  letter-spacing: 2px;
}
.ref-empty-begin {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.3s ease, transform 0.3s ease;
}
.ref-empty-begin:hover { color: #faf4e6; transform: translateX(3px); }
.ref-empty-begin-zh { display: none; }
:lang(zh) .ref-empty-begin-en { display: none; }
:lang(zh) .ref-empty-begin-zh {
  display: inline;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 14px;
  letter-spacing: 2px;
}

/* === RIGHT: selected day's session rows === */
.ref-day-pane {
  overflow-y: auto;
  padding: 0 0 60px;
  min-height: 0;
}
.ref-day-eyebrow {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 28px;
}
:lang(zh) .ref-day-eyebrow {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: none;
}

.ref-questions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.ref-question-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 22px 8px 22px 0;
  border: 0;
  border-top: 1px solid rgba(250, 244, 230, 0.08);
  background: transparent;
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: inherit;
  font-family: inherit;
  transition: padding-left 0.25s ease, background 0.25s ease;
}
.ref-question-row:last-child {
  border-bottom: 1px solid rgba(250, 244, 230, 0.08);
}
.ref-question-row:hover {
  padding-left: 10px;
  background: rgba(201, 169, 110, 0.04);
}
.ref-question-time {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.ref-question-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  color: #faf4e6;
}
:lang(zh) .ref-question-text {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 22px;
  font-style: normal;
  letter-spacing: 1px;
}
.ref-question-meta {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(250, 244, 230, 0.5);
  white-space: nowrap;
}
:lang(zh) .ref-question-meta {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 1px;
  text-transform: none;
  font-size: 13px;
}

/* Subtle visual when the tab has content — gentle gold wash on the right pane */
body.is-archive .arc-reflection:has(.ref-day-content:not([hidden])) .ref-day-pane {
  background: linear-gradient(180deg, rgba(201,169,110,0.025), transparent 60%);
}

/* Account strip — quietly tucked into the bottom-left of the Archive page.
   Format: tong0701@uw.edu | Sign Out */
.arc-account {
  position: absolute;
  bottom: 36px;
  left: 60px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  z-index: 6;
  font-family: "Satoshi Variable", -apple-system, sans-serif;
}
.arc-account-email {
  color: rgba(250, 244, 230, 0.6);
  font-size: 15px;
  letter-spacing: 0.4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 360px;
}
.arc-account-sep {
  color: rgba(250, 244, 230, 0.28);
  font-size: 15px;
  line-height: 1;
}
.arc-account-signout {
  background: transparent;
  border: 0;
  color: rgba(250, 244, 230, 0.7);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
}
.arc-account-signout:hover { color: var(--accent); }
.arc-account-signout-zh { display: none; }
:lang(zh) .arc-account-signout-en { display: none; }
:lang(zh) .arc-account-signout-zh {
  display: inline;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: 3px;
  text-transform: none;
  font-size: 16px;
}

/* The Archive page has its own back affordance (.arc-back-btn) inside
   the title row, so the global ← chrome arrow is hidden here. */
body.is-archive .back-arrow { display: none; }

/* Archive (Coming Soon) */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 0 20px;
  gap: 32px;
}
.cs-title {
  font-family: "Cormorant Garamond", "Satoshi Variable", serif;
  font-size: 56px;
  font-weight: 500;
  color: #faf4e6;
  margin: 0;
  letter-spacing: -0.5px;
}
.cs-body {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: #a89a82;
  margin: 0;
  max-width: 380px;
}
:lang(zh) .cs-body {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", serif;
}
.cs-zh { display: none; }
:lang(zh) .cs-zh { display: block; }
:lang(zh) .cs-en { display: none; }

/* ============================================================
   A4 · VFR — Full Reading Replay
   Independent page reached from Archive → Reflection → View All.
   Lives inside #design-canvas, so it inherits applyScale().
   ============================================================ */
.vfr-page {
  position: absolute;
  inset: 0;
  padding: 170px 60px 60px;
  color: #faf4e6;
  z-index: 5;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18));
}
.vfr-page:not([hidden]) {
  display: flex;
  flex-direction: column;
}
body.is-vfr .hero-bg { opacity: 0.5; }
body.is-vfr .back-arrow { display: none; }

.vfr-back-btn {
  position: absolute;
  top: 90px;
  left: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(250, 244, 230, 0.7);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.3s ease, transform 0.3s ease;
  z-index: 6;
}
.vfr-back-btn:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

.vfr-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-bottom: 40px;
  scrollbar-width: none;
}
.vfr-scroll::-webkit-scrollbar { width: 0; display: none; }

.vfr-head {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(244, 235, 219, 0.09);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vfr-ek {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
:lang(zh) .vfr-ek {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 3px;
  text-transform: none;
}
.vfr-q {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.3;
  color: #faf4e6;
  margin: 0;
}
:lang(zh) .vfr-q {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
  font-style: normal;
  font-size: 32px;
  letter-spacing: 0.05em;
}
.vfr-meta {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(250, 244, 230, 0.55);
  margin: 0;
}
:lang(zh) .vfr-meta {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 2px;
  text-transform: none;
}

.vfr-rounds {
  display: flex;
  flex-direction: column;
  gap: 64px;
  align-items: stretch;
}
.vfr-round {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.vfr-round-label {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(250, 244, 230, 0.7);
  text-align: center;
}
:lang(zh) .vfr-round-label {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 2px;
  text-transform: none;
  font-size: 17px;
}
.vfr-round-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 44px;
  align-items: flex-start;
}
.vfr-round-cardcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.vfr-round-imgframe {
  width: 180px;
  aspect-ratio: 7 / 11;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(244,235,219,0.12);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.vfr-round-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vfr-round-img.is-reversed { transform: rotate(180deg); }
.vfr-round-name {
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: -0.249px;
  color: #faf4e6;
  margin: 0;
  text-align: center;
}
:lang(zh) .vfr-round-name {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}
.vfr-round-keys {
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(250,244,230,0.65);
  margin: 0;
  text-align: center;
}
:lang(zh) .vfr-round-keys {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 1.5px;
  text-transform: none;
  font-size: 17px;
}
.vfr-round-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vfr-round-quote {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(250,244,230,0.92);
  margin: 0 0 4px;
}
:lang(zh) .vfr-round-quote {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", serif;
  font-style: normal;
  font-size: 24px;
  letter-spacing: 0.05em;
}
.vfr-round-angles {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.vfr-round-angles article {
  margin: 0;
}
.vfr-round-angles h4 {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
:lang(zh) .vfr-round-angles h4 {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 2px;
  text-transform: none;
  font-size: 17px;
}
.vfr-round-angles p {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(250,244,230,0.9);
  margin: 0 0 6px;
}
:lang(zh) .vfr-round-angles p {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.85;
}
.vfr-round-hook,
.vfr-round-take {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(250,244,230,0.85);
  margin: 8px 0 0;
  padding-left: 14px;
  border-left: 1px solid rgba(201, 169, 110, 0.4);
}
:lang(zh) .vfr-round-hook,
:lang(zh) .vfr-round-take {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.85;
}

.vfr-closing {
  max-width: 960px;
  width: 100%;
  margin: 16px auto 0;
  padding-top: 48px;
  border-top: 1px solid rgba(244, 235, 219, 0.09);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.vfr-closing-label {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  text-align: center;
}
:lang(zh) .vfr-closing-label {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 2px;
  text-transform: none;
  font-size: 17px;
}

/* Horizontal layout — mirrors .vfr-round-body so the guidance card reads as
   "another round" rather than a separate vertical stack. Matches the live
   guidance-result panel: card on the left, written advice on the right. */
.vfr-closing-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 44px;
  align-items: flex-start;
}
.vfr-closing-cardcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.vfr-closing-img {
  width: 180px;
  aspect-ratio: 7 / 11;
  object-fit: cover;
  border: 1px solid rgba(244,235,219,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  display: block;
}
.vfr-closing-name {
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: -0.249px;
  color: #faf4e6;
  margin: 0;
  text-align: center;
}
:lang(zh) .vfr-closing-name {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

.vfr-closing-textcol {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vfr-closing-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vfr-closing-body p {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(250,244,230,0.9);
  margin: 0;
}
:lang(zh) .vfr-closing-body p {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.85;
}
.vfr-closing-action {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--accent);
  margin: 8px 0 0;
  padding-left: 14px;
  border-left: 1px solid rgba(201, 169, 110, 0.5);
}
:lang(zh) .vfr-closing-action {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.85;
}
.vfr-closing-farewell {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(250,244,230,0.85);
  margin: 16px 0 0;
}
:lang(zh) .vfr-closing-farewell {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", serif;
  font-style: normal;
  font-size: 22px;
  letter-spacing: 0.05em;
}
.vfr-return-btn {
  margin: 60px auto 0;
  display: block;
  width: 260px;
  height: 56px;
  font-size: 17px;
  letter-spacing: 1.5px;
}

/* Side rail — subtle round index, sticky-positioned on the left.
   Click an item to jump to that round. Hover lifts the whole rail. */
.vfr-nav {
  position: absolute;
  top: 260px;
  left: 28px;
  width: 168px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 6;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}
.vfr-nav:hover { opacity: 1; }
.vfr-nav-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: baseline;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(244,235,219,0.12);
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  color: rgba(250,244,230,0.7);
  transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}
.vfr-nav-item:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 14px;
}
.vfr-nav-num {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1.4;
}
.vfr-nav-name {
  font-family: "Satoshi Variable", "Cormorant Garamond", serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: inherit;
}
:lang(zh) .vfr-nav-name {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 14px;
}
.vfr-nav-item.is-closing {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(244,235,219,0.12);
}
.vfr-nav-item.is-closing .vfr-nav-num {
  font-size: 13px;
  letter-spacing: 0;
}

/* ============================================================
   Support · tip jar page (WeChat / Alipay / Ko-fi).
   Lives inside #design-canvas like archive-page / vfr-page so it
   inherits applyScale(). Lifted from Tong's standalone mock at
   /Users/tong/Downloads/Support RiLL.html — values trimmed to fit
   the 1440-design coord system.
   ============================================================ */
.support-page {
  position: absolute;
  inset: 0;
  padding: 130px 60px 60px;
  color: #faf4e6;
  z-index: 5;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18));
}
.support-page:not([hidden]) { display: flex; flex-direction: column; }
body.is-support .hero-bg { opacity: 0.5; }
body.is-support .back-arrow { display: none; }

.support-back-btn {
  position: absolute;
  top: 90px;
  left: 60px;
  background: transparent;
  border: 0;
  color: rgba(250, 244, 230, 0.7);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.3s ease, transform 0.3s ease;
  z-index: 6;
}
.support-back-btn:hover { color: var(--accent); transform: translateX(-3px); }

.support-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 0;
  scrollbar-width: none;
}
.support-scroll::-webkit-scrollbar { width: 0; display: none; }

.support-stack {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === Title (subtitle removed — title is now a casual full sentence) === */
.support-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: #faf4e6;
  text-align: center;
  margin: 0 0 56px;
  max-width: 760px;
}
.support-title-zh {
  font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
  font-style: normal;
  font-size: 30px;
  letter-spacing: 2px;
  line-height: 1.5;
  max-width: 680px;
}
.support-title-zh { display: none; }
:lang(zh) .support-title-en { display: none; }
:lang(zh) .support-title-zh { display: block; }

/* === Three columns === */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.support-card {
  position: relative;
  border: 1px solid rgba(250, 244, 230, 0.12);
  border-radius: 2px;
  padding: 26px 20px 22px;
  background: rgba(250, 244, 230, 0.012);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 350ms ease, background 350ms ease, transform 350ms ease, box-shadow 450ms ease;
}
.support-card:hover {
  border-color: rgba(201, 169, 110, 0.4);
  background: rgba(201, 169, 110, 0.025);
  box-shadow: 0 0 36px -8px rgba(201, 169, 110, 0.28);
}
a.support-card:hover { transform: translateY(-2px); }

.support-card-label {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: 500;
}
.support-card-label-cn {
  display: inline-block;
  margin-left: 6px;
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(201, 169, 110, 0.7);
  font-weight: 400;
  text-transform: none;
}

/* QR slot — wraps the actual QR image */
.support-qr {
  position: relative;
  width: 148px;
  height: 148px;
  background: linear-gradient(180deg, rgba(250,244,230,0.04), rgba(250,244,230,0.015));
  border: 1px solid rgba(250, 244, 230, 0.12);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.support-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.support-card-caption {
  margin: 16px 0 0;
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(250, 244, 230, 0.62);
  font-weight: 300;
}
.support-card-caption-en {
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.support-card-caption-zh { display: none; }
:lang(zh) .support-card-caption-en { display: none; }
:lang(zh) .support-card-caption-zh { display: block; }

/* Ko-fi card */
.support-kofi-art {
  width: 148px;
  height: 148px;
  border: 1px solid rgba(250, 244, 230, 0.12);
  background:
    radial-gradient(ellipse at 50% 35%, rgba(201,169,110,0.08), transparent 60%),
    linear-gradient(180deg, rgba(250,244,230,0.025), rgba(250,244,230,0.005));
  display: grid;
  place-items: center;
  position: relative;
  transition: border-color 350ms ease;
}
.support-card:hover .support-kofi-art { border-color: rgba(201, 169, 110, 0.35); }
.support-kofi-cup {
  width: 64px;
  height: 64px;
  display: block;
  color: var(--accent);
  opacity: 0.92;
}
.support-kofi-steam {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  opacity: 0.5;
}
.support-kofi-title {
  margin: 14px 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 17px;
  color: #faf4e6;
  font-weight: 400;
}
.support-kofi-title-zh {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: normal;
  font-size: 16px;
  letter-spacing: 1px;
}
.support-kofi-title-zh { display: none; }
:lang(zh) .support-kofi-title-en { display: none; }
:lang(zh) .support-kofi-title-zh { display: block; }
.support-kofi-url {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(250, 244, 230, 0.62);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 250ms ease, border-color 250ms ease;
}
.support-kofi:hover .support-kofi-url {
  color: var(--accent);
  border-bottom-color: rgba(201,169,110,0.5);
}

/* Bottom italic line */
.support-footer-line {
  margin: 72px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 16px;
  color: #a49784;
  text-align: center;
  line-height: 1.7;
  letter-spacing: 0.2px;
  max-width: 560px;
}
.support-footer-line-zh {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: normal;
  font-size: 15px;
  letter-spacing: 3px;
}
.support-footer-line-zh { display: none; }
:lang(zh) .support-footer-line-en { display: none; }
:lang(zh) .support-footer-line-zh { display: block; }

.support-return-btn {
  margin: 48px auto 0;
  display: block;
  width: 220px;
  height: 50px;
  font-size: 15px;
  letter-spacing: 1.5px;
}
.support-return-zh { display: none; }
:lang(zh) .support-return-en { display: none; }
:lang(zh) .support-return-zh { display: inline; }

/* "Support RiLL · 请我喝杯咖啡 ☕" link at Letters list footer.
   Accent gold so it stays readable at 11px (Tong: size already this small,
   bump color to gold for legibility). */
.letters-support-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 56px auto 0;
  padding: 6px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--accent);
  font-family: "Satoshi Variable", -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 500;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.85;
}
.letters-support-link:hover { opacity: 1; transform: translateY(-1px); }
.letters-support-link-sep { opacity: 0.5; }
.letters-support-link-zh {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
}
.letters-support-link-ic { opacity: 0.7; font-size: 12px; }
/* Make it a centered block under the list */
.letters-index .letters-support-link {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ============================================================
   Update note · letter overlay (first 2 visits).
   Sits above everything (z 200) so it greets the user once on
   arrival and politely fades on dismiss.
   ============================================================ */
.note-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 500ms ease;
}
.note-overlay[hidden] { display: none; }
.note-overlay.is-dismissing { opacity: 0; pointer-events: none; }

.note-letter-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: noteFadeIn 700ms ease 100ms forwards;
}
@keyframes noteFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.note-letter {
  width: 100%;
  max-width: 520px;
  padding: 56px 56px 44px;
  /* Slight warm gradient gives it a paper feel rather than a flat panel. */
  background:
    linear-gradient(168deg, rgba(28, 24, 18, 0.86) 0%, rgba(15, 15, 15, 0.78) 55%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(250, 244, 230, 0.12);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(250, 244, 230, 0.04) inset,
    0 30px 80px -20px rgba(0, 0, 0, 0.7);
  position: relative;
}
/* Two short gold marks at top-left — a subtle stamp/wax-seal echo so it
   reads as a letter rather than a modal. */
.note-letter::before,
.note-letter::after {
  content: "";
  position: absolute;
  background: var(--accent);
  opacity: 0.6;
}
.note-letter::before {
  top: -1px;
  left: 56px;
  width: 28px;
  height: 1px;
}
.note-letter::after {
  top: -1px;
  left: 90px;
  width: 6px;
  height: 1px;
  opacity: 0.4;
}

/* Meta */
.note-letter-meta {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 28px;
  letter-spacing: 0.3px;
  opacity: 0.85;
}
.note-letter-meta-zh {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: normal;
  letter-spacing: 2px;
  font-size: 13px;
}
.note-letter-meta-zh { display: none; }
:lang(zh) .note-letter-meta-en { display: none; }
:lang(zh) .note-letter-meta-zh { display: block; }

/* Title */
.note-letter-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  color: #faf4e6;
  margin: 0 0 28px;
  letter-spacing: -0.2px;
}
.note-letter-title-zh {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: normal;
  font-size: 26px;
  letter-spacing: 3px;
  line-height: 1.4;
}
.note-letter-title-zh { display: none; }
:lang(zh) .note-letter-title-en { display: none; }
:lang(zh) .note-letter-title-zh { display: block; }

/* Body */
.note-letter-body {
  font-family: "Satoshi Variable", -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(250, 244, 230, 0.82);
  font-weight: 300;
  margin: 0;
}
.note-letter-body-zh {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  letter-spacing: 0.5px;
  font-size: 14.5px;
  line-height: 2;
}
.note-letter-body p { margin: 0 0 18px; }
.note-letter-body p:last-child { margin-bottom: 0; }
.note-letter-body em {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: #faf4e6;
  font-size: 1.05em;
}
.note-letter-body-zh em {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: normal;
  color: #faf4e6;
}
.note-letter-body-zh { display: none; }
:lang(zh) .note-letter-body-en { display: none; }
:lang(zh) .note-letter-body-zh { display: block; }

/* Signature */
.note-letter-sign {
  margin: 28px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 15px;
  color: #faf4e6;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

/* Coda (the soft P.S. line above the dismiss row) */
.note-letter-coda {
  margin: 32px 0 0;
  padding: 24px 0 0;
  border-top: 1px dashed rgba(250, 244, 230, 0.12);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(250, 244, 230, 0.62);
}
.note-letter-coda-zh {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-style: normal;
  font-size: 13.5px;
  letter-spacing: 1px;
  line-height: 1.95;
}
.note-letter-coda-zh { display: none; }
:lang(zh) .note-letter-coda-en { display: none; }
:lang(zh) .note-letter-coda-zh { display: block; }
.note-letter-coda a,
.note-coffee-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 169, 110, 0.4);
  padding-bottom: 1px;
  cursor: pointer;
  transition: border-color 250ms ease, color 250ms ease;
}
.note-letter-coda a:hover,
.note-coffee-link:hover { border-bottom-color: var(--accent); }

/* Dismiss row */
.note-letter-actions {
  margin: 40px 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.note-got-it {
  background: transparent;
  border: 0;
  padding: 0;
  color: #faf4e6;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.85;
  letter-spacing: 0.3px;
  transition: color 250ms ease, opacity 250ms ease;
}
.note-got-it:hover { color: var(--accent); opacity: 1; }
.note-got-it-zh {
  font-family: "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-style: normal;
  font-size: 15px;
  letter-spacing: 2px;
}
.note-got-it::after {
  content: " →";
  transition: margin-left 250ms ease;
  display: inline-block;
}
.note-got-it:hover::after { margin-left: 4px; }
.note-got-it-zh { display: none; }
:lang(zh) .note-got-it-en { display: none; }
:lang(zh) .note-got-it-zh { display: inline-block; }

@media (max-width: 560px) {
  .note-letter { padding: 40px 28px 32px; }
  .note-letter-title { font-size: 28px; }
  .note-letter-title-zh { font-size: 22px; }
}

