/* =====================================================================
   HaloInk · 虹墨书阁 v2.0 — 宣纸珠光 × 液态棱镜玻璃设计系统
   彻底告别黑底：温润美术馆宣纸云白 (#f7f4ef) + 实时流动液态虹彩棱镜 Canvas
   + 珍珠母贝全息精装书封 + 彩色折射光影 + 磁吸弹性微交互 + 双端极致适配
   ===================================================================== */

@property --halo-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* 宣纸珠光底色与温润液态玻璃层级 */
  --bg-ivory: #f7f4ef;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.86);
  --bg-input: rgba(255, 255, 255, 0.82);

  /* 高级书印墨色阶 */
  --ink-1: #181726;
  --ink-2: #54526c;
  --ink-3: #83809c;

  /* 边缘与柔和彩色折射阴影 */
  --border-glass: rgba(255, 255, 255, 0.92);
  --border-line: rgba(34, 30, 62, 0.085);
  --border-strong: rgba(34, 30, 62, 0.16);

  /* 宝石级光学棱镜虹彩 */
  --c-rose: #ff5fa2;
  --c-gold: #ff9f43;
  --c-mint: #1ec89a;
  --c-sky: #2f9eff;
  --c-iris: #7568ff;
  --c-orchid: #be5cff;
  --c-danger: #e11d48;

  --prism-conic: conic-gradient(
    from var(--halo-angle),
    #ff5fa2,
    #ffae42,
    #22cfa0,
    #36a2ff,
    #7568ff,
    #c466ff,
    #ff5fa2
  );
  --prism-linear: linear-gradient(
    105deg,
    #ff5fa2 0%,
    #ff9f43 20%,
    #22cfa0 42%,
    #36a2ff 64%,
    #7568ff 84%,
    #ff5fa2 100%
  );
  --prism-soft: linear-gradient(
    125deg,
    rgba(255, 95, 162, 0.13) 0%,
    rgba(255, 174, 66, 0.11) 25%,
    rgba(34, 207, 160, 0.12) 50%,
    rgba(54, 162, 255, 0.14) 75%,
    rgba(196, 102, 255, 0.14) 100%
  );

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --radius-pill: 999px;

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --read-font-size: 18px;
  --read-line-height: 2.05;
  --read-width: 840px;
  --read-font: var(--font-serif);

  /* 轻盈美术馆彩色漫反射投影（绝不用厚重脏黑影） */
  --shadow-float:
    0 20px 52px -18px rgba(72, 62, 138, 0.16),
    0 8px 22px -10px rgba(255, 95, 162, 0.08),
    0 2px 6px rgba(24, 23, 38, 0.04);
  --shadow-hover:
    0 28px 66px -18px rgba(84, 72, 178, 0.24),
    0 12px 30px -10px rgba(54, 162, 255, 0.14),
    0 2px 8px rgba(24, 23, 38, 0.05);

  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-ivory);
  color: var(--ink-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(84, 82, 108, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(84, 82, 108, 0.38);
}

::selection {
  background: rgba(117, 104, 255, 0.2);
  color: #181726;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   实时 60fps 宣纸珠光 × 流动棱镜光影舞台
   ===================================================================== */

.prism-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 15% -5%, rgba(255, 198, 224, 0.42), transparent 62%),
    radial-gradient(ellipse 80% 55% at 88% 8%, rgba(182, 224, 255, 0.44), transparent 60%),
    radial-gradient(ellipse 70% 55% at 50% 105%, rgba(198, 246, 229, 0.42), transparent 62%),
    linear-gradient(180deg, #faf7f3 0%, #f5f1f8 52%, #f8f5ef 100%);
}

.prism-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.prism-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.12), rgba(248, 245, 240, 0.34));
}

/* 细腻棉宣纸纹理，让彩色光晕像落在高级画纸上一样温润高级 */
.paper-grain {
  position: absolute;
  inset: 0;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

@keyframes haloSpin {
  0% { --halo-angle: 0deg; }
  100% { --halo-angle: 360deg; }
}

@keyframes rotateSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes prismShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.78; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.26); }
}

@keyframes shimmerSweep {
  0% { transform: translateX(-140%) skewX(-24deg); }
  100% { transform: translateX(270%) skewX(-24deg); }
}

@keyframes cardCascadeIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rippleExpand {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0.55; }
  to { transform: translate(-50%, -50%) scale(3.4); opacity: 0; }
}

/* 顶部阅读进度虹光细线 */
.read-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  z-index: 95;
  background: rgba(24, 23, 38, 0.06);
}

.read-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--prism-linear);
  background-size: 200% 100%;
  animation: prismShift 4.5s linear infinite;
  box-shadow: 0 0 14px rgba(117, 104, 255, 0.55);
  transition: width 80ms linear;
}

