/* ═══════════════════════════════════════════
   Geek & Hack 成长之路 v3.0 — 炫技主题
   ═══════════════════════════════════════════ */

:root {
  --bg-deep: #060b14;
  --bg-panel: rgba(10, 18, 30, 0.85);
  --bg-glass: rgba(15, 25, 45, 0.6);
  --border-glass: rgba(0, 212, 255, 0.15);
  --border-control: rgba(0, 212, 255, 0.3);
  --control-bg: rgba(0, 212, 255, 0.15);
  --control-bg-hover: rgba(0, 212, 255, 0.25);
  --control-border: rgba(255, 255, 255, 0.15);
  --accent: #00d4ff;
  --accent-cyan: #00d4ff;
  --accent2: #00ff88;
  --accent-success: #00ff88;
  --accent3: #aa44ff;
  --accent-warn: #ff6600;
  --accent-pink: #ff3366;
  --accent-danger: #ff3366;
  --text-primary: #e8ecf1;
  --text-secondary: #8899aa;
  --text-dim: #556677;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --space-section: 2rem;
  --card-padding: 1.1rem;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  color-scheme: dark;
  scrollbar-color: rgba(0, 212, 255, 0.45) rgba(6, 11, 20, 0.8);
  scrollbar-width: thin;
}
body::-webkit-scrollbar { width: 7px; height: 7px; }
body::-webkit-scrollbar-track { background: rgba(6, 11, 20, 0.8); }
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.58), rgba(0, 255, 136, 0.42));
  border: 1px solid rgba(6, 11, 20, 0.75);
  border-radius: 999px;
}
body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent), var(--accent2)); }
body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh; /* 手机地址栏收起/弹出时不跳动 */
}

/* Background ambient effect */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,212,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(170,68,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(0,255,136,0.02) 0%, transparent 70%);
}

/* ═══ SPLASH 密码门样式已迁移: 见 index.html 内联关键 CSS + css/journal.css ═══ */

/* ═══════════════════════════════ LOADER ═══════════════════════════════ */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.5rem;
  transition: opacity 0.4s;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid rgba(0,212,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 20px rgba(0,212,255,0.3);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════ TOPBAR ═══════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 56px;
  background: rgba(6, 11, 20, 0.9);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
}
.topbar-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1rem;
}
.brand-icon {
  font-size: 1.2rem; color: var(--accent2);
  animation: pulse-glow 3s ease infinite;
}
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 10px rgba(0,255,136,0.3); }
  50% { text-shadow: 0 0 25px rgba(0,255,136,0.6); }
}
.brand-text { letter-spacing: 0.05em; }

.topbar-nav { display: flex; gap: 0.25rem; }
.nav-item {
  padding: 0.4rem 0.9rem; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  transition: var(--transition); position: relative;
}
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-item.active {
  color: var(--accent);
  background: linear-gradient(135deg, rgba(0,212,255,0.16), rgba(0,255,136,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.nav-item.active::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(0,212,255,0.5);
}

.topbar-right { display: flex; align-items: center; gap: 0.8rem; }
.topbar-streak {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent-warn); font-weight: 600;
}
.topbar-progress { display: flex; align-items: center; gap: 0.4rem; }
.mini-bar {
  width: 60px; height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.mini-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px; transition: width 180ms ease;
  box-shadow: 0 0 8px rgba(0,212,255,0.4);
}
.mini-pct { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.topbar-lock {
  background: none; border: 1px solid var(--border-glass);
  border-radius: 6px; padding: 0.3rem 0.6rem;
  font-size: 0.9rem; cursor: pointer;
  transition: var(--transition);
}
.topbar-lock:hover { border-color: var(--accent); }

/* ═══════════════════ MAIN LAYOUT ═══════════════════ */
.main-content {
  max-width: 1400px; margin: 0 auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: var(--space-section);
}

/* ═══════════════════ SECTION 1: MISSION ═══════════════════ */
.section-mission { scroll-margin-top: 70px; }
.mission-glass {
  display: grid; grid-template-columns: 1fr 260px; gap: 1.5rem;
}
.mission-left, .mission-right { display: flex; flex-direction: column; gap: 0.8rem; }

/* Glass card */
.glass-card {
  background: linear-gradient(var(--bg-glass), var(--bg-glass)) padding-box,
    linear-gradient(120deg, rgba(255,255,255,0.22), var(--border-glass) 42%, rgba(0,255,136,0.12)) border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid transparent;
  border-radius: 13px;
  padding: var(--card-padding);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 12px 32px rgba(0,0,0,0.24), 0 0 24px rgba(0,212,255,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

/* Mission header */
.mission-header {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.mission-badge {
  display: inline-flex; align-self: flex-start;
  padding: 0.3rem 0.8rem; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  background: rgba(0,212,255,0.1); color: var(--accent);
  border: 1px solid rgba(0,212,255,0.2);
}
.pulse-glow {
  animation: pulse-glow 2s ease infinite;
}
.mission-day-info {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem;
}
.mission-stage-icon { font-size: 1.2rem; }
.mission-module-name { font-weight: 700; }
.mission-day-num {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-dim);
}

/* Quote block — subtle background, less visual weight */
.mission-quote-block {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
}
.quote-text {
  font-style: italic; color: var(--text-secondary);
  font-size: 0.85rem; margin-bottom: 0.3rem;
}
.quote-author {
  font-size: 0.75rem; color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Task panel — emphasized as main card */
.mission-task-panel {
  padding: 1.25rem;
  border-color: rgba(0,212,255,0.28);
  background: rgba(12,24,42,0.78);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  border: 1px solid var(--border-glass);
  padding: 1rem;
  min-height: 120px;
}
.task-tier-tabs {
  display: flex; gap: 0.3rem; margin-bottom: 0.8rem;
}
.task-tier-tab {
  flex: 1; padding: 0.4rem; border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: transparent; color: var(--text-dim);
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-align: center;
}
.task-tier-tab.active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(0,212,255,0.08);
  box-shadow: 0 0 12px rgba(0,212,255,0.15);
}
.task-tier-tab.done {
  border-color: var(--accent2); color: var(--accent2);
  background: rgba(0,255,136,0.06);
}
.task-check {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
}
.task-check:last-child { border-bottom: none; }
.task-check input[type="checkbox"] { display: none; }
.task-check-mark {
  width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid var(--border-glass);
  flex-shrink: 0; margin-top: 2px;
  transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.task-check.done .task-check-mark {
  border-color: var(--accent2); background: rgba(0,255,136,0.15);
  box-shadow: 0 0 10px rgba(0,255,136,0.2);
}
.task-check.done .task-check-mark::after {
  content: '✓'; color: var(--accent2); font-size: 0.7rem; font-weight: 700;
}
.task-check-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.task-check.done .task-check-text { color: var(--text-dim); text-decoration: line-through; }
.task-check-note {
  margin-left: auto; padding: 2px 6px; border-radius: 4px;
  font-size: 0.7rem; color: var(--text-dim); cursor: pointer;
  opacity: 0; transition: var(--transition);
}
.task-check:hover .task-check-note { opacity: 1; }

/* Mission actions */
.mission-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.mission-actions .btn-icon {
  width: 38px; height: 38px; padding: 0;
  border-radius: 8px; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid; background: transparent;
  cursor: pointer; transition: all 0.2s;
  position: relative;
}
.mission-actions .btn-icon:hover {
  transform: translateY(-1px);
  filter: brightness(1.3);
  box-shadow: 0 0 8px currentColor;
}
.mission-actions .btn-icon::after {
  content: attr(data-tip);
  position: absolute; bottom: -18px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem; white-space: nowrap;
  color: var(--text-dim); opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.mission-actions .btn-icon:hover::after {
  opacity: 0.8;
}
.mission-actions .action-sep {
  width: 1px; height: 24px;
  background: rgba(255,255,255,0.08);
  margin: 0 0.2rem;
  align-self: center;
}

/* Buttons */
.btn-neon {
  padding: 0.6rem 1.5rem; border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(0,212,255,0.1); color: var(--accent);
  font-weight: 700; font-size: 0.85rem; cursor: pointer;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.btn-neon:hover:not(:disabled) {
  background: rgba(0,212,255,0.2);
  box-shadow: 0 0 28px rgba(0,212,255,0.38), 0 0 8px rgba(0,255,136,0.14), inset 0 0 15px rgba(0,212,255,0.05);
  transform: translateY(-1px);
}
.btn-neon:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-neon::after {
  content: '';
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(0,212,255,0.2) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-neon:hover:not(:disabled)::after { opacity: 1; }

.btn-glass {
  padding: 0.6rem 1.2rem; border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass); color: var(--text-secondary);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  transition: var(--transition);
}
.btn-glass:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

/* Stat cards */
.stat-card {
  text-align: center; padding: 0.8rem;
  position: relative; overflow: hidden;
}
.stat-card-icon { font-size: 1.3rem; margin-bottom: 0.2rem; opacity: 0.75; }
.stat-card-value {
  font-family: var(--font-mono); font-size: 1.3rem;
  font-weight: 700; color: var(--accent);
  text-shadow: 0 0 15px rgba(0,212,255,0.3);
  transition: var(--transition);
  position: relative; z-index: 1;
}
.stat-card-label {
  font-size: 0.7rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem;
  position: relative; z-index: 1;
}
/* Mini ring SVG for time stat */
.stat-ring-svg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px; z-index: 0;
  opacity: 0.35;
}

/* ═══════════════════════════════ SECTION 2: DASHBOARD ═══════════════════ */
.section-dashboard {
  scroll-margin-top: 70px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-tabs {
  display: flex; border-bottom: 1px solid var(--border-glass);
  background: rgba(0,0,0,0.2);
}
.dash-tab {
  flex: 1; padding: 0.7rem; border: none; background: transparent;
  color: var(--text-dim); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  position: relative;
}
.dash-tab:hover { color: var(--text-secondary); }
.dash-tab.active {
  color: var(--accent);
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(0,255,136,0.04));
}
.dash-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 2px; background: var(--accent);
  box-shadow: 0 0 10px rgba(0,212,255,0.5);
}
.dash-content { padding: 1rem; min-height: 200px; }
.dash-pane { display: none; }
.dash-pane.active { display: block; animation: fadeSlideIn 0.3s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════ SECTION 3: PATH ═══════════════════════ */
.section-path { scroll-margin-top: 70px; }
.path-header { text-align: center; margin-bottom: 1.5rem; }
.section-title-glow {
  font-size: 1.5rem; font-weight: 800; line-height: 1.25;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none;
  margin-bottom: 0.3rem;
}
.section-subtitle {
  font-size: 0.85rem; color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Stage cards */
.stages-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem; margin-bottom: 1.5rem;
}
.stage-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1rem; cursor: pointer;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stage-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0; transition: var(--transition);
}
.stage-card:hover::before { opacity: 1; }
.stage-card:hover {
  border-color: rgba(0,212,255,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.stage-number {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-dim); letter-spacing: 0.15em;
}
.stage-title { font-size: 1rem; font-weight: 750; line-height: 1.35; margin: 0.3rem 0; }
.stage-meta {
  font-size: 0.7rem; color: var(--text-dim);
  display: flex; gap: 0.8rem; margin-top: 0.5rem;
}
.stage-progress-mini {
  height: 4px; background: rgba(255,255,255,0.05);
  border-radius: 2px; margin-top: 0.5rem; overflow: hidden;
}
.stage-progress-fill {
  height: 100%; border-radius: 999px;
  background-image: linear-gradient(90deg, var(--accent), var(--accent2)) !important;
  transition: width 180ms ease;
}
.progress-scope-label { color: var(--text-dim); font-size: .72rem; letter-spacing: .08em; }
.stage-card.is-collapsed { opacity: .78; }
.stage-module-section { grid-column: 1 / -1; margin-bottom: .8rem; }
.stage-module-summary { color: var(--text-dim); font-size: .72rem; margin: .4rem 0; }
.stage-modules-collapsed > :not(.stage-module-summary) { display: none; }

/* Module grid */
.modules-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.8rem;
}
.module-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1rem;
  transition: var(--transition);
}
.module-card:hover {
  border-color: rgba(0,212,255,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.module-card-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 0.5rem;
}
.module-title { font-weight: 700; font-size: 0.95rem; line-height: 1.35; }
.module-pct {
  font-family: var(--font-mono); font-size: 0.85rem;
  font-weight: 700; color: var(--accent);
}
.module-desc { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.module-skills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.module-skill {
  font-size: 0.65rem; padding: 2px 8px;
  border-radius: 10px; background: rgba(0,212,255,0.08);
  color: var(--accent); font-family: var(--font-mono);
}
.module-progress-mini {
  height: 3px; background: rgba(255,255,255,0.05);
  border-radius: 2px; overflow: hidden;
}
.module-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px; transition: width 180ms ease;
}

/* Career badges on module cards */
.career-badge {
  font-size: 0.65rem; padding: 1px 6px; border-radius: 10px;
  font-weight: 600; white-space: nowrap; margin-left: 0.3rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 2px 5px rgba(0,0,0,0.18);
}
.career-badge.core { background: rgba(0,212,255,0.15); color: var(--accent-cyan); }
.career-badge.skip { background: rgba(255,255,255,0.05); color: var(--text-dim); }
.career-badge.optional { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.career-badge.weak { background: rgba(255,70,70,0.2); color: #ff6666; }
.module-weak { border: 1px solid rgba(255,70,70,0.4) !important; }
.module-weak:hover { border-color: rgba(255,70,70,0.6) !important; box-shadow: 0 0 12px rgba(255,70,70,0.15) !important; }
.module-skipped { opacity: 0.4; border-left: 2px solid var(--text-dim); }
.module-priority { border-left: 2px solid var(--accent-cyan); }
.module-completed { border-color: rgba(255,200,50,.35); }

/* ═══ Dopamine animations ═══ */
@keyframes taskPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes tierGlow {
  0% { box-shadow: 0 0 0 rgba(0,255,136,0); }
  50% { box-shadow: 0 0 20px rgba(0,255,136,0.6); }
  100% { box-shadow: 0 0 0 rgba(0,255,136,0); }
}
@keyframes streakPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--accent-warn); }
}
@keyframes progressGlow {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}
@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.task-check.done {
  animation: taskPop 0.3s ease;
}
.task-tier-tab.done {
  animation: tierGlow 0.6s ease;
}
.topbar-streak.pulse {
  animation: streakPulse 0.5s ease;
}
#topbar-fill.glow {
  animation: progressGlow 0.5s ease;
}
.module-daily-list {
  animation: slideInRight 0.3s ease;
}

/* ═══ Module expansion ═══ */
.module-card.expanded {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0,212,255,0.15);
}
.module-daily-list {
  margin-top: 0.5rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border-glass);
}
.module-daily-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0; font-size: 0.78rem;
}
.module-daily-check {
  width: 16px; height: 16px; border-radius: 3px;
  border: 1px solid var(--text-dim); flex-shrink: 0;
  position: relative;
}
.module-daily-check.done {
  background: var(--accent2); border-color: var(--accent2);
}
.module-daily-check.done::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #000; font-weight: 700;
}

/* ═══ Streak freeze badge ═══ */
.streak-freeze-badge {
  display: inline-block; font-size: 0.65rem;
  background: rgba(0,180,255,0.15); color: var(--accent-cyan);
  padding: 1px 6px; border-radius: 10px; margin-left: 0.3rem;
}

/* ═══ Mini calendar ═══ */
.mini-calendar {
  display: flex; gap: 4px; justify-content: center;
  margin-top: 0.8rem;
}
.mini-cal-day {
  width: 28px; height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 600;
  background: rgba(255,255,255,0.03);
}
.mini-cal-day.done {
  background: var(--accent2); color: #000;
}
.mini-cal-day.today {
  border: 1px solid var(--accent);
}
.mini-cal-day.frozen {
  background: rgba(0,180,255,0.2); color: var(--accent-cyan);
}

