/* ==========================================================================
   XUANJI SANCTUARY (玄机阁) — Luna-Grade Editorial Taoist Design System
   Obsidian Ink & Antique Brass · Aged Xuan Paper · Per-Master Ambient Glow
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Palette 1 (DEFAULT): 青绿 · 玄幻仙境 (Qinglv Xuanhuan Sanctuary — Malachite Jade + Celestial Gold + Cinnabar) */
  --bg: #061110;
  --surface: #0b1c1a;
  --surface-2: #122b28;
  --deep: #040b0a;
  --bar-bg: rgba(6, 17, 16, 0.86);
  --pill-bg: rgba(11, 28, 26, 0.86);
  --card-grad: linear-gradient(160deg, rgba(14, 38, 35, 0.88), rgba(6, 17, 16, 0.95));
  --line: rgba(66, 203, 176, 0.22);
  --line-2: rgba(229, 190, 109, 0.42);
  --text-hi: #f7eedc;
  --ink: #e2d9c6;
  --muted: #8fb2a8;
  --paper: #f7eedc;
  --accent: #e5be6d;
  --accent-ink: #0c1412;
  --accent-soft: rgba(66, 203, 176, 0.14);
  --spirit: #42cbb0;
  --spirit-soft: rgba(66, 203, 176, 0.16);
  --gold: #e5be6d;
  --vermilion: #c43324;
  --vermilion-soft: rgba(196, 51, 36, 0.20);
  --jade: #42cbb0;
  --danger: #d46a60;
  --mountain-color: #113832;
  --mountain-opacity: 0.95;

  --display: "Cinzel", "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --zh-serif: "Noto Serif SC", "ZCOOL XiaoWei", "Songti SC", "STSong", "SimSun", serif;
  --calligraphy: "Ma Shan Zheng", "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 4px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --press: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 28px 72px -34px rgba(4, 10, 9, 0.88);

  /* Five Element Mineral Pigments (中国传统矿物五行色) */
  --wx-wood: #5ca688;
  --wx-fire: #c95240;
  --wx-earth: #cfa14c;
  --wx-metal: #d9d4c7;
  --wx-water: #5691a8;
}

/* Per-Master Mineral Pigment Ambient Glow (Night · 青绿玄幻 — Luminous Emerald + Gold Spirit Mist) */
html[data-theme="night"][data-master="xuanwei"] { --accent: #e5be6d; --spirit: #42cbb0; --accent-soft: rgba(66, 203, 176, 0.14); }
html[data-theme="night"][data-master="xuanwei"] .ambient {
  background:
    radial-gradient(65% 48% at 72% 4%, rgba(54, 184, 158, 0.22), transparent 70%),
    radial-gradient(50% 42% at 22% 16%, rgba(229, 190, 109, 0.12), transparent 68%),
    radial-gradient(60% 45% at 14% 96%, rgba(30, 118, 104, 0.24), transparent 72%);
}

html[data-theme="night"][data-master="qingyi"] { --accent: #67d6bc; --spirit: #42cbb0; --accent-soft: rgba(66, 203, 176, 0.16); }
html[data-theme="night"][data-master="qingyi"] .ambient {
  background:
    radial-gradient(65% 48% at 72% 4%, rgba(66, 203, 176, 0.24), transparent 70%),
    radial-gradient(52% 42% at 12% 96%, rgba(229, 190, 109, 0.12), transparent 72%);
}

html[data-theme="night"][data-master="xingyuan"] { --accent: #7ec7d4; --spirit: #56b9c8; --accent-soft: rgba(86, 185, 200, 0.16); }
html[data-theme="night"][data-master="xingyuan"] .ambient {
  background:
    radial-gradient(65% 48% at 72% 4%, rgba(64, 168, 188, 0.22), transparent 70%),
    radial-gradient(52% 42% at 12% 96%, rgba(229, 190, 109, 0.13), transparent 72%);
}

html[data-theme="night"][data-master="hongxiu"] { --accent: #df9183; --spirit: #42cbb0; --accent-soft: rgba(223, 145, 131, 0.16); }
html[data-theme="night"][data-master="hongxiu"] .ambient {
  background:
    radial-gradient(65% 48% at 72% 4%, rgba(196, 68, 56, 0.18), transparent 70%),
    radial-gradient(52% 42% at 12% 96%, rgba(54, 184, 158, 0.18), transparent 72%);
}

/* Palette 1 (DEFAULT): 古宣 · 宋韵 (Antique Xuan Paper · Song Stone-Teal · Palace Cinnabar) */
html[data-theme="paper"] {
  color-scheme: light;
  --bg: #efe6d4;
  --surface: #f7f0e2;
  --surface-2: #e5d8c1;
  --deep: #fbf7ee;
  --bar-bg: rgba(239, 230, 212, 0.92);
  --pill-bg: rgba(247, 240, 226, 0.94);
  --card-grad: linear-gradient(180deg, rgba(248, 242, 229, 0.95), rgba(236, 225, 205, 0.96));
  --line: rgba(31, 79, 76, 0.20);
  --line-2: rgba(154, 108, 43, 0.42);
  --text-hi: #1b1713;
  --ink: #302820;
  --muted: #675a4b;
  --paper: #1b1713;
  --accent: #1e4f4b;
  --accent-ink: #fbf6ec;
  --accent-soft: rgba(30, 79, 75, 0.11);
  --gold: #9a6c2b;
  --vermilion: #a3291e;
  --vermilion-soft: rgba(163, 41, 30, 0.11);
  --jade: #225c53;
  --shadow: 0 22px 54px -28px rgba(48, 34, 18, 0.22);
  --mountain-color: #295750;
  --mountain-opacity: 0.26;
  --wx-wood: #236b4e; --wx-fire: #a83022; --wx-earth: #946319; --wx-metal: #586066; --wx-water: #1f5c78;
}
html[data-theme="paper"] .ambient {
  background:
    radial-gradient(64% 46% at 78% 0%, rgba(30, 79, 75, 0.10), transparent 70%),
    radial-gradient(52% 40% at 10% 10%, rgba(163, 41, 30, 0.06), transparent 66%),
    radial-gradient(75% 45% at 50% 100%, rgba(154, 108, 43, 0.10), transparent 72%);
}
html[data-theme="paper"] .scene-bar { background: var(--bar-bg); }

/* Palette 3: 红墙 · 宫阙 (Imperial Palace Vermilion · Ebony Lacquer · Palace Gold · Glazed Jade) */
html[data-theme="crimson"] {
  color-scheme: dark;
  --bg: #180d0c;
  --surface: #241412;
  --surface-2: #321b18;
  --deep: #110908;
  --bar-bg: rgba(24, 13, 12, 0.90);
  --pill-bg: rgba(36, 20, 18, 0.88);
  --card-grad: linear-gradient(180deg, rgba(40, 22, 19, 0.88), rgba(22, 12, 11, 0.95));
  --line: rgba(224, 183, 104, 0.22);
  --line-2: rgba(224, 183, 104, 0.42);
  --text-hi: #fbf0df;
  --ink: #eadbc6;
  --muted: #b89a8a;
  --paper: #fbf0df;
  --accent: #e0b768;
  --accent-ink: #1a0d0b;
  --accent-soft: rgba(224, 183, 104, 0.15);
  --gold: #e0b768;
  --vermilion: #c23526;
  --vermilion-soft: rgba(194, 53, 38, 0.22);
  --jade: #64a38d;
  --shadow: 0 28px 72px -34px rgba(10, 3, 2, 0.90);
  --mountain-color: #3a1a16;
  --mountain-opacity: 0.86;
  --wx-wood: #68b092; --wx-fire: #e0614c; --wx-earth: #e2b45e; --wx-metal: #dfd8cb; --wx-water: #6ba1b8;
}
html[data-theme="crimson"] .ambient {
  background:
    radial-gradient(62% 45% at 72% 0%, rgba(194, 53, 38, 0.22), transparent 72%),
    radial-gradient(48% 42% at 14% 94%, rgba(224, 183, 104, 0.14), transparent 72%);
}

/* Language Modes */
html[data-lang="en"] .zh-sub,
html[data-lang="en"] .hero-zh-sub,
html[data-lang="en"] .daily-cut-zh,
html[data-lang="en"] .choice-zh { display: none !important; }

/* Privacy Veil Mode (Luna) */
html[data-veil="on"] .card-portrait,
html[data-veil="on"] .series-card figure img,
html[data-veil="on"] .luna-home-image,
html[data-veil="on"] .mini-master-btn img { opacity: 0 !important; pointer-events: none; }
html[data-veil="on"] .avatar.has-img { background-image: none !important; color: var(--text-hi) !important; }

/* Typography Size Controls */
html[data-size="s"] .bubble { font-size: 16px; }
html[data-size="l"] .bubble { font-size: 20.5px; line-height: 1.92; }

*, *::before, *::after { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border-radius: 3px; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
}
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Ambient Layers + Classical Ink-Wash Shan-Shui Mountain Mist */
.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  transition: background 0.6s ease;
}
.ambient-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.34;
}
.guoxue-ink-backdrop {
  position: fixed; left: 0; right: 0; bottom: 0; height: 34vh; min-height: 220px;
  color: var(--mountain-color); pointer-events: none; z-index: 0; opacity: var(--mountain-opacity);
  transition: color 0.5s ease, opacity 0.5s ease;
}
.guoxue-ink-backdrop svg { width: 100%; height: 100%; display: block; }
.bg-bagua-ring {
  position: fixed; top: -74px; right: -74px; width: 340px; height: 340px;
  color: var(--gold); opacity: 0.14; pointer-events: none; z-index: 0;
}
.bg-bagua-ring svg { width: 100%; height: 100%; animation: baguaSpin 72s linear infinite; }
@keyframes baguaSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.masthead, .shell, .scene-bar { position: relative; z-index: 1; }

/* Museum-Grade Guoxue Buttons — Lacquer Plaques, Matte Antique Foil & Ink Slips */
.icon-button {
  background: var(--pill-bg);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 6px 12px;
  min-height: 36px;
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 210, 0.04);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.icon-button:hover { border-color: var(--accent); background: rgba(200, 164, 102, 0.12); color: var(--text-hi); }
.icon-button:active { transform: translateY(1px); }
.icon-button.compact { padding: 5px 10px; min-height: 32px; font-size: 12px; }

.primary, .btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #251f18, #17130f);
  border: 1px solid rgba(200, 164, 102, 0.72);
  border-radius: 3px;
  color: #f3dfb8;
  padding: 10px 20px;
  min-height: 42px;
  font: 600 13.5px/1.2 var(--serif);
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 3px rgba(12, 10, 12, 0.55), inset 0 0 0 4px rgba(200, 164, 102, 0.26);
  transition: border-color 0.22s, background 0.22s, color 0.22s, box-shadow 0.22s;
}
.primary:hover, .btn-primary:hover {
  border-color: #e2c286;
  background: linear-gradient(180deg, #32281d, #1f1912);
  color: #fff3da;
  box-shadow: inset 0 0 0 3px rgba(12, 10, 12, 0.45), inset 0 0 0 4px rgba(226, 194, 134, 0.48), 0 8px 24px -12px rgba(200, 164, 102, 0.45);
}
.primary:active, .btn-primary:active { transform: translateY(1px); }
.primary:disabled, .btn-primary:disabled { opacity: 0.52; cursor: wait; }

.btn-vermilion {
  position: relative;
  background: linear-gradient(180deg, #982b22, #741c15);
  border: 1px solid rgba(214, 178, 114, 0.62);
  border-radius: 3px;
  color: #faf0e4;
  padding: 10px 20px;
  min-height: 44px;
  font: 600 13.5px/1.2 var(--serif);
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 3px rgba(34, 8, 6, 0.45), inset 0 0 0 4px rgba(214, 178, 114, 0.28);
  transition: filter 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-vermilion:hover {
  filter: brightness(1.08);
  border-color: #e2c286;
  box-shadow: inset 0 0 0 3px rgba(34, 8, 6, 0.35), inset 0 0 0 4px rgba(226, 194, 134, 0.45), 0 8px 24px -12px rgba(158, 43, 34, 0.65);
}

.btn-outline-gold {
  background: var(--pill-bg);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--ink);
  padding: 9px 16px;
  min-height: 42px;
  font: 500 13px/1.2 var(--serif);
  letter-spacing: 0.06em;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn-outline-gold:hover { border-color: var(--accent); background: rgba(200, 164, 102, 0.12); color: var(--text-hi); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  padding: 7px 14px;
  font-size: 12.5px;
}
.btn-ghost:hover { border-color: var(--line-2); color: var(--text-hi); }
.danger { border-color: rgba(212, 106, 96, 0.5) !important; color: var(--danger) !important; background: transparent; padding: 8px 14px; border-radius: 3px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ==========================================================================
   MASTHEAD & LUNA EDITORIAL GLASS-DESK COVER (#discovery)
   ========================================================================== */
.masthead {
  max-width: 1340px;
  margin: 0 auto;
  padding: 18px 36px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
body:has(#experience:not([hidden])) .masthead { display: none; }

.brand-lockup {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.seal-chop {
  width: 34px; height: 34px;
  border-radius: 6px;
  border: 1.5px solid var(--vermilion);
  background: var(--vermilion-soft);
  color: var(--vermilion);
  font-family: var(--zh-serif);
  font-size: 18px; font-weight: 700;
  display: grid; place-items: center;
  transform: rotate(-3deg);
}
.brand-words { display: flex; flex-direction: column; line-height: 1.2; }
.brand { font: 600 15px var(--display); letter-spacing: 0.18em; color: var(--text-hi); }
.brand-words small { font-size: 10.5px; letter-spacing: 0.16em; color: var(--muted); }
.masthead-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.masthead-actions .icon-button { padding: 6px 11px; min-height: 36px; font-size: 12.5px; }

.shell { max-width: 1340px; margin: 0 auto; padding: 0 36px 56px; }
body:has(#experience:not([hidden])) .shell { max-width: 100%; padding: 0; }

/* Editorial 2-Column Hero Cover — Zero Overlap Across All Desktop & Tablet Widths */
.discovery { padding-top: 8px; }
.luna-home-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  margin: 8px 0 32px;
  position: relative;
  isolation: isolate;
}
.luna-home-scene { position: relative; min-width: 0; }
.luna-home-copy { position: relative; min-width: 0; z-index: 6; }

@media (min-width: 960px) {
  .luna-home-feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
    gap: clamp(28px, 3.2vw, 48px);
    align-items: center;
  }
  .luna-home-copy { grid-column: 1; grid-row: 1; width: 100%; max-width: none; }
  .luna-home-scene { grid-column: 2; grid-row: 1; width: 100%; }
}

.luna-home-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #141115;
  border: 1px solid rgba(200, 164, 102, 0.36);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9), inset 0 0 0 4px rgba(12, 11, 14, 0.55);
}
.luna-home-frame .luna-home-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.76) saturate(0.88);
  transition: filter 420ms var(--ease);
}
.luna-home-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 56% 74% at 30% 44%, rgba(255, 206, 134, 0.44), rgba(228, 160, 86, 0.22) 48%, transparent 80%),
    radial-gradient(ellipse 40% 44% at 50% 72%, rgba(255, 212, 146, 0.30), transparent 82%);
  opacity: 0;
  transition: opacity 460ms var(--ease);
}
.luna-home-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(0deg, rgba(12, 11, 15, 0.82), transparent 34%);
}
.luna-home-scene:has(#sanctuary-lamp:checked) .luna-home-image { filter: brightness(1.08) saturate(1.05); }
.luna-home-scene:has(#sanctuary-lamp:checked) .luna-home-frame::before { opacity: 1; }

.luna-home-frame figcaption {
  position: absolute; z-index: 3; right: 16px; bottom: 13px;
  display: grid; justify-items: end; gap: 2px;
  color: #f6ead8; font-size: 11px; letter-spacing: 0.12em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.luna-home-frame figcaption span:first-child { color: #e4c27a; font-size: 10px; }

.luna-lamp-input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.luna-lamp-target {
  position: absolute; z-index: 5; left: 26%; top: 47%;
  width: 84px; height: 112px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 0; background: transparent; cursor: pointer;
}

/* Minimal Obsidian Frosted Lantern Toggle (zero chunky keycap) */
.luna-lamp-control {
  position: absolute; z-index: 4; bottom: 14px; left: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(226, 190, 130, 0.30);
  background: rgba(14, 12, 18, 0.58);
  backdrop-filter: blur(10px);
  color: #f6ead8; font: 500 12px/1 var(--sans); letter-spacing: 0.08em;
  white-space: nowrap; cursor: pointer;
  transition: border-color 0.22s, background 0.22s, color 0.22s;
}
.luna-lamp-control:hover {
  border-color: var(--accent);
  background: rgba(24, 19, 16, 0.78);
}
.lamp-wick-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(226, 190, 130, 0.55);
  transition: background 0.25s, box-shadow 0.25s;
}
#sanctuary-lamp:checked + .luna-lamp-control {
  border-color: rgba(245, 206, 138, 0.65);
  background: rgba(34, 24, 14, 0.78);
  color: #ffe8c2;
}
#sanctuary-lamp:checked + .luna-lamp-control .lamp-wick-dot {
  background: #ffb74d;
  box-shadow: 0 0 8px #ffb74d, 0 0 14px rgba(255, 167, 38, 0.65);
}
@media (max-width: 879px) { .luna-lamp-control { left: 12px; bottom: 12px; } }
.luna-lamp-on { display: none; }
#sanctuary-lamp:checked + .luna-lamp-control .luna-lamp-off { display: none; }
#sanctuary-lamp:checked + .luna-lamp-control .luna-lamp-on { display: inline; }

/* Palace-Museum Cinnabar Lacquer & Antique-Gold Plaque CTAs (zero cheap keycaps) */
.guoxue-plaque-cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 0 20px 0 12px;
  border-radius: 3px;
  border: 1px solid rgba(212, 176, 112, 0.78);
  background: linear-gradient(180deg, #962920 0%, #6d1912 100%);
  color: #fbf0dc;
  font: 600 14.5px/1 var(--serif);
  letter-spacing: 0.09em;
  white-space: nowrap;
  box-shadow: inset 0 0 0 3px rgba(24, 6, 4, 0.42), inset 0 0 0 4px rgba(212, 176, 112, 0.34), 0 14px 32px -16px rgba(154, 42, 34, 0.72);
  transition: border-color 0.22s, filter 0.22s, transform 0.15s, box-shadow 0.22s;
}
.guoxue-plaque-cta:hover {
  border-color: #ebd09b;
  filter: brightness(1.07);
  box-shadow: inset 0 0 0 3px rgba(24, 6, 4, 0.34), inset 0 0 0 4px rgba(235, 208, 155, 0.55), 0 16px 36px -14px rgba(154, 42, 34, 0.85);
}
.guoxue-plaque-cta:active { transform: translateY(1px); }
.plaque-seal {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid rgba(235, 208, 155, 0.72);
  border-radius: 2px;
  background: rgba(20, 6, 5, 0.45);
  color: #ebd09b;
  font: 700 14px var(--zh-serif);
}
.plaque-arrow { color: #ebd09b; transition: transform 0.2s var(--ease); }
.guoxue-plaque-cta:hover .plaque-arrow { transform: translateX(3px); }

.guoxue-bronze-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 18px;
  border-radius: 3px;
  border: 1px solid rgba(200, 164, 102, 0.52);
  background: linear-gradient(180deg, #1d1a16, #131110);
  color: #ead3a6;
  font: 600 14px/1 var(--serif);
  letter-spacing: 0.07em;
  white-space: nowrap;
  box-shadow: inset 0 0 0 3px rgba(10, 9, 12, 0.55), inset 0 0 0 4px rgba(200, 164, 102, 0.18);
  transition: border-color 0.22s, background 0.22s, color 0.22s;
}
.guoxue-bronze-cta:hover {
  border-color: #e2c286;
  background: linear-gradient(180deg, #29231b, #191512);
  color: #fff2d6;
}

/* Vertical Classical Guoxue Epigraph along Cover Margin */
.guoxue-epigraph {
  display: none;
}
@media (min-width: 1400px) {
  .guoxue-epigraph {
    position: absolute; right: -30px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: row; align-items: center; gap: 8px;
    writing-mode: vertical-rl; white-space: nowrap;
    font: 500 12px/1 var(--zh-serif); letter-spacing: 0.34em;
    color: rgba(200, 164, 102, 0.48);
    pointer-events: none;
  }
  .guoxue-epigraph i { font-style: normal; opacity: 0.5; }
  .epigraph-seal {
    writing-mode: horizontal-tb;
    width: 20px; height: 20px; display: grid; place-items: center;
    border: 1px solid rgba(158, 43, 34, 0.72); border-radius: 2px;
    color: #c95246; font: 700 11px var(--zh-serif); letter-spacing: 0;
  }
}

/* Classical Chinese Woodblock Corner-Bracket Frame (古籍双框与铜角饰) */
.guoxue-frame, .artifact-stage, .remedy-prescription {
  border-radius: 4px !important;
  background-image:
    linear-gradient(to right, var(--accent) 10px, transparent 10px),
    linear-gradient(to bottom, var(--accent) 10px, transparent 10px),
    linear-gradient(to left, var(--accent) 10px, transparent 10px),
    linear-gradient(to bottom, var(--accent) 10px, transparent 10px),
    linear-gradient(to right, var(--accent) 10px, transparent 10px),
    linear-gradient(to top, var(--accent) 10px, transparent 10px),
    linear-gradient(to left, var(--accent) 10px, transparent 10px),
    linear-gradient(to top, var(--accent) 10px, transparent 10px);
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
  background-size: 12px 1.5px, 1.5px 12px;
  background-repeat: no-repeat;
}

.luna-home-index {
  display: flex; align-items: center; gap: 9px; margin: 0 0 12px;
  color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
}
.luna-home-index > span { width: 24px; height: 1px; background: currentColor; }
.luna-home-index i { font-style: normal; opacity: 0.5; }

#luna-home-title {
  margin: 0;
  font: 600 clamp(32px, 3.8vw, 54px)/1.12 var(--display);
  color: var(--text-hi);
  letter-spacing: 0.02em;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
}
.hero-zh-sub {
  margin: 8px 0 0;
  font-family: var(--zh-serif);
  font-size: 13.5px; letter-spacing: 0.2em;
  color: var(--accent);
}
.luna-home-hook {
  margin: 12px 0 16px;
  font: 400 clamp(14px, 1.15vw, 15.5px)/1.68 var(--sans);
  color: var(--muted);
  max-width: 52ch;
}

/* Daily Brutal Taoist Cut Card on Cover */
.daily-cut-card {
  margin: 0 0 18px;
  padding: 15px 17px;
  border-radius: 4px;
  border: 1px solid rgba(200, 164, 102, 0.28);
  border-left: 3px solid var(--vermilion);
  background-color: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
}
.daily-cut-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.daily-cut-top .eyebrow { margin: 2px 0 0; font-size: 10.5px; line-height: 1.45; }
.daily-cut-en { margin: 0; font: italic 600 17.5px/1.42 var(--serif); color: var(--text-hi); }
.daily-cut-zh { margin: 4px 0 0; font: 400 12.5px var(--zh-serif); color: var(--muted); letter-spacing: 0.06em; }

.mini-chip {
  padding: 4px 10px; min-height: 26px;
  border-radius: 2px;
  border: 1px solid rgba(200, 164, 102, 0.34);
  background: rgba(200, 164, 102, 0.08);
  color: var(--accent);
  font: 600 11.5px/1.2 var(--serif);
  letter-spacing: 0.04em;
  white-space: nowrap; flex-shrink: 0;
  transition: all 0.18s;
}
.mini-chip:hover { border-color: var(--accent); background: rgba(200, 164, 102, 0.2); color: #fff2d8; }

.luna-home-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.hero-quick-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero-link-pill {
  background: var(--pill-bg);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 7px 13px;
  min-height: 36px;
  border-radius: 3px;
  font: 500 12.5px/1 var(--serif);
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.hero-link-pill:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text-hi); }
.luna-hero-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.luna-home-other { color: var(--accent); text-underline-offset: 4px; }

/* Section 02-04: Classical Scroll Hairline Dividers (古籍卷首分隔) */
.luna-bookcase, .luna-reading-room {
  position: relative;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(200, 164, 102, 0.22);
}
.luna-bookcase::before, .luna-reading-room::before {
  content: "❖";
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 0 14px;
  background: var(--bg);
  color: rgba(200, 164, 102, 0.56);
  font-size: 12px;
}
.luna-home-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.luna-section-index { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; }
.luna-home-section-head h2 { margin: 0; font: 500 clamp(24px, 3vw, 38px)/1.2 var(--display); color: var(--text-hi); }
.luna-inline-note { font-size: 12.5px; color: var(--muted); }

.series-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 20px;
}
@media (max-width: 960px) { .series-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .series-cards { grid-template-columns: 1fr; } }

.series-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 0 0 18px;
  border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: none;
  text-align: left; color: inherit;
  transition: border-color 0.22s;
}
.series-card:hover { border-color: var(--accent); }
.series-card figure {
  margin: 0; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line);
}
.series-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block;
  transition: transform 0.55s var(--ease);
}
.series-card:hover img { transform: scale(1.04); }
.series-meta { padding: 14px 0 0; }
.series-meta span { display: block; font-size: 11px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.series-meta h3 { margin: 5px 0 4px; font: 600 20px/1.25 var(--serif); color: var(--text-hi); }
.series-card:hover .series-meta h3 { text-decoration: underline; text-underline-offset: 5px; }
.series-meta .series-zh { font-family: var(--zh-serif); font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.series-meta p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* Section 03: Five Artifacts Strip */
.artifact-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 960px) { .artifact-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .artifact-strip-grid { grid-template-columns: 1fr; } }

.artifact-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px 16px;
  border-radius: 4px;
  border: 1px solid rgba(200, 164, 102, 0.22);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: inset 0 0 0 3px rgba(12, 11, 14, 0.35), inset 0 0 0 4px rgba(200, 164, 102, 0.08);
  text-align: left;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}
