/* =============================================================
 * 嗳呀口腔 · 微观宇宙 — main.css
 * 暗夜珍珠视觉系统：墨蓝深海底色 / 章节色谱 / 衬线大字 /
 * 玻璃数据卡 / 发丝线 / 胶片颗粒 / 智能光标形态机
 * z 轴刻度：canvas 0 · vignette 1 · 内容 2 · 导航 30 ·
 *           grain 40 · toast 65 · 光标 60 · 加载幕 70
 * ============================================================= */

/* ---------- 令牌 ---------- */
:root {
  --bg: #040d16;
  --bg-soft: #071626;
  --ink: #e8f4fa;
  --ink-dim: #b9d3e0;
  --line: rgba(233, 246, 252, 0.14);
  --glass: rgba(8, 22, 38, 0.72);
  --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --acc: #57c8f2;
  --acc-rgb: 87, 200, 242;
}

/* 章节色谱：滚动即换季 */
body[data-section="0"] { --acc: #57c8f2; --acc-rgb: 87, 200, 242; }
body[data-section="1"] { --acc: #7fe8c8; --acc-rgb: 127, 232, 200; }
body[data-section="2"] { --acc: #ffab5e; --acc-rgb: 255, 171, 94; }
body[data-section="3"] { --acc: #ff8ab0; --acc-rgb: 255, 138, 176; }
body[data-section="4"] { --acc: #6ff2e2; --acc-rgb: 111, 242, 226; }
body[data-section="5"] { --acc: #ffd98f; --acc-rgb: 255, 217, 143; }

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.95;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--acc); color: #05131f; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #04101c; }
::-webkit-scrollbar-thumb { background: rgba(233, 246, 252, 0.18); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(233, 246, 252, 0.32); }

a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 6px;
}

html.custom-cursor, html.custom-cursor * { cursor: none !important; }

/* ---------- 工具类 ---------- */
.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 80;
  padding: 10px 18px;
  background: var(--acc);
  color: #04131f;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.3s var(--ease-out);
}
.skip:focus { top: 14px; }

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

/* ---------- 画布与氛围层 ---------- */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* WebGL 彻底不可用时的 CSS 星云兜底 */
.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  background:
    radial-gradient(60% 50% at 30% 22%, rgba(87, 200, 242, 0.16), transparent 62%),
    radial-gradient(50% 45% at 74% 68%, rgba(255, 138, 176, 0.11), transparent 60%),
    #04101c;
}
body.gl-dead .nebula { opacity: 1; }
body.gl-dead #gl { display: none; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 92% at 50% 44%, transparent 52%, rgba(2, 7, 12, 0.58) 100%);
}

.grain {
  position: fixed;
  inset: -100%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3%, -6%); }
  20% { transform: translate(-8%, 3%); }
  30% { transform: translate(4%, -8%); }
  40% { transform: translate(-3%, 10%); }
  50% { transform: translate(-8%, 4%); }
  60% { transform: translate(9%, 0); }
  70% { transform: translate(0, 7%); }
  80% { transform: translate(3%, 11%); }
  90% { transform: translate(-6%, 4%); }
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 44px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s var(--ease-out) 0.15s;
}
html.loading .topbar { opacity: 0; transform: translateY(-14px); }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark { width: 17px; height: 21px; color: var(--acc); transition: color 0.9s ease; }
.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.14em;
  line-height: 1.25;
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.42em;
  color: var(--ink-dim);
}

.top-actions { display: flex; align-items: center; gap: 14px; }

#audio-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(9, 26, 42, 0.4);
  backdrop-filter: blur(8px);
  color: var(--ink-dim);
  transition: color 0.3s, border-color 0.3s;
}
#audio-toggle:hover { color: var(--ink); border-color: rgba(233, 246, 252, 0.4); }
.eq { width: 20px; height: 20px; }
.eq-b { fill: currentColor; }
html.audio-on .eq-b {
  animation: eq-bounce 1.1s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
html.audio-on .eq-b1 { animation-delay: 0s; }
html.audio-on .eq-b2 { animation-delay: 0.28s; }
html.audio-on .eq-b3 { animation-delay: 0.5s; }
@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1.15); }
}

