/* ============================================================
   每日一言 —— Dreamy Candy Glassmorphism 设计系统
   基调: 日出暖调糖果玻璃, 一个光源(顶部), 极致圆角, 轻柔物理感
   兼容: app.js 依赖的 DOM id 与 class 全部保留; 盾卫流程零改动
   双模式: :root(light) 与 [data-theme="dark"] 双套 tokens
   ============================================================ */

/* ── 设计 Tokens ──────────────────────────────────────── */
:root {
  /* 色彩 · 光模式 */
  --color-bg: #FFF6F2;
  --color-bg-alt: #FFF0EC;
  --color-surface-glass: rgba(255, 255, 255, 0.6);
  --color-surface-glass-strong: rgba(255, 255, 255, 0.72);
  --color-border-glass: rgba(255, 255, 255, 0.55);
  --color-text-primary: #3D2C2E;
  --color-text-secondary: #6B5560;
  --color-text-muted: #9C8A93;
  --color-primary-from: #F43F5E;
  --color-primary-via: #FB923C;
  --color-primary-to: #FBBF24;
  --color-accent-sky: #7DD3FC;
  --color-accent-mint: #6EE7B7;

  /* 功能色(光/暗同值, 双主题下均可读) */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #F43F5E;
  --color-info: #38BDF8;
  /* 功能色深浅版: 小字号场景补足 WCAG AA(光底加深 / 暗底提亮) */
  --color-success-strong: #0E8A62;
  --color-error-strong: #E11D48;
  --color-error-bright: #FB7185;

  /* 骨架屏 shimmer(双主题差异化) */
  --shimmer-base: rgba(244, 63, 94, 0.06);
  --shimmer-high: rgba(244, 63, 94, 0.16);

  /* 字体 */
  --font-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "M PLUS Rounded 1c", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 间距 */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* 圆角: 能圆则圆 */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-2xl: 48px;
  --radius-full: 999px;

  /* 阴影: 暖调扩散, 不用冷灰硬边 */
  --shadow-sm: 0 4px 12px -2px rgba(244, 63, 94, 0.1);
  --shadow-md: 0 12px 28px -8px rgba(244, 63, 94, 0.18);
  --shadow-lg: 0 24px 48px -12px rgba(244, 63, 94, 0.25);
  --shadow-glow: 0 0 40px 0 rgba(251, 146, 60, 0.18);

  /* 动效 */
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-slide: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* 玻璃统一参数 */
  --glass-blur: 20px;
  --on-gradient: #fff;         /* 渐变面文字: 白字 + 深色投影保证对比 */
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.4);   /* 顶部内高光: 唯一光源 */
  --primary-gradient: linear-gradient(135deg, var(--color-primary-from) 0%, var(--color-primary-via) 55%, var(--color-primary-to) 120%);
}

[data-theme="dark"] {
  --color-bg: #1C1216;
  --color-bg-alt: #24181E;
  --color-surface-glass: rgba(60, 42, 52, 0.55);
  --color-surface-glass-strong: rgba(70, 50, 60, 0.65);
  --color-border-glass: rgba(255, 255, 255, 0.14);
  --color-text-primary: #FDF0F4;
  --color-text-secondary: #D9C4CE;
  --color-text-muted: #A08894;
  /* 渐变与功能色保持与光模式一致, 暗底上可读 */
  --shimmer-base: rgba(255, 255, 255, 0.05);
  --shimmer-high: rgba(255, 255, 255, 0.16);
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ── 基础 ────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 104px var(--space-lg) var(--space-3xl);
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-text-primary);
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(251, 146, 60, 0.09), transparent 62%),
    radial-gradient(760px 460px at 4% 102%, rgba(244, 63, 94, 0.08), transparent 60%),
    var(--color-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--duration-base) var(--ease-soft),
    color var(--duration-base) var(--ease-soft);
}

::selection {
  background: rgba(244, 63, 94, 0.25);
  color: var(--color-text-primary);
}

/* 焦点环: 天蓝 3px / 50%, 偏移 2px, 从不移除 */
:focus-visible {
  outline: 3px solid rgba(125, 211, 252, 0.5);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(244, 63, 94, 0.22);
  border: 3px solid transparent;
  border-radius: var(--radius-full);
  background-clip: content-box;
}

/* ── 氛围光斑: 2-3 个暖调渐变圆, 仅 transform 漂移 ───── */
.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  will-change: transform;
}

.blob-1 {
  width: 420px;
  height: 420px;
  top: -8%;
  left: -6%;
  background: radial-gradient(circle at 35% 35%, rgba(244, 63, 94, 0.75), rgba(244, 63, 94, 0) 70%);
  animation: blob-drift-1 22s var(--ease-soft) infinite alternate;
}