/* ═══ Crit flash ═══ */
@keyframes critFlash {
  0% { filter: brightness(1); }
  25% { filter: brightness(2) hue-rotate(30deg); }
  50% { filter: brightness(1.5) hue-rotate(-30deg); }
  75% { filter: brightness(2) hue-rotate(15deg); }
  100% { filter: brightness(1); }
}
.crit-flash {
  animation: critFlash 1s ease;
}
.onboarding-careers {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0.8rem 0;
}
.onboarding-career-opt {
  padding: 0.4rem 0.8rem; border-radius: 8px;
  border: 1px solid var(--border-glass);
  cursor: pointer; font-size: 0.78rem;
  transition: all 0.2s;
}
.onboarding-career-opt:hover, .onboarding-career-opt.selected {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.1);
}

/* Career card (used by CareerSelector) */
.career-card {
  background: var(--bg-deep);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 1rem;
  transition: all 0.2s ease;
}
.career-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,212,255,0.1);
}
.career-card.active {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 20px rgba(0,212,255,0.2) !important;
  background: rgba(0,212,255,0.05);
}

/* ═══ Character select (career picker) ═══ */
.char-select-container {
  max-width: 700px; width: 95vw; margin: auto; /* margin:auto → 矮时居中, 超高时顶部对齐可滚动 */
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
.char-select-title {
  text-align: center; font-size: 1.6rem; font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 0.2rem;
}
.char-select-subtitle {
  text-align: center; font-size: 0.78rem; color: var(--text-dim);
  margin-bottom: 1.5rem;
}
.char-select-main {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem;
}
.char-arrow {
  flex-shrink: 0; cursor: pointer; padding: 0.5rem;
  border-radius: 12px; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center;
  min-width: 60px;
}
.char-arrow:hover {
  background: rgba(0,212,255,0.08);
}
.char-arrow-icon {
  font-size: 1.2rem; color: var(--accent-cyan);
}
.char-preview-mini {
  text-align: center; margin-top: 0.3rem;
}
.char-preview-icon { font-size: 1.2rem; }
.char-preview-name {
  font-size: 0.55rem; color: var(--text-dim); margin-top: 2px;
  max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.char-center-card {
  flex: 1; background: var(--bg-deep);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 16px; padding: 1.2rem 1.5rem;
  box-shadow: 0 0 30px rgba(0,212,255,0.06);
}
.char-header {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem;
}
.char-big-icon { font-size: 2.8rem; flex-shrink: 0; }
.char-name-block { flex: 1; }
.char-name { font-size: 1.2rem; font-weight: 800; }
.char-tagline { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.2rem; }
.char-stats-row {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem;
}
.char-stat-item {
  flex: 1; min-width: 60px; text-align: center;
  padding: 0.4rem 0.3rem; background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.char-stat-label {
  font-size: 0.6rem; color: var(--text-dim); display: block; margin-bottom: 2px;
}
.char-stat-value {
  font-size: 0.72rem; font-weight: 600; color: var(--accent-cyan);
}
.char-desc {
  font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 0.6rem;
}
.char-ai-impact {
  font-size: 0.7rem; color: var(--text-dim);
  padding: 0.4rem 0.6rem; background: rgba(255,255,255,0.02);
  border-radius: 6px; margin-bottom: 0.5rem;
}
.char-certs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.char-certs-label { font-size: 0.65rem; color: var(--text-dim); }
.char-cert-tag {
  font-size: 0.6rem; padding: 1px 8px; border-radius: 8px;
  background: rgba(0,212,255,0.08); color: var(--accent-cyan);
}
.char-dots-row {
  display: flex; justify-content: center; gap: 0.4rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.char-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.03);
  transition: all 0.2s;
}
.char-dot:hover {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.08);
}
.char-dot.active {
  border-color: var(--accent2);
  background: rgba(0,255,136,0.1);
  transform: scale(1.1);
}
.char-confirm-wrap { text-align: center; }
.char-confirm-btn { font-size: 1rem; padding: 0.7rem 2.5rem; }
@media (max-width: 500px) {
  .char-select-main { flex-direction: column; }
  .char-arrow { flex-direction: row; gap: 0.5rem; min-width: auto; padding: 0.3rem 0.8rem; }
  .char-arrow-left { order: 2; }
  .char-arrow-right { order: 2; }
  .char-center-card { order: 1; }
  .char-big-icon { font-size: 2rem; }
}

/* ═══════════════════════════════ SECTION 4: TOOLBOX ═══════════════════ */
.section-toolbox { scroll-margin-top: 70px; }
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem; margin-bottom: 1rem;
}
.tool-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1rem; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.tool-card:hover {
  border-color: rgba(0,212,255,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.tool-card.active {
  border-color: var(--accent);
  background: rgba(0,212,255,0.08);
  box-shadow: 0 0 25px rgba(0,212,255,0.1);
}
.tool-icon { font-size: 1.6rem; margin-bottom: 0.3rem; }
.tool-name { font-weight: 700; font-size: 0.85rem; }
.tool-desc { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.2rem; }

.toolbox-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1rem;
  display: none;
  animation: fadeSlideIn 0.3s ease;
}
.toolbox-panel.open { display: block; }

/* ═══════════════════════════════ FOOTER ═══════════════════════════════ */
.footer-mini {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: 1rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-dim); border-top: 1px solid var(--border-glass);
}
.footer-sync-btn {
  background: none; border: 1px solid var(--border-glass);
  border-radius: 6px; padding: 0.3rem 0.8rem;
  color: var(--accent2); font-size: 0.75rem;
  cursor: pointer; transition: var(--transition);
}
.footer-sync-btn:hover {
  border-color: var(--accent2);
  box-shadow: 0 0 15px rgba(0,255,136,0.15);
}

/* ═══════════════════════════════ MODALS ═══════════════════════════════ */
.modal-glass {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(6,11,20,0.78); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 1rem;
}
.modal-inner {
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  border-radius: 13px;
  padding: 2rem; width: 380px; max-width: 90vw;
  max-height: calc(100dvh - 2rem); overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-inner h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.modal-inner input {
  width: 100%; padding: 0.6rem 1rem; border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--bg-deep); color: var(--text-primary);
  font-size: 0.9rem; margin-bottom: 0.8rem;
  transition: var(--transition);
}
.modal-inner input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0,212,255,0.15);
}
.modal-error {
  color: var(--accent-pink); font-size: 0.8rem;
  min-height: 1.2rem; margin-bottom: 0.5rem;
}
.modal-btns { display: flex; gap: 0.5rem; justify-content: center; }
.domain-progress { color: var(--accent-cyan); font-size: 0.85rem; min-height: 1.3rem; margin: 0.2rem 0 0.4rem; }
.domain-modal-inner { text-align: left; }
.domain-modal-inner h3 { text-align: center; }
.domain-modal-inner { width:min(760px,94vw); max-height:90vh; overflow:auto; }
.domain-modal-inner input,.domain-modal-inner textarea,.domain-modal-inner select { width:100%; box-sizing:border-box; padding:.62rem .7rem; color:var(--text); background:var(--bg-deep); border:1px solid var(--border-control); border-radius:8px; }
.domain-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; }
.domain-outline { margin-top:.7rem; padding:.8rem; border:1px solid var(--border-control); border-radius:10px; background:rgba(0,0,0,.14); }
.domain-outline-head { display:flex; justify-content:space-between; gap:1rem; margin-bottom:.6rem; }
.domain-outline-head span { color:var(--text-dim); font-size:.75rem; }
.domain-outline-stage { margin-top:.75rem; }
.domain-outline-stage-title { color:var(--accent-cyan); font-size:.8rem; margin-bottom:.35rem; }
.domain-outline-module { display:grid; grid-template-columns:minmax(0,2fr) 85px minmax(0,2fr) auto; gap:.4rem; align-items:center; margin:.35rem 0; }
.domain-outline-module button { min-width:2rem; padding:.45rem; }
@media (max-width:600px) { .domain-form-grid,.domain-outline-module { grid-template-columns:1fr; } .domain-outline-head { flex-direction:column; } }
.note-textarea {
  width: 100%; padding: 0.6rem; border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--bg-deep); color: var(--text-primary);
  font-size: 0.85rem; resize: vertical; margin-bottom: 0.5rem;
}

/* ═══════════════════════════════ AI FLOAT ═══════════════════════════════ */
.ai-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9998;
}
.ai-float-btn {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid var(--accent3);
  background: rgba(170,68,255,0.2);
  font-size: 1.3rem; cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(170,68,255,0.2);
}
.ai-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(170,68,255,0.4);
}
.ai-chat-panel {
  position: absolute; bottom: 60px; right: 0;
  width: 340px; height: 420px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ai-chat-header {
  display: flex; justify-content: space-between;
  align-items: center; padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-glass);
  font-weight: 700; font-size: 0.85rem;
}
.ai-chat-close {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 1rem;
}
.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 0.8rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.ai-chat-msg {
  padding: 0.5rem 0.8rem; border-radius: 8px;
  font-size: 0.8rem; max-width: 85%; line-height: 1.5;
}
.ai-chat-msg.user {
  align-self: flex-end;
  background: rgba(0,212,255,0.1); color: var(--text-primary);
}
.ai-chat-msg.assistant {
  align-self: flex-start;
  background: var(--bg-glass); color: var(--text-secondary);
}
.ai-chat-input {
  display: flex; padding: 0.6rem; border-top: 1px solid var(--border-glass);
}
.ai-chat-input input {
  flex: 1; padding: 0.5rem 0.8rem; border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: var(--bg-deep); color: var(--text-primary);
  font-size: 0.8rem;
}
.ai-chat-input input:focus {
  outline: none; border-color: var(--accent3);
}
.ai-chat-input button {
  padding: 0.5rem 0.8rem; border-radius: 6px;
  border: 1px solid var(--accent3);
  background: rgba(170,68,255,0.2);
  color: var(--accent3); cursor: pointer; margin-left: 0.4rem;
  font-weight: 700;
}

/* ═══════════════════════════════ RESPONSIVE ═══════════════════════════════ */
@media (max-width: 768px) {
  /* Layout */
  .main-content { padding: 0.8rem; gap: 1.2rem; }
  
  /* Topbar */
  .topbar { padding: 0 0.6rem; height: 48px; }
  .brand-text { display: none; }
  .topbar-nav { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-item { padding: 0.3rem 0.45rem; font-size: 0.65rem; white-space: nowrap; }
  .topbar-progress { display: none; }
  .topbar-streak { font-size: 0.65rem; }
  .topbar-right { gap: 0.3rem; }
  .topbar-career-avatar { width: 26px; height: 26px; font-size: 0.8rem; }
  .topbar-lock { padding: 0.25rem 0.45rem; font-size: 0.8rem; }
  
  /* Mission */
  .mission-glass { grid-template-columns: 1fr; gap: 0.8rem; }
  .mission-right { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
  .stat-card { flex: 1 1 calc(50% - 0.25rem); min-width: 70px; padding: 0.5rem; }
  .stat-card-value { font-size: 1rem; }
  .stat-card-label { font-size: 0.6rem; }
  .mission-actions .btn-neon, .btn-glass { width: 100%; text-align: center; }
  
  /* Dashboard */
  .dash-tab { font-size: 0.7rem; padding: 0.5rem 0.3rem; }
  .dash-content { padding: 0.6rem; }
  
  /* Path */
  .stages-container { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stage-card { padding: 0.7rem; }
  .modules-container { grid-template-columns: 1fr; gap: 0.5rem; }
  
  /* Toolbox */
  .toolbox-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .tool-card { padding: 0.7rem; }
  
  /* Footer */
  .footer-mini { flex-direction: column; gap: 0.5rem; font-size: 0.7rem; padding: 0.8rem; }
  
  /* AI Float */
  .ai-float { bottom: 0.8rem; right: 0.8rem; bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px)); }
  .ai-float-btn { width: 44px; height: 44px; font-size: 1.1rem; }
  .ai-chat-panel { 
    position: fixed; bottom: 0; left: 0; right: 0; 
    width: 100%; height: 60vh; border-radius: 16px 16px 0 0;
  }
  
  /* Modals */
  .modal-inner { width: 95vw; padding: 1.2rem; }
  .verify-box { width: 95vw; max-width: none; padding: 1rem; }
  
  /* Onboarding */
  .onboarding-card { padding: 1.5rem; }
}

/* Small phones */
@media (max-width: 400px) {
  .stages-container { grid-template-columns: 1fr; }
  .toolbox-grid { grid-template-columns: 1fr 1fr; }
  .nav-item { font-size: 0.6rem; padding: 0.25rem 0.35rem; }
  .mission-badge { font-size: 0.6rem; }
  .section-title-glow { font-size: 1.1rem; }
  .path-header { margin-bottom: 0.8rem; }

  /* 极窄屏隐藏低价值顶栏元素 */
  .topbar-streak { display: none; }
  .topbar-career-avatar { display: none; }
}

/* 触控设备: 禁用 hover 放大, 避免点按闪烁 */
@media (hover: none) and (pointer: coarse) {
  .tool-card:hover, .stage-card:hover, .nav-item:hover, .stat-card:hover, .btn-neon:hover:not(:disabled) {
    transform: none;
  }
  .topbar-icon-btn:hover, #sfx-toggle:hover, #tts-toggle:hover { background: none; }
}

/* Accessibility and responsive fixes */
:root { --text-dim: var(--text-secondary); }
button, select, [role="button"] { min-width: 44px; min-height: 44px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.task-check-note { min-width: 44px; min-height: 44px; }
.mission-actions .btn-icon { width: 44px; height: 44px; }
@media (hover: none), (pointer: coarse) { .task-check-note { opacity: 1; } }
.modal-glass { overflow: auto; padding: 1rem; }
.modal-inner { max-height: calc(100dvh - 2rem); overflow: auto; }
.domain-modal-inner label { display: block; margin: .35rem 0 .2rem; color: var(--text-secondary); font-size: .8rem; }
.completion-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.25rem; }
.topbar-icon-btn, #sfx-toggle, #tts-toggle { min-width: 44px; min-height: 44px; }
.topbar-career-avatar { width: 44px; height: 44px; }
.topbar-more-btn { display: none; border: 1px solid var(--border-glass); color: var(--text-primary); background: var(--bg-panel); border-radius: 8px; padding: 0 .7rem; }
.topbar-more-menu { display: contents; }
.domain-control select { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.completion-overlay { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.85); backdrop-filter: blur(8px); }
.completion-dialog { position: relative; max-width: 560px; max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 2rem; text-align: center; background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: var(--radius); }
.completion-close { position: absolute; top: .5rem; right: .5rem; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; }
@media (min-width: 1400px) { .section-mission, .section-path { max-width: 1400px; width: 100%; margin-inline: auto; } }
@media (max-width: 768px) {
  .topbar-right { min-width: 0; }
  .topbar-more-btn { display: inline-flex; align-items: center; justify-content: center; }
  .topbar-more-menu { display: none; position: absolute; top: 48px; right: .5rem; z-index: 1000; padding: .35rem; gap: .25rem; background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
  .topbar-more-menu.is-open { display: flex; flex-wrap: wrap; }
  .topbar-more-menu .domain-control { display: flex !important; flex-basis: 100%; padding: .35rem; }
  .topbar-more-menu .domain-control select { max-width: 12rem; }
  .topbar-career-avatar { display: flex; }
}

/* ═══════════════════════════════ ONBOARDING ═══════════════════════════════ */
.onboarding-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(6,11,20,0.9); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; /* 内容超高时允许滚动, 防止按钮被裁 */
  -webkit-overflow-scrolling: touch;
}
.onboarding-card {
  background: var(--bg-panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem; max-width: 420px; width: 90%; text-align: center;
  box-shadow: 0 0 50px rgba(0,212,255,0.15);
  animation: modalIn 0.4s ease;
}
.onboarding-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--accent); }
.onboarding-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; margin-bottom: 1.2rem; }
.onboarding-steps { display: flex; gap: 0.4rem; justify-content: center; margin-bottom: 1rem; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-glass); transition: var(--transition); }
.onboarding-dot.active { background: var(--accent); box-shadow: 0 0 8px rgba(0,212,255,0.5); }
.onboarding-btns { display: flex; gap: 0.5rem; justify-content: center; }