.artifact-tile:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface-2); }
.tile-num { font: 600 11px var(--display); color: var(--vermilion); letter-spacing: 0.14em; }
.artifact-tile strong { font: 600 17px/1.3 var(--serif); color: var(--text-hi); }
.artifact-tile small { font-size: 12px; color: var(--muted); }

.luna-home-footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.luna-footer-wordmark { margin: 0 0 4px; font: 600 17px var(--display); color: var(--text-hi); letter-spacing: 0.14em; }
.luna-home-footer nav { display: flex; gap: 18px; align-items: center; }
.luna-home-footer a, .link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: none; font-size: 12.5px; cursor: pointer; }
.luna-home-footer a:hover, .link-btn:hover { text-decoration: underline; }

/* ==========================================================================
   VIEW 2: LUNA 2-COLUMN EDITORIAL SANCTUARY WORKSPACE (#experience)
   ========================================================================== */
.scene-bar {
  height: 58px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bar-bg);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.scene-back {
  background: transparent; border: 1px solid var(--line); padding: 6px 12px; min-height: 34px;
  color: var(--accent); font-size: 12.5px; white-space: nowrap;
}
.scene-back:hover { border-color: var(--accent); background: var(--accent-soft); }
.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background-color: var(--surface-2); border: 1px solid var(--line-2);
  background-size: cover; background-position: 50% 18%;
  color: transparent; font: 600 13px var(--zh-serif);
}
#scene-context { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.scene-bar-right { display: flex; align-items: center; gap: 7px; flex: none; }
.bar-pill {
  padding: 5px 11px; min-height: 32px; border-radius: 3px;
  border: 1px solid var(--line-2); background: var(--pill-bg);
  color: var(--accent); font-size: 12px; white-space: nowrap;
}
.bar-pill:hover { border-color: var(--accent); }

/* Desktop 2-Column Editorial Grid */
.conversation-layout {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  justify-content: center;
  column-gap: clamp(24px, 3.6vw, 56px);
  padding: 28px 28px 60px;
}

/* Left Sticky Master Column */
.character-card {
  position: sticky; top: 80px; align-self: start;
  max-height: calc(100dvh - 100px); overflow-y: auto; scrollbar-width: none;
  padding-bottom: 24px;
}
.character-card::-webkit-scrollbar { display: none; }

.card-portrait-frame { position: relative; margin-bottom: 18px; }
.card-portrait {
  display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 290px;
  object-fit: cover; object-position: 50% 18%;
  border-radius: 16px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: zoom-in;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.85);
  transition: transform 0.35s var(--ease);
}
.card-portrait:hover { transform: scale(1.015); }
.vertical-seal {
  position: absolute; right: 10px; bottom: 10px;
  writing-mode: vertical-rl;
  padding: 5px 4px; border-radius: 4px;
  border: 1px solid rgba(255, 224, 214, 0.45);
  background: rgba(182, 49, 34, 0.90); color: #fff6ef;
  font: 700 12px var(--zh-serif); letter-spacing: 0.14em;
}

.character-card h1,
.character-card #dossier-name { margin: 0; font: 600 clamp(22px, 2vw, 26px)/1.2 var(--display); color: var(--text-hi); letter-spacing: 0.02em; }
.dossier-zh-name { margin: 4px 0 0; font: 400 13.5px var(--zh-serif); color: var(--muted); letter-spacing: 0.08em; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.traits span { padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink); }
.character-card blockquote {
  margin: 18px 0 0; padding-left: 14px;
  border-left: 2px solid var(--accent);
  font: italic 16.5px/1.7 var(--serif); color: var(--text-hi);
}

/* Luna Bond Bar */
.ls-side-bond {
  margin-top: 18px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.ls-side-bond:hover { border-color: var(--accent); background: var(--surface-2); }
.ls-side-bond-row { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.ls-bond-bar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ls-bond-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--vermilion), var(--accent)); transition: width 0.35s var(--ease); }
.ls-bond-cta { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* Luna Memory Fact Timeline */
.fact-panel { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.fact-panel h2 { margin: 0 0 10px; font: 600 11px var(--sans); letter-spacing: 0.16em; color: var(--muted); }
.fact-list { font-size: 13px; line-height: 1.55; color: var(--ink); }
.fact-list .fact { position: relative; padding-left: 15px; margin: 0 0 9px; animation: factIn 0.35s var(--ease) both; }
.fact-list .fact::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.fact-empty { color: var(--muted); margin: 0; font-size: 12.5px; }
@keyframes factIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.master-switcher { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-master-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 11.5px; transition: all 0.18s;
}
.mini-master-btn img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.mini-master-btn:hover, .mini-master-btn.active { border-color: var(--accent); color: var(--text-hi); background: var(--accent-soft); }

/* Right Column: Hall Tabs, Stage, Continuous Story Stream */
.chat { min-width: 0; display: flex; flex-direction: column; }

.hall-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) {
  .hall-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hall-tabs::-webkit-scrollbar { display: none; }
}
.hall-tab {
  flex: none; padding: 6px 13px; border-radius: 3px;
  border: 1px solid var(--line); background: var(--pill-bg);
  color: var(--muted); font: 500 12.5px/1.2 var(--serif); letter-spacing: 0.05em;
  white-space: nowrap; transition: all 0.18s;
}
.hall-tab:hover { border-color: var(--line-2); color: var(--text-hi); }
.hall-tab.active {
  border-color: var(--accent);
  border-bottom: 2px solid var(--vermilion);
  background: rgba(200, 164, 102, 0.12);
  color: #f3dfb8; font-weight: 600;
}

/* Artifact / Chart Stage */
.artifact-stage {
  margin-bottom: 26px; padding: 20px; max-width: 100%; min-width: 0; overflow-x: hidden;
  border-radius: 18px; border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 240, 214, 0.08), var(--shadow);
  animation: factIn 0.35s var(--ease) both;
}
.scroll-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--line);
}
.scroll-title { margin: 0; font: 600 18px var(--serif); color: var(--accent); letter-spacing: 0.04em; }
.scroll-sub { font-size: 12px; color: var(--muted); }

/* Continuous Story Message Stream (Luna) */
.messages { display: flex; flex-direction: column; gap: 26px; padding-bottom: 16px; }
.bubble { margin: 0; font: 18px/1.82 var(--serif); color: var(--ink); animation: factIn 0.32s var(--ease) both; }
.bubble > small {
  display: block; margin: 0 0 8px;
  font: 600 11.5px var(--sans); letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase;
}
.message-text p { margin: 0; text-align: justify; }
.message-text p + p { margin-top: 0.78em; }
.message-text p.line { color: var(--text-hi); padding-left: 0.9em; border-left: 2px solid var(--line); font-size: 1.03em; }
.message-text strong { color: var(--accent); font-weight: 600; }
.zh-sub {
  display: block; margin-top: 4px;
  font: 400 13.5px/1.68 var(--zh-serif); color: var(--muted);
}

/* User Action Bubble (Luna right-aligned) */
.bubble.user-action { display: flex; flex-direction: column; align-items: flex-end; }
.bubble.user-action .message-text {
  max-width: 82%; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
  box-shadow: inset 2px 0 0 var(--accent);
  font: 14.5px/1.6 var(--sans); color: var(--text-hi); text-align: left;
}

/* Inline Luna Micro-Chips under Master Bubble */
.ls-bubble-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.ls-tool-chip {
  min-height: 30px; padding: 4px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font: 12px var(--sans); letter-spacing: 0.03em;
  transition: all 0.18s;
}
.ls-tool-chip:hover, .ls-tool-chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ls-tool-chip.highlight { border-color: color-mix(in srgb, var(--vermilion) 55%, var(--line)); color: var(--text-hi); }

.citations-drawer { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.citations-drawer summary { cursor: pointer; color: var(--jade); font-weight: 600; }
.citations-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.citation-item { padding: 9px 12px; border-radius: 10px; background: var(--surface); border-left: 2px solid var(--accent); white-space: pre-wrap; }
.citation-item strong { display: block; color: var(--accent); margin-bottom: 3px; }

/* Branching Choices Drawer & Pointer-Tracked Shimmer */
.choice-drawer { margin-top: 18px; }
.choices { display: grid; gap: 9px; }
.choice-btn {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; text-align: left; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text-hi);
  transition: border-color 0.2s, background 0.2s, transform 0.16s var(--press);
}
.choice-btn::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(240px circle at var(--studio-x, 50%) var(--studio-y, 50%), var(--accent-soft), transparent 70%);
  transition: opacity 0.25s;
}
.choice-btn:hover { border-color: var(--accent); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.choice-btn:hover::before { opacity: 1; }
.choice-btn:active { transform: scale(0.99); }
.choice-icon { font-size: 18px; flex: none; margin-top: 2px; }
.choice-body strong { display: block; font: 600 16px/1.4 var(--serif); color: var(--text-hi); }
.choice-zh { display: block; font: 400 12px var(--zh-serif); color: var(--accent); margin-top: 1px; }
.choice-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Composer */
.composer {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 12px 0 18px;
  position: sticky; bottom: 0; z-index: 4;
  background: linear-gradient(transparent, var(--bg) 26%);
}
.composer input {
  flex: 1; min-height: 48px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--deep); color: var(--text-hi); font-size: 14.5px;
}
.composer input::placeholder { color: var(--muted); }
.composer .primary { border-radius: 999px; padding: 10px 22px; min-height: 48px; }

/* ==========================================================================
   FORMS, CHARTS & 5 INTERACTIVE TAOIST ARTIFACTS
   ========================================================================== */
.ritual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
@media (max-width: 560px) { .ritual-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.field.full { grid-column: 1 / -1; }
.field input, .field select {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--deep); color: var(--text-hi); font-size: 14px;
}
.field input:user-invalid { border-color: var(--vermilion); }
.ritual-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.sub-tabs, .altar-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sub-tab, .altar-tab {
  padding: 6px 12px; border-radius: 3px; border: 1px solid rgba(200, 164, 102, 0.20);
  background: var(--deep); color: var(--muted); font: 500 12.5px/1.2 var(--serif); letter-spacing: 0.04em; transition: all 0.18s;
}
.sub-tab.active, .altar-tab.active, .altar-tab:hover {
  border-color: var(--accent);
  border-bottom: 2px solid var(--vermilion);
  background: var(--accent-soft);
  color: #f3dfb8; font-weight: 600;
}

