/* ==========================================================================
   童声童话 · 安徒生故事屋
   全站视觉：深夜星空 + 奶油纸张 + 金色月光
   - 纯手写 CSS，零依赖、零外链，离线可用
   - 结构：1 变量 / 2 基础 / 3 通用组件 / 4 页头页脚 / 5 首页 Hero
           / 6 首页内容 / 7 录音上传 / 8 分析遮罩 / 9 评价单
           / 10 作品集 / 11 评分说明 / 12 响应式 / 13 动效 / 14 打印
   ========================================================================== */

/* ==========================================================================
   1. 设计变量
   ========================================================================== */
:root {
  /* 夜空 */
  --night-900: #171634;
  --night-800: #1c1a3e;
  --night-700: #241f4d;
  --night-500: #322a63;
  --night-400: #453a7d;

  /* 奶油纸张 */
  --paper: #fdf7ec;
  --paper-2: #fffdf8;
  --paper-3: #f7eddb;
  --paper-4: #f1e4cd;

  /* 文字 */
  --ink: #2c2550;
  --ink-soft: #6f678c;
  --ink-faint: #948cab;

  /* 点缀色 */
  --gold: #f2b544;
  --gold-light: #ffd166;
  --gold-deep: #d99a2b;
  --gold-wash: #fdf0d4;
  --coral: #ff8b6b;
  --coral-wash: #ffe6dd;
  --mint: #7fd1c1;
  --mint-wash: #e3f7f2;
  --sky: #7aa7ff;
  --sky-wash: #e8efff;
  --lilac: #b9a7f5;
  --lilac-wash: #efeaff;

  /* 描边 */
  --line: rgba(44, 37, 80, 0.12);
  --line-soft: rgba(44, 37, 80, 0.08);
  --line-strong: rgba(44, 37, 80, 0.22);

  /* 圆角 */
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --radius-pill: 999px;

  /* 阴影：柔和、低饱和、带一点纸张投影 */
  --shadow-sm: 0 2px 5px rgba(44, 37, 80, 0.04), 0 10px 24px -16px rgba(44, 37, 80, 0.2);
  --shadow-md: 0 4px 12px rgba(44, 37, 80, 0.05), 0 20px 44px -26px rgba(44, 37, 80, 0.3);
  --shadow-lg: 0 12px 30px rgba(44, 37, 80, 0.07), 0 38px 80px -40px rgba(23, 22, 52, 0.42);
  --shadow-gold: 0 12px 26px -14px rgba(217, 154, 43, 0.75);
  --ring-focus: 0 0 0 3px rgba(253, 247, 236, 0.95), 0 0 0 6px rgba(242, 181, 68, 0.85);

  /* 字体 */
  --font-display: "Yuanti SC", "YouYuan", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-num: Georgia, "Times New Roman", "Songti SC", serif;

  /* 版心 */
  --wrap: 1120px;
  --wrap-narrow: 860px;
  --pad-x: clamp(18px, 4vw, 32px);

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* ==========================================================================
   2. 基础重置与排版
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 620px at 6% -12%, #fff9ea 0%, rgba(255, 249, 234, 0) 62%),
    radial-gradient(900px 520px at 108% -6%, #f1ebff 0%, rgba(241, 235, 255, 0) 58%),
    repeating-linear-gradient(0deg, rgba(44, 37, 80, 0.017) 0 1px, rgba(255, 255, 255, 0) 1px 4px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

strong {
  font-weight: 700;
}

em {
  font-style: normal;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

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

audio {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: var(--radius-pill);
  accent-color: var(--gold);
}

audio::-webkit-media-controls-enclosure {
  border-radius: var(--radius-pill);
  background-color: var(--paper-3);
}

svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(255, 209, 102, 0.55);
  color: var(--night-900);
}

/* ==========================================================================
   3. 通用工具类
   ========================================================================== */

/* 视觉隐藏但可被读屏软件朗读 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 结构性隐藏：JS 会同时使用 hidden 属性与 .is-hidden，两种都必须真正生效 */
[hidden],
.is-hidden {
  display: none !important;
}

/* 跳到主要内容 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--night-700);
  color: var(--paper-2);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transform: translateY(-160%);
  transition: transform 0.24s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

/* 无 JS 提示 */
.noscript {
  max-width: var(--wrap);
  margin: 24px auto;
  padding: 16px 20px;
  border: 1.5px solid rgba(255, 139, 107, 0.5);
  border-radius: var(--radius-sm);
  background: var(--coral-wash);
  color: #7a3721;
  font-size: 15px;
}

/* 焦点环：键盘可见、鼠标不打扰 */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

button:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

/* 页面容器 */
.page-wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad-x) * 2);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.page-wrap.narrow {
  max-width: calc(var(--wrap-narrow) + var(--pad-x) * 2);
}

/* 视图显隐 —— 只显示 .is-active 的 view */
.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 0.45s var(--ease-out) both;
}

/* ==========================================================================
   4. 按钮
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: center;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn > span[aria-hidden] {
  font-size: 1.05em;
  line-height: 1;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn[disabled],
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: saturate(0.55);
  box-shadow: none;
  transform: none;
}

.btn-primary {
  border-color: rgba(217, 154, 43, 0.4);
  background: linear-gradient(135deg, #ffe39a 0%, #f8c258 52%, #ecac3d 100%);
  color: #3c2c09;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 22px -14px rgba(217, 154, 43, 0.95);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 16px 28px -14px rgba(217, 154, 43, 0.95);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: rgba(242, 181, 68, 0.6);
  background: var(--paper-2);
  transform: translateY(-1px);
}

.btn-soft {
  border-color: rgba(127, 209, 193, 0.45);
  background: linear-gradient(160deg, #eafaf6, #d9f3ec);
  color: #1f5c53;
  box-shadow: var(--shadow-sm);
}

.btn-soft:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 209, 193, 0.8);
}

.btn-danger-ghost {
  border-color: rgba(255, 139, 107, 0.55);
  background: transparent;
  color: #b84a2b;
}

.btn-danger-ghost:hover {
  background: var(--coral-wash);
  border-color: var(--coral);
}

.btn-sm {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 13.5px;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 16.5px;
}

.btn-xl {
  min-height: 56px;
  padding: 16px 30px;
  border-radius: var(--radius-pill);
  font-size: 17px;
}

/* ==========================================================================
   5. 页头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 247, 236, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad-x) * 2);
  margin-inline: auto;
  padding: 10px var(--pad-x);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  text-align: left;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.brand:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.85);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 181, 68, 0.35);
  border-radius: 14px;
  background: linear-gradient(160deg, #fff6e2, #ffe9bd);
  box-shadow: 0 1px 0 #fff inset, 0 6px 14px -10px rgba(217, 154, 43, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.brand-text small {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

/* 主导航 */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.6);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

.nav-btn.is-active {
  border-color: rgba(242, 181, 68, 0.4);
  background: linear-gradient(170deg, #fffdf6, #fff2d6);
  color: var(--ink);
  box-shadow: 0 1px 0 #fff inset, 0 4px 10px -8px rgba(44, 37, 80, 0.5);
}

/* 作品计数 */
.header-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.8);
  color: var(--ink-soft);
  font-size: 12.5px;
  white-space: nowrap;
}

.header-count strong {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--ink);
}

.header-count-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(127, 209, 193, 0.22);
  animation: dot-breathe 3.2s ease-in-out infinite;
}

/* ==========================================================================
   6. 页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(40px, 7vw, 88px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 260px at 50% 0%, rgba(255, 209, 102, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(247, 237, 219, 0.5), rgba(241, 228, 205, 0.85));
}

.footer-inner {
  padding-block: clamp(30px, 5vw, 46px) clamp(38px, 6vw, 60px);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.footer-brand span {
  font-size: 15px;
}

.footer-inner > p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.9;
}

.footer-small {
  margin-top: 8px !important;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 12.5px !important;
  letter-spacing: 0.14em;
}

/* ==========================================================================
   7. Toast 与彩纸
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 300;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(36, 31, 77, 0.96);
  color: var(--paper-2);
  font-size: 14.5px;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 18px 40px -20px rgba(23, 22, 52, 0.9);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition:
    opacity 0.28s var(--ease),
    transform 0.32s var(--ease-out);
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 250;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -6vh;
  width: 9px;
  height: 13px;
  border-radius: 2px;
  background: var(--gold);
  animation: confetti-fall 2.8s var(--ease) forwards;
  will-change: transform, opacity;
}

/* ==========================================================================
   8. 首页 Hero：深夜星空
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7f3ff;
  background:
    radial-gradient(880px 520px at 79% 4%, rgba(185, 167, 245, 0.26), transparent 62%),
    radial-gradient(680px 420px at 8% 0%, rgba(122, 167, 255, 0.18), transparent 60%),
    linear-gradient(168deg, #141230 0%, var(--night-700) 44%, #2a2356 76%, var(--night-500) 100%);
}

/* 星空画布 + CSS 星点保底（窄屏 SVG 会被裁切） */
.hero-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.75;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 14%, rgba(255, 255, 255, 0.9), transparent 100%),
    radial-gradient(1px 1px at 17% 32%, rgba(255, 233, 176, 0.8), transparent 100%),
    radial-gradient(1.6px 1.6px at 26% 10%, rgba(255, 255, 255, 0.75), transparent 100%),
    radial-gradient(1px 1px at 33% 46%, rgba(255, 255, 255, 0.6), transparent 100%),
    radial-gradient(1.4px 1.4px at 44% 20%, rgba(255, 233, 176, 0.85), transparent 100%),
    radial-gradient(1px 1px at 52% 38%, rgba(255, 255, 255, 0.6), transparent 100%),
    radial-gradient(1.7px 1.7px at 61% 12%, rgba(255, 255, 255, 0.8), transparent 100%),
    radial-gradient(1px 1px at 69% 30%, rgba(255, 233, 176, 0.7), transparent 100%),
    radial-gradient(1.4px 1.4px at 77% 18%, rgba(255, 255, 255, 0.85), transparent 100%),
    radial-gradient(1px 1px at 85% 40%, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1.5px 1.5px at 92% 22%, rgba(255, 233, 176, 0.8), transparent 100%),
    radial-gradient(1px 1px at 12% 52%, rgba(255, 255, 255, 0.4), transparent 100%),
    radial-gradient(1px 1px at 71% 50%, rgba(255, 255, 255, 0.4), transparent 100%),
    radial-gradient(1px 1px at 38% 62%, rgba(255, 255, 255, 0.3), transparent 100%);
}

