/* ========================================
   Youna 尤娜学习 — 儿童友好移动端
   ======================================== */

/* CSS Variables */
:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #141938;
  --bg-card: #1a1f3a;
  --bg-elevated: #252b4d;

  --primary: #FFD600;          /* 阳光黄 */
  --primary-bright: #FFE066;
  --primary-dim: rgba(255, 214, 0, 0.15);

  --accent-pink: #FF6B9D;
  --accent-blue: #38BDF8;
  --accent-mint: #10B981;
  --accent-orange: #FB923C;
  --accent-purple: #A78BFA;

  --success: #10B981;
  --danger: #EF4444;

  --text-primary: #FFFFFF;
  --text-secondary: #C5C8D8;
  --text-muted: #7B7F95;
  --text-on-primary: #0a0e27;

  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);

  --tabbar-h: 64px;
  --topbar-h: 52px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0a0e27 0%, #141938 100%);
  background-attachment: fixed;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* ===== Top bar ===== */
.topbar {
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 22px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:active { background: var(--bg-elevated); }

/* ===== Tab content (pages) ===== */
.page {
  position: absolute;       /* 占满父容器, 自己负责 scroll */
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--tabbar-h) + 16px);
  display: none;
  z-index: 1;
}
.page.active { display: block; }

/* ===== Stats bar (English) ===== */
.stats-bar {
  background: linear-gradient(135deg, #FFD600 0%, #FF6B9D 100%);
  color: var(--text-on-primary);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.stats-item { text-align: center; }
.stats-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}
.stats-label { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.stats-divider { width: 1px; height: 32px; background: rgba(0,0,0,0.2); }

/* ===== Curriculum card (100-day) ===== */
.curriculum-card {
  background: linear-gradient(135deg, rgba(56,189,248,0.18) 0%, rgba(167,139,250,0.18) 100%);
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.cur-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cur-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.cur-day {
  font-size: 13px;
  color: var(--accent-blue);
  font-weight: 700;
  background: rgba(56,189,248,0.15);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.cur-topic {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.cur-progress {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 6px;
}
.cur-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease-out;
}
.cur-progress-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Word section (今日新学 / 复习) ===== */
.word-section { margin-bottom: 16px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px 10px;
}
.section-header.clickable {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.section-hint  { font-size: 12px; color: var(--text-muted); }
.section-toggle { font-size: 12px; color: var(--accent-blue); font-weight: 600; }
.review-body { margin-top: 4px; }

/* ===== Word card badges (新/复习) ===== */
.word-card { position: relative; }
.new-badge, .review-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  letter-spacing: 0.5px;
}
.new-badge {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-pink) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(251,146,60,0.4);
}
.review-badge {
  background: rgba(167,139,250,0.2);
  color: var(--accent-purple);
  border: 1px solid rgba(167,139,250,0.3);
}
.word-card.review-card {
  background: var(--bg-secondary);
  border-color: rgba(167,139,250,0.15);
}

/* ===== Word / Sentence card ===== */
.word-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: transform 0.15s, border-color 0.2s;
}
.word-card.checked { border-color: var(--accent-mint); background: linear-gradient(180deg, var(--bg-card) 0%, rgba(16,185,129,0.08) 100%); }
.word-card:active { transform: scale(0.98); }

.word-main { flex: 1; min-width: 0; }
.word-en {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  word-wrap: break-word;
}
.word-phonetic { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.word-zh { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

.btn-icon {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text-on-primary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.btn-icon:active { transform: scale(0.9); }
.btn-icon.audio { background: var(--accent-blue); color: white; }
.btn-icon.check { background: var(--accent-mint); color: white; }
.btn-icon.check.done { background: var(--accent-mint); opacity: 0.7; }

/* ===== Sub-tab (Listen / Speak) ===== */
.subtabs {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.subtab {
  flex: 1;
  min-height: 0;          /* 关键: flex item 才能正确 overflow scroll */
  text-align: center;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.subtab.active {
  background: var(--primary);
  color: var(--text-on-primary);
}

/* ===== Bottom Tab bar ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
  backdrop-filter: blur(20px);
}
.tab {
  flex: 1;
  min-height: 0;          /* 关键: flex item 才能正确 overflow scroll */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.tab .tab-icon { font-size: 22px; line-height: 1; }
.tab.active { color: var(--primary); }
.tab.disabled { color: var(--text-muted); opacity: 0.5; }

/* ===== Drawer (right side) ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  background: var(--bg-secondary);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-title { font-size: 18px; font-weight: 700; color: var(--primary); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 0; }
.drawer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.drawer-item:active { background: var(--bg-elevated); }
.drawer-item .di-icon { font-size: 22px; }
.drawer-section {
  padding: 12px 20px 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Login page ===== */
.login-page {
  min-height: 100%;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD600 0%, #FF6B9D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(255, 214, 0, 0.4);
}
.login-title { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.login-form { width: 100%; max-width: 320px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--primary); }
.btn-primary {
  width: 100%;
  height: 48px;
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:active { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; }
.toast.success { background: var(--accent-mint); }
.toast.error { background: var(--danger); }

/* ===== Empty / Loading ===== */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty .e-icon { font-size: 48px; margin-bottom: 8px; }
.empty .e-text { font-size: 14px; }

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-area { text-align: center; padding: 40px; }

/* ===== Placeholder page (语文/数学) ===== */
.placeholder {
  text-align: center;
  padding: 80px 24px;
}
.placeholder .p-icon { font-size: 64px; margin-bottom: 16px; }
.placeholder .p-title { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.placeholder .p-sub { font-size: 14px; color: var(--text-muted); }

/* ===== Calendar ===== */
.calendar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.calendar-title { font-size: 18px; font-weight: 700; }
.calendar-nav {
  display: flex;
  gap: 8px;
}
.calendar-nav button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}
.calendar-weekday {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  position: relative;
  color: var(--text-secondary);
}
.calendar-day.checked {
  background: linear-gradient(135deg, #FFD600 0%, #FF6B9D 100%);
  color: var(--text-on-primary);
  font-weight: 700;
}
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--accent-blue); }
.calendar-day.muted { color: var(--text-muted); opacity: 0.3; }

/* ===== Section header (drawer + body) ===== */
.section-title {
  font-size: 14px;
  color: var(--text-muted);
  margin: 12px 4px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===========================================================
   Desktop "Phone Frame" — 仅桌面浏览器生效
   - APK WebView (Capacitor) / 手机浏览器: 走原 mobile 布局(全宽)
   - 平板: 全宽
   - 桌面浏览器: 包裹在居中的手机外框(仿 h5 移动端)
   触发条件 (见 app.js detectDesktop):
     1) UA 不含 Mobi / iPhone / iPad / Android+Mobile
     2) 屏幕宽度 > 1024
     3) 非 touch-only 设备
   =========================================================== */

/* Phone shell 默认隐藏 — JS 加 body.desktop-frame 才显示 */
.phone-shell {
  display: none;
}

body.desktop-frame {
  /* 覆盖默认 mobile 布局: 居中显示手机外框 */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, #1a1f3a 0%, #0a0e27 70%, #050818 100%);
  overflow: hidden;
}

/* 桌面背景上的品牌小字 (手机外框下方) */
body.desktop-frame::before {
  content: 'Youna 尤娜学习';
  position: fixed;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 0;
}

body.desktop-frame .phone-shell {
  display: block;
  position: relative;
  /* iPhone 14 风格 390×844 */
  width: 390px;
  height: 844px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  border-radius: 56px;
  padding: 11px;
  box-shadow:
    0 0 0 1px #050505,
    0 0 0 2px #2a2a2a,
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(255, 214, 0, 0.06);
  z-index: 1;
  /* JS 注入 transform: scale(...) 适配极小屏 */
  transform-origin: center center;
  transition: transform 0.25s ease;
}

/* 顶部听筒/灵动岛 (iPhone 14 Pro 风格) — 已移除 (用户反馈) */
/* body.desktop-frame .phone-notch { display: none; } */

body.desktop-frame .phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  border-radius: 45px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* #app 始终是 absolute 定位的 .page 的 containing block */
#app {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 手机外框内 #app 自适应高度 */
body.desktop-frame #app {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* 把 toast / drawer 锁在 phone-screen 内 (默认 fixed 是相对 viewport) */
body.desktop-frame .toast {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999;
}
body.desktop-frame .drawer-overlay {
  position: absolute !important;
  inset: 0 !important;
}
body.desktop-frame .drawer {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
}

/* 桌面屏幕 ≤ 1024 时, 框架变全宽 (避免 PC 用户缩窗到 1024 还套外框) */
@media (max-width: 1024px) {
  body.desktop-frame .phone-shell {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  body.desktop-frame .phone-screen { border-radius: 0; }
}

/* 底部 tabbar (默认 position:fixed 相对 viewport, 桌面下会跑到手机框外) */
body.desktop-frame .tabbar {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
}

/* 顶部 topbar (sticky 在 desktop 无可滚祖先 → 等同 relative, 留原样即可) */
body.desktop-frame .topbar {
  z-index: 60;
}

/* ===== Day 切换器 ===== */
.cur-day-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cur-day-btn {
  background: rgba(56,189,248,0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: var(--radius-pill);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.cur-day-btn:active { transform: scale(0.92); background: rgba(56,189,248,0.3); }
.cur-day-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}
.cur-day {
  font-size: 13px;
  color: var(--accent-blue);
  font-weight: 700;
  background: rgba(56,189,248,0.15);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  min-width: 80px;
  text-align: center;
}
.cur-today-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-orange);
  background: rgba(251,146,60,0.12);
  border: 1px solid rgba(251,146,60,0.3);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  margin-left: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cur-today-btn:active { transform: scale(0.95); }
.cur-today-btn[hidden] { display: none; }

/* ===== 听 tab 空态引导 ===== */
.empty .e-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ===== Day switcher (重做) ===== */
.cur-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cur-day-switcher {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
}
.cur-day-btn {
  flex: 1;
  background: linear-gradient(135deg, rgba(56,189,248,0.18), rgba(167,139,250,0.18));
  color: var(--text-primary);
  border: 1px solid rgba(56,189,248,0.4);
  border-radius: var(--radius);
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(56,189,248,0.2);
  user-select: none;
  min-height: 40px;          /* 加大点击区 */
}
.cur-day-btn:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, rgba(56,189,248,0.35), rgba(167,139,250,0.35));
}
.cur-day-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.cur-topic-pill {
  flex: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,214,0,0.12);
  border: 1px solid rgba(255,214,0,0.3);
  border-radius: var(--radius);
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  min-height: 40px;
  text-align: center;
}
.cur-day {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 800;
}
.cur-today-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cur-today-btn:active { transform: scale(0.98); }
.cur-today-btn[hidden] { display: none; }

/* ===== 词条 cat-badge (听/说 标识) + day-tag (复习来源) ===== */
.cat-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.cat-listen {
  background: rgba(56,189,248,0.2);
  border: 1px solid rgba(56,189,248,0.4);
}
.cat-speak {
  background: rgba(167,139,250,0.2);
  border: 1px solid rgba(167,139,250,0.4);
}
.day-tag {
  position: absolute;
  top: 8px;
  right: 36px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  z-index: 1;
}

/* ===== 全局隐藏滚动条 (但保留触摸 swipe 滚动) ===== */
* {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
*::-webkit-scrollbar {
  display: none;                   /* Chrome/Safari/iOS WebView */
  width: 0;
  height: 0;
}

/* ===========================================================
   古诗词卡 (语文页)
   - 标题 + 作者朝代 + 原文(竖排+横排)+ 译文 + 朗读/打卡
   =========================================================== */
.poem-card {
  background: linear-gradient(160deg, #1a1f3a 0%, #252b4d 100%);
  border: 1px solid rgba(255,214,0,0.18);
  border-radius: var(--radius-lg);
  padding: 20px 18px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.poem-card.checked {
  border-color: var(--accent-mint);
  background: linear-gradient(160deg, #1a1f3a 0%, rgba(16,185,129,0.10) 100%);
}
.poem-card::before {
  content: '诗';
  position: absolute;
  top: -20px;
  right: -12px;
  font-size: 110px;
  font-weight: 800;
  color: rgba(255,214,0,0.04);
  pointer-events: none;
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  line-height: 1;
}
.poem-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.poem-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  font-family: 'STKaiti', 'KaiTi', '楷体', 'PingFang SC', serif;
  line-height: 1.2;
}
.poem-grade {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.poem-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.poem-meta .poem-author { color: var(--accent-blue); font-weight: 600; margin-right: 6px; }
.poem-meta .poem-dynasty { color: var(--accent-purple); font-size: 12px; }
.poem-content {
  font-size: 18px;
  line-height: 2;
  color: var(--text-primary);
  white-space: pre-line;
  margin: 12px 0 14px;
  letter-spacing: 2px;
  font-family: 'STKaiti', 'KaiTi', '楷体', 'PingFang SC', serif;
  text-indent: 2em;
}
.poem-translation {
  background: rgba(255,214,0,0.06);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  white-space: pre-line;
  display: none;
}
.poem-translation.show { display: block; }
.poem-translation::before {
  content: '译文';
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255,214,0,0.12);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  margin-right: 6px;
  vertical-align: middle;
}
.poem-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.poem-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.poem-btn:active { transform: scale(0.97); }
.poem-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.poem-btn-play { background: linear-gradient(135deg, #38BDF8, #A78BFA); color: #fff; }
.poem-btn-translate { background: rgba(255,214,0,0.12); color: var(--primary); border: 1px solid rgba(255,214,0,0.3); }
.poem-btn-translate.active { background: rgba(255,214,0,0.25); }
.poem-btn-checkin { background: linear-gradient(135deg, #43E97B, #38F9D7); color: #0a0e27; }
.poem-btn-checkin.done { background: rgba(255,255,255,0.1); color: var(--text-muted); border: 1px solid var(--border); }

/* ========== 体育 (v1.2.0) ========== */
.sport-banner {
  background: linear-gradient(135deg, #43E97B, #38F9D7);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 12px 0;
  box-shadow: 0 4px 14px rgba(67,233,123,0.25);
}
.sport-banner-title { font-size: 20px; font-weight: 700; }
.sport-banner-sub { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.sport-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
.sport-option {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.sport-option:active { transform: scale(0.97); }
.sport-option.checked {
  border-color: #43E97B;
  background: linear-gradient(135deg, #43E97B, #38F9D7);
  color: #0a0e27;
}
.sport-option-icon { font-size: 26px; line-height: 1.2; }
.sport-option-name { font-size: 16px; font-weight: 600; margin: 6px 0 2px; }
.sport-option-count { font-size: 12px; color: var(--text-muted); }
.sport-option.checked .sport-option-count { color: rgba(10,14,39,0.7); }
.sport-option-delete {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 16px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  display: none;
}
.sport-option.custom .sport-option-delete { display: block; }
.sport-add-row { display: flex; gap: 8px; margin: 12px 0; }
.sport-add-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text-main);
}
.btn-sm { padding: 10px 16px !important; font-size: 13px !important; white-space: nowrap; }

/* ========== 识字闪卡 (v1.2.1) ========== */
.lit-card-progress { text-align:center; margin:10px 0; }
.lit-card-progress #litCardIndex { font-size:14px; font-weight:700; color:var(--text-sub); }
.lit-card-dots { display:flex; gap:4px; justify-content:center; margin-top:6px; flex-wrap:wrap; }
.lit-dot { width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,0.12); transition:all .2s; cursor:pointer; }
.lit-dot.active { background:var(--primary); transform:scale(1.4); }
.lit-dot.known { background:#43E97B; }
.lit-dot.unknown { background:#FFA726; }

.lit-flashcard {
  background: var(--card-bg);
  border-radius: 20px; padding: 30px 20px; text-align:center;
  margin: 12px 0; min-height: 260px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border: 3px solid transparent; transition: all 0.3s;
  box-shadow: var(--shadow-card);
}
.lit-flashcard.known { border-color:#43E97B; background:linear-gradient(180deg,var(--card-bg),rgba(67,233,123,0.08)); }
.lit-flashcard.unknown { border-color:#FFA726; background:linear-gradient(180deg,var(--card-bg),rgba(255,167,38,0.08)); }
.lit-flash-char { font-size:96px; font-weight:800; line-height:1.1; color:var(--text-main); }
.lit-flash-pinyin { font-size:18px; color:var(--text-sub); margin-top:8px; min-height:22px; letter-spacing:2px; }
.lit-flash-words { font-size:16px; color:var(--text-secondary); margin-top:16px; line-height:1.8; }
.lit-flash-words .word-tag {
  display:inline-block; background:rgba(56,189,248,0.12); border:1px solid rgba(56,189,248,0.25);
  border-radius:6px; padding:3px 10px; margin:2px;
}

.lit-flash-actions { display:flex; gap:12px; margin:14px 0; }
.lit-flash-btn {
  flex:1; border:none; border-radius:14px; padding:16px 0; font-size:16px; font-weight:700;
  cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:4px;
  transition:transform .15s; -webkit-tap-highlight-color: transparent;
}
.lit-flash-btn:active { transform:scale(0.95); }
.lit-flash-btn:disabled { opacity:0.35; }
.lit-btn-unknown { background:linear-gradient(135deg,#FFA726,#FF7043); color:#fff; }
.lit-btn-know { background:linear-gradient(135deg,#43E97B,#38F9D7); color:#0a0e27; }
.lit-btn-icon { font-size:24px; }
.lit-btn-label { font-size:13px; }

.lit-flashcard-wrap { position:relative; margin:12px 0; }
.lit-flashcard-wrap .lit-flashcard { margin:0; }
.lit-nav-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:50%; border:none;
  background:rgba(255,255,255,0.10); color:var(--text-sub); font-size:22px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(4px); -webkit-tap-highlight-color:transparent;
  transition:opacity .2s, transform .15s; z-index:2;
}
.lit-nav-prev { left:6px; }
.lit-nav-next { right:6px; }
.lit-nav-btn:active { transform:translateY(-50%) scale(0.88); }
.lit-nav-btn:disabled { opacity:0; pointer-events:none; }
.lit-nav-hint { font-size:12px; color:var(--text-muted); margin-left:8px; }

/* ===== 数学闪卡 ===== */
.math-card-progress { text-align:center; margin:10px 0; display:flex; align-items:center; justify-content:center; gap:8px; }
.math-card-progress #mathCardIndex { font-size:14px; font-weight:700; color:var(--text-sub); }
.math-type-tag {
  font-size:11px; color:var(--text-muted); background:rgba(56,189,248,0.10);
  border:1px solid rgba(56,189,248,0.25); border-radius:6px; padding:2px 8px;
}
.math-flashcard-wrap { position:relative; margin:12px 0; }
.math-flashcard {
  background:var(--card-bg); border-radius:20px; padding:36px 24px; text-align:center;
  margin:0; min-height:240px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  border:3px solid transparent; transition:all 0.3s; box-shadow:var(--shadow-card);
}
.math-flashcard.known { border-color:#43E97B; background:linear-gradient(180deg,var(--card-bg),rgba(67,233,123,0.08)); }
.math-flashcard.unknown { border-color:#FFA726; background:linear-gradient(180deg,var(--card-bg),rgba(255,167,38,0.08)); }
.math-flash-question {
  font-size:40px; font-weight:800; line-height:1.4; color:var(--text-main);
  word-break:break-all; max-width:100%;
}
.math-flash-answer {
  font-size:30px; font-weight:800; color:#43E97B;
  padding:6px 24px; border-radius:12px; background:rgba(67,233,123,0.10);
}
.math-reveal-btn {
  border:1px dashed var(--border); background:transparent; color:var(--text-sub);
  border-radius:10px; padding:8px 20px; font-size:14px; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.math-reveal-btn:active { transform:scale(0.95); }

/* 英语单元 — 点击发音按钮 (单词大字下方, 圆形 🔊) */
.en-play-btn {
  margin-top: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--accent-blue, #38bdf8); color: #fff;
  font-size: 20px; cursor: pointer; line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.en-play-btn:active { transform: scale(0.92); }

/* 英语单元 — 单词大字: 不换行, 长词动态缩字号 (JS 按 length 设 font-size) */
#enUnitWord {
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 视频对话按钮 */
.en-video-bar {
  padding: 0 16px 12px;
}
.en-video-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.en-video-btn:active {
  transform: scale(0.97);
}
.en-video-icon {
  font-size: 24px;
}
.en-video-text {
  font-size: 15px;
}

/* 视频播放器弹窗 */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.video-modal-content {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}
.video-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
#videoPlayer {
  width: 100%;
  display: block;
  background: #000;
}

.math-nav-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:50%; border:none;
  background:rgba(255,255,255,0.10); color:var(--text-sub); font-size:22px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(4px); -webkit-tap-highlight-color:transparent;
  transition:opacity .2s, transform .15s; z-index:2;
}
.math-nav-prev { left:6px; }
.math-nav-next { right:6px; }
.math-nav-btn:active { transform:translateY(-50%) scale(0.88); }
.math-nav-btn:disabled { opacity:0; pointer-events:none; }
.math-flash-actions { display:flex; gap:12px; margin:14px 0; }
.math-flash-btn {
  flex:1; border:none; border-radius:14px; padding:16px 0; font-size:16px; font-weight:700;
  cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:4px;
  transition:transform .15s, opacity .15s; -webkit-tap-highlight-color:transparent;
}
.math-flash-btn:active { transform:scale(0.95); }
.math-flash-btn:disabled { opacity:0.35; }
.math-btn-unknown { background:linear-gradient(135deg,#FFA726,#FF7043); color:#fff; }
.math-btn-know { background:linear-gradient(135deg,#43E97B,#38F9D7); color:#0a0e27; }
.math-btn-icon { font-size:24px; }
.math-btn-label { font-size:13px; }

/* ========================================
   职场英语年度规划 (En Pro)
   ======================================== */
.ep-subtabs { font-size:13px; }
.ep-subtabs .subtab { padding:7px 0; }

.ep-section-title {
  font-size:15px; font-weight:700; color:var(--primary);
  margin:18px 0 10px; padding-left:4px;
  border-left:3px solid var(--primary); padding-left:8px;
}

/* 六层进度卡 */
.ep-layer-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:12px 14px; margin-bottom:8px;
}
.ep-layer-head { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.ep-layer-icon { font-size:18px; }
.ep-layer-label { flex:1; font-size:14px; color:var(--text-secondary); font-weight:600; }
.ep-layer-count { font-size:13px; color:var(--text-primary); font-weight:700; }

/* 12 月追踪网格 */
.ep-month-grid {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin-bottom:20px;
}
.ep-month-cell {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:10px 4px; text-align:center;
  position:relative; transition:all .2s;
}
.ep-month-cell.done { border-color:var(--success); background:linear-gradient(180deg,var(--bg-card),rgba(16,185,129,0.12)); }
.ep-month-cell.current { border-color:var(--primary); box-shadow:0 0 0 2px var(--primary-dim); }
.ep-month-cell.intensive::after {
  content:'🔥'; position:absolute; top:2px; right:4px; font-size:9px;
}
.ep-month-no { font-size:13px; font-weight:700; color:var(--text-primary); }
.ep-month-pct { font-size:11px; color:var(--text-muted); margin-top:2px; }
.ep-month-cell.done .ep-month-pct { color:var(--success); }

/* 学习/复习 闪卡 */
.ep-selector-row { display:flex; gap:8px; margin-bottom:12px; }
.ep-selector-row select {
  flex:1; background:var(--bg-card); color:var(--text-primary);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:8px 10px; font-size:14px;
}
.ep-card-progress {
  display:flex; justify-content:space-between; align-items:center;
  font-size:13px; color:var(--text-secondary); margin-bottom:8px; font-weight:600;
}
.ep-card-layer { color:var(--accent-blue); }
.ep-checkin-badge {
  margin-left:auto; margin-right:8px;
  font-size:12px; font-weight:600; padding:2px 10px;
  border-radius:20px; background:rgba(148,163,184,0.15); color:var(--text-muted);
  white-space:nowrap;
}
.ep-checkin-badge.checked-today {
  background:rgba(16,185,129,0.15); color:var(--success);
}
html.dark .ep-checkin-badge { background:rgba(148,163,184,0.18); }
html.dark .ep-checkin-badge.checked-today { background:rgba(16,185,129,0.2); }

.ep-flashcard {
  background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:24px 18px; text-align:center; min-height:180px;
  display:flex; flex-direction:column; justify-content:center; gap:8px;
}
.ep-flashcard.known { border-color:var(--success); background:linear-gradient(180deg,var(--bg-elevated),rgba(16,185,129,0.08)); }
.ep-flash-en { font-size:24px; font-weight:700; color:var(--text-primary); line-height:1.3; }
.ep-flash-phonetic { font-size:14px; color:var(--text-muted); font-style:italic; }
.ep-flash-zh { font-size:16px; color:var(--text-secondary); }
.ep-flash-example { font-size:14px; color:var(--accent-blue); margin-top:4px; }
.ep-flash-example-zh { font-size:13px; color:var(--text-muted); }

.ep-flash-actions { display:flex; gap:10px; align-items:center; margin:14px 0; }
.ep-flash-btn {
  flex:1; border:none; border-radius:14px; padding:14px 0; font-size:15px; font-weight:700;
  cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:2px;
  transition:transform .15s; -webkit-tap-highlight-color:transparent;
}
.ep-flash-btn:active { transform:scale(0.95); }
.ep-btn-unknown { background:linear-gradient(135deg,#FFA726,#FF7043); color:#fff; }
.ep-btn-know { background:linear-gradient(135deg,#43E97B,#38F9D7); color:#0a0e27; }
.ep-tts-btn {
  flex:0 0 auto; width:48px; height:48px; border-radius:50%;
  background:var(--bg-elevated); border:1px solid var(--border);
  font-size:20px; display:flex; align-items:center; justify-content:center;
  transition:background .2s, border-color .2s;
}
.ep-tts-btn.playing {
  background:var(--accent-blue); border-color:var(--accent-blue); color:#fff;
  animation:epPulse 1s ease-in-out infinite;
}
/* 英语主页面/单元页播放按钮跟随语速设置时脉冲 */
.btn-icon.audio.playing, .en-play-btn.playing {
  animation:epPulse 1s ease-in-out infinite;
}
/* 卡片内行内小喇叭: 只播单词 / 只播例句 */
.ep-mini-tts {
  display:inline-flex; align-items:center; margin-left:6px; cursor:pointer;
  font-size:14px; opacity:.5; transition:opacity .2s, transform .15s;
  -webkit-tap-highlight-color:transparent; vertical-align:middle;
}
.ep-mini-tts:hover { opacity:1; }
.ep-mini-tts:active { transform:scale(1.2); }
.ep-mini-tts.playing { opacity:1; animation:epPulse 1s ease-in-out infinite; }
@keyframes epPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.12)} }
/* 中文隐藏态: 模糊点击揭示 */
.ep-flash-zh, .ep-flash-example-zh { font-size:14px; line-height:1.5; margin-top:6px; }
.ep-flash-zh { color:var(--text-secondary); }
.ep-flash-example-zh { color:var(--text-tertiary, #888); font-style:italic; }
.ep-flash-zh.hidden-zh, .ep-flash-example-zh.hidden-zh {
  color:transparent; background:var(--bg-elevated); border-radius:6px; cursor:pointer;
  user-select:none; position:relative;
}
.ep-flash-zh.hidden-zh::after, .ep-flash-example-zh.hidden-zh::after {
  content:'🇨🇳 点击「显示中文」'; position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%); color:var(--text-tertiary, #aaa); font-size:12px;
  font-style:normal; white-space:nowrap; pointer-events:none;
}
/* 中文显示切换按钮 */
.ep-zh-toggle {
  margin-left:auto; font-size:11px; padding:3px 10px; border-radius:12px;
  border:1px solid var(--border); background:var(--bg-elevated); color:var(--text-secondary);
  cursor:pointer; white-space:nowrap;
}
.ep-zh-toggle.on { background:var(--accent-blue); color:#fff; border-color:var(--accent-blue); }
/* TTS 设置栏 (语速 + 重复) */
.ep-tts-bar { display:flex; align-items:center; gap:4px; margin:8px 0 4px; flex-wrap:nowrap; overflow:hidden; }
.ep-tts-label { font-size:11px; color:var(--text-muted); flex-shrink:0; }
.ep-tts-sep { flex:0 0 8px; }
.ep-tts-opt {
  font-size:11px; padding:3px 7px; border-radius:12px; border:1px solid var(--border);
  background:var(--bg-elevated); color:var(--text-secondary); cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
  -webkit-tap-highlight-color:transparent; white-space:nowrap; flex-shrink:0;
}
.ep-tts-opt.on { background:var(--accent-blue); color:#fff; border-color:var(--accent-blue); }
.ep-card-nav { display:flex; justify-content:space-between; gap:8px; }
.ep-card-nav .cur-day-btn { flex:1; }

/* 复盘 */
.ep-review-banner {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:12px; text-align:center;
  font-size:14px; font-weight:600; color:var(--accent-blue); margin-bottom:12px;
}
.ep-checkin-card, .ep-recap-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px; margin-bottom:14px;
}
.ep-checkin-date { font-size:14px; font-weight:700; color:var(--primary); margin-bottom:10px; }
.ep-checkin-row { display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.ep-checkin-row label { font-size:13px; color:var(--text-secondary); }
.ep-checkin-row input[type="number"] {
  width:70px; background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:6px 8px; color:var(--text-primary); font-size:14px;
}
.ep-checkin-tasks { display:flex; flex-wrap:wrap; gap:6px; }
.ep-task-chip {
  font-size:12px; background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:var(--radius-pill); padding:4px 10px; color:var(--text-secondary);
  display:inline-flex; align-items:center; gap:4px; cursor:pointer;
}
.ep-task-chip input { width:14px; height:14px; accent-color:var(--primary); }
.ep-recap-row { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-secondary); margin-bottom:8px; flex-wrap:wrap; }
.ep-num-input {
  width:44px; background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:4px 6px; color:var(--text-primary); font-size:14px;
}
.ep-topic-input {
  flex:1; min-width:120px; background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:6px 8px; color:var(--text-primary); font-size:13px;
}
.ep-recap-card textarea {
  width:100%; background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:8px 10px; color:var(--text-primary); font-size:14px;
  font-family:inherit; resize:vertical; margin-bottom:8px;
}
.ep-recorder { text-align:center; }
.ep-rec-btn {
  width:100%; border:none; border-radius:var(--radius); padding:12px;
  font-size:15px; font-weight:700; cursor:pointer; background:var(--accent-pink); color:#fff;
}
.ep-rec-btn.ep-rec-stop { background:var(--danger); }
.ep-rec-item {
  display:flex; align-items:center; gap:8px; background:var(--bg-elevated);
  border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px; margin-top:6px;
}
.ep-rec-info { flex:0 0 auto; min-width:90px; }
.ep-rec-topic { font-size:13px; color:var(--text-primary); font-weight:600; display:block; }
.ep-rec-date { font-size:11px; color:var(--text-muted); }
.ep-empty-mini { font-size:13px; color:var(--text-muted); padding:8px; text-align:center; }

/* Prompt 卡 */
.ep-prompt-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px; margin-bottom:12px;
}
.ep-prompt-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ep-prompt-icon { font-size:18px; }
.ep-prompt-title { font-size:15px; font-weight:700; color:var(--primary); }
.ep-prompt-desc { font-size:13px; color:var(--text-muted); margin-bottom:8px; }
.ep-prompt-body {
  background:var(--bg-primary); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:10px; font-size:12px; color:var(--text-secondary);
  white-space:pre-wrap; word-break:break-word; max-height:160px; overflow-y:auto;
  margin-bottom:8px; font-family:"SF Mono",Consolas,monospace; line-height:1.5;
}