/* Bazi 4 Pillars */
.bazi-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pillar-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--deep);
  transition: border-color 0.18s, transform 0.15s;
}
.pillar-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pillar-card.day-master { border-color: var(--accent); box-shadow: inset 0 0 18px var(--accent-soft); }
.pillar-label { font-size: 11px; color: var(--muted); }
.pillar-shishen { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.pillar-gz { display: flex; flex-direction: column; align-items: center; font: 700 28px/1.15 var(--zh-serif); margin: 4px 0; }
.wx-木 { color: var(--wx-wood); } .wx-火 { color: var(--wx-fire); } .wx-土 { color: var(--wx-earth); } .wx-金 { color: var(--wx-metal); } .wx-水 { color: var(--wx-water); }
.pillar-nayin, .pillar-hide { font-size: 10.5px; color: var(--muted); text-align: center; }

.wuxing-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.wx-bar-item { background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; text-align: center; font-size: 12px; }
.wx-track { height: 5px; border-radius: 99px; background: rgba(128,128,128,0.2); margin-top: 5px; overflow: hidden; }
.wx-fill { height: 100%; border-radius: 99px; }

.dayun-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.dayun-chip { flex: none; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); text-align: center; font-size: 11.5px; }
.dayun-chip.current { border-color: var(--vermilion); background: var(--vermilion-soft); }
.dayun-chip strong { display: block; font: 700 15px var(--zh-serif); color: var(--accent); }
.shensha-row, .qimen-meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag-pill { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); }
.tag-pill.highlight { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Qimen 3x3 LuoShu */
.qimen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qimen-cell {
  min-height: 112px; padding: 9px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep);
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  transition: border-color 0.18s, transform 0.15s;
}
.qimen-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.qimen-cell.center-cell { background: linear-gradient(135deg, var(--accent-soft), var(--deep)); border-style: dashed; }
.qimen-cell.is-zhifu { box-shadow: inset 0 0 0 1.5px var(--accent); }
.qimen-cell.is-zhishi { box-shadow: inset 0 0 0 1.5px var(--vermilion); }
.qm-top, .qm-mid, .qm-bot { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 12px; }
.qm-god { color: var(--jade); font-size: 11px; }
.qm-star { color: var(--accent); font: 600 13px var(--zh-serif); }
.qm-door { font: 700 15px var(--zh-serif); }
.qm-door.auspicious { color: var(--vermilion); }
.qm-stems { display: flex; flex-direction: column; align-items: flex-end; font: 700 14px/1.15 var(--zh-serif); }
.qm-flags { display: flex; gap: 3px; }
.qm-flag { font-size: 10px; padding: 0 4px; border-radius: 4px; background: var(--vermilion-soft); color: var(--vermilion); }
.qm-flag.gold { background: var(--accent-soft); color: var(--accent); }

/* Ziwei 12-Palace */
.ziwei-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(84px, auto)); gap: 6px; }
.zw-cell {
  padding: 7px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep);
  display: flex; flex-direction: column; justify-content: space-between; text-align: left; min-width: 0;
}
.zw-cell:hover { border-color: var(--accent); }
.zw-cell.is-ming { border-color: var(--vermilion); background: linear-gradient(180deg, var(--vermilion-soft), var(--deep)); }
.zw-center {
  grid-column: 2 / 4; grid-row: 2 / 4; border-radius: 12px; border: 1px dashed var(--line-2);
  background: radial-gradient(circle, var(--accent-soft), var(--deep));
  padding: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 4px;
}
.zw-center h4 { margin: 0; font: 600 16px var(--zh-serif); color: var(--accent); }
.zw-center p { margin: 0; font-size: 11px; color: var(--muted); }
.zw-stars { display: flex; flex-wrap: wrap; gap: 3px; font-size: 11px; }
.zw-major { color: var(--vermilion); font: 700 12px var(--zh-serif); }
.zw-minor { color: var(--jade); font-size: 10px; }
.zw-sihua { font-size: 9px; padding: 0 3px; border-radius: 3px; background: var(--vermilion); color: #fff; margin-left: 1px; }
.zw-footer { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 4px; border-top: 1px solid var(--line); padding-top: 3px; }
.zw-palace-name { color: var(--accent); font-weight: 600; }

/* Bamboo Stick Shaker & Match Score */
.shaker-stage, .altar-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 4px; }
.bamboo-tube { position: relative; width: 96px; height: 140px; cursor: pointer; margin-top: 12px; }
.bamboo-sticks { position: absolute; top: -18px; left: 14px; right: 14px; height: 44px; display: flex; justify-content: space-around; align-items: flex-end; }
.bamboo-stick { width: 7px; height: 42px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--vermilion) 0 10px, #e3c184 10px 100%); transform-origin: bottom center; }
.bamboo-stick:nth-child(1) { transform: rotate(-11deg); }
.bamboo-stick:nth-child(2) { transform: rotate(-5deg); height: 46px; }
.bamboo-stick:nth-child(3) { transform: rotate(2deg); height: 48px; }
.bamboo-stick:nth-child(4) { transform: rotate(8deg); }
.bamboo-stick:nth-child(5) { transform: rotate(13deg); height: 40px; }
.bamboo-body {
  position: absolute; bottom: 0; inset-inline: 0; height: 116px;
  border-radius: 14px 14px 20px 20px; border: 2px solid var(--accent);
  background: linear-gradient(90deg, #5d241b, #8d3424 45%, #561f16);
  display: grid; place-items: center; box-shadow: 0 12px 24px rgba(0,0,0,0.45);
}
.bamboo-label { writing-mode: vertical-rl; font: 700 19px var(--zh-serif); letter-spacing: 0.2em; color: var(--accent); border: 1px solid rgba(226,190,130,0.5); padding: 7px 4px; border-radius: 6px; }
.bamboo-tube.shaking { animation: tubeShake 0.16s infinite alternate ease-in-out; }
@keyframes tubeShake { 0% { transform: rotate(-8deg); } 100% { transform: rotate(8deg) translateY(-6px); } }

.stick-card { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; background: linear-gradient(180deg, var(--vermilion-soft), var(--deep)); text-align: center; }
.stick-stamp { display: inline-block; padding: 4px 14px; border: 2px solid var(--vermilion); border-radius: 6px; color: var(--vermilion); font: 700 15px var(--zh-serif); letter-spacing: 0.14em; transform: rotate(-2deg); margin-bottom: 10px; }
.stick-poem { font: 600 20px/1.85 var(--zh-serif); color: var(--accent); letter-spacing: 0.12em; margin: 8px 0 12px; }
.stick-note { font-size: 13px; color: var(--muted); margin: 4px 0; }

.match-hero { display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 14px; padding: 10px 0; }
.match-ring { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.match-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.match-score-text { text-align: center; line-height: 1.1; }
.match-score-text strong { display: block; font: 700 30px var(--display); color: var(--accent); }
.match-score-text span { font-size: 11.5px; color: var(--vermilion); font-weight: 600; }
.match-couple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: 1; min-width: 240px; }
.couple-box { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); font-size: 12px; }
.couple-box strong { display: block; font: 600 15px var(--serif); color: var(--accent); margin-bottom: 4px; }
.dim-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (max-width: 560px) { .dim-list { grid-template-columns: 1fr; } }
.dim-item { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); font-size: 12px; }
.dim-top { display: flex; justify-content: space-between; margin-bottom: 4px; font-weight: 600; }

/* 5 Playable Artifacts */
.incense-stage { position: relative; width: 220px; height: 175px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.incense-sticks-row { display: flex; align-items: flex-end; gap: 24px; margin-bottom: -8px; z-index: 2; }
.incense-stick-wrap { display: flex; flex-direction: column; align-items: center; }
.incense-smoke { width: 10px; height: 44px; border-radius: 50%; background: radial-gradient(circle, rgba(220,230,240,0.45), transparent 70%); filter: blur(3px); opacity: 0; }
.incense-stage.lit .incense-smoke { opacity: 1; animation: incenseSmoke 2.4s infinite ease-out; }
.incense-stick-wrap:nth-child(2) .incense-smoke { animation-delay: 0.4s; }
.incense-stick-wrap:nth-child(3) .incense-smoke { animation-delay: 0.8s; }
@keyframes incenseSmoke { 0% { transform: translateY(6px) scale(0.7); opacity: 0.7; } 100% { transform: translateY(-34px) translateX(-4px) scale(1.6); opacity: 0; } }
.incense-ember { width: 6px; height: 6px; border-radius: 50%; background: #6b5344; }
.incense-stage.lit .incense-ember { background: #ff5722; box-shadow: 0 0 10px #ff5722, 0 0 18px #ffb74d; }
.incense-body { width: 5px; height: 74px; border-radius: 2px; background: linear-gradient(180deg, #b88b4a, #7d5628); transition: height 0.6s ease; }
.incense-burner { width: 148px; height: 56px; border-radius: 14px 14px 36px 36px; border: 2px solid var(--accent); background: linear-gradient(135deg, #6b4e1d, #b88a3c 48%, #4d3512); display: grid; place-items: center; z-index: 3; }
.incense-burner span { font: 600 15px var(--zh-serif); letter-spacing: 0.2em; color: #fff3d6; }

.jiaobei-arena { display: flex; gap: 28px; padding: 18px 8px; perspective: 600px; }
.moon-block { width: 96px; height: 52px; border-radius: 90px 90px 18px 18px; border: 2px solid var(--accent); background: linear-gradient(135deg, #b82d1c, #7e190d); color: #ffe9c8; display: grid; place-items: center; font: 700 13px var(--sans); box-shadow: 0 10px 22px rgba(0,0,0,0.42); }
.moon-block.yang { background: linear-gradient(135deg, #e5b86e, #c6863d); color: #3a180d; border-radius: 18px 18px 90px 90px; }
.moon-block.tossing { animation: blockToss 0.65s ease-in-out infinite; }
@keyframes blockToss { 0% { transform: translateY(0) rotateX(0deg); } 50% { transform: translateY(-28px) rotateX(360deg) rotateZ(18deg); } 100% { transform: translateY(0) rotateX(720deg); } }

.coins-arena { display: flex; gap: 18px; padding: 14px 8px; perspective: 600px; }
.copper-coin { position: relative; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 32% 32%, #e8c776, #a87b2d 65%, #654714); border: 3px solid #f0d285; display: grid; place-items: center; color: #2f1f06; font: 700 11px var(--zh-serif); }
.copper-coin::after { content: ""; position: absolute; width: 18px; height: 18px; background: var(--deep); border: 2px solid #8a6420; }
.coin-top { position: absolute; top: 4px; } .coin-label { position: absolute; bottom: 4px; }
.copper-coin.spinning { animation: coinSpin 0.42s linear infinite; }
@keyframes coinSpin { 0% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg) translateY(-14px); } 100% { transform: rotateY(360deg); } }

.luopan-wrap { position: relative; width: 244px; height: 244px; cursor: pointer; }
.luopan-dial { width: 100%; height: 100%; transition: transform 1.5s var(--ease); }
.luopan-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 18px solid var(--vermilion); z-index: 4; }
.dir-grid { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dir-chip { padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); text-align: center; font-size: 11.5px; color: var(--muted); }
.dir-chip strong { display: block; color: var(--accent); font: 600 15px var(--serif); margin-top: 2px; }

.talisman-workspace { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 18px; width: 100%; }
.talisman-canvas { width: 215px; height: 350px; border-radius: 10px; border: 2px solid #9d301d; cursor: crosshair; touch-action: none; background: #eab949; box-shadow: 0 14px 32px rgba(0,0,0,0.5); }
.talisman-controls { flex: 1; min-width: 230px; display: flex; flex-direction: column; gap: 10px; }

.artifact-result-banner, .trigram-result-card {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--accent-soft); text-align: center;
}
.artifact-result-banner h4, .trigram-result-card h4 { margin: 0 0 4px; font: 600 18px var(--serif); color: var(--accent); }
.artifact-result-banner p, .trigram-result-card p { margin: 3px 0 0; font-size: 13px; color: var(--text-hi); }
.trigram-big-symbol { font-size: 40px; line-height: 1; color: var(--accent); }

/* ==========================================================================
   LUNA ILLUMINATED SETTINGS DRAWER & MODALS
   ========================================================================== */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 30;
  background: radial-gradient(75% 65% at 88% 18%, rgba(226, 190, 130, 0.12), rgba(8, 7, 10, 0.80) 68%);
  backdrop-filter: blur(8px);
  display: grid; place-items: stretch end;
  animation: hzBackdrop 240ms var(--ease) both;
}
.settings-drawer {
  position: relative; width: min(430px, 100%); height: 100%; overflow-y: auto;
  padding: 20px 24px calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(162deg, var(--surface-2) 0%, var(--surface) 45%, var(--bg) 100%);
  border-left: 1px solid var(--line-2);
  box-shadow: -26px 0 68px -14px rgba(0,0,0,0.82), inset 1px 0 0 rgba(255,238,214,0.14);
  animation: hzSheetRight 320ms var(--ease) both;
}
.drawer-grip { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font: 600 20px var(--display); color: var(--text-hi); letter-spacing: 0.06em; }
.settings-group { margin-top: 16px; padding: 15px 16px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line); animation: hzRowIn 260ms var(--ease) both; }
.settings-group h3 { margin: 0 0 6px; font: 600 11px var(--sans); letter-spacing: 0.16em; color: var(--accent); }
.settings-group p { margin: 6px 0 10px; font-size: 12.5px; color: var(--muted); }
.settings-drawer label { display: block; margin-top: 11px; font-size: 12.5px; color: var(--ink); }
.settings-drawer label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.settings-drawer input:not([type=checkbox]), .settings-drawer select {
  display: block; width: 100%; margin-top: 6px; min-height: 40px; padding: 8px 12px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--deep); color: var(--text-hi);
}
.settings-drawer input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.drawer-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.drawer-tools button:not(.primary):not(.danger) { background: transparent; border: 1px solid var(--line-2); padding: 8px 14px; }

.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.preset-chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--deep); color: var(--accent); font-size: 12px; }
.preset-chip.active, .preset-chip:hover { border-color: var(--accent); background: var(--accent-soft); }

.bookmark-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bookmark-row { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; padding-top: 8px; border-top: 1px solid var(--line); font: 13.5px/1.6 var(--serif); color: var(--text-hi); }

@keyframes hzBackdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes hzSheetRight { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes hzSheetUp { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes hzRowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Native <dialog> Modals */
dialog.xuan-dialog {
  width: min(94vw, 540px); max-height: 88dvh; padding: 0;
  border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden;
}
dialog.xuan-dialog.wide-dialog { width: min(96vw, 840px); }
dialog.xuan-dialog.share-dialog { width: min(96vw, 720px); }
dialog.xuan-dialog::backdrop { background: rgba(6, 5, 8, 0.78); backdrop-filter: blur(6px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h3 { margin: 0; font: 600 17px var(--display); color: var(--text-hi); }
.dialog-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); }
.dialog-body { padding: 18px 20px; overflow-y: auto; max-height: calc(88dvh - 64px); }
.dialog-desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

/* Subtext Modal */
.snoop-dialog { background: linear-gradient(155deg, #221c20, #151218); }
html[data-theme="paper"] .snoop-dialog { background: linear-gradient(155deg, #fff8ee, #f4e8d6); }
.subtext-think { padding: 12px 14px; border-radius: 12px; background: var(--deep); border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--muted); }
.subtext-think summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.subtext-para { margin: 0; color: var(--ink); line-height: 1.7; }
.subtext-whisper-box { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--line-2); }
.subtext-whisper { margin: 0; font: italic 600 18px/1.65 var(--serif); color: var(--text-hi); }

/* Offerings Modal */
.offering-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); margin-bottom: 10px;
}
.offering-diary { margin-top: 14px; padding: 14px 16px; border-radius: 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.offering-diary h4 { margin: 0 0 6px; font: 600 16px var(--serif); color: var(--accent); }

/* 9:16 Share Studio */
.share-studio-layout { display: grid; grid-template-columns: 270px 1fr; gap: 20px; align-items: start; }
@media (max-width: 640px) { .share-studio-layout { grid-template-columns: 1fr; } }
.share-preview-wrap { display: grid; place-items: center; }
.share-preview-canvas { width: 256px; height: 455px; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.share-controls { display: flex; flex-direction: column; gap: 12px; }

/* Books & Journal Modals */
.books-layout { display: grid; grid-template-columns: 230px 1fr; gap: 14px; min-height: 54dvh; }
@media (max-width: 660px) { .books-layout { grid-template-columns: 1fr; } }
.books-list { display: flex; flex-direction: column; gap: 6px; }
.book-btn { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); text-align: left; }
.book-btn.active, .book-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.book-btn strong { display: block; font-size: 13px; color: var(--accent); }
.book-btn small { font-size: 11px; color: var(--muted); }
.book-reader { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); font-size: 13px; white-space: pre-wrap; line-height: 1.75; overflow-y: auto; max-height: 60dvh; }

.rank-card { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); margin-bottom: 14px; }
.rank-card h4 { margin: 2px 0 0; font: 600 18px var(--serif); color: var(--accent); }
.sub-heading { margin: 12px 0 8px; font-size: 12px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.badge-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.seal-badge { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--vermilion); background: var(--vermilion-soft); font-size: 12px; }
.history-list { display: flex; flex-direction: column; gap: 7px; }
.history-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); text-align: left; }
.history-row:hover { border-color: var(--accent); }

/* Cinema Lightbox & Toast */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(5, 4, 7, 0.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92dvh; border-radius: 14px; box-shadow: 0 30px 90px rgba(0,0,0,0.85); }
.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(14px);
  z-index: 70; padding: 9px 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--accent);
  color: var(--text-hi); font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   MOBILE RESPONSIVENESS (Luna Seamless Bottom Mask & Sheet Geometry)
   ========================================================================== */
@media (max-width: 879px) {
  .masthead { padding: 14px 16px 8px; }
  .shell { padding: 0 16px 40px; }
  .luna-home-feature { gap: 18px; }
  .luna-home-frame figcaption { top: 10px; right: 12px; bottom: auto; }
  .scene-bar { height: auto; min-height: 48px; padding: 7px 10px; gap: 6px; flex-wrap: wrap; }
  .scene-bar #scene-context, .scene-bar .avatar { display: none; }
  .scene-bar-right { gap: 5px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .scene-bar .bar-pill, .scene-bar .icon-button.compact { padding: 4px 8px; font-size: 11.5px; }
  .scene-back { padding: 5px 9px; font-size: 12px; }
  .conversation-layout { grid-template-columns: 1fr; padding: 16px 16px 40px; gap: 20px; }
  .character-card {
    position: static; max-height: none; overflow: visible; max-width: 100%;
    padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  }
  .card-portrait-frame { float: right; width: 102px; margin: 0 0 10px 14px; }
  .card-portrait { aspect-ratio: 3 / 4; max-height: 136px; border-radius: 12px; }
  .character-card h1,
  .character-card #dossier-name { font-size: 24px; }
  .character-card blockquote { clear: both; font-size: 15px; margin-top: 12px; }
  .master-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mini-master-btn { width: 100%; justify-content: flex-start; }
  .artifact-stage { padding: 14px 12px; }
  .bazi-pillars { gap: 5px; }
  .pillar-card { padding: 9px 3px; }
  .pillar-gz { font-size: 22px; }
  .wuxing-bars { gap: 4px; }
  .wx-bar-item { padding: 5px 2px; font-size: 10px; }

  .choice-drawer {
    position: sticky; bottom: 0; z-index: 4;
    margin: 14px -16px 0; padding: 24px 16px 12px;
    background: linear-gradient(to bottom, transparent, var(--bg) 26px);
  }
  .drawer-backdrop { place-items: end stretch; }
  .settings-drawer {
    width: 100%; height: 86dvh; border-left: 0; border-top: 1px solid var(--line-2);
    border-radius: 20px 20px 0 0; animation: hzSheetUp 300ms var(--ease) both;
  }
  .drawer-grip { display: block; width: 42px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 0 auto 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-bagua-ring svg, .bamboo-tube.shaking, .incense-smoke, .moon-block.tossing, .copper-coin.spinning, [data-home-key] .luna-home-keycap, .taiji-breath-orb {
    animation: none !important; transition: none !important;
  }
}

/* ==========================================================================
   INTERACTIVE RITUALS: Quest HUD, 3D Flip Fate Cards, Hold-to-Charge, Taiji Orb
   ========================================================================== */
.quest-hud { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.quest-hud-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.quest-stats-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.quest-trial-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 8px; }
.quest-ending-card { padding: 18px; border-radius: 14px; border: 1px solid var(--accent); background: linear-gradient(155deg, var(--accent-soft), var(--deep)); text-align: center; }
.quest-ending-card h3 { margin: 6px 0 4px; font: 700 22px var(--display); color: var(--text-hi); }
.quest-ending-quote { margin: 10px 0 6px; font: italic 18px/1.6 var(--serif); color: var(--text-hi); }
.quest-ending-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* 3D Flip Fate Cards */
.fate-deck-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 540px; padding: 10px 0; }
@media (max-width: 480px) { .fate-deck-row { gap: 8px; } }
.fate-card-3d {
  perspective: 1000px; background: none; border: 0; padding: 0;
  aspect-ratio: 2 / 3; min-height: 180px; cursor: pointer;
  transition: transform 0.25s var(--ease), opacity 0.35s;
}
.fate-card-3d:not(.is-flipped):hover { transform: translateY(-6px) rotate(-1deg); }
.fate-card-3d.is-dimmed { opacity: 0.42; pointer-events: none; }
.fate-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform 0.72s var(--ease);
}
.fate-card-3d.is-flipped .fate-card-inner { transform: rotateY(180deg); }
.fate-card-back, .fate-card-front {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 14px; border: 1.5px solid var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 14px 8px; text-align: center; box-shadow: 0 14px 32px rgba(0,0,0,0.45);
}
.fate-card-back {
  background:
    radial-gradient(circle at 50% 42%, rgba(66, 203, 176, 0.2), transparent 64%),
    linear-gradient(165deg, #0d2623, #050f0e 86%);
  color: var(--gold);
  box-shadow: inset 0 0 0 4px rgba(229, 190, 109, 0.14), 0 14px 32px rgba(0,0,0,0.48);
}
.fate-card-num { font: 600 12px var(--display); letter-spacing: 0.2em; opacity: 0.8; }
.fate-card-bagua { font-size: 46px; line-height: 1; text-shadow: 0 0 18px rgba(226,190,130,0.45); }
.fate-card-label { font: 600 10px var(--display); letter-spacing: 0.24em; opacity: 0.75; }
.fate-card-front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--surface-2), var(--deep));
  color: var(--text-hi);
}
.fate-front-el { font-size: 10px; color: var(--vermilion); letter-spacing: 0.08em; }
.fate-front-glyph { font: 700 34px var(--zh-serif); color: var(--accent); line-height: 1.1; }
.fate-card-front strong { font: 600 11.5px/1.3 var(--display); color: var(--text-hi); }
.fate-card-front small { font: 400 11px var(--zh-serif); color: var(--muted); }

/* Hold-to-Kindle Charge Meter & Step-by-Step Coin Lines */
.charge-wrap { width: 100%; max-width: 300px; text-align: center; }
.charge-track { height: 8px; border-radius: 99px; background: var(--deep); border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; }
.charge-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--vermilion), var(--accent)); transition: width 0.06s linear; }
.yao-stack { display: flex; flex-direction: column-reverse; gap: 7px; width: 180px; margin: 4px 0; }
.yao-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.yao-bar { flex: 1; height: 9px; display: flex; gap: 12px; }
.yao-bar.yang::before { content: ""; flex: 1; background: var(--accent); border-radius: 3px; }
.yao-bar.yin::before, .yao-bar.yin::after { content: ""; flex: 1; background: var(--accent); border-radius: 3px; }
.yao-bar.moving::before, .yao-bar.moving::after { background: var(--vermilion); }