/* ═══════════════════════════════ LEGACY RETENTION ═══════════════════════ */
/* Keep critical old class names for JS compatibility */
.onboarding-overlay { display: flex; }
.verify-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(6,11,20,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 1rem;
}
.verify-box {
  background: var(--bg-panel); border: 1px solid var(--border-glass);
  border-radius: var(--radius); padding: 1.5rem;
  width: 480px; max-width: 90vw; max-height: calc(100dvh - 2rem); overflow-y: auto;
  animation: modalIn 0.3s ease;
}
.verify-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.verify-title { font-weight: 700; font-size: 1rem; }
.verify-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.8rem; }
.verify-items { display: flex; flex-direction: column; gap: 0.6rem; }
.verify-item { background: var(--bg-deep); border-radius: 8px; padding: 0.8rem; }
.verify-criterion { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; }
.verify-answer {
  width: 100%; padding: 0.5rem; border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: var(--bg-deep); color: var(--text-primary);
  font-size: 0.82rem; resize: vertical;
}
.verify-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.verify-btn {
  padding: 0.5rem 1.2rem; border-radius: 6px; font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.verify-confirm { background: var(--accent); border: none; color: #000; }
.verify-cancel { background: transparent; border: 1px solid var(--border-glass); color: var(--text-dim); }
.verify-error { color: var(--accent-pink); font-size: 0.8rem; }
.verify-answer-status { font-size: 0.7rem; margin-top: 0.2rem; }
.verify-answer-status.ok { color: var(--accent2); }

/* Certificate */
.certificate-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(6,11,20,0.9); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
}
.certificate-modal {
  background: var(--bg-panel);
  border: 2px solid var(--accent2);
  border-radius: var(--radius);
  padding: 2.5rem; text-align: center;
  max-width: 500px; width: 90%;
  box-shadow: 0 0 60px rgba(0,255,136,0.2);
  animation: certSlideIn 0.4s ease;
}
@keyframes certSlideIn {
  from { transform: rotateX(15deg) translateY(30px); opacity: 0; }
  to { transform: rotateX(0) translateY(0); opacity: 1; }
}

/* Notification */
.geek-notification {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999;
  background: var(--bg-panel); border: 1px solid var(--accent);
  border-radius: 8px; padding: 0.6rem 1.5rem;
  font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 0 30px rgba(0,212,255,0.2);
}
.geek-achievement-popup {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  background: var(--bg-panel); border: 2px solid var(--accent2);
  border-radius: var(--radius); padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 0 40px rgba(0,255,136,0.3);
}

/* Misc retained */
.locked .task-check, .locked .btn-neon, .locked .task-tier-tab { pointer-events: none; opacity: 0.5; }
.locked .ai-float-btn { pointer-events: none; opacity: 0.3; }
.modal-glass .btn-neon, .modal-glass .btn-glass { pointer-events: auto !important; opacity: 1 !important; }
.onboarding-card .btn-neon, .onboarding-card .btn-glass { pointer-events: auto !important; opacity: 1 !important; }
.nav-badge {
  background: var(--accent-pink); color: #fff;
  border-radius: 10px; padding: 1px 6px; font-size: 0.6rem;
  font-weight: 700; margin-left: 3px;
}

/* Mission extras */
.extra-card {
  padding: 0.6rem 0.8rem; border-radius: 10px;
  transition: all 0.2s;
}
.extra-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}
.extra-label {
  font-size: 0.7rem; font-weight: 600; color: var(--text-dim); margin-bottom: 0.3rem;
}
.extra-content {
  font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4;
}
.mission-extras { margin-top: 1rem; }

@keyframes briefingScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.briefing-track {
  display: flex; flex-direction: column;
}

/* ═══ Pomodoro alarm clock ═══ */
@keyframes pomoPopIn {
  0% { transform: scale(0.1) rotate(-15deg); opacity: 0; filter: blur(10px); }
  40% { transform: scale(1.12) rotate(3deg); opacity: 1; filter: blur(0); }
  55% { transform: scale(0.93) rotate(-1deg); }
  70% { transform: scale(1.04) rotate(0.5deg); }
  85% { transform: scale(0.98) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; filter: blur(0); }
}
@keyframes pomoPopOut {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.08); opacity: 0.8; }
  100% { transform: scale(0.1) rotate(10deg); opacity: 0; filter: blur(8px); }
}
@keyframes pomoBellShake {
  0%,100% { transform: translateX(-50%) rotate(0); }
  25% { transform: translateX(-50%) rotate(-8deg); }
  75% { transform: translateX(-50%) rotate(8deg); }
}
@keyframes pomoFaceGlow {
  0%,100% { box-shadow: 0 0 50px rgba(0,0,0,0.5), inset 0 0 40px rgba(0,0,0,0.3), 0 0 30px var(--pomo-accent, var(--accent)); }
  50% { box-shadow: 0 0 50px rgba(0,0,0,0.5), inset 0 0 40px rgba(0,0,0,0.3), 0 0 50px var(--pomo-accent, var(--accent)), 0 0 80px rgba(0,212,255,0.15); }
}
@keyframes pomoRingExpand {
  0% { transform: scale(0); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}
@keyframes pomoFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes pomoBgIn {
  0% { background: rgba(6,11,20,0); backdrop-filter: blur(0); }
  100% { background: rgba(6,11,20,0.94); backdrop-filter: blur(14px); }
}
@keyframes pomoBgOut {
  0% { background: rgba(6,11,20,0.94); backdrop-filter: blur(14px); }
  100% { background: rgba(6,11,20,0); backdrop-filter: blur(0); }
}
@keyframes pomoFadeUpIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.pomo-delayed {
  opacity: 0;
  animation: pomoFadeUpIn 0.4s 0.7s ease forwards;
}
/* ═══════════════════════════════ POMODORO v12 — 环形进度玻璃卡片 ═══════════════════════════════ */
.pomo-card {
  position: relative; width: 400px; max-width: 94vw;
  padding: 2rem 1.5rem 1.4rem;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(22,28,40,0.92), rgba(10,14,24,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  overflow: hidden;
  text-align: center;
  animation: pomoPopIn 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.08) forwards;
}
.pomo-card.pomo-static { animation: none; }
.pomo-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
  opacity: 0.8;
}
.pomo-card-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 340px; height: 340px; border-radius: 50%; pointer-events: none;
  /* ponytail: color-mix needs modern browsers; older ones just lose the glow */
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
}
.pomo-ring-wrap { position: relative; width: 280px; height: 280px; margin: 0.4rem auto 0.2rem; }
.pomo-ring-wrap svg { width: 100%; height: 100%; display: block; }
.pomo-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.pomo-ring-mode { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.35rem; }
.pomo-ring-time {
  font-family: var(--font-mono); font-size: 3.4rem; font-weight: 800; line-height: 1;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent);
}
.pomo-ring-state {
  margin-top: 0.55rem; font-size: 0.7rem; color: var(--text-dim);
  display: flex; align-items: center; gap: 0.35rem;
}
.pomo-ring-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.pomo-ring-state .dot.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pomoBlink 1.2s ease-in-out infinite; }
@keyframes pomoBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.pomo-ses-count { font-size: 0.65rem; color: var(--text-dim); margin-left: 0.5rem; }
/* Controls */
.pomo-adjust-row { display: flex; justify-content: center; gap: 1.4rem; width: 100%; margin-top: .8rem; }
.pomo-adjust-col { text-align: center; }
.pomo-adjust-label { margin-bottom: .3rem; color: var(--text-secondary); font-size: .72rem; }
.pomo-adjust-btns { display: flex; align-items: center; gap: .45rem; }
.pomo-adjust-btn {
  width: 36px; height: 36px; padding: 0; border: 1px solid var(--border-glass);
  border-radius: 50%; background: linear-gradient(145deg, color-mix(in srgb, var(--bg-panel) 96%, white), color-mix(in srgb, var(--bg-deep) 90%, black));
  color: var(--accent); font: inherit; font-size: 1rem; cursor: pointer;
  box-shadow: inset 0 2px 2px rgba(255,255,255,.28), 0 3px 0 color-mix(in srgb, var(--bg-deep) 28%, transparent), 0 5px 10px rgba(0,0,0,.16);
  transition: transform .12s ease, box-shadow .12s ease;
}
.pomo-adjust-btn:active { transform: translateY(3px) scale(.96); box-shadow: inset 0 2px 4px rgba(0,0,0,.2), 0 0 0 transparent; }
.pomo-adjust-val { min-width: 30px; color: var(--text-primary); font-weight: 700; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.pomo-controls { display: flex; justify-content: center; gap: 8px; width: 100%; margin-top: 0.4rem; }
.pomo-primary { min-width: 116px; height: 40px; font-size: 0.92rem; font-weight: 800; padding: 0.5rem 1.5rem; }
.pomo-secondary { height: 40px; min-width: 72px; font-size: 0.82rem; }
/* Task card */
.pomo-task {
  width: 100%; max-width: 360px; margin: 0.5rem auto 0;
  padding: 14px 16px; border-radius: 12px; text-align: left;
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07);
}
.pomo-task-label { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 0.2rem; }
.pomo-task-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.pomo-task-item { font-size: 0.7rem; color: var(--text-secondary); margin-top: 0.15rem; }
/* Stop button */
.pomo-stop-wrap { margin-top: 0.8rem; text-align: center; display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.pomo-stop-btn { border-color: var(--accent-pink); color: var(--accent-pink); font-size: 0.75rem; padding: 0.35rem 1.2rem; }
/* Footer */
.pomo-footer { margin-top: 0.4rem; font-size: 0.65rem; color: var(--text-dim); text-align: center; }

@media (max-width: 400px) {
  .pomo-ring-wrap { transform: scale(0.85); }
}

/* ═══════════════════════════════ SKILL TREE ═══════════════════════════════ */
#skilltree-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(5,8,15,0.96);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: all;
}
.skt-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.skt-close {
  margin-left: auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1rem; cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.skt-close:hover { background: rgba(255,80,80,0.2); border-color: var(--accent-pink); color: #fff; }
.skt-legend {
  display: flex; gap: 1.5rem; padding: 0.6rem 1.5rem;
  font-size: 0.7rem; color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0; flex-wrap: wrap;
}
.skt-leg-item { display: flex; align-items: center; gap: 0.35rem; }
.skt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.skt-canvas {
  flex: 1; overflow: hidden; cursor: grab;
  position: relative;
}
.skt-canvas:active { cursor: grabbing; }
#skt-svg { display: block; }

/* Node animations */
.sknode { cursor: pointer; transition: filter 0.2s, opacity 0.2s; }
.sknode:hover {
  filter: drop-shadow(0 0 8px rgba(0,204,255,0.5)) brightness(1.2);
}
.sknode-hover {
  filter: drop-shadow(0 0 10px rgba(0,204,255,0.6)) brightness(1.25) !important;
}
.sknode-hover rect:first-child {
  stroke-width: 2.5px !important;
  filter: brightness(1.3);
}
.sknode:hover rect:first-child {
  filter: url(#skglow);
}

/* Edge animations */
.skedge { transition: stroke 0.5s, stroke-width 0.5s; }

/* HTML tooltip */
#sktip {
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.4;
}

/* Legend responsive */
@media (max-width: 600px) {
  .skt-header { padding: 0.8rem 1rem; font-size: 0.85rem; }
  .skt-legend { gap: 0.8rem; font-size: 0.62rem; padding: 0.5rem 1rem; }
}

/* ═══════════════════ UI POLISH — v4.0 ═══════════════════ */
/* Mission extras: remove inline style, use class */
.mission-extras { display: flex; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; }

/* Mobile: compact stat cards */
@media (max-width: 768px) {
  .stat-card { padding: 0.5rem; gap: 0.1rem; }
  .stat-card-value { font-size: 1rem; }
  .stat-card-label { font-size: 0.6rem; }
  .stat-card-icon { font-size: 1rem; }
  /* Topbar: hide brand text on mobile */
  .brand-text { display: none; }
  .topbar-nav { overflow-x: auto; scrollbar-width: none; }
  .topbar-nav::-webkit-scrollbar { display: none; }
  /* Mission actions: grid for icons */
  .mission-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .mission-actions .btn-neon, .mission-actions .btn-glass { grid-column: 1 / -1; }
  .mission-actions .btn-icon { width: 100%; height: 40px; }
  .mission-actions .action-sep { display: none; }
  .dash-tabs { overflow-x: auto; }
  .dash-tab { flex: 0 0 auto; min-width: 5.2rem; }
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .briefing-track { animation: none !important; }
  .pomo-alarm-wrapper { animation: none !important; }
}

/* Shared accessible learning components. */
button, a, input, textarea, select { min-height: 44px; }
:where(button, a, input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
learn-dialog dialog { width: min(34rem, calc(100vw - 2rem)); border: 1px solid var(--border-control); border-radius: var(--radius); padding: 1rem; color: var(--text-primary); background: var(--bg-panel); }
learn-dialog dialog::backdrop { background: rgba(0, 0, 0, .7); }
.learn-dialog-close { float: right; border: 0; background: transparent; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }
.task-card { display: grid; gap: .5rem; padding: 1rem; border: 1px solid var(--border-glass); border-radius: var(--radius); background: var(--bg-glass); }
.task-card h3, .task-card p { margin: 0; }.task-card button { width: fit-content; padding: .5rem .8rem; color: var(--bg-deep); background: var(--accent); border: 0; border-radius: .4rem; cursor: pointer; }
progress-ring { position: relative; display: inline-grid; width: 5rem; height: 5rem; place-items: center; color: var(--accent); }
progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }.progress-ring-track, .progress-ring-value { fill: none; stroke-width: 3; }.progress-ring-track { stroke: var(--border-glass); }.progress-ring-value { stroke: var(--accent); stroke-dasharray: 100; transition: stroke-dashoffset var(--transition); }
progress-ring span { position: absolute; font-size: .8rem; }.result-summary { display: grid; gap: .4rem; padding: 1rem; border: 1px solid var(--border-glass); border-radius: var(--radius); }.result-summary h2, .result-summary p { margin: 0; }.result-summary a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .progress-ring-value { transition: none; } }

/* ═══════════════════════ V4 POLISH ═══════════════════════ */

/* Animated grid background overlay */
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Progress bar sheen animation */
.stage-progress-fill, .module-progress-fill, .mini-fill, .achievement-fill {
  position: relative; overflow: hidden;
}
.stage-progress-fill::after, .module-progress-fill::after, .mini-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  animation: sheen 2.5s ease-in-out infinite;
}
@keyframes sheen {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Module timeline — vertical line + dots */
.module-daily-list { position: relative; padding-left: 1.2rem; }
.module-daily-list::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: rgba(0,212,255,0.12);
}
.module-daily-item { position: relative; padding: 4px 0; }
.module-daily-check {
  position: absolute; left: -1.2rem; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(0,212,255,0.2);
  flex-shrink: 0;
}
.module-daily-check.done { background: var(--accent2); border-color: var(--accent2); box-shadow: 0 0 6px var(--accent2); }

/* Module card expand/collapse transition */
.module-daily-list { transition: opacity 0.25s ease, max-height 0.35s ease; overflow: hidden; }

