/* ===== 戏曲声腔数字化实训质控平台 · 设计系统 v2.2（v2.1 骨架 + 第二轮视觉打磨：分层阴影 / 企业级表格密度 / 按钮层次 / 微交互） ===== */
:root {
  --navy-900: #0c2244;
  --navy-800: #10305a;
  --navy-700: #16406e;
  --gold: #e6c27c;
  --gold-light: #f3ddb0;
  --teal: #12939b;
  --teal-dark: #0b7e86;
  --blue: #2660f0;
  --blue-dark: #1d4fd0;
  --bg: #eef1f6;
  --card: #ffffff;
  --line: #e4e9f2;
  --line-strong: #d5dce8;
  --text: #22314d;
  /* 次级/弱化文字：11–13px 小字必须在白卡片与「页底渐变」上都 ≥4.5:1。
     旧值 #6b7a93 4.35、#93a1b8 2.61 不达标；#5a6a85 白卡片 5.48 够、但压在页底渐变
     （实测最深 #dce5f0）上只有 4.30–4.48，.ph-d / .crumb a 9 页中 8 页不达 AA。
     现值与 .crumb i 统一：白卡片 6.34、页底渐变 4.98，仍比 .crumb span(#46536b) 浅一档。 */
  --sub: #52607a;
  --faint: #647087;
  --red: #e05656;
  --orange: #e8933a;
  --green: #27a06e;
  --purple: #7c5cd6;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;
  /* 卡片默认阴影：分层（1px 贴边描影 + 4px 环境影），白卡片在浅灰底上有"面"的重量感 */
  --shadow: 0 1px 2px rgba(31, 51, 88, 0.06), 0 4px 16px rgba(31, 51, 88, 0.06);
  --f-serif: "Songti SC", "STSong", "Source Han Serif SC", serif;

  /* 8px 间距体系 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  /* 字号阶梯（正文 13.5 不变） */
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13.5px; --fs-md: 14.5px; --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 21px; --fs-3xl: 27px;
  --lh-tight: 1.25; --lh-base: 1.6; --lh-loose: 1.75;
  /* 圆角：控件 8 / 卡片 14 */
  --r-xs: 4px; --r-ctl: 8px; --r-xl: 16px; --r-full: 999px;
  /* 阴影（克制）：sm 轻描 / md 面板 / lg 悬浮卡片 · Toast · 对话框 / pop 大弹层 */
  --shadow-sm: 0 1px 3px rgba(31, 51, 88, 0.06);
  --shadow-md: 0 6px 18px rgba(31, 51, 88, 0.10);
  --shadow-lg: 0 8px 28px rgba(31, 51, 88, 0.14);
  --shadow-pop: 0 24px 70px rgba(10, 25, 55, 0.35);
  /* 焦点环 */
  --ring: 0 0 0 3px rgba(38, 96, 240, 0.18);
  --ring-teal: 0 0 0 3px rgba(18, 147, 155, 0.20);
  --ring-danger: 0 0 0 3px rgba(224, 86, 86, 0.20);
  /* 动效：全站 .18s，出快入慢的企业级曲线；prefers-reduced-motion 时在下方基线块统一关闭 */
  --t-fast: 0.12s; --t-base: 0.18s; --t-slow: 0.25s; --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* 语义色：主色 / 浅底 / 浅底上的文字 / 浅底描边（*-text 均在自己的 *-bg 上 ≥4.5:1，与 .tag-* 保持同值） */
  --success: #27a06e; --success-bg: #e4f5ec; --success-text: #177a4f; --success-line: #bfe3d0;
  --info:    #2660f0; --info-bg:    #e8effe; --info-text:    #2660f0; --info-line:    #b9cdf7;
  --warn:    #e8933a; --warn-bg:    #fdf1e3; --warn-text:    #a35407; --warn-line:    #f3d5ad;
  --danger:  #e05656; --danger-bg:  #fdeaea; --danger-text:  #b93838; --danger-line:  #f3bcbc;
  /* 金色标签：底提亮到 #fbf3df；字色规范给的 #9a7526 在该底上仅 3.84:1（12px 小字不达 AA），
     取同色相略深的 #8c671a（4.67:1）——肉眼与规范色几乎无差，但达标。 */
  --gold-bg: #fbf3df; --gold-text: #8c671a; --gold-line: #e8d5ab;
  --teal-bg: #e2f4f5; --teal-text: #0d757c;
  --purple-bg: #efeafb; --purple-text: #6c48cc;
  --neutral-bg: #eef1f6; --neutral-text: #5a6a85; --neutral-line: #d5dce8;
  /* 层级 */
  --z-sticky: 20; --z-tip: 60; --z-modal: 520; --z-dlg: 600; --z-toast: 999;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  font-size: 13.5px;
  line-height: var(--lh-base);              /* 正文 13.5 / 1.6 */
  font-variant-numeric: tabular-nums;       /* 全站数字等宽：表格 / 统计 / 时间码对齐 */
  background:
    radial-gradient(1200px 500px at 8% 12%, rgba(178, 200, 224, 0.28), transparent 60%),
    radial-gradient(1100px 520px at 94% 30%, rgba(196, 214, 208, 0.30), transparent 62%),
    radial-gradient(900px 480px at 50% 95%, rgba(205, 214, 231, 0.35), transparent 65%),
    linear-gradient(180deg, #edf1f7 0%, #eaeef4 55%, #e7ecf1 100%);
  min-height: 100vh;
}
/* 左右内边距（呼吸感）：≥1024 一律 24px，<1024 收到 16px（≤780 同样 16px），
   与 .site-foot 的左右内边距保持同值，标题条/卡片/页脚三者不会错位。 */
.page { width: 100%; max-width: 1700px; margin: 0 auto; padding: 16px 24px 46px; }

/* ===== 基线：表单字体继承 / 焦点可见 / 减少动效 ===== */
button, input, select, textarea { font-family: inherit; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: 2px solid #7ea2f0; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* 页脚贴底：body 成纵向 flex，.page 撑满剩余高度（.page 已有 width:100%+margin:0 auto，flex 下仍居中） */
body { display: flex; flex-direction: column; }
.page { flex: 1 0 auto; }
body.has-foot .page { padding-bottom: 20px; }

/* ===== 通用工具（补齐 8px 体系） ===== */
.mt4 { margin-top: 4px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap24 { gap: 24px; }
.between { justify-content: space-between; } .col { flex-direction: column; align-items: stretch; }
.grow { flex: 1; min-width: 0; } .wrapx { flex-wrap: wrap; }
.nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; } .tr { text-align: right; } .tc { text-align: center; }
.hide-sm { } .only-sm { display: none; }   /* 在 ≤780 块内翻转 */

/* Grid/Flex 子项默认 min-width:auto 会拒绝收缩，宽内容（表格/图表/音频卡）会把整页
   撑出横向滚动条。全局归零，是"任何宽度都不横向滚动"的前提。 */
.grid-top > *, .grid-bot > *, .grid-main > *, .grid-mid > *, .grid-low > *, .grid-bottom > *,
.stats-row > *, .lib-row > *, .sup-grid > *, [style*="grid-template-columns"] > * { min-width: 0; }
.card, .card-b, .card-h { min-width: 0; }
.kv { flex-wrap: wrap; }
.kv .v { min-width: 0; word-break: break-word; }

/* ===== 顶部 ===== */
.site-head {
  position: relative;
  background: linear-gradient(100deg, #0a1e3e 0%, #0e2c55 55%, #0d3055 100%);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(10, 30, 62, 0.35);
}
.head-art {
  position: absolute; top: 0; right: 0; height: 100%; pointer-events: none;
  /* 插画不满高时（≤1366）用 --art-vmask 把顶缘渐隐掉，避免与藏青渐变之间出现横向硬接缝 */
  -webkit-mask-image: var(--art-vmask, none); mask-image: var(--art-vmask, none);
}
.head-art img {
  height: 100%; display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%);
}
/* 跳到主内容（main.js 注入到 body 首位，各页 .page/<main> 自动取得 id="main"）。
   停靠在头部右上的装饰区，聚焦时下滑露出，带阴影与鎏金描边，不压住左上角品牌标题。 */
a.jump-main {
  position: fixed; left: auto; right: 16px; top: -56px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;   /* 跳转链接本身也是触摸目标 */
  padding: 10px 16px; border: 1px solid rgba(230, 194, 124, 0.55); border-top: none;
  border-radius: 0 0 10px 10px; background: #0e2c55; color: var(--gold);
  font-size: 13px; font-weight: 600; text-decoration: none; letter-spacing: 0.3px;
  box-shadow: 0 8px 22px rgba(10, 25, 55, 0.45); transition: top var(--t-base);
}
a.jump-main:focus { top: 0; }
a.jump-main:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }

.head-deco {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(240px 90px at 12% 118%, rgba(230, 194, 124, 0.10), transparent 70%),
    radial-gradient(300px 110px at 42% -30%, rgba(120, 160, 210, 0.12), transparent 70%);
}
.head-top { position: relative; padding: 20px 30px 14px; }
.brand {
  font-family: var(--f-serif);
  font-size: 27px; font-weight: 700; letter-spacing: 1.5px; line-height: normal;   /* 头部几何按断点与插画对过，不吃 body 的 1.6 行高 */
  color: var(--gold);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.brand small { font-size: 22px; font-weight: 700; letter-spacing: 1px; } .brand small::before { content: "· "; }   /* 分隔点用伪元素，≤780 折行时去掉 */
.main-nav { position: relative; display: flex; gap: 4px; padding: 0 16px; }
.main-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 26px 15px;
  color: #c6d4e6; text-decoration: none; font-size: 15px; font-weight: 500; line-height: normal;
  position: relative; border-radius: 8px 8px 0 0;
  transition: color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.main-nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.main-nav a.active { color: #fff; font-weight: 600; background: linear-gradient(180deg, rgba(35, 150, 160, 0.22), rgba(35, 150, 160, 0.05)); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #2ec3cd, #58d6de);
  box-shadow: 0 0 8px rgba(46, 195, 205, 0.8);
}
.nav-sep { width: 1px; background: rgba(255, 255, 255, 0.12); margin: 12px 6px; }

/* ===== 页面标题条 ===== */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 18px 2px 0; min-height: 44px; }
.ph-main { flex: 1; min-width: 0; }
.ph-t { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--f-serif); font-size: 22px; font-weight: 700; color: #1d2b47; letter-spacing: 0.5px; line-height: 1.3; }
/* 鎏金竖条：4px 宽、上亮下深的渐变 + 2px 圆角，与 .sec-title 同款 */
.ph-t::before { content: ""; width: 4px; height: 21px; border-radius: 2px; background: linear-gradient(180deg, #e8c87a, #b07f28); box-shadow: 0 1px 2px rgba(176, 127, 40, 0.25); flex: none; }
.ph-t .tag { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
.ph-d { margin: 5px 0 0 14px; font-size: 13px; color: var(--sub); line-height: 1.6; }
.ph-meta { font-size: 12px; color: var(--faint); }
.ph-acts { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; padding-bottom: 2px; }
/* 面包屑（可选：仅 review.html / 404.html 使用；7 个一级页不用） */
.crumb { display: flex; align-items: center; gap: 6px; margin: 14px 2px -8px; font-size: 12.5px; color: var(--faint); }
.crumb a { color: var(--sub); text-decoration: none; } .crumb a:hover { color: var(--blue); }
/* 分隔符是真实文本节点（读屏会念），颜色必须达 AA：#c3ccd9 在页面渐变底上仅 1.6:1。
   #52607a 在最深的页底渐变（实测 #dde6f0）上 5.0:1、白卡片上 6.3:1，仍比 .crumb span 浅一档。 */
.crumb i { font-style: normal; color: #52607a; } .crumb span { color: #46536b; }

/* ===== 卡片 ===== */
/* 卡片：半透明描边（比纯灰更"透"）+ 分层阴影，白面在浅灰底上有重量 */
.card { background: var(--card); border: 1px solid rgba(31, 51, 88, 0.08); border-radius: var(--r-lg); box-shadow: var(--shadow); }
/* 卡头：底部 1px 淡分隔线把"头 / 身"分开；只有卡头没有卡身（折叠态）时不画线 */
.card-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px 12px; border-bottom: 1px solid #f0f3f8; }
.card-h:last-child { border-bottom: none; }
.card-title { font-size: 15.5px; font-weight: 700; color: #1d2b47; display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.card-title .t-ic { width: 19px; height: 19px; color: var(--teal); }
.card-title .t-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* 副标题与主标题基线对齐：两者在 .card-h 里居中排布，字号差 3px 使副标题基线高出约 1px，用 2px 上边距把盒心压下 1px */
.card-sub { font-size: 12.5px; color: var(--sub); font-weight: 400; line-height: 1.4; margin-top: 2px; }
.card-b { padding: 14px 18px 18px; }
.spacer { flex: 1; }
.help-q {
  width: 16px; height: 16px; border-radius: 50%; border: 1.4px solid #97a5ba;
  color: var(--faint); font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}
.link { color: var(--blue); text-decoration: none; font-size: 13px; cursor: pointer; }
.link:hover { text-decoration: underline; }

.card { transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(31, 51, 88, 0.12); }   /* 上浮仅用于可点卡片 */
.card-flat { box-shadow: none; }
.card-p { padding: 18px; }
.card-h .card-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-h .help-q { cursor: help; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 24px 2px 12px; font-size: 15.5px; font-weight: 700; color: #1d2b47; }
.sec-title::before { content: ""; width: 4px; height: 17px; border-radius: 2px; background: linear-gradient(180deg, #e8c87a, #b07f28); }
.sec-title .cnt { font-size: 12px; color: var(--faint); font-weight: 400; }
.sec-title .line { flex: 1; height: 1px; background: linear-gradient(90deg, #dfe5ee, transparent); }

/* ===== 表单 ===== */
.field-label { font-size: 13px; color: #46536b; margin-bottom: 7px; font-weight: 600; }
.field, select.field, input.field {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: #fff; color: var(--text); font-size: 13.5px; outline: none;
  font-family: inherit;
  appearance: none; -webkit-appearance: none;
}
/* 下拉箭头：与图标集同款 1.8 描边线性 chevron（圆端点圆拐角），色取 --faint */
select.field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23647087' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 14px 14px;
  padding-right: 32px; cursor: pointer;
}
.field:focus { border-color: var(--blue); box-shadow: var(--ring); }
.search-wrap { position: relative; }
.search-wrap .field { padding-left: 34px; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: #647087; fill: none; stroke-width: 1.8; stroke-linecap: round; }
textarea.field { height: auto; padding: 10px 12px; resize: none; line-height: 1.6; }

.field { transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease); }
.field:hover:not(:focus):not(:disabled) { border-color: #b8c6dd; }
.field:focus-visible { border-color: var(--blue); box-shadow: var(--ring); }
.field:disabled, .field[readonly] { background: #f6f8fb; color: var(--sub); cursor: not-allowed; }
.field.err, .field[aria-invalid="true"] { border-color: var(--danger); }
.field.err:focus { box-shadow: var(--ring-danger); }
.field-sm, select.field-sm, input.field-sm { height: 30px; font-size: 12.5px; padding: 0 10px; border-radius: 6px; }
select.field-sm { padding-right: 28px; background-position: right 8px center; background-size: 13px 13px; }
.field-lg, select.field-lg, input.field-lg { height: 42px; font-size: 14.5px; }
.field-inline, .field.field-inline { width: auto; display: inline-flex; }
/* 固定宽度（替代页面内联 width；.field.w-* 提高优先级以压过 select.field 的 width:100%） */
.w-96, .field.w-96 { width: 96px; } .w-110, .field.w-110 { width: 110px; } .w-120, .field.w-120 { width: 120px; }
.w-130, .field.w-130 { width: 130px; } .w-160, .field.w-160 { width: 160px; } .w-220, .field.w-220 { width: 220px; } .w-330, .field.w-330 { width: 330px; }
.field-label.req::after { content: " *"; color: var(--danger); }
.field-help { font-size: 12px; color: var(--faint); margin-top: 6px; }
.field-err { font-size: 12px; color: var(--danger-text); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fgroup { margin-bottom: 14px; }

/* ===== 复选 / 单选（原生 input 隐藏，i 绘制） ===== */
.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; color: #46536b; position: relative; user-select: none; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.chk i { width: 16px; height: 16px; border: 1.5px solid #b7c2d4; border-radius: 4px; background: #fff; flex: none; display: inline-flex; align-items: center; justify-content: center; transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base); }
.chk i::after { content: ""; width: 10px; height: 10px; opacity: 0; transform: scale(0.6); transition: opacity var(--t-fast), transform var(--t-fast);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.chk:hover i { border-color: #7ea2f0; }
.chk input:checked + i { background: var(--blue); border-color: var(--blue); }
.chk input:checked + i::after { opacity: 1; transform: none; }
.chk input:indeterminate + i { background: var(--blue); border-color: var(--blue); }
.chk input:indeterminate + i::after { opacity: 1; transform: none; background: none; width: 8px; height: 2px; border-radius: 1px; background-color: #fff; }
.chk input:focus-visible + i { box-shadow: var(--ring); }
.chk input:disabled + i { background: #f0f3f8; border-color: #dfe6f0; } .chk input:disabled ~ span { color: var(--faint); }
.chk.radio i { border-radius: 50%; }
.chk.radio i::after { background: #fff; width: 6px; height: 6px; border-radius: 50%; }
.chk.radio input:checked + i::after { transform: none; }

/* ===== 开关 ===== */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #46536b; position: relative; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch i { width: 34px; height: 20px; border-radius: 10px; background: #cfd7e3; position: relative; flex: none; transition: background var(--t-base), box-shadow var(--t-base); }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--t-base) var(--ease); }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { box-shadow: var(--ring); }
.switch input:disabled + i { opacity: 0.5; }
.switch.sm i { width: 28px; height: 16px; } .switch.sm i::after { width: 12px; height: 12px; } .switch.sm input:checked + i::after { transform: translateX(12px); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.2px; line-height: 1; cursor: pointer; border: 1px solid transparent;
  text-decoration: none; font-family: inherit; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* 实心主按钮：静态带 2px 同色投影；hover 提亮（#3169f2，白字 4.74:1 仍达 AA）+ 阴影加深；active 下沉 1px 变深、阴影收紧 */
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(38, 96, 240, 0.28); }
.btn-primary:hover { background: #3169f2; box-shadow: 0 4px 12px rgba(38, 96, 240, 0.38); }
.btn-primary:active { background: var(--blue-dark); box-shadow: 0 1px 3px rgba(38, 96, 240, 0.30); }
.btn-outline { background: #fff; border-color: #c9d6f2; color: var(--blue); }
.btn-outline:hover { background: #f4f7ff; border-color: #b3c6f0; }
.btn-outline:active { background: #e9effc; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: #46536b; }
.btn-ghost:hover { background: #f3f5f9; border-color: #c7d0de; }
.btn-ghost:active { background: #e9edf3; }
/* 实心主按钮全站只有一种颜色（蓝）：btn-teal 保留为「上传 / 录制」类动作的语义别名，视觉与 btn-primary 一致；
   青瓷绿只留给音频语义（.play-btn 圆钮、.chip-btn.on、.fchip.teal.on、.tag-teal、卡头图标）。
   白字在旧 --teal(#12939b) 上仅 3.7:1，改蓝后 5.2:1，同时消除「同级两种实心色」。 */
.btn-teal { background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(38, 96, 240, 0.28); }
.btn-teal:hover { background: #3169f2; box-shadow: 0 4px 12px rgba(38, 96, 240, 0.38); }
.btn-teal:active { background: var(--blue-dark); box-shadow: 0 1px 3px rgba(38, 96, 240, 0.30); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 6px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 42px; padding: 0 24px; font-size: 14.5px; }
.btn-block { width: 100%; }

.btn { position: relative; transition: filter var(--t-fast) var(--ease), background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform 0.05s; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
/* 实心按钮：同色浅晕在实心底上几乎不可见，改为「白色间隙 + 同色实环」双环 */
.btn-primary:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.btn-teal:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 2px 6px rgba(224, 86, 86, 0.28); }
.btn-danger:hover { background: #e46262; box-shadow: 0 4px 12px rgba(224, 86, 86, 0.38); }
.btn-danger:active { background: #cc4848; box-shadow: 0 1px 3px rgba(224, 86, 86, 0.30); }
.btn-danger:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--danger); }
.btn-danger-lite { background: var(--danger-bg); color: var(--danger-text); }
.btn-danger-lite:hover { background: #fbdcdc; }
.btn-gold { background: #fdf6e3; border-color: #d9ae4b; color: var(--gold-text); }
.btn-gold:hover { background: #fbefd0; }
.btn-text { background: transparent; border-color: transparent; color: var(--blue); padding: 0 8px; box-shadow: none; }
.btn-text:hover { background: #f4f7ff; }
.btn-text:active { background: #e9effc; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn-lg svg { width: 18px; height: 18px; }
/* 图标按钮：默认 36×36 圆角 8（比文字按钮矮 2px，与 38px 控件同行时视觉等高）；hover 底色由各变体（ghost / text / outline）提供 */
.btn-icon, .btn-icon.btn-xs, .btn-icon.btn-sm, .btn-icon.btn-lg { padding: 0; flex: none; }
.btn-icon { width: 36px; height: 36px; border-radius: 8px; } .btn-icon.btn-sm { width: 30px; height: 30px; border-radius: 6px; } .btn-icon.btn-xs { width: 26px; height: 26px; } .btn-icon.btn-lg { width: 42px; height: 42px; }
.btn-icon svg { width: 17px; height: 17px; } .btn-icon.btn-sm svg { width: 15px; height: 15px; } .btn-icon.btn-xs svg { width: 14px; height: 14px; }
.btn-icon.btn-text { color: #55647e; } .btn-icon.btn-text:hover { color: var(--blue); background: #f3f5f9; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.btn-loading { pointer-events: none; }
.btn-loading > * { visibility: hidden; }
.btn-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: xq-spin 0.7s linear infinite; }
@keyframes xq-spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; } .btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ===== 标签 ===== */
/* 标签：22px 高、圆角 6、12px/500，淡底 + 同色系深字、无边框（outline 变体除外，它们就是"描边"语义）；行内不随正文 1.6 行高撑高 */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 0; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.1px; white-space: nowrap; vertical-align: middle; }
.tag-blue { background: #e8effe; color: #2660f0; }
.tag-teal { background: #e2f4f5; color: #0d757c; }
.tag-gold { background: var(--gold-bg); color: var(--gold-text); }
.tag-red { background: #fdeaea; color: #b93838; }
.tag-orange { background: #fdf1e3; color: #a35407; }
.tag-green { background: #e4f5ec; color: #177a4f; }
.tag-grey { background: #eef1f6; color: #5a6a85; }
.tag-purple { background: #efeafb; color: #6c48cc; }
.tag-outline-blue { background: #fff; border: 1px solid #b9cdf7; color: #2660f0; }

/* 语义别名（颜色与既有色板一致） */
.tag-success { background: var(--success-bg); color: var(--success-text); }
.tag-info    { background: var(--info-bg);    color: var(--info-text); }
.tag-warn    { background: var(--warn-bg);    color: var(--warn-text); }
.tag-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.tag-neutral { background: var(--neutral-bg); color: var(--neutral-text); }
.tag-outline-teal { background: #fff; border: 1px solid #8ecbd0; color: var(--teal-text); }
.tag-outline-grey { background: #fff; border: 1px solid var(--line-strong); color: #55647e; }
.tag-outline-gold { background: #fdfaf2; border: 1px solid var(--gold-line); color: var(--gold-text); }
.tag-sm { height: 20px; padding: 0 7px; font-size: 11.5px; border-radius: 4px; }   /* 最小标签 11.5px（飞书/Arco 标签下限 12px 量级），全断点一致 */
.tag-lg { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.tag-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; flex: none; }
.tag-click { cursor: pointer; transition: filter var(--t-base) var(--ease); } .tag-click:hover { filter: brightness(0.96); }
.tag svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== 筛选筹码（从 videos.html 原样提升；页面内同名定义可删可留，视觉零变化） ===== */
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip {
  height: 28px; padding: 0 13px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12.5px; color: #46536b; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  font-family: inherit;
}
.fchip .tx { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip .cnt { font-size: 11px; color: var(--faint); }
.fchip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fchip:hover { border-color: #9db4e8; color: var(--blue); }
.fchip:focus-visible { outline: none; box-shadow: var(--ring); }
.fchip.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.fchip.on .cnt { color: var(--gold); }
.fchip.more { border-style: dashed; color: var(--sub); }   /* 旧值 #8593a9 白底仅 3.1:1；--sub 白底 6.34:1（videos.html 已按同值页内覆盖，现回收到源头） */
.fchip.teal.on { background: var(--teal-dark); border-color: var(--teal-dark); } .fchip.teal.on .cnt { color: #d6f3f5; }

/* ===== 提升自 index/homework/errors 的小按钮与轻面板（页面私有定义仍优先） ===== */
.chip-btn { height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #55647e; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-family: inherit; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.chip-btn:hover { border-color: #9db4e8; color: var(--blue); }
.chip-btn.on { border-color: var(--teal); color: var(--teal-dark); background: #f0fafa; }
.chip-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel-lite { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.panel-lite .pl-t { font-size: 13px; font-weight: 700; color: #22314d; margin-bottom: 12px; }

/* ===== 头像 ===== */
.avatar { border-radius: 50%; object-fit: cover; border: 1.5px solid #dfe6f0; background: #f0f3f8; display: block; }
.avatar.a24 { width: 24px; height: 24px; }
.avatar.a32 { width: 32px; height: 32px; }
.avatar.a40 { width: 40px; height: 40px; }
.avatar.a56 { width: 56px; height: 56px; border-width: 2px; }

/* ===== 统计卡（全站唯一定义，见 scratchpad/DS3.md）=====
   homework / errors / videos 的统计卡、resources 四库卡、eval 入口卡共用同一套：
   图标圆 48px 饱和渐变底 + 白色 20px 描边图标 + 同色柔影；数字 26px/700 tabular；单位 12px --sub。
   页面不再各持一份 .stat-ic / .si-* / .stat-num 覆盖。 */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 16px 0; }
.stat-card { display: flex; align-items: center; gap: 16px; padding: 20px 24px; }
.stat-ic { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.stat-ic svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* 七组语义渐变：160deg 亮起深收，收色与 resources 海报 .poster-* 同值、起色亮一档；柔影取同色 .28 */
.si-blue   { background: linear-gradient(160deg, #4d7ef5, #1d4fd0); box-shadow: 0 4px 10px rgba(38, 96, 240, 0.28); }
.si-teal   { background: linear-gradient(160deg, #23aab2, #0b6f76); box-shadow: 0 4px 10px rgba(18, 147, 155, 0.28); }
.si-orange { background: linear-gradient(160deg, #f2a552, #cf7118); box-shadow: 0 4px 10px rgba(232, 147, 58, 0.28); }
.si-purple { background: linear-gradient(160deg, #957ae3, #5d3fc0); box-shadow: 0 4px 10px rgba(124, 92, 214, 0.28); }
.si-green  { background: linear-gradient(160deg, #4bc793, #1e8a5c); box-shadow: 0 4px 10px rgba(39, 160, 110, 0.28); }
.si-gold   { background: linear-gradient(160deg, #dfae46, #a67a20); box-shadow: 0 4px 10px rgba(176, 127, 40, 0.28); }
.si-red    { background: linear-gradient(160deg, #f07474, #c33d3d); box-shadow: 0 4px 10px rgba(224, 86, 86, 0.28); }
.stat-label { font-size: 13.5px; color: var(--sub); margin-bottom: 5px; }
.stat-num { font-size: 26px; font-weight: 700; color: #1d2b47; line-height: 1.1; letter-spacing: 0.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 480px) { .stat-num { font-size: 22px; } }   /* 两列统计卡：「126.2 小时」不掉行 */
/* 单位：页面里写 <small> 或 .stat-unit 都行，同一口径 */
.stat-num small, .stat-unit { font-size: 12px; color: var(--sub); font-weight: 400; letter-spacing: 0; margin-left: 5px; }
.stat-foot { font-size: 12px; color: var(--faint); margin-top: 5px; }
.up { color: var(--green); font-weight: 600; }
.down { color: var(--green); font-weight: 600; }
.worse { color: var(--red); font-weight: 600; }

/* ===== 表格 ===== */
/* 企业级密度：表头 40px 灰底 + 强底线；行 52px（td 12/14）；整张表已在卡片 / .tbl-wrap 内，表头不再自带圆角与左右边 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl thead th {
  text-align: left; height: 40px; padding: 10px 14px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.3px; color: var(--sub);
  background: #f7f9fc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong);
  white-space: nowrap; vertical-align: middle;
}
.tbl tbody td { height: 52px; padding: 12px 14px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background var(--t-fast) var(--ease); }
.tbl tbody tr:hover { background: #f5f8fd; }
.tbl tbody tr.sel { background: #eef3fe; box-shadow: inset 3px 0 0 var(--blue); }
.stu-cell { display: flex; align-items: center; gap: 9px; }
.stu-cell b { font-weight: 600; color: #22314d; display: block; font-size: 13px; line-height: 1.45; }
.stu-cell span { font-size: 11.5px; color: var(--faint); line-height: 1.45; }
.score-num { font-size: 16px; font-weight: 700; }
.sc-good { color: #2660f0; } .sc-mid { color: #e8933a; } .sc-bad { color: #e05656; }
.res-sub { font-size: 12px; color: var(--faint); }   /* 表格行内的次级信息（页面可追加自己的缩进） */
.tbl-foot { display: flex; align-items: center; padding: 14px 4px 0; color: var(--sub); font-size: 12.5px; }

/* 表格外壳：圆角 10 + 1px 描边把整张表收成一个"面"；内部表头顶边 / 末行底边与外壳描边合并不重线 */
.tbl-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.tbl-wrap > .tbl { display: table; overflow: visible; white-space: nowrap; }   /* 有包裹层时表格本体不再自滚（含 ≤780） */
.tbl-wrap > .tbl thead th { border-top: none; }
.tbl-wrap > .tbl tbody tr:last-child td { border-bottom: none; }
.tbl-sticky { border-collapse: separate; border-spacing: 0; }
.tbl-sticky thead th { position: sticky; top: 0; z-index: var(--z-sticky); border-top: none; border-bottom: none; border-left: none; border-right: none; border-radius: 0; box-shadow: inset 0 -1px 0 var(--line-strong); }
.tbl-sticky thead th:first-child, .tbl-sticky thead th:last-child { border-radius: 0; border-left: none; border-right: none; }
.tbl-zebra tbody tr:nth-child(even):not(.sel):not(:hover) { background: #fafbfd; }   /* 斑马纹默认关闭，按需加类 */
.tbl-static tbody tr { cursor: default; } .tbl-static tbody tr:hover { background: transparent; }
.tbl-compact thead th { height: 34px; padding: 7px 10px; } .tbl-compact tbody td { height: auto; padding: 7px 10px; }
.tbl tbody tr.tbl-empty, .tbl tbody tr.tbl-empty:hover { background: transparent; cursor: default; box-shadow: none; }
.tbl-empty td, .tbl tr.tbl-empty td { height: auto; padding: 24px 12px; text-align: center; color: var(--faint); border-bottom: none; white-space: normal; }
.tbl .td-num, .tbl .th-num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .td-acts { white-space: nowrap; } .tbl .td-acts .btn-icon { opacity: 0.7; } .tbl tr:hover .td-acts .btn-icon, .tbl tr.sel .td-acts .btn-icon { opacity: 1; }
.tbl tbody tr:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #7ea2f0; }
.th-sort[data-dir="asc"]::after  { content: "↑"; margin-left: 4px; color: var(--blue); font-size: 11px; }
.th-sort[data-dir="desc"]::after { content: "↓"; margin-left: 4px; color: var(--blue); font-size: 11px; }
/* 未排序箭头旧值 #b0bccd 在表头 #f5f7fb 上仅 1.79:1（生成内容也是文本），且因写死颜色不随 .th-sort:hover 变蓝，
   可排序这件事几乎不可见。改 currentColor：与表头文字同色（5.11:1，达 AA），hover 时一起变蓝。 */
.th-sort[data-dir="none"]::after { content: "↕"; margin-left: 4px; color: currentColor; font-size: 11px; }

/* ===== 分页 ===== */
.pager { display: flex; align-items: center; gap: 6px; }
.pg {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: #fff; color: #55647e; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.pg:hover { border-color: #9db4e8; color: var(--blue); }
.pg.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pg.dis { opacity: 0.45; cursor: default; }

.pg { transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease), background var(--t-base) var(--ease); font-family: inherit; }
.pg:focus-visible { outline: none; box-shadow: var(--ring); }
.pg.dis { pointer-events: none; }
.pg svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-gap { border-color: transparent; background: transparent; min-width: 20px; color: var(--faint); cursor: default; }
.pager-info { font-size: 12.5px; color: var(--sub); margin-right: 10px; }

/* ===== 波形 ===== */
.wave { display: flex; align-items: center; gap: 2px; height: 100%; width: 100%; overflow: hidden; position: relative; }
.wave i { flex: 1; border-radius: 2px; min-width: 2px; }

/* ===== 评分环 ===== */
.ring-wrap { display: flex; flex-direction: column; align-items: center; }
.ring-box { position: relative; }
.ring-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-val b { font-size: 25px; font-weight: 700; line-height: 1.05; }
.ring-val span { font-size: 12px; margin-top: 2px; }

/* ===== 横向评分条 ===== */
.hbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.hbar-row:last-child { margin-bottom: 0; }
.hbar-label { width: 44px; font-size: 13px; color: #46536b; flex: none; }
.hbar-track { flex: 1; height: 8px; border-radius: 5px; background: #edf0f5; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #4a7cf5, #2660f0); }
.hbar-num { width: 52px; text-align: right; font-size: 12.5px; color: var(--sub); flex: none; }
.hbar-num b { font-size: 14px; color: #2660f0; }

/* ===== 播放按钮 ===== */
.play-btn {
  border: none; border-radius: 50%; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); color: #fff; transition: filter var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.play-btn:hover { filter: brightness(1.08); }
.play-btn.pb-blue { background: var(--blue); }
.play-btn.pb-line { background: #fff; border: 1.5px solid #cfd9ea; color: #55647e; }
.play-btn svg { fill: currentColor; stroke: none; }
.pb28 { width: 28px; height: 28px; } .pb28 svg { width: 11px; height: 11px; }
.pb36 { width: 36px; height: 36px; } .pb36 svg { width: 13px; height: 13px; }
.pb48 { width: 48px; height: 48px; box-shadow: 0 4px 10px rgba(18, 147, 155, 0.35); } .pb48 svg { width: 17px; height: 17px; }

/* ===== 图表 ===== */
.chart-svg text { font-family: "PingFang SC", sans-serif; }
.legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sub); }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dashline { height: 0; border-top: 2px dashed #b0bccd; background: none; }

/* ===== 筛选行 ===== */
.filter-row { display: flex; align-items: center; gap: 12px; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item .fl { font-size: 13px; color: #46536b; white-space: nowrap; }

/* ===== 通用工具 ===== */
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.flex { display: flex; align-items: center; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.muted { color: var(--sub); } .faint { color: var(--faint); font-size: 12px; }
.divider { height: 1px; background: #eef1f6; margin: 14px 0; }
.star { color: #e8a33a; font-size: 13px; letter-spacing: 1px; }
.star .off { color: #dce1ea; }

/* ===== 对话框 ===== */
.dlg-mask { position: fixed; inset: 0; z-index: var(--z-dlg); background: rgba(6, 13, 26, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity var(--t-base) var(--ease); }
.dlg-mask.open { opacity: 1; }
/* 对话框：圆角 16、悬浮阴影（遮罩已负责与页面分离，阴影不必再重）；标题 18px 宋体 —— 宋体只用于 h1 与弹层标题 */
.dlg { width: min(440px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(31, 51, 88, 0.04); transform: translateY(8px) scale(0.98); transition: transform var(--t-base) var(--ease); outline: none; }
.dlg-mask.open .dlg { transform: none; }
.dlg-sm { width: min(360px, 100%); } .dlg-lg { width: min(640px, 100%); }
.dlg-h { display: flex; align-items: flex-start; gap: 10px; padding: 20px 22px 0; }
.dlg-ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--info-bg); color: var(--info); }
.dlg-ic svg { width: 19px; height: 19px; }
.dlg-ic.danger { background: var(--danger-bg); color: var(--danger); }
.dlg-ic.warn { background: var(--warn-bg); color: var(--warn); }
.dlg-ic.success { background: var(--success-bg); color: var(--success); }
.dlg-t { flex: 1; margin: 0; padding-top: 5px; font-family: var(--f-serif); font-size: 18px; font-weight: 700; color: #1d2b47; letter-spacing: 0.3px; line-height: 1.4; }
.dlg-x { margin: -2px -8px 0 0; color: var(--faint); }
.dlg-b { padding: 10px 22px 6px; font-size: 13.5px; color: #3d4c66; line-height: 1.75; overflow: auto; }
.dlg.has-ic .dlg-b { padding-left: 68px; }
.dlg-b p { margin: 0; } .dlg-b p + p { margin-top: 6px; }
.dlg-b .field-label { margin-top: 2px; }
.dlg-err { font-size: 12px; color: var(--danger-text); margin-top: 6px; min-height: 16px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }

/* ===== Toast ===== */
.toast-wrap { position: fixed; right: 22px; bottom: 26px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
/* Toast：圆角 10、悬浮阴影、左侧 3px 语义色条（与图标同色）、图标 18px */
.toast {
  background: #17233b; color: #fff; font-size: 13px; padding: 11px 14px 11px 12px; border-radius: 10px;
  border-left: 3px solid #4cd6a0;
  box-shadow: var(--shadow-lg); display: flex; align-items: flex-start; gap: 9px;
  animation: toast-in 0.22s var(--ease); max-width: 340px; line-height: 1.5; pointer-events: auto;
}
.toast-ic { width: 18px; height: 18px; flex: none; display: flex; align-items: center; justify-content: center; margin-top: 1px; font-weight: 700; }
.toast-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast.ok { border-left-color: #4cd6a0; }    .toast.ok .toast-ic { color: #4cd6a0; }
.toast.info { border-left-color: #7fb0ff; }  .toast.info .toast-ic { color: #7fb0ff; }
.toast.warn { border-left-color: #f2c14e; }  .toast.warn .toast-ic { color: #f2c14e; }
.toast.error { border-left-color: #ff8a8a; } .toast.error .toast-ic { color: #ff8a8a; }
.toast-msg { flex: 1; min-width: 0; word-break: break-word; }
.toast-act { flex: none; color: #8fd3ff; font-weight: 600; cursor: pointer; margin-left: 4px; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== Tooltip：纯 CSS，hover / focus-visible 显示；触屏关闭 ===== */
[data-tip] { position: relative; }
/* 隐藏态用 display:none 而不是只把 opacity 归零：绝对定位的气泡即使全透明也照样参与
   「可滚动溢出区」计算，挂在右边缘元素（筹码 / 行操作钮）上的长提示会把整页撑出横向滚动条
   （resources 390 实测 scrollWidth 423 > 390）。隐藏时不占布局，显示时用 tip-in 补回淡入。 */
[data-tip]::after {
  content: attr(data-tip); display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 0);
  background: #17233b; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.4; padding: 5px 9px; border-radius: 6px;
  white-space: nowrap; pointer-events: none; z-index: var(--z-tip);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0;
}
[data-tip]::before {
  content: ""; display: none; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #17233b; pointer-events: none; z-index: var(--z-tip);
}
[data-tip]:hover::after, [data-tip]:hover::before, [data-tip]:focus-visible::after, [data-tip]:focus-visible::before { display: block; animation: tip-in var(--t-base) var(--ease); }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }
[data-tip]:hover::after, [data-tip]:focus-visible::after { transform: translate(-50%, 0); }
[data-tip-pos="bottom"]::after { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -2px); }
[data-tip-pos="bottom"]::before { bottom: auto; top: calc(100% + 3px); border-top-color: transparent; border-bottom-color: #17233b; }
[data-tip-pos="bottom"]:hover::after, [data-tip-pos="bottom"]:focus-visible::after { transform: translate(-50%, 0); }
[data-tip-pos="left"]::after { left: auto; right: calc(100% + 8px); bottom: auto; top: 50%; transform: translate(2px, -50%); }
[data-tip-pos="left"]::before { left: auto; right: calc(100% + 3px); bottom: auto; top: 50%; transform: translateY(-50%); border-top-color: transparent; border-left-color: #17233b; }
[data-tip-pos="left"]:hover::after, [data-tip-pos="left"]:focus-visible::after { transform: translate(0, -50%); }
[data-tip-pos="right"]::after { left: calc(100% + 8px); bottom: auto; top: 50%; transform: translate(-2px, -50%); }
[data-tip-pos="right"]::before { left: calc(100% + 3px); bottom: auto; top: 50%; transform: translateY(-50%); border-top-color: transparent; border-right-color: #17233b; }
[data-tip-pos="right"]:hover::after, [data-tip-pos="right"]:focus-visible::after { transform: translate(0, -50%); }
/* 触屏：连 focus-visible 也不弹（选择器要盖过上面的 :hover/:focus-visible 显示规则） */
@media (hover: none) {
  [data-tip]::after, [data-tip]::before,
  [data-tip]:hover::after, [data-tip]:hover::before,
  [data-tip]:focus-visible::after, [data-tip]:focus-visible::before { display: none; }
}

/* ===== 录音态 ===== */
.rec-on { background: #e05656 !important; color: #fff !important; border-color: #e05656 !important; }
.rec-on .rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: rec-blink 1s infinite; }
@keyframes rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ===== 真实波形画布 ===== */
.canvas-wave { position: relative; cursor: pointer; }
.canvas-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ===== 可交互提示 ===== */
.clickable { cursor: pointer; }
.th-sort { cursor: pointer; user-select: none; }
.th-sort:hover { color: var(--blue); }
.busy { opacity: 0.55; pointer-events: none; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d2e0; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }


/* ===== 骨架屏 ===== */
/* 骨架屏：#eef1f6 → #f6f8fb 1.4s 流光，圆角 6 */
.skeleton { display: block; background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 37%, #eef1f6 63%); background-size: 400% 100%; animation: sk-shimmer 1.4s ease infinite; border-radius: 6px; }
@keyframes sk-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-wrap { padding: 4px 0; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.sk-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; width: 100%; } .sk-row > .sk-line { height: 12px; }
.sk-title { height: 16px; width: 40%; }
.sk-circle { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.sk-rect { height: 96px; width: 100%; border-radius: 10px; }
.sk-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* ===== 空态 ===== */
/* 空态：插画 64px 高（120:88 比例 → 88×64）、标题 15/600、描述 13 --sub、上下留白 40；动作钮由 XQ.emptyHTML 默认给 btn-outline btn-sm */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 16px; color: var(--sub); }
.empty-art { width: 88px; height: 64px; margin-bottom: 12px; } .empty-art svg { width: 100%; height: 100%; display: block; }
.empty-t { font-size: 15px; font-weight: 600; color: #2b3a55; line-height: 1.4; }
.empty-d { font-size: 13px; color: var(--sub); margin-top: 6px; line-height: 1.7; max-width: 380px; }
.empty-a { margin-top: 16px; display: flex; gap: 8px; }
.empty-sm { padding: 20px 12px 18px; } .empty-sm .empty-art { width: 62px; height: 45px; margin-bottom: 6px; } .empty-sm .empty-t { font-size: 13.5px; } .empty-sm .empty-d { font-size: 12.5px; } .empty-sm .empty-a { margin-top: 10px; }
.empty-lg { padding: 64px 16px 56px; } .empty-lg .empty-art { width: 120px; height: 88px; margin-bottom: 14px; } .empty-lg .empty-t { font-size: 17px; }

/* ===== 页脚 ===== */
/* 页脚：与 .page 同宽同边距，上方 1px 分隔线（画在 .sf-in 上，与卡片左右缘对齐），上下合计 48px 内边距，居中 12.5px。
   字色规范给 --faint(#647087)，但它压在页底渐变（实测 #dfe5ee）上只有 3.94:1，不达 AA；沿用 #52607a（5.0:1）。 */
.site-foot { width: 100%; max-width: 1700px; margin: 0 auto; padding: 0 24px; text-align: center; font-size: 12.5px; color: #52607a; }
.sf-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 0; padding: 22px 0 26px; border-top: 1px solid rgba(31, 51, 88, 0.10); line-height: 1.6; }
.sf-brand { color: #46536b; font-weight: 600; letter-spacing: 0.3px; }
/* 分组：.sf-org（学院 · 项目组）/ .sf-ver（版本 · 数据更新）。桌面与其它项平铺无异；≤780 每组独占一行，组内仍用「·」 */
.sf-g { display: inline-flex; align-items: center; }
/* 分隔符「·」前后各 8px（纯装饰，aria-hidden 由 main.js 加）；两侧间距只由这 8px 提供，容器不再叠 gap */
.sf-sep { display: inline-block; width: auto; height: auto; margin: 0 8px; color: #9aa6b8; background: none; border-radius: 0; }
.sf-sep::before { content: "·"; font-weight: 700; }
.sf-upd { display: inline-flex; align-items: center; } .sf-upd[hidden] { display: none; }
.sf-icp:empty { display: none; } .sf-icp a { color: #52607a; text-decoration: none; } .sf-icp a:hover { color: var(--text); }   /* 与 .site-foot 同色，Deploy 填备案号后同样达 AA */

/* ===== 图标基类 ===== */
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.ico-sm { width: 14px; height: 14px; } .ico-lg { width: 20px; height: 20px; } .ico-xl { width: 24px; height: 24px; }
/* ===== 笔记本/小屏桌面：收窄固定侧栏，避免横向滚动 ===== */
@media (max-width: 1440px) {
  .page { padding: 14px 24px 42px; }
  body[data-nav="eval"] .grid-top { grid-template-columns: 276px 1fr 344px; }
  body[data-nav="query"] .grid-main { grid-template-columns: 264px 1fr 352px; }
  body[data-nav="eval"] .score-grid3 { gap: 8px; }
  body[data-nav="eval"] .score-cell { padding: 10px 5px 12px; }
  .sup-grid { grid-template-columns: repeat(3, 1fr); }
  /* 1381–1440：字号保持 15px/500，只收内边距（26 → 20），7 项右缘仍 ≤ 插画面部起点 − 40px */
  .main-nav { gap: 2px; padding: 0 14px; }
  .main-nav a { padding: 13px 20px 15px; gap: 7px; }
  .nav-sep { margin: 12px 4px; }
  .head-art img { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
}
@media (max-width: 1380px) {
  /* 导航收紧：字号 14px、图标 17px（原 ≤1440 规则下移，1440 不再缩字） */
  .main-nav a { padding: 12px 18px 14px; font-size: 14px; gap: 6px; }
  .main-nav a svg { width: 17px; height: 17px; }
}

@media (max-width: 1366px) {
  /* 1300–1366：导航末项曾压到插画左侧渐隐区的亭台线稿：导航再收 3px，插画提前缩至 84% 高并贴底（原 ≤1280 规则前移） */
  .main-nav a { padding: 12px 15px 14px; font-size: 13.5px; }
  .head-art { top: auto; bottom: 0; height: 84%; --art-vmask: linear-gradient(180deg, transparent 0, #000 15%); }
}
@media (max-width: 1280px) {
  .main-nav { padding: 0 12px; }
  .main-nav a { padding: 12px 14px 14px; font-size: 13.5px; gap: 5px; }
  .main-nav a svg { width: 16px; height: 16px; }
  .nav-sep { margin: 12px 2px; }
  .head-art { top: auto; bottom: 0; height: 84%; --art-vmask: linear-gradient(180deg, transparent 0, #000 15%); }   /* 插画缩至 84% 高并贴底，人物下巴仍贴底缘 */
}
@media (max-width: 1240px) {
  body[data-nav="eval"] .grid-top { grid-template-columns: 238px 1fr 296px; }
  body[data-nav="query"] .grid-main { grid-template-columns: 228px 1fr 300px; }
  body[data-nav="eval"] .grid-top { grid-template-columns: 238px 1fr; }
  body[data-nav="eval"] .grid-top > section:last-child { grid-column: 1 / -1; }
  body[data-nav="errors"] .grid-mid { grid-template-columns: 1.2fr 1.1fr; }
  body[data-nav="errors"] .grid-mid > section:last-child { grid-column: 1 / -1; }
  .lib-row { grid-template-columns: repeat(2, 1fr); }
  .brand { font-size: 23px; }
  /* 1101–1240：导航再收、插画缩至 76% 高并把左缘渐隐加深到 45%，末项不再压在亭台线稿上 */
  .main-nav a { padding: 12px 11px 14px; font-size: 13px; }
  .main-nav a svg { width: 15px; height: 15px; }
  .nav-sep { margin: 12px 1px; }
  .head-art { height: 76%; --art-vmask: linear-gradient(180deg, transparent 0, #000 17%); }
  .head-art img { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 45%); mask-image: linear-gradient(90deg, transparent 0, #000 45%); }
}

/* ===== 响应式
/* ============================================================
   响应式：平板 ≤1100px 收成单列，手机 ≤780px 全面重排
   桌面版原为固定 1380px 宽（.page min-width），此处逐级放开。
   ============================================================ */

@media (max-width: 1100px) {
  .page { min-width: 0; padding: 12px 24px 40px; }   /* 1024–1100 仍是 24px；<1024 由下方 1023 断点收到 16px */
  /* 三栏/两栏主布局统一收成单列 */
  .grid-top, .grid-bot, .grid-main, .grid-mid, .grid-low, .grid-bottom { grid-template-columns: 1fr !important; }
  .head-art { display: none; }            /* 装饰画在窄屏会顶掉标题 */
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
  .lib-row { grid-template-columns: repeat(2, 1fr) !important; }
  .sup-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* CSS Grid/Flex 子项默认 min-width:auto 不肯收缩，宽表格会撑破卡片 —— 必须显式归零 */
  .grid-top > *, .grid-bot > *, .grid-main > *, .grid-mid > *, .grid-low > *, .grid-bottom > *,
  .stats-row > *, .lib-row > *, .sup-grid > *, [style*="grid-template-columns"] > * { min-width: 0; }
  .card, .card-b, .card-h { min-width: 0; }
  .card-b > table, .card-b > div { max-width: 100%; }
  .page-head { margin-top: 14px; }
  /* 导航项不折行；空间不足时横向滑动 */
  .main-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { white-space: nowrap; flex: none; }
}

/* <1024（小平板/手机）：左右内边距由 24px 收回 16px，给窄屏留出内容宽度；
   页脚同步，保证与标题条/卡片左右对齐一致。 */
@media (max-width: 1023px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .site-foot { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 780px) {
  body { font-size: 13px; }
  .page { padding: 10px 16px 36px; }

  /* 顶部：标题缩小，导航横向可滑 */
  .head-top { padding: 14px 16px 10px; }
  .brand { font-size: 19px; letter-spacing: 0.5px; line-height: 1.35; }
  .brand small { font-size: 14px; display: block; margin-top: 2px; letter-spacing: 0; } .brand small::before { content: none; }
  .main-nav {
    padding: 0 8px; gap: 2px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  /* 右缘渐隐，提示导航可横向滑动 */
  .site-head::after {
    content: ""; position: absolute; right: 0; bottom: 0; width: 34px; height: 46px;
    background: linear-gradient(90deg, rgba(13,48,85,0), rgba(13,48,85,.95));
    pointer-events: none;
  }
  .main-nav a { padding: 11px 14px 13px; font-size: 13.5px; white-space: nowrap; flex: none; }
  .main-nav a svg { width: 15px; height: 15px; }
  .nav-sep { display: none; }

  /* 所有内联多列 grid 收成单列（源码里 14 处内联 grid 无法用类覆盖） */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .lib-row, .sup-grid { grid-template-columns: 1fr !important; }
  /* 统计卡 2 列（homework / errors / videos 三页原各自覆盖，现收编）：卡内边距 / 间距收到 14 / 12，图标 48、数字 26 不变 */
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat-card { padding: 14px; gap: 12px; }
  body[data-nav="eval"] .score-grid3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  body[data-nav="eval"] .score-grid2 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  body[data-nav="eval"] .score-cell { padding: 10px 4px 12px; }

  /* 卡片与留白 */
  .card-h { padding: 12px 14px 10px; }
  .card-b { padding: 12px 14px 14px; }
  .card-title { font-size: 14px; }

  /* 宽表格改为容器内横向滚动，不撑破页面；窄屏行高收到 46 */
  .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .tbl thead th { height: 38px; padding: 9px 12px; }
  .tbl tbody td { height: 46px; padding: 10px 12px; }
  .tbl-compact tbody td { height: auto; }
  .tbl-foot { flex-wrap: wrap; gap: 8px; }
  .pager { flex-wrap: wrap; }

  /* 筛选/工具条换行，控件不挤压 */
  .filter-row, .topbar, .search-card, .flex { flex-wrap: wrap; }
  .topbar .search-wrap, .search-card > div { max-width: none !important; flex: 1 1 100% !important; }
  .filter-item { flex: 1 1 auto; }
  .filter-item .field, .search-card .field { width: 100% !important; }
  .spacer { display: none; }

  /* 触摸目标 ≥40px（验收口径：窄屏可点目标 ≥40×40，相邻目标间距 ≥6px）。
     一律用 min-width / min-height 抬高：它与页面私有样式里的 width / height 不是同一个属性，
     不必跟页面 <style> 争优先级，也不会回退页面已做的加大。 */
  .field, .btn { min-height: 40px; }
  .btn-sm { min-height: 40px; }
  .pg { min-width: 40px; height: 40px; }
  .pg-gap { min-width: 22px; }   /* 省略号不是可点目标，保持窄条，13 页的分页条才不会多折一行 */
  .play-btn.pb28 { width: 32px; height: 32px; }
  .play-btn.pb36 { width: 40px; height: 40px; } .play-btn.pb36 svg { width: 15px; height: 15px; }

  /* 练唱页：波形/播放控件 */
  .wave-stage { height: 96px; }
  .transport { flex-wrap: wrap; gap: 10px; justify-content: center; }
  .vol { width: 100%; }
  .char-chip { min-width: 24px; padding: 3px 5px 2px; }
  .strip-head { flex-wrap: wrap; }

  /* 弹层与提示 */
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }

  /* 设计系统组件 */
  .page-head { flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
  .ph-t { font-size: 18px; } .ph-acts { width: 100%; margin-left: 0; flex-wrap: wrap; padding-bottom: 0; }
  .ph-acts .btn { flex: 1 1 auto; }
  .btn-xs { min-height: 40px; } .btn-icon { min-width: 40px; } .btn-icon.btn-sm { min-width: 40px; } .btn-icon.btn-xs { min-width: 40px; }
  .field-sm { min-height: 40px; }
  /* 筹码 / 可点标签 / 排序表头 / 步进器：同样抬到 40px。
     .tag 只对真正可点的 <button>/<a> 生效（静态标签保持原密度）；.tag-sm 在 .ph-t 标题内，排除。 */
  .fchip { min-height: 40px; border-radius: 20px; }
  button.tag:not(.tag-sm), a.tag:not(.tag-sm), .tag-click:not(.tag-sm) { min-height: 40px; padding-left: 12px; padding-right: 12px; }
  .th-sort { min-height: 40px; }
  .help-q { font-size: 11px; }
  .stepper { min-height: 42px; }   /* 外框 42 → 内部按钮 height:100% 正好 40 */
  /* 窄屏头部只剩品牌两行，右上角停靠会贴到标题末字：改成整条居中的跳转条 */
  a.jump-main { left: 12px; right: 12px; justify-content: center; }
  .dlg-mask { padding: 12px; } .dlg-f .btn { flex: 1; } .dlg.has-ic .dlg-b { padding-left: 22px; }
  /* 页脚分组竖排：品牌 / 学院 · 项目组 / 版本 · 数据更新 / 备案 各占一行，组间「·」隐藏；
     组内改为行内文本流 + 不换行空格包住「·」，再长（videos 的双日期）也只在普通空格处折行，行尾行首都不会孤悬一个点 */
  .site-foot { padding: 0 16px; }
  .sf-in { flex-direction: column; gap: 4px; padding: 18px 0 22px; }
  .sf-in > .sf-sep { display: none; }
  .sf-g { display: block; }
  .sf-g .sf-upd:not([hidden]) { display: inline; }
  .sf-g .sf-sep { display: inline; margin: 0 4px; }
  .sf-g .sf-sep::before { content: "\00a0\00b7\00a0"; }
  .hide-sm { display: none !important; } .only-sm { display: initial; }
  .tbl-wrap > .tbl { white-space: nowrap; }
  .empty { padding: 26px 12px 24px; } .empty-lg { padding: 40px 12px 36px; }
}

@media (max-width: 380px) {
  body[data-nav="eval"] .score-grid3 { grid-template-columns: repeat(2, 1fr); }
  .brand { font-size: 17px; }
}

/* ===== 顶部账号区 + 登录 / 注册对话框（js/main.js 的 XQ.auth 渲染；契约见 scratchpad/ACCOUNTS.md §2） ===== */
/* .head-top 原为块级，这里改成两列：左品牌自适应、右账号区固定，深色头部上用鎏金描边与导航同调 */
.head-top { display: flex; align-items: flex-start; gap: 16px; }
.head-top > .brand { flex: 1 1 auto; min-width: 0; }
.head-user { position: relative; flex: none; display: flex; align-items: center; margin-top: 2px; }
/* 头部右上「人工评测」小入口（原主导航第 8 项，2026-10-10 让位给「交流社区」；只在首页练唱评测显示）：与登录钮同形但更轻——
   细描边、半透明底、12.5px 常规字重；底色仍要压得住右侧插画最亮处 */
.head-link {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; margin: 4px -6px 0 0; padding: 0 12px; border-radius: var(--r-full);
  border: 1px solid rgba(230, 194, 124, 0.34); background: rgba(7, 22, 45, 0.72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  color: rgba(243, 221, 176, 0.9); font-size: 12.5px; font-weight: 500; letter-spacing: 0.3px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.head-link svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.head-link:hover { background: rgba(16, 48, 90, 0.92); border-color: rgba(230, 194, 124, 0.85); color: #fff; }
.head-link:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

.hu-login, .hu-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 13px; border-radius: var(--r-full);
  /* 右上角压在头部插画上，底色必须够实才读得清（插画最亮处接近 #f0d8c8） */
  border: 1px solid rgba(230, 194, 124, 0.5); background: rgba(7, 22, 45, 0.78);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  box-shadow: 0 2px 10px rgba(5, 15, 35, 0.35);
  color: var(--gold-light); font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.hu-login:hover, .hu-btn:hover { background: rgba(16, 48, 90, 0.92); border-color: rgba(230, 194, 124, 0.9); color: #fff; }
.hu-login:focus-visible, .hu-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.hu-login .ico { width: 15px; height: 15px; vertical-align: 0; }
.hu-btn { padding-left: 5px; }
.hu-av {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--gold-light), #c99b4e); color: #3a2707;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.hu-name { max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 600; }
.hu-role {
  flex: none; height: 18px; padding: 0 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 18px; letter-spacing: 0;
  background: rgba(255, 255, 255, 0.15); color: #d9e4f4;
}
.hu-role.t { background: rgba(230, 194, 124, 0.22); color: var(--gold-light); }
.ico.hu-caret { width: 13px; height: 13px; opacity: 0.7; vertical-align: 0; }

/* 下拉：.site-head 是 overflow:hidden，菜单必须 fixed（定位由 main.js 按按钮矩形写入） */
.hu-menu {
  position: fixed; z-index: 500; min-width: 212px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.hu-menu[hidden] { display: none; }
.hu-menu-h { margin: -6px -6px 6px; padding: 9px 11px 10px; background: #f6f8fc; border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
.hu-menu-h b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.hu-menu-h span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--faint); line-height: 1.4; word-break: break-all; }
.hu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; background: none; border-radius: var(--r-sm);
  font-family: inherit; font-size: 13px; font-weight: 500; color: #3d4c66; text-align: left; text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.hu-item .ico { width: 16px; height: 16px; color: var(--faint); vertical-align: 0; }
.hu-item:hover { background: #f1f5fc; color: var(--blue); }
.hu-item:hover .ico { color: currentColor; }
.hu-item:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.hu-item.danger { color: var(--danger-text); }
.hu-item.danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.hu-menu-sep { height: 1px; margin: 5px -2px; background: var(--line); }
.hu-t-short { display: none; }

/* 登录 / 注册对话框内部 */
.auth-msg {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 13px;
  padding: 9px 11px; border: 1px solid var(--info-line); border-radius: var(--r-sm);
  background: var(--info-bg); color: var(--info-text); font-size: 12.5px; line-height: 1.55;
}
.auth-msg .ico { width: 16px; height: 16px; margin-top: 1px; vertical-align: 0; }
.auth-tabs { display: flex; gap: 4px; margin: 0 0 15px; padding: 3px; background: #eef1f6; border-radius: var(--r-md); }
.auth-tab {
  flex: 1; height: 32px; border: 0; border-radius: var(--r-sm); background: none;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--sub); cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.auth-tab:hover { color: var(--text); }
.auth-tab[aria-selected="true"] { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.auth-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.auth-pane[hidden] { display: none; }
.auth-pane .field-row { gap: 0 12px; }                 /* 行距由内部 .fgroup 的 margin-bottom 提供，不再叠加 */
.auth-pane > .fgroup:last-child { margin-bottom: 0; }
.auth-tsw { margin-bottom: 12px; }
.auth-tsw .field-help { display: block; margin-top: 5px; }
.auth-tc[hidden] { display: none; }
.auth-tc { margin-bottom: 0; }

@media (max-width: 780px) {
  /* ≤780：已登录只留鎏金头像字（姓名 / 角色 / 箭头收起），点开仍是同一个下拉；触摸目标 40 */
  .head-top { gap: 10px; }
  .hu-login, .hu-btn { height: 40px; }
  .head-link { width: 40px; height: 40px; padding: 0; justify-content: center; margin: 0 -2px 0 0; }   /* ≤780 只留图标，名称走 aria-label / 提示气泡 */
  .head-link span { display: none; }
  .head-link svg { width: 17px; height: 17px; }
  .hu-btn { width: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .hu-name, .hu-role, .ico.hu-caret { display: none; }
  .hu-av { width: 28px; height: 28px; font-size: 14px; }
  .hu-t-full { display: none; }
  .hu-t-short { display: inline; }
  .hu-menu { min-width: 200px; }
  .auth-pane .field-row { grid-template-columns: 1fr; }
}