/* Interactive Taiji Breathing Mandala */
.taiji-breath-orb {
  position: relative;
  width: 172px; height: 172px; border-radius: 50%; margin: 16px 0;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 50% 50%, rgba(66, 203, 176, 0.24), rgba(11, 28, 26, 0.92) 66%, #061110 100%);
  display: grid; place-items: center;
  box-shadow: inset 0 0 28px rgba(66, 203, 176, 0.2), 0 0 38px rgba(66, 203, 176, 0.22);
  transition: transform 3.1s ease-in-out, box-shadow 3.1s ease-in-out;
}
.taiji-breath-orb::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(229, 190, 109, 0.42);
  animation: slowSpin 28s linear infinite;
}
.taiji-glyph { font-size: 68px; color: var(--gold); line-height: 1; text-shadow: 0 0 20px rgba(229, 190, 109, 0.45); }
.taiji-breath-orb.inhale { transform: scale(1.22); box-shadow: inset 0 0 38px rgba(66, 203, 176, 0.36), 0 0 60px rgba(66, 203, 176, 0.48); }
.taiji-breath-orb.hold { transform: scale(1.22); box-shadow: inset 0 0 42px rgba(229, 190, 109, 0.35), 0 0 68px rgba(229, 190, 109, 0.45); }
.taiji-breath-orb.exhale { transform: scale(0.92); box-shadow: 0 0 18px rgba(66, 203, 176, 0.14); }

/* ==========================================================================
   CEREMONIAL DIVINATION TRANSITION & CONSECRATED BLESSING RELICS BOUTIQUE
   ========================================================================== */
.ceremony-overlay {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 28px 16px;
}
.ceremony-seal-ring {
  width: 84px; height: 84px; border-radius: 50%;
  border: 2px solid var(--accent);
  background: radial-gradient(circle, var(--accent-soft), var(--deep));
  display: grid; place-items: center;
  box-shadow: 0 0 32px rgba(226, 190, 130, 0.35);
  animation: slowSpin 6s linear infinite;
}
.ceremony-glyph { font-size: 40px; color: var(--accent); line-height: 1; }
.ceremony-title { margin: 0; font: 600 20px var(--display); color: var(--text-hi); }
.ceremony-steps {
  list-style: none; margin: 10px 0 0; padding: 0; width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.ceremony-step {
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--deep); font-size: 12.5px; color: var(--muted); opacity: 0.55;
  transition: all 0.28s var(--ease);
}
.ceremony-step.active { opacity: 1; border-color: var(--accent); color: var(--text-hi); background: var(--accent-soft); }
.ceremony-step.done { opacity: 0.92; border-color: var(--jade); color: var(--jade); }
.ceremony-step.done::after { content: " ✓"; font-weight: 700; }

.purify-strip {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 12px;
  border: 1px dashed var(--line-2); background: linear-gradient(90deg, var(--accent-soft), transparent);
}
.purify-copy { display: flex; flex-direction: column; gap: 2px; min-width: 200px; flex: 1; }
.purify-copy strong { font: 600 12.5px var(--sans); color: var(--accent); letter-spacing: 0.05em; }
.purify-status { font-size: 12px; color: var(--muted); }
.purify-btn.is-purified { border-color: var(--jade); color: var(--jade); background: rgba(79, 138, 110, 0.14); }

/* Master's Prescribed Remedy Card inside Readings */
.remedy-prescription {
  margin-top: 16px; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(226, 190, 130, 0.08), var(--deep) 68%);
}
.remedy-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.remedy-heading { margin: 0; font: 600 17px var(--serif); color: var(--text-hi); }
.remedy-diagnosis { margin: 4px 0 4px; font-size: 13px; color: var(--ink); line-height: 1.55; }
.remedy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .remedy-grid { grid-template-columns: 1fr; } }
.remedy-card {
  display: flex; flex-direction: column; gap: 8px; padding: 13px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.2s, transform 0.18s;
}
.remedy-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.remedy-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.remedy-match-pill { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 999px; background: rgba(79, 138, 110, 0.18); color: #7ed4ab; border: 1px solid rgba(126, 212, 171, 0.35); }
.remedy-price { font: 700 16px var(--display); color: var(--accent); }
.remedy-title-row { display: flex; align-items: flex-start; gap: 10px; }
.remedy-icon { font-size: 24px; line-height: 1.1; }
.remedy-title-row h5 { margin: 0; font: 600 14.5px/1.3 var(--serif); color: var(--text-hi); }
.remedy-title-row small { font-size: 11.5px; color: var(--muted); }
.remedy-reason { margin: 0; font-size: 12.5px; color: var(--ink); line-height: 1.45; }
.remedy-card-actions { margin-top: auto; padding-top: 4px; }
.remedy-cta { width: 100%; font-size: 12.5px; padding: 9px 12px; }

/* Boutique & Cover Showcase */
.boutique-grid, .relic-preview-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.relic-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .relic-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .boutique-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .relic-preview-grid, .boutique-grid { grid-template-columns: 1fr; } }
.boutique-card {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border-radius: 4px; border: 1px solid rgba(200, 164, 102, 0.24); background: var(--deep);
  box-shadow: inset 0 0 0 3px rgba(10, 9, 12, 0.45), inset 0 0 0 4px rgba(200, 164, 102, 0.08);
  transition: border-color 0.2s, transform 0.2s;
}
.boutique-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.boutique-card-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.boutique-badge { font-size: 10.5px; letter-spacing: 0.08em; color: var(--accent); padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); }
.boutique-card h4 { margin: 2px 0 0; font: 600 16px/1.35 var(--serif); color: var(--text-hi); }
.boutique-zh { margin: 0; font: 400 12.5px var(--zh-serif); color: var(--accent); }
.boutique-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.boutique-meta { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); padding: 8px 0; border-top: 1px dashed var(--line); margin-top: 4px; }

.consecration-cert {
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--vermilion);
  background: linear-gradient(155deg, rgba(201, 68, 52, 0.12), var(--deep));
}
.consecration-cert h4 { margin: 4px 0 6px; font: 700 16px var(--zh-serif); color: var(--accent); }
.cert-line { margin: 3px 0; font-size: 13px; color: var(--text-hi); }

.bag-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bag-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); }
.bag-summary { padding-top: 12px; border-top: 1px solid var(--line-2); }
.bag-total-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }

/* ==========================================================================
   SEEKER NATAL DOSSIER, SAYLO EDITABLE MEMORY & ENSEMBLE MASTER COUNCIL
   ========================================================================== */
.dossier-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.dossier-summary-head strong { font: 600 13px var(--serif); color: var(--text-hi); }
.dossier-pillars-line {
  font: 700 14px var(--zh-serif); letter-spacing: 0.08em; color: var(--accent);
  padding: 6px 8px; border-radius: 8px; background: var(--deep); border: 1px solid var(--line);
  text-align: center; margin-bottom: 8px;
}
.dossier-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.dossier-pills .tag-pill { font-size: 10.5px; padding: 2px 7px; }
.dossier-quick-links { display: flex; flex-wrap: wrap; gap: 5px; }

.user-mem-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.user-mem-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 8px; border-radius: 8px; background: var(--deep); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink);
}
.user-mem-del { background: none; border: 0; color: var(--muted); font-size: 11px; padding: 0 3px; cursor: pointer; }
.user-mem-del:hover { color: var(--vermilion); }
.user-mem-form { display: flex; gap: 6px; }
.user-mem-input {
  flex: 1; min-width: 0; padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--deep); color: var(--text-hi); font-size: 11.5px;
}

.council-bar {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--deep);
  display: flex; flex-direction: column; gap: 10px;
}
.engine-proof-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); }
.engine-dot { font-weight: 700; color: #7ed4ab; letter-spacing: 0.06em; }
.engine-proof-line code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--accent); background: var(--surface); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); }
.council-row-wrap { display: flex; flex-direction: column; gap: 7px; }
.council-label { font-size: 12px; color: var(--ink); font-weight: 600; }
.council-btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.council-chip { font-size: 12px; padding: 5px 10px; }

.choice-group-label {
  grid-column: 1 / -1; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase; margin: 4px 0 0;
}

/* Iconic Master Card Seals, Hooks & Taboos */
.series-card figure { position: relative; }
.series-seal-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 7px; border-radius: 5px;
  border: 1.5px solid rgba(226, 190, 130, 0.72);
  background: rgba(145, 28, 20, 0.88);
  color: #fcebd1; font: 700 12px var(--zh-serif); letter-spacing: 0.16em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}
.series-hook { margin: 4px 0 6px; font-size: 12.5px; line-height: 1.48; color: var(--ink); }
.series-prop { font-size: 11px; color: var(--accent); margin-bottom: 6px; font-weight: 600; }
.series-taboo {
  padding: 6px 8px; border-radius: 8px;
  border-left: 2.5px solid var(--vermilion);
  background: rgba(201, 68, 52, 0.1);
  font-size: 11px; line-height: 1.4; color: var(--text-hi);
}
.master-taboo-box {
  margin-top: 8px; padding: 8px 10px; border-radius: 9px;
  border-left: 2.5px solid var(--vermilion);
  background: rgba(201, 68, 52, 0.1);
  font-size: 11.5px; line-height: 1.48; color: var(--ink);
}

/* ==========================================================================
   60FPS TAOIST RITUAL VFX, LIVING HERO CANVAS & MASTER ENTRANCE FX
   ========================================================================== */
.hero-fx-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none; border-radius: 16px;
}
.master-fx-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none; border-radius: 16px;
}
.vfx-burst-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 95; pointer-events: none;
}

.vfx-stage-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: radial-gradient(circle at 50% 46%, rgba(20, 16, 26, 0.90), rgba(7, 6, 10, 0.97) 75%);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: clamp(44px, 9vh, 96px);
  animation: vfxFadeIn 0.22s var(--ease) both;
}
.vfx-stage-overlay.vfx-fade-out { opacity: 0; transition: opacity 0.26s ease; pointer-events: none; }
.vfx-stage-overlay.vfx-shake { animation: vfxMicroShake 0.24s ease-out; }
@keyframes vfxFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vfxMicroShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-3px, 3px, 0); }
  55% { transform: translate3d(3px, -2px, 0); }
  80% { transform: translate3d(-1px, 1px, 0); }
}

.vfx-stage-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.vfx-stage-canvas.interactive { pointer-events: auto; cursor: crosshair; touch-action: none; }
.vfx-seal-pad-wrap { margin-top: 10px; display: flex; justify-content: center; }
.vfx-seal-pad {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 170px; padding: 10px 18px; border-radius: 4px;
  border: 1px solid rgba(214, 178, 114, 0.72);
  background: linear-gradient(180deg, #982b22, #6f1912);
  color: #fff3e2; cursor: pointer; user-select: none; touch-action: none;
  box-shadow: inset 0 0 0 3px rgba(24, 6, 4, 0.42), 0 10px 28px -10px rgba(158, 43, 34, 0.75);
  transition: transform 0.14s, filter 0.2s;
}
.vfx-seal-pad.holding { transform: scale(0.97); filter: brightness(1.12); }
.vfx-seal-pad strong { font: 700 20px/1 var(--zh-serif); color: #f6e0b4; }
.vfx-seal-pad small { font-size: 11px; letter-spacing: 0.08em; color: rgba(255, 240, 220, 0.88); }
.vfx-seal-ring {
  position: absolute; left: 0; bottom: 0; height: 3px;
  width: var(--hold-pct, 0%);
  background: linear-gradient(90deg, #e8c47a, #fff0c8);
  transition: width 0.04s linear;
}

/* Five-Element Weather Switcher in Left Sidebar */
.weather-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.weather-chip {
  padding: 4px 8px; border-radius: 3px;
  border: 1px solid var(--line); background: var(--deep);
  color: var(--muted); font: 500 11px/1.2 var(--zh-serif);
  transition: all 0.18s;
}
.weather-chip:hover { border-color: var(--accent); color: var(--text-hi); }
.weather-chip.active {
  border-color: var(--accent);
  border-bottom: 2px solid var(--vermilion);
  background: var(--accent-soft);
  color: #f3dfb8; font-weight: 700;
}

/* ==========================================================================
   PALACE-MUSEUM GUOXUE POLISH: Relic Studio Photos, Carved Seals,
   Woodblock Charts, Collapsible Sidebar & Xuan-Paper Light Mode Parity
   ========================================================================== */
.btn-seal-mini, .bronze-mark {
  display: inline-grid; place-items: center;
  width: 19px; height: 19px; margin-right: 5px;
  border-radius: 2px; border: 1px solid rgba(200, 164, 102, 0.55);
  background: rgba(158, 43, 34, 0.24); color: var(--accent);
  font: 700 11px/1 var(--zh-serif); vertical-align: -1px;
}
.guoxue-bronze-cta { gap: 8px; }
.guoxue-bronze-cta .bronze-mark { margin-right: 0; width: 22px; height: 22px; font-size: 12px; }

/* Dark-Luxury 4:3 Relic Product Photography Frame */
.relic-photo-frame {
  position: relative; margin: 0 0 6px; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 3px; border: 1px solid rgba(200, 164, 102, 0.28);
  background: #0d0c10;
}
.relic-photo-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.55s var(--ease);
}
.boutique-card:hover .relic-photo-frame img { transform: scale(1.045); }
.relic-seal-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 2px; border: 1px solid rgba(235, 208, 155, 0.65);
  background: rgba(145, 30, 22, 0.88); color: #fff2de;
  font: 700 12px var(--zh-serif);
}
.relic-price-tag {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 2px;
  border: 1px solid rgba(200, 164, 102, 0.55);
  background: rgba(12, 11, 15, 0.82); backdrop-filter: blur(6px);
  color: #f3dfb8; font: 700 13.5px var(--display);
}
.remedy-thumb {
  width: 56px; height: 42px; flex: none; object-fit: cover;
  border-radius: 3px; border: 1px solid rgba(200, 164, 102, 0.36);
}
.remedy-seal-glyph {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 2px; border: 1px solid var(--accent);
  background: var(--vermilion-soft); color: var(--accent);
  font: 700 16px var(--zh-serif);
}

/* Collapsible Sidebar Sections for Serene Breathing Room */
.side-fold summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font: 600 11px var(--sans); letter-spacing: 0.16em; color: var(--muted);
  user-select: none; transition: color 0.18s;
}
.side-fold summary::-webkit-details-marker { display: none; }
.side-fold summary::after {
  content: "▸"; color: var(--accent); font-size: 11px; transition: transform 0.2s var(--ease);
}
.side-fold[open] summary { color: var(--accent); }
.side-fold[open] summary::after { transform: rotate(90deg); }
.side-fold-body { margin-top: 10px; }

/* Woodblock-Engraved Chart Plate Refinement */
.pillar-card, .qimen-cell, .zw-cell, .stick-card, .remedy-card {
  border-radius: 3px !important;
  box-shadow: inset 0 0 0 2.5px rgba(10, 9, 12, 0.36), inset 0 0 0 3.5px rgba(200, 164, 102, 0.08);
}
.pillar-card.day-master, .zw-cell.is-ming {
  border-color: var(--vermilion);
  box-shadow: inset 0 0 0 2.5px rgba(158, 43, 34, 0.25), inset 0 0 18px rgba(158, 43, 34, 0.12);
}