/* =====================================================================
   核心材质：液态珠光玻璃 (prism-glass) + 全息追光卡 (holo-card) + 棱镜按钮
   ===================================================================== */

.prism-glass {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(28px) saturate(185%);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.holo-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.34s var(--ease-fluid), box-shadow 0.34s var(--ease-fluid), border-color 0.28s ease;
}

/* 鼠标指针追光光学折射漫反射 */
.holo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: var(--holo-op, 0);
  background: radial-gradient(
    440px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.65),
    rgba(255, 130, 190, 0.16) 28%,
    rgba(66, 180, 255, 0.15) 50%,
    rgba(190, 106, 255, 0.1) 66%,
    transparent 80%
  );
  transition: opacity 0.35s ease;
  z-index: 1;
}

/* 1.25px 流动虹彩光学棱镜镶边 */
.holo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.25px;
  border-radius: inherit;
  background: var(--prism-conic);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--rim-op, 0.34);
  animation: haloSpin 8s linear infinite;
  transition: opacity 0.32s ease;
  z-index: 2;
}

.holo-card:hover {
  --rim-op: 0.92;
  box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.holo-card > * {
  position: relative;
  z-index: 3;
}

/* 主行动按钮：墨曜瓷芯 × 液态流动虹光环 × 彩色光晕扩散 + 点击波纹 */
.prism-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--prism-conic);
  animation: haloSpin 4.8s linear infinite;
  box-shadow:
    0 12px 28px -8px rgba(117, 104, 255, 0.42),
    0 6px 16px -6px rgba(255, 95, 162, 0.3);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.28s ease;
}

.prism-cta::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--prism-linear);
  background-size: 200% 100%;
  animation: prismShift 5s linear infinite;
  filter: blur(14px);
  opacity: 0.35;
  z-index: 0;
  transition: opacity 0.28s ease;
}

.prism-cta:hover {
  box-shadow:
    0 16px 36px -8px rgba(117, 104, 255, 0.56),
    0 8px 22px -6px rgba(255, 95, 162, 0.42);
}

.prism-cta:hover::before {
  opacity: 0.65;
}

.prism-cta:active {
  transform: scale(0.97) !important;
}

.prism-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.prism-cta-inner {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1d1b2f 0%, #2a2444 52%, #1b2238 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.015em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.prism-cta-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 48%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-160%) skewX(-24deg);
  pointer-events: none;
}

.prism-cta:hover .prism-cta-inner::after {
  animation: shimmerSweep 0.8s var(--ease-fluid);
}

.prism-cta.sm .prism-cta-inner {
  padding: 8px 15px;
  font-size: 13px;
}

.prism-cta.full-width {
  width: 100%;
}

.btn-ripple {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), rgba(54, 162, 255, 0.25) 60%, transparent 72%);
  pointer-events: none;
  animation: rippleExpand 0.6s var(--ease-fluid) forwards;
}

.charge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prism-linear);
  background-size: 200% 100%;
  animation: prismShift 3.5s linear infinite, pulseGlow 2.2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 174, 66, 0.9);
}

/* 次级珠光玻璃按钮 */
.glass-btn, .pill-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 30, 62, 0.11);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-1);
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px -6px rgba(42, 36, 84, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.24s var(--ease-spring), box-shadow 0.24s ease;
}

.glass-btn:hover, .pill-btn:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(117, 104, 255, 0.36);
  box-shadow: 0 10px 24px -10px rgba(117, 104, 255, 0.26), inset 0 1px 0 #fff;
  transform: translateY(-1.5px);
}

.glass-btn:active, .pill-btn:active {
  transform: scale(0.97);
}

.glass-btn.sm, .pill-btn.sm {
  padding: 7px 13px;
  font-size: 12.5px;
}

.glass-btn.xs {
  padding: 5px 10px;
  font-size: 12px;
}

.glass-btn.danger-ghost {
  color: var(--c-danger);
  border-color: rgba(225, 29, 72, 0.22);
  background: rgba(255, 241, 244, 0.76);
}

.glass-btn.danger-ghost:hover {
  background: rgba(255, 228, 234, 0.96);
  border-color: rgba(225, 29, 72, 0.45);
}

.pill-btn.prism-outline {
  border-color: rgba(117, 104, 255, 0.34);
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.88), rgba(244, 240, 255, 0.88), rgba(235, 248, 255, 0.88));
}

.pill-btn.prism-outline:hover {
  border-color: rgba(117, 104, 255, 0.65);
  box-shadow: 0 10px 24px -8px rgba(117, 104, 255, 0.32);
}

.pulse-dot, .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-mint);
  box-shadow: 0 0 10px rgba(30, 200, 154, 0.85);
  animation: pulseGlow 2.3s ease-in-out infinite;
}

.icon-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(34, 30, 62, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  box-shadow: inset 0 1px 0 #fff;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.22s var(--ease-spring);
}