/* Achievements pane — horizontal card layout */
.achievement-grid { display: flex; flex-direction: column; gap: 0.3rem; }
.achievement-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem; background: var(--bg-deep); border-radius: 8px;
  transition: var(--transition);
}
.achievement-row:hover { background: rgba(255,255,255,0.04); }
.achievement-icon { font-size: 1.2rem; width: 32px; text-align: center; flex-shrink: 0; }
.achievement-info { flex: 1; min-width: 0; }
.achievement-name { font-size: 0.8rem; font-weight: 600; }
.achievement-desc { font-size: 0.65rem; color: var(--text-dim); }
.achievement-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 999px; margin-top: 0.2rem; overflow: hidden; }
.achievement-fill { height: 100%; background: linear-gradient(90deg, var(--accent-cyan), var(--accent2)); border-radius: 999px; transition: width 180ms ease; }
.achievement-ratio { font-size: 0.55rem; color: var(--text-dim); margin-top: 0.05rem; }
.achievement-badge { font-size: 0.65rem; color: var(--accent2); flex-shrink: 0; }
.achievement-badge, .ach-card-badge {
  text-shadow: 0 1px 0 rgba(255,255,255,0.18), 0 2px 5px rgba(0,0,0,0.35);
}

/* 右上角图标按钮 — 统一触控尺寸 (桌面也受益) */
.topbar-icon-btn, #sfx-toggle, #tts-toggle {
  background: none; border: none; cursor: pointer;
  min-width: 36px; min-height: 36px; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: opacity 0.2s, background 0.2s;
  opacity: 0.6; padding: 0;
}
.topbar-icon-btn:hover, #sfx-toggle:hover, #tts-toggle:hover { opacity: 1; background: rgba(255,255,255,0.05); }
#sfx-toggle { opacity: 0.5; }
#sfx-toggle:hover { opacity: 1; }
#sfx-toggle.muted { opacity: 0.25; }

/* Mute toggle (legacy keep) */
#sfx-toggle.muted { opacity: 0.25; }

/* Tip block styling */
.tip-text { font-size: 0.75rem; color: var(--text-dim); }
.tip-tag {
  display: inline-block; font-size: 0.55rem; padding: 1px 6px;
  border-radius: 4px; background: rgba(0,212,255,0.08); color: var(--accent-cyan);
  margin-right: 0.3rem; font-weight: 600;
}

/* Responsive achievement rows on small screens */
@media (max-width: 600px) {
  .achievement-row { flex-wrap: wrap; gap: 0.3rem; }
  .achievement-icon { font-size: 1rem; width: 24px; }
}

/* ═══ GSAP 动效增强 ═══ */

/* 密码门扫描线 */
.breach-scanline {
  will-change: transform, opacity;
}

/* 模块卡片 hover 优化 */
.module-card {
  will-change: transform, opacity;
}

/* 工具卡片轨道入场 */
.tool-card {
  will-change: transform, opacity;
}

/* 驾驶舱面板过渡 */
.dash-pane > * {
  will-change: transform, opacity;
}

/* 模块展开动画 */
.module-daily-list {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}

/* 技能树节点呼吸 */
.sknode rect {
  transition: filter 0.3s ease;
}

/* 统计数字闪烁 */
.stat-card-value {
  will-change: text-shadow;
}

/* 右上角身份头像 */
.topbar-career-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(10,18,30,0.8);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.topbar-career-avatar:hover {
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(0,212,255,0.3) !important;
  z-index: 10;
}

/* ═══ AI 桌宠动画 ═══ */
@keyframes petFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-0.5deg); }
  50% { transform: translateY(-2px) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(0.5deg); }
}
@keyframes petBounce {
  0%, 100% { transform: scale(1) translateY(0); }
  25% { transform: scale(1.15) translateY(-6px); }
  50% { transform: scale(1.05) translateY(-3px); }
  75% { transform: scale(1.1) translateY(-4px); }
}
@keyframes petFloatIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes petHairSway {
  0%, 100% { transform: rotate(0deg); transform-origin: 100px 70px; }
  50% { transform: rotate(1deg); transform-origin: 100px 70px; }
}

/* ═══════════════════════════════════════════
   CTF 引导式挑战模式
   ═══════════════════════════════════════════ */
.ctf-mode .capstone-stage-badge.badge-ready {
  background: linear-gradient(135deg, #ff6600, #ff3366);
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

.capstone-modules-locked-notice {
  text-align: center;
  padding: 12px;
  margin-top: 8px;
  background: rgba(255, 102, 0, 0.1);
  border: 1px solid rgba(255, 102, 0, 0.3);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ctf-steps {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

.ctf-steps-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--accent2);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.ctf-step-indicators {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ctf-step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  cursor: default;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.ctf-step-indicator.ctf-clickable {
  cursor: pointer;
}

.ctf-step-indicator.ctf-clickable:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-1px);
}

.ctf-step-done {
  border-color: var(--accent-success) !important;
  background: rgba(0, 255, 136, 0.08) !important;
  opacity: 0.85;
}

.ctf-step-current {
  border-color: var(--accent-warn) !important;
  background: rgba(255, 102, 0, 0.15) !important;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.2);
  animation: ctf-current-pulse 2s ease-in-out infinite;
}

@keyframes ctf-current-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 102, 0, 0.15); }
  50% { box-shadow: 0 0 16px rgba(255, 102, 0, 0.35); }
}

.ctf-step-locked {
  opacity: 0.4;
  filter: grayscale(0.6);
}

.ctf-step-available {
  border-color: rgba(0, 212, 255, 0.3);
}

.ctf-step-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.ctf-step-label {
  font-size: 0.82rem;
  white-space: nowrap;
}

.ctf-step-active-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--accent-warn);
  color: #fff;
  font-weight: 600;
  margin-left: 2px;
}

/* Step detail panel */
.ctf-step-detail {
  margin: 12px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  transition: all 0.3s ease;
}

.ctf-step-detail-current {
  border-color: var(--accent-warn);
  box-shadow: inset 0 0 20px rgba(255, 102, 0, 0.05);
}

.ctf-step-detail-done {
  border-color: var(--accent-success);
  opacity: 0.8;
}

.ctf-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ctf-step-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg-deep);
}

.ctf-step-title {
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
}

.ctf-step-status-done {
  font-size: 0.8rem;
  color: var(--accent-success);
}

.ctf-step-status-active {
  font-size: 0.8rem;
  color: var(--accent-warn);
  animation: ctf-status-blink 1.5s ease-in-out infinite;
}

@keyframes ctf-status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.ctf-step-description {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ctf-step-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px dashed rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  margin-bottom: 14px;
}

.ctf-hint-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 1px;
}

.ctf-hint-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Flag verification */
.ctf-flag-verify {
  padding: 14px;
  background: rgba(0, 255, 136, 0.03);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: var(--radius);
}

.ctf-flag-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent2);
}

.ctf-flag-row {
  display: flex;
  gap: 8px;
}

.ctf-flag-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--bg-deep);
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.ctf-flag-input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.15);
}

.ctf-flag-input::placeholder {
  color: var(--text-dim);
  font-family: var(--font-main);
}

.ctf-flag-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--accent2), #00cc66);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.ctf-flag-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
}

.ctf-flag-btn:active {
  transform: translateY(0);
}

.ctf-flag-result {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.ctf-flag-correct {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--accent2);
}

.ctf-flag-wrong {
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: var(--accent-pink);
}

/* Reference section (collapsible) */
.ctf-reference-details {
  margin-top: 16px;
  border-top: 1px solid var(--border-glass);
  padding-top: 12px;
}

.ctf-reference-summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 6px 0;
  user-select: none;
  transition: color 0.2s ease;
}

.ctf-reference-summary:hover {
  color: var(--text-primary);
}

.ctf-all-done .ctf-step-dot {
  cursor: default !important;
}

/* Responsive */
@media (max-width: 640px) {
  .ctf-step-indicators {
    flex-direction: column;
    gap: 6px;
  }
  .ctf-step-indicator {
    width: 100%;
  }
  .ctf-flag-row {
    flex-direction: column;
  }
  .ctf-flag-btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════
   3套 CSS 主题
   ═══════════════════════════════════════════ */

/* 暖色护眼主题 */
body[data-theme="warm"] {
  --bg: #1a1814;
  --bg-deep: #12100e;
  --accent: #f0a060;
  --accent2: #ffcc80;
  --accent-cyan: #c09050;
  --text: #e8d5c0;
  --text-dim: #a09080;
  --text-secondary: #c0b0a0;
  --border-glass: rgba(240, 160, 80, 0.15);
  --bg-panel: rgba(26, 24, 20, 0.85);
  --bg-glass: rgba(26, 24, 20, 0.6);
  --accent-success: #d4a057;
  --accent-warn: #e08830;
  --accent-pink: #d06060;
  --accent-danger: #d06060;
  --accent3: #b08040;
}
body[data-theme="warm"]::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(240, 160, 80, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(200, 144, 80, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 204, 128, 0.03) 0%, transparent 70%);
}

/* 高对比度主题 */
body[data-theme="contrast"] {
  --bg: #000000;
  --bg-deep: #080808;
  --accent: #00ff00;
  --accent2: #ffff00;
  --accent-cyan: #00ffff;
  --text: #ffffff;
  --text-dim: #cccccc;
  --text-secondary: #aaaaaa;
  --border-glass: rgba(255, 255, 255, 0.3);
  --bg-panel: rgba(0, 0, 0, 0.9);
  --bg-glass: rgba(0, 0, 0, 0.75);
  --accent-success: #00ff00;
  --accent-warn: #ff8800;
  --accent-pink: #ff0066;
  --accent-danger: #ff0066;
  --accent3: #ff00ff;
}
body[data-theme="contrast"]::before {
  background: none;
}
body[data-theme="contrast"] * {
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ═══════════════════════════════════════════
   动森主题 — 全风格改造
   温暖自然 · 圆角 · 弹跳动效 · 草地纹理
   ═══════════════════════════════════════════ */

body[data-theme="acnh"] {
  color-scheme: light;
  --bg: #f5f0e8;
  --bg-deep: #ede4d3;
  --bg-panel: rgba(245, 240, 232, 0.92);
  --bg-glass: rgba(237, 228, 211, 0.88);
  --accent: #7cb342;
  --accent2: #f9a825;
  --accent-cyan: #4db6ac;
  --text: #3d2e1f;
  --text-dim: #6b5b48;
  --text-secondary: #5a4a38;
  --border-glass: rgba(124, 179, 66, 0.2);
  --accent-success: #66bb6a;
  --accent-warn: #ffa726;
  --accent-pink: #ef5350;
  --accent-danger: #ef5350;
  --accent3: #ab47bc;
  --radius: 18px;
  --transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

/* 浅色文字强制加深 */
body[data-theme="acnh"] [style*="color:var(--text-dim)"],
body[data-theme="acnh"] .text-dim,
body[data-theme="acnh"] .module-desc,
body[data-theme="acnh"] .task-check-text,
body[data-theme="acnh"] .char-preview-name,
body[data-theme="acnh"] .char-desc,
body[data-theme="acnh"] .tip-text,
body[data-theme="acnh"] .dash-stat-label {
  color: #5a4a38 !important;
}

/* placeholder 加深 */
body[data-theme="acnh"] ::placeholder,
body[data-theme="acnh"] input::placeholder,
body[data-theme="acnh"] textarea::placeholder {
  color: #8c7b66 !important;
  opacity: 1 !important;
}

/* 禁用态文字 */
body[data-theme="acnh"] button:disabled,
body[data-theme="acnh"] .btn-neon:disabled,
body[data-theme="acnh"] [disabled] {
  color: #7a6a55 !important;
  opacity: 0.7 !important;
}

/* 半透明元素提高不透明度 */
body[data-theme="acnh"] .module-skipped,
body[data-theme="acnh"] [style*="opacity:0.5"] {
  opacity: 0.75 !important;
}

/* 标签/徽章文字 */
body[data-theme="acnh"] .career-badge,
body[data-theme="acnh"] .module-skill,
body[data-theme="acnh"] .char-cert-tag {
  color: #4a3728 !important;
  background: rgba(124, 179, 66, 0.15) !important;
  border: 1px solid rgba(124, 179, 66, 0.3) !important;
}

/* 外链文字 */
body[data-theme="acnh"] .task-external-link {
  color: #5a4a38 !important;
  border-color: rgba(139, 115, 85, 0.3) !important;
}
body[data-theme="acnh"] .task-external-link:hover {
  color: #3d2e1f !important;
  border-color: rgba(124, 179, 66, 0.5) !important;
  background: rgba(124, 179, 66, 0.08) !important;
}

/* 模块标题保持深色 */
body[data-theme="acnh"] .module-title,
body[data-theme="acnh"] .stage-title,
body[data-theme="acnh"] .char-name {
  color: #2d1e0f !important;
}

/* ═══ Pio 对话气泡 ═══ */
body[data-theme="acnh"] #waifu-tips {
  background: #fffef7 !important;
  border: 2px solid rgba(139, 115, 85, 0.3) !important;
  color: #3d2e1f !important;
  text-shadow: none !important;
}
body[data-theme="acnh"] #waifu-tips *,
body[data-theme="acnh"] #waifu-tips span {
  color: #3d2e1f !important;
}

/* ═══ 驾驶舱面板文字 ═══ */
body[data-theme="acnh"] .dash-pane,
body[data-theme="acnh"] .dash-pane *,
body[data-theme="acnh"] #pane-progress,
body[data-theme="acnh"] #pane-progress *,
body[data-theme="acnh"] #pane-stats,
body[data-theme="acnh"] #pane-stats *,
body[data-theme="acnh"] [id^="pane-"] {
  color: #3d2e1f !important;
  text-shadow: none !important;
}
/* 驾驶舱内数字/accent保留原色 */
body[data-theme="acnh"] .dash-pane [style*="color:var(--accent)"],
body[data-theme="acnh"] [id^="pane-"] [style*="color:var(--accent)"] {
  color: #7cb342 !important;
}
body[data-theme="acnh"] .dash-pane [style*="color:var(--accent2)"],
body[data-theme="acnh"] [id^="pane-"] [style*="color:var(--accent2)"] {
  color: #f9a825 !important;
}

/* 成就描述 */
body[data-theme="acnh"] .achievement-row,
body[data-theme="acnh"] .achievement-row * {
  color: #3d2e1f !important;
}

/* 通知/toast 文字 */
body[data-theme="acnh"] .geek-notification *,
body[data-theme="acnh"] .notification-toast * {
  color: #3d2e1f !important;
}

/* ═══ 工具箱 ═══ */
body[data-theme="acnh"] .tool-card,
body[data-theme="acnh"] .tool-card * {
  color: #3d2e1f !important;
  text-shadow: none !important;
}
body[data-theme="acnh"] .tool-card .tool-name {
  color: #2d1e0f !important;
}

/* ═══ 今日任务 ═══ */
body[data-theme="acnh"] .task-check-text,
body[data-theme="acnh"] .task-check.done .task-check-text {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .task-tier-tab {
  color: #5a4a38 !important;
  background: rgba(139,115,85,0.06) !important;
}
body[data-theme="acnh"] .task-tier-tab.active {
  color: #3d2e1f !important;
  background: rgba(124,179,66,0.15) !important;
}
body[data-theme="acnh"] .task-tier-tab.done {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] #mission-quote-block,
body[data-theme="acnh"] #mission-quote-block * {
  color: #3d2e1f !important;
  text-shadow: none !important;
}

/* ═══ 学习路径列表模式 ═══ */
body[data-theme="acnh"] .module-list-item,
body[data-theme="acnh"] .module-list-item *,
body[data-theme="acnh"] .module-list-row,
body[data-theme="acnh"] .module-list-daily,
body[data-theme="acnh"] .module-list-daily * {
  color: #3d2e1f !important;
  text-shadow: none !important;
}
body[data-theme="acnh"] .module-list-expand {
  color: #7cb342 !important;
}