.hero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(253, 247, 236, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(20, 18, 48, 0.15), rgba(20, 18, 48, 0) 30%, rgba(20, 18, 48, 0.25));
}

.sky-art {
  width: 100%;
  height: 100%;
}

/* --- 星星 --- */
.star {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 4.4s ease-in-out infinite;
}

.star:nth-of-type(2n) {
  animation-duration: 5.6s;
  animation-delay: -1.4s;
}

.star:nth-of-type(3n) {
  animation-duration: 3.6s;
  animation-delay: -2.3s;
}

.star:nth-of-type(4n + 1) {
  animation-duration: 6.2s;
  animation-delay: -0.7s;
}

.sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: sparkle-pulse 6.4s ease-in-out infinite;
}

.sparkle.p2 {
  animation-delay: -3.1s;
  animation-duration: 7.6s;
}

.shooting-star {
  animation: shooting-star 11s cubic-bezier(0.3, 0, 0.2, 1) infinite;
}

/* --- 月亮 --- */
.moon-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: moon-breathe 7.5s ease-in-out infinite;
}

.moon-rays {
  animation: rays-flicker 5.5s ease-in-out infinite;
}

/* --- 云与天鹅 --- */
.clouds {
  animation: clouds-drift 30s ease-in-out infinite alternate;
}

.swan {
  --swan-x: -170px;
  --swan-y: -105px;
  display: none;
  opacity: 0.85;
  animation: swan-float 8s ease-in-out infinite;
}

/* --- 发光的书 --- */
.storybook {
  --book-x: 0px;
  --book-y: 0px;
  animation: book-float 7.5s ease-in-out infinite;
  filter: drop-shadow(0 0 26px rgba(255, 209, 102, 0.3));
}

.book-sparks {
  transform-box: fill-box;
  transform-origin: center;
  animation: book-sparks-glow 3.8s ease-in-out infinite;
}

/* --- 底部纸色地平线 --- */
.hero-horizon {
  position: absolute;
  right: -2%;
  bottom: -1px;
  left: -2%;
  z-index: 1;
  height: clamp(52px, 7vw, 96px);
  pointer-events: none;
}

.hero-horizon::before {
  content: "";
  position: absolute;
  inset: auto 0 -2px;
  height: 100%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--paper);
  box-shadow:
    0 -1px 0 rgba(255, 209, 102, 0.2),
    0 -22px 44px -30px rgba(44, 37, 80, 0.5);
}

/* --- 内容区 --- */
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad-x) * 2);
  min-height: clamp(500px, 64vh, 660px);
  margin-inline: auto;
  padding: clamp(44px, 6.5vw, 78px) var(--pad-x) clamp(130px, 15vw, 168px);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 181, 68, 0.18);
}

.hero .eyebrow {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  color: #ded7fb;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero .eyebrow-dot {
  background: var(--gold-light);
  box-shadow:
    0 0 0 3px rgba(255, 209, 102, 0.16),
    0 0 12px rgba(255, 209, 102, 0.8);
}

.hero h1 {
  margin-top: 20px;
  color: #fffdf8;
  font-size: clamp(2.1rem, 5.1vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 30px rgba(12, 10, 34, 0.35);
  text-wrap: balance;
}

.hero h1 em {
  position: relative;
  display: inline-block;
  padding: 0 0.04em;
  color: transparent;
  background: linear-gradient(100deg, #ffefb8 0%, #ffd166 38%, #f2b544 76%, #ffcf7a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 6px 18px rgba(255, 209, 102, 0.28));
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: 1%;
  bottom: -0.06em;
  left: 1%;
  height: 0.12em;
  border-radius: var(--radius-pill);
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 209, 102, 0.62), rgba(255, 209, 102, 0) 72%);
  transform: rotate(-1.2deg);
}

.hero-desc {
  max-width: 34em;
  margin-top: 18px;
  color: rgba(240, 235, 255, 0.78);
  font-size: clamp(15.5px, 1.5vw, 17.5px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #f8f5ff;
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.17);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  max-width: 520px;
  margin-top: clamp(26px, 4vw, 38px);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stats li {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 1px;
  min-width: 92px;
  padding-right: 18px;
}

.hero-stats li + li {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stats strong {
  font-family: var(--font-num);
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold-light);
  text-shadow: 0 0 24px rgba(255, 209, 102, 0.35);
}

.hero-stats span {
  color: rgba(240, 235, 255, 0.74);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

/* 右侧引言卡 */
.hero-art {
  position: relative;
  justify-self: end;
  align-self: center;
  width: min(100%, 336px);
  transform: rotate(-2.2deg);
}

.hero-art-caption {
  position: relative;
  padding: 32px 26px 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: linear-gradient(158deg, rgba(255, 248, 232, 0.17), rgba(255, 248, 232, 0.06));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 28px 60px -30px rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.hero-art-caption::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 92px;
  height: 21px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.8), rgba(242, 181, 68, 0.5));
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%) rotate(-3deg);
}

.hero-art-caption p {
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: rgba(255, 250, 240, 0.92);
}

.quote-mark {
  display: block;
  font-family: var(--font-num);
  font-size: 56px;
  line-height: 0.62;
  color: var(--gold-light);
  opacity: 0.8;
}

.hero-art-caption .quote-mark {
  margin-bottom: 6px;
}

/* ==========================================================================
   9. 首页内容区块
   ========================================================================== */
.section-block {
  position: relative;
  margin-top: clamp(46px, 7vw, 84px);
}

.section-head {
  max-width: 64ch;
  margin-bottom: clamp(20px, 3vw, 28px);
}

.section-head h2 {
  display: inline-block;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  letter-spacing: 0.02em;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-top: 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold), rgba(242, 181, 68, 0));
}

.section-head p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.85;
}

/* --- 三步卡 --- */
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

.step-card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(172deg, var(--paper-2), #fffaf0);
  box-shadow: var(--shadow-sm);
  animation: fade-up 0.65s var(--ease-out) both;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.step-card:nth-child(2) {
  animation-delay: 0.09s;
}

.step-card:nth-child(3) {
  animation-delay: 0.18s;
}

.step-card::after {
  content: "";
  position: absolute;
  right: -34%;
  bottom: -58%;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.18), transparent 70%);
  pointer-events: none;
}

.step-card:hover {
  border-color: rgba(242, 181, 68, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-emoji {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(242, 181, 68, 0.28);
  border-radius: 16px;
  background: linear-gradient(160deg, #fff6e0, #ffe9bd);
  box-shadow: 0 6px 14px -10px rgba(217, 154, 43, 0.85);
  font-size: 26px;
  line-height: 1;
}

.step-card:nth-child(2) .step-emoji {
  border-color: rgba(127, 209, 193, 0.42);
  background: linear-gradient(160deg, #edfaf7, #d9f4ee);
  box-shadow: 0 6px 14px -10px rgba(69, 160, 145, 0.8);
}

.step-card:nth-child(3) .step-emoji {
  border-color: rgba(185, 167, 245, 0.5);
  background: linear-gradient(160deg, #f4f0ff, #e7dfff);
  box-shadow: 0 6px 14px -10px rgba(139, 119, 214, 0.8);
}

.step-index {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.step-card h3 {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.45;
}

.step-card p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

/* --- 首页故事横向卡片 --- */
.story-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(216px, 1fr);
  gap: 14px;
  padding: 4px 4px 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 37, 80, 0.18) transparent;
}

.story-strip::-webkit-scrollbar {
  height: 8px;
}

.story-strip::-webkit-scrollbar-thumb {
  border-radius: var(--radius-pill);
  background: rgba(44, 37, 80, 0.16);
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 174px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  text-align: left;
  animation: fade-up 0.55s var(--ease-out) both;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--story-color, var(--gold));
}

.story-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--story-color, var(--gold));
  opacity: 0.13;
  filter: blur(1px);
  pointer-events: none;
}

.story-card:hover {
  border-color: var(--story-color, var(--gold));
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-emoji {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--paper-3);
  font-size: 23px;
  line-height: 1;
}

.story-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.story-subtitle {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.8px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.story-duration {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-top: auto;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-soft);
  font-family: var(--font-num);
  font-size: 11.5px;
  line-height: 1.6;
}

/* --- 五维 chips --- */
.dim-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 14px;
}

.dim-chip {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  animation: fade-up 0.55s var(--ease-out) both;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.dim-chip::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--dim-color, var(--gold));
  opacity: 0.9;
}