.cta-mini {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 20px;
  border: 1px solid rgba(233, 246, 252, 0.3);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.cta-mini:hover {
  background: var(--acc);
  border-color: transparent;
  color: #05131f;
}

/* ---------- 章节圆点导航 ---------- */
.dots {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.7s ease 0.3s;
}
html.loading .dots { opacity: 0; }

.dots a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row-reverse;
  gap: 10px;
  text-decoration: none;
  padding: 4px;
}
.dots a i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(233, 246, 252, 0.28);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.dots a span {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s, transform 0.3s, color 0.3s;
}
.dots a:hover span,
.dots a:focus-visible span { opacity: 1; transform: none; }
.dots a.active i {
  background: var(--acc);
  box-shadow: 0 0 14px rgba(var(--acc-rgb), 0.9);
  transform: scale(1.3);
}
.dots a.active span { opacity: 1; transform: none; color: var(--ink); }

/* ---------- 顶部进度发丝线 ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 31;
  background: rgba(233, 246, 252, 0.06);
}
#progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #57c8f2, rgba(var(--acc-rgb), 1));
}

/* ---------- 场景 ---------- */
.scene {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(88px, 13vh, 160px) clamp(20px, 7vw, 120px);
  overflow: hidden;
}
.scene-inner {
  width: min(1120px, 100%);
  margin-inline: auto;
  position: relative;
}
/* 可读性暗幕：粒子宇宙退到文字身后半格 */
.scene-inner::before {
  content: '';
  position: absolute;
  inset: -9% -7%;
  z-index: -1;
  background: radial-gradient(60% 64% at 36% 48%,
    rgba(3, 10, 18, 0.92) 0%,
    rgba(3, 10, 18, 0.66) 46%,
    rgba(3, 10, 18, 0) 76%);
  pointer-events: none;
}
.hero .scene-inner::before {
  background: radial-gradient(54% 62% at 50% 50%,
    rgba(3, 10, 18, 0.94) 0%,
    rgba(3, 10, 18, 0.66) 48%,
    rgba(3, 10, 18, 0) 77%);
}

/* 背景章印 */
.bg-glyph {
  position: absolute;
  top: 50%;
  right: -4vw;
  transform: translateY(-50%);
  z-index: -1;
  font-family: var(--serif);
  font-size: clamp(15rem, 38vw, 30rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 244, 250, 0.09);
  pointer-events: none;
  user-select: none;
}

/* ---------- 排版元素 ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.5em;
  color: var(--acc);
  transition: color 0.9s ease;
}
.eyebrow em { font-style: normal; color: var(--ink-dim); margin: 0 4px; }

.idx {
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--ink-dim);
}
.idx b {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--acc);
  margin-right: 12px;
  transition: color 0.9s ease;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 1.22;
  letter-spacing: 0.07em;
  margin: 0.4em 0 0.55em;
  text-shadow: 0 2px 28px rgba(2, 8, 14, 0.72), 0 1px 2px rgba(2, 8, 14, 0.4);
}
.hero .display { font-size: clamp(3rem, 11vw, 8rem); letter-spacing: 0.1em; }

/* 小字面元素统一加极轻暗缘，粒子再亮也咬得住 */
.eyebrow, .idx, .brand-name small, .dots a span {
  text-shadow: 0 1px 3px rgba(2, 8, 14, 0.6);
}

.lede, .prose {
  font-size: clamp(16.5px, 2vw, 19px);
  line-height: 2.05;
  color: #dcebf3;
  max-width: 34em;
  text-shadow: 0 1px 2px rgba(2, 8, 14, 0.55);
}
.prose strong, .lede strong {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid rgba(var(--acc-rgb), 0.55);
  transition: border-color 0.9s ease;
}

.aside-note {
  margin-top: 30px;
  padding-left: 16px;
  border-left: 2px solid var(--acc);
  font-size: 15px;
  color: var(--ink-dim);
  max-width: 30em;
  transition: border-color 0.9s ease;
}

/* ---------- 序章 ---------- */
.hero .scene-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero .lede { margin-inline: auto; }

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 7vh;
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.scroll-hint:hover { color: var(--acc); }
.scroll-hint svg { width: 16px; height: 16px; animation: hint-bob 2.2s ease-in-out infinite; }
@keyframes hint-bob {
  0%, 100% { transform: translateY(-3px); opacity: 0.7; }
  50% { transform: translateY(3px); opacity: 1; }
}

/* ---------- 玻璃数据卡 ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
  padding: 0;
  list-style: none;
}
.chip {
  min-width: 138px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
}
.chip b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  color: var(--acc);
  font-variant-numeric: tabular-nums;
  transition: color 0.9s ease;
}
.chip b i {
  font-style: normal;
  font-size: 0.45em;
  margin-left: 3px;
  opacity: 0.85;
}
.chip span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-shadow: 0 1px 2px rgba(2, 8, 14, 0.5);
}

/* ---------- 龋齿实验室 ---------- */
.lab {
  margin-top: 36px;
  max-width: 580px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}