/* ═══ 技能树 ═══ */
body[data-theme="acnh"] #skilltree-overlay {
  background: linear-gradient(160deg, rgba(245,240,232,0.98) 0%, rgba(237,228,211,0.98) 100%) !important;
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .skt-header {
  color: #3d2e1f !important;
  border-bottom: 1px solid rgba(139,115,85,0.15) !important;
}
body[data-theme="acnh"] .skt-close {
  background: rgba(139,115,85,0.08) !important;
  border-color: rgba(139,115,85,0.2) !important;
  color: #5a4a38 !important;
}
body[data-theme="acnh"] .skt-close:hover {
  background: rgba(239,83,80,0.15) !important;
  border-color: #ef5350 !important;
  color: #c62828 !important;
}
body[data-theme="acnh"] .skt-legend {
  color: #5a4a38 !important;
  border-bottom: 1px solid rgba(139,115,85,0.1) !important;
}
body[data-theme="acnh"] .skt-leg-item { color: #5a4a38 !important; }
body[data-theme="acnh"] .sknode:hover {
  filter: drop-shadow(0 0 8px rgba(124,179,66,0.5)) brightness(1.15) !important;
}
body[data-theme="acnh"] .sknode-hover {
  filter: drop-shadow(0 0 12px rgba(124,179,66,0.6)) brightness(1.2) !important;
}

/* ═══ 番茄钟全覆盖 ═══ */
body[data-theme="acnh"] .pomo-alarm-wrapper,
body[data-theme="acnh"] .pomo-alarm-wrapper * {
  color: #3d2e1f !important;
  text-shadow: none !important;
}
body[data-theme="acnh"] .pomo-digital-time {
  color: #2d1e0f !important;
}

/* ═══ Splash 密码门: 主题化交给 journal.css, 不再做 acnh 特化 ═══ */

/* ═══ 加载页 ═══ */
body[data-theme="acnh"] .loader {
  background: linear-gradient(160deg, #f5f0e8 0%, #ede4d3 100%) !important;
}
body[data-theme="acnh"] .loader-ring {
  border-color: rgba(124, 179, 66, 0.15) !important;
  border-top-color: #7cb342 !important;
}
body[data-theme="acnh"] .loader-text {
  color: #6b5b48 !important;
}
body[data-theme="acnh"] .skeleton-bar {
  background: rgba(139, 115, 85, 0.12) !important;
}

/* ═══ 职业选择 ═══ */
body[data-theme="acnh"] .char-select-container,
body[data-theme="acnh"] .char-select-container *,
body[data-theme="acnh"] .onboarding-overlay,
body[data-theme="acnh"] .onboarding-overlay * {
  color: #3d2e1f !important;
  text-shadow: none !important;
}
body[data-theme="acnh"] .onboarding-overlay {
  background: rgba(245,240,232,0.97) !important;
}

/* ═══ 今日任务面板 ═══ */
body[data-theme="acnh"] .mission-task-panel {
  background: rgba(255,253,248,0.75) !important;
  border-color: rgba(139,115,85,0.18) !important;
  box-shadow: 0 8px 32px rgba(139,115,85,0.1) !important;
}

/* ═══ 今日任务标题 + 按钮 ═══ */
body[data-theme="acnh"] .mission-module-name {
  color: #7cb342 !important;
}
body[data-theme="acnh"] .btn-neon {
  background: rgba(124,179,66,0.1) !important;
}
body[data-theme="acnh"] .btn-neon:hover:not(:disabled) {
  background: rgba(124,179,66,0.18) !important;
  box-shadow: 0 0 25px rgba(124,179,66,0.2) !important;
}

/* ═══ 解题报告弹窗 ═══ */
body[data-theme="acnh"] #writeup-overlay {
  background: rgba(245,240,232,0.85) !important;
  backdrop-filter: blur(10px) !important;
}
body[data-theme="acnh"] #writeup-overlay > div:first-of-type {
  background: linear-gradient(160deg, #faf6ee 0%, #f0e8d5 100%) !important;
  border: 2px solid rgba(139,115,85,0.2) !important;
  box-shadow: 0 12px 48px rgba(139,115,85,0.15) !important;
  color: #3d2e1f !important;
}
body[data-theme="acnh"] #writeup-overlay button:first-of-type {
  color: #5a4a38 !important;
}

/* 解题报告卡片 */
body[data-theme="acnh"] .writeup-card {
  background: rgba(139,115,85,0.06) !important;
  border-color: rgba(139,115,85,0.12) !important;
}
body[data-theme="acnh"] .writeup-card:hover {
  border-color: rgba(124,179,66,0.25) !important;
  background: rgba(124,179,66,0.06) !important;
}
body[data-theme="acnh"] .writeup-card [style*="color:#e6edf3"] {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .writeup-card [style*="color:#b0b8c1"] {
  color: #5a4a38 !important;
}
body[data-theme="acnh"] .writeup-card [style*="color:#848d97"] {
  color: #6b5b48 !important;
}

/* 写解题报告表单 */
body[data-theme="acnh"] #writeup-form {
  background: rgba(245,240,232,0.85) !important;
  backdrop-filter: blur(10px) !important;
}
body[data-theme="acnh"] #writeup-form > div {
  background: linear-gradient(160deg, #faf6ee 0%, #f0e8d5 100%) !important;
  border: 2px solid rgba(139,115,85,0.2) !important;
  color: #3d2e1f !important;
}
body[data-theme="acnh"] #writeup-form input,
body[data-theme="acnh"] #writeup-form textarea {
  background: #fffef7 !important;
  border-color: rgba(139,115,85,0.2) !important;
  color: #3d2e1f !important;
}
body[data-theme="acnh"] #writeup-form label,
body[data-theme="acnh"] #writeup-form [style*="color:#848d97"] {
  color: #6b5b48 !important;
}
body[data-theme="acnh"] #writeup-cancel-btn {
  background: rgba(139,115,85,0.08) !important;
  border-color: rgba(139,115,85,0.2) !important;
  color: #6b5b48 !important;
}
body[data-theme="acnh"] #writeup-submit-btn {
  color: #7cb342 !important;
  border-color: rgba(124,179,66,0.4) !important;
}
body[data-theme="acnh"] #writeup-content [style*="color:#848d97"] {
  color: #6b5b48 !important;
}

