/* ============================================================
   华强北苹果批发英语训练 · 设计系统 v2.0
   概念：档口报价单 —— 深墨蓝交易台 × 报价金 × 成色标签
   ============================================================ */

:root {
  /* 色板 */
  --ink: #0A0E27;            /* 页面底 */
  --ink-2: #0C112B;          /* 渐变辅助 */
  --panel: #141830;          /* 卡片面 */
  --panel-2: #1A2040;        /* 卡片升起面 */
  --line: rgba(151, 163, 199, 0.14);
  --line-strong: rgba(151, 163, 199, 0.26);

  --gold: #D4AF37;           /* 鎏金 · 主强调 */
  --gold-hi: #E9CE8A;        /* 高光金 */
  --gold-soft: rgba(212, 175, 55, 0.14);
  --mint: #52B788;           /* 成交绿 · 掌握/成功 */
  --mint-soft: rgba(82, 183, 136, 0.13);
  --sky: #5D96C6;            /* 买家蓝 · 信息 */
  --sky-soft: rgba(93, 150, 198, 0.13);
  --rose: #E4685A;           /* 提醒红 */
  --rose-soft: rgba(228, 104, 90, 0.13);

  --t1: #FFFFFF;             /* 一级文本 */
  --t2: #B8BCCE;             /* 二级文本 */
  --t3: #7A8299;             /* 三级文本 */

  --en-font: Georgia, 'Times New Roman', 'Songti SC', serif;
  --cn-font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 10px 30px rgba(2, 4, 14, 0.45);
  --nav-h: 64px;
  --header-h: 56px;
  --maxw: 760px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  font-family: var(--cn-font);
  background:
    radial-gradient(1100px 500px at 85% -8%, rgba(212, 175, 55, 0.055), transparent 60%),
    radial-gradient(900px 480px at -10% 12%, rgba(93, 150, 198, 0.05), transparent 55%),
    var(--ink);
  color: var(--t1);
  min-height: 100dvh;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }

/* 通用 SVG 图标 */
.ic {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

::selection { background: rgba(212, 175, 55, 0.3); }

/* ============ 启动画面 ============ */
#splash-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  transition: opacity 0.45s ease, visibility 0.45s;
}
#splash-screen.hide { opacity: 0; visibility: hidden; }
.splash-content { text-align: center; }
.splash-mark {
  width: 76px; height: 76px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #101010;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 55%, #8C6D1F);
  border-radius: 22px;
  box-shadow: 0 14px 40px rgba(212, 175, 55, 0.25);
}
.splash-title { font-size: 22px; font-weight: 700; letter-spacing: 0.12em; }
.splash-subtitle { margin-top: 6px; font-size: 13px; color: var(--t3); letter-spacing: 0.2em; }
.splash-loading { margin-top: 30px; }
.splash-spinner {
  width: 22px; height: 22px; margin: 0 auto;
  border: 2px solid var(--line-strong); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 离线条 ============ */
#offline-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 16px;
  font-size: 12.5px; color: var(--gold);
  background: rgba(26, 26, 16, 0.92);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(10px);
}
#offline-bar .ic { width: 14px; height: 14px; }

/* ============ 安装横幅 ============ */
#install-banner {
  position: fixed; left: 14px; right: 14px; bottom: calc(var(--nav-h) + 14px);
  z-index: 800;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  animation: slide-up 0.4s ease;
}
.install-title { font-size: 14.5px; font-weight: 700; }
.install-desc { font-size: 12.5px; color: var(--t2); margin-top: 2px; }
.install-text { flex: 1; }
.install-btn {
  padding: 9px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold));
}
.install-close { color: var(--t3); padding: 6px; display: flex; }
.install-close .ic { width: 14px; height: 14px; }
@keyframes slide-up { from { transform: translateY(16px); opacity: 0; } }

/* ============ 顶栏 ============ */
#app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 12px;
  padding-left: 18px; padding-right: 18px;
  background: rgba(10, 14, 39, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand-mark {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 60%, #8C6D1F);
  border-radius: 9px;
}
.header-title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; letter-spacing: 0.14em; }
.header-left, .header-right { min-width: 30px; display: flex; align-items: center; }

/* ============ 主区布局 ============ */
#app-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 18px) 18px calc(var(--nav-h) + 30px);
}
.page { display: none; animation: page-in 0.3s ease; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

@media (min-width: 1024px) {
  :root { --maxw: 1040px; }
}

/* ============ 首页 ============ */
.login-prompt {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; margin-bottom: 18px;
  background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius);
}
.login-prompt-title { font-size: 14.5px; font-weight: 700; color: var(--gold); }
.login-prompt-desc { font-size: 12.5px; color: var(--t2); margin-top: 2px; }
.login-prompt-text { flex: 1; }
.login-prompt-btn {
  padding: 9px 16px; border-radius: 999px; flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold));
}