.lab.lab-done {
  border-color: rgba(var(--acc-rgb), 0.75);
  box-shadow: 0 0 34px rgba(var(--acc-rgb), 0.14);
}
.lab-title {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--acc);
  transition: color 0.9s ease;
}
.lab-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.ring-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  flex: none;
}
.ring { width: 100%; height: 100%; }
.ring-bg {
  fill: none;
  stroke: rgba(233, 246, 252, 0.22);
  stroke-width: 4;
}
.ring-fg {
  fill: none;
  stroke: var(--acc);
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.25s ease, stroke 0.9s ease;
  filter: drop-shadow(0 0 5px rgba(var(--acc-rgb), 0.7));
}
.clean-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.lab-side { display: flex; flex-direction: column; gap: 12px; }
.lab-status { font-size: 14px; color: var(--ink-dim); text-shadow: 0 1px 2px rgba(2, 8, 14, 0.5); transition: color 0.4s; }
.lab-done .lab-status { color: var(--acc); }

#brush-btn {
  align-self: flex-start;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  transition: color 0.3s, border-color 0.3s;
}
#brush-btn:hover { color: var(--ink); border-color: rgba(233, 246, 252, 0.4); }
#brush-btn:disabled { opacity: 0.4; }

/* ---------- 防线清单 ---------- */
.ritual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 780px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
}
.ritual li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid rgba(233, 246, 252, 0.12);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.ritual li svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--ink-dim);
  transition: color 0.25s;
}
.ritual li b {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.ritual li span { display: block; font-size: 12.5px; color: var(--ink-dim); line-height: 1.7; text-shadow: 0 1px 2px rgba(2, 8, 14, 0.5); }
.ritual li:hover, .ritual li:focus-visible, .ritual li.lit {
  border-color: rgba(var(--acc-rgb), 0.65);
  background: rgba(12, 34, 52, 0.72);
  box-shadow: 0 0 26px rgba(var(--acc-rgb), 0.12);
  transform: translate3d(5px, 0, 0);
}
.ritual li:hover svg, .ritual li:focus-visible svg, .ritual li.lit svg { color: var(--acc); }

/* ---------- 终章行动 ---------- */
.finale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 15.5px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: filter 0.25s, border-color 0.3s, color 0.3s;
}
.btn-primary {
  background: var(--acc);
  color: #05131f;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.12) drop-shadow(0 0 18px rgba(var(--acc-rgb), 0.45)); }
.btn-primary svg, .btn-ghost svg { width: 18px; height: 18px; }
.btn-ghost { border: 1px solid rgba(233, 246, 252, 0.3); color: var(--ink); }
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 90px clamp(20px, 7vw, 120px) 44px;
  border-top: 1px solid rgba(233, 246, 252, 0.1);
  background: linear-gradient(180deg, rgba(4, 13, 22, 0.25), rgba(3, 9, 16, 0.88));
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 42px;
  max-width: 1100px;
  margin-inline: auto;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-mark { width: 20px; height: 25px; color: var(--acc); flex: none; }
.footer-brand p { font-family: var(--serif); font-size: 17px; letter-spacing: 0.14em; line-height: 1.6; }
.footer-brand p span {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--ink-dim);
}
.site-footer address { font-style: normal; }
.site-footer address p, .footer-meta p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 2;
}
.site-footer address svg { width: 16px; height: 16px; color: var(--acc); flex: none; }
.site-footer address a { color: var(--ink); text-decoration: none; transition: color 0.3s; }
.site-footer address a:hover { color: var(--acc); }
.footer-sep {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 12px;
}
.footer-meta { align-self: end; }
.footer-meta p { font-size: 12.5px; display: block; }
.tech-note { letter-spacing: 0.12em; }
.disclaimer {
  max-width: 1100px;
  margin: 46px auto 0;
  padding-top: 22px;
  border-top: 1px dashed rgba(233, 246, 252, 0.14);
  font-size: 12px;
  line-height: 2;
  color: rgba(185, 211, 224, 0.85);
}

/* ---------- 入场编排（仅 JS 就绪后启用；脚本加载失败时内容直接可见） ---------- */
html.js .fx {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  filter: blur(5px);
  transition:
    opacity 0.9s ease,
    transform 0.95s var(--ease-out),
    filter 0.9s ease;
  transition-delay: calc(var(--i, 0) * 95ms);
}
html.js .in-view .fx {
  opacity: 1;
  transform: none;
  filter: none;
}
/* 拆字标题：块级只管淡入淡出，位移交给字符 */
html.js .fx[data-split] {
  transform: none;
  transition-property: opacity, filter;
}