/* ═══ 错题本 ═══ */
body[data-theme="acnh"] .wrongbook-empty [style*="background:rgba(0,212,255"],
body[data-theme="acnh"] .wrongbook-empty div[style*="rgba(0,212,255"] {
  background: rgba(124,179,66,0.06) !important;
}
body[data-theme="acnh"] .wrongbook-entry-badge {
  background: rgba(124,179,66,0.12) !important;
  color: #7cb342 !important;
}
body[data-theme="acnh"] .wrongbook-entry-stage,
body[data-theme="acnh"] .wrongbook-entry-module {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .wrongbook-entry-question {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .wrongbook-entry-meta {
  color: #6b5b48 !important;
}
body[data-theme="acnh"] .wrongbook-section-title {
  color: #3d2e1f !important;
}

/* ═══ 实战项目 + 学习计划 ═══ */
body[data-theme="acnh"] .plan-item,
body[data-theme="acnh"] .plan-item *,
body[data-theme="acnh"] .capstone-card,
body[data-theme="acnh"] .capstone-card * {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .plan-item-stage,
body[data-theme="acnh"] .capstone-pct-text {
  color: #7cb342 !important;
}
body[data-theme="acnh"] .plan-item-skipped {
  opacity: 0.6 !important;
}
body[data-theme="acnh"] .plan-skip-toggle {
  color: #6b5b48 !important;
}

/* 计划/实战/错题本的标题和副标题 */
body[data-theme="acnh"] .plan-title,
body[data-theme="acnh"] .capstone-title {
  color: #3d2e1f !important;
}
body[data-theme="acnh"] .plan-subtitle,
body[data-theme="acnh"] .capstone-subtitle {
  color: #5a4a38 !important;
}
body[data-theme="acnh"] .wrongbook-stat-label {
  color: #5a4a38 !important;
}

/* 实战项目展开内容 + 错题本空状态 */
body[data-theme="acnh"] .capstone-project-title { color: #2d1e0f !important; }
body[data-theme="acnh"] .capstone-project-desc { color: #5a4a38 !important; }
body[data-theme="acnh"] .capstone-meta,
body[data-theme="acnh"] .capstone-meta span { color: #6b5b48 !important; }
body[data-theme="acnh"] .capstone-tasks-title { color: #3d2e1f !important; }
body[data-theme="acnh"] .capstone-task-text { color: #3d2e1f !important; }
body[data-theme="acnh"] .capstone-deliverables-title { color: #3d2e1f !important; }
body[data-theme="acnh"] .capstone-deliverables li { color: #5a4a38 !important; }
body[data-theme="acnh"] .capstone-modules-locked-notice { color: #6b5b48 !important; background: rgba(139,115,85,0.06) !important; }
body[data-theme="acnh"] .capstone-stage-badge { color: #5a4a38 !important; }
body[data-theme="acnh"] .capstone-stage-name { color: #3d2e1f !important; }
/* CTF 模式 */
body[data-theme="acnh"] .ctf-steps-label { color: #3d2e1f !important; }
body[data-theme="acnh"] .ctf-step-label { color: #3d2e1f !important; }
body[data-theme="acnh"] .ctf-step-title { color: #3d2e1f !important; }
body[data-theme="acnh"] .ctf-step-description { color: #5a4a38 !important; }
body[data-theme="acnh"] .ctf-hint-text { color: #6b5b48 !important; }
body[data-theme="acnh"] .ctf-flag-label { color: #3d2e1f !important; }
body[data-theme="acnh"] .ctf-step-number { color: #7cb342 !important; }
/* 错题本空状态 */
body[data-theme="acnh"] .wrongbook-empty p { color: #5a4a38 !important; }

/* ═══ 每日挑战 ═══ */
body[data-theme="acnh"] .challenge-option {
  color: #3d2e1f !important;
  background: #faf6ee !important;
  border-color: rgba(139,115,85,0.2) !important;
}

/* ═══ 验证弹窗 ═══ */
body[data-theme="acnh"] .verify-criterion,
body[data-theme="acnh"] .verify-desc,
body[data-theme="acnh"] .verify-title {
  color: #3d2e1f !important;
}

/* ═══ 页脚 ═══ */
body[data-theme="acnh"] #footer,
body[data-theme="acnh"] footer {
  color: #6b5b48 !important;
  border-top: 1px solid rgba(139,115,85,0.12) !important;
}

/* ═══ 简报区域 ═══ */
body[data-theme="acnh"] #briefing-section,
body[data-theme="acnh"] #briefing-section * {
  color: #3d2e1f !important;
  background: rgba(245,240,232,0.6) !important;
}

/* ═══ 命令面板历史项 ═══ */
body[data-theme="acnh"] .cp-history-item {
  color: #5a4a38 !important;
  background: rgba(139,115,85,0.06) !important;
}
body[data-theme="acnh"] .cp-history-item:hover {
  background: rgba(124,179,66,0.12) !important;
}

/* ═══ 全局圆角修正：排除原生元素 ═══ */
body[data-theme="acnh"] svg,
body[data-theme="acnh"] svg *,
body[data-theme="acnh"] canvas,
body[data-theme="acnh"] img,
body[data-theme="acnh"] video,
body[data-theme="acnh"] iframe {
  border-radius: 0 !important;
}

/* ═══ 云朵覆盖增强（宽屏） ═══ */
body[data-theme="acnh"]::after {
  background:
    radial-gradient(ellipse 200px 80px at 10% 10%, rgba(255,255,255,0.12) 0%, transparent 100%),
    radial-gradient(ellipse 160px 60px at 35% 6%, rgba(255,255,255,0.09) 0%, transparent 100%),
    radial-gradient(ellipse 220px 85px at 60% 12%, rgba(255,255,255,0.10) 0%, transparent 100%),
    radial-gradient(ellipse 180px 70px at 85% 8%, rgba(255,255,255,0.08) 0%, transparent 100%);
}

/* ═══ 所有弹窗overlay背景 ═══ */
body[data-theme="acnh"] [class*="overlay"],
body[data-theme="acnh"] [style*="z-index: 1000"],
body[data-theme="acnh"] [style*="z-index:1000"] {
  --text: #3d2e1f;
  --text-dim: #5a4a38;
  --text-secondary: #4a3a28;
}
/* 弹窗背景覆盖 */
body[data-theme="acnh"] [style*="background:rgba(6,11,20"],
body[data-theme="acnh"] [style*="background: rgba(6, 11, 20"] {
  background: rgba(245,240,232,0.97) !important;
}

/* 草地纹理背景 */
body[data-theme="acnh"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* 草地三角纹理 */
    repeating-linear-gradient(60deg, transparent, transparent 16px, rgba(124,179,66,0.045) 16px, rgba(124,179,66,0.045) 18px),
    repeating-linear-gradient(-60deg, transparent, transparent 16px, rgba(124,179,66,0.035) 16px, rgba(124,179,66,0.035) 18px),
    /* 柔和光晕 */
    radial-gradient(ellipse at 20% 80%, rgba(124, 179, 66, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(77, 182, 172, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(249, 168, 37, 0.05) 0%, transparent 60%);
}

/* 飘动云朵阴影 */
body[data-theme="acnh"]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 200px 80px at 15% 12%, rgba(255,255,255,0.12) 0%, transparent 100%),
    radial-gradient(ellipse 160px 60px at 55% 8%, rgba(255,255,255,0.10) 0%, transparent 100%),
    radial-gradient(ellipse 240px 90px at 80% 15%, rgba(255,255,255,0.08) 0%, transparent 100%);
  animation: acnhClouds 30s ease-in-out infinite;
}
@keyframes acnhClouds {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(15px); }
  50% { transform: translateX(-10px); }
  75% { transform: translateX(8px); }
}

/* ═══ 全局圆角 + 阴影 ═══ */
body[data-theme="acnh"] *,
body[data-theme="acnh"] *::before,
body[data-theme="acnh"] *::after {
  border-radius: 14px;
}
body[data-theme="acnh"] button,
body[data-theme="acnh"] .btn-neon,
body[data-theme="acnh"] .btn-glass {
  border-radius: 24px !important;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.15);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease !important;
}
body[data-theme="acnh"] button:hover,
body[data-theme="acnh"] .btn-neon:hover,
body[data-theme="acnh"] .btn-glass:hover {
  animation: acnhBtnPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(139, 115, 85, 0.25) !important;
}
@keyframes acnhBtnPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08) translateY(-2px); }
  70% { transform: scale(0.97) translateY(0); }
  100% { transform: scale(1.03) translateY(-1px); }
}
body[data-theme="acnh"] button:active,
body[data-theme="acnh"] .btn-neon:active,
body[data-theme="acnh"] .btn-glass:active {
  transform: scale(0.94);
  transition: transform 0.1s ease !important;
}

/* ═══ 卡片：木质纹理 + 叶子装饰 ═══ */
body[data-theme="acnh"] .stage-card,
body[data-theme="acnh"] .module-card:not(.module-list-item),
body[data-theme="acnh"] .tool-card {
  background: linear-gradient(135deg, #faf6ee 0%, #f0e8d5 100%) !important;
  border: 2px solid rgba(139, 115, 85, 0.15) !important;
  box-shadow: 0 3px 12px rgba(139, 115, 85, 0.1) !important;
  border-radius: 20px !important;
  position: relative;
  overflow: hidden;
}
body[data-theme="acnh"] .stage-card::after {
  content: "🍃";
  position: absolute;
  bottom: 8px;
  right: 14px;
  font-size: 1.2rem;
  opacity: 0.12;
  pointer-events: none;
}
body[data-theme="acnh"] .stage-card:hover,
body[data-theme="acnh"] .module-card:not(.module-list-item):hover,
body[data-theme="acnh"] .tool-card:hover {
  box-shadow: 0 6px 24px rgba(124, 179, 66, 0.2) !important;
  transform: translateY(-3px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ═══ Topbar：木质横栏 ═══ */
body[data-theme="acnh"] #topbar {
  background: linear-gradient(180deg, #f0e6d2 0%, #e0d0b0 50%, #d4c4a4 100%) !important;
  border-bottom: 2px solid rgba(139, 115, 85, 0.25) !important;
  box-shadow: 0 2px 16px rgba(139, 115, 85, 0.1) !important;
}
body[data-theme="acnh"] #topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 40px,
    rgba(139, 115, 85, 0.03) 40px,
    rgba(139, 115, 85, 0.03) 41px
  );
  pointer-events: none;
}

/* ═══ 导航：柔和标签 ═══ */
body[data-theme="acnh"] .nav-item {
  border-radius: 20px !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
body[data-theme="acnh"] .nav-item.active {
  background: rgba(124, 179, 66, 0.15) !important;
  color: var(--accent) !important;
  transform: scale(1.05);
}

/* ═══ 通知气泡：动森对话框 ═══ */
body[data-theme="acnh"] .geek-notification,
body[data-theme="acnh"] .notification-toast {
  border-radius: 20px 20px 20px 6px !important;
  background: #fffef9 !important;
  border: 2px solid rgba(139, 115, 85, 0.2) !important;
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.18) !important;
  font-family: "Inter", "Noto Sans SC", sans-serif !important;
}
body[data-theme="acnh"] .geek-notification::after,
body[data-theme="acnh"] .notification-toast::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 16px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(139, 115, 85, 0.2);
  pointer-events: none;
}

/* ═══ 进度条：叶片填充 ═══ */
body[data-theme="acnh"] .stage-progress-fill,
body[data-theme="acnh"] .module-progress-fill {
  border-radius: 10px !important;
  background: linear-gradient(90deg, #a5d66e 0%, #7cb342 60%, #f9a825 100%) !important;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.3) !important;
}

/* ═══ 输入框：便签纸 ═══ */
body[data-theme="acnh"] input,
body[data-theme="acnh"] textarea,
body[data-theme="acnh"] select {
  background: #fffef7 !important;
  border: 2px solid rgba(139, 115, 85, 0.2) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 1px 4px rgba(139, 115, 85, 0.08) !important;
  transition: border 0.3s ease, box-shadow 0.3s ease !important;
}
body[data-theme="acnh"] input:focus,
body[data-theme="acnh"] textarea:focus {
  border-color: rgba(124, 179, 66, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.12), inset 0 1px 4px rgba(139, 115, 85, 0.08) !important;
  outline: none;
}

/* ═══════════════════════════════════════════
   动森树桩番茄钟 — 替代原有时钟
   ═══════════════════════════════════════════ */

/* 隐藏旧的闹钟元素 */
body[data-theme="acnh"] .pomo-clock-shell,
body[data-theme="acnh"] .pomo-bell-bar,
body[data-theme="acnh"] .pomo-face,
body[data-theme="acnh"] .pomo-glass-reflection,
body[data-theme="acnh"] .pomo-tick,
body[data-theme="acnh"] .pomo-hand,
body[data-theme="acnh"] .pomo-center-cap,
body[data-theme="acnh"] .pomo-shadow,
body[data-theme="acnh"] .pomo-leg,
body[data-theme="acnh"] .pomo-digital-bg { display: none !important; }

/* 树桩主容器 */
body[data-theme="acnh"] .pomo-alarm-wrapper {
  animation: acnhStumpFloat 5s ease-in-out infinite !important;
}
@keyframes acnhStumpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── 树桩主体 ── */
.acnh-stump {
  position: relative; width: 260px; height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 40%, #c4a46c 0%, #a08050 30%, #7a5e38 70%, #5a3e20 100%);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 2px 20px rgba(255,220,180,0.15),
    0 0 0 8px #5a3e20,
    0 0 0 12px #3a2610;
}

/* 年轮纹理 */
.acnh-stump::before {
  content: "";
  position: absolute; inset: 30px;
  border-radius: 50%;
  border: 2px solid rgba(139,90,43,0.25);
  box-shadow:
    0 0 0 16px transparent,
    0 0 0 18px rgba(139,90,43,0.18),
    0 0 0 34px transparent,
    0 0 0 36px rgba(139,90,43,0.14),
    0 0 0 52px transparent,
    0 0 0 54px rgba(139,90,43,0.1);
  pointer-events: none;
}

/* 年轮进度环 — 外层高亮 */
.acnh-rings {
  position: absolute; inset: 12px; border-radius: 50%;
  pointer-events: none;
}
.acnh-ring {
  position: absolute; border-radius: 50%;
  border: 3px solid transparent;
  transition: border-color 0.8s ease;
}
.acnh-ring:nth-child(1) { inset: 0; }
.acnh-ring:nth-child(2) { inset: 18px; }
.acnh-ring:nth-child(3) { inset: 36px; }
.acnh-ring:nth-child(4) { inset: 54px; }
.acnh-ring:nth-child(5) { inset: 72px; }
.acnh-ring.lit {
  border-color: rgba(165,214,110,0.6);
  box-shadow: 0 0 12px rgba(165,214,110,0.25), inset 0 0 8px rgba(165,214,110,0.1);
}

/* 中心凹陷 */
.acnh-stump-center {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100px; height: 70px;
  background: radial-gradient(ellipse, #3a2610 0%, #1a0e04 100%);
  border-radius: 50%;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.6), 0 0 0 3px rgba(90,60,30,0.5);
}

/* 时间数字（树桩上雕刻） */
.acnh-stump-time {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: "Georgia", "Noto Serif SC", serif;
  font-size: 2rem; font-weight: 700;
  color: #f5e6c8;
  text-shadow:
    0 0 10px rgba(249,168,37,0.4),
    0 2px 4px rgba(0,0,0,0.6);
  letter-spacing: 0.08em;
  z-index: 2;
  pointer-events: none;
}

/* 状态标签 */
.acnh-stump-label {
  position: absolute;
  top: 58%; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; color: #b8a070;
  z-index: 2;
  pointer-events: none;
}

/* ── 树苗 ── */
.acnh-sapling {
  position: absolute; top: -70px; left: 50%; transform: translateX(-50%);
  z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity 0.6s;
  text-align: center;
}
.acnh-sapling.visible { opacity: 1; }
.acnh-sapling-stem {
  width: 4px; height: 0;
  background: linear-gradient(to top, #6b4226, #8b5a2b);
  margin: 0 auto; border-radius: 2px;
  transition: height 1s ease;
}
.acnh-sapling.visible .acnh-sapling-stem { height: 40px; }
.acnh-sapling-leaves {
  font-size: 1.8rem;
  animation: acnhSaplingSway 3s ease-in-out infinite;
  margin-top: -10px;
}
@keyframes acnhSaplingSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ── 萤火虫 ── */
.acnh-fireflies {
  position: absolute; inset: -60px;
  pointer-events: none; z-index: 0;
}
.acnh-firefly {
  position: absolute;
  width: 4px; height: 4px;
  background: radial-gradient(circle, #ffe8a0 0%, transparent 70%);
  border-radius: 50%;
  box-shadow: 0 0 8px 3px rgba(255,220,100,0.5);
  animation: acnhFirefly 4s ease-in-out infinite;
}
.acnh-firefly:nth-child(1) { top: 15%; left: 5%; animation-delay: 0s; animation-duration: 3.5s; }
.acnh-firefly:nth-child(2) { top: 5%; left: 30%; animation-delay: 0.8s; animation-duration: 4.2s; }
.acnh-firefly:nth-child(3) { top: 10%; left: 60%; animation-delay: 1.6s; animation-duration: 3.8s; }
.acnh-firefly:nth-child(4) { top: 25%; left: 85%; animation-delay: 2.4s; animation-duration: 4.5s; }
.acnh-firefly:nth-child(5) { top: 50%; left: 90%; animation-delay: 0.4s; animation-duration: 3.2s; }
.acnh-firefly:nth-child(6) { top: 70%; left: 80%; animation-delay: 1.2s; animation-duration: 4.0s; }
.acnh-firefly:nth-child(7) { top: 80%; left: 40%; animation-delay: 2.0s; animation-duration: 3.6s; }
.acnh-firefly:nth-child(8) { top: 75%; left: 10%; animation-delay: 2.8s; animation-duration: 4.3s; }
.acnh-firefly:nth-child(9) { top: 40%; left: 3%; animation-delay: 1.0s; animation-duration: 3.9s; }

@keyframes acnhFirefly {
  0%, 100% { transform: translate(0, 0); opacity: 0.2; }
  25% { transform: translate(15px, -20px); opacity: 0.8; }
  50% { transform: translate(-10px, -35px); opacity: 0.3; }
  75% { transform: translate(8px, -15px); opacity: 0.7; }
}

/* ── 木牌按钮 ── */
.acnh-wood-btn {
  padding: 0.45rem 1.2rem !important;
  border: none !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #c4a46c 0%, #a08050 60%, #8b6838 100%) !important;
  color: #3a2010 !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  box-shadow:
    0 3px 0 #5a3e20,
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,220,160,0.2) !important;
  transition: all 0.15s ease !important;
  text-shadow: 0 1px 0 rgba(255,220,160,0.3);
  letter-spacing: 0.03em;
}
.acnh-wood-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 0 #5a3e20, 0 6px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,220,160,0.3) !important;
  background: linear-gradient(180deg, #d4b47c 0%, #b09060 60%, #9b7848 100%) !important;
}
.acnh-wood-btn:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #5a3e20, 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* 木牌次要按钮 */
.acnh-wood-btn-sec {
  background: linear-gradient(180deg, #b8956a 0%, #8b6838 60%, #6b4a24 100%) !important;
  box-shadow: 0 3px 0 #4a2e14, 0 4px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(200,180,140,0.15) !important;
  color: #e8d5b0 !important;
}
.acnh-wood-btn-sec:hover {
  background: linear-gradient(180deg, #c8a57a 0%, #9b7848 60%, #7b5a34 100%) !important;
}

/* 木牌停止按钮 */
.acnh-wood-stop {
  background: linear-gradient(180deg, #c08060 0%, #8b4a2a 60%, #6b3018 100%) !important;
  color: #f5d5c0 !important;
  box-shadow: 0 3px 0 #4a1e0a, 0 4px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,200,160,0.2) !important;
}

/* 模式标签 */
.acnh-stump-mode {
  text-align: center; margin-top: 1rem;
  color: #c0b090; font-size: 0.8rem; font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 控件容器 */
.acnh-stump-controls {
  display: flex; gap: 0.5rem; margin-top: 0.8rem;
  justify-content: center;
}

/* 时间调节 */
.acnh-stump-adjust {
  display: flex; gap: 1rem; margin-top: 0.6rem;
  justify-content: center;
}
.acnh-stump-adjust-col {
  text-align: center;
}
.acnh-stump-adjust-label {
  font-size: 0.7rem; color: #b8a070; margin-bottom: 0.2rem;
}
.acnh-stump-adjust-val {
  font-size: 1rem; color: #f5e6c8; font-weight: 700;
  margin: 0 0.5rem;
}

/* ═══ 滚动条：圆润叶片绿 ═══ */
body[data-theme="acnh"] ::-webkit-scrollbar { width: 8px; }
body[data-theme="acnh"] ::-webkit-scrollbar-track {
  background: rgba(139, 115, 85, 0.06);
  border-radius: 10px;
}
body[data-theme="acnh"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a5d66e, #7cb342) !important;
  border-radius: 10px;
}
body[data-theme="acnh"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b8e67e, #8cc34a) !important;
}

/* ═══ Dashboard 面板 ═══ */
body[data-theme="acnh"] .dash-pane {
  background: rgba(255, 253, 248, 0.7) !important;
  border: 2px solid rgba(139, 115, 85, 0.12) !important;
  border-radius: 20px !important;
}
body[data-theme="acnh"] .dash-tab {
  border-radius: 16px 16px 0 0 !important;
}
body[data-theme="acnh"] .dash-tab.active {
  background: rgba(124, 179, 66, 0.12) !important;
  border-bottom: 3px solid var(--accent) !important;
}

/* ═══ 验证弹窗 ═══ */
body[data-theme="acnh"] .verify-box {
  background: linear-gradient(160deg, #faf6ee 0%, #f0e8d5 100%) !important;
  border: 3px solid rgba(139, 115, 85, 0.2) !important;
  border-radius: 24px !important;
  box-shadow: 0 12px 48px rgba(139, 115, 85, 0.2) !important;
}

/* ═══ 命令面板 ═══ */
body[data-theme="acnh"] .cp-overlay {
  backdrop-filter: blur(8px) saturate(0.8);
}
body[data-theme="acnh"] .cp-panel {
  background: #fffef9 !important;
  border: 2px solid rgba(124, 179, 66, 0.25) !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 40px rgba(139, 115, 85, 0.2) !important;
}

/* ═══ 任务勾选框 ═══ */
body[data-theme="acnh"] .task-check {
  border-radius: 14px !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
body[data-theme="acnh"] .task-check.done {
  background: rgba(124, 179, 66, 0.1) !important;
  border-color: rgba(124, 179, 66, 0.3) !important;
}
body[data-theme="acnh"] .task-check:hover {
  transform: translateX(4px);
}

/* ═══ Live2D Pio 柔化 ═══ */
body[data-theme="acnh"] #live2d {
  filter: drop-shadow(0 4px 12px rgba(139, 115, 85, 0.15)) saturate(1.05);
}

@media (max-width: 600px) {
  #live2d, #waifu, #waifu-tips { display: none !important; }
}
@media (min-width: 601px) {
  #live2d { transform: scale(.72); transform-origin: bottom left; }
}

/* ═══ 技能树 ═══ */
body[data-theme="acnh"] .skill-tree-node {
  border-radius: 50% !important;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
body[data-theme="acnh"] .skill-tree-node:hover {
  transform: scale(1.25);
}

/* ═══ 全局弹跳动效 ═══ */
body[data-theme="acnh"] .achievement-row:hover,
body[data-theme="acnh"] .module-list-item:hover {
  transform: translateX(6px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ═══ 专注模式 ═══ */
body[data-theme="acnh"].focus-mode-active {
  background: linear-gradient(160deg, #f5f0e8 0%, #e8dcc8 100%) !important;
}
body[data-theme="acnh"] #focus-exit-btn {
  color: #5a4a38 !important;
  background: rgba(245,240,232,0.9) !important;
  border: 2px solid rgba(139,115,85,0.2) !important;
  border-radius: 20px !important;
}

/* ═══ 成就墙 ═══ */
body[data-theme="acnh"] #achievement-wall-overlay {
  background: linear-gradient(160deg, rgba(245,240,232,0.98), rgba(237,228,211,0.98)) !important;
}

/* ═══ 通知气泡优化 ═══ */
body[data-theme="acnh"] .geek-notification::after,
body[data-theme="acnh"] .notification-toast::after {
  border-left: 6px solid transparent !important;
  border-right: 6px solid transparent !important;
  border-top: 6px solid rgba(139,115,85,0.15) !important;
  bottom: -6px !important;
  left: 20px !important;
}

/* ═══ 动效降级 ═══ */
@media (prefers-reduced-motion: reduce) {
  body[data-theme="acnh"] button,
  body[data-theme="acnh"] .btn-neon,
  body[data-theme="acnh"] .stage-card,
  body[data-theme="acnh"] .module-card,
  body[data-theme="acnh"] .task-check {
    transition: none !important;
    transform: none !important;
  }
  body[data-theme="acnh"]::after { animation: none !important; }
}

/* ═══════════════════════════════════════════
   设置面板样式
   ═══════════════════════════════════════════ */

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.settings-panel {
  width: 340px;
  max-width: 90vw;
  max-height: 100vh;
  overflow-y: auto;
  background: var(--bg-deep);
  border-left: 1px solid var(--border-glass);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
  padding: 0;
  transform: translateX(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-glass);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.settings-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.settings-body {
  padding: 1rem 1.2rem;
}

.settings-group {
  margin-bottom: 1.2rem;
}

.settings-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.settings-toggle input {
  display: none;
}
.toggle-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: relative;
  transition: background 0.25s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: transform 0.25s;
}
.settings-toggle input:checked + .toggle-track {
  background: var(--accent);
}
.settings-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}
.toggle-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.settings-select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.settings-select:focus {
  border-color: var(--accent);
}

.settings-themes {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.settings-theme-btn {
  flex: 1;
  min-width: 80px;
  padding: 0.4rem 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.settings-theme-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.settings-theme-btn.active {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   成就墙样式
   ═══════════════════════════════════════════ */

.ach-wall-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 11, 20, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ach-wall-container {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.2rem;
}

.ach-wall-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-glass);
}
.ach-wall-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.ach-wall-count {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
}
.ach-wall-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s;
}
.ach-wall-close:hover { color: var(--text-primary); }

/* Next achievement */
.ach-wall-next {
  margin-bottom: 1rem;
}
.ach-next-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.ach-next-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
}
.ach-next-icon {
  font-size: 2rem;
}
.ach-next-info {
  flex: 1;
}
.ach-next-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ach-next-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.ach-next-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ach-next-bar-bg {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.ach-next-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent2));
  border-radius: 3px;
  transition: width 180ms ease;
}
.ach-next-ratio {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}

/* Achievement grid */
.ach-wall-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ach-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
}
.ach-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ach-card.ach-unlocked {
  border-color: rgba(0, 255, 136, 0.2);
  background: rgba(0, 255, 136, 0.03);
}
.ach-card.ach-unlocked .ach-card-icon {
  animation: ach-breath 2s ease-in-out infinite;
}
@keyframes ach-breath {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.6)); }
}

.ach-card.ach-locked {
  opacity: 0.55;
}

.ach-card.ach-rare.ach-unlocked {
  border-color: gold;
  background: rgba(255, 215, 0, 0.06);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.1);
}

.ach-card-icon {
  font-size: 1.6rem;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.ach-card-icon.ach-icon-locked {
  filter: grayscale(1);
  opacity: 0.5;
}

.ach-card-body {
  flex: 1;
  min-width: 0;
}
.ach-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ach-card-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.ach-card-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.15rem;
}
.ach-card-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 180ms ease;
}
.ach-card-ratio {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.ach-card-badge {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   骨架屏 / Loader 样式
   ═══════════════════════════════════════════ */

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deep);
  gap: 1rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ldr-spin 0.8s linear infinite;
}
@keyframes ldr-spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Skeleton placeholders inside loader */
.loader-skeletons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 240px;
}
.skeleton-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-bar:nth-child(2) { width: 80%; }
.skeleton-bar:nth-child(3) { width: 60%; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════
   G1: 数据管理按钮
   ═══════════════════════════════════════════ */
.settings-backup-btns {
  display: flex;
  gap: 0.4rem;
}
.settings-backup-btn {
  flex: 1;
  padding: 0.5rem 0.4rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.settings-backup-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.06);
}

/* ═══════════════════════════════════════════
   G2: 路径视图切换
   ═══════════════════════════════════════════ */
/* Path controls */
.path-custom-banner {
  grid-column: 1 / -1;
  padding: 0.5rem 0.8rem; border-radius: 10px;
  font-size: 0.78rem; font-weight: 700; color: #ffcc00;
  background: rgba(255, 204, 0, 0.08); border: 1px dashed rgba(255, 204, 0, 0.35);
  text-align: center;
}
.path-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.path-view-toggle {
  display: flex;
  gap: 0.3rem;
}
.path-view-btn {
  padding: 0.3rem 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.path-view-btn:hover {
  border-color: var(--accent);
  color: var(--text-secondary);
}
.path-view-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-cyan);
}
.path-filter-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  min-height: 44px;
}
.path-filter-label input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  color-scheme: dark;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

/* 列表模式 */
.modules-container-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.module-list-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
}
.module-list-item:hover {
  border-color: rgba(0, 212, 255, 0.2);
}
.module-list-item.module-skipped {
  opacity: 0.4;
  border-left: 2px solid var(--text-dim);
}
.module-list-item.module-priority {
  border-left: 2px solid var(--accent-cyan);
}
.module-list-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
}
.module-list-icon {
  font-size: 1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.module-list-title {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-list-progress {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 100px;
}
.module-list-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  min-width: 50px;
}
.module-list-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 180ms ease;
}
.module-list-pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  min-width: 32px;
  text-align: right;
}
.module-list-expand {
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.module-list-expand:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.module-list-daily {
  padding: 0.4rem 0.7rem 0.5rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
  animation: fadeSlideIn 0.2s ease;
}
.module-list-daily .module-daily-item {
  padding: 0.2rem 0;
  font-size: 0.75rem;
}
.module-list-daily .module-daily-check {
  width: 8px;
  height: 8px;
  position: static;
  flex-shrink: 0;
}
.module-list-item.expanded {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

@media (max-width: 768px) {
  .module-list-row {
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.75rem;
  }
  .module-list-progress {
    min-width: 80px;
  }
  .module-list-bar {
    min-width: 30px;
  }
}

/* ═══════════════════════════════════════════
   G3: 亮色主题 (for auto mode on light system)
   ═══════════════════════════════════════════ */
body[data-theme="light"] {
  --bg: #f5f5f5;
  --bg-deep: #e8e8e8;
  --bg-panel: rgba(245, 245, 245, 0.92);
  --bg-glass: rgba(240, 240, 240, 0.7);
  --accent: #007acc;
  --accent2: #009966;
  --accent-cyan: #0088cc;
  --accent-success: #009966;
  --accent3: #8844cc;
  --accent-warn: #cc6600;
  --accent-pink: #cc3366;
  --accent-danger: #cc3366;
  --text-primary: #1a1a1a;
  --text-secondary: #444444;
  --text-dim: #888888;
  --border-glass: rgba(0, 0, 0, 0.1);
  --font-main: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body[data-theme="light"]::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 122, 204, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(136, 68, 204, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 153, 102, 0.02) 0%, transparent 70%);
}
body[data-theme="light"]::after {
  background-image:
    linear-gradient(rgba(0, 122, 204, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 122, 204, 0.04) 1px, transparent 1px);
}
body[data-theme="light"] .module-daily-list::before {
  background: rgba(0, 122, 204, 0.15);
}
body[data-theme="light"] .task-check.done .task-check-text {
  color: #aaa;
}

/* ═══════════════════════════════════════════
   Group F: Focus Mode + Daily Summary + Module Celebration
   ═══════════════════════════════════════════ */

/* F1: Focus Mode */
body.focus-mode-active #topbar,
body.focus-mode-active #nav,
body.focus-mode-active #dashboard,
body.focus-mode-active #path,
body.focus-mode-active #toolbox,
body.focus-mode-active #briefing-section,
body.focus-mode-active #mission-extras,
body.focus-mode-active #extra-briefing,
body.focus-mode-active #pane-progress,
body.focus-mode-active #footer,
body.focus-mode-active .footer-mini {
  display: none !important;
}

body.focus-mode-active #mission {
  max-width: 700px;
  margin: 10vh auto 0;
  padding: 2rem;
}

body.focus-mode-active {
  background: linear-gradient(135deg, #060b14 0%, #0a1628 100%);
}

/* Focus workspace: use the viewport instead of leaving the mission tiny in the middle. */
body.focus-mode-active #mission {
  width: min(1180px, calc(100vw - 4rem));
  max-width: none;
  margin: 6vh auto 0;
  padding: 0;
}
body.focus-mode-active .mission-glass {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
}
body.focus-mode-active .mission-left {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-panel) 72%, transparent);
  box-shadow: 0 18px 48px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
body.focus-mode-active .mission-right { gap: .75rem; }
body.focus-mode-active .mission-right .stat-card { min-height: 128px; }
body.focus-mode-active #waifu,
body.focus-mode-active #waifu-tool,
body.focus-mode-active #waifu-tips,
body.focus-mode-active #waifu-toggle,
body.focus-mode-active #live2d { display: none !important; }

body.pio-hidden #waifu,
body.pio-hidden #waifu-tool,
body.pio-hidden #waifu-tips,
body.pio-hidden #waifu-toggle,
body.pio-hidden #live2d { display: none !important; }

.sw-update-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .65rem .55rem .8rem;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--surface, #111827) 92%, transparent);
  border: 1px solid var(--border-control);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  font-size: .78rem;
}
.sw-update-toast button { border: 0; border-radius: 7px; padding: .35rem .6rem; cursor: pointer; font: inherit; }
.sw-update-toast #sw-update { background: var(--accent); color: #061018; font-weight: 700; }
.sw-update-toast #sw-dismiss { background: transparent; color: var(--text-dim); font-size: 1rem; padding-inline: .35rem; }
body.focus-mode-active .sw-update-toast { display: none; }
body.focus-mode-active .mission-right { display: none; }
body.focus-mode-active .mission-glass { grid-template-columns: minmax(0, 820px); justify-content: center; }
.briefing-source-note { margin-bottom: .35rem; color: var(--text-dim); font-size: .68rem; }
.briefing-item { border-bottom: 1px solid rgba(255,255,255,.05); }
.briefing-item:hover span:nth-child(2) { color: var(--accent-cyan) !important; }
.plan-next-label { display:inline-flex; margin-top:.35rem; padding:.15rem .45rem; border-radius:999px; color:var(--accent-cyan); background:rgba(0,212,255,.09); font-size:.68rem; }
.plan-order-actions { display:flex; gap:.3rem; }
.plan-order-btn { width:2rem; height:2rem; border:1px solid var(--border-control); border-radius:7px; color:var(--text-secondary); background:var(--control-bg); cursor:pointer; }
.plan-order-btn:disabled { opacity:.3; cursor:not-allowed; }
.plan-order-btn:not(:disabled):hover { color:var(--accent-cyan); background:var(--control-bg-hover); }
.task-outcome { background:rgba(0,255,136,.035); border-left:2px solid rgba(0,255,136,.35); padding-left:.8rem; }
.task-outcome-intro { margin:.2rem 0 .35rem; color:var(--text-secondary); font-size:.76rem; }
.task-outcome-list { margin:0; padding-left:1.1rem; color:var(--text-primary); font-size:.78rem; line-height:1.65; }
.task-outcome-list li::marker { color:var(--accent2); }
.dashboard-start-btn { margin-top:.9rem; padding:.55rem 1rem; border:1px solid var(--accent-cyan); border-radius:8px; color:var(--accent-cyan); background:rgba(0,212,255,.08); cursor:pointer; font-weight:700; }
.dashboard-empty-help { margin:.45rem auto 0; max-width:360px; color:var(--text-dim); font-size:.72rem; }
.verify-criteria-list { margin:.35rem 0 .7rem; padding-left:1.1rem; color:var(--text-secondary); font-size:.76rem; line-height:1.55; }

@media (max-width: 768px) {
  body.focus-mode-active #mission { width: calc(100vw - 2rem); margin-top: 1rem; }
  body.focus-mode-active .mission-glass { grid-template-columns: 1fr; }
  body.focus-mode-active .mission-right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  body.focus-mode-active * {
    transition: none !important;
  }
}

/* Fresh Pomodoro */
.fresh-pomo-overlay {
  position: fixed;
  inset: 0;
  z-index: 22000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 7, 13, 0.74);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.fresh-pomo-overlay[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fresh-pomo-modal {
  position: relative;
  width: min(92vw, 430px);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 28, 44, 0.96), rgba(8, 13, 24, 0.98)),
    var(--bg-card, var(--bg-panel));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.22s ease;
}

.fresh-pomo-overlay[data-open="true"] .fresh-pomo-modal {
  transform: translateY(0) scale(1);
}

.fresh-pomo-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fresh-pomo-close:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.fresh-pomo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 2.4rem;
}

.fresh-pomo-kicker {
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.fresh-pomo-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

.fresh-pomo-session {
  min-width: 64px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(0, 212, 255, 0.16);
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.06);
  text-align: center;
}

.fresh-pomo-session span {
  display: block;
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
}

.fresh-pomo-session small {
  display: block;
  color: var(--text-dim);
  font-size: 0.64rem;
}

.fresh-pomo-ring-wrap {
  position: relative;
  width: min(72vw, 280px);
  aspect-ratio: 1;
  margin: 1.25rem auto 1rem;
}

.fresh-pomo-ring {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 22px rgba(0, 212, 255, 0.12));
  transform: rotate(-90deg);
}

.fresh-pomo-ring-track,
.fresh-pomo-ring-progress {
  fill: none;
  stroke-width: 10;
}

.fresh-pomo-ring-track {
  stroke: rgba(255, 255, 255, 0.07);
}

.fresh-pomo-ring-progress {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.12s linear, stroke 0.22s ease;
}

.fresh-pomo-overlay.is-break .fresh-pomo-ring-progress {
  stroke: var(--accent2);
}

.fresh-pomo-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
}

.fresh-pomo-mode {
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.fresh-pomo-time {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: clamp(2.65rem, 13vw, 4.35rem);
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(0, 212, 255, 0.16);
}

.fresh-pomo-overlay.is-running .fresh-pomo-time {
  animation: freshPomoPulse 2.4s ease-in-out infinite;
}

.fresh-pomo-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.fresh-pomo-primary,
.fresh-pomo-secondary {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fresh-pomo-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #06101b;
}

.fresh-pomo-secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.fresh-pomo-primary:hover,
.fresh-pomo-secondary:hover {
  transform: translateY(-1px);
}

.fresh-pomo-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.fresh-pomo-settings label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.fresh-pomo-settings input {
  width: 100%;
  min-width: 42px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-align: center;
  outline: none;
}

.fresh-pomo-settings em {
  color: var(--text-dim);
  font-style: normal;
}

@keyframes freshPomoPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.86; }
}

@media (max-width: 480px) {
  .fresh-pomo-modal {
    padding: 1rem;
    border-radius: 18px;
  }

  .fresh-pomo-controls,
  .fresh-pomo-settings {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fresh-pomo-overlay,
  .fresh-pomo-modal,
  .fresh-pomo-ring-progress,
  .fresh-pomo-primary,
  .fresh-pomo-secondary {
    transition: none !important;
  }

  .fresh-pomo-overlay.is-running .fresh-pomo-time {
    animation: none !important;
  }
}

/* F2: Daily Summary */
@keyframes dsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .daily-summary-overlay {
    animation: none !important;
  }
}

/* F3: Module Celebration */
@keyframes mcBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes mcSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .mcBounce,
  .mcSlideUp {
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════
   FreshPomo — Apple Watch style timer
   ═══════════════════════════════════════════ */
.fresh-pomo-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 11, 20, 0.92); backdrop-filter: blur(16px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.fresh-pomo-overlay[data-open="true"] {
  opacity: 1; visibility: visible;
}

/* 今日行动：把复习、断更恢复和周复盘放回主学习路径。 */
.learning-loop-card { flex: 1 1 100%; padding: .85rem 1rem; }
.learning-loop-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.learning-loop-main strong { display: block; color: var(--text-primary); font-size: .86rem; }
.learning-loop-main strong + span { display: block; margin-top: .25rem; color: var(--text-dim); }
.learning-loop-stats { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.learning-loop-stats span { padding: .25rem .5rem; border: 1px solid var(--border-glass); border-radius: 999px; color: var(--text-secondary); white-space: nowrap; }
.learning-loop-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.learning-loop-actions button { min-height: 36px; }
.weekly-review-form { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border-glass); }
.weekly-review-form label { display: block; margin-bottom: .4rem; color: var(--text-secondary); }
.weekly-review-form textarea { width: 100%; box-sizing: border-box; padding: .65rem; border: 1px solid var(--border-glass); border-radius: 8px; background: var(--bg-deep); color: var(--text-primary); resize: vertical; }
.weekly-review-form button { margin-top: .5rem; }

.task-resource-refresh {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin-left: .35rem;
  padding: 0;
  border: 1px solid rgba(79, 195, 247, .22);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(31, 45, 64, .95), rgba(9, 17, 29, .95));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 3px 8px rgba(0, 0, 0, .3);
  color: var(--accent-cyan);
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.task-resource-refresh:hover {
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 0 12px rgba(79, 195, 247, .18);
}
.task-resource-refresh:active { transform: translateY(1px); }
.task-resource-refresh:disabled { opacity: .5; cursor: wait; transform: none; }

/* 首屏只保留专注与设置；低频控制收进“更多”。 */
.topbar-more-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; }
.topbar-more-menu { display: none; position: absolute; top: 52px; right: .7rem; z-index: 1000; padding: .45rem; gap: .3rem; background: var(--bg-panel); border: 1px solid var(--border-glass); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.topbar-more-menu.is-open { display: flex; align-items: center; flex-wrap: wrap; }

@media (max-width: 768px) {
  .learning-loop-main { align-items: flex-start; flex-direction: column; }
  .learning-loop-stats { justify-content: flex-start; }
  .learning-loop-actions { display: grid; grid-template-columns: 1fr; }
  .learning-loop-actions button { width: 100%; }
  .topbar-more-menu { top: 48px; right: .5rem; }
}
.fresh-pomo-modal {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(79, 195, 247, 0.15);
  border-radius: 24px; padding: 32px 28px 28px;
  width: 360px; max-width: 94vw;
  box-shadow: 0 0 80px rgba(79, 195, 247, 0.08), 0 24px 48px rgba(0,0,0,0.4);
  position: relative;
  animation: fpFadeUp 0.4s cubic-bezier(0.16,1,0.3,1);
}
@keyframes fpFadeUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.fresh-pomo-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: rgba(224,224,224,0.4);
  font-size: 28px; cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.fresh-pomo-close:hover { color: #e0e0e0; }
.fresh-pomo-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
}
.fresh-pomo-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 2px;
  color: rgba(79, 195, 247, 0.7); margin: 0 0 4px;
}
.fresh-pomo-head h2 {
  margin: 0; font-size: 20px; font-weight: 600; color: #e0e0e0;
}
.fresh-pomo-session {
  text-align: right;
}
.fresh-pomo-session span {
  font-size: 28px; font-weight: 700; color: #4fc3f7; display: block;
  line-height: 1;
}
.fresh-pomo-session small {
  font-size: 11px; color: rgba(224,224,224,0.5);
}
.fresh-pomo-ring-wrap {
  position: relative; width: 240px; height: 240px;
  margin: 0 auto 24px;
}
.fresh-pomo-ring {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.fresh-pomo-ring-track {
  fill: none; stroke: #1a2540; stroke-width: 8;
}
.fresh-pomo-ring-progress {
  fill: none; stroke: #4fc3f7; stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}
.fresh-pomo-overlay.is-break .fresh-pomo-ring-progress {
  stroke: #81c784;
}
.fresh-pomo-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.fresh-pomo-mode {
  font-size: 12px; color: rgba(224,224,224,0.5);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.fresh-pomo-time {
  font-size: 48px; font-weight: 300; color: #e0e0e0;
  font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.fresh-pomo-controls {
  display: flex; gap: 12px; margin-bottom: 20px;
}
.fresh-pomo-primary {
  flex: 1; padding: 12px; border: none; border-radius: 14px;
  background: #4fc3f7; color: #0a0f1a;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fresh-pomo-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.3);
}
.fresh-pomo-primary:active { transform: scale(0.97); }
.fresh-pomo-overlay.is-running .fresh-pomo-primary {
  background: rgba(79, 195, 247, 0.15); color: #4fc3f7;
}
.fresh-pomo-secondary {
  padding: 12px 20px; border: 1px solid rgba(224,224,224,0.15);
  border-radius: 14px; background: transparent; color: rgba(224,224,224,0.6);
  font-size: 15px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.fresh-pomo-secondary:hover { border-color: rgba(224,224,224,0.4); color: #e0e0e0; }
.fresh-pomo-settings {
  display: flex; gap: 16px; justify-content: center;
}
.fresh-pomo-settings label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(224,224,224,0.5);
}
.fresh-pomo-settings input {
  width: 48px; padding: 4px 6px; border: 1px solid rgba(224,224,224,0.15);
  border-radius: 8px; background: rgba(15,23,42,0.8); color: #e0e0e0;
  text-align: center; font-size: 15px; font-variant-numeric: tabular-nums;
}
.fresh-pomo-settings em {
  font-style: normal; color: rgba(224,224,224,0.3);
}
#fresh-pomo-btn {
  background: transparent; border: 1px solid #4fc3f7; border-radius: 14px;
  color: #4fc3f7; padding: 8px 20px; font-size: 14px;
  cursor: pointer; transition: background 0.2s, box-shadow 0.2s;
}
#fresh-pomo-btn:hover {
  background: rgba(79, 195, 247, 0.08);
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.15);
}
@media (prefers-reduced-motion: reduce) {
  .fresh-pomo-overlay { transition: none !important; }
  .fresh-pomo-modal { animation: none !important; }
  .fresh-pomo-ring-progress { transition: none !important; }
}

/* Focused visual pass: neon accents, hierarchy, and compact data graphics. */
body::before {
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 212, 255, 0.055), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(0, 255, 136, 0.045), transparent 34%),
    radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.012), transparent 60%);
}