/* Aged Xuan Paper (Light Theme) Parity for All Guoxue Elements */
html[data-theme="paper"] .icon-button,
html[data-theme="paper"] .hero-link-pill,
html[data-theme="paper"] .hall-tab,
html[data-theme="paper"] .bar-pill,
html[data-theme="paper"] .btn-outline-gold {
  background: rgba(251, 247, 239, 0.92);
  border-color: rgba(132, 96, 52, 0.32);
  color: #2b2118;
}
html[data-theme="paper"] .hall-tab.active,
html[data-theme="paper"] .altar-tab.active,
html[data-theme="paper"] .weather-chip.active {
  background: rgba(154, 96, 42, 0.14);
  color: #5c3210;
  border-color: #9a602a;
  border-bottom: 2px solid #9e2b22;
}
html[data-theme="paper"] .primary,
html[data-theme="paper"] .btn-primary,
html[data-theme="paper"] .guoxue-bronze-cta {
  background: linear-gradient(180deg, #3a2d20, #251c14);
  color: #fbf2e0;
  border-color: #9a602a;
}
html[data-theme="paper"] .pillar-card,
html[data-theme="paper"] .qimen-cell,
html[data-theme="paper"] .zw-cell,
html[data-theme="paper"] .boutique-card,
html[data-theme="paper"] .remedy-card,
html[data-theme="paper"] .artifact-tile {
  box-shadow: inset 0 0 0 2.5px rgba(244, 238, 227, 0.85), inset 0 0 0 3.5px rgba(132, 96, 52, 0.16);
}
html[data-theme="paper"] .luna-bookcase::before,
html[data-theme="paper"] .luna-reading-room::before {
  background: var(--bg); color: #9a602a;
}
.vfx-stage-hud {
  position: relative; z-index: 2; text-align: center; padding: 0 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.vfx-phase-pill {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--accent); padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(18, 15, 22, 0.8);
}
.vfx-title { margin: 4px 0 0; font: 600 clamp(20px, 2.6vw, 30px)/1.2 var(--display); color: #fbf5ec; }
.vfx-sub { margin: 0; font: 400 14px var(--zh-serif); letter-spacing: 0.18em; color: var(--muted); }
.vfx-skip-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 92;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(16, 14, 22, 0.72);
  color: var(--muted); font-size: 12px; cursor: pointer;
}
.vfx-skip-btn:hover { border-color: var(--accent); color: var(--text-hi); }

/* Staggered lacquered reveal on newly cast pillars & palaces */
.pillar-card, .qimen-cell, .zw-cell {
  animation: chartStampIn 0.42s var(--ease) both;
}
.pillar-card:nth-child(2) { animation-delay: 65ms; }
.pillar-card:nth-child(3) { animation-delay: 130ms; }
.pillar-card:nth-child(4) { animation-delay: 195ms; }
@keyframes chartStampIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   BENCHMARK UPGRADES: Xuan-Paper Silk Grain, Calligraphy Marks, 3-Step Trust
   Scroll, Sample Destiny Book, Unknown Hour, Deep-Chapter Blur Unseal,
   Consecration Proof & Ritual Bundles, Vertical Calligraphy Oracle Slip
   ========================================================================== */

/* 1. Zero-Cost SVG Xuan-Paper / Obsidian Silk Micro-Grain Overlay */
.guoxue-paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
html[data-theme="paper"] .guoxue-paper-grain {
  opacity: 0.085;
  mix-blend-mode: multiply;
}

/* Restrained Calligraphy Display Accents (Palace Museum / Black Myth Vibe) */
.seal-chop,
.epigraph-seal,
.sample-seal-stamp {
  font-family: var(--calligraphy);
}
.guoxue-epigraph span {
  font-family: var(--calligraphy);
  font-size: 16px;
  letter-spacing: 0.24em;
}
.hero-link-pill.is-featured-pill {
  border-color: rgba(200, 164, 102, 0.58);
  background: rgba(200, 164, 102, 0.12);
  color: #f6e4c4;
}
.hero-link-pill.is-featured-pill:hover {
  border-color: var(--accent);
  background: rgba(200, 164, 102, 0.22);
}

/* 2. 3-Step Deterministic Trust Scroll (Cover Strip) */
.trust-scroll-strip {
  margin: 0 0 36px;
  padding: 18px 22px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--card-grad);
}
.trust-scroll-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.trust-scroll-kicker {
  font: 600 11px var(--display);
  letter-spacing: 0.18em;
  color: var(--accent);
}
.trust-social-proof {
  font: 500 12px var(--sans);
  color: var(--jade);
  letter-spacing: 0.04em;
}
.trust-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.trust-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.trust-num {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid rgba(200, 164, 102, 0.48);
  background: rgba(158, 43, 34, 0.18);
  color: var(--accent);
  font: 400 17px/1 var(--calligraphy);
}
.trust-step strong {
  display: block;
  font: 600 13.5px var(--serif);
  color: var(--text-hi);
  margin-bottom: 3px;
}
.trust-step p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
@media (max-width: 820px) {
  .trust-steps-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* 3. Sample Life Book Preview Modal (#dialog-sample-book) */
.xuan-dialog.wide { width: min(820px, calc(100vw - 24px)); }
.sample-book-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(200, 164, 102, 0.08), rgba(158, 43, 34, 0.06));
  margin-bottom: 14px;
}
.sample-book-name {
  margin: 0;
  font: 600 18px var(--display);
  color: var(--text-hi);
}
.sample-seal-stamp {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--vermilion);
  border-radius: 3px;
  background: var(--vermilion-soft);
  color: #f3c8be;
  font-size: 18px;
  transform: rotate(-4deg);
}
.sample-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sample-pillars-grid .pillar-card {
  padding: 10px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--surface);
}
.sample-pillars-grid .pillar-lbl { display: block; font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.sample-pillars-grid .pillar-gz { display: block; font: 700 22px var(--zh-serif); color: var(--text-hi); margin: 4px 0 2px; }
.sample-pillars-grid small { font-size: 11px; color: var(--accent); }
.sample-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.sample-panel {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}
.sample-wx-list { display: grid; gap: 7px; margin: 8px 0; }
.sample-wx-row { display: grid; grid-template-columns: 90px 1fr 20px; align-items: center; gap: 8px; font-size: 12px; }
.sample-wx-name.is-scarce { color: var(--wx-water); font-weight: 700; }
.sample-wx-track { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.sample-wx-fill { display: block; height: 100%; border-radius: 99px; }
.sample-wx-fill.wx-wood { background: var(--wx-wood); }
.sample-wx-fill.wx-fire { background: var(--wx-fire); }
.sample-wx-fill.wx-earth { background: var(--wx-earth); }
.sample-wx-fill.wx-metal { background: var(--wx-metal); }
.sample-wx-fill.wx-water { background: var(--wx-water); }
.sample-note { margin: 8px 0 0; font-size: 12px; color: var(--accent); }
.sample-quote {
  margin: 8px 0;
  padding: 8px 10px;
  border-left: 2px solid var(--vermilion);
  background: rgba(158, 43, 34, 0.09);
  font: 500 12.5px/1.65 var(--zh-serif);
  color: var(--text-hi);
}
.sample-verdict { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--ink); }
.sample-remedy-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: var(--surface-2);
  margin-bottom: 14px;
}
.sample-remedy-img {
  width: 72px;
  height: 54px;
  flex: none;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(200, 164, 102, 0.45);
}
.sample-cta-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 640px) {
  .sample-pillars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample-section-grid { grid-template-columns: 1fr; }
  .sample-remedy-strip { flex-wrap: wrap; }
}

/* 4. Unknown Birth Hour Toggle in Seeker Profile Modal */
.unknown-hour-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
}
.unknown-hour-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--vermilion);
  margin: 0;
}
.unknown-hour-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--jade);
}
input:disabled { opacity: 0.48; cursor: not-allowed; }

/* 5. Blurred Deep-Chapter Curiosity Cards (FateTell Paywall-to-Payoff) */
.deep-chapters-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--card-grad);
}
.deep-chapters-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.deep-badge-note {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
}
.deep-chapters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.deep-chapter-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  transition: border-color 0.28s var(--ease);
}
.deep-chapter-card.is-unlocked {
  border-color: rgba(200, 164, 102, 0.56);
}
.deep-chapter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}
.deep-vol-tag { color: var(--accent); font-weight: 700; letter-spacing: 0.06em; }
.deep-master-tag { color: var(--muted); }
.deep-chapter-title { margin: 0; font: 600 14.5px/1.3 var(--serif); color: var(--text-hi); }
.deep-chapter-hook { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.deep-secret-body {
  position: relative;
  padding: 10px;
  border-radius: 3px;
  border: 1px dashed rgba(200, 164, 102, 0.25);
  background: rgba(10, 9, 13, 0.42);
  min-height: 92px;
  overflow: hidden;
}
.deep-reveal-en, .deep-reveal-zh {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.58;
  transition: filter 0.45s var(--ease), opacity 0.45s var(--ease);
}
.deep-reveal-zh { margin-bottom: 0; font-size: 11.5px; }
.deep-secret-body.is-blurred .deep-reveal-en,
.deep-secret-body.is-blurred .deep-reveal-zh {
  filter: blur(5.5px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
}
.deep-blur-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(14, 12, 18, 0.42);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.deep-veil-seal {
  padding: 3px 10px;
  border: 1px solid rgba(235, 198, 135, 0.72);
  border-radius: 2px;
  background: rgba(158, 43, 34, 0.88);
  color: #fff2de;
  font: 400 15px/1 var(--calligraphy);
  letter-spacing: 0.15em;
}
.deep-veil-hint { font-size: 11px; color: #f6ead9; letter-spacing: 0.05em; }
.deep-chapter-foot { margin-top: auto; }
.deep-unseal-btn { width: 100%; justify-content: center; white-space: normal; text-align: center; line-height: 1.35; padding: 6px 10px; }
@media (max-width: 900px) {
  .deep-chapters-grid { grid-template-columns: 1fr; }
}

/* 6. Consecration 3-Step Proof Strip, Ritual Bundle Upsell & Care Scroll */
.consecration-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(200, 164, 102, 0.06);
}
.proof-step { display: flex; align-items: flex-start; gap: 9px; }
.proof-num {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid rgba(200, 164, 102, 0.45);
  background: rgba(158, 43, 34, 0.2);
  color: var(--accent);
  font: 400 14px/1 var(--calligraphy);
}
.proof-step strong { display: block; font-size: 12px; color: var(--text-hi); }
.proof-step small { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; }
@media (max-width: 720px) {
  .consecration-proof-strip { grid-template-columns: 1fr; }
}

.bundle-upsell-card,
.bag-upsell-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid rgba(200, 164, 102, 0.48);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(200, 164, 102, 0.10), rgba(158, 43, 34, 0.08));
  cursor: pointer;
}
.bag-upsell-strip { margin-top: 12px; cursor: default; }
.bundle-upsell-card input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--vermilion);
}
.bundle-upsell-img {
  width: 58px;
  height: 44px;
  flex: none;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(200, 164, 102, 0.4);
}
.bundle-upsell-copy strong { display: block; font-size: 12.5px; color: var(--text-hi); margin: 2px 0; }
.bundle-upsell-copy small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.bundle-save-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff2de;
  background: var(--vermilion);
  padding: 2px 7px;
  border-radius: 2px;
}

.care-scroll-fold {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 12px;
  background: var(--surface);
}
.care-scroll-fold summary {
  cursor: pointer;
  font: 600 12px var(--zh-serif);
  color: var(--accent);
}
.care-scroll-list {
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  display: grid;
  gap: 5px;
}

/* 7. Co-Star x Guoxue Vertical Calligraphy Daily Oracle Slip (#dialog-daily-slip) */
.oracle-slip-card {
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(200, 164, 102, 0.45);
  box-shadow: 0 22px 48px -24px rgba(0, 0, 0, 0.78);
}
.oracle-slip-card.theme-dark {
  background: linear-gradient(160deg, #15131b 0%, #0b0a0e 100%);
  color: #f6ead9;
}
.oracle-slip-card.theme-paper {
  background: linear-gradient(160deg, #f7f0e2 0%, #eadec8 100%);
  color: #211912;
  border-color: rgba(132, 96, 52, 0.55);
}
.oracle-slip-inner {
  border: 1px solid rgba(200, 164, 102, 0.32);
  padding: 18px 20px;
}
.oracle-slip-card.theme-paper .oracle-slip-inner { border-color: rgba(132, 96, 52, 0.32); }
.oracle-slip-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(200, 164, 102, 0.24);
}
.oracle-slip-card.theme-paper .oracle-slip-meta { color: #8c5a2b; border-color: rgba(132, 96, 52, 0.24); }
.oracle-slip-stage {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 220px;
}
.oracle-slip-en {
  margin: 0 0 12px;
  font: 600 22px/1.35 var(--serif);
}
.oracle-slip-note {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.78;
}
.oracle-slip-foot-brand {
  font: 600 10.5px var(--display);
  letter-spacing: 0.18em;
  opacity: 0.65;
}
.oracle-slip-zh-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid rgba(200, 164, 102, 0.24);
}
.oracle-slip-zh {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font: 400 29px/1.25 var(--calligraphy);
  letter-spacing: 0.14em;
  max-height: 220px;
}
.oracle-slip-seal {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid #f3dfb8;
  background: #9e2b22;
  color: #fff3e2;
  font: 700 12px/1 var(--zh-serif);
  letter-spacing: 0.05em;
  border-radius: 2px;
}
.oracle-slip-controls { display: flex; flex-direction: column; gap: 10px; }
.oracle-slip-theme-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-chip.is-active-chip {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-hi);
}