.blob-2 {
  width: 520px;
  height: 520px;
  top: 18%;
  right: -14%;
  background: radial-gradient(circle at 60% 40%, rgba(251, 146, 60, 0.7), rgba(251, 146, 60, 0) 70%);
  animation: blob-drift-2 28s var(--ease-soft) infinite alternate;
}

.blob-3 {
  width: 460px;
  height: 460px;
  bottom: -16%;
  left: 22%;
  background: radial-gradient(circle at 50% 60%, rgba(251, 191, 36, 0.62), rgba(251, 191, 36, 0) 70%);
  animation: blob-drift-3 25s var(--ease-soft) infinite alternate;
}

[data-theme="dark"] .blob {
  opacity: 0.2;
}

@keyframes blob-drift-1 {
  to {
    transform: translate3d(6vw, 5vh, 0) scale(1.08);
  }
}

@keyframes blob-drift-2 {
  to {
    transform: translate3d(-5vw, -6vh, 0) scale(1.12);
  }
}

@keyframes blob-drift-3 {
  to {
    transform: translate3d(4vw, -5vh, 0) scale(1.06);
  }
}

/* ── 悬浮玻璃顶栏 ────────────────────────────────────── */
.topbar {
  position: fixed;
  top: var(--space-sm);
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--space-md);
  animation: fade-in-up var(--duration-slow) var(--ease-soft) both;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface-glass-strong);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md), var(--inset-highlight);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  user-select: none;
}

.brand-icon {
  font-size: 22px;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--color-text-primary);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 图标按钮(主题切换) */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--color-text-primary);
  background: var(--color-surface-glass);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-full);
  cursor: pointer;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-pop),
    box-shadow var(--duration-base) var(--ease-soft),
    background-color var(--duration-base) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.icon-btn::before {
  font-size: 20px;
  line-height: 1;
}

/* 光模式显示月亮(点它进入夜晚), 暗模式显示太阳 */
[data-theme="light"] .icon-btn::before {
  content: "\e330";
  font-family: "Phosphor-Bold";
}

[data-theme="dark"] .icon-btn::before {
  content: "\e472";
  font-family: "Phosphor-Bold";
}

@media (hover: hover) {
  .icon-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
  }
}

.icon-btn:active {
  transform: scale(0.96);
}

/* ── 主卡片: 糖果玻璃 hero ───────────────────────────── */
.card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 26%),
    var(--color-surface-glass);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-lg), var(--inset-highlight);
  animation: card-in 0.55s var(--ease-soft) both;
  transition: transform var(--duration-base) var(--ease-pop),
    box-shadow var(--duration-slow) var(--ease-soft),
    border-color var(--duration-slow) var(--ease-soft),
    background-color var(--duration-slow) var(--ease-soft);
}

[data-theme="dark"] .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%),
    var(--color-surface-glass);
}

/* 顶部高光带: 唯一光源来自上方 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 146, 60, 0.55), transparent);
}

/* 鼠标跟随暖光(enhance.js 写入 --mx/--my) */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    380px 260px at var(--mx, 50%) var(--my, -20%),
    rgba(251, 146, 60, 0.09),
    transparent 65%
  );
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-soft);
}

/* 桌面 hover: 隔离在 (hover:hover) 内, 避免触屏点按后 sticky-hover */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow), var(--inset-highlight);
  }

  .card:hover::after {
    opacity: 1;
  }
}

/* 顶部暖金光晕(纯装饰) */
.card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(340px 190px at 50% -10%, rgba(251, 146, 60, 0.1), transparent 70%);
}

@keyframes card-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ── 标签 pill ───────────────────────────────────────── */
.tag {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-lg);
  padding: 7px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-primary-from);
  background: rgba(244, 63, 94, 0.1);
  border: 1.5px solid rgba(244, 63, 94, 0.28);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  animation: fade-in-up var(--duration-slow) 0.08s var(--ease-soft) both;
}

/* 暗底上玫瑰红对比不足, 换亮橙 */
[data-theme="dark"] .tag {
  color: var(--color-primary-via);
}

/* ── 盾卫验证徽章: 成功绿 + 柔和呼吸 ─────────────────── */
.shield-badge {
  display: inline-block;
  margin: -14px 0 var(--space-lg);
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--color-success-strong);
  background: rgba(16, 185, 129, 0.1);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  animation: fade-in-up var(--duration-slow) 0.16s var(--ease-soft) both,
    shield-pulse 3.2s 0.9s var(--ease-soft) infinite;
}

@keyframes shield-pulse {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(16, 185, 129, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.3);
  }
}

[data-theme="dark"] .shield-badge {
  color: var(--color-success);
}

/* ── 引言区 ──────────────────────────────────────────── */
blockquote {
  position: relative;
  border: none;
  animation: fade-in-up var(--duration-slow) 0.2s var(--ease-soft) both;
}