.glass-card, .stage-card, .module-card, .tool-card, .achievement-row {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.glass-card:hover, .stage-card:hover, .module-card:hover, .tool-card:hover {
  transform: translateY(-2px);
}
.btn-neon, .nav-item.active, .task-tier-tab.active {
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2), 0 0 4px rgba(0, 255, 136, 0.12);
}
.btn-neon:hover:not(:disabled), .nav-item.active:hover, .task-tier-tab.active:hover {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.42), 0 0 10px rgba(0, 255, 136, 0.24);
}
.stage-progress-fill, .module-progress-fill, .mini-fill, .achievement-fill { transition: width 200ms ease; }
.gamify-reward { position: fixed; z-index: 9999; left: 50%; top: 42%; display: grid; gap: .3rem; min-width: 210px; padding: 1rem 1.4rem; text-align: center; color: var(--text-primary); background: linear-gradient(135deg, rgba(20,25,45,.97), rgba(65,25,90,.96)); border: 1px solid var(--accent-cyan); border-radius: 14px; box-shadow: 0 0 30px rgba(0,212,255,.35), 0 0 50px rgba(170,68,255,.2); pointer-events: none; }
.gamify-reward span { color: var(--text-secondary); font-size: .8rem; }.gamify-reward-emoji { font-size: 2rem; }
.gamify-today-progress { display: flex; align-items: center; gap: .6rem; margin: .6rem 0; color: var(--text-dim); font-size: .75rem; }
.gamify-today-progress progress { flex: 1; height: 5px; accent-color: var(--accent2); }