.icon-pill-btn:hover {
  color: var(--ink-1);
  background: #ffffff;
  border-color: rgba(117, 104, 255, 0.36);
  transform: scale(1.07);
}

.icon-pill-btn.spinning svg {
  animation: rotateSlow 0.7s linear infinite;
}

.icon-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  transition: color 0.2s ease, background 0.2s ease;
}

.icon-ghost-btn:hover {
  color: var(--ink-1);
  background: rgba(34, 30, 62, 0.07);
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #3d3666;
  border: 1px solid rgba(117, 104, 255, 0.22);
  background: var(--prism-soft);
}

/* =====================================================================
   视图 0：珍珠宣纸 × 光学棱镜门禁
   ===================================================================== */

.gate-view {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.gate-card {
  width: 100%;
  max-width: 452px;
  padding: 42px 36px 32px;
  text-align: center;
  --rim-op: 0.78;
}

.gate-prism-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--prism-linear);
  background-size: 200% 100%;
  animation: prismShift 5.5s linear infinite;
  opacity: 0.9;
}

.halo-dial {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.halo-dial-bloom {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--prism-conic);
  filter: blur(26px);
  opacity: 0.34;
  animation: haloSpin 7s linear infinite;
}

.halo-dial-svg {
  position: absolute;
  inset: -4px;
  width: 156px;
  height: 156px;
}

.dial-ticks-outer {
  transform-origin: 78px 78px;
  animation: rotateSlow 48s linear infinite;
}

.dial-arc-spin {
  transform-origin: 78px 78px;
  animation: rotateSlow 7.5s linear infinite;
}

.dial-arc-reverse {
  transform-origin: 78px 78px;
  animation: rotateSlow 11s linear infinite reverse;
}

.halo-dial-core {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #f6f2fb 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 12px 28px -8px rgba(117, 104, 255, 0.28),
    inset 0 2px 6px rgba(255, 255, 255, 1);
}

.halo-glyph {
  font-size: 32px;
  background: var(--prism-linear);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: prismShift 4s linear infinite;
}

.gate-title {
  margin: 16px 0 6px;
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-1);
}

.gate-sub {
  margin: 0 0 26px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.password-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 30, 62, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 2px 5px rgba(34, 30, 62, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.password-shell:focus-within {
  border-color: rgba(117, 104, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(117, 104, 255, 0.13), 0 8px 24px -8px rgba(54, 162, 255, 0.22);
}

.pw-lock-ico {
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
}

.password-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  padding: 10px 4px;
  color: var(--ink-1);
}

.gate-error {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 228, 236, 0.92);
  border: 1px solid rgba(225, 29, 72, 0.28);
  color: #be123c;
  font-size: 13px;
  font-weight: 500;
}

.gate-card.shake {
  animation: shakeX 0.36s ease;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-8px); }
  45% { transform: translateX(7px); }
  70% { transform: translateX(-4px); }
}

.gate-foot {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.gate-foot-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(24, 23, 38, 0.055);
  color: var(--ink-2);
}

/* =====================================================================
   顶部悬浮液态玻璃导航栏（含滑动虹光胶囊指示器）
   ===================================================================== */

.app-view {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding-bottom: 64px;
}

.top-dock-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 20px 8px;
}

.top-dock {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px 8px 14px;
  border-radius: var(--radius-pill);
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 4px 6px 4px 2px;
  text-align: left;
}

.brand-prism-gem {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--prism-conic);
  animation: haloSpin 6s linear infinite;
  box-shadow: 0 6px 18px -4px rgba(117, 104, 255, 0.45);
  position: relative;
  flex-shrink: 0;
}

.brand-prism-gem::after {
  content: "";
  position: absolute;
  inset: 4.5px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f5f0fb);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-1);
}

.brand-text small {
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  font-weight: 600;
}

.dock-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(34, 30, 62, 0.048);
  border: 1px solid rgba(34, 30, 62, 0.06);
}

.dock-tab-slider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 86px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  box-shadow:
    0 4px 14px -4px rgba(117, 104, 255, 0.28),
    0 1px 3px rgba(24, 23, 38, 0.08);
  transition: transform 0.36s var(--ease-spring), width 0.34s var(--ease-fluid);
  pointer-events: none;
  z-index: 0;
}

.dock-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.22s ease;
}

.dock-tab:hover, .dock-tab.active {
  color: var(--ink-1);
}

.tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--prism-linear);
  background-size: 200% 100%;
  animation: prismShift 5s linear infinite;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dock-search {
  flex: 1;
  max-width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(34, 30, 62, 0.09);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.dock-search:focus-within {
  border-color: rgba(117, 104, 255, 0.52);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(117, 104, 255, 0.12);
}

.search-ico {
  color: var(--ink-3);
  flex-shrink: 0;
}

.dock-search input, .mobile-search-bar input, .chapter-search-wrap input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink-1);
}

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

