/* ============================================
   小螺号 TC-AUD 听觉康复训练系统
   设计系统 V1.0
   ============================================ */

/* ---------- 设计变量 ---------- */
:root {
  /* 主色系 - 临床青蓝 */
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --primary-light: #e0f7fa;
  --primary-50: #ecfeff;
  --primary-100: #cffafe;

  /* 辅助色 */
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #6366f1;
  --info-light: #e0e7ff;

  /* 中性色 */
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #f8fafc;

  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 间距 */
  --sidebar-w: 240px;
  --sidebar-collapsed: 64px;
  --header-h: 56px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  /* 过渡 */
  --transition: all 0.2s ease;
}

/* ---------- 重置 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 14px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ---------- 通用组件 ---------- */

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* 布局 */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-collapsed { width: var(--sidebar-collapsed); }

.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

.main-area.expanded { margin-left: var(--sidebar-collapsed); }

/* 侧边栏 Logo */
.sidebar-logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-logo .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 15px; font-weight: 700; color: var(--text);
  white-space: nowrap;
}

.sidebar-logo .logo-sub {
  font-size: 10px; color: var(--text-tertiary); font-weight: 400;
}

/* 侧边栏导航 */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover { background: var(--bg-alt); }

.sidebar-user .avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--info));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user .user-info {
  overflow: hidden;
}

.sidebar-user .user-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap;
}

.sidebar-user .user-role {
  font-size: 11px; color: var(--text-tertiary);
  white-space: nowrap;
}

/* 顶部栏 */
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-toggle {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.topbar-toggle:hover { background: var(--bg-alt); }

.topbar-title {
  font-size: 16px; font-weight: 600; color: var(--text);
}

.topbar-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-tertiary);
}

.topbar-breadcrumb .sep { color: var(--border-strong); }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-search {
  position: relative;
  width: 240px;
}

.topbar-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  transition: var(--transition);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.topbar-search .search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 14px;
}

.topbar-icon-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.topbar-icon-btn:hover { background: var(--bg-alt); color: var(--text); }

.topbar-icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: var(--radius-full);
  border: 2px solid var(--surface);
}

/* 内容区域 */
.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px; font-weight: 600; color: var(--text);
}

.card-body { padding: 20px; }

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1200px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ---------- 统计卡片 ---------- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary-dark); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: var(--info-light); color: var(--info); }

.stat-value {
  font-size: 24px; font-weight: 700; color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 2px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-alt); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { opacity: 0.9; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }

.btn-ghost {
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 标签/徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-default { background: var(--bg-alt); color: var(--text-secondary); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ---------- 表格 ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.table tbody tr:hover { background: var(--bg); }

.table .table-actions {
  display: flex; gap: 8px;
}

/* ---------- 表单 ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required { color: var(--danger); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row > .form-group { flex: 1; }

/* ---------- 进度条 ---------- */
.progress {
  height: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state .empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state .empty-desc {
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- 头像 ---------- */
.avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--info));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl { width: 64px; height: 64px; font-size: 24px; }

/* ---------- 步骤条 ---------- */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-num {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  background: var(--bg-alt);
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: var(--transition);
}

.step.active .step-num {
  background: var(--primary);
  color: white;
}

.step.completed .step-num {
  background: var(--success);
  color: white;
}

.step-label {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.step.active .step-label { color: var(--text); font-weight: 500; }
.step.completed .step-label { color: var(--text); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.step.completed + .step .step-line,
.step.completed .step-line {
  background: var(--success);
}

/* ---------- 雷达图（CSS实现） ---------- */
.radar-chart {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  position: relative;
}

/* ---------- 标签页 ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ---------- 提示框 ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info { background: var(--info-light); color: #3730a3; }
.alert-warning { background: var(--warning-light); color: #92400e; }
.alert-danger { background: var(--danger-light); color: #991b1b; }
.alert-success { background: var(--success-light); color: #065f46; }

.alert-icon { flex-shrink: 0; font-size: 16px; }

/* ---------- 时间轴 ---------- */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px; top: 4px;
  width: 12px; height: 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 2px solid var(--border-strong);
}

.timeline-item.active::before { border-color: var(--primary); background: var(--primary); }
.timeline-item.success::before { border-color: var(--success); background: var(--success); }
.timeline-item.warning::before { border-color: var(--warning); background: var(--warning); }
.timeline-item.danger::before { border-color: var(--danger); background: var(--danger); }

.timeline-time { font-size: 12px; color: var(--text-tertiary); }
.timeline-title { font-size: 13px; font-weight: 500; color: var(--text); margin: 2px 0; }
.timeline-desc { font-size: 12px; color: var(--text-secondary); }

/* ---------- 左右耳切换 ---------- */
.ear-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ear-toggle button {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  transition: var(--transition);
}

.ear-toggle button.active {
  background: var(--primary);
  color: white;
}

.ear-toggle button:not(:last-child) {
  border-right: 1px solid var(--border);
}

/* ---------- 儿童端样式 ---------- */
.child-app {
  min-height: 100vh;
  background: linear-gradient(135deg, #e0f7fa 0%, #f0f9ff 50%, #fef3c7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.child-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.child-stimulus {
  font-size: 80px;
  margin: 24px 0;
}

.child-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.child-option {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.child-option:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: translateY(-2px);
}

.child-option.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.child-option.wrong {
  border-color: var(--danger);
  background: var(--danger-light);
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #0e7490 100%);
  padding: 24px;
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---------- 家庭端 ---------- */
.family-app {
  min-height: 100vh;
  background: var(--bg);
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.family-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 24px 20px;
  position: relative;
}

.family-content { padding: 16px; }

.family-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.w-full { width: 100%; }
.cursor-pointer { cursor: pointer; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: var(--radius-full); }
.hidden { display: none !important; }

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body { padding: 20px; }

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg);
}

/* 数据条 */
.data-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.data-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  transition: width 0.3s ease;
}

/* 条件标签 */
.condition-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-alt);
  color: var(--text-secondary);
}