.task-section { padding: 0.75rem 0; border-top: 1px solid rgba(255,255,255,0.08); }
.task-section:first-of-type { border-top: 0; }
.task-section-title {
  margin-bottom: 0.45rem; color: var(--accent-cyan); font: 700 0.68rem/1 var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.task-title { color: var(--text-primary); font-size: 0.88rem; font-weight: 700; }
.task-subtasks .task-check { padding: 0.55rem 0; }
.task-verification { border-top-color: rgba(0,255,136,0.14); }
.task-verification .task-section-title { color: var(--accent2); }
.task-verify-hint { color: var(--text-dim); font-size: 0.78rem; }
.mission-actions { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.8rem; }
.empty-state { display: grid; place-items: center; gap: 0.25rem; min-height: 150px; }
.empty-state::before { content: '◌'; display: block; color: var(--accent-cyan); font-size: 2.4rem; opacity: 0.55; }

.progress-donut {
  position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin: 0 auto 0.6rem;
  border-radius: 50%; background: conic-gradient(var(--accent-cyan) 0 calc(var(--progress-pct) * 1%), rgba(255,255,255,0.07) 0);
  box-shadow: 0 0 22px rgba(0,212,255,0.18);
}
.progress-donut::before { content: ''; position: absolute; width: 86px; height: 86px; border-radius: 50%; background: var(--bg-deep); }
.progress-donut span { position: relative; z-index: 1; color: var(--text-primary); font: 800 1.1rem var(--font-mono); }
.weekly-trend .weekly-bar { box-shadow: 0 0 8px rgba(0,212,255,0.18); transition: height 200ms ease; }
.streak-hero { display: inline-grid; place-items: center; width: 74px; height: 74px; margin: 0.25rem auto; border-radius: 50%; background: radial-gradient(circle, rgba(255,102,0,0.2), transparent 68%); }
.streak-hero::before { content: '🔥'; position: absolute; font-size: 3rem; opacity: 0.2; }

.achievement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.55rem; }
.achievement-row { min-width: 0; border: 1px solid transparent; }
.achievement-row.is-unlocked { animation: badgePulse 500ms ease; }
.achievement-row.rarity-0 { border-color: rgba(160,174,192,0.24); }
.achievement-row.rarity-1 { border-color: rgba(0,212,255,0.24); }
.achievement-row.rarity-2 { border-color: rgba(170,68,255,0.3); }
.achievement-row.rarity-3 { border-color: rgba(255,170,0,0.34); }
@keyframes badgePulse { 50% { transform: scale(1.02); box-shadow: 0 0 18px rgba(0,255,136,0.28); } }

@media (max-width: 600px) {
  .achievement-grid { grid-template-columns: 1fr; }
  .progress-donut { width: 96px; height: 96px; }
  .progress-donut::before { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}

/* ═══════════════ TASK KNOWLEDGE (AI 教程) ═══════════════ */
.task-knowledge-btn {
  display: block; width: 100%; margin: 0 0 0.6rem; padding: 0.45rem 0;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  color: var(--accent2, #00d4ff);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 6px; transition: all 0.2s;
}
.task-knowledge-btn:hover, .task-knowledge-btn.active {
  background: rgba(0, 212, 255, 0.18);
  border-color: rgba(0, 212, 255, 0.7);
}
#task-knowledge-area {
  margin-bottom: 0.6rem; padding: 0.6rem 0.7rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.82rem; line-height: 1.65; color: var(--text, #c9d4e3);
}
.kb-h2 { font-size: 0.95rem; font-weight: 700; color: var(--accent2, #00d4ff); margin: 0.8rem 0 0.3rem; }
.kb-h3 { font-size: 0.88rem; font-weight: 700; color: var(--accent, #00ff88); margin: 0.6rem 0 0.25rem; }
.kb-p { margin: 0.25rem 0; }
.kb-li { margin: 0.15rem 0 0.15rem 0.3rem; }
.kb-code {
  display: block; margin: 0.4rem 0; padding: 0.5rem 0.6rem; overflow-x: auto;
  background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px; font-family: Consolas, monospace; font-size: 0.75rem;
  white-space: pre; color: #a5e8a0;
}
.kb-inline {
  padding: 0.05rem 0.3rem; border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  font-family: Consolas, monospace; font-size: 0.75em;
}
.kb-hr { border: none; border-top: 1px dashed rgba(255, 255, 255, 0.15); margin: 0.6rem 0; }
.kb-loading { display: flex; align-items: center; gap: 0.5rem; color: var(--text-dim, #6b7a90); font-size: 0.8rem; }
.kb-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.2); border-top-color: var(--accent2, #00d4ff);
  animation: kb-spin 0.8s linear infinite;
}
@keyframes kb-spin { to { transform: rotate(360deg); } }
.kb-error { color: var(--accent-pink, #ff5f7e); font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.kb-actions { display: flex; gap: 0.4rem; margin-top: 0.6rem; }
.kb-btn {
  padding: 0.3rem 0.7rem; font-size: 0.75rem; cursor: pointer;
  color: var(--text-secondary, #8b9bb4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px; transition: all 0.2s;
}
.kb-btn:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--text, #c9d4e3); }
.kb-ask-area { margin-top: 0.5rem; }
.kb-ask-input {
  width: 100%; box-sizing: border-box; padding: 0.4rem 0.5rem;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px; color: var(--text, #c9d4e3); font-size: 0.8rem;
  font-family: inherit; resize: vertical; outline: none;
}
.kb-ask-input:focus { border-color: rgba(0, 212, 255, 0.5); }
.kb-ask-send { margin-top: 0.3rem; }
.kb-ask-answer { margin-top: 0.5rem; }

/* 模块展开行内链接 */
.module-daily-links { display: inline-flex; gap: 0.15rem; margin-right: 0.3rem; }
.module-daily-link {
  font-size: 0.72rem; text-decoration: none; padding: 0 0.1rem;
  color: var(--accent2, #00d4ff); opacity: 0.85; transition: opacity 0.2s;
}
.module-daily-link:hover { opacity: 1; }

/* Skeuomorphic timer controls. */
#pomo-overlay #pwd:active,
#pomo-overlay #pwu:active,
#pomo-overlay #pbd:active,
#pomo-overlay #pbu:active {
  transform: translateY(3px) scale(.96);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.2), 0 0 0 transparent !important;
}

/* Narrow-phone pass: keep the primary flow inside the viewport. */
@media (max-width: 500px) {

  .topbar { padding-inline: .4rem; gap: .25rem; }
  .topbar-brand, .topbar-right { flex: 0 0 auto; }
  .topbar-nav { min-width: 0; flex: 1 1 auto; }
  .topbar-nav .nav-item { flex: 0 0 auto; }
  .topbar-right { gap: .15rem; }
  .topbar-more-btn { padding-inline: .45rem; white-space: nowrap; }

  .main-content { padding-inline: .6rem; }
  .mission-day-info { flex-wrap: wrap; row-gap: .15rem; }
  .mission-module-name { min-width: 0; overflow-wrap: anywhere; }
  .mission-actions { gap: .45rem; }
  .mission-actions .btn-neon, .mission-actions .btn-glass { min-width: 0; }

  .dash-tabs { scrollbar-width: none; }
  .dash-tabs::-webkit-scrollbar { display: none; }
  .dash-tab { min-width: 5.5rem; min-height: 44px; white-space: nowrap; }
  .dash-pane, .dash-pane > * { min-width: 0; max-width: 100%; }
  .dash-content { padding-inline: .5rem; overflow: hidden; }

  .task-card { min-width: 0; overflow-wrap: anywhere; }
  .task-card button { width: 100%; min-width: 44px; min-height: 44px; }
  progress-ring { max-width: 100%; }

  .modal-glass, .completion-overlay, .fresh-pomo-overlay { align-items: flex-start; padding: .75rem; overflow-y: auto; }
  .modal-inner, .completion-dialog, .fresh-pomo-modal { width: 100%; max-width: 100%; margin-block: auto; }
  .modal-btns { flex-wrap: wrap; }
  .modal-btns > button { flex: 1 1 8rem; min-width: 44px; min-height: 44px; }
  .completion-dialog { padding: 1.25rem; }
}

@media (max-width: 400px) {
  .main-content { padding-inline: .45rem; }
  .section-dashboard { border-radius: 10px; }
  .dash-content { padding-inline: .4rem; }
  .task-card { padding: .8rem; }
  .mission-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mission-actions .btn-icon { padding-inline: .25rem; }
}