/* =====================================================================
   页面容器、展厅级 Hero 仪表盘与继续阅读书签条
   ===================================================================== */

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 20px 36px;
}

.view-section {
  animation: fadeUp 0.38s var(--ease-fluid);
}

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

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 28px;
  padding: 36px 38px;
  margin-bottom: 22px;
  --rim-op: 0.68;
}

.hero-prism-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(62% 110% at 92% 8%, rgba(255, 130, 190, 0.16), transparent 60%),
    radial-gradient(56% 100% at 10% 96%, rgba(54, 162, 255, 0.14), transparent 58%),
    radial-gradient(50% 80% at 54% 12%, rgba(34, 207, 160, 0.1), transparent 55%);
  z-index: 0 !important;
}

.hero-title {
  margin: 16px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.24;
  color: var(--ink-1);
}

.prism-ink-word {
  background: linear-gradient(102deg, #e83e8c 0%, #f5821f 28%, #0fb386 55%, #2484f2 78%, #854dff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: prismShift 7s linear infinite;
}

.hero-desc {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.75;
  max-width: 560px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.sync-dial-card {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 #fff, 0 10px 26px -14px rgba(72, 62, 138, 0.18);
}

.sync-ring {
  position: relative;
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-ring-bloom {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--prism-conic);
  filter: blur(22px);
  opacity: 0.28;
  animation: haloSpin 7s linear infinite;
}

.sync-ticks-svg {
  position: absolute;
  inset: -4px;
  width: 136px;
  height: 136px;
}

.sync-ring-inner {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #f6f2fb 100%);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 22px -8px rgba(117, 104, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.sync-ring-inner strong {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  color: var(--ink-1);
}

.sync-ring-inner span {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}

.telemetry-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.telemetry-cell {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 30, 62, 0.065);
}

.telemetry-cell.wide {
  grid-column: 1 / -1;
}

.telemetry-label {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 4px;
  font-weight: 600;
}

.telemetry-val {
  display: block;
  font-size: 19px;
  font-weight: 750;
  color: var(--ink-1);
}

.telemetry-val-sm {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 书签续读条 */
.resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  --rim-op: 0.6;
}

.resume-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.resume-bookmark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--prism-soft);
  border: 1px solid rgba(117, 104, 255, 0.25);
  color: #6c4dff;
  font-size: 16px;
}

.resume-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resume-eyebrow {
  font-size: 11px;
  color: #6c4dff;
  font-weight: 700;
}

.resume-info strong {
  font-size: 14px;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================================
   分区头、筛选条、骨架屏与最新更新流
   ===================================================================== */

.section-block {
  margin-bottom: 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head.top-gap {
  margin-top: 6px;
}

.section-title, .page-heading {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-1);
}

.page-heading {
  font-size: 26px;
}

.section-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

.link-btn {
  border: 0;
  background: transparent;
  color: #5b4df7;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 2px;
}

.link-btn:hover {
  text-decoration: underline;
}

.filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-pill);
}

.filter-pill {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-pill:hover {
  color: var(--ink-1);
}

.filter-pill.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1f1d33, #352d5c);
  box-shadow: 0 4px 12px -4px rgba(117, 104, 255, 0.45);
}

.skeleton-card {
  height: 300px;
  border-radius: var(--radius-xl);
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.45) 25%, rgba(255, 255, 255, 0.88) 50%, rgba(255, 255, 255, 0.45) 75%);
  background-size: 220% 100%;
  animation: prismShift 1.5s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

/* 最新更新流 */
.updates-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.update-card {
  padding: 17px 19px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: cardCascadeIn 0.45s var(--ease-fluid) both;
  animation-delay: calc(var(--stagger, 0) * 55ms);
}

.update-card:hover {
  transform: translateY(-4px);
}

.update-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.badge-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 650;
  border: 1px solid rgba(34, 30, 62, 0.1);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-1);
}

.mini-badge.agent {
  border-color: rgba(117, 104, 255, 0.34);
  background: linear-gradient(120deg, rgba(54, 162, 255, 0.14), rgba(196, 102, 255, 0.16));
  color: #5538db;
}

.mini-badge.new {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.11);
  color: #047857;
}

.mini-badge.edit {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.update-book-name {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
}

.update-ch-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink-1);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.update-snippet {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.updates-full-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

/* =====================================================================
   典藏精装全息书架（精装书脊压痕 + 珍珠母贝光带 + 3D 阻尼悬浮）
   ===================================================================== */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(312px, 1fr));
  gap: 22px;
  perspective: 1200px;
}

.book-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  --rim-op: 0.44;
  transform-style: preserve-3d;
  will-change: transform;
  animation: cardCascadeIn 0.52s var(--ease-fluid) both;
  animation-delay: calc(var(--stagger, 0) * 75ms);
}

.book-card:hover {
  --rim-op: 0.96;
}