/* 8. Aged Xuan Paper Light Mode Parity for New Benchmark Components */
html[data-theme="paper"] .trust-scroll-strip,
html[data-theme="paper"] .deep-chapters-panel {
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.94), rgba(240, 231, 215, 0.96));
  border-color: rgba(132, 96, 52, 0.34);
}
html[data-theme="paper"] .deep-secret-body {
  background: rgba(235, 224, 204, 0.55);
}
html[data-theme="paper"] .deep-blur-veil {
  background: rgba(244, 238, 227, 0.58);
}
html[data-theme="paper"] .deep-veil-hint { color: #2b2118; }
html[data-theme="paper"] .sample-seal-stamp { color: #9e2b22; }
html[data-theme="paper"] .hero-link-pill.is-featured-pill {
  background: rgba(154, 96, 42, 0.14);
  border-color: #9a602a;
  color: #4f2c0d;
}
html[data-theme="paper"] .sample-wx-track { background: rgba(60, 50, 41, 0.12); }

/* 9. Mobile 390px Scene-Bar Compact Button Contrast Polish (Night & Crimson Modes) */
html[data-theme="night"] .scene-bar .icon-button.compact,
html[data-theme="crimson"] .scene-bar .icon-button.compact {
  color: #f6ead9;
  background: var(--pill-bg);
  border-color: var(--line-2);
}
html[data-theme="night"] .scene-bar .icon-button.compact:hover,
html[data-theme="crimson"] .scene-bar .icon-button.compact:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   AUTHENTIC CHINESE TRADITIONAL PIGMENTS (中国传统色) — TOP HAIRLINE,
   1-CLICK PALETTE SWITCHER (宣纸 / 青绿 / 红墙) & MUSEUM SCROLL FRAMING
   ========================================================================== */
body.guoxue-sanctuary::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(90deg, var(--vermilion) 0%, var(--gold) 50%, var(--vermilion) 100%);
  box-shadow: 0 1px 0 rgba(214, 174, 99, 0.35);
}

.guofeng-palette-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  background: var(--pill-bg);
}
.palette-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  min-height: 28px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 var(--zh-serif);
  letter-spacing: 0.06em;
  transition: all 0.2s var(--ease);
}
.palette-btn:hover { color: var(--text-hi); background: var(--accent-soft); }
.palette-btn.active {
  background: var(--vermilion);
  border-color: rgba(235, 200, 140, 0.65);
  color: #fff6e8;
}
.guofeng-palette-bar.compact .palette-btn { padding: 3px 7px; min-height: 24px; font-size: 11.5px; }
.swatch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: inline-block;
}
.swatch-dot.sw-paper { background: #e8dcc4; border-color: #8c6a38; }
.swatch-dot.sw-night { background: #1e4f4b; }
.swatch-dot.sw-crimson { background: #a82b20; }

/* Palace Museum Rosewood/Ebony + Antique Gold Scroll Framing on Xuan Paper */
html[data-theme="paper"] .luna-home-frame,
html[data-theme="paper"] .series-card figure,
html[data-theme="paper"] .card-portrait-frame,
html[data-theme="paper"] .relic-photo-frame {
  border: 2px solid #2b2118;
  box-shadow:
    inset 0 0 0 1px rgba(196, 152, 78, 0.55),
    0 18px 36px -22px rgba(42, 28, 12, 0.48);
}
html[data-theme="paper"] .luna-home-index,
html[data-theme="paper"] .luna-section-index,
html[data-theme="paper"] .eyebrow {
  color: #1e4f4b;
}
html[data-theme="paper"] .hero-zh-sub {
  color: #a3291e;
}
html[data-theme="paper"] .guoxue-frame::before,
html[data-theme="paper"] .guoxue-frame::after {
  border-color: rgba(154, 108, 43, 0.62);
}
html[data-theme="paper"] .daily-cut-card {
  background-color: rgba(248, 242, 229, 0.94);
  border-color: rgba(154, 108, 43, 0.38);
  border-left: 3.5px solid #a3291e;
}
html[data-theme="paper"] .mini-chip {
  background: rgba(30, 79, 75, 0.08);
  border-color: rgba(30, 79, 75, 0.34);
  color: #1e4f4b;
}
html[data-theme="paper"] .mini-chip:hover {
  background: #1e4f4b;
  border-color: #1e4f4b;
  color: #fbf6ec;
}
html[data-theme="paper"] .trust-num,
html[data-theme="paper"] .proof-num {
  background: #a3291e;
  border-color: #872017;
  color: #fff6e8;
}
html[data-theme="paper"] .btn-seal-mini {
  background: #a3291e;
  border-color: #872017;
  color: #fff6e8;
}
html[data-theme="paper"] .hall-tab {
  background: var(--pill-bg);
  border-color: rgba(30, 79, 75, 0.24);
  color: #2c241c;
}
html[data-theme="paper"] .hall-tab.active,
html[data-theme="paper"] .altar-tab.active {
  background: rgba(30, 79, 75, 0.13);
  color: #163d3a;
  border-color: #1e4f4b;
  border-bottom: 2px solid #a3291e;
}
html[data-theme="paper"] .guoxue-plaque-cta {
  background: linear-gradient(180deg, #a82c21 0%, #831d15 100%);
  border-color: #c79a4d;
  box-shadow: 0 10px 24px -12px rgba(163, 41, 30, 0.55);
}
html[data-theme="paper"] .guoxue-bronze-cta {
  background: linear-gradient(180deg, #1f4d49 0%, #153634 100%);
  border-color: #9a6c2b;
  color: #fbf5e8;
}
html[data-theme="paper"] .guoxue-bronze-cta .bronze-mark {
  background: rgba(214, 174, 99, 0.22);
  border-color: rgba(214, 174, 99, 0.72);
  color: #f3dfb8;
}
html[data-theme="paper"] .ambient-canvas {
  opacity: 0.22;
}

/* ==========================================================================
   XUANHUAN QINGLV GUOFENG (玄幻青绿仙境) — FULL-BLEED CELESTIAL MOUNTAIN STAGE,
   ROTATING BAGUA ASTROLABE, CALLIGRAPHY LOCKUP, JADE-SLIP CARDS & SPIRIT GLOW
   ========================================================================== */
.xuanhuan-hero-stage {
  position: relative;
  display: block !important;
  min-height: clamp(560px, 72vh, 690px);
  margin: 4px 0 34px !important;
  padding: clamp(28px, 4vw, 52px) clamp(22px, 4vw, 52px);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(66, 203, 176, 0.34);
  box-shadow:
    0 32px 84px -32px rgba(2, 12, 11, 0.94),
    inset 0 0 0 1px rgba(229, 190, 109, 0.28),
    0 0 48px -18px rgba(66, 203, 176, 0.22);
  isolation: isolate;
}
.xuanhuan-hero-stage .luna-home-scene {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}
.xuanhuan-hero-stage .luna-home-frame {
  position: absolute;
  inset: 0;
  aspect-ratio: auto !important;
  height: 100%;
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #061312;
}
.xuanhuan-hero-stage .luna-home-frame .luna-home-image {
  object-position: 70% 38%;
  filter: brightness(0.88) saturate(1.02);
}
.xuanhuan-hero-stage .luna-home-scene:has(#sanctuary-lamp:checked) .luna-home-image {
  filter: brightness(1.04) saturate(1.06);
}
/* Deep Emerald-Ink Left Vignette so Calligraphy & CTAs float effortlessly over the Mountain Sea */
.xuanhuan-hero-stage .luna-home-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(92deg, rgba(4, 15, 14, 0.92) 0%, rgba(5, 18, 17, 0.78) 42%, rgba(6, 22, 20, 0.26) 72%, rgba(4, 14, 13, 0.42) 100%),
    linear-gradient(180deg, rgba(4, 14, 13, 0.44) 0%, transparent 24%, transparent 72%, rgba(6, 17, 16, 0.94) 100%);
}
.xuanhuan-hero-stage .luna-home-frame::before {
  background:
    radial-gradient(ellipse 46% 58% at 76% 42%, rgba(255, 204, 122, 0.34), rgba(66, 203, 176, 0.16) 52%, transparent 80%),
    radial-gradient(ellipse 38% 42% at 62% 78%, rgba(66, 203, 176, 0.22), transparent 82%);
}
html[data-theme="crimson"] .xuanhuan-hero-stage .luna-home-frame::after {
  background:
    linear-gradient(92deg, rgba(22, 10, 9, 0.92) 0%, rgba(26, 12, 10, 0.76) 44%, rgba(28, 14, 12, 0.24) 74%, rgba(22, 10, 9, 0.42) 100%),
    linear-gradient(180deg, rgba(22, 10, 9, 0.42) 0%, transparent 25%, transparent 72%, rgba(24, 13, 12, 0.94) 100%);
}

/* Rotating Dual-Ring Celestial Bagua & 28-Mansions Star Astrolabe */
.celestial-astrolabe {
  position: absolute;
  top: -36px;
  right: 4%;
  width: clamp(280px, 34vw, 450px);
  height: clamp(280px, 34vw, 450px);
  z-index: 2;
  pointer-events: none;
  color: #e8c474;
  opacity: 0.28;
  filter: drop-shadow(0 0 10px rgba(66, 203, 176, 0.32));
}
.celestial-astrolabe svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.astrolabe-outer { animation: baguaSpin 120s linear infinite; }
.astrolabe-inner {
  color: #5ee6cb;
  animation: baguaSpinRev 78s linear infinite;
}
@keyframes baguaSpinRev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

/* Drifting Qinglv Emerald Spirit Cloud Mist along Lower Horizon */
.hero-spirit-mist {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -18px;
  height: 150px;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(40% 70% at 24% 85%, rgba(66, 203, 176, 0.20), transparent 72%),
    radial-gradient(44% 75% at 62% 92%, rgba(36, 148, 132, 0.24), transparent 74%),
    radial-gradient(36% 65% at 88% 82%, rgba(229, 190, 109, 0.14), transparent 70%);
  filter: blur(16px);
  animation: spiritMistDrift 16s ease-in-out infinite alternate;
}
@keyframes spiritMistDrift {
  from { transform: translateX(-3%) scaleY(1); opacity: 0.72; }
  to { transform: translateX(3%) scaleY(1.12); opacity: 0.98; }
}

.xuanhuan-hero-stage .luna-home-copy {
  position: relative !important;
  z-index: 6 !important;
  max-width: 585px !important;
}
.xuanhuan-hero-stage .luna-lamp-control {
  left: auto !important;
  right: 18px !important;
  bottom: 46px !important;
  z-index: 7 !important;
  border-color: rgba(229, 190, 109, 0.48);
  background: rgba(6, 20, 19, 0.72);
}
.xuanhuan-hero-stage .luna-lamp-target {
  left: 78% !important;
  top: 42% !important;
}

/* Majestic Brush Calligraphy Hero Lockup: 玄机阁 + 太上敕印 */
.xuanhuan-title-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 8px;
}
.xuanhuan-calligraphy-mark {
  font: 400 clamp(54px, 5.8vw, 84px)/1.02 var(--calligraphy);
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #fff6df 0%, #ebd08c 54%, #c49746 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(66, 203, 176, 0.34)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
}
.xuanhuan-seal-stamp {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 52px;
  border: 1.5px solid rgba(244, 212, 152, 0.72);
  border-radius: 3px;
  background: linear-gradient(180deg, #bd3123, #8f1d14);
  color: #fff4e4;
  font: 700 12.5px/1.15 var(--zh-serif);
  letter-spacing: 0.08em;
  text-align: center;
  box-shadow: 0 6px 18px rgba(196, 51, 36, 0.48), inset 0 0 0 2px rgba(255, 240, 210, 0.16);
  transform: rotate(-3deg);
}
.xuanhuan-hero-stage #luna-home-title {
  margin: 0 0 6px;
  font: 600 clamp(21px, 2.3vw, 30px)/1.22 var(--display) !important;
  letter-spacing: 0.06em;
  color: #f6ead4 !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.xuanhuan-hero-stage .hero-zh-sub {
  color: #63e2c8 !important;
  text-shadow: 0 1px 10px rgba(4, 16, 15, 0.8);
}
.xuanhuan-hero-stage .luna-home-index {
  color: #e6c274 !important;
}
.xuanhuan-hero-stage .luna-home-hook,
.xuanhuan-hero-stage .luna-hero-foot {
  color: #c8dcd5 !important;
}
.xuanhuan-hero-stage .luna-home-other {
  color: #e8c474 !important;
}
.xuanhuan-hero-stage .daily-cut-card {
  background: rgba(7, 22, 20, 0.74) !important;
  border-color: rgba(66, 203, 176, 0.34) !important;
  border-left: 3.5px solid var(--vermilion) !important;
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.8), inset 0 0 24px rgba(66, 203, 176, 0.06);
}
.xuanhuan-hero-stage .daily-cut-en { color: #fbf2e1 !important; }
.xuanhuan-hero-stage .daily-cut-zh { color: #9fc4b9 !important; }
.xuanhuan-hero-stage .hero-link-pill {
  background: rgba(8, 25, 23, 0.78) !important;
  border-color: rgba(66, 203, 176, 0.34) !important;
  color: #edf5f1 !important;
}
.xuanhuan-hero-stage .hero-link-pill.is-featured-pill {
  border-color: rgba(229, 190, 109, 0.66) !important;
  background: rgba(229, 190, 109, 0.16) !important;
  color: #fff2d6 !important;
}
.xuanhuan-hero-stage .hero-link-pill:hover {
  border-color: #42cbb0 !important;
  background: rgba(66, 203, 176, 0.18) !important;
}
.xuanhuan-hero-stage .guoxue-epigraph {
  right: 16px !important;
  top: 22px !important;
  color: rgba(232, 196, 116, 0.82) !important;
}

/* Xuanhuan Celestial Taiji Cloud Dividers between Sections */
.luna-bookcase, .luna-reading-room {
  border-top: 0 !important;
  padding-top: 38px;
}
.luna-bookcase::after, .luna-reading-room::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(66, 203, 176, 0.45) 28%, rgba(229, 190, 109, 0.75) 50%, rgba(66, 203, 176, 0.45) 72%, transparent 100%);
}
.luna-bookcase::before, .luna-reading-room::before {
  content: "☯" !important;
  top: -12px !important;
  padding: 0 18px !important;
  font-size: 16px !important;
  color: var(--gold) !important;
  text-shadow: 0 0 14px rgba(66, 203, 176, 0.55);
  z-index: 2;
}

/* Xuanhuan Immortal Character Fate Cards (掌坛四仙) */
.series-card figure {
  position: relative;
  border-radius: 4px !important;
  border: 1px solid rgba(66, 203, 176, 0.34) !important;
  box-shadow: inset 0 0 0 1px rgba(229, 190, 109, 0.24), 0 16px 36px -22px rgba(0, 0, 0, 0.85);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.series-card:hover figure {
  border-color: rgba(229, 190, 109, 0.72) !important;
  box-shadow:
    0 20px 44px -16px rgba(66, 203, 176, 0.32),
    0 0 0 1px rgba(229, 190, 109, 0.48);
  transform: translateY(-3px);
}
.series-seal-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 6px 5px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  border-radius: 2px;
  border: 1px solid rgba(244, 212, 152, 0.7);
  background: rgba(176, 42, 30, 0.88);
  color: #fff3e0;
  font: 700 12px/1 var(--zh-serif);
  letter-spacing: 0.14em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}

/* Xuanhuan Glowing Spirit Artifact Jade-Slips (道坛五法器 — 玉简切角 + 发光书法水印) */
.artifact-tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px !important;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  border: 1px solid rgba(66, 203, 176, 0.32) !important;
  background: linear-gradient(155deg, rgba(13, 36, 33, 0.90), rgba(7, 20, 19, 0.96)) !important;
}
.artifact-tile::after {
  content: attr(data-glyph);
  position: absolute;
  right: 8px;
  bottom: -6px;
  font: 400 58px/1 var(--calligraphy);
  color: rgba(66, 203, 176, 0.14);
  pointer-events: none;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.artifact-tile:hover {
  border-color: rgba(229, 190, 109, 0.75) !important;
  box-shadow: 0 14px 32px -14px rgba(66, 203, 176, 0.32), inset 0 0 24px rgba(66, 203, 176, 0.10) !important;
}
.artifact-tile:hover::after {
  color: rgba(229, 190, 109, 0.26);
  transform: scale(1.08) translateY(-3px);
}
html[data-theme="paper"] .artifact-tile {
  background: linear-gradient(155deg, rgba(248, 242, 229, 0.96), rgba(235, 224, 204, 0.96)) !important;
  border-color: rgba(30, 79, 75, 0.30) !important;
}
html[data-theme="paper"] .artifact-tile::after { color: rgba(30, 79, 75, 0.12); }
html[data-theme="crimson"] .artifact-tile {
  background: linear-gradient(155deg, rgba(40, 20, 18, 0.92), rgba(22, 11, 10, 0.96)) !important;
  border-color: rgba(224, 183, 104, 0.32) !important;
}
html[data-theme="crimson"] .artifact-tile::after { color: rgba(224, 183, 104, 0.14); }

/* Trust Scroll & Relics Cards — Subtle Jade-Gold Spirit Rim */
.trust-scroll-strip {
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.8), inset 0 0 28px rgba(66, 203, 176, 0.06);
}
.boutique-card {
  border-color: rgba(66, 203, 176, 0.26);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.boutique-card:hover {
  border-color: rgba(229, 190, 109, 0.65);
  box-shadow: 0 18px 40px -20px rgba(66, 203, 176, 0.28);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .xuanhuan-hero-stage {
    min-height: 540px;
    padding: 22px 16px 68px;
  }
  .celestial-astrolabe {
    width: 220px;
    height: 220px;
    top: -18px;
    right: -32px;
    opacity: 0.32;
  }
  .xuanhuan-hero-stage .luna-lamp-control {
    bottom: 14px !important;
    right: 12px !important;
  }
  .xuanhuan-hero-stage .luna-home-frame figcaption {
    top: auto !important;
    bottom: 14px !important;
    left: 16px !important;
    right: auto !important;
    justify-items: start;
  }
}

/* ==========================================================================
   DIGITAL MONETIZATION LOOP — SANCTUARY TREASURY, SPIRIT STONES, PAYWALL,
   COLLECTIBLE 6-CHAPTER PDF LIFE BOOK & COMPLIANCE FOOTER
   ========================================================================== */
.compliance-disclaimer {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.78;
  max-width: 68ch;
  line-height: 1.5;
}
.compact-plaque {
  min-height: 42px !important;
  padding: 0 15px 0 9px !important;
  font-size: 13px !important;
}

.lifebook-upsell-banner {
  margin-top: 14px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  border-radius: 4px;
  border: 1px solid rgba(229, 190, 109, 0.52);
  background: linear-gradient(135deg, rgba(66, 203, 176, 0.10), rgba(196, 51, 36, 0.10));
}

/* Treasury Paywall Modal (#dialog-treasury) */
.treasury-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  margin-bottom: 12px;
}
.treasury-balance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}
.treasury-balance-row strong {
  font: 700 20px var(--zh-serif);
  color: var(--gold);
}
.treasury-tier-pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.treasury-tier-pill.is-vip {
  border-color: var(--gold);
  background: var(--vermilion);
  color: #fff4e4;
  font-weight: 700;
}

.treasury-pending-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  margin-bottom: 12px;
  border-radius: 4px;
  border: 1px solid rgba(196, 51, 36, 0.55);
  background: linear-gradient(135deg, rgba(196, 51, 36, 0.14), rgba(229, 190, 109, 0.08));
}
.treasury-checkout-meta {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 310px);
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.treasury-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.treasury-email-input {
  width: 100%;
  padding: 7px 11px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-hi);
  font-size: 12.5px;
}
@media (max-width: 720px) {
  .treasury-checkout-meta { grid-template-columns: 1fr; }
}

.treasury-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 780px) {
  .treasury-tier-grid { grid-template-columns: 1fr; }
}
.treasury-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.treasury-card.is-featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(66, 203, 176, 0.09), rgba(229, 190, 109, 0.06) 55%, var(--surface) 100%);
  box-shadow: 0 14px 36px -20px rgba(66, 203, 176, 0.32);
}
.treasury-card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.treasury-card h4 {
  margin: 2px 0 0;
  font: 600 15.5px/1.3 var(--serif);
  color: var(--text-hi);
}
.treasury-price-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 4px 0 6px;
}
.treasury-price-line strong {
  font: 700 24px/1 var(--display);
  color: var(--text-hi);
}
.treasury-price-line del { font-size: 13px; color: var(--muted); }
.treasury-price-line span { font-size: 11.5px; color: var(--muted); }
.treasury-feat-list {
  margin: 0 0 12px;
  padding-left: 16px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
}
.treasury-feat-list small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.treasury-stones-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 780px) {
  .treasury-stones-row { grid-template-columns: 1fr; }
}
.stone-pack-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.stone-pack-card.is-viral-bonus {
  border-color: rgba(66, 203, 176, 0.45);
  background: rgba(66, 203, 176, 0.08);
}
.stone-pack-card strong { display: block; font-size: 12.5px; color: var(--text-hi); }
.stone-pack-card small { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; }

.treasury-gateway-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px dashed var(--line-2);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.treasury-gateway-note strong { color: var(--jade); font-size: 11px; letter-spacing: 0.08em; }

/* Collectible 6-Chapter Destiny Life Book Reader (#dialog-life-book) */
.lifebook-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.lifebook-cover-plate {
  padding: 18px 20px;
  border-radius: 4px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(160deg, rgba(16, 40, 36, 0.9), rgba(8, 20, 18, 0.96));
  margin-bottom: 14px;
}
html[data-theme="paper"] .lifebook-cover-plate {
  background: linear-gradient(160deg, #faf4e6, #ede1cb);
}
html[data-theme="crimson"] .lifebook-cover-plate {
  background: linear-gradient(160deg, #2d1714, #180c0b);
}
.lifebook-cover-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.lifebook-cover-title {
  margin: 0 0 4px;
  font: 400 28px/1.2 var(--calligraphy);
  letter-spacing: 0.08em;
  color: var(--text-hi);
}
.lifebook-cover-sub { margin: 0 0 4px; font: 600 14px var(--serif); color: var(--accent); }
.lifebook-cover-meta { margin: 0; font-size: 12px; color: var(--muted); }
.lifebook-chapters {
  display: grid;
  gap: 12px;
}
.lifebook-chapter-card {
  padding: 15px 16px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.lifebook-chapter-card h4 {
  margin: 0 0 2px;
  font: 600 16.5px var(--serif);
  color: var(--text-hi);
}
.lifebook-para { margin: 0 0 6px; font-size: 13px; line-height: 1.65; color: var(--ink); white-space: pre-line; }
.lifebook-para-zh { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); white-space: pre-line; }
.lifebook-disclaimer {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}






/* ==========================================================================
   INTERACTIVE SANCTUARY EXPANSION — Cezi, Meihua, 64-Hex, Lanterns, 3 Tales
   ========================================================================== */

/* Quick Ask & Four-Master Council Bar */
.quick-ask-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 2px 8px;
}
.quick-ask-bar.hidden { display: none; }
.quick-ask-chip {
  padding: 5px 11px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 12px var(--zh-serif);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}
.quick-ask-chip:hover {
  border-color: var(--jade);
  color: var(--text-hi);
  transform: translateY(-1px);
}
.quick-ask-chip.council {
  border-color: rgba(229, 190, 109, 0.55);
  background: linear-gradient(135deg, rgba(229, 190, 109, 0.14), rgba(196, 51, 36, 0.12));
  color: var(--gold);
  font-weight: 600;
}
.quick-ask-chip.council:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(229, 190, 109, 0.2);
}