/* 装饰大引号: 日出渐变文字 */
.quote-text::before {
  content: "“";
  display: block;
  height: 0.5em;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.5), rgba(251, 146, 60, 0.12));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(244, 63, 94, 0.18));
}

.quote-text {
  min-height: 130px;
  padding: 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.85;
  letter-spacing: 1px;
  color: var(--color-text-primary);
  text-align: center;
}

/* 初始加载占位 */
.quote-text:empty {
  color: var(--color-text-muted);
}

/* 初始加载骨架屏(盾卫认证期间显示, 打字机开始自动消失) */
.skeleton-line {
  display: block;
  width: min(340px, 74%);
  height: 1.5em;
  margin: 0 auto;
  border-radius: var(--radius-full);
  background: linear-gradient(
    100deg,
    var(--shimmer-base) 38%,
    var(--shimmer-high) 50%,
    var(--shimmer-base) 62%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -80% 0;
  }
}

/* 打字光标 */
.quote-text.typing::after {
  content: "|";
  margin-left: 3px;
  color: var(--color-primary-via);
  animation: blink 0.8s steps(1) infinite;
}

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

.quote-author {
  margin-top: var(--space-lg);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-text-secondary);
  text-align: center;
}

.quote-author::before {
  content: "—— ";
  color: var(--color-text-muted);
}

/* ── 分隔线: 渐变线 + 中间糖果菱形 ──────────────────── */
.divider {
  position: relative;
  height: 1px;
  margin: var(--space-xl) auto var(--space-md);
  width: min(180px, 60%);
  background: linear-gradient(90deg, transparent, rgba(251, 146, 60, 0.45), transparent);
  animation: fade-in-up var(--duration-slow) 0.26s var(--ease-soft) both;
}

.divider::after {
  content: "◆";
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 8px;
  line-height: 1;
  color: rgba(251, 146, 60, 0.6);
  transform: translate(-50%, -50%);
}

/* ── 元信息 ──────────────────────────────────────────── */
.quote-meta {
  margin-top: var(--space-2xs);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  animation: fade-in-up var(--duration-slow) 0.32s var(--ease-soft) both;
}

/* ── 按钮组 ──────────────────────────────────────────── */
/* 按钮组: body 直接子元素(fixed dock 的包含块才是视口)。
   桌面形态下与卡片保持视觉间距, 移动形态下变底部 dock */
.actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  animation: fade-in-up var(--duration-slow) 0.36s var(--ease-soft) both;
}

button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-text-primary);
  background: var(--color-surface-glass-strong);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  touch-action: manipulation;   /* 消除移动端双击缩放延迟 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm), var(--inset-highlight);
  transition: transform var(--duration-base) var(--ease-pop),
    box-shadow var(--duration-base) var(--ease-soft),
    background-color var(--duration-base) var(--ease-soft),
    border-color var(--duration-base) var(--ease-soft),
    color var(--duration-base) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

/* 按钮图标(Phosphor Bold; 选中态切 Fill) */
#btnDaily::before {
  content: "\e0e6";
  font-family: "Phosphor-Bold";
  font-size: 20px;
}

#btnRandom::before {
  content: "\e1ee";
  font-family: "Phosphor-Bold";
  font-size: 20px;
}

#btnCopy::before {
  content: "\e1ca";
  font-family: "Phosphor-Bold";
  font-size: 20px;
}

/* 复制成功: 收起图标, 让文本 ✓ 说话 */
#btnCopy.copied::before {
  content: none;
}

/* 主按钮图标: 常驻箭头由 JS 文本提供, 仅加载时出现 spinner */
#btnRefresh:disabled::before {
  content: "\eb44";
  font-family: "Phosphor-Bold";
  font-size: 18px;
  animation: spin 1s linear infinite;
}

@media (hover: hover) {
  button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
  }
}

button:active:not(:disabled) {
  transform: scale(0.96);
  box-shadow: var(--shadow-sm);
}

button:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}

/* 选中态: 渐变 pill + Fill 图标 */
button.active {
  color: var(--on-gradient);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: var(--shadow-md), var(--inset-highlight);
}

button.active::before {
  font-family: "Phosphor-Fill";
  color: var(--on-gradient);
}

@media (hover: hover) {
  button.active:hover:not(:disabled) {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
  }
}

/* 主 CTA: 渐变 + 光泽流动 */
button.primary {
  color: var(--on-gradient);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  background: var(--primary-gradient);
  background-size: 200% 100%;
  border-color: transparent;
  box-shadow: var(--shadow-lg), var(--inset-highlight);
  animation: gold-shimmer 6s linear infinite;
}

@keyframes gold-shimmer {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 200% 0;
  }
}

@media (hover: hover) {
  button.primary:hover:not(:disabled) {
    filter: brightness(1.05);
    animation-duration: 2.4s;
    box-shadow: var(--shadow-lg), var(--shadow-glow), var(--inset-highlight);
  }
}