/* 维度图标 */
.dim-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* 雷达图容器 */
.radar-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.radar-svg {
  width: 100%;
  height: 100%;
}

/* 提示等级指示器 */
.prompt-levels {
  display: flex;
  gap: 4px;
}

.prompt-level {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-alt);
  color: var(--text-tertiary);
}

.prompt-level.active { background: var(--primary); color: white; }

/* 滑块 */
.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: var(--radius-full);
  background: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* 开关 */
.switch {
  position: relative;
  width: 40px; height: 22px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.switch.on { background: var(--primary); }

.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: var(--radius-full);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.switch.on::after { left: 20px; }

/* 选择卡片 */
.select-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.select-card:hover { border-color: var(--primary); background: var(--primary-50); }
.select-card.selected { border-color: var(--primary); background: var(--primary-light); }

/* 双屏训练布局 */
.dual-screen {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  height: calc(100vh - var(--header-h) - 48px);
}

.dual-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dual-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 连接状态指示器 */
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
}

.status-dot.online { background: var(--success); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--danger); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 颜色块 */
.color-block {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: var(--radius-sm);
  vertical-align: middle;
  margin-right: 6px;
}

/* 课程时间轴 */
.session-timeline {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.session-phase {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-right: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
}

.session-phase:hover { border-color: var(--primary); }
.session-phase.active { border-color: var(--primary); background: var(--primary-light); }
.session-phase.completed { border-color: var(--success); background: var(--success-light); }

.session-phase-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.session-phase-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* 图例 */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

/* 通知 */
.toast-container {
  position: fixed;
  top: 70px; right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  max-width: 360px;
  animation: slideIn 0.2s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- 补充工具类 ---------- */
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 4px; }
.mb-3 { margin-bottom: 12px; }
.p-3 { padding: 12px; }
.p-8 { padding: 32px; }
.font-mono { font-family: var(--font-mono); }
.text-info { color: var(--info); }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.relative { position: relative; }
.absolute { position: absolute; }

/* ---------- 训练优先工作台 V2 ---------- */
.aud-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 0 36px;
  color: #172033;
}