.book-cover {
  position: relative;
  padding: 22px 22px 20px 26px;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
}

/* 左侧精装硬壳书脊压痕 */
.book-cover::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  background: linear-gradient(
    90deg,
    rgba(24, 23, 38, 0.14) 0%,
    rgba(255, 255, 255, 0.42) 45%,
    rgba(24, 23, 38, 0.08) 72%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* 流动珍珠母贝斜向全息光带（常驻微流动 + 悬停随指针折射位移） */
.book-cover::after {
  content: "";
  position: absolute;
  inset: -45% -35%;
  background: linear-gradient(
    118deg,
    transparent 34%,
    rgba(255, 255, 255, 0.54) 47%,
    rgba(255, 190, 224, 0.32) 51%,
    rgba(165, 224, 255, 0.34) 55%,
    transparent 68%
  );
  transform: translateX(calc((var(--rx, 0) * 22px) - 8%)) rotate(6deg);
  pointer-events: none;
  transition: transform 0.28s ease-out;
  z-index: 1;
}

.book-cover > * {
  position: relative;
  z-index: 3;
}

/* 6 套美术馆级高雅虹彩精装书封色（明亮、清透、珠光、像艺术画册封面！） */
.theme-prism {
  background:
    radial-gradient(110% 110% at 88% 12%, rgba(255, 114, 174, 0.52), transparent 58%),
    radial-gradient(105% 105% at 14% 92%, rgba(68, 178, 255, 0.5), transparent 60%),
    radial-gradient(85% 95% at 54% 52%, rgba(255, 214, 128, 0.42), transparent 65%),
    linear-gradient(135deg, #fff2f8 0%, #f1ecff 50%, #eaf6ff 100%);
}
.theme-aurora {
  background:
    radial-gradient(110% 110% at 86% 14%, rgba(44, 212, 167, 0.52), transparent 58%),
    radial-gradient(110% 110% at 14% 90%, rgba(154, 108, 255, 0.48), transparent 60%),
    linear-gradient(135deg, #e7fbf4 0%, #f1ebff 54%, #e9f6ff 100%);
}
.theme-sunset {
  background:
    radial-gradient(110% 110% at 86% 14%, rgba(255, 178, 72, 0.56), transparent 58%),
    radial-gradient(110% 110% at 16% 88%, rgba(255, 102, 162, 0.5), transparent 58%),
    linear-gradient(135deg, #fff5ea 0%, #ffebf3 52%, #f7ecff 100%);
}
.theme-ocean {
  background:
    radial-gradient(110% 110% at 86% 16%, rgba(56, 176, 255, 0.54), transparent 58%),
    radial-gradient(110% 110% at 16% 88%, rgba(124, 110, 255, 0.46), transparent 60%),
    linear-gradient(135deg, #e7f6ff 0%, #edf0ff 54%, #e9f9f6 100%);
}
.theme-violet {
  background:
    radial-gradient(110% 110% at 86% 18%, rgba(196, 112, 255, 0.52), transparent 58%),
    radial-gradient(110% 110% at 16% 88%, rgba(255, 134, 196, 0.45), transparent 60%),
    linear-gradient(135deg, #f6ebff 0%, #ffedf7 54%, #ecf3ff 100%);
}
.theme-emerald {
  background:
    radial-gradient(110% 110% at 86% 16%, rgba(46, 214, 160, 0.52), transparent 58%),
    radial-gradient(110% 110% at 16% 88%, rgba(72, 186, 255, 0.46), transparent 60%),
    linear-gradient(135deg, #e8fcf4 0%, #eaf8ff 54%, #f4f2ff 100%);
}

.book-cover-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.96);
  color: var(--ink-1);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 10px -4px rgba(24, 23, 38, 0.14);
}

.status-pill.done {
  background: rgba(236, 253, 245, 0.92);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

.genre-chip {
  font-size: 11.5px;
  font-weight: 600;
  color: #3b355c;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.book-cover-title {
  margin: 16px 0 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: #171526;
}

.book-cover-author {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(24, 23, 38, 0.72);
}

.book-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 18px;
  background: rgba(255, 255, 255, 0.45);
}

.book-synopsis {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 43px;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 550;
  color: #524d72;
  background: rgba(117, 104, 255, 0.075);
  border: 1px solid rgba(117, 104, 255, 0.13);
}

.book-latest-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(34, 30, 62, 0.075);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.book-latest-box:hover {
  background: #ffffff;
  border-color: rgba(117, 104, 255, 0.36);
  transform: translateX(2px);
}

.book-latest-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-latest-info span {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.book-latest-info strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: auto;
}

.book-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(34, 30, 62, 0.07);
}

.book-actions-row .open-btn {
  flex: 1;
}

/* 空状态 */
.empty-state {
  padding: 58px 24px;
  text-align: center;
}

.empty-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--prism-soft);
  border: 1px solid rgba(117, 104, 255, 0.22);
  color: #6c4dff;
  box-shadow: 0 12px 28px -10px rgba(117, 104, 255, 0.28);
}

.empty-state h4 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 20px;
}

.empty-state p {
  margin: 0 auto 22px;
  max-width: 440px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.68;
}

.empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* =====================================================================
   视图 C：书籍详情与章节目录
   ===================================================================== */

.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.breadcrumb-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.book-hero {
  margin-bottom: 22px;
  --rim-op: 0.65;
}

.book-hero-banner {
  padding: 30px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.book-hero-title {
  margin: 12px 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.3vw, 36px);
  font-weight: 700;
  color: #161426;
}

.book-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: rgba(24, 23, 38, 0.72);
  font-weight: 500;
  margin-bottom: 12px;
}