.home-hero {
  padding: 30px 22px 26px;
  margin-bottom: 22px;
  background:
    radial-gradient(420px 180px at 90% 0%, rgba(212, 175, 55, 0.12), transparent 65%),
    linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.hero-eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.28em;
  color: var(--gold);
  opacity: 0.85;
}
.hero-caption {
  margin-top: 10px;
  font-size: clamp(20px, 5.6vw, 25px); font-weight: 800; letter-spacing: 0.04em;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.stat-item { text-align: center; position: relative; }
.stat-item + .stat-item::before {
  content: ''; position: absolute; left: 0; top: 8%; height: 84%;
  width: 1px; background: var(--line);
}
.stat-num {
  font-size: 26px; font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 3px; font-size: 12px; color: var(--t3); letter-spacing: 0.12em; }

.home-section { margin-bottom: 26px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 13px;
  font-size: 14px; font-weight: 700; color: var(--t2);
  letter-spacing: 0.18em;
}
.section-title::before {
  content: ''; width: 4px; height: 15px; border-radius: 2px;
  background: linear-gradient(var(--gold), #8C6D1F);
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 720px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
.action-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.action-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--panel-2); }
.action-card:active { transform: scale(0.98); }
.action-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
}
.action-icon .ic { width: 20px; height: 20px; }
.action-icon--gold { color: var(--gold); background: var(--gold-soft); }
.action-icon--sky  { color: var(--sky);  background: var(--sky-soft); }
.action-icon--mint { color: var(--mint); background: var(--mint-soft); }
.action-icon--rose { color: var(--rose); background: var(--rose-soft); }
.action-text { display: flex; flex-direction: column; gap: 2px; }
.action-name { font-size: 14.5px; font-weight: 700; }
.action-desc { font-size: 12px; color: var(--t3); }

/* 今日推荐 */
.daily-card {
  padding: 18px;
  background:
    radial-gradient(320px 140px at 100% 0%, rgba(212, 175, 55, 0.08), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.daily-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--gold);
  padding: 4px 10px;
  background: var(--gold-soft);
  border-radius: 999px;
}
.daily-cn { margin-top: 12px; font-size: 17px; font-weight: 700; }
.daily-en {
  margin-top: 6px;
  font-family: var(--en-font);
  font-size: 16px; color: var(--t2);
}
.daily-loading { color: var(--t3); font-size: 13px; }

/* 进度条 */
.progress-overview {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.progress-bar {
  height: 10px; border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #8C6D1F, var(--gold) 70%, #E9CE8A);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-text { margin-top: 10px; font-size: 12.5px; color: var(--t2); font-variant-numeric: tabular-nums; }

/* 今日待复习提示 */
.due-chip {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin-top: 12px;
  padding: 11px 14px;
  font-size: 13.5px; font-weight: 700; color: var(--gold);
  text-align: left;
  background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 11px;
  transition: transform 0.15s ease;
}
.due-chip:active { transform: scale(0.98); }
.due-chip .ic { width: 15px; height: 15px; }

/* 环形进度（首页 · 已掌握） */
.ring-stat { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-stat svg { transform: rotate(-90deg); }
.ring-track { stroke: rgba(120, 134, 190, 0.18); }
.ring-fg {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-num { font-size: 17px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.ring-cap { font-size: 9.5px; color: var(--t3); letter-spacing: 0.12em; }

/* 本周趋势（纯 CSS 柱状图） */
.week-chart {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 7px;
  height: 96px;
  padding: 16px 16px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.week-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-bar {
  width: 100%; max-width: 22px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  opacity: 0.35;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.week-bar.hot { opacity: 1; box-shadow: 0 0 12px rgba(212, 175, 55, 0.25); }
.week-bar.zero { background: rgba(120, 134, 190, 0.25); }
.week-day { font-size: 10px; color: var(--t3); }
.week-col.today .week-day { color: var(--gold); font-weight: 700; }

/* 会员引导 */
.vip-prompt {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background:
    linear-gradient(150deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04) 60%),
    var(--panel);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
}
.vip-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); background: var(--gold-soft);
  border-radius: 12px;
}
.vip-title { font-size: 14.5px; font-weight: 700; }
.vip-desc { margin-top: 2px; font-size: 12px; color: var(--t2); }
.vip-text { flex: 1; }
.vip-btn {
  padding: 9px 18px; border-radius: 999px; flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold));
}

/* ============ 场景库 ============ */
.filter-bar {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top)); z-index: 600;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 0 12px;
  margin-bottom: 4px;
  background: linear-gradient(var(--ink) 82%, transparent);
}
.search-row { position: relative; display: flex; align-items: center; }
.search-ic {
  position: absolute; left: 14px; width: 16px; height: 16px;
  color: var(--t3); pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  font-size: 14.5px; color: var(--t1);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.18s ease;
}
.search-input::placeholder { color: var(--t3); }
.search-input:focus { border-color: rgba(212, 175, 55, 0.55); }
.search-clear {
  position: absolute; right: 8px;
  padding: 8px; color: var(--t3);
  display: flex;
}
.search-clear .ic { width: 13px; height: 13px; }