/* Cezi Glyph Divination Stage (测字问机台) */
.cezi-stage-card {
  position: relative;
  width: min(260px, 100%);
  padding: 22px 18px 16px;
  border-radius: 3px;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 50% 45%, rgba(229, 190, 109, 0.14), transparent 68%),
    linear-gradient(160deg, var(--deep), var(--surface));
  text-align: center;
  box-shadow: inset 0 0 0 4px rgba(229, 190, 109, 0.08), 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.cezi-stage-card.is-reading {
  transform: scale(1.03);
  box-shadow: 0 0 32px rgba(196, 51, 36, 0.38);
}
.cezi-seal-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 6px;
  border: 1px solid var(--vermilion);
  color: var(--vermilion);
  font: 700 10px var(--zh-serif);
  letter-spacing: 0.1em;
}
.cezi-big-char {
  font: 400 84px/1.1 var(--calligraphy);
  color: var(--text-hi);
  text-shadow: 0 0 24px rgba(229, 190, 109, 0.28);
  margin: 4px 0 8px;
}
.cezi-sub-caption {
  display: block;
  font: 500 12px var(--zh-serif);
  color: var(--jade);
  letter-spacing: 0.08em;
}
.cezi-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 480px;
}
.cezi-chip {
  width: 38px;
  height: 38px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-hi);
  font: 600 17px var(--zh-serif);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.cezi-chip:hover {
  border-color: var(--gold);
  background: rgba(229, 190, 109, 0.14);
  transform: translateY(-2px);
}
.cezi-form-grid, .meihua-inputs-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  width: 100%;
}
.meihua-inputs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cezi-char-input {
  text-align: center;
  font: 700 20px var(--zh-serif) !important;
  color: var(--gold) !important;
}
.cezi-verdict-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.cezi-split-line {
  margin: 4px 0 8px;
  padding: 6px 10px;
  border-left: 2px solid var(--vermilion);
  background: rgba(196, 51, 36, 0.08);
  font: 600 13px var(--zh-serif);
  color: var(--text-hi);
}

/* Meihua Triple Hexagram & 64-Hexagram Result Cards */
.mh-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.mh-triple-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.hex64-top-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.mh-hex-card {
  padding: 12px 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}
.mh-hex-card.highlight {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(229, 190, 109, 0.12), var(--surface));
}
.mh-role {
  display: block;
  font: 600 10.5px var(--zh-serif);
  letter-spacing: 0.1em;
  color: var(--jade);
  margin-bottom: 4px;
}
.mh-sym {
  font-size: 40px;
  line-height: 1.05;
  color: var(--gold);
  margin: 2px 0 4px;
}
.mh-hex-card strong { display: block; font: 600 15px var(--zh-serif); color: var(--text-hi); }
.mh-hex-card small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.mh-motto { margin: 6px 0 0; font-size: 11.5px; color: var(--ink); line-height: 1.4; }

.hex-domains-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  text-align: left;
}
.hex-domain-chip {
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--deep);
}
.hex-domain-chip span {
  display: block;
  font: 600 11px var(--zh-serif);
  color: var(--gold);
  margin-bottom: 4px;
}
.hex-domain-chip p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}

/* Eternal Wish-Lantern Hall (长明灯殿) */
.lantern-style-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.lantern-style-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 12.5px var(--zh-serif);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.lantern-style-btn.active {
  border-color: var(--gold);
  background: rgba(229, 190, 109, 0.14);
  color: var(--text-hi);
}
.lantern-mini-orb {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font: 700 11px var(--zh-serif);
  color: #fff;
  background: var(--jade-deep);
}
.lantern-style-btn.style-gold .lantern-mini-orb { background: #a87d28; }
.lantern-style-btn.style-cinnabar .lantern-mini-orb { background: #b32b20; }
.lantern-style-btn.style-violet .lantern-mini-orb { background: #5a4486; }
.lantern-style-btn.style-thunder .lantern-mini-orb { background: #265963; }

.lantern-wall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
.lantern-card {
  padding: 12px 13px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface), var(--deep));
  position: relative;
  overflow: hidden;
}
.lantern-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--jade);
}
.lantern-card.style-gold::before { background: var(--gold); }
.lantern-card.style-cinnabar::before { background: var(--vermilion); }
.lantern-card.style-violet::before { background: #9b82d6; }
.lantern-card.style-thunder::before { background: #5cc4d8; }
.lantern-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 6px;
}
.lantern-card-top small { margin-left: auto; color: var(--muted); font-size: 11px; }
.lantern-glow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.lantern-wish-text {
  margin: 0 0 8px;
  font: 400 13px/1.55 var(--zh-serif);
  color: var(--text-hi);
}
.lantern-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.lantern-res-btn {
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--jade);
  font-size: 11px;
  cursor: pointer;
}
.lantern-res-btn.is-lit, .lantern-res-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Three-Volume Sanctuary Chronicles Shelf (三卷问道书架) */
.tale-shelf-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.tale-card-btn {
  text-align: left;
  padding: 10px 11px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.tale-card-btn.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(229, 190, 109, 0.14), var(--surface));
}
.tale-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.tale-vol-badge {
  font: 700 10.5px var(--zh-serif);
  color: var(--vermilion);
  letter-spacing: 0.1em;
}
.tale-end-badge {
  font-size: 10.5px;
  color: var(--jade);
}
.tale-card-btn strong { display: block; font: 600 13px/1.3 var(--zh-serif); color: var(--text-hi); }
.tale-card-btn small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.35; }

/* Fate Cards Mode Toggle */
.fate-mode-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.fate-mode-bar .mini-chip.active {
  border-color: var(--gold);
  background: rgba(229, 190, 109, 0.16);
  color: var(--gold);
}

/* Altar Compendium Grid (万物图鉴) */
.comp-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.comp-stat-card {
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}
.comp-stat-card span { display: block; font-size: 11px; color: var(--muted); }
.comp-stat-card strong { display: block; font: 700 17px var(--display); color: var(--gold); margin-top: 2px; }
.comp-sec-title {
  margin: 12px 0 8px;
  font: 600 13px var(--zh-serif);
  color: var(--jade);
  letter-spacing: 0.08em;
}
.comp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.comp-tile {
  padding: 8px 6px;
  border-radius: 2px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  opacity: 0.55;
}
.comp-tile.unlocked {
  opacity: 1;
  border-style: solid;
  border-color: rgba(229, 190, 109, 0.45);
  background: linear-gradient(160deg, rgba(66, 203, 176, 0.09), var(--surface));
}
.comp-tile strong { display: block; font: 600 12px var(--zh-serif); color: var(--text-hi); }
.comp-tile small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

@media (max-width: 780px) {
  .cezi-form-grid, .mh-triple-grid, .hex64-top-pair, .hex-domains-grid, .lantern-wall-grid, .tale-shelf-bar {
    grid-template-columns: 1fr;
  }
  .comp-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   THREE.JS PROCEDURAL PBR 3D SANCTUARY STAGES (.sanctuary-3d-frame)
   ========================================================================== */
.sanctuary-3d-frame {
  position: relative;
  width: 100%;
  min-height: 225px;
  border-radius: 3px;
  border: 1px solid rgba(229, 190, 109, 0.36);
  background:
    radial-gradient(ellipse at 50% 42%, rgba(66, 203, 176, 0.16), transparent 62%),
    radial-gradient(ellipse at 50% 88%, rgba(229, 190, 109, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(6, 17, 16, 0.92), rgba(11, 28, 26, 0.96));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(66, 203, 176, 0.12), 0 14px 36px rgba(0, 0, 0, 0.32);
}
html[data-theme="paper"] .sanctuary-3d-frame {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(30, 79, 75, 0.24), transparent 65%),
    radial-gradient(ellipse at 50% 88%, rgba(168, 125, 42, 0.18), transparent 58%),
    linear-gradient(180deg, #162926, #0d1c1a);
  border-color: rgba(154, 114, 42, 0.55);
}
html[data-theme="crimson"] .sanctuary-3d-frame {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(196, 51, 36, 0.18), transparent 62%),
    radial-gradient(ellipse at 50% 88%, rgba(224, 183, 104, 0.14), transparent 55%),
    linear-gradient(180deg, #1b0d0c, #281310);
}
.sanctuary-3d-canvas {
  display: block;
  width: 100%;
  outline: none;
}
.badge-3d {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid rgba(229, 190, 109, 0.42);
  background: rgba(6, 17, 16, 0.72);
  color: #e5be6d;
  font: 600 11px var(--zh-serif);
  letter-spacing: 0.08em;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.relic-3d-showcase {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.relic-view-switch {
  display: flex;
  gap: 6px;
}
.relic-view-switch .mini-chip.active {
  border-color: var(--gold);
  background: rgba(229, 190, 109, 0.16);
  color: var(--gold);
}
.relic-photo-box {
  width: 100%;
  height: 240px;
  border-radius: 3px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #081210;
}
.relic-photo-box.hidden, .relic-3d-frame.hidden {
  display: none;
}
.relic-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   MUSEUM DARK-LUXURY HYBRID 3D PARALLAX & VOLUMETRIC FX STAGES
   ========================================================================== */
.cinema-3d-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #061110;
  cursor: grab;
  user-select: none;
}
.cinema-3d-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: filter 0.35s ease;
}
.cinema-3d-plate {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  display: block;
  transition: filter 0.45s ease;
}
.cinema-3d-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 46%, rgba(6, 17, 16, 0.78) 100%),
    linear-gradient(180deg, rgba(6, 17, 16, 0.35) 0%, transparent 24%, transparent 74%, rgba(6, 17, 16, 0.85) 100%);
}
.cinema-3d-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.25s ease;
}
.cinema-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
.cinema-3d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Real Unlit -> Real Photographed Burning Censer Crossfade + Classical 24-Spectrum Diagram */
.cinema-3d-plate-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.95s ease;
}
.cinema-3d-plate-alt.is-visible {
  opacity: 1;
}
.censer-lit-halo {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 34%, rgba(255, 160, 72, 0.22), transparent 52%);
  mix-blend-mode: screen;
  transition: opacity 0.9s ease;
}
.censer-lit-halo.is-lit {
  opacity: 1;
  animation: lanternBreathe 2.6s ease-in-out infinite alternate;
}
.incense-res-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.incense-spectrum-glyph {
  padding: 8px 12px;
  border-radius: 2px;
  border: 1px solid rgba(229, 190, 109, 0.38);
  background: rgba(6, 17, 16, 0.52);
  flex: none;
}
.incense-spec-cols {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 54px;
}
.incense-spec-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.incense-spec-col small {
  font: 500 10px var(--zh-serif);
  color: var(--muted);
}
.incense-spec-bar {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #ff6e2e 0%, #e5be6d 22%, #7d5b2d 100%);
  box-shadow: 0 0 8px rgba(255, 110, 46, 0.5);
}
.incense-spec-bar.h-1 { height: 18px; }
.incense-spec-bar.h-2 { height: 28px; }
.incense-spec-bar.h-3 { height: 38px; }

/* Antique Carved Bamboo Cylinder Shake Animation */
.cinema-3d-stage.is-shaking-real .cinema-3d-tilt {
  animation: realCylinderShake 0.42s ease-in-out;
}
@keyframes realCylinderShake {
  0%, 100% { transform: perspective(1000px) scale(1.03) rotateZ(0deg); }
  22% { transform: perspective(1000px) scale(1.06) translateX(-8px) rotateZ(-4.5deg); }
  50% { transform: perspective(1000px) scale(1.07) translateX(8px) rotateZ(4.5deg); }
  78% { transform: perspective(1000px) scale(1.05) translateX(-4px) rotateZ(-2.5deg); }
}

/* Moon Blocks 3D Toss Shockwave & HUD */
.cinema-3d-stage.is-tossing .cinema-3d-tilt {
  animation: jiaobeiTossCam 0.78s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes jiaobeiTossCam {
  0% { transform: perspective(950px) scale(1.03) rotateX(0deg); filter: brightness(1); }
  32% { transform: perspective(950px) scale(1.1) translateY(-10px) rotateX(12deg) rotateZ(-2.5deg); filter: brightness(1.18); }
  66% { transform: perspective(950px) scale(0.99) translateY(3px) rotateX(-5deg) rotateZ(1.2deg); filter: brightness(1.08); }
  100% { transform: perspective(950px) scale(1.03) rotateX(0deg); filter: brightness(1); }
}
.jiaobei-hud-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.jb-face-badge {
  padding: 4px 12px;
  border-radius: 2px;
  border: 1px solid rgba(229, 190, 109, 0.48);
  background: rgba(6, 17, 16, 0.78);
  color: #f4d898;
  font: 600 12px var(--zh-serif);
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}
.jb-face-badge.is-yang {
  border-color: rgba(66, 203, 176, 0.65);
  color: #79f0d6;
}

/* Cliffside Palace Lantern Live Elemental Bloom & Seal */
.lantern-aura-bloom {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  transition: background 0.5s ease;
  animation: lanternBreathe 3.2s ease-in-out infinite alternate;
}
@keyframes lanternBreathe {
  from { opacity: 0.72; }
  to { opacity: 1; }
}
.lantern-glyph-seal {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid rgba(229, 190, 109, 0.6);
  background: rgba(6, 17, 16, 0.74);
  color: #f3d284;
  font: 400 24px/1 var(--calligraphy);
  text-shadow: 0 0 12px rgba(229, 190, 109, 0.55);
  backdrop-filter: blur(6px);
}

/* Consecrated Relic Pedestal Spotlight */
.relic-pedestal-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 92%, rgba(229, 190, 109, 0.24), transparent 55%);
  pointer-events: none;
}

/* ==========================================================================
   UNIVERSAL POST-READING COMPLETE REPORT & 7-DAY ACTION PLAYBOOK
   ========================================================================== */
.playbook-scroll {
  margin-top: 16px;
  padding: 18px 18px 16px;
  border-radius: 3px;
  border: 1px solid rgba(229, 190, 109, 0.42);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(66, 203, 176, 0.08), transparent 52%),
    linear-gradient(168deg, var(--surface), var(--deep));
  text-align: left;
  width: 100%;
}
.pb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.pb-title {
  margin: 4px 0 4px;
  font: 600 18px/1.35 var(--zh-serif);
  color: var(--text-hi);
}
.pb-oneliner {
  margin: 0;
  font: 500 13.5px/1.6 var(--zh-serif);
  color: var(--accent);
}
.pb-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pb-progress-pill {
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid rgba(66, 203, 176, 0.45);
  background: rgba(66, 203, 176, 0.1);
  color: var(--jade);
  font: 600 11.5px var(--zh-serif);
}
.compact-btn {
  padding: 7px 14px !important;
  font-size: 12px !important;
  min-height: 34px !important;
}
.pb-prog-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
}
.pb-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width 0.35s ease;
}

.pb-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.pb-summary-card {
  padding: 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pb-card-tag {
  display: block;
  font: 600 11px var(--zh-serif);
  letter-spacing: 0.08em;
  color: var(--jade);
  margin-bottom: 5px;
}
.pb-card-tag.warn { color: var(--vermilion); }
.pb-summary-card p {
  margin: 0;
  font: 400 12.5px/1.6 var(--zh-serif);
  color: var(--text-hi);
}
.pb-summary-card small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.pb-compass-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.pb-compass-chip {
  padding: 9px 10px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(229, 190, 109, 0.05);
}
.pb-compass-chip span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 3px;
}
.pb-compass-chip strong {
  display: block;
  font: 600 12px/1.4 var(--zh-serif);
  color: var(--gold);
}

.pb-sec-heading {
  margin: 12px 0 8px;
  font: 600 13px var(--zh-serif);
  color: var(--text-hi);
  letter-spacing: 0.06em;
}
.pb-sec-heading.warn { color: var(--vermilion); }

.pb-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.pb-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}
.pb-check-item:hover { border-color: rgba(229, 190, 109, 0.48); }
.pb-check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--jade);
  flex: none;
  cursor: pointer;
}
.pb-check-item.is-done {
  border-color: rgba(66, 203, 176, 0.42);
  background: rgba(66, 203, 176, 0.07);
}
.pb-check-item.is-done .pb-check-top strong {
  text-decoration: line-through;
  opacity: 0.72;
}
.pb-check-body { flex: 1; min-width: 0; }
.pb-check-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 3px;
}
.pb-day-pill {
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid rgba(229, 190, 109, 0.42);
  color: var(--gold);
  font: 600 10.5px var(--zh-serif);
  white-space: nowrap;
}
.pb-check-top strong { font: 600 13px var(--zh-serif); color: var(--text-hi); }
.pb-en-inline { font-size: 11px; color: var(--muted); }
.pb-check-body p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.pb-red-box {
  padding: 11px 13px;
  border-radius: 3px;
  border-left: 3px solid var(--vermilion);
  background: rgba(196, 51, 36, 0.08);
  margin-bottom: 12px;
}
.pb-red-box strong {
  display: block;
  font: 600 12px var(--zh-serif);
  color: var(--vermilion);
  margin-bottom: 5px;
}
.pb-red-box ul, .pb-red-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink);
}
.pb-red-list small { display: block; color: var(--muted); font-size: 11px; }

.pb-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.pb-modal-tasks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pb-modal-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.pb-modal-task-row strong { display: block; font: 600 13.5px var(--zh-serif); color: var(--text-hi); margin-bottom: 2px; }
.pb-modal-task-row p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

@media (max-width: 820px) {
  .pb-summary-grid { grid-template-columns: 1fr; }
  .pb-compass-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  body.printing-playbook > *:not(#dialog-playbook) { display: none !important; }
  body.printing-playbook #dialog-playbook {
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    border: 0 !important;
    background: #fff !important;
    color: #111 !important;
  }
  body.printing-playbook .no-print,
  body.printing-playbook .dialog-header { display: none !important; }
}

/* ==========================================================================
   LUXURY MINIMALIST COVER REDESIGN — Serene Hierarchy & 3-Realm Museum Gallery
   ========================================================================== */