.ch {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.65em, 0) rotateX(42deg);
  filter: blur(7px);
  transform-origin: 50% 100%;
  transition:
    opacity 0.65s ease,
    transform 0.85s var(--ease-out),
    filter 0.65s ease;
  transition-delay: calc(var(--ci, 0) * 55ms + 0.12s);
}
.in-view .ch { opacity: 1; transform: none; filter: none; }
.ch.is-live { transition: none; will-change: transform; }
.sp { white-space: pre; }

/* ---------- 智能光标 ---------- */
#cursor {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#cursor.is-on { opacity: 1; }
.c-dot {
  position: absolute;
  top: -3px; left: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  transition: width 0.25s, height 0.25s, top 0.25s, left 0.25s;
}
.c-ring {
  position: absolute;
  top: -17px; left: -17px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  mix-blend-mode: difference;
  display: grid;
  place-items: center;
  transition:
    width 0.28s var(--ease-out), height 0.28s var(--ease-out),
    top 0.28s var(--ease-out), left 0.28s var(--ease-out),
    border-color 0.28s, border-radius 0.28s, background 0.28s, opacity 0.28s;
}
.c-label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: #fff;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.25s;
  mix-blend-mode: difference;
}

html[data-cur="link"] .c-ring { width: 52px; height: 52px; top: -26px; left: -26px; }
html[data-cur="label"] .c-ring {
  width: 82px; height: 82px; top: -41px; left: -41px;
  border-color: rgba(255, 255, 255, 0.55);
}
html[data-cur="label"] .c-label { opacity: 1; }
#cursor.is-down .c-ring { width: 22px; height: 22px; top: -11px; left: -11px; }

/* 龋齿章 · 清扫刷形态 */
#cursor.is-brush .c-ring {
  width: 110px; height: 110px; top: -55px; left: -55px;
  border-style: dashed;
  border-color: rgba(var(--acc-rgb), 0.95);
  mix-blend-mode: normal;
}
#cursor.is-brush .c-label { opacity: 1; mix-blend-mode: normal; color: var(--acc); }
#cursor.is-brush .c-dot {
  width: 10px; height: 10px; top: -5px; left: -5px;
  background: var(--acc);
  mix-blend-mode: normal;
}

/* ---------- 轻提示 ---------- */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 65;
  max-width: min(86vw, 480px);
  padding: 12px 24px;
  border: 1px solid rgba(233, 246, 252, 0.18);
  border-radius: 999px;
  background: rgba(9, 26, 42, 0.88);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }
  .scene { padding: clamp(76px, 11vh, 120px) clamp(18px, 6vw, 60px); }
  .bg-glyph { font-size: clamp(11rem, 55vw, 20rem); right: -8vw; opacity: 0.85; }
  .ritual { grid-template-columns: 1fr; }
  .dots { right: 10px; gap: 13px; }
  .dots a span { font-size: 10px; }
  .lab { padding: 18px 20px; }
  .footer-grid { gap: 28px; }
  .brand-name small { display: none; }
  .topbar { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .chips { gap: 10px; }
  .chip { flex: 1 1 100%; }
  .lede, .prose { line-height: 1.95; }
  .finale-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { justify-content: center; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .grain { animation: none; }
  .fx, .ch { opacity: 1; transform: none; filter: none; }
}

/* ---------- 高对比 ---------- */
@media (prefers-contrast: more) {
  .chip, .lab, .ritual li {
    background: rgba(6, 18, 30, 0.94);
    border-color: rgba(233, 246, 252, 0.5);
    backdrop-filter: none;
  }
  .lede, .prose { color: #eef7fb; }
  .bg-glyph { -webkit-text-stroke-color: rgba(232, 246, 250, 0.16); }
}

/* ============================================================
 * 特展 · 官网整合增补（shaykq.com）
 * ============================================================ */

/* 顶栏「返回官网」药丸 */
.top-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid rgba(233, 246, 252, 0.3);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--ink-dim);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.top-back:hover {
  background: rgba(233, 246, 252, 0.92);
  border-color: transparent;
  color: #05131f;
}

/* 无 JS 提示条（原 <noscript> 内联样式外置，CSP 适配） */
.noscript-note {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  background: #071626;
  color: #eaf6fb;
  padding: 10px 14px;
  border: 1px solid #2a4a5e;
  font-size: 13px;
}

/* 页脚备案行 */
.beian-line {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.beian-line a {
  color: rgba(185, 211, 224, 0.85);
  text-decoration: none;
  transition: color 0.3s;
}
.beian-line a:hover { color: var(--acc); }

/* ============================================================
 * 特展 · 分享面板（share.js）
 * 层级：panel 59（在章节内容之上、智能光标 60 之下）
 * ============================================================ */

.top-share {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid rgba(233, 246, 252, 0.3);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--ink-dim);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.top-share:hover {
  background: rgba(233, 246, 252, 0.92);
  border-color: transparent;
  color: #05131f;
}

.share-panel {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: grid;
  place-items: center;
  padding: 20px;
}
.share-panel[hidden] { display: none; }
.sp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 14, 0.74);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.sp-card {
  position: relative;
  width: min(600px, 100%);
  padding: 26px 28px 24px;
  border: 1px solid rgba(233, 246, 252, 0.18);
  border-radius: 18px;
  background: rgba(8, 20, 34, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s var(--ease-out);
}
.share-panel.open .sp-card { opacity: 1; transform: none; }
.sp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
  color: var(--ink-dim);
  transition: color 0.25s, border-color 0.25s;
}
.sp-close:hover { color: var(--ink); border-color: rgba(233, 246, 252, 0.3); }
.sp-close svg { width: 16px; height: 16px; }

.sp-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.sp-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.sp-qr-wrap { text-align: center; }
#sp-qr {
  width: 190px;
  height: 190px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
}
#sp-qr svg { display: block; width: 100%; height: 100%; }
.sp-hint {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-dim);
}