.book-hero-syn {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(24, 23, 38, 0.84);
  max-width: 720px;
}

.book-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.76);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
}

.chapter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chapter-search-wrap {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
}

.chapter-toolbar-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.volume-group {
  margin-bottom: 22px;
}

.volume-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.volume-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(117, 104, 255, 0.28), rgba(255, 95, 162, 0.16), transparent);
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.chapter-row:hover {
  transform: translateY(-2.5px);
}

.chapter-row.is-last-read {
  --rim-op: 0.85;
  background: rgba(255, 255, 255, 0.92);
}

.chapter-row-main {
  min-width: 0;
  flex: 1;
}

.chapter-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.chapter-num-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: rgba(117, 104, 255, 0.1);
  color: #5a46e8;
  flex-shrink: 0;
}

.chapter-row-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-row-meta {
  font-size: 12px;
  color: var(--ink-3);
}

.chapter-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* =====================================================================
   视图 D：宣纸书页沉浸式阅读器（四款纸色 + 虹光发丝装饰线 + 目录抽屉）
   ===================================================================== */

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.reader-top-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reader-crumb {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

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

.prefs-drawer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  animation: fadeUp 0.22s var(--ease-fluid);
}

.pref-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pref-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.pref-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pref-val {
  min-width: 42px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-1);
}

/* 四款书页纸色圆点 */
.theme-dots {
  gap: 8px;
}

.rt-dot {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 2px solid rgba(34, 30, 62, 0.16);
  padding: 0;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}

.rt-dot:hover {
  transform: scale(1.14);
}

.rt-dot.active {
  border-color: #6c4dff;
  box-shadow: 0 0 0 3.5px rgba(117, 104, 255, 0.22);
}

.rt-ivory     { background: #fdfbf8; }
.rt-parchment { background: #f6eedc; }
.rt-celadon   { background: #edf5f1; }
.rt-night     { background: #181a24; }

/* 书页阅读容器 */
.reader-article {
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 44px 52px 52px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.reader-article.rtheme-ivory {
  background: rgba(253, 251, 248, 0.94);
  color: #1e1c28;
}
.reader-article.rtheme-parchment {
  background: rgba(248, 240, 223, 0.96);
  border-color: rgba(196, 166, 118, 0.3);
  color: #2b2218;
}
.reader-article.rtheme-celadon {
  background: rgba(238, 247, 243, 0.95);
  border-color: rgba(88, 174, 146, 0.28);
  color: #172a24;
}
.reader-article.rtheme-night {
  background: rgba(20, 22, 32, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e6eaf4;
  box-shadow: 0 28px 66px rgba(18, 16, 36, 0.42);
}

.reader-article.rtheme-night .reader-meta {
  color: #939bb5;
}
.reader-article.rtheme-night .reader-note {
  background: rgba(117, 104, 255, 0.14);
  border-color: rgba(117, 104, 255, 0.32);
  color: #dbe4ff;
}
.reader-article.rtheme-night .nav-chapter-card {
  background: rgba(255, 255, 255, 0.06);
  color: #f4f6ff;
}
.reader-article.rtheme-night .nav-dir {
  color: #9aa2bc;
}

.reader-header {
  margin-bottom: 26px;
}

.reader-vol {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #6c4dff;
  margin-bottom: 8px;
  font-weight: 700;
}

.reader-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.35;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 20px;
}

.reader-prism-rule {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5fa2 0%, #ffae42 26%, #22cfa0 54%, #36a2ff 78%, rgba(196, 102, 255, 0.15) 100%);
  opacity: 0.65;
}

.reader-note {
  margin-bottom: 24px;
  padding: 13px 17px;
  border-radius: var(--radius-md);
  background: var(--prism-soft);
  border: 1px solid rgba(117, 104, 255, 0.2);
  font-size: 13.5px;
  color: #362e63;
  line-height: 1.65;
}

.reader-content {
  font-family: var(--read-font);
  font-size: var(--read-font-size);
  line-height: var(--read-line-height);
  color: inherit;
  letter-spacing: 0.025em;
  word-break: break-word;
}

.reader-content p {
  margin: 0 0 1.12em;
  text-indent: 2em;
}

.scene-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 2em auto;
  width: min(260px, 68%);
  color: #7c68ff;
  font-size: 13px;
}

.scene-divider::before,
.scene-divider::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 95, 162, 0.45), rgba(54, 162, 255, 0.5), transparent);
}

.reader-nav-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(34, 30, 62, 0.09);
}