.dim-chip:hover {
  border-color: var(--dim-color, var(--gold));
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.dim-chip-emoji {
  font-size: 22px;
  line-height: 1;
}

.dim-chip-body {
  display: block;
  min-width: 0;
}

.dim-chip strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink);
}

.dim-chip small {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.dim-chip p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

/* --- 首页行动号召 --- */
.home-cta {
  margin-block: clamp(48px, 7vw, 84px) clamp(16px, 3vw, 32px);
}

.home-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 26px);
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(560px 280px at 90% -20%, rgba(255, 209, 102, 0.26), transparent 62%),
    radial-gradient(460px 240px at 0% 130%, rgba(122, 167, 255, 0.22), transparent 62%),
    linear-gradient(150deg, #1e1a44, #2b2457 58%, #3a2f6d);
  box-shadow: var(--shadow-lg);
}

.home-cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.8;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 24%, rgba(255, 255, 255, 0.8), transparent 100%),
    radial-gradient(1px 1px at 28% 68%, rgba(255, 233, 176, 0.7), transparent 100%),
    radial-gradient(1.5px 1.5px at 46% 18%, rgba(255, 255, 255, 0.7), transparent 100%),
    radial-gradient(1px 1px at 63% 54%, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1.4px 1.4px at 81% 30%, rgba(255, 233, 176, 0.7), transparent 100%),
    radial-gradient(1px 1px at 93% 66%, rgba(255, 255, 255, 0.45), transparent 100%);
  pointer-events: none;
}

.home-cta-inner::after {
  content: "✦";
  position: absolute;
  right: 20px;
  bottom: -26px;
  transform: rotate(12deg);
  color: rgba(255, 209, 102, 0.13);
  font-size: 104px;
  line-height: 1;
  pointer-events: none;
}

.home-cta-emoji {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 18px;
  background: rgba(255, 209, 102, 0.12);
  font-size: 27px;
  line-height: 1;
}

.home-cta-inner > div {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
}

.home-cta-inner h2 {
  color: #fffdf8;
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  line-height: 1.5;
}