.sp-card-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.sp-mock {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
}
.sp-mock img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
}
.sp-mock-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-mock-text b {
  font-size: 13.5px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-mock-text span {
  font-size: 12px;
  color: #8a8a8a;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-mock-text i { font-style: normal; font-size: 11px; color: #b2b2b2; margin-top: auto; }

.sp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid rgba(233, 246, 252, 0.28);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.sp-btn:hover { border-color: var(--acc); color: var(--acc); }
.sp-btn.ok { border-color: var(--acc); color: var(--acc); }

@media (max-width: 640px) {
  .sp-grid { grid-template-columns: 1fr; justify-items: center; }
  .sp-side { width: 100%; }
}

/* ---------- 微信分享按钮（三境智判的核心钮） ---------- */
.sp-btn-wechat {
  border-color: #1aad5e;
  color: #1aad5e;
  font-weight: 600;
}
.sp-btn-wechat:hover {
  background: #07c160;
  border-color: #07c160;
  color: #fff;
}

/* 语境反馈行 */
.sp-note {
  min-height: 20px;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--acc);
}

/* 桌面端：二维码脉冲引导 */
.sp-qr-wrap.pulse #sp-qr {
  animation: qr-pulse 1.1s ease-in-out 3;
}
@keyframes qr-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 216, 255, 0); transform: scale(1); }
  50% { box-shadow: 0 0 26px 4px rgba(127, 216, 255, 0.55); transform: scale(1.03); }
}

/* 微信内：面板切换微信模式（二维码已无用武之地） */
.share-panel.in-wechat .sp-grid { grid-template-columns: 1fr; }
.share-panel.in-wechat .sp-qr-wrap { display: none; }
.share-panel.in-wechat .sp-mock img { width: 72px; height: 72px; }
.share-panel.in-wechat .sp-mock-text span { -webkit-line-clamp: 3; }

/* 微信内指引浮层：点右上角 ··· */
.wx-guide {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(4, 12, 21, 0.94);
  border-radius: 18px;
  cursor: pointer;
}
.wx-guide[hidden] { display: none; }
.wx-guide-arrow {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 76px;
  height: 76px;
  color: #7fd8ff;
  animation: wx-arrow-bob 1.4s ease-in-out infinite;
}
@keyframes wx-arrow-bob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -6px); }
}
.wx-guide-body { text-align: center; padding: 0 24px; }
.wx-guide-title {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 12px;
}
.wx-guide-body p { font-size: 14.5px; line-height: 2; color: var(--ink-dim); }
.wx-guide-body b { color: var(--ink); }
.wx-guide-dismiss { margin-top: 16px; font-size: 12px; color: rgba(163, 192, 207, 0.7); }

@media (prefers-reduced-motion: reduce) {
  .wx-guide-arrow { animation: none; }
  .sp-qr-wrap.pulse #sp-qr { animation: none; }
}

/* 特展馆统一备案行（与主站 footer 同源：ICP/医疗广告审查号/公安备案；深色主题适配） */
.ex-beian{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 12px}
.ex-beian a{color:inherit}
.ex-beian .footer-beian-ps{display:inline-flex;align-items:center;gap:4px}
.ex-beian .footer-beian-ps img{width:14px;height:14px;vertical-align:-2px}