.nav-chapter-card {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 30, 62, 0.08);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-chapter-card.right {
  text-align: right;
}

.nav-chapter-card:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.nav-dir {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.nav-chapter-card strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 侧滑章节目录抽屉 */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(24, 23, 38, 0.28);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: flex-start;
}

.toc-drawer {
  width: min(390px, 88vw);
  height: 100%;
  background: rgba(252, 250, 247, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  box-shadow: 24px 0 60px rgba(42, 36, 84, 0.18);
  animation: slideInLeft 0.3s var(--ease-fluid);
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.toc-search-box {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(34, 30, 62, 0.07);
}

.toc-search-box input {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 30, 62, 0.12);
  background: #ffffff;
  font-size: 14px;
  outline: none;
}

.toc-search-box input:focus {
  border-color: rgba(117, 104, 255, 0.6);
}

.toc-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.toc-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.toc-item:hover {
  background: rgba(117, 104, 255, 0.07);
  color: var(--ink-1);
}

.toc-item.active {
  background: var(--prism-soft);
  border-color: rgba(117, 104, 255, 0.32);
  color: var(--ink-1);
  font-weight: 700;
}

.toc-item-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-item-words {
  font-size: 11px;
  color: var(--ink-3);
  flex-shrink: 0;
}

/* 在线编辑器 */
.editor-panel {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 30px;
  --rim-op: 0.65;
}

.editor-grid-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 96px;
  gap: 12px;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.editor-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dirty-badge {
  font-size: 12px;
  color: #d97706;
  font-weight: 700;
}

.shortcut-hint {
  font-size: 12px;
  color: var(--ink-3);
}

/* 回到顶部珠光钮 */
.back-top-btn {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s ease;
}

.back-top-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--shadow-hover);
}

/* =====================================================================
   表单控件、色板与拖拽上传区
   ===================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.muted-meta {
  font-size: 12px;
  color: var(--ink-3);
}

.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 30, 62, 0.13);
  background: var(--bg-input);
  color: var(--ink-1);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.78;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(117, 104, 255, 0.62);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(117, 104, 255, 0.12);
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-swatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 30, 62, 0.12);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 550;
  color: var(--ink-2);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.theme-swatch .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(24, 23, 38, 0.16);
}

.theme-swatch.active {
  color: var(--ink-1);
  border-color: rgba(117, 104, 255, 0.72);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(117, 104, 255, 0.12);
}

.dropzone {
  padding: 28px 18px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(117, 104, 255, 0.42);
  background: var(--prism-soft);
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #6c4dff;
  background: rgba(117, 104, 255, 0.12);
}

.dropzone-icon {
  font-size: 26px;
  margin-bottom: 6px;
  color: #6c4dff;
}

.dropzone strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.dropzone p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.file-chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.file-chip {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid rgba(34, 30, 62, 0.1);
  font-size: 12px;
  color: var(--ink-1);
}

.check-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.check-inline input {
  width: 16px;
  height: 16px;
  accent-color: #6c4dff;
}

/* =====================================================================
   弹窗与外部 Agent 接入中心
   ===================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(24, 22, 42, 0.34);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: min(88dvh, 840px);
  display: flex;
  flex-direction: column;
  background: rgba(252, 250, 248, 0.94);
  --rim-op: 0.78;
  animation: modalPop 0.28s var(--ease-spring);
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-sheet.wide {
  max-width: 780px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(34, 30, 62, 0.08);
}

.modal-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.modal-sub {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.modal-body {
  padding: 18px 24px 22px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.modal-foot.wrap-foot {
  justify-content: space-between;
  flex-wrap: wrap;
}

.modal-foot-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notice-banner {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 247, 230, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.34);
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.notice-banner code {
  font-family: var(--font-mono);
  background: rgba(146, 64, 14, 0.1);
  padding: 1px 5px;
  border-radius: 5px;
}

.agent-card-box {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 30, 62, 0.09);
  margin-bottom: 14px;
}

.agent-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.agent-box-head strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.agent-box-head span {
  font-size: 12px;
  color: var(--ink-3);
}

.code-textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 30, 62, 0.11);
  background: #f5f3fa;
  color: #2c254a;
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
  resize: none;
  outline: none;
}

.agent-links-grid {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 14px;
}

.agent-link-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 30, 62, 0.12);
  background: #ffffff;
  color: #4834c8;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

.code-tab-row {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(34, 30, 62, 0.055);
}

.code-pre {
  margin: 0;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: #1b192b;
  border: 1px solid rgba(34, 30, 62, 0.14);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
  color: #e4e8ff;
  overflow-x: auto;
  white-space: pre;
}

/* =====================================================================
   Toast 通知
   ===================================================================== */