.aud-eyebrow {
  display: block;
  color: #16858c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.aud-muted { color: var(--text-tertiary); font-size: 12px; }

.aud-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: end;
  padding: 28px 32px;
  background: linear-gradient(120deg, #0d2938 0%, #11475a 66%, #0f6971 100%);
  color: #f8ffff;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(14, 59, 72, .18);
}

.aud-hero .aud-eyebrow { color: #7ee7df; }
.aud-hero h1, .aud-domain-hero h1, .aud-plan-hero h1, .aud-summary-hero h1, .aud-listen-area h1 { margin: 6px 0 8px; line-height: 1.2; }
.aud-hero h1 { font-size: clamp(25px, 3vw, 36px); letter-spacing: -.04em; }
.aud-hero p { max-width: 680px; color: rgba(243, 255, 255, .78); margin: 0; }

.aud-child-picker {
  align-self: center;
  padding: 14px;
  border: 1px solid rgba(180, 245, 238, .24);
  background: rgba(5, 31, 43, .33);
  border-radius: 12px;
}
.aud-child-picker label, .aud-child-picker small { display: block; font-size: 12px; color: rgba(235, 255, 255, .76); }
.aud-child-picker label { margin-bottom: 6px; font-weight: 700; }
.aud-child-picker .form-select { border-color: rgba(255, 255, 255, .18); background: rgba(255,255,255,.96); margin-bottom: 8px; }

.aud-gate {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 13px 16px;
  margin: 14px 0 30px;
  background: #fffaf0;
  border: 1px solid #f5ddb2;
  border-radius: 12px;
}
.aud-gate.is-complete { background: #f2fcfa; border-color: #bfe9df; }
.aud-gate-mark { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; color: #8a5c0b; font-weight: 800; border-radius: 50%; background: #fee6b7; }
.aud-gate.is-complete .aud-gate-mark { color: #057b69; background: #c9f1e7; }
.aud-gate-copy { display: grid; gap: 2px; flex: 1; }
.aud-gate-copy strong { font-size: 13px; }
.aud-gate-copy span { color: var(--text-secondary); font-size: 12px; }
.aud-gate-state { color: #087562; font-size: 12px; font-weight: 700; white-space: nowrap; }

.aud-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 14px; }
.aud-section-head h2 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.02em; }

.aud-focus-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 14px; }
.aud-recommendation { padding: 23px 24px; border: 1px solid #bfe8e4; border-radius: 16px; background: linear-gradient(135deg, #effcfb, #ffffff 70%); box-shadow: var(--shadow-sm); }
.aud-recommendation-top { display: flex; gap: 8px; justify-content: space-between; color: #197a7c; font-size: 12px; font-weight: 700; }
.aud-recommendation h2 { margin: 12px 0 6px; font-size: 25px; letter-spacing: -.03em; }
.aud-recommendation p { max-width: 740px; color: var(--text-secondary); font-size: 13px; margin: 0; }
.aud-chip-row, .aud-plan-grid p, .aud-summary-grid p { display: flex; flex-wrap: wrap; gap: 6px; }
.aud-chip-row { margin-top: 14px; }
.aud-chip-row span, .aud-condition { display: inline-flex; align-items: center; padding: 4px 8px; background: #dff4f2; border-radius: 999px; color: #176a6f; font-size: 11px; font-weight: 650; }
.aud-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.aud-continue { display: grid; align-content: start; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.aud-continue strong { font-size: 15px; }
.aud-continue p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.aud-continue .btn { justify-self: start; padding-left: 0; }

.aud-library { margin-top: 4px; }
.aud-domain-grid { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 3px; }
.aud-domain-card { min-width: 136px; min-height: 142px; display: grid; align-content: start; gap: 7px; padding: 14px; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.aud-domain-card:hover { transform: translateY(-2px); border-color: #63c9c5; box-shadow: var(--shadow); }
.aud-domain-code { display: inline-grid; place-items: center; width: 31px; height: 22px; color: #0f6c75; background: #e4f7f5; border-radius: 5px; font-size: 11px; font-weight: 800; }
.aud-domain-card strong { font-size: 13px; line-height: 1.3; }
.aud-domain-card small { min-height: 38px; color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.aud-domain-count { align-self: end; color: #0d7d85; font-size: 11px; font-weight: 700; }

.aud-quick-list { margin-top: 10px; }
.aud-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aud-task-list { display: grid; gap: 10px; }
.aud-task-card { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 13px; align-items: center; padding: 18px; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.aud-task-card:hover { transform: translateY(-1px); border-color: #67c8c4; box-shadow: var(--shadow); }
.aud-task-card-compact { padding: 14px; grid-template-columns: 36px minmax(0, 1fr) 14px; }
.aud-task-icon { display: grid; place-items: center; width: 44px; height: 44px; color: #0b7179; font-size: 16px; font-weight: 800; background: #e7f7f5; border-radius: 11px; }
.aud-task-card-compact .aud-task-icon { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
.aud-task-copy { min-width: 0; display: grid; gap: 3px; }
.aud-task-kicker { color: #17838c; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.aud-task-copy strong { font-size: 15px; }
.aud-task-copy small { color: var(--text-secondary); font-size: 12px; line-height: 1.45; }
.aud-task-arrow { color: #17838c; font-size: 17px; }

.aud-back-row { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 12px; margin: 0 0 16px; }
.aud-back-row .btn { padding-left: 0; }
.aud-domain-hero, .aud-plan-hero, .aud-summary-hero { display: flex; gap: 18px; align-items: center; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.aud-domain-hero .aud-domain-code { width: 52px; height: 52px; border-radius: 14px; font-size: 16px; }
.aud-domain-hero h1, .aud-plan-hero h1, .aud-summary-hero h1 { font-size: 28px; }
.aud-domain-hero p, .aud-plan-hero p, .aud-summary-hero p { margin: 4px 0 0; color: var(--text-secondary); }
.aud-roadmap { padding: 22px; margin-top: 20px; border-radius: 16px; background: #fafcfd; border: 1px solid var(--border); }
.aud-roadmap h2 { margin: 4px 0 16px; font-size: 18px; }
.aud-stage-list { display: grid; gap: 9px; }
.aud-stage-list > div { display: flex; align-items: start; gap: 10px; }
.aud-stage-list b { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; color: #32767a; background: #e2f2f1; border-radius: 50%; font-size: 11px; }
.aud-stage-list span { display: grid; gap: 1px; }
.aud-stage-list strong { font-size: 13px; }.aud-stage-list small { color: var(--text-secondary); font-size: 12px; }

.aud-plan-hero { align-items: center; }
.aud-plan-hero > div:nth-child(2) { flex: 1; }
.aud-plan-symbol { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 60px; border-radius: 15px; color: #08737b; background: #dff6f4; font-size: 22px; font-weight: 850; }
.aud-plan-callout { padding: 19px 22px; margin: 14px 0; background: #eefaf8; border-left: 4px solid #19a6a2; border-radius: 8px; }
.aud-plan-callout strong { color: #0f6d71; }.aud-plan-callout p { margin: 4px 0 0; }
.aud-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.aud-plan-grid article { padding: 17px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.aud-plan-grid article > span { color: #0e8285; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.aud-plan-grid p { margin: 8px 0 0; color: var(--text-secondary); font-size: 13px; }
.aud-plan-grid em, .aud-summary-grid em { padding: 3px 7px; color: #506171; background: #f0f5f6; border-radius: 6px; font-size: 11px; font-style: normal; }
.aud-plan-detail { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .9fr); gap: 14px; margin-top: 14px; }
.aud-plan-detail > div, .aud-plan-detail aside { padding: 21px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.aud-plan-detail h2 { margin: 4px 0 13px; font-size: 19px; }.aud-plan-detail ol { padding-left: 20px; }.aud-plan-detail li { margin: 0 0 11px; color: var(--text-secondary); font-size: 13px; }.aud-plan-detail aside p { color: var(--text-secondary); font-size: 13px; }
.aud-rule { display: grid; gap: 4px; padding: 10px; margin-top: 12px; background: #edf9f6; border-radius: 9px; font-size: 12px; }.aud-rule strong { color: #087762; }.aud-rule span { color: #35625a; }.aud-rule.is-soft { background: #fff8e7; }.aud-rule.is-soft strong { color: #996607; }.aud-rule.is-soft span { color: #745f30; }
.aud-home-card { padding: 16px 18px; margin-top: 14px; background: #fff8e7; border: 1px solid #f2dfb4; border-radius: 12px; }.aud-home-card > span { color: #93670b; font-size: 11px; font-weight: 800; letter-spacing: .04em; }.aud-home-card p { margin: 5px 0 0; color: #6f5a2d; font-size: 13px; }.aud-disclaimer { margin: 13px 0 0; color: var(--text-tertiary); font-size: 11px; }

.aud-run-shell { max-width: 1320px; }
.aud-run-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 9px 4px; }.aud-run-header > div { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 12px; }.aud-run-header strong { font-size: 16px; }.aud-run-header > span { color: var(--text-secondary); font-size: 12px; }
.aud-run-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: stretch; }
.aud-stage { min-height: 620px; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 17px; box-shadow: var(--shadow-sm); }
.aud-stage-meta { display: flex; justify-content: space-between; gap: 10px; padding: 14px 19px 11px; color: var(--text-secondary); font-size: 12px; }.aud-stage-meta span:first-child { color: #08777b; font-weight: 750; }
.aud-progress-line { height: 4px; margin: 0 19px; overflow: hidden; background: #edf1f4; border-radius: 999px; }.aud-progress-line i { display: block; height: 100%; background: linear-gradient(90deg, #20a9a3, #5acabe); border-radius: 999px; transition: width .25s ease; }
.aud-listen-area { display: grid; place-items: center; align-content: center; gap: 9px; min-height: 330px; padding: 26px; text-align: center; background: radial-gradient(circle at 50% 28%, #f0fffc, #fbfefd 58%, #fff); }.aud-listen-area h1 { font-size: clamp(24px, 3.2vw, 34px); }.aud-listen-area p { min-height: 20px; max-width: 370px; color: var(--text-secondary); font-size: 13px; }
.aud-play-button { width: 130px; height: 130px; display: grid; place-content: center; gap: 4px; margin: 11px 0 4px; color: #fff; background: linear-gradient(145deg, #12a7a5, #087683); border: 6px solid #ddf8f5; border-radius: 50%; box-shadow: 0 13px 28px rgba(7, 119, 127, .24); }.aud-play-button:hover:not(:disabled) { transform: scale(1.03); }.aud-play-button:disabled { cursor: wait; opacity: .76; }.aud-play-button span { padding-left: 4px; font-size: 37px; line-height: .85; }.aud-play-button small { font-size: 11px; font-weight: 700; }.aud-play-button.is-playing { animation: aud-listen-pulse 1.2s ease-in-out infinite; }
.aud-listen-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }.aud-listen-controls .btn:disabled { opacity: .4; cursor: not-allowed; }
.aud-answer-area { margin-top: auto; padding: 18px 19px 21px; border-top: 1px solid var(--border); }.aud-answer-area > span { display: block; margin-bottom: 10px; color: var(--text-secondary); font-size: 12px; }.aud-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.aud-option { min-height: 58px; padding: 10px; color: #1c3341; background: #f8fbfc; border: 1px solid #dce7e9; border-radius: 10px; font-size: 14px; font-weight: 750; transition: background .16s ease, border-color .16s ease, transform .16s ease; }.aud-option:hover:not(:disabled) { transform: translateY(-1px); color: #075d64; border-color: #58bcb8; background: #effcfa; }.aud-option:disabled { cursor: not-allowed; opacity: .54; }.aud-option.is-correct { color: #04765f; background: #e6f9f2; border-color: #5eccad; opacity: 1; }.aud-option.is-wrong { color: #b35142; background: #fff0ed; border-color: #efad9f; opacity: 1; }
.aud-feedback { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 12px; background: #effbf7; border-radius: 10px; }.aud-feedback.is-wrong { background: #fff6ef; }.aud-feedback strong { font-size: 13px; }.aud-feedback span { flex: 1; color: var(--text-secondary); font-size: 11px; }.aud-feedback .btn { margin-left: auto; }
.aud-run-side { display: grid; align-content: start; gap: 12px; }.aud-run-side > div { padding: 17px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; }.aud-run-side h3 { margin: 4px 0 11px; font-size: 15px; }.aud-condition { display: inline-flex; margin: 3px 3px 0 0; background: #eef6f7; color: #467076; }.aud-prompt-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 10px; }.aud-prompt-row button { height: 29px; color: #617583; border: 1px solid #d8e2e5; border-radius: 6px; font-size: 11px; font-weight: 700; }.aud-prompt-row button.is-active { color: #fff; border-color: #0d8990; background: #11989c; }.aud-run-side small { display: block; margin-top: 8px; color: var(--text-tertiary); font-size: 11px; line-height: 1.5; }.aud-live-stats p { display: flex; justify-content: space-between; margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; }.aud-live-stats b { color: #1c3040; }

.aud-empty { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 11px; padding: 30px; text-align: center; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 16px; }.aud-empty strong { font-size: 17px; }.aud-empty span { color: var(--text-secondary); font-size: 13px; }
.aud-summary-hero { justify-content: space-between; }.aud-summary-hero > div { flex: 1; }.aud-summary-check { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px; color: #047963; background: #d9f5ed; border-radius: 50%; font-size: 25px; font-weight: 800; }.aud-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }.aud-metrics > div { display: grid; gap: 3px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }.aud-metrics strong { color: #0f777d; font-size: 25px; letter-spacing: -.04em; }.aud-metrics span { color: var(--text-secondary); font-size: 12px; }.aud-summary-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 13px; }.aud-summary-grid article { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }.aud-summary-grid h2 { margin: 4px 0 8px; font-size: 18px; }.aud-summary-grid article > p { color: var(--text-secondary); font-size: 13px; }.aud-summary-grid small { display: block; margin-top: 14px; color: var(--text-tertiary); font-size: 11px; line-height: 1.55; }
.aud-trial-table { padding: 20px; margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }.aud-trial-table .aud-section-head { margin: 0 0 12px; }.aud-table-wrap { overflow-x: auto; }.aud-trial-table table { width: 100%; border-collapse: collapse; font-size: 12px; }.aud-trial-table th { color: var(--text-tertiary); font-size: 10px; letter-spacing: .05em; text-align: left; text-transform: uppercase; }.aud-trial-table th, .aud-trial-table td { padding: 10px 8px; border-bottom: 1px solid #edf1f2; }.aud-result-good, .aud-result-note { display: inline-block; padding: 2px 6px; color: #077562; background: #e4f7f0; border-radius: 5px; font-size: 10px; font-weight: 700; }.aud-result-note { color: #a35f20; background: #fff1db; }

@keyframes aud-listen-pulse { 0%, 100% { box-shadow: 0 13px 28px rgba(7, 119, 127, .24); } 50% { box-shadow: 0 0 0 13px rgba(35, 188, 178, .13), 0 13px 28px rgba(7, 119, 127, .24); } }

@media (max-width: 1020px) {
  .aud-domain-grid { grid-template-columns: repeat(4, minmax(142px, 1fr)); }
  .aud-run-grid { grid-template-columns: minmax(0, 1fr); }
  .aud-run-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  /* 手机上的训练先占满屏幕；菜单只在点按时临时覆盖显示。 */
  .sidebar { width: var(--sidebar-w); transform: translateX(-100%); box-shadow: none; }
  .sidebar.sidebar-collapsed { width: var(--sidebar-w); transform: translateX(0); box-shadow: 12px 0 32px rgba(15, 23, 42, .16); }
  .main-area, .main-area.expanded { min-width: 0; margin-left: 0; }
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-search { display: none; }
  .topbar-right { gap: 4px; }
  .aud-shell { padding: 0 0 24px; }
  .aud-hero { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px; border-radius: 14px; }
  .aud-hero h1 { font-size: 27px; }
  .aud-gate { align-items: start; flex-wrap: wrap; margin: 10px 0 22px; padding: 13px; }
  .aud-gate-copy { flex-basis: calc(100% - 44px); }.aud-gate .btn { margin-left: 44px; }.aud-gate .btn + .btn { margin-left: 0; }
  .aud-section-head { align-items: start; margin-top: 22px; }.aud-section-head h2 { font-size: 18px; }.aud-section-head .aud-muted { display: none; }
  .aud-focus-grid, .aud-plan-detail, .aud-summary-grid { grid-template-columns: 1fr; }
  .aud-domain-grid { grid-template-columns: repeat(7, 136px); }
  .aud-task-grid, .aud-plan-grid, .aud-metrics { grid-template-columns: 1fr; }
  .aud-task-card { padding: 14px; }.aud-task-copy small { display: none; }
  .aud-domain-hero, .aud-plan-hero, .aud-summary-hero { align-items: flex-start; padding: 18px; }.aud-plan-hero { flex-wrap: wrap; }.aud-plan-hero .btn { width: 100%; }
  .aud-domain-hero h1, .aud-plan-hero h1, .aud-summary-hero h1 { font-size: 23px; }
  .aud-run-header { align-items: start; flex-direction: column; gap: 6px; }.aud-run-header strong { order: -1; }
  .aud-stage { min-height: 0; border-radius: 13px; }.aud-stage-meta { display: grid; gap: 4px; padding: 12px 14px 10px; }.aud-progress-line { margin: 0 14px; }
  .aud-listen-area { min-height: 282px; padding: 19px; }.aud-play-button { width: 112px; height: 112px; }.aud-answer-area { padding: 15px; }.aud-options { gap: 7px; }.aud-option { min-height: 53px; font-size: 13px; }.aud-feedback { align-items: start; flex-wrap: wrap; }.aud-feedback .btn { margin-left: 0; }
  .aud-run-side { grid-template-columns: 1fr; }.aud-run-side > div { padding: 14px; }.aud-prompt-row { max-width: 270px; }
  .aud-summary-hero { flex-wrap: wrap; }.aud-summary-hero .btn { width: 100%; }.aud-metrics { gap: 8px; }.aud-metrics > div { grid-template-columns: 80px 1fr; align-items: baseline; padding: 13px; }.aud-metrics strong { font-size: 22px; }
  .aud-trial-table { padding: 15px; }.aud-trial-table th, .aud-trial-table td { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .aud-domain-card, .aud-task-card, .aud-option, .aud-play-button, .aud-progress-line i { transition: none; }
  .aud-play-button.is-playing { animation: none; }
}