.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-select {
  appearance: none; -webkit-appearance: none;
  padding: 10px 30px 10px 13px;
  font-size: 13px; color: var(--t1);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7490' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center,
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filter-select:focus { border-color: rgba(212, 175, 55, 0.55); }

.result-info {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 2px 12px;
  font-size: 12.5px; color: var(--t3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* 分类胶囊：横向滚动 */
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 7px 15px;
  font-size: 13px; font-weight: 600; color: var(--t2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}
.chip small { font-size: 11px; color: var(--t3); margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip.active {
  color: #1A1405; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  border-color: transparent;
}
.chip.active small { color: rgba(26, 20, 5, 0.65); }

/* 分段按钮（难度/角色） */
.seg-row { display: flex; gap: 8px; }
.seg-btn {
  flex: 1;
  padding: 8px 2px;
  font-size: 12px; font-weight: 600; color: var(--t2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}
.seg-btn.active {
  color: var(--gold); font-weight: 700;
  background: var(--gold-soft);
  border-color: rgba(212, 175, 55, 0.5);
}

.card-list { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .card-list { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } }

/* 场景卡 —— 报价单条目 */
.scene-card {
  position: relative;
  padding: 16px 16px 12px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.scene-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--t3); opacity: 0.55;
}
.scene-card[data-grade='basic']::before { background: var(--mint); }
.scene-card[data-grade='intermediate']::before { background: var(--gold); }
.scene-card[data-grade='advanced']::before { background: var(--rose); }
.scene-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
/* 已掌握的卡片：左侧色脊变成交绿 + 边框微亮 */
.scene-card:has(.btn-master.mastered) { border-color: rgba(82, 183, 136, 0.3); }
.scene-card:has(.btn-master.mastered)::before { background: var(--mint); opacity: 0.9; }

.card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.card-category {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--t2);
  padding: 3px 9px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.card-category::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--t3);
}
.scene-card[data-grade='basic'] .card-category::before { background: var(--mint); }
.scene-card[data-grade='intermediate'] .card-category::before { background: var(--gold); }
.scene-card[data-grade='advanced'] .card-category::before { background: var(--rose); }

.card-speaker {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.card-speaker.seller { color: var(--gold); background: var(--gold-soft); }
.card-speaker.buyer  { color: var(--sky);  background: var(--sky-soft); }

.card-cn { font-size: 16px; font-weight: 700; line-height: 1.5; }
.card-en {
  margin-top: 6px;
  font-family: var(--en-font);
  font-size: 15.5px; line-height: 1.55;
  color: var(--gold);
  opacity: 0.92;
  user-select: text; -webkit-user-select: text;
}

/* 展开区：默认折叠，点卡片展开 */
.card-extra { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.scene-card.expanded .card-extra { display: block; animation: page-in 0.25s ease; }
.card-alt-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; color: var(--t3); margin-bottom: 7px; }
.card-alt-item {
  font-family: var(--en-font);
  font-size: 14px; color: var(--t2);
  padding: 3px 0;
}
.card-vocab-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.vocab-tag {
  font-size: 11.5px; color: var(--sky);
  padding: 3px 9px;
  background: var(--sky-soft);
  border-radius: 6px;
}
.card-note {
  margin-top: 10px; font-size: 12.5px; color: var(--t2);
  padding: 9px 11px;
  background: var(--ink-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.card-actions {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px;
}
.card-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px;
  font-size: 12px; font-weight: 600; color: var(--t2);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap; flex-shrink: 0;
}
.card-btn:hover { background: var(--panel-2); color: var(--t1); border-color: var(--line-strong); }
.card-btn:active { transform: scale(0.95); }
.card-btn .ic { width: 14px; height: 14px; }
.card-spacer { flex: 1; }
.btn-fav.favorited { color: var(--gold); border-color: rgba(212, 175, 55, 0.5); background: var(--gold-soft); }
.btn-fav.favorited .ic { fill: var(--gold); }
.btn-master.mastered { color: var(--mint); border-color: rgba(82, 183, 136, 0.5); background: var(--mint-soft); }
.btn-master.mastered .ic { stroke-width: 2.4; }

/* 空状态 / 加载 */
.empty-state { text-align: center; padding: 54px 20px; color: var(--t3); font-size: 13.5px; }
.empty-state svg { width: 74px; height: 74px; margin-bottom: 14px; opacity: 0.5; }
.empty-state .empty-title { font-size: 15px; font-weight: 700; color: var(--t2); margin-bottom: 5px; }
.empty-icon { font-size: 34px; margin-bottom: 10px; }
.loading { text-align: center; padding: 50px 20px; color: var(--t3); font-size: 13.5px; }

/* ============ 训练 ============ */
.train-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.train-tab {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 0;
  font-size: 14px; font-weight: 700; color: var(--t3);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.train-tab .ic { width: 16px; height: 16px; }
.train-tab.active { color: #1A1405; background: linear-gradient(135deg, #E9CE8A, var(--gold)); }

.train-panel { display: none; }
.train-panel.active { display: block; }

.review-config, .listen-config {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.config-row { display: flex; flex-direction: column; gap: 7px; }
.config-row label { font-size: 12px; font-weight: 700; color: var(--t3); letter-spacing: 0.12em; }
.config-select {
  appearance: none; -webkit-appearance: none;
  width: 100%;
  padding: 11px 32px 11px 13px;
  font-size: 14px; color: var(--t1);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7490' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center,
    var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}
.config-select:focus { border-color: rgba(212, 175, 55, 0.55); }

.btn-primary {
  width: 100%; margin-top: 16px;
  padding: 14px;
  font-size: 15.5px; font-weight: 800; letter-spacing: 0.2em; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 60%, #A8842B);
  border-radius: 13px;
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(212, 175, 55, 0.3); }
.btn-primary:active { transform: scale(0.98); }

.review-progress, .listen-progress {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px; color: var(--t2);
  font-variant-numeric: tabular-nums;
}
.review-progress-num { font-weight: 700; color: var(--t1); }
.listen-score { font-size: 13px; color: var(--gold); font-weight: 700; }

/* 翻卡 */
.flashcard { perspective: 1400px; }
.flashcard-inner {
  position: relative;
  min-height: 320px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: 26px 24px;
  text-align: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background:
    radial-gradient(340px 160px at 50% 0%, rgba(212, 175, 55, 0.07), transparent 60%),
    var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.flashcard-back { transform: rotateY(180deg); }
.flashcard-front .card-cat {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold);
  padding: 4px 12px; background: var(--gold-soft); border-radius: 999px;
}
.flashcard-front .card-cn { font-size: 24px; font-weight: 800; line-height: 1.45; }
.card-hint { font-size: 12px; color: var(--t3); letter-spacing: 0.1em; }
.flashcard-back .card-en {
  margin: 0;
  font-family: var(--en-font);
  font-size: 22px; line-height: 1.5; color: var(--t1);
  user-select: text; -webkit-user-select: text;
}
.flashcard-back .card-alt { font-family: var(--en-font); font-size: 14px; color: var(--t2); }
.flashcard-back .card-vocab { font-size: 12.5px; color: var(--t3); }
.btn-speak {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px;
  font-size: 13.5px; font-weight: 700; color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
}
.btn-speak:active { transform: scale(0.95); }

.review-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 16px; }
.btn-skip {
  padding: 13px;
  font-size: 14px; font-weight: 700; color: var(--t2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.btn-skip:active { transform: scale(0.98); }
.btn-mastered {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px;
  font-size: 14px; font-weight: 800; color: #0E1512;
  background: linear-gradient(135deg, #7CD9A8, var(--mint) 60%, #3E8E63);
  border-radius: 13px;
}
.btn-mastered:active { transform: scale(0.98); }

/* 听力 —— 大圆形播放钮 */
.btn-play {
  width: 128px; height: 128px;
  margin: 6px auto 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--sky);
  background:
    radial-gradient(circle at 50% 32%, rgba(93, 150, 198, 0.16), transparent 65%),
    var(--panel);
  border: 1.5px solid rgba(93, 150, 198, 0.45);
  border-radius: 50%;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.btn-play .ic { width: 30px; height: 30px; }
.btn-play:hover { border-color: var(--sky); }
.btn-play:active { transform: scale(0.96); }
.btn-play.playing { animation: pulse 1.2s ease infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(93, 150, 198, 0.28); }
  70% { box-shadow: 0 0 0 18px rgba(93, 150, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 150, 198, 0); }
}

.listen-options { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.listen-option {
  padding: 15px 17px;
  font-size: 15px; font-weight: 600; color: var(--t1); text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.listen-option:not(.disabled):hover { border-color: var(--line-strong); background: var(--panel-2); }
.listen-option:active { transform: scale(0.99); }
.listen-option.disabled { cursor: default; opacity: 0.55; }
.listen-option.correct {
  opacity: 1; color: var(--mint);
  background: var(--mint-soft);
  border-color: rgba(82, 183, 136, 0.5);
}
.listen-option.wrong {
  opacity: 1; color: var(--rose);
  background: var(--rose-soft);
  border-color: rgba(228, 104, 90, 0.5);
}

.listen-result {
  margin-top: 14px; padding: 13px 16px;
  font-size: 14px; font-weight: 700;
  border-radius: 12px;
}
.listen-result.correct { color: var(--mint); background: var(--mint-soft); }
.listen-result.wrong { color: var(--rose); background: var(--rose-soft); }

.btn-next {
  width: 100%; margin-top: 14px; padding: 14px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.1em; color: var(--sky);
  background: var(--sky-soft);
  border: 1px solid rgba(93, 150, 198, 0.4);
  border-radius: 13px;
}
.btn-next:active { transform: scale(0.98); }

/* 完成态 */
.review-done { text-align: center; padding: 46px 20px; }
.done-icon {
  width: 66px; height: 66px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mint); background: var(--mint-soft);
  border-radius: 50%;
}
.done-icon .ic { width: 30px; height: 30px; stroke-width: 2.2; }
.done-icon--sky { color: var(--sky); background: var(--sky-soft); }
.done-text { font-size: 19px; font-weight: 800; }
.done-stats { margin: 10px 0 24px; font-size: 14px; color: var(--t2); font-variant-numeric: tabular-nums; }
.review-done .btn-primary { max-width: 280px; }

/* ============ 我的 ============ */
.mine-header { display: flex; align-items: center; gap: 15px; padding: 24px 4px 22px; }
.mine-avatar {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 800; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 60%, #8C6D1F);
  border-radius: 19px;
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.22);
}
.mine-name { font-size: 19px; font-weight: 800; }
.mine-level { margin-top: 3px; font-size: 12.5px; color: var(--t3); }
.mine-info { flex: 1; }
.mine-login-btn {
  padding: 9px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold));
}

.mine-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 18px 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mine-stat { text-align: center; position: relative; }
.mine-stat + .mine-stat::before {
  content: ''; position: absolute; left: 0; top: 12%; height: 76%;
  width: 1px; background: var(--line);
}
.mine-stat-num { font-size: 20px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.mine-stat-label { margin-top: 3px; font-size: 11px; color: var(--t3); }

.mine-section { margin-top: 24px; }
.mine-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.mine-item, .mine-item-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 15px 16px;
  font-size: 14px; color: var(--t1); text-align: left;
  border-bottom: 1px solid var(--line);
}
.mine-item span:last-child { font-variant-numeric: tabular-nums; }
.mine-item-btn { transition: background 0.15s ease; }
.mine-item-btn:last-child { border-bottom: none; }
.mine-item-btn:hover { background: var(--panel-2); }
.mine-item-btn .ic { width: 17px; height: 17px; color: var(--t3); }
.mine-item-btn--danger { color: var(--rose); }
.mine-item-btn--danger .ic { color: var(--rose); }

/* 分类掌握度（app.js 渲染） */
.category-progress { display: flex; flex-direction: column; gap: 13px; }
.cat-progress-item { padding: 2px; }
.cat-progress-label {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--t2); margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}
.cat-progress-bar {
  height: 7px; border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cat-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #3E8E63, var(--mint));
  transition: width 0.5s ease;
}

.mine-footer {
  margin-top: 34px; padding-bottom: 8px;
  text-align: center; font-size: 11.5px; color: var(--t3);
  line-height: 2; letter-spacing: 0.08em;
}

/* ============ 底部导航 ============ */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 700;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 0 10px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(10, 14, 39, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--t3);
  transition: color 0.18s ease;
}
.nav-ic { width: 21px; height: 21px; }
.nav-item.active { color: var(--gold); }
.nav-item.active .nav-ic { stroke-width: 2; }
.nav-label { font-size: 10.5px; letter-spacing: 0.06em; }

@media (min-width: 1024px) {
  #bottom-nav {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(440px, 100%);
    border: 1px solid var(--line-strong);
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }
}

/* ============ 登录弹窗（app.js 生成） ============ */
#auth-modal {
  position: fixed; inset: 0; z-index: 950;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(8px);
}
.auth-card {
  width: 100%; max-width: 360px;
  padding: 28px 24px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  animation: page-in 0.3s ease;
}
.auth-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.auth-title { font-size: 20px; font-weight: 800; }
.auth-close { color: var(--t3); padding: 4px; display: flex; }
.auth-close .ic { width: 16px; height: 16px; }
.auth-input {
  width: 100%;
  padding: 14px; margin-bottom: 12px;
  font-size: 15px; color: var(--t1);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s ease;
}
.auth-input::placeholder { color: var(--t3); }
.auth-input:focus { border-color: rgba(212, 175, 55, 0.55); }
.auth-submit {
  width: 100%; margin-top: 8px; padding: 14px;
  font-size: 15.5px; font-weight: 800; letter-spacing: 0.14em; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 60%, #A8842B);
  border-radius: 12px;
}
.auth-submit:disabled { opacity: 0.6; }
.auth-switch {
  display: block; margin: 16px auto 0;
  font-size: 13.5px; font-weight: 700; color: var(--gold);
}
.auth-agreement { margin-top: 14px; text-align: center; font-size: 11.5px; color: var(--t3); }

/* ============ VIP 弹窗 ============ */
.vip-modal {
  position: fixed; inset: 0; z-index: 950;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(8px);
}
.vip-modal-content {
  width: 100%; max-width: 380px;
  padding: 30px 24px 24px;
  text-align: center;
  background:
    radial-gradient(300px 160px at 50% 0%, rgba(212, 175, 55, 0.14), transparent 65%),
    var(--panel-2);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  animation: page-in 0.3s ease;
}
.vip-modal-icon {
  width: 58px; height: 58px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  background: var(--gold-soft);
  border-radius: 50%;
}
.vip-modal-icon .ic { width: 28px; height: 28px; }
.vip-modal-title { font-size: 21px; font-weight: 800; }
.vip-modal-desc { margin-top: 8px; font-size: 13px; color: var(--t2); line-height: 1.7; }
.vip-plans { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 18px; }
.vip-plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease;
}
.vip-plan.active { border-color: var(--gold); background: var(--gold-soft); }
.vip-plan-name { font-size: 14.5px; font-weight: 700; }
.vip-plan-desc { margin-top: 2px; font-size: 11.5px; color: var(--t3); }
.vip-plan-price { font-size: 17px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.vip-plan-price small { font-size: 11px; color: var(--t3); font-weight: 400; }
#vip-pay-btn {
  width: 100%; padding: 14px;
  font-size: 15.5px; font-weight: 800; letter-spacing: 0.14em; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 60%, #A8842B);
  border-radius: 12px;
}
.vip-modal-close {
  width: 100%; margin-top: 10px; padding: 12px;
  font-size: 13.5px; color: var(--t3);
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px);
  transform: translateX(-50%) translateY(14px);
  z-index: 990;
  max-width: 82vw;
  padding: 11px 22px;
  font-size: 13.5px; font-weight: 600; color: var(--t1);
  background: rgba(20, 26, 52, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 可访问性 ============ */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

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

/* ============ AI 实战陪练 ============ */
.ai-config {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ai-tip {
  margin-top: 14px;
  font-size: 12.5px; color: var(--t2); line-height: 1.7;
  padding: 10px 12px;
  background: var(--ink-2);
  border-left: 3px solid var(--sky);
  border-radius: 0 8px 8px 0;
}
.ai-chat {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 14px;
  padding: 16px;
  max-height: 46vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ai-msg {
  max-width: 88%;
  padding: 11px 14px;
  font-size: 14.5px; line-height: 1.6;
  border-radius: 14px;
  word-break: break-word;
}
.ai-msg .ai-en { font-family: var(--en-font); }
.ai-msg--buyer {
  align-self: flex-start;
  background: var(--sky-soft);
  border: 1px solid rgba(93, 150, 198, 0.35);
  border-bottom-left-radius: 4px;
}
.ai-msg--seller {
  align-self: flex-end;
  background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-bottom-right-radius: 4px;
}
.ai-msg--system {
  align-self: center;
  font-size: 12px; color: var(--t3);
  background: none; border: none; padding: 2px;
}
.ai-feedback {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12.5px; color: var(--t2);
  font-family: var(--cn-font);
}
.ai-feedback .fb-tag { color: var(--gold); font-weight: 700; }
.ai-typing { color: var(--t3); font-size: 13px; padding: 4px 8px; }
.ai-input-row {
  display: flex; gap: 9px;
  margin-top: 12px;
}
.ai-input {
  flex: 1;
  padding: 13px 16px;
  font-size: 15px; color: var(--t1);
  font-family: var(--en-font);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s ease;
}
.ai-input::placeholder { color: var(--t3); font-family: var(--cn-font); }
.ai-input:focus { border-color: rgba(212, 175, 55, 0.55); }
.ai-send {
  padding: 13px 22px;
  font-size: 14px; font-weight: 800; color: #1A1405;
  background: linear-gradient(135deg, #E9CE8A, var(--gold) 60%, #A8842B);
  border-radius: 12px;
  flex-shrink: 0;
}
.ai-send:disabled { opacity: 0.55; }

/* ============ 学习材料增强 ============ */
/* 场景库视图切换 */
.view-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.view-toggle .seg-btn { padding: 8px 2px; }

/* 跨境流程学习视图 */
.guide-stage {
  margin-bottom: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.guide-stage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.guide-num {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #1A1405;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  border-radius: 9px;
}
.guide-title { font-size: 15.5px; font-weight: 800; }
.guide-goal { margin: 2px 0 10px; padding-left: 36px; font-size: 12px; color: var(--gold); }
.guide-steps { margin: 0 0 12px; padding-left: 36px; }
.guide-steps li {
  margin-bottom: 6px;
  font-size: 13px; color: var(--t2); line-height: 1.65;
}
.guide-phrases { padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.guide-phrase {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 0;
}
.guide-phrase-main { flex: 1; min-width: 0; }
.guide-phrase-en {
  font-family: var(--en-font);
  font-size: 14px; color: var(--t1); line-height: 1.5;
  user-select: text; -webkit-user-select: text;
}
.guide-phrase-cn { margin-top: 2px; font-size: 12px; color: var(--t3); }
.guide-phrase .vocab-speak { padding: 6px 10px; }
/* 词汇速查列表 */
.vocab-row {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.vocab-word {
  font-family: var(--en-font);
  font-size: 15.5px; font-weight: 700; color: var(--gold);
  user-select: text; -webkit-user-select: text;
}
.vocab-cn { margin-top: 1px; font-size: 12.5px; color: var(--t2); }
.vocab-main { flex: 1; min-width: 0; }
.vocab-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.vocab-freq { font-size: 11px; color: var(--t3); font-variant-numeric: tabular-nums; }
.vocab-row .btn-speak { padding: 7px 12px; font-size: 12px; }
/* 卡片展开区：场景上下文 */
.card-context {
  margin-bottom: 10px;
  font-size: 12px; color: var(--t3);
}
.card-context::before { content: '场景 · '; color: var(--gold); font-weight: 700; }
/* 复习卡正面：场景上下文 */
.card-scene { font-size: 12.5px; color: var(--t3); letter-spacing: 0.04em; }
/* 错题本开关 */
.check-row {
  display: flex; align-items: center; gap: 9px;
  margin-top: 14px;
  font-size: 13.5px; color: var(--t2);
  cursor: pointer;
}
.check-row input[type='checkbox'] {
  width: 17px; height: 17px;
  accent-color: #D4AF37;
  cursor: pointer;
}
/* 复习卡按钮组 */
.flashcard-btns { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.btn-shadow { color: var(--mint); background: var(--mint-soft); border-color: rgba(82, 183, 136, 0.4); }

/* 术语词典条目 */
.vocab-row--term { border-left: 3px solid var(--gold); }
.tag-term {
  font-size: 10.5px; font-weight: 700; color: #1A1405;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  padding: 2px 8px; border-radius: 999px;
}

/* ===== 连续打卡徽章（金色强调，复用 due-chip 骨架） ===== */
.streak-chip { cursor: pointer; }
.streak-chip:active { transform: scale(0.99); }

/* ===== AI 自动朗读开关 ===== */
.ai-autospeak {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: var(--t3);
  white-space: nowrap; cursor: pointer; user-select: none;
}
.ai-autospeak input { accent-color: var(--gold); width: 14px; height: 14px; cursor: pointer; }

/* ===== 桌面快捷键提示 ===== */
.kbd-hint {
  margin-top: 10px; text-align: center;
  font-size: 11px; color: var(--t3);
}

/* ===== 学习周报 ===== */
.week-report { display: flex; flex-direction: column; gap: 12px; }
.wr-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wr-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
}
.wr-num { font-size: 26px; font-weight: 800; color: var(--gold-hi); }
.wr-label { font-size: 11.5px; color: var(--t3); margin-top: 4px; }
.wr-delta { font-size: 11px; color: var(--mint); margin-top: 6px; min-height: 14px; }
.wr-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding: 4px 6px 0; }
.wr-bar-col { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.wr-bar {
  width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  min-height: 4px;
}
.wr-bar--empty { background: rgba(151, 163, 199, 0.18); }
.wr-day { font-size: 10px; color: var(--t3); }

/* ===== 意见反馈弹窗（复用 auth-card / auth-input / auth-submit） ===== */
#feedback-modal {
  position: fixed; inset: 0; z-index: 950;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(8px);
}
.fb-textarea {
  height: 120px; resize: none;
  font-family: inherit; line-height: 1.5;
}

/* ===== 情景剧（v3.5.0） ===== */
.dlg-filter {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px;
}
.dlg-filter .config-select { flex: 1; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.dlg-list { padding: 0 16px 20px; }
.dlg-loading { text-align: center; padding: 40px; color: var(--t3); }
.dlg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.dlg-card:active { transform: scale(0.98); border-color: var(--gold); }
.dlg-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 8px;
}
.dlg-card-title { font-size: 15px; font-weight: 700; color: var(--t1); flex: 1; }
.dlg-card-cat {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: rgba(212,175,55,0.12); color: var(--gold);
  white-space: nowrap; margin-left: 8px;
}
.dlg-card-desc { font-size: 13px; color: var(--t2); line-height: 1.5; margin-bottom: 10px; }
.dlg-card-meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--t3);
}
.dlg-card-meta span { display: flex; align-items: center; gap: 4px; }

/* 播放器 */
.dlg-player-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.dlg-back-btn {
  background: none; border: none; color: var(--t2);
  font-size: 15px; cursor: pointer; padding: 6px 10px;
  border-radius: 8px;
}
.dlg-back-btn:active { background: var(--card); }
.dlg-player-title { font-size: 16px; font-weight: 700; color: var(--t1); flex: 1; }
.dlg-progress-text {
  font-size: 12px; color: var(--gold); font-weight: 700;
  background: rgba(212,175,55,0.12); padding: 3px 10px; border-radius: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.dlg-scene-desc {
  padding: 12px 16px;
  font-size: 13px; color: var(--t2);
  background: rgba(212,175,55,0.06);
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}

.dlg-role-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.dlg-role-label { font-size: 13px; color: var(--t3); }
.dlg-role-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: transparent;
  color: var(--t2); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.dlg-role-btn.active {
  background: var(--gold); color: #0A0E27;
  border-color: var(--gold); font-weight: 700;
}
.dlg-role-divider {
  width: 1px; height: 20px; background: var(--line); margin: 0 4px;
}
.dlg-sub-btn {
  padding: 5px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: transparent;
  color: var(--t3); font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.dlg-sub-btn.active {
  background: rgba(69,123,157,0.2); color: #6CA5C8;
  border-color: rgba(69,123,157,0.4);
}
/* 字幕模式 */
.dlg-chat.sub-en .dlg-cn { display: none; }
.dlg-chat.sub-cn .dlg-en { display: none; }
.dlg-chat.sub-cn .dlg-cn { font-size: 15px; color: var(--t1); }

.dlg-chat {
  padding: 16px;
  max-height: calc(100vh - 340px);
  overflow-y: auto;
}
.dlg-turn {
  display: flex; margin-bottom: 16px;
  animation: dlgFadeIn .3s ease;
}
@keyframes dlgFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.dlg-turn--seller { justify-content: flex-end; }
.dlg-turn--buyer { justify-content: flex-start; }
.dlg-bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 16px;
  position: relative;
}
.dlg-turn--buyer .dlg-bubble {
  background: rgba(69,123,157,0.15);
  border: 1px solid rgba(69,123,157,0.3);
  border-bottom-left-radius: 4px;
}
.dlg-turn--seller .dlg-bubble {
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.25);
  border-bottom-right-radius: 4px;
}
.dlg-turn.active .dlg-bubble {
  box-shadow: 0 0 0 2px var(--gold), 0 4px 20px rgba(212,175,55,0.2);
}
.dlg-role-tag {
  font-size: 11px; font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.dlg-turn--buyer .dlg-role-tag { color: #6CA5C8; }
.dlg-turn--seller .dlg-role-tag { color: var(--gold); }
.dlg-emotion {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.08); color: var(--t3);
  font-weight: 400;
}
.dlg-cn { font-size: 13px; color: var(--t2); margin-bottom: 4px; line-height: 1.5; }
.dlg-en { font-size: 15px; color: var(--t1); font-weight: 500; line-height: 1.5; }
.dlg-turn-btn {
  margin-top: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  color: var(--t2); font-size: 11px; padding: 4px 10px;
  border-radius: 6px; cursor: pointer;
}
.dlg-turn-btn:active { background: rgba(255,255,255,0.12); }

/* 控制栏 */
.dlg-controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 16px 10px;
  border-top: 1px solid var(--line);
}
.dlg-ctrl-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  color: var(--t2); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.dlg-ctrl-btn:active { transform: scale(0.92); background: rgba(212,175,55,0.15); }
.dlg-ctrl-main {
  width: 54px; height: 54px; font-size: 20px;
  background: var(--gold); color: #0A0E27; border-color: var(--gold);
  font-weight: 700;
}
.dlg-rate-select {
  background: var(--card); border: 1px solid var(--line);
  color: var(--t2); font-size: 12px; padding: 6px 8px;
  border-radius: 8px; cursor: pointer;
}
.dlg-progress-bar {
  height: 3px; background: var(--line); margin: 0 16px 12px;
  border-radius: 2px; overflow: hidden;
}
.dlg-progress-fill {
  height: 100%; background: var(--gold);
  border-radius: 2px; transition: width .3s;
  width: 0%;
}

/* ===== 情景剧 v3.5.1 增强 ===== */
.config-select-sm { max-width: 100px; }
.dlg-search-row { padding: 0 16px 12px; }
.dlg-search-input {
  width: 100%; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; color: var(--t1); font-size: 14px;
  outline: none; transition: border-color .15s;
}
.dlg-search-input:focus { border-color: var(--gold); }
.dlg-search-input::placeholder { color: var(--t3); }

/* 跟读录音区 */
.dlg-record-area {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(212,175,55,0.04);
}
.dlg-record-hint {
  text-align: center; font-size: 13px; color: var(--t2);
  margin-bottom: 10px;
}
.dlg-record-btns {
  display: flex; gap: 8px; align-items: center;
}
.dlg-listen-btn {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(69,123,157,0.15); border: 1px solid rgba(69,123,157,0.3);
  color: #6CA5C8; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all .15s;
}
.dlg-listen-btn:active { background: rgba(69,123,157,0.3); }
.dlg-done-btn {
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #2D6A4F, #40916C);
  border: none; color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all .15s;
}
.dlg-done-btn:active { transform: scale(0.97); }
.dlg-record-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #FF6B35, #FF8F5E);
  border: none; border-radius: 12px;
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.dlg-record-btn:active { transform: scale(0.98); }
.dlg-record-btn.recording {
  background: linear-gradient(135deg, #E63946, #FF6B6B);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.dlg-record-icon { font-size: 18px; }

/* 评分显示 */
.dlg-score-display {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px; padding: 12px;
  background: var(--card); border-radius: 12px;
  border: 1px solid var(--line);
}
.dlg-score-circle {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.dlg-score-circle.score-high { background: linear-gradient(135deg, #2D6A4F, #40916C); }
.dlg-score-circle.score-mid { background: linear-gradient(135deg, #D4AF37, #E9C46A); }
.dlg-score-circle.score-low { background: linear-gradient(135deg, #E63946, #F4845F); }
.dlg-score-info { flex: 1; }
.dlg-score-label { font-size: 12px; color: var(--t3); margin-bottom: 4px; }
.dlg-score-result { font-size: 13px; color: var(--t2); line-height: 1.4; }

/* 完成庆祝弹窗 */
.dlg-complete-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 18, 0.85);
  backdrop-filter: blur(10px);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dlg-complete-card {
  background: var(--card); border: 1px solid rgba(212,175,55,0.3);
  border-radius: 20px; padding: 32px 24px;
  max-width: 360px; width: 100%;
  text-align: center;
  animation: slideUp .4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.dlg-complete-icon { font-size: 56px; margin-bottom: 12px; animation: bounce 1s ease infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.dlg-complete-title {
  font-size: 24px; font-weight: 800; color: var(--gold);
  margin-bottom: 6px;
}
.dlg-complete-sub { font-size: 14px; color: var(--t2); margin-bottom: 24px; }
.dlg-complete-stats {
  display: flex; justify-content: space-around;
  margin-bottom: 24px; padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dlg-stat-item { flex: 1; }
.dlg-stat-num {
  font-size: 22px; font-weight: 800; color: var(--t1);
  font-variant-numeric: tabular-nums;
}
.dlg-stat-label { font-size: 11px; color: var(--t3); margin-top: 4px; }
.dlg-complete-actions { display: flex; gap: 10px; }
.dlg-complete-actions .btn-primary,
.dlg-complete-actions .btn-secondary { flex: 1; padding: 12px; font-size: 14px; }
.btn-secondary {
  background: transparent; border: 1px solid var(--line);
  color: var(--t2); border-radius: 10px; cursor: pointer;
  transition: all .15s;
}
.btn-secondary:active { background: rgba(255,255,255,0.05); }

/* 剧本卡片收藏按钮 */
.dlg-card-fav {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 18px;
  cursor: pointer; opacity: 0.5; transition: opacity .15s;
}
.dlg-card-fav:hover, .dlg-card-fav.active { opacity: 1; }
.dlg-card { position: relative; }