.home-cta-inner p {
  margin-top: 5px;
  color: rgba(240, 235, 255, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.home-cta-inner .btn {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

/* ==========================================================================
   10. 录音 / 上传表单
   ========================================================================== */
.view-head {
  padding-block: clamp(28px, 5vw, 48px) clamp(16px, 3vw, 24px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-bottom: 12px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.back-link:hover {
  color: var(--ink);
  transform: translateX(-2px);
}

.view-head .eyebrow {
  margin-bottom: 12px;
}

.view-head h1 {
  margin-top: 2px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.view-desc {
  max-width: 58ch;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.record-form {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
  padding-bottom: clamp(24px, 4vw, 40px);
}

.form-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(175deg, var(--paper-2), #fffbf3);
  box-shadow: var(--shadow-sm);
}

.form-card legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: -2px;
  padding: 2px 12px 2px 2px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.step-no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffe39a, #f2b544);
  color: #4a3206;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 10px -6px rgba(217, 154, 43, 0.9);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.required {
  color: var(--coral);
  font-style: normal;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
  appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
  font-size: 14.5px;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(44, 37, 80, 0.32);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fffefa;
  box-shadow: 0 0 0 4px rgba(242, 181, 68, 0.18);
}

.field textarea {
  min-height: 116px;
  line-height: 1.8;
  resize: vertical;
}

.custom-name-field {
  margin-top: 10px;
}

/* 姓名下拉：与输入框同款外观，右侧加下拉箭头 */
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 44px 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background-color: var(--paper-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%236f678c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 14px 9px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.field select:hover {
  border-color: rgba(44, 37, 80, 0.32);
}

.field select:focus {
  outline: none;
  border-color: var(--gold);
  background-color: #fffefa;
  box-shadow: 0 0 0 4px rgba(242, 181, 68, 0.18);
}

.field select option {
  color: var(--ink);
  background: #fffdf8;
}

.field.is-error .field-label {
  color: #b84a2b;
}

.field.is-error input,
.field.is-error textarea {
  border-color: var(--coral);
  background: #fff7f4;
  box-shadow: 0 0 0 4px rgba(255, 139, 107, 0.14);
}

/* --- 故事选择 --- */
.story-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.story-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1.5px solid var(--line-strong);
  border-radius: 18px;
  background: var(--paper-2);
  cursor: pointer;
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s var(--ease),
    box-shadow 0.25s var(--ease);
}

.story-option::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--story-color, var(--gold));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}

.story-option:hover {
  border-color: rgba(44, 37, 80, 0.3);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.story-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.story-option-emoji {
  position: relative;
  font-size: 24px;
  line-height: 1.2;
}

.story-option-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.story-option-body strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.45;
}

.story-option-body small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.2px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.story-option-body em {
  color: var(--ink-soft);
  font-family: var(--font-num);
  font-size: 11.2px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.story-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffe39a, #f2b544);
  color: #4a3206;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 8px -4px rgba(217, 154, 43, 0.9);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.2s var(--ease),
    transform 0.28s var(--ease-out);
}

/* 选中态：同时支持 :has() 与 JS 添加的 .is-selected */
.story-option:has(.story-radio:checked),
.story-option.is-selected {
  border-color: var(--story-color, var(--gold));
  background: linear-gradient(175deg, #fffdf8, #fff9ec);
  box-shadow:
    0 0 0 3px rgba(242, 181, 68, 0.16),
    var(--shadow-sm);
  transform: translateY(-1px);
}

.story-option:has(.story-radio:checked)::before,
.story-option.is-selected::before {
  opacity: 0.1;
}

.story-option:has(.story-radio:checked) .story-check,
.story-option.is-selected .story-check {
  opacity: 1;
  transform: scale(1);
}

.story-option:has(.story-radio:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.story-option.is-selected:has(.story-radio:focus-visible) {
  outline-offset: 3px;
}

/* --- 录音 / 上传方式切换 --- */
.mode-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper-3);
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.mode-tab.is-active {
  border-color: var(--line);
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 2px 8px -4px rgba(44, 37, 80, 0.35);
}

.mode-panel {
  margin-top: 16px;
}

/* --- 录音台 --- */
.recorder {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rec-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  padding: 22px 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background:
    radial-gradient(520px 260px at 50% 0%, rgba(185, 167, 245, 0.26), transparent 70%),
    radial-gradient(380px 200px at 100% 100%, rgba(255, 209, 102, 0.1), transparent 70%),
    linear-gradient(165deg, #1c1940, var(--night-700) 55%, #2c2559);
  color: #f4f0ff;
  box-shadow: 0 20px 44px -32px rgba(23, 22, 52, 0.9);
}

.rec-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background-image:
    radial-gradient(1.4px 1.4px at 10% 18%, rgba(255, 255, 255, 0.85), transparent 100%),
    radial-gradient(1px 1px at 24% 42%, rgba(255, 233, 176, 0.7), transparent 100%),
    radial-gradient(1.4px 1.4px at 41% 12%, rgba(255, 255, 255, 0.7), transparent 100%),
    radial-gradient(1px 1px at 58% 32%, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 74% 16%, rgba(255, 233, 176, 0.75), transparent 100%),
    radial-gradient(1px 1px at 88% 38%, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1px 1px at 34% 62%, rgba(255, 255, 255, 0.4), transparent 100%),
    radial-gradient(1px 1px at 70% 58%, rgba(255, 255, 255, 0.4), transparent 100%);
  pointer-events: none;
}

.rec-waveform {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 12px;
  opacity: 0.95;
}

.rec-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 96px;
  height: 96px;
  margin-top: 6px;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fff4cf, #ffd166 45%, #f2b544 100%);
  color: #4a3206;
  box-shadow:
    0 14px 30px -12px rgba(242, 181, 68, 0.7),
    0 2px 6px rgba(255, 255, 255, 0.65) inset;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.3s var(--ease);
}

.rec-btn:hover {
  transform: scale(1.035);
}

.rec-btn:active {
  transform: scale(0.97);
}

.rec-btn-icon {
  font-size: 28px;
  line-height: 1;
}

.rec-btn-label {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rec-btn.is-recording {
  border-color: rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at 32% 26%, #ffb7a3, #ff8b6b 55%, #e9663f 100%);
  color: #47150a;
  box-shadow:
    0 14px 32px -12px rgba(233, 102, 63, 0.75),
    0 2px 6px rgba(255, 255, 255, 0.5) inset;
}

.rec-btn.is-recording::before,
.rec-btn.is-recording::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(255, 139, 107, 0.65);
  border-radius: 50%;
  animation: record-pulse 1.9s ease-out infinite;
  pointer-events: none;
}

.rec-btn.is-recording::after {
  animation-delay: 0.95s;
}

.rec-timer {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  color: var(--gold-light);
  font-family: var(--font-num);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(255, 209, 102, 0.35);
}

.rec-status {
  position: relative;
  z-index: 1;
  max-width: 36ch;
  color: rgba(240, 235, 255, 0.68);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

.rec-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
}

.rec-preview audio {
  flex: 1 1 240px;
  min-width: 0;
}

.rec-preview .btn {
  flex: 0 0 auto;
}

.rec-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.rec-cancel {
  margin-top: 12px;
  padding: 7px 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.rec-cancel:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.rec-unsupported {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px dashed rgba(255, 139, 107, 0.55);
  border-radius: 12px;
  background: var(--coral-wash);
  color: #8c3c22;
  font-size: 13px;
  line-height: 1.7;
}

/* --- 上传 --- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(26px, 4vw, 38px) 20px;
  border: 2px dashed rgba(44, 37, 80, 0.22);
  border-radius: 22px;
  background: linear-gradient(175deg, #fffdf8, #fff8ea);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.22s var(--ease),
    background-color 0.22s var(--ease),
    transform 0.22s var(--ease);
}

.dropzone:hover {
  border-color: rgba(242, 181, 68, 0.75);
  background: var(--paper-2);
}

.dropzone strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.6;
}

.dropzone small {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.drop-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(242, 181, 68, 0.28));
}

.dropzone.is-dragover {
  border-color: var(--gold);
  background: var(--gold-wash);
  transform: scale(1.006);
}

.upload-preview {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
}

.file-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.file-meta span:first-child {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview .btn {
  justify-self: start;
}

/* --- 折叠补充 --- */
.advanced {
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
}

.advanced summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::before {
  content: "＋";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.advanced[open] summary::before {
  background: var(--gold-wash);
  color: var(--gold-deep);
}

.advanced[open] {
  padding-bottom: 16px;
}

.advanced-hint {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.8;
}

/* --- 提交条 --- */
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.submit-hint {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.submit-hint.is-ready {
  color: #2a7566;
  font-weight: 600;
}

.submit-hint.is-ready::before {
  content: "✓ ";
  color: var(--mint);
  font-weight: 700;
}

.submit-bar .btn {
  flex: 0 0 auto;
}

/* ==========================================================================
   11. 分析中遮罩
   ========================================================================== */
body.is-analyzing {
  overflow: hidden;
}

.analyzing-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 17, 45, 0.72);
  -webkit-backdrop-filter: blur(7px) saturate(1.1);
  backdrop-filter: blur(7px) saturate(1.1);
}

.analyzing-card,
.analyzing-card.is-show {
  position: relative;
  width: min(420px, 100%);
  padding: 30px 26px 26px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 26px;
  background:
    radial-gradient(520px 260px at 50% -8%, #fffdf6, rgba(255, 253, 246, 0) 70%),
    linear-gradient(175deg, var(--paper-2), #fff6e6);
  box-shadow: 0 34px 90px -34px rgba(0, 0, 0, 0.75);
  text-align: center;
  animation: pop-in 0.42s var(--ease-out) both;
}

.analyzing-card h2 {
  font-size: 20px;
  line-height: 1.5;
}

.analyzing-card > p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

/* 轨道装饰 */
.analyzing-orbit {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 0 auto 12px;
  border-radius: 50%;
  animation: orbit-spin 9s linear infinite;
}

.analyzing-orbit::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px dashed rgba(242, 181, 68, 0.55);
  border-radius: 50%;
}

.analyzing-orbit::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e2, #ffe1a0 62%, #f7cd77);
  box-shadow:
    0 0 28px rgba(255, 209, 102, 0.5),
    0 4px 10px -6px rgba(217, 154, 43, 0.9) inset;
}

.analyzing-orbit span {
  position: absolute;
  z-index: 1;
  color: var(--gold-deep);
  font-size: 16px;
  line-height: 1;
  transform-origin: center;
  animation: orbit-counter-spin 9s linear infinite;
}

.orbit-star {
  top: -2px;
  left: calc(50% - 8px);
}

.orbit-book {
  right: -3px;
  bottom: 10px;
  font-size: 17px;
}

.orbit-note {
  bottom: 6px;
  left: 0;
  color: var(--coral);
  font-family: var(--font-num);
}

/* 进度条 */
.progress-bar {
  position: relative;
  height: 10px;
  margin: 20px 2px 0;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #ece2d0;
  box-shadow: inset 0 1px 3px rgba(44, 37, 80, 0.1);
}

.progress-bar > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd166, #f2b544 60%, #ffcf7a);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
  transition: width 0.45s var(--ease);
}

/* 步骤 */
.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 16px;
}

.progress-steps li {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-align: center;
  transition: color 0.3s var(--ease);
}

.p-dot {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(44, 37, 80, 0.18);
  border-radius: 50%;
  background: var(--paper-2);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  transition:
    border-color 0.3s var(--ease),
    background-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.progress-steps li.is-active {
  color: var(--ink);
  font-weight: 600;
}

.progress-steps li.is-active .p-dot {
  border-color: var(--gold);
  background: var(--gold-light);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.22);
  animation: dot-breathe 1.6s ease-in-out infinite;
}

.progress-steps li.is-done {
  color: var(--ink-soft);
}

.progress-steps li.is-done .p-dot {
  border-color: var(--mint);
  background: var(--mint);
}

.progress-steps li.is-done .p-dot::after {
  content: "✓";
  font-size: 9px;
  font-weight: 700;
  color: #123f38;
}

/* ==========================================================================
   12. 评价结果单
   ========================================================================== */
.result-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding-bottom: clamp(10px, 2vw, 16px);
}

.result-view-head .back-link,
.result-view-head .eyebrow {
  margin-bottom: 0;
}

.result-sheet {
  position: relative;
  margin-bottom: clamp(28px, 4vw, 44px);
  padding: clamp(22px, 4vw, 38px) clamp(16px, 4vw, 38px);
  border: 1px solid rgba(44, 37, 80, 0.14);
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(0deg, rgba(44, 37, 80, 0.014) 0 1px, rgba(255, 255, 255, 0) 1px 4px),
    radial-gradient(900px 380px at 50% -12%, #fffdf6, rgba(255, 253, 246, 0) 68%),
    linear-gradient(180deg, var(--paper-2), #fdf5e6 98%);
  box-shadow: var(--shadow-lg);
}

/* 胶带 + 星星贴纸 */
.result-sheet::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: clamp(108px, 17vw, 158px);
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(100deg, rgba(255, 209, 102, 0.88), rgba(242, 181, 68, 0.55));
  box-shadow: 0 4px 12px -6px rgba(44, 37, 80, 0.35);
  transform: translateX(-50%) rotate(-1.6deg);
  pointer-events: none;
}

.result-sheet::after {
  content: "✦";
  position: absolute;
  right: 16px;
  bottom: 8px;
  color: rgba(242, 181, 68, 0.45);
  font-size: 20px;
  line-height: 1;
  transform: rotate(12deg);
  pointer-events: none;
}

/* --- 头部：奖章 / 文案 / 分数环 --- */
.result-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  padding-bottom: clamp(16px, 3vw, 26px);
  border-bottom: 1px dashed rgba(44, 37, 80, 0.18);
}

.grade-medal {
  --grade-color: var(--gold);
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(92px, 12vw, 116px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    var(--grade-color),
    #fff3cf 22%,
    var(--grade-color) 46%,
    #ffe7a8 68%,
    var(--grade-color) 100%
  );
  box-shadow:
    0 14px 30px -16px rgba(44, 37, 80, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  animation: medal-pop 0.75s var(--ease-out) both;
}

.grade-medal.is-pop {
  animation: medal-pop 0.75s var(--ease-out) both;
}

.grade-medal::before {
  content: "";
  position: absolute;
  top: 74%;
  left: 50%;
  z-index: 0;
  width: 62%;
  height: 46%;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--grade-color), #ffb08f 50%, var(--grade-color));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  box-shadow: 0 8px 14px -10px rgba(44, 37, 80, 0.5);
  transform: translateX(-50%);
}

.grade-medal::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #fffdf6, #fdf1d8 62%, #f7e4bd);
  box-shadow: inset 0 2px 6px rgba(44, 37, 80, 0.12);
}

.grade-medal[data-grade="S"] {
  --grade-color: #f5b301;
}

.grade-medal[data-grade="A"] {
  --grade-color: #ff8b6b;
}

.grade-medal[data-grade="B"] {
  --grade-color: #7fd1c1;
}

.grade-medal[data-grade="C"] {
  --grade-color: #7aa7ff;
}

.grade-medal[data-grade="D"] {
  --grade-color: #b9a7f5;
}

.grade-letter {
  position: relative;
  z-index: 2;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: clamp(2.5rem, 5.2vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 0 #fffaf0;
}

.result-headline {
  min-width: 0;
}

.result-name {
  color: var(--ink-soft);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.grade-title {
  margin-top: 3px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.grade-stars {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 #fff;
}

.grade-stars span {
  display: inline-block;
  animation: star-pop 0.45s var(--ease-out) both;
}

.grade-stars span:nth-child(2) {
  animation-delay: 0.06s;
}

.grade-stars span:nth-child(3) {
  animation-delay: 0.12s;
}

.grade-stars span:nth-child(4) {
  animation-delay: 0.18s;
}

.grade-stars span:nth-child(5) {
  animation-delay: 0.24s;
}

/* JS 生成：<span class="star is-filled">★</span> / <span class="star is-empty">☆</span> */
.grade-stars .star {
  display: inline-block;
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  transform-origin: center;
  animation: star-pop 0.45s var(--ease-out) both;
}

.grade-stars .star.is-filled {
  color: var(--gold);
  text-shadow:
    0 1px 0 #fffaf0,
    0 0 12px rgba(255, 209, 102, 0.45);
}

.grade-stars .star.is-empty {
  color: rgba(242, 181, 68, 0.45);
  opacity: 0.75;
}

.grade-headline {
  margin-top: 8px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.7;
}

/* 比 headline 弱一级的鼓励语 */
.grade-encouragement {
  max-width: 44ch;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.result-tag {
  padding: 4px 11px;
  border: 1px solid rgba(185, 167, 245, 0.4);
  border-radius: var(--radius-pill);
  background: var(--lilac-wash);
  color: #4a3f74;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* 分数环：JS 设置 --score 与 --ring-color */
.score-ring {
  --score: 0;
  --ring-color: var(--gold);
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(112px, 15vw, 138px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), rgba(44, 37, 80, 0.09) 0);
  box-shadow: 0 12px 26px -18px rgba(44, 37, 80, 0.55);
  animation: ring-in 0.85s var(--ease-out) both;
}

.score-ring-inner {
  position: absolute;
  inset: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fffdf7, #fdf3e2 70%, #f8e9cf);
  box-shadow: inset 0 2px 6px rgba(44, 37, 80, 0.12);
}

.score-number {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.score-ring-inner small {
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* --- 试听与金句 --- */
.result-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(12px, 2.4vw, 20px);
  margin-top: clamp(16px, 3vw, 24px);
}

.result-audio-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
}

.result-audio-label {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.result-audio-box audio {
  height: 42px;
}

.result-quote {
  position: relative;
  padding: 15px 18px 15px 44px;
  border: 1px dashed rgba(242, 181, 68, 0.5);
  border-radius: 18px;
  background: linear-gradient(170deg, #fffaef, #fff4dd);
}

.result-quote .quote-mark {
  position: absolute;
  top: 10px;
  left: 15px;
  color: var(--gold-deep);
  font-size: 34px;
  line-height: 1;
  opacity: 0.5;
}

.result-quote p {
  color: #6a4a12;
  font-family: var(--font-display);
  font-size: 13.5px;
  line-height: 1.85;
}

/* --- 通用奶油卡 --- */
.card {
  position: relative;
  padding: clamp(16px, 2.8vw, 22px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
}

.card > h2 {
  font-size: 16.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(12px, 2.4vw, 18px);
  margin-top: clamp(16px, 3vw, 24px);
}

/* 雷达图 */
.radar-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radar-wrap {
  width: 100%;
  max-width: 340px;
  margin: 8px auto 0;
}

.radar-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

.radar-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 7px 12px;
  margin-top: 12px;
}

.radar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.radar-legend li > span:not(.legend-dot) {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-legend li strong {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 11.5px;
  line-height: 1.6;
}

.legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--dim-color, var(--gold));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

/* 总评 */
.overall-card {
  display: flex;
  flex-direction: column;
}

.overall-comment {
  margin-top: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.9;
}

.mini-title {
  margin-top: 18px;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.mini-title::before {
  content: "✦";
  margin-right: 6px;
  color: var(--gold);
  font-size: 12px;
}

.highlight-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.highlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 209, 193, 0.35);
  border-radius: 14px;
  background: var(--mint-wash);
  color: #24554d;
  font-size: 13px;
  line-height: 1.75;
}

.hl-emoji {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1.4;
}

.highlight-list li > div {
  min-width: 0;
}

.highlight-list li strong {
  display: block;
  margin-bottom: 1px;
  color: #1c4a43;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.6;
}

.highlight-list li p {
  margin: 0;
  color: #2a5c53;
  font-size: 12.8px;
  line-height: 1.75;
}

/* --- 五维评价卡 --- */
.dimensions-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 298px), 1fr));
  gap: clamp(12px, 2vw, 16px);
  margin-top: clamp(16px, 3vw, 24px);
}

@media (min-width: 761px) {
  .dimensions-result > .dimension-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.dimension-card {
  --dim-color: var(--gold);
  --dim-score: 0;
  --dim-tier: var(--dim-color);
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 2.4vw, 20px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.dimension-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dim-color);
  opacity: 0.07;
  pointer-events: none;
}

.dimension-card:hover {
  border-color: var(--dim-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 分档强调：JS 可加 data-tier 或 .is-high/.is-mid/.is-low */
.dimension-card:is([data-tier="high"], .is-high) {
  --dim-tier: var(--gold-deep);
}

.dimension-card:is([data-tier="mid"], .is-mid) {
  --dim-tier: #2f8f7f;
}

.dimension-card:is([data-tier="low"], .is-low) {
  --dim-tier: #5b7fd4;
}

.dim-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dim-emoji {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(44, 37, 80, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 19px;
  line-height: 1;
}

.dim-title {
  flex: 1 1 auto;
  min-width: 0;
}

.dim-title h3 {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.dim-title small {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

.dim-score {
  flex: 0 0 auto;
  color: var(--dim-text, var(--ink));
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dimension-card[data-dim="clarity"] {
  --dim-text: #3d63b0;
}

.dimension-card[data-dim="fluency"] {
  --dim-text: #2f8f7f;
}

.dimension-card[data-dim="expression"] {
  --dim-text: #a9741a;
}

.dimension-card[data-dim="content"] {
  --dim-text: #c4553a;
}

.dimension-card[data-dim="recording"] {
  --dim-text: #6f5cb8;
}

.dim-score small {
  margin-left: 2px;
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}

.dim-bar {
  position: relative;
  margin-top: 12px;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(44, 37, 80, 0.09);
  box-shadow: inset 0 1px 2px rgba(44, 37, 80, 0.08);
}

.dim-bar > i {
  display: block;
  width: calc(var(--dim-score, 0) * 1%);
  height: 100%;
  border-radius: inherit;
  background: var(--dim-tier);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35) inset;
  transition: width 0.9s var(--ease);
}

.dim-comment {
  position: relative;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

/* --- 练习建议 --- */
.suggestions-card {
  margin-top: clamp(16px, 3vw, 24px);
}

.suggestion-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.suggestion-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 139, 107, 0.24);
  border-radius: 14px;
  background: #fff8f4;
  color: #5c4136;
  font-size: 13px;
  line-height: 1.8;
}

.sg-emoji {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1.4;
}

.suggestion-list li > div {
  min-width: 0;
}

.suggestion-list li strong {
  display: block;
  margin-bottom: 2px;
  color: #8a4a2c;
  font-family: var(--font-display);
  font-size: 13.5px;
}

.suggestion-list li p {
  margin: 0;
  color: #5c4136;
  font-size: 12.8px;
  line-height: 1.78;
}

.suggestions-note {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* --- 朗读内容折叠 --- */
.transcript-card {
  margin-top: clamp(16px, 3vw, 24px);
  padding: 0 clamp(16px, 2.8vw, 22px);
}

.transcript-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.transcript-card summary::-webkit-details-marker {
  display: none;
}

.transcript-card summary::after {
  content: "▾";
  color: var(--ink-soft);
  font-size: 12px;
  transition: transform 0.25s var(--ease);
}

.transcript-card[open] summary::after {
  transform: rotate(180deg);
}

.transcript-card[open] {
  padding-bottom: 16px;
}

.transcript-text {
  max-height: 280px;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: var(--paper-3);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.transcript-note {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

/* --- 结果页操作 --- */
/* 云端存档状态 */
.cloud-sync {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
}

.cloud-sync-icon {
  flex: 0 0 auto;
  font-size: 21px;
  line-height: 1;
}

.cloud-sync-body {
  flex: 1;
  min-width: 0;
}

.cloud-sync-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--ink);
}

.cloud-sync-body p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.65;
}

.cloud-sync.is-busy .cloud-sync-icon {
  animation: cloud-float 1.6s ease-in-out infinite;
}

.cloud-sync.is-success {
  border-color: rgba(127, 209, 193, 0.55);
  background: var(--mint-wash);
}

.cloud-sync.is-success .cloud-sync-body strong {
  color: #24554d;
}

.cloud-sync.is-pending {
  border-color: rgba(242, 181, 68, 0.55);
  background: #fff8e6;
}

.cloud-sync.is-pending .cloud-sync-body strong {
  color: #6a4a12;
}

.cloud-sync.is-error {
  border-color: rgba(255, 139, 107, 0.55);
  background: #fff7f4;
}

.cloud-sync.is-error .cloud-sync-body strong {
  color: #8c3c22;
}

.cloud-sync .btn {
  flex: 0 0 auto;
}

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

@media (max-width: 560px) {
  .cloud-sync {
    flex-wrap: wrap;
  }

  .cloud-sync .btn {
    width: 100%;
  }
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(20px, 3.4vw, 30px);
  padding-top: clamp(16px, 3vw, 24px);
  border-top: 1px dashed rgba(44, 37, 80, 0.18);
}

.result-footnote {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.8;
  text-align: center;
}

/* ==========================================================================
   13. 作品集
   ========================================================================== */
.gallery-head {
  padding-bottom: clamp(12px, 2vw, 18px);
}

.gallery-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gallery-title-row h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.25;
}

.gallery-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-mode-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 4px 0 22px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.8);
  box-shadow: var(--shadow-sm);
}

.gallery-mode {
  min-height: 38px;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.gallery-mode:hover {
  color: var(--ink);
}

.gallery-mode.is-active {
  background: linear-gradient(160deg, var(--night-500), var(--night-700));
  color: #fff8ec;
  box-shadow: 0 8px 18px -12px rgba(23, 22, 52, 0.9);
}

.gallery-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
  gap: 12px;
  margin-top: clamp(18px, 3vw, 26px);
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 44px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gold);
  transform: translateX(-50%);
}

.stat-card:nth-child(2)::before {
  background: var(--mint);
}

.stat-card:nth-child(3)::before {
  background: var(--sky);
}

.stat-card:nth-child(4)::before {
  background: var(--lilac);
}

.stat-emoji {
  font-size: 22px;
  line-height: 1.3;
}

.stat-card strong {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 23px;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.25;
}

.stat-card small {
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* 筛选 */
.gallery-filters {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.filter-chip:hover {
  border-color: rgba(242, 181, 68, 0.6);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--night-700);
  background: var(--night-700);
  color: var(--paper-2);
  box-shadow: 0 6px 14px -10px rgba(23, 22, 52, 0.85);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: rgba(44, 37, 80, 0.08);
  color: var(--ink-soft);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.filter-chip:hover .filter-count {
  background: rgba(44, 37, 80, 0.13);
}

.filter-chip.is-active .filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--paper-2);
}

/* 作品网格 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.work-card {
  --grade-color: var(--gold);
  --avatar-color: var(--mint);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  animation: fade-up 0.5s var(--ease-out) both;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--grade-color), rgba(255, 255, 255, 0));
}

.work-card:hover {
  border-color: rgba(242, 181, 68, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.work-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.work-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--avatar-color);
  color: var(--night-900);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 10px -6px rgba(44, 37, 80, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.work-who {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.work-who strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-who small {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--grade-color);
  color: var(--night-900);
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow:
    0 4px 10px -6px var(--grade-color),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.work-story {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13.5px;
  line-height: 1.6;
}

.work-comment {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.8px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-meta span {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.work-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.work-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--night-500), var(--night-700));
  color: var(--paper-2);
  font-size: 13px;
  line-height: 1;
  box-shadow: 0 6px 14px -8px rgba(23, 22, 52, 0.9);
  transition:
    transform 0.2s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.work-play:hover {
  background: linear-gradient(160deg, #ffd166, #f2b544);
  color: #3c2c09;
  transform: scale(1.06);
}

.work-play.is-playing {
  background: linear-gradient(160deg, #ffb7a3, #ff8b6b);
  color: #47150a;
  box-shadow:
    0 0 0 3px rgba(255, 139, 107, 0.22),
    0 6px 14px -8px rgba(233, 102, 63, 0.9);
}

.work-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  margin-left: 2px;
  padding: 6px 14px;
  border: 1px solid rgba(217, 154, 43, 0.45);
  border-radius: var(--radius-pill);
  background: linear-gradient(160deg, #fff8e6, #ffedc9);
  color: #6a4a12;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.work-open:hover {
  border-color: var(--gold);
  background: linear-gradient(160deg, #fff3d4, #ffe1a6);
  box-shadow: 0 6px 14px -10px rgba(217, 154, 43, 0.9);
  transform: translateY(-1px);
}

.work-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid rgba(255, 139, 107, 0.4);
  border-radius: var(--radius-pill);
  background: #fff6f2;
  color: #a44a31;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.work-like:hover {
  border-color: var(--coral);
  background: #ffe9e2;
  transform: translateY(-1px);
}

.work-like.is-liked {
  border-color: rgba(255, 139, 107, 0.75);
  background: #ffe1d7;
  color: #8c351d;
}

.work-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(127, 209, 193, 0.55);
  border-radius: var(--radius-pill);
  background: var(--mint-wash);
  color: #24554d;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.work-share:hover {
  border-color: var(--mint);
  background: #e4f7f0;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -10px rgba(60, 140, 120, 0.9);
}

.work-share:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.work-actions {
  flex-wrap: wrap;
}

.work-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.work-delete:hover {
  border-color: rgba(255, 139, 107, 0.45);
  background: #fff5f1;
  color: #b84a2b;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: clamp(36px, 7vw, 64px) 24px;
  border: 1.5px dashed rgba(44, 37, 80, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(520px 240px at 50% 0%, #fffdf5, rgba(255, 253, 245, 0) 70%),
    rgba(255, 253, 248, 0.6);
  text-align: center;
}

.empty-emoji {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #372f6c, #1d1a42 78%);
  font-size: 38px;
  line-height: 1;
  box-shadow:
    0 16px 34px -18px rgba(23, 22, 52, 0.9),
    0 0 0 8px rgba(242, 181, 68, 0.09);
  animation: float-soft 6.5s ease-in-out infinite;
}

.empty-state h2 {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
}

.empty-state p {
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.8;
}

.empty-state .btn {
  margin-top: 10px;
}

/* 首页故事条数据缺失时的行内提示 */
.empty-inline {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 26px 18px;
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.65);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

/* ==========================================================================
   14. 评分说明
   ========================================================================== */
.guide-h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.guide-h2::before {
  content: "✦";
  margin-right: 8px;
  color: var(--gold);
  font-size: 0.72em;
  vertical-align: 0.12em;
}

.guide-dimensions {
  display: grid;
  gap: 12px;
}

.guide-dim {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.guide-dim:hover {
  border-color: rgba(242, 181, 68, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.guide-dim-emoji {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 181, 68, 0.3);
  border-radius: 14px;
  background: linear-gradient(160deg, #fff6e0, #ffe9bd);
  font-size: 22px;
  line-height: 1;
}

.guide-dim h3,
.guide-dim-body h3 {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 1.5;
}

.guide-dim-weight,
.guide-dim h3 small {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  vertical-align: 0.12em;
}

.guide-dim-body {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.guide-dim > p,
.guide-dim-body p {
  flex: 1 1 100%;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.85;
}

.guide-dim .guide-dim-good {
  margin-top: 2px;
  padding: 8px 12px;
  border: 1px solid rgba(127, 209, 193, 0.32);
  border-radius: 12px;
  background: var(--mint-wash);
  color: #1f5c53;
  font-size: 12.5px;
  line-height: 1.75;
}

/* 等级说明 */
.guide-grades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
  gap: 12px;
}

.guide-grade {
  --grade-color: var(--gold);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.guide-grade::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--grade-color);
}

.guide-grade:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.guide-grade[data-grade="S"] {
  --grade-color: #f5b301;
}

.guide-grade[data-grade="A"] {
  --grade-color: #ff8b6b;
}

.guide-grade[data-grade="B"] {
  --grade-color: #7fd1c1;
}

.guide-grade[data-grade="C"] {
  --grade-color: #7aa7ff;
}

.guide-grade[data-grade="D"] {
  --grade-color: #b9a7f5;
}

.guide-grade-letter {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--grade-color);
  color: var(--night-900);
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow:
    0 8px 18px -10px var(--grade-color),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.guide-grade h3 {
  font-size: 15px;
  line-height: 1.5;
}

.guide-grade p {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
}

.guide-grade strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 13px;
}

.guide-grade-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.guide-grade-body strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.5;
}

.guide-grade-body small {
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.guide-grade-body p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.8;
}

.guide-note {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px dashed rgba(242, 181, 68, 0.5);
  border-radius: 14px;
  background: var(--gold-wash);
  color: #6a4a12;
  font-size: 12.5px;
  line-height: 1.8;
}

/* 小贴士 */
.tips-list {
  display: grid;
  gap: 10px;
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.8;
  box-shadow: var(--shadow-sm);
}

.tip-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffe39a, #f2b544);
  color: #4a3206;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* 常见问题 */
.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.faq-item[open] {
  border-color: rgba(242, 181, 68, 0.45);
  background: linear-gradient(175deg, #fffdf8, #fff8ea);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "＋";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.faq-item[open] summary::after {
  background: var(--gold-wash);
  color: var(--gold-deep);
}

.faq-item p,
.faq-item > div:not(summary) {
  padding: 0 0 16px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.85;
}

/* ==========================================================================
   15. 响应式：移动优先，360px 不破版，桌面 1120px 居中
   ========================================================================== */
@media (min-width: 1200px) {
  .storybook {
    --book-x: 168px;
    --book-y: -72px;
  }

  .swan {
    display: block;
  }
}

@media (max-width: 1024px) {
  .hero-art {
    width: min(100%, 300px);
  }
}

@media (min-width: 900px) {
  .story-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-columns: auto;
    padding: 4px 4px 4px;
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 0;
    padding-bottom: clamp(96px, 13vw, 132px);
  }

  .hero-art {
    display: none;
  }

  .hero h1 {
    max-width: 16em;
  }

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

  .step-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0 16px;
  }

  .step-card .step-emoji {
    grid-row: span 3;
  }

  .step-card .step-index {
    margin-top: 2px;
    justify-self: start;
  }

  .step-card h3 {
    grid-column: 2;
    margin-top: 8px;
  }

  .step-card p {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .result-summary,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .radar-wrap {
    max-width: 300px;
  }
}

@media (max-width: 780px) {
  .header-inner {
    gap: 8px 10px;
    padding-block: 9px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .header-count {
    order: 2;
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 7px 13px;
    font-size: 13.5px;
  }
}

@media (max-width: 760px) {
  .result-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .result-headline {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .grade-stars,
  .result-tags {
    justify-content: center;
  }

  .result-actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 720px) {
  .home-cta-inner {
    flex-wrap: wrap;
    gap: 14px;
  }

  .home-cta-inner > div {
    flex: 1 1 200px;
  }

  .home-cta-inner .btn {
    width: 100%;
  }

  .home-cta-emoji {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 22px;
  }

  .submit-bar {
    position: sticky;
    bottom: 8px;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.95);
  }

  .submit-hint {
    text-align: center;
    font-size: 12.5px;
  }

  .submit-bar .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .hero-art {
    display: none;
  }

  .storybook {
    display: none;
  }

  /* 手机端 SVG 月亮会被裁掉，用 CSS 月亮补一枚 */
  .hero-sky::after {
    background:
      radial-gradient(circle at 83.2% 15.4%, rgba(243, 210, 143, 0.8) 0 3px, transparent 4px),
      radial-gradient(circle at 85.6% 18.6%, rgba(243, 210, 143, 0.7) 0 2px, transparent 3px),
      radial-gradient(circle at 84% 17%, #ffedb8 0 20px, rgba(255, 233, 176, 0.3) 21px 29px, rgba(255, 233, 176, 0) 56px),
      radial-gradient(120% 90% at 50% 120%, rgba(253, 247, 236, 0.16), transparent 60%),
      linear-gradient(180deg, rgba(20, 18, 48, 0.15), rgba(20, 18, 48, 0) 30%, rgba(20, 18, 48, 0.25));
  }

  .hero-inner {
    gap: 0;
    padding-top: 36px;
    padding-bottom: clamp(84px, 16vw, 112px);
  }

  .hero h1 {
    margin-top: 16px;
  }

  .hero-desc {
    margin-top: 14px;
    font-size: 15px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-stats {
    margin-top: 24px;
    padding-top: 16px;
  }

  .hero-stats li {
    min-width: 0;
    padding-right: 12px;
  }

  .hero-stats li + li {
    padding-left: 12px;
  }

  .hero-stats span {
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .mode-tabs {
    display: flex;
    width: 100%;
  }

  .mode-tab {
    flex: 1 1 0;
    justify-content: center;
    padding: 9px 10px;
    font-size: 13.5px;
  }

  .rec-btn {
    width: 88px;
    height: 88px;
  }

  .rec-timer {
    font-size: 26px;
  }

  .form-card {
    border-radius: 22px;
  }

  .result-sheet {
    padding: 20px 14px 24px;
    border-radius: 26px;
  }

  .result-sheet::before {
    top: -11px;
    width: 100px;
    height: 22px;
  }

  .grade-medal {
    width: 96px;
  }

  .dimensions-result {
    grid-template-columns: 1fr;
  }

  .suggestion-list li,
  .highlight-list li {
    font-size: 12.5px;
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .result-actions .btn {
    width: 100%;
  }

  .result-footnote {
    font-size: 11px;
  }

  .gallery-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .gallery-tools {
    width: 100%;
  }

  .gallery-tools .btn {
    flex: 1 1 0;
  }

  .gallery-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .guide-dim {
    padding: 16px;
  }

  .guide-grades {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-grade {
    padding: 16px 10px;
  }

  .guide-grade-letter {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .guide-grade p {
    font-size: 12px;
    line-height: 1.7;
  }

  .tips-list li {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .header-count {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  .header-count strong {
    font-size: 14px;
  }

  .section-head p {
    font-size: 13.5px;
  }

  .view-desc {
    font-size: 14px;
  }

  .toast {
    bottom: 16px;
    font-size: 13.5px;
  }
}

@media (max-width: 380px) {
  .guide-grades {
    grid-template-columns: 1fr;
  }

  .hero-stats strong {
    font-size: 1.3rem;
  }
}

/* 支持 hover 的设备才做抬起动效，避免触屏“粘住” */
@media (hover: none) {
  .step-card:hover,
  .story-card:hover,
  .dim-chip:hover,
  .work-card:hover,
  .guide-dim:hover,
  .guide-grade:hover,
  .dimension-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   16. 动效关键帧
   ========================================================================== */
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes sparkle-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.82) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.12) rotate(18deg);
  }
}

@keyframes shooting-star {
  0%,
  55% {
    opacity: 0;
    transform: translate(80px, -40px);
  }
  60% {
    opacity: 0.95;
    transform: translate(28px, -12px);
  }
  70% {
    opacity: 0;
    transform: translate(-92px, 46px);
  }
  100% {
    opacity: 0;
    transform: translate(-92px, 46px);
  }
}

@keyframes moon-breathe {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes rays-flicker {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.65;
  }
}

@keyframes clouds-drift {
  from {
    transform: translateX(-18px);
  }
  to {
    transform: translateX(22px);
  }
}

/* 用 CSS translate 属性叠加，避免覆盖 SVG 里的 transform 属性定位 */
@keyframes swan-float {
  0%,
  100% {
    translate: var(--swan-x, 0px) var(--swan-y, 0px);
  }
  50% {
    translate: var(--swan-x, 0px) calc(var(--swan-y, 0px) - 9px);
  }
}

@keyframes book-float {
  0%,
  100% {
    translate: var(--book-x, 0px) var(--book-y, 0px);
  }
  50% {
    translate: var(--book-x, 0px) calc(var(--book-y, 0px) - 12px);
  }
}

@keyframes book-sparks-glow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes dot-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes p-dot-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.24);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 209, 102, 0.06);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  8% {
    opacity: 1;
  }
  100% {
    opacity: 0.85;
    transform: translate3d(var(--drift, 0px), 106vh, 0) rotate(640deg);
  }
}

@keyframes record-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.96);
  }
  70% {
    opacity: 0;
    transform: scale(1.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

@keyframes medal-pop {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(-10deg);
  }
  62% {
    opacity: 1;
    transform: scale(1.06) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes star-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ring-in {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* p-dot 激活态使用金色脉冲（覆盖 dot-breathe 的通用阴影） */
.progress-steps li.is-active .p-dot {
  animation: p-dot-pulse 1.6s ease-in-out infinite;
}

/* ==========================================================================
   17. 减少动态效果：尊重系统设置
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    animation-fill-mode: both !important;
  }

  .confetti-layer {
    display: none;
  }
}

/* ==========================================================================
   18. 打印：只打印评价单
   ========================================================================== */

/* ==========================================================================
   17. UI 走查后的体验优化（2026-10-23）
   - P0：Toast/吸底条/移动头部/零数据/作品集首屏
   - P1：移动首页压缩、故事条、英雄装饰、可读性与触控目标
   - 评价单：折叠评语、打印入口、隐藏内部路径
   ========================================================================== */

:root {
  --ink-faint: #736b8a;
  --ring-focus: 0 0 0 3px rgba(253, 247, 236, 0.95), 0 0 0 6px #8a5a00;
}

:focus-visible {
  outline-color: #8a5a00;
}

.hero :focus-visible {
  outline-color: var(--gold-light);
}

/* 非 Hero 的 eyebrow 改为纯文字标签，减少“伪按钮”感 */
.view-head > .eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.16em;
}

.view-head > .eyebrow .eyebrow-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

/* 作品集标题区：标题 → 说明 → 操作，桌面按钮靠右 */
.gallery-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 20px;
  padding-bottom: clamp(10px, 2vw, 16px);
}

.gallery-head h1 {
  grid-column: 1;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.25;
}

.gallery-head .view-desc {
  grid-column: 1;
  margin-top: 2px;
}

.gallery-head .gallery-tools {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
}

/* 作品集搜索 */
.gallery-search {
  display: block;
  margin-top: 12px;
}

.gallery-search input {
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.gallery-search input::placeholder {
  color: var(--ink-faint);
}

.gallery-search input:focus {
  border-color: rgba(217, 154, 43, 0.55);
  outline: none;
  box-shadow: var(--ring-focus);
}

/* 故事卡：明确可点 */
.story-start {
  margin-top: auto;
  padding-top: 8px;
  color: var(--gold-deep);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.story-swipe-hint {
  display: none;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: right;
}

/* 零数据时首页用“班级信息”代替 0 值 */
.hero-stats--starter strong {
  color: var(--gold-light);
}

/* 结果页折叠评语按钮 */
.dim-more {
  display: none;
  margin-top: 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: #8a5a00;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 原生播放器至少给足触控高度 */
.result-audio-box audio {
  width: 100%;
  min-height: 48px;
  height: 48px;
}

/* 减少孤字 */
.empty-state p,
.home-cta h2,
.hero h1,
.result-footnote {
  text-wrap: balance;
}

.empty-state p {
  max-width: 22em;
}

/* 平板：故事条用网格，不再横滑 */
@media (min-width: 700px) {
  .story-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-columns: auto;
    padding: 4px 4px 8px;
    overflow: visible;
    scroll-snap-type: none;
  }
}

@media (max-width: 699px) {
  .story-strip {
    grid-auto-columns: minmax(198px, 42vw);
    padding-right: 36px;
    scroll-snap-type: x mandatory;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 84%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 84%, transparent 100%);
  }

  .story-card {
    scroll-snap-align: start;
  }

  .story-swipe-hint {
    display: block;
  }
}

/* 桌面英雄区：让天鹅与卡片拉开安全距离，月亮上移 */
@media (min-width: 1200px) {
  .swan {
    --swan-x: -238px;
    --swan-y: -112px;
  }

  .moon-group {
    transform: translate(-26px, -14px);
  }

  .hero-art-caption {
    background: linear-gradient(158deg, rgba(255, 248, 232, 0.26), rgba(255, 248, 232, 0.1));
  }
}

@media (min-width: 700px) and (max-width: 900px) {
  .step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 18px;
  }

  .step-card .step-emoji {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 21px;
  }

  .step-card .step-index {
    margin-top: 10px;
    justify-self: auto;
  }

  .step-card h3 {
    margin-top: 8px;
    font-size: 16px;
  }

  .step-card p {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.7;
  }
}

@media (max-width: 720px) {
  /* Toast 移到头部下方，避免遮挡任何底部操作/音频条 */
  .toast {
    top: calc(100px + env(safe-area-inset-top, 0px));
    bottom: auto;
    transform: translate(-50%, -18px);
    font-size: 13.5px;
  }

  .toast.is-show {
    transform: translate(-50%, 0);
  }

  /* 提交条回到文档流，不再压住第 3 步 */
  .submit-bar {
    position: static;
    bottom: auto;
    z-index: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .submit-hint {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 12.5px;
    line-height: 1.55;
  }

  .submit-bar .btn {
    width: auto;
    min-height: 52px;
    padding: 10px 16px;
    font-size: 14.5px;
    white-space: nowrap;
  }

  .mode-tabs {
    scroll-margin-bottom: 12px;
  }

  /* 触控目标 ≥44px */
  .nav-btn,
  .back-link,
  .filter-chip,
  .gallery-mode,
  .mode-tab,
  .work-open,
  .work-share,
  .work-like,
  .work-delete,
  .work-play {
    min-height: 44px;
  }

  .work-play {
    width: 44px;
    height: 44px;
  }

  .work-actions {
    gap: 6px;
  }

  .work-delete {
    margin-left: 0;
    padding: 8px 12px;
  }

  .gallery-mode {
    font-size: 13.5px;
  }
}

@media (max-width: 620px) {
  /* 移动头部：目标 ≤96px */
  .header-inner {
    gap: 2px 6px;
    padding: 3px 10px;
  }

  .brand {
    flex: 1 1 auto;
    gap: 6px;
    padding: 1px 3px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-mark svg {
    width: 28px;
    height: 28px;
  }

  .brand-text strong {
    font-size: 15.5px;
  }

  .brand-text small {
    display: none;
  }

  .header-count {
    display: none;
  }

  .main-nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    margin-left: 0;
    padding: 1px;
  }

  .nav-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 5px 10px;
    font-size: 13px;
  }

  /* 英雄区：减少首屏高度和装饰穿帮 */
  .hero h1 {
    margin-top: 12px;
    text-shadow: 0 2px 16px rgba(20, 18, 48, 0.55);
  }

  .hero-desc {
    margin-top: 12px;
    font-size: 14.5px;
    line-height: 1.75;
  }

  .hero-actions {
    margin-top: 18px;
    gap: 8px;
    align-items: center;
  }

  .hero-actions .btn-primary {
    width: 100%;
  }

  .hero-actions .btn-ghost {
    width: auto;
    min-height: 44px;
    padding: 8px 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #efe9ff;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .hero-actions .btn-ghost:hover {
    background: transparent;
    transform: none;
    color: #fff;
  }

  .hero-stats {
    margin-top: 18px;
    padding-top: 12px;
  }

  .hero-stats strong {
    font-size: 1.3rem;
  }

  .hero-stats span {
    font-size: 10.5px;
  }

  /* 首页三步：压缩为紧凑行 */
  .step-grid {
    gap: 8px;
  }

  .step-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0 10px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .step-card .step-emoji {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 19px;
    grid-row: span 2;
  }

  .step-card .step-index {
    display: none;
  }

  .step-card h3 {
    grid-column: 2;
    margin-top: 1px;
    font-size: 15.5px;
    line-height: 1.45;
  }

  .step-card p {
    grid-column: 2;
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.65;
  }

  /* 五维：两列紧凑卡 */
  .dim-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dim-chip {
    padding: 10px 10px 10px 14px;
    border-radius: 16px;
  }

  .dim-chip-emoji {
    font-size: 18px;
  }

  .dim-chip strong {
    margin-top: 3px;
    font-size: 13.5px;
  }

  .dim-chip small {
    font-size: 10.5px;
  }

  .dim-chip p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.6;
  }

  .dim-chip:last-child {
    grid-column: 1 / -1;
  }

  /* 作品集：顺序、统计、首屏 */
  .gallery-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .gallery-head h1 {
    font-size: 1.8rem;
  }

  .gallery-head .view-desc {
    margin-top: 0;
    font-size: 13.5px;
    line-height: 1.65;
  }

  .gallery-head .gallery-tools {
    width: 100%;
    margin-top: 2px;
    gap: 8px;
  }

  .gallery-tools .btn {
    flex: 1 1 0;
    min-height: 44px;
    font-size: 13.5px;
  }

  .gallery-mode-tabs {
    display: flex;
    width: 100%;
    margin: 0 0 8px;
  }

  .gallery-mode {
    flex: 1 1 0;
    min-height: 44px;
    padding: 7px 10px;
  }

  .gallery-search {
    margin-top: 6px;
  }

  .gallery-search input {
    max-width: none;
  }

  .gallery-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
  }

  .stat-card {
    gap: 0;
    min-width: 0;
    padding: 7px 3px;
    border-radius: 12px;
  }

  .stat-emoji {
    display: none;
  }

  .stat-card strong {
    font-size: 17px;
    line-height: 1.2;
  }

  .stat-card small {
    font-size: 9.5px;
    letter-spacing: 0;
    line-height: 1.35;
    white-space: nowrap;
  }

  .gallery-filters {
    margin-top: 8px;
    padding-bottom: 4px;
  }

  .filter-chip {
    min-height: 44px;
    padding: 7px 14px;
    font-size: 12.5px;
  }

  .gallery-grid {
    margin-top: 10px;
    gap: 10px;
  }

  .empty-state {
    padding: 28px 16px;
  }

  /* 评价单：压缩五维、保留展开 */
  .dimensions-result {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .dimension-card {
    padding: 12px 14px;
    border-radius: 18px;
  }

  .dim-emoji {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 16px;
  }

  .dim-title h3 {
    font-size: 14.5px;
  }

  .dim-title small {
    font-size: 10.5px;
  }

  .dim-score {
    font-size: 21px;
  }

  .dim-comment {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.75;
  }

  .dimension-card.is-expanded .dim-comment {
    display: block;
    overflow: visible;
  }

  .dim-more {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
  }

  .result-actions {
    gap: 8px;
  }

  .result-actions .btn {
    min-height: 48px;
    font-size: 14.5px;
  }

  .result-audio-box {
    padding: 12px;
  }

  .result-footnote {
    font-size: 12px;
    line-height: 1.7;
  }
}

@media (min-width: 380px) and (max-width: 620px) {
  .dimensions-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dimensions-result > .dimension-card:last-child {
    grid-column: 1 / -1;
  }

  .dim-emoji {
    display: none;
  }

  .dim-title h3 {
    font-size: 13.5px;
  }

  .dim-title small {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .dim-score {
    font-size: 19px;
  }
}

@media (max-width: 380px) {
  .submit-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .submit-bar .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-ghost {
    width: 100%;
    text-align: center;
  }

  /* 320 宽时不再让月亮压住标题，只保留天空渐变 */
  .hero-sky::after {
    background:
      radial-gradient(120% 90% at 50% 120%, rgba(253, 247, 236, 0.16), transparent 60%),
      linear-gradient(180deg, rgba(20, 18, 48, 0.15), rgba(20, 18, 48, 0) 30%, rgba(20, 18, 48, 0.25));
  }
}

@media print {
  .dim-more {
    display: none !important;
  }

  .dim-comment {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
  }
}


@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  html,
  body {
    background: #fff !important;
    color: #1a1a1a;
  }

  body {
    background-image: none !important;
    font-size: 12pt;
    line-height: 1.6;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .toast,
  .confetti-layer,
  .analyzing-overlay,
  .result-actions,
  .result-view-head,
  .back-link,
  .btn,
  audio,
  .result-sheet::before,
  .result-sheet::after,
  .empty-state {
    display: none !important;
  }

  .view {
    display: none !important;
  }

  #view-result {
    display: block !important;
  }

  #view-result .page-wrap {
    max-width: none;
    padding: 0;
  }

  #view-result .page-wrap::before {
    content: "童声童话 · 安徒生故事屋 —— 故事评价单";
    display: block;
    margin-bottom: 5mm;
    padding-bottom: 2mm;
    border-bottom: 1px solid #d8d0c2;
    color: #2c2550;
    font-family: var(--font-display);
    font-size: 12pt;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .result-sheet {
    padding: 0;
    margin: 0;
    border: 1px solid #d8d0c2;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .result-sheet * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .result-hero {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8mm;
    break-inside: avoid;
  }

  .grade-medal {
    width: 26mm;
    box-shadow: none;
    animation: none;
  }

  .grade-letter {
    font-size: 26pt;
  }

  .score-ring {
    width: 30mm;
    box-shadow: none;
    animation: none;
  }

  .score-number {
    font-size: 16pt;
  }

  .result-summary,
  .result-grid,
  .dimensions-result,
  .suggestions-card,
  .transcript-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .result-summary {
    margin-top: 5mm;
  }

  .result-audio-box {
    display: none !important;
  }

  .result-quote,
  .suggestion-list li,
  .highlight-list li,
  .guide-note {
    background: #faf8f3 !important;
    border-color: #ddd6c8 !important;
    color: #2f2a22 !important;
  }

  .result-quote p,
  .overall-comment,
  .dim-comment,
  .suggestion-list li {
    color: #2f2a22 !important;
  }

  .result-footnote {
    margin-top: 4mm;
    color: #777;
  }

  .dimension-card,
  .card {
    box-shadow: none;
    border: 1px solid #ddd6c8;
    background: #fff;
  }

  .dimension-card::before {
    display: none;
  }

  .results-grid,
  .result-hero,
  .dimensions-result {
    page-break-inside: avoid;
  }
}