/* 复制成功反馈 */
button.copied {
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

/* 点击涟漪(enhance.js 注入) */
button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.26);
  transform: scale(0);
  animation: ripple-out 0.6s var(--ease-soft) forwards;
  pointer-events: none;
}

button.primary .ripple,
button.active .ripple {
  background: rgba(61, 44, 46, 0.18);
}

@keyframes ripple-out {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 状态提示(盾卫/加载错误) ────────────────────────── */
.status {
  margin-top: var(--space-md);
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-error-strong);
  max-width: 100%;
  background: rgba(244, 63, 94, 0.08);
  border: 1.5px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  animation: fade-in-up 0.3s var(--ease-soft) both;
}

[data-theme="dark"] .status {
  color: var(--color-error-bright);
}

/* ── 页脚 ────────────────────────────────────────────── */
.footnote {
  margin-top: var(--space-lg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
  animation: fade-in-up var(--duration-slow) 0.44s var(--ease-soft) both;
}

/* ── 统一入场动画 ────────────────────────────────────── */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 动效降级: 尊重系统"减少动态"设置 ────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .blobs {
    display: none;
  }
}

/* ── 平板 (768-1023px) ───────────────────────────────── */
@media (max-width: 1023px) {
  body {
    padding: 96px var(--space-md) var(--space-2xl);
  }
}

/* ── 移动/平板 (<900px): 底部玻璃 dock ──────────────── */
/* 断点覆盖 iPhone 横屏(844px)、iPad 竖屏(810px)、折叠屏展开态,
   这些宽度下按钮组一律 dock, 不允许出现"卡片中间一排 tab" */
@media (max-width: 899px) {
  body {
    padding: 88px var(--space-md) calc(140px + env(safe-area-inset-bottom, 0px));
  }

  .card {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
  }

  .quote-text {
    font-size: 1.375rem;
    min-height: 110px;
  }

  .quote-text::before {
    font-size: 48px;
  }

  /* 光斑降载: 低端移动设备上 blur(80px) 大圆过重 */
  .blob {
    filter: blur(60px);
    opacity: 0.24;
  }

  .blob-1 {
    width: 300px;
    height: 300px;
  }

  .blob-2 {
    width: 360px;
    height: 360px;
  }

  .blob-3 {
    width: 320px;
    height: 320px;
  }

  /* 按钮组变为悬浮玻璃 dock: 图标 + 小标签竖排, 居中限宽(横屏不全宽) */
  .actions {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 2 * var(--space-md)), 520px);
    transform: translateX(-50%);
    z-index: 90;
    margin-top: 0;
    padding: 10px;
    gap: 6px;
    border-radius: var(--radius-2xl);
    background: var(--color-surface-glass-strong);
    border: 1px solid var(--color-border-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-lg), var(--shadow-glow), var(--inset-highlight);
    animation: dock-in var(--duration-slow) var(--ease-slide) 0.4s both;
  }

  @keyframes dock-in {
    from {
      opacity: 0;
      transform: translate(-50%, 80px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }

  .actions button {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    min-height: 56px;
    padding: 6px 2px;
    font-size: 0.625rem;
    letter-spacing: 0.3px;
    white-space: nowrap;   /* 三字标签 + 24px 图标在 320px 细屏不溢出 */
    border-radius: var(--radius-md);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  @media (hover: hover) {
    .actions button:hover:not(:disabled) {
      transform: none;
      box-shadow: none;
      background: rgba(244, 63, 94, 0.06);
    }

    .actions button.primary:hover:not(:disabled) {
      filter: none;
      background: rgba(244, 63, 94, 0.14);
      animation: none;
    }
  }

  .actions button:active:not(:disabled) {
    transform: scale(0.94);
  }

  /* dock 内图标放大为 24px */
  .actions button::before {
    font-size: 24px !important;
  }

  /* dock 内选中态: 渐变 pill 白字 */
  .actions button.active {
    background: var(--primary-gradient);
    color: var(--on-gradient);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-md);
  }

  /* dock 内主按钮: 浅玻璃描边(避免与选中态双渐变抢视觉) */
  .actions button.primary {
    color: var(--color-primary-from);
    background: rgba(244, 63, 94, 0.08);
    border: 1.5px solid rgba(244, 63, 94, 0.3);
    text-shadow: none;
    box-shadow: none;
    animation: none;
  }

  .actions button.primary:disabled::before {
    font-size: 24px;
  }
}

/* ── 平板段 (768-899px): dock 形态下的字号微调 ────────── */
@media (min-width: 768px) and (max-width: 899px) {
  .quote-text {
    font-size: 1.5rem;
    min-height: 120px;
  }

  .tag {
    margin-bottom: var(--space-lg);
  }
}