.hero-minimal {
  min-height: 540px !important;
  display: flex;
  align-items: center;
}
.hero-minimal-copy {
  max-width: 560px;
  padding: 52px 44px 44px !important;
}
.hero-minimal-copy h1 {
  margin: 10px 0 12px;
  font: 600 clamp(26px, 3vw, 36px)/1.25 var(--zh-serif);
  letter-spacing: 0.08em;
  color: var(--text-hi);
}
.hero-minimal-copy .hero-zh-sub {
  margin: 0 0 28px;
  font: 400 14.5px/1.7 var(--zh-serif);
  color: rgba(235, 228, 210, 0.82);
}
html[data-theme="paper"] .hero-minimal-copy .hero-zh-sub {
  color: rgba(242, 236, 222, 0.88);
}
.hero-clean-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px !important;
}
.hero-whisper-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(229, 190, 109, 0.22);
  font: 400 13px/1.5 var(--zh-serif);
  color: rgba(226, 218, 200, 0.86);
}
.hero-whisper-label {
  padding: 2px 7px;
  border: 1px solid rgba(196, 51, 36, 0.65);
  color: #f08a7a;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.hero-whisper-text {
  color: #f3e6cc;
  font-weight: 500;
}
.hero-whisper-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  font: 500 12.5px var(--zh-serif);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.hero-whisper-link:hover {
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Chapter I: Three Sanctuary Realms Museum Triptych */
.realms-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.realm-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--deep));
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.realm-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}
.realm-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #061110;
}
.realm-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.realm-card:hover .realm-photo img {
  transform: scale(1.05);
}
.realm-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 17, 16, 0.86) 100%);
  pointer-events: none;
}
.realm-index {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid rgba(229, 190, 109, 0.45);
  background: rgba(6, 17, 16, 0.78);
  color: #e5be6d;
  font: 600 11px var(--zh-serif);
  letter-spacing: 0.1em;
}
.realm-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}
.realm-body h3 {
  margin: 0 0 8px;
  font: 600 18px/1.35 var(--zh-serif);
  color: var(--text-hi);
}
.realm-body p {
  margin: 0 0 16px;
  font: 400 13px/1.68 var(--zh-serif);
  color: var(--muted);
  flex: 1;
}
.realm-cta {
  font: 600 12.5px var(--zh-serif);
  color: var(--gold);
  letter-spacing: 0.08em;
}
.realm-card:hover .realm-cta {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Extra serene spacing between Cover chapters */
.discovery > section + section {
  margin-top: 52px;
}

@media (max-width: 900px) {
  .realms-triptych { grid-template-columns: 1fr; }
  .hero-minimal-copy { padding: 32px 20px 28px !important; }
}

@media (max-width: 640px) {
  .masthead {
    flex-wrap: wrap;
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }
  .masthead-actions {
    width: 100%;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .masthead .guofeng-palette-bar {
    flex-wrap: nowrap;
    max-width: 100%;
  }
  .masthead .palette-btn {
    padding: 4px 7px;
    font-size: 11px;
  }
  .masthead .icon-button {
    padding: 4px 8px;
    font-size: 11.5px;
  }
}

.hero-whisper-zh {
  font: 400 12px var(--zh-serif);
  color: rgba(212, 200, 174, 0.72);
}

/* ==========================================================================
   INNER HALL DECLUTTER: SCENE MORE MENU, 1-ROW MASTER STRIP,
   4-TAB READING DECK & BILINGUAL CEZI CHIPS
   ========================================================================== */
.scene-more-menu {
  position: relative;
}
.scene-more-menu > summary {
  list-style: none;
  cursor: pointer;
}
.scene-more-menu > summary::-webkit-details-marker { display: none; }
.scene-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 248px;
  padding: 8px;
  border-radius: 14px;
  background: var(--surface-elevated, rgba(10, 23, 21, 0.96));
  border: 1px solid rgba(214, 179, 108, 0.34);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 4px;
  z-index: 90;
}
[data-theme="paper"] .scene-more-panel {
  background: rgba(251, 246, 236, 0.98);
  border-color: rgba(139, 98, 43, 0.28);
  box-shadow: 0 18px 40px rgba(42, 30, 14, 0.16);
}
.scene-more-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink);
  font: 500 12.5px/1.35 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.scene-more-item:hover {
  background: rgba(214, 179, 108, 0.14);
  color: var(--gold);
}

/* Compact 1-Row Master Quick Switcher inside Left Sidebar */
.master-mini-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0 4px;
}
.master-mini-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid rgba(214, 179, 108, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.16s, background 0.2s;
}
.master-mini-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1.5px solid rgba(214, 179, 108, 0.35);
}
.master-mini-avatar span {
  font-size: 10.5px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.master-mini-avatar:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  color: var(--ink);
}
.master-mini-avatar.active {
  border-color: var(--gold);
  background: rgba(214, 179, 108, 0.14);
  color: var(--gold);
}
.master-mini-avatar.active img {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(214, 179, 108, 0.25);
}

/* 4-Tab Post-Reading Workspace Deck */
.reading-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reading-deck-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(214, 179, 108, 0.22);
}
[data-theme="paper"] .reading-deck-tabs {
  background: rgba(139, 98, 43, 0.07);
}
.reading-deck-tab {
  flex: 1 1 auto;
  min-width: 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.reading-deck-tab:hover {
  color: var(--ink);
  background: rgba(214, 179, 108, 0.08);
}
.reading-deck-tab.is-active {
  background: linear-gradient(135deg, rgba(214, 179, 108, 0.22), rgba(107, 196, 174, 0.12));
  border-color: rgba(214, 179, 108, 0.48);
  color: var(--ink);
}
.reading-deck-tab .rdt-en {
  font-size: 12.5px;
  font-weight: 600;
}
.reading-deck-tab .rdt-zh {
  font-family: var(--zh-serif);
  font-size: 11.5px;
  opacity: 0.78;
}
.reading-deck-tab .rdt-badge {
  font-style: normal;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(214, 179, 108, 0.18);
  color: var(--gold);
}
.reading-deck-pane.hidden {
  display: none !important;
}

/* Bilingual Cezi Glyph Quick Chips */
.cezi-chip-bilingual {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 62px !important;
  height: auto !important;
  padding: 7px 9px !important;
}
.cezi-chip-bilingual strong {
  font-family: var(--zh-serif);
  font-size: 17px;
  line-height: 1.1;
}
.cezi-chip-bilingual span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.03em;
  opacity: 0.82;
}
.cezi-mapped-note {
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(107, 196, 174, 0.12);
  border: 1px solid rgba(107, 196, 174, 0.32);
  color: var(--jade, #6bc4ae);
  font-size: 12.5px;
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .guoxue-plaque-cta,
  .guoxue-bronze-cta {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    padding: 13px 16px;
  }
  .choice-drawer {
    position: static !important;
    margin-top: 8px;
  }
  .scene-bar {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .scene-bar #scene-context {
    font-size: 12px;
  }
  .reading-deck-tab {
    min-width: 44%;
    padding: 8px 8px;
  }
  .reading-deck-tab .rdt-zh { display: none; }
}

/* ==========================================================================
   TASTE-SKILL 2.5 ANTI-SLOP EDITORIAL SYSTEM
   Flat architectural grounds · Newsreader + Hanken Grotesk + Noto Serif SC
   Equal 1280px wrap · Zero photo captions/stickers · One accent (#9e2b1e)
   ========================================================================== */
:root {
  --display: "Newsreader", "Noto Serif SC", Georgia, serif;
  --serif: "Newsreader", "Noto Serif SC", Georgia, serif;
  --zh-serif: "Noto Serif SC", "Songti SC", serif;
  --calligraphy: "Noto Serif SC", "Songti SC", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Default Ground: Warm Museum Alabaster (Paper · 宣纸素底) */
html[data-theme="paper"] {
  color-scheme: light;
  --bg: #f6f2ea;
  --surface: #efeae0;
  --surface-2: #e6dfd2;
  --deep: #faf7f1;
  --bar-bg: #f6f2ea;
  --pill-bg: #faf7f1;
  --card-grad: #faf7f1;
  --line: rgba(24, 23, 20, 0.13);
  --line-2: rgba(24, 23, 20, 0.28);
  --text-hi: #181714;
  --ink: #2b2823;
  --muted: #655f55;
  --paper: #181714;
  --accent: #9e2b1e;
  --accent-ink: #faf7f1;
  --accent-soft: rgba(158, 43, 30, 0.08);
  --gold: #8a6225;
  --vermilion: #9e2b1e;
  --vermilion-soft: rgba(158, 43, 30, 0.09);
  --jade: #24574e;
  --shadow: none;
}

/* Dark Gallery Mode: Matte Obsidian Ink (No neon cyan, no glowing blobs) */
html[data-theme="night"] {
  color-scheme: dark;
  --bg: #121110;
  --surface: #1a1917;
  --surface-2: #23211e;
  --deep: #0e0d0c;
  --bar-bg: #121110;
  --pill-bg: #1a1917;
  --card-grad: #1a1917;
  --line: rgba(244, 239, 230, 0.12);
  --line-2: rgba(244, 239, 230, 0.26);
  --text-hi: #f4efe6;
  --ink: #ddd6ca;
  --muted: #9e968a;
  --paper: #f4efe6;
  --accent: #c89d55;
  --accent-ink: #121110;
  --accent-soft: rgba(200, 157, 85, 0.12);
  --spirit: #c89d55;
  --spirit-soft: rgba(200, 157, 85, 0.12);
  --gold: #c89d55;
  --vermilion: #b84233;
  --jade: #78a89a;
  --shadow: none;
}

/* Remove glowing blobs & floating canvas noise from the flat gallery background */
body.taste-editorial {
  background: var(--bg) !important;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
body.taste-editorial .ambient,
body.taste-editorial .ambient-canvas {
  display: none !important;
}
body.taste-editorial .shell {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 24px;
  z-index: 200;
  background: var(--text-hi);
  color: var(--bg);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
}
.skip-link:focus { top: 14px; }

.taste-wrap {
  width: min(100% - 160px, 1280px);
  margin: 0 auto;
}

/* Fixed Opaque Architectural Header (72px, 1px hairline, zero blur/pills) */
header.masthead.taste-nav {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 0 !important;
  background: var(--bg) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important;
  z-index: 60;
  display: flex;
  align-items: center;
}
body.in-experience header.masthead.taste-nav {
  display: none !important;
}
.taste-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.taste-nav .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-hi);
}
.taste-nav .seal-chop {
  width: 28px !important;
  height: 28px !important;
  border-radius: 2px !important;
  background: var(--vermilion) !important;
  color: #faf7f1 !important;
  border: none !important;
  box-shadow: none !important;
  font-family: var(--zh-serif);
  font-size: 14px;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.taste-nav .brand-words {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.taste-nav .brand {
  font-family: var(--display) !important;
  font-weight: 400 !important;
  font-size: 20px !important;
  letter-spacing: -0.015em !important;
  text-transform: none !important;
  color: var(--text-hi) !important;
}
.taste-nav .brand-words small {
  font-family: var(--zh-serif) !important;
  font-size: 13px !important;
  letter-spacing: 0.04em !important;
  color: var(--muted) !important;
}

.taste-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.taste-nav-link,
.taste-text-btn {
  background: transparent;
  border: none;
  padding: 6px 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.16s;
}
.taste-nav-link::after,
.taste-inline-link::after,
.taste-tile-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.taste-nav-link:hover,
.taste-text-btn:hover {
  color: var(--text-hi);
}
.taste-nav-link:hover::after {
  transform: scaleX(1);
}

.taste-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.taste-theme-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.taste-theme-switch .palette-btn {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  padding: 5px 10px !important;
  font-family: var(--sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.taste-theme-switch .palette-btn.active {
  background: var(--text-hi) !important;
  color: var(--bg) !important;
}

/* Strict Single Button Family (44px tall, 2px radius, zero gradient/shadow) */
.taste-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s, border-color 0.16s, transform 0.12s;
}
.taste-btn:active { transform: translateY(1px); }
.taste-btn--primary {
  background: var(--text-hi);
  color: var(--bg);
  border: 1px solid var(--text-hi);
}
.taste-btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.taste-btn--secondary {
  background: transparent;
  color: var(--text-hi);
  border: 1px solid var(--line-2);
}
.taste-btn--secondary:hover {
  border-color: var(--text-hi);
  background: rgba(24, 23, 20, 0.04);
}
html[data-theme="night"] .taste-btn--secondary:hover {
  background: rgba(244, 239, 230, 0.06);
}
.taste-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Screen 1: Split Editorial Hero (100svh, equal edges, zero clutter over photo) */
.taste-cover {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}
.taste-cover > section + section {
  margin-top: 0 !important;
}
.taste-hero {
  min-height: 100svh;
  padding: 120px 0 64px;
  display: flex;
  align-items: center;
  background: var(--bg);
}
.taste-hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
}
.taste-hero-copy {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.taste-kicker {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.taste-hero-copy h1 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 4.4vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text-hi);
}
.taste-hero-lead {
  margin: 0 0 32px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.58;
  color: var(--ink);
  max-width: 48ch;
}
.taste-hero-meta {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.taste-inline-link {
  background: none;
  border: none;
  padding: 0 0 2px;
  color: var(--text-hi);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  position: relative;
  transition: color 0.16s, border-color 0.16s;
}
.taste-inline-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.taste-hero-media {
  grid-column: 7 / span 6;
  aspect-ratio: 4 / 3;
  max-height: calc(100svh - 184px);
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface);
}
.taste-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Editorial Content Sections (One section per screen feel, flat alternating grounds) */
.taste-section {
  padding: 112px 0;
  background: var(--bg);
}
.taste-section--alt {
  background: var(--surface);
}
.taste-sec-head {
  margin-bottom: 48px;
  max-width: 780px;
}
.taste-sec-head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.taste-sec-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.022em;
  color: var(--text-hi);
  max-width: 28ch;
}
.taste-muted {
  color: var(--muted);
}
.taste-sec-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Open Editorial Grids (Equal edges, zero box-in-box borders, quiet hover) */
.taste-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.taste-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.taste-tile,
.taste-master-tile {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: transform 0.22s var(--ease);
}
.taste-tile:hover,
.taste-master-tile:hover {
  transform: translateY(-2px);
}
.taste-tile-photo,
.taste-master-photo,
.taste-relic-photo {
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-2);
  margin-bottom: 18px;
}
.taste-tile-photo { aspect-ratio: 4 / 3; }
.taste-master-photo { aspect-ratio: 4 / 5; }
.taste-relic-photo { aspect-ratio: 1 / 1; }

.taste-tile-photo img,
.taste-master-photo img,
.taste-relic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s var(--ease);
}
.taste-master-photo img { object-position: center 15%; }
.taste-tile:hover .taste-tile-photo img,
.taste-master-tile:hover .taste-master-photo img,
.taste-relic-tile:hover .taste-relic-photo img {
  transform: scale(1.03);
}

.taste-tile-body,
.taste-master-meta,
.taste-relic-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.taste-tile-body h3,
.taste-master-meta h3,
.taste-relic-head h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-hi);
}
.taste-zh-label {
  margin: 0 0 10px;
  font-family: var(--zh-serif);
  font-size: 13px;
  color: var(--muted);
}
.taste-tile-body p:not(.taste-zh-label),
.taste-master-hook,
.taste-relic-desc {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.56;
  color: var(--ink);
  flex: 1;
}
.taste-tile-link {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-hi);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.taste-tile:hover .taste-tile-link,
.taste-master-tile:hover .taste-tile-link {
  color: var(--accent);
  border-color: var(--accent);
}

.taste-relic-tile {
  display: flex;
  flex-direction: column;
  transition: transform 0.22s var(--ease);
}
.taste-relic-tile:hover { transform: translateY(-2px); }
.taste-relic-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.taste-relic-price {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-hi);
  white-space: nowrap;
}
.taste-relic-meta .taste-inline-link {
  align-self: flex-start;
}

/* Digital Editions & Reading Services Cards (Zero Physical Goods, Clean Museum Pricing) */
.taste-edition-tile {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: transform 0.22s var(--ease), border-color 0.2s;
}
.taste-edition-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}
.taste-edition-tile.is-flagship {
  border-top: 2px solid var(--accent);
}
.taste-edition-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.taste-edition-kind {
  font-family: var(--zh-serif);
  font-size: 13px;
  color: var(--muted);
}
.taste-edition-tile.is-flagship .taste-edition-kind {
  color: var(--accent);
  font-weight: 500;
}
.taste-edition-price {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.taste-edition-price strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  color: var(--text-hi);
}
.taste-edition-price span {
  font-size: 13px;
  color: var(--muted);
}
.taste-edition-tile h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.26;
  color: var(--text-hi);
}
.taste-edition-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 22px;
  display: grid;
  gap: 9px;
  flex: 1;
}
.taste-edition-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}
.taste-edition-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 1px;
  background: var(--muted);
}

/* Closing & Footer */
.taste-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 88px 0 48px;
}
.taste-footer-close {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.taste-footer-close h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  color: var(--text-hi);
}
.taste-footer-close p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 52ch;
}
.taste-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.taste-footer-brand strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  color: var(--text-hi);
  margin-bottom: 4px;
}
.taste-footer-brand span {
  font-size: 13px;
  color: var(--muted);
}
.taste-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

/* Inner Hall (#experience) Refinement on Paper & Matte Ink */
html[data-theme="paper"] .scene-bar,
html[data-theme="night"] .scene-bar {
  background: var(--bg) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important;
}
html[data-theme="paper"] .character-card,
html[data-theme="paper"] .artifact-stage,
html[data-theme="paper"] .bubble.master,
html[data-theme="paper"] .composer,
html[data-theme="night"] .character-card,
html[data-theme="night"] .artifact-stage,
html[data-theme="night"] .bubble.master {
  background: var(--deep) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
html[data-theme="paper"] .hall-tab.active,
html[data-theme="night"] .hall-tab.active {
  background: var(--text-hi) !important;
  color: var(--bg) !important;
  border-color: var(--text-hi) !important;
}
html[data-theme="paper"] .btn-vermilion {
  background: var(--vermilion) !important;
  color: #faf7f1 !important;
  border: 1px solid var(--vermilion) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}

/* Responsive Tablet & Mobile Breakpoints (1024, 768, 390) */
@media (max-width: 1080px) {
  .taste-wrap { width: min(100% - 64px, 1280px); }
  .taste-nav-links { gap: 18px; }
  .taste-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .taste-nav-links { display: none; }
  .taste-hero { min-height: auto; padding: 104px 0 56px; }
  .taste-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .taste-hero-copy,
  .taste-hero-media { grid-column: 1 / -1; }
  .taste-grid-3 { grid-template-columns: 1fr; gap: 36px; }
  .taste-sec-head--row,
  .taste-footer-close { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .taste-wrap { width: calc(100% - 36px); }
  header.masthead.taste-nav {
    height: 64px !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
  }
  .taste-nav-inner {
    flex-wrap: nowrap !important;
    gap: 8px;
  }
  .taste-nav .brand-lockup { gap: 8px; min-width: 0; }
  .taste-nav .brand { font-size: 16.5px !important; white-space: nowrap; }
  .taste-nav .brand-words small,
  #btn-treasury-cover,
  #btn-bag-cover,
  #settings-jump { display: none !important; }
  .taste-nav .masthead-actions.taste-nav-actions {
    width: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 8px;
    flex-shrink: 0;
  }
  .taste-theme-switch .palette-btn { padding: 4px 7px !important; font-size: 12px !important; }
  #btn-nav-primary { height: 36px; padding: 0 12px; font-size: 13px; }
  .taste-hero { padding: 88px 0 48px; }
  .taste-hero-copy h1 { font-size: 36px; }
  .taste-hero-meta { gap: 10px 18px; }
  .taste-btn-row { width: 100%; flex-direction: column; align-items: stretch; }
  .taste-btn-row .taste-btn { width: 100%; }
  .taste-section { padding: 64px 0; }
  .taste-grid-4 { grid-template-columns: 1fr; gap: 32px; }
  .taste-footer { padding: 56px 0 36px; }
}