.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(34, 30, 62, 0.1);
  box-shadow: 0 16px 38px -12px rgba(42, 36, 84, 0.25);
  backdrop-filter: blur(20px);
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-1);
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.26s var(--ease-spring);
}

.toast.ok {
  border-color: rgba(16, 185, 129, 0.45);
}

.toast.err {
  border-color: rgba(225, 29, 72, 0.45);
  color: #be123c;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================================
   手机端底部悬浮液态玻璃 Dock & 双端深度响应式断点
   ===================================================================== */

.mobile-only {
  display: none !important;
}

.mobile-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 16px 40px -10px rgba(72, 62, 138, 0.26),
    0 4px 12px rgba(24, 23, 38, 0.06),
    inset 0 1px 0 #ffffff;
}

.mobile-dock.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mobile-dock::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.25px;
  border-radius: inherit;
  background: var(--prism-conic);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.65;
  animation: haloSpin 9s linear infinite;
}

.mobile-dock-btn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-spring);
}

.mobile-dock-btn:active {
  transform: scale(0.92);
}

.mobile-dock-btn.active {
  color: #4f3ce0;
  background: var(--prism-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mobile-dock-btn:disabled {
  opacity: 0.34;
}

.mobile-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-pill);
}

.mobile-search-bar input {
  font-size: 16px;
}

/* 平板适配 */
@media (max-width: 980px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 20px;
  }

  .book-hero-banner {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .book-hero-actions {
    padding: 14px 22px;
  }

  .dock-search {
    max-width: 200px;
  }
}

/* 手机端深度适配（<= 768px） */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only:not(.hidden) {
    display: flex !important;
  }

  .mobile-dock.mobile-only:not(.hidden) {
    display: grid !important;
  }

  .app-view {
    padding-bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  }

  .top-dock-wrap {
    padding: 10px 12px 6px;
  }

  .top-dock {
    padding: 7px 10px 7px 12px;
    border-radius: 22px;
  }

  .page-shell {
    padding: 10px 14px 24px;
  }

  .gate-card {
    padding: 34px 20px 26px;
  }

  .hero-card {
    padding: 22px 18px;
    gap: 16px;
    margin-bottom: 16px;
    border-radius: 24px;
  }

  .hero-desc {
    font-size: 13.5px;
    margin-bottom: 16px;
  }

  .hero-cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-cta-row .prism-cta,
  .hero-cta-row .glass-btn {
    width: 100%;
  }

  .sync-dial-card {
    padding: 14px;
    gap: 14px;
  }

  .sync-ring {
    width: 92px;
    height: 92px;
  }

  .sync-ticks-svg {
    width: 100px;
    height: 100px;
  }

  .sync-ring-inner {
    width: 70px;
    height: 70px;
  }

  .sync-ring-inner strong {
    font-size: 24px;
  }

  .resume-bar {
    padding: 12px 14px;
    margin-bottom: 16px;
  }

  .resume-info strong,
  .telemetry-val-sm {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.38;
  }

  .updates-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 6px;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
    scrollbar-width: none;
  }

  .updates-strip::-webkit-scrollbar {
    display: none;
  }

  .updates-strip .update-card {
    flex: 0 0 82vw;
    max-width: 310px;
    scroll-snap-align: start;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .chapters-grid {
    grid-template-columns: 1fr;
  }

  .chapter-row {
    padding: 13px 14px;
  }

  .book-hero-banner {
    padding: 20px 18px;
  }

  .book-hero-actions {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-hero-actions .prism-cta {
    grid-column: 1 / -1;
  }

  .chapter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .chapter-search-wrap {
    max-width: none;
  }

  .chapter-toolbar-btns {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
  }

  .reader-article {
    padding: 26px 20px 32px;
    border-radius: 22px;
  }

  .reader-nav-footer {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nav-chapter-card.right {
    text-align: left;
  }

  .editor-panel {
    padding: 18px 16px;
  }

  .editor-grid-head, .form-row-2 {
    grid-template-columns: 1fr;
  }

  .back-top-btn {
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-sheet, .modal-sheet.wide {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheetUp 0.28s var(--ease-fluid);
  }

  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-head {
    padding: 18px 18px 12px;
  }

  .modal-body {
    padding: 14px 18px 20px;
  }

  .field input[type="text"],
  .field input[type="number"],
  .field select,
  .field textarea,
  .copy-row input {
    font-size: 16px;
  }

  .toast-stack {
    top: 12px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

@media (hover: none) {
  .holo-card {
    --rim-op: 0.56;
  }
}

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