/* ==========================================================================
   星光英语岛 · Warm Tactile Adventure Design System
   ========================================================================== */

:root {
  /* Core Palette - Sunlit Paper (Default) */
  --bg-page: #FBF8F1;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F4EFE4;
  --bg-accent-soft: #ECFDF5;
  --bg-warm-soft: #FFFBEB;
  --bg-blue-soft: #EFF6FF;
  --bg-rose-soft: #FFF1F2;
  --bg-violet-soft: #F5F3FF;

  --text-main: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;

  --border-light: #E8E1D3;
  --border-strong: #D6CCB8;

  /* Brand & Semantic Colors */
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-deep: #047857;
  --secondary: #3B82F6;
  --secondary-dark: #2563EB;
  --gold: #F59E0B;
  --gold-dark: #D97706;
  --coral: #F43F5E;
  --coral-dark: #E11D48;
  --violet: #8B5CF6;
  --violet-dark: #7C3AED;
  --orange: #F97316;
  --orange-dark: #EA580C;

  /* Hero Gradient */
  --hero-bg: linear-gradient(135deg, #FFFDF7 0%, #ECFDF5 55%, #FEF3C7 100%);
  --sidebar-bg: #FFFFFF;

  /* Typography */
  --font-display: 'Fredoka', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Nunito', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* Elevation & Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(30, 41, 59, 0.05);
  --shadow-md: 0 8px 24px rgba(30, 41, 59, 0.08);
  --shadow-lg: 0 18px 42px rgba(30, 41, 59, 0.14);

  --sidebar-w: 256px;
  --topbar-h: 68px;
}

/* Unlockable Themes */
body[data-theme="forest"] {
  --bg-page: #F1F8F4;
  --bg-subtle: #E3F1E9;
  --border-light: #CDE4D7;
  --border-strong: #A7CEB8;
  --primary: #059669;
  --primary-dark: #047857;
  --primary-deep: #065F46;
  --hero-bg: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 55%, #FEF9C3 100%);
}

body[data-theme="ocean"] {
  --bg-page: #F0F7FF;
  --bg-subtle: #E0EEFF;
  --border-light: #C7DDF8;
  --border-strong: #9AC2F2;
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-deep: #0369A1;
  --bg-accent-soft: #E0F2FE;
  --hero-bg: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 55%, #FEF3C7 100%);
}

body[data-theme="sakura"] {
  --bg-page: #FFF6F8;
  --bg-subtle: #FCE7EE;
  --border-light: #F6CFD9;
  --border-strong: #EBA8BB;
  --primary: #EC4899;
  --primary-dark: #DB2777;
  --primary-deep: #BE185D;
  --bg-accent-soft: #FDF2F8;
  --hero-bg: linear-gradient(135deg, #FFF5F7 0%, #FCE7F3 55%, #FEF3C7 100%);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ==========================================================================
   App Layout Shell
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 2px solid var(--border-light);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}

.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.25));
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.16s ease;
  border: 2px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--bg-accent-soft);
  color: var(--primary-deep);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--primary) 22%, transparent);
}

.nav-icon {
  font-size: 1.25rem;
  width: 26px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Sidebar Mini Profile */
.sidebar-profile {
  margin-top: auto;
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-radius: 14px;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mini-info {
  flex: 1;
  min-width: 0;
}

.mini-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-weight: 800;
  font-size: 0.88rem;
}

.mini-name-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-mini-btn {
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 0.8rem;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
}

.icon-mini-btn:hover {
  opacity: 1;
  background: var(--bg-subtle);
}

.mini-level {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 2px 0 5px;
}

.xp-bar-wrap {
  width: 100%;
  height: 7px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #34D399);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 3px;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.footer-pill-btn {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 8px 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.footer-pill-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-main);
}

/* Main Column */
.main-column {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg-page) 88%, white);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-light);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.topbar-crumb {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accent-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 2px solid var(--border-light);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.accent-btn {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.accent-btn:hover {
  color: var(--text-main);
}

.accent-btn.active {
  background: var(--bg-surface);
  color: var(--primary-deep);
  box-shadow: var(--shadow-sm);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom-width: 4px;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 0.88rem;
  transition: transform 0.12s ease, border-color 0.15s;
}

.stat-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.stat-chip:active {
  transform: translateY(1px);
}

.streak-chip .stat-val { color: var(--orange-dark); }
.coin-chip .stat-val { color: var(--gold-dark); }
.level-chip .stat-val { color: var(--primary-dark); }
.stat-unit { font-size: 0.76rem; font-weight: 700; color: var(--text-muted); }

.mobile-only-btn {
  display: none;
  padding: 6px 10px;
}

/* View Container */
.app-view {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 26px 28px 60px;
  animation: fadeSlideUp 0.25s ease;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Reusable Tactile Buttons & Cards
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.94rem;
  transition: transform 0.1s ease, filter 0.15s ease, box-shadow 0.1s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border: 2px solid var(--primary-dark);
  border-bottom: 5px solid var(--primary-deep);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
}

.btn-primary:active:not(:disabled) {
  border-bottom-width: 2px;
  margin-top: 3px;
}

.btn-gold {
  background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%);
  color: #451A03;
  border: 2px solid #D97706;
  border-bottom: 5px solid #B45309;
}

.btn-gold:hover:not(:disabled) {
  filter: brightness(1.04);
}

.btn-blue {
  background: var(--secondary);
  color: #FFFFFF;
  border: 2px solid var(--secondary-dark);
  border-bottom: 5px solid #1D4ED8;
}

.btn-coral {
  background: var(--coral);
  color: #FFFFFF;
  border: 2px solid var(--coral-dark);
  border-bottom: 5px solid #BE123C;
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid var(--border-strong);
  border-bottom: 4px solid var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.84rem;
  border-radius: 11px;
  border-bottom-width: 3px;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.02rem;
  border-radius: 16px;
}

.card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.tag-green { background: #DCFCE7; color: #166534; }
.tag-gold { background: #FEF3C7; color: #92400E; }
.tag-blue { background: #DBEAFE; color: #1E40AF; }
.tag-rose { background: #FFE4E6; color: #9F1239; }
.tag-violet { background: #EDE9FE; color: #5B21B6; }
.tag-slate { background: var(--bg-subtle); color: var(--text-secondary); }

/* ==========================================================================
   HOME VIEW: Camp Hero, Check-in Strip, Daily Quests
   ========================================================================== */
.hero-banner {
  background: var(--hero-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.25;
  color: var(--text-main);
}

.hero-desc {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 780px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Interactive Ollie Mascot Stage */
.hero-mascot-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 210px;
}

.mascot-bubble {
  background: #FFFFFF;
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 230px;
  text-align: center;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  animation: popIn 0.25s ease;
}

.mascot-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border-right: 2px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong);
}

.mascot-clickable {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 10px 14px rgba(30, 41, 59, 0.12));
}

.mascot-clickable:hover {
  transform: scale(1.06) translateY(-4px);
}

.mascot-clickable:active {
  transform: scale(0.95);
}

.mascot-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 4px;
}

/* Home Grid */
.home-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  margin-bottom: 24px;
}

/* Check-in Calendar Card */
.checkin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.streak-big {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-flame-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 2px solid #F59E0B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.streak-big-num {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--orange-dark);
}

.streak-big-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.day-pill {
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.day-pill.checked {
  background: linear-gradient(180deg, #ECFDF5, #D1FAE5);
  border-color: var(--primary);
}

.day-pill.today {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.day-pill .day-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
}

.day-pill .day-stamp {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
}

.day-pill.checked .day-stamp {
  background: var(--primary);
  color: #fff;
}

.chest-bar {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 2px dashed #F59E0B;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chest-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chest-icon {
  font-size: 2rem;
  display: inline-block;
}

.chest-icon.wiggle {
  animation: wiggle 1.4s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-10deg) scale(1.08); }
  40% { transform: rotate(10deg) scale(1.08); }
  60% { transform: rotate(-6deg) scale(1.04); }
  80% { transform: rotate(6deg) scale(1.04); }
}

/* Daily Quests */
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-row {
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quest-row.done {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.quest-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.quest-body {
  flex: 1;
  min-width: 0;
}

.quest-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.quest-row.done .quest-progress-fill {
  background: linear-gradient(90deg, var(--primary), #34D399);
}

.quest-reward {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-dark);
  white-space: nowrap;
}

/* Quick Stats Banner */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ==========================================================================
   GRAMMAR VIEW: Unit Adventure Map & Practice Arena
   ========================================================================== */
.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.unit-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.unit-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.unit-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.unit-badge-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
}

.unit-meta {
  flex: 1;
}

.unit-num {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.unit-name {
  margin: 2px 0 4px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
}

.unit-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.unit-stars {
  font-size: 1rem;
  letter-spacing: 2px;
  white-space: nowrap;
}

.unit-mastery-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
}

.unit-mastery-bar {
  flex: 1;
  height: 9px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.unit-mastery-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #34D399);
  transition: width 0.4s ease;
}

.unit-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

/* Lesson Card (学前速记卡) */
.lesson-card {
  max-width: none;
  margin: 0 auto;
}

.lesson-mnemonic-box {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 2px solid #F59E0B;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
}

.lesson-mnemonic-title {
  font-weight: 900;
  color: #92400E;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.lesson-mnemonic-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #78350F;
  line-height: 1.6;
}

.lesson-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.lesson-rule-box {
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 14px;
}

.lesson-rule-box h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  color: var(--primary-deep);
}

.lesson-rule-box p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.lesson-pitfall {
  background: var(--bg-rose-soft);
  border: 2px solid #FECDD3;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  color: #9F1239;
  font-size: 0.9rem;
}

.example-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.example-en {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.98rem;
}

.example-cn {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Practice Arena */
.practice-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.practice-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.practice-progress-track {
  flex: 1;
  height: 14px;
  background: var(--bg-subtle);
  border: 2px solid var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}

.practice-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #34D399);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.combo-pill {
  background: linear-gradient(135deg, #FEF3C7, #FDBA74);
  border: 2px solid #F97316;
  color: #9A3412;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.85rem;
  animation: popIn 0.25s ease;
}

.question-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 5px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.q-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.q-prompt {
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.55;
  margin: 0 0 8px;
}

.q-sub-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.q-blank-slot {
  display: inline-block;
  min-width: 72px;
  border-bottom: 3px solid var(--secondary);
  color: var(--secondary-dark);
  text-align: center;
  padding: 0 6px;
  margin: 0 3px;
}

/* Multiple Choice Options */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.14s ease;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--secondary);
  background: var(--bg-blue-soft);
  transform: translateY(-1px);
}

.option-btn.selected {
  border-color: var(--secondary);
  border-bottom-color: var(--secondary-dark);
  background: #DBEAFE;
  color: #1E3A8A;
}

.option-btn.correct {
  border-color: var(--primary);
  border-bottom-color: var(--primary-deep);
  background: #DCFCE7;
  color: #14532D;
}

.option-btn.wrong {
  border-color: var(--coral);
  border-bottom-color: var(--coral-dark);
  background: #FFE4E6;
  color: #881337;
  animation: shake 0.35s ease;
}

.option-letter {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option-btn.correct .option-letter {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #fff;
}

.option-btn.wrong .option-letter {
  background: var(--coral);
  border-color: var(--coral-dark);
  color: #fff;
}

/* Word-Tile Sentence Builder */
.builder-answer-zone {
  min-height: 68px;
  background: var(--bg-page);
  border: 2.5px dashed var(--border-strong);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  transition: border-color 0.2s, background 0.2s;
}

.builder-answer-zone.correct {
  border-style: solid;
  border-color: var(--primary);
  background: #DCFCE7;
}

.builder-answer-zone.wrong {
  border-style: solid;
  border-color: var(--coral);
  background: #FFE4E6;
}

.builder-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.builder-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.word-tile {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-bottom: 4px solid var(--border-strong);
  border-radius: 13px;
  padding: 9px 15px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.14s ease;
}

.word-tile:hover:not(:disabled) {
  border-color: var(--secondary);
  background: var(--bg-blue-soft);
  transform: translateY(-2px);
}

.word-tile.used {
  opacity: 0.28;
  pointer-events: none;
}

.word-tile.placed {
  background: #EFF6FF;
  border-color: var(--secondary);
  border-bottom-color: var(--secondary-dark);
  color: #1E40AF;
}

/* Fill-in-the-blank Input */
.fill-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.fill-input {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 15px;
  border: 2.5px solid var(--border-strong);
  background: var(--bg-page);
  font-size: 1.08rem;
  font-weight: 800;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fill-input:focus {
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.fill-input.correct {
  border-color: var(--primary);
  background: #DCFCE7;
}

.fill-input.wrong {
  border-color: var(--coral);
  background: #FFE4E6;
}

/* Instant Explanation Panel (带解析!) */
.explanation-box {
  margin-top: 22px;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 2px solid var(--border-light);
  animation: fadeSlideUp 0.25s ease;
}

.explanation-box.is-correct {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.explanation-box.is-wrong {
  background: #FFF1F2;
  border-color: #FDA4AF;
}

.exp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.exp-status {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.explanation-box.is-correct .exp-status { color: #15803D; }
.explanation-box.is-wrong .exp-status { color: #BE123C; }

.exp-detail {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 0.94rem;
  line-height: 1.65;
}

.exp-mnemonic {
  background: #FFFBEB;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 12px;
}

.exp-wrong-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.exp-example-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.practice-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
}

/* Victory / Session Summary Screen */
.summary-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 34px 28px;
}

.summary-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.summary-stat-box {
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 10px;
}

.summary-stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.summary-stat-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ==========================================================================
   READING VIEW: Library & Split Reading Studio
   ========================================================================== */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.filter-pill.active, .filter-pill:hover {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #fff;
}

.reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.reading-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.reading-card:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
}

.reading-cover {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reading-cover-emoji {
  font-size: 2.3rem;
}

.reading-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.reading-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.3;
}

.reading-card-cn {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* Split Reading Studio */
.reading-studio {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 22px;
  align-items: start;
}

.passage-panel {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 36px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.audio-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 14px 0 18px;
}

.passage-body {
  font-size: 1.07rem;
  line-height: 1.95;
  color: var(--text-main);
}

.passage-para {
  margin: 0 0 14px;
}

.passage-sent {
  border-radius: 6px;
  padding: 1px 2px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.passage-sent.speaking {
  background: #DBEAFE;
}

.passage-sent.evidence-glow {
  background: #FEF08A;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.35);
  font-weight: 700;
}

.sent-translation {
  display: block;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 2px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--border-strong);
}

.vocab-word {
  border-bottom: 2px dotted var(--gold);
  color: #B45309;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  padding: 0 2px;
  transition: background 0.15s;
}

.vocab-word:hover {
  background: #FEF3C7;
}

/* Reading Questions Panel */
.reading-q-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rq-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.rq-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.rq-opt-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 0.93rem;
  font-weight: 700;
  transition: all 0.14s;
}

.rq-opt-btn:hover:not(:disabled) {
  border-color: var(--secondary);
  background: var(--bg-blue-soft);
}

.rq-opt-btn.selected {
  border-color: var(--secondary);
  background: #DBEAFE;
  color: #1E3A8A;
}

.rq-opt-btn.correct {
  border-color: var(--primary);
  background: #DCFCE7;
  color: #14532D;
}

.rq-opt-btn.wrong {
  border-color: var(--coral);
  background: #FFE4E6;
  color: #881337;
}

.rq-analysis {
  margin-top: 12px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 0.87rem;
}

/* Vocab Popover */
.vocab-popover {
  position: fixed;
  z-index: 200;
  width: 280px;
  background: var(--bg-surface);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.16s ease;
}

/* ==========================================================================
   VAULT (Mistakes, Vocab Book, Grammar Handbook) & REWARDS (Shop & Badges)
   ========================================================================== */
.tab-bar {
  display: flex;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.16s;
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.vocab-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.vocab-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Rewards Studio */
.wardrobe-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
  align-items: start;
}

.ollie-preview-card {
  background: var(--hero-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px 18px;
  text-align: center;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.shop-item {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.15s;
}

.shop-item:hover {
  transform: translateY(-2px);
}

.shop-item.equipped {
  border-color: var(--primary);
  background: #F0FDF4;
}

.shop-item-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.shop-item-name {
  font-weight: 800;
  font-size: 0.95rem;
}

.shop-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}

/* Real-life Reward Coupons */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.coupon-card {
  background: linear-gradient(135deg, #FFFDF7 0%, #FFFBEB 100%);
  border: 2px dashed #F59E0B;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.voucher-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

/* Badges Wall */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.badge-tile {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: 18px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s;
}

.badge-tile.unlocked {
  border-color: var(--gold);
  background: linear-gradient(180deg, #FFFDF7 0%, #FFFBEB 100%);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.14);
}

.badge-tile.locked {
  opacity: 0.62;
  filter: grayscale(0.75);
}

.badge-emblem {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--bg-subtle);
  border: 3px solid var(--border-strong);
}

.badge-tile.unlocked .badge-emblem {
  background: linear-gradient(135deg, #FEF08A, #F59E0B);
  border-color: #D97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   Modal & Toast Notifications
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 26px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-container {
  position: fixed;
  top: 78px;
  right: 20px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--text-main);
  color: #fff;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.toast.gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFBEB;
}

.toast.green {
  background: linear-gradient(135deg, #10B981, #059669);
}

.toast.rose {
  background: linear-gradient(135deg, #F43F5E, #E11D48);
}

.toast.slate {
  background: linear-gradient(135deg, #334155, #1E293B);
}

/* Floating Score Burst */
.float-burst {
  position: fixed;
  z-index: 700;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-dark);
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  animation: floatUp 1s ease-out forwards;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  background: var(--bg-surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-xl);
}

/* Animations */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(0.9); }
  100% { opacity: 0; transform: translateY(-56px) scale(1.2); }
}

/* Mobile Bottom Nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 2px solid var(--border-light);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 45;
  grid-template-columns: repeat(7, 1fr);
}

/* ==========================================================================
   Tier Switcher & Listening Studio Styles
   ========================================================================== */
.tier-switcher {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 5px;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tier-btn {
  padding: 9px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tier-btn.active {
  background: var(--bg-surface);
  color: var(--primary-deep);
  box-shadow: var(--shadow-sm);
}

.listening-player-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #ECFDF5 55%, #FFFBEB 100%);
  border: 2px solid #93C5FD;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.listening-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.speaker-volume-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.speaker-volume-slider {
  width: 84px;
  accent-color: var(--secondary);
  cursor: pointer;
}

.audio-wave {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
}

.audio-wave span {
  display: block;
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: var(--secondary);
  opacity: 0.45;
  transition: height 0.2s;
}

.audio-wave.playing span {
  opacity: 1;
  animation: waveBounce 0.75s ease-in-out infinite;
}

.audio-wave.playing span:nth-child(2) { animation-delay: 0.12s; }
.audio-wave.playing span:nth-child(3) { animation-delay: 0.24s; }
.audio-wave.playing span:nth-child(4) { animation-delay: 0.36s; }
.audio-wave.playing span:nth-child(5) { animation-delay: 0.18s; }

@keyframes waveBounce {
  0%, 100% { height: 8px; }
  50% { height: 26px; }
}

.transcript-box {
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transcript-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
  transition: background 0.2s, border-color 0.2s;
}

.transcript-line.active-line {
  background: #DBEAFE;
  border-color: var(--secondary);
}

/* ==========================================================================
   365-Day Check-In Star Map & Daily 4-Step Studio
   ========================================================================== */
.year-heatmap {
  display: grid;
  grid-template-columns: repeat(37, minmax(0, 1fr));
  gap: 3px;
  padding: 12px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  margin-top: 12px;
}

.hm-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--border-light);
  cursor: pointer;
  transition: transform 0.12s ease;
  padding: 0;
}

.hm-cell:hover {
  transform: scale(1.45);
  z-index: 2;
}

.hm-cell.done {
  background: var(--primary);
}

.hm-cell.next {
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.hm-cell.milestone {
  background: #FDE68A;
}

.hm-cell.milestone.done {
  background: #F59E0B;
}

.month-tabs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.month-tab-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  transition: all 0.15s ease;
}

.month-tab-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.month-tab-card.active {
  border-color: var(--primary);
  background: var(--bg-accent-soft);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--primary) 25%, transparent);
}

.days-30-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 11px;
}

.day-card-365 {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.14s ease, border-color 0.14s ease;
  position: relative;
}

.day-card-365:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.day-card-365.done {
  background: linear-gradient(180deg, #F0FDF4 0%, #DCFCE7 100%);
  border-color: var(--primary);
  border-bottom-color: var(--primary-dark);
}

.day-card-365.next-up {
  background: linear-gradient(180deg, #FFFDF7 0%, #FEF3C7 100%);
  border-color: var(--gold);
  border-bottom-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.day-card-365.is-milestone {
  border-style: solid;
  border-color: #F59E0B;
}

.step-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.step-pill {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.15s;
}

.step-pill.active {
  border-color: var(--secondary);
  background: var(--bg-blue-soft);
  color: #1E40AF;
}

.step-pill.done {
  border-color: var(--primary);
  background: #ECFDF5;
  color: #065F46;
}

.word-spotlight-card {
  background: linear-gradient(135deg, #FFFDF7 0%, #FEF3C7 55%, #ECFDF5 100%);
  border: 2px solid #F59E0B;
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
}

@media (max-width: 820px) {
  .year-heatmap {
    grid-template-columns: repeat(20, minmax(0, 1fr));
  }
  .step-stepper {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.7rem;
}

.mnav-item.active {
  color: var(--primary-deep);
  background: var(--bg-accent-soft);
}

.mnav-icon { font-size: 1.25rem; }

/* ==========================================================================
   VOCABULARY ISLAND: 5 Memory Methods, SRS Flashcards, Spelling & Match Game
   ========================================================================== */
.vocab-hero {
  grid-template-columns: 1fr 290px;
}

.vocab-progress-box {
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.vp-ring-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

.vp-big-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-deep);
  line-height: 1.2;
  margin-top: 2px;
}

.vp-big-num span {
  font-size: 1rem;
  color: var(--text-muted);
}

.vp-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.vp-mini-item {
  background: var(--bg-page);
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vp-mini-item strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.vp-mini-item span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.method-card {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.method-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.method-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.method-card-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.method-card-name {
  font-weight: 900;
  font-size: 0.94rem;
  line-height: 1.2;
}

.method-card-short {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.method-card-guide {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.method-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.ebbinghaus-banner {
  margin-top: 14px;
  background: linear-gradient(135deg, #FFFBEB 0%, #ECFDF5 100%);
  border: 2px dashed #10B981;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.ebbinghaus-banner strong {
  color: var(--primary-deep);
}

.vocab-stage-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.vocab-stage-tab {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.16s ease;
}

.vocab-stage-tab:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.vocab-stage-tab.active {
  border-color: var(--primary);
  border-bottom-color: var(--primary-dark);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-accent-soft) 100%);
  box-shadow: var(--shadow-sm);
}

.vst-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vst-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}

.vst-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vst-prog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-top: 2px;
}

.vocab-unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.vocab-unit-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.vocab-unit-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.vuc-preview {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-page);
  border-radius: 10px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vuc-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 2px;
}

.vuc-mode-grid .btn:nth-child(1),
.vuc-mode-grid .btn:nth-child(2) {
  grid-column: span 1;
}

.method-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 0.76rem;
  font-weight: 800;
}

.syl-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.syl-dot {
  margin: 0 3px;
  color: var(--text-muted);
  font-weight: 900;
}

/* Unit Word List Grid */
.vocab-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 14px;
}

.vocab-rich-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vrc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.vrc-word-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.vrc-word {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.vrc-phonetic {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vrc-syl-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.vrc-cn {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--primary-deep);
}

.mask-cover-btn {
  width: 100%;
  background: var(--bg-subtle);
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-align: center;
  transition: all 0.15s;
}

.mask-cover-btn:hover {
  background: var(--bg-warm-soft);
  border-color: var(--gold);
  color: #92400E;
}

.vrc-memory-box {
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
}

.vrc-related {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vrc-tip {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.vrc-example {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1.5px dashed var(--border-light);
}

.vrc-ex-en {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.vrc-ex-cn {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Vocab Active Studio (Flashcard, Spelling, Listen, Match, Context) */
.vocab-studio-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.flashcard-stage {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-bottom: 6px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  box-shadow: var(--shadow-md);
}

.fc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.fc-center {
  text-align: center;
  padding: 10px 0 22px;
}

.fc-word {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.fc-phonetic {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
}

.fc-hidden-prompt {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 6px;
}

.fc-syl-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}

.fc-syl-lbl {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-right: 4px;
}

.fc-audio-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.fc-cn {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-top: 16px;
}

.fc-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-bottom: 22px;
}

.fc-detail-box {
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 16px 18px;
}

.fc-detail-title {
  font-weight: 900;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.fc-detail-body {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.6;
}

.fc-related-line {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1.5px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.fc-ex-en {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.55;
}

.fc-ex-cn {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.fc-rate-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 2px solid var(--border-light);
}

.fc-rate-bar .btn {
  padding: 14px 16px;
  border-radius: 16px;
  justify-content: flex-start;
  text-align: left;
  gap: 12px;
}

.fc-rate-bar .btn span {
  font-size: 1.6rem;
}

.fc-rate-bar .btn strong {
  display: block;
  font-size: 0.98rem;
}

.fc-rate-bar .btn small {
  display: block;
  font-size: 0.74rem;
  opacity: 0.85;
  font-weight: 700;
}

.fc-rate-hard {
  background: #FFF1F2;
  color: #9F1239;
  border: 2px solid #FDA4AF;
  box-shadow: 0 4px 0 #FB7185;
}

.fc-rate-good {
  background: #EFF6FF;
  color: #1E40AF;
  border: 2px solid #93C5FD;
  box-shadow: 0 4px 0 #60A5FA;
}

.fc-rate-easy {
  background: #ECFDF5;
  color: #065F46;
  border: 2px solid #6EE7B7;
  box-shadow: 0 4px 0 #10B981;
}

/* Spelling Builder */
.sp-hint-box {
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.sp-slots-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.sp-slot {
  min-width: 44px;
  height: 52px;
  padding: 0 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.sp-slot.empty {
  background: var(--bg-page);
  border: 2px dashed var(--border-strong);
}

.sp-slot.filled {
  background: #EFF6FF;
  border: 2px solid var(--secondary);
  border-bottom: 4px solid var(--secondary-dark);
  color: #1E3A8A;
}

.sp-slot.ok {
  background: #DCFCE7;
  border-color: var(--primary);
  border-bottom-color: var(--primary-dark);
  color: #065F46;
}

.sp-slot.err {
  background: #FFE4E6;
  border-color: var(--coral);
  border-bottom-color: var(--coral-dark);
  color: #9F1239;
}

.sp-sep {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 1.3rem;
  padding: 0 4px;
  color: var(--text-muted);
}

.sp-tiles-pool {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sp-tile-btn {
  min-width: 46px;
  height: 50px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-bottom: 4px solid var(--border-strong);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  transition: transform 0.1s ease, background 0.15s ease;
}

.sp-tile-btn:hover:not(:disabled) {
  background: var(--bg-warm-soft);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.sp-tile-btn.used {
  opacity: 0.28;
  transform: scale(0.92);
}

/* Match Game Board */
.match-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-col-hd {
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--text-muted);
  padding-left: 4px;
}

.match-tile {
  background: var(--bg-page);
  border: 2px solid var(--border-light);
  border-bottom: 4px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: all 0.14s ease;
}

.match-tile:hover:not(:disabled) {
  border-color: var(--secondary);
  background: var(--bg-blue-soft);
  transform: translateY(-1px);
}

.match-tile.selected {
  border-color: var(--secondary);
  border-bottom-color: var(--secondary-dark);
  background: #DBEAFE;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.match-tile.matched {
  border-color: var(--primary);
  background: #DCFCE7;
  color: #065F46;
  opacity: 0.52;
  transform: scale(0.98);
}

.match-tile.wrong {
  border-color: var(--coral);
  background: #FFE4E6;
  color: #9F1239;
}

.mt-word {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.mt-ph {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.mt-pos {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 8px;
}

.mt-cn {
  font-size: 1.05rem;
  font-weight: 800;
  flex: 1;
}

/* Context Cloze */
.ctx-sentence-box {
  background: linear-gradient(135deg, #F5F3FF 0%, #EFF6FF 100%);
  border: 2px solid #C4B5FD;
  border-radius: 18px;
  padding: 24px 26px;
  text-align: center;
}

.ctx-en {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}

.ctx-cn {
  margin-top: 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ctx-blank {
  display: inline-block;
  min-width: 96px;
  border-bottom: 3px solid var(--violet);
  color: var(--violet);
  font-weight: 900;
  padding: 0 8px;
}

.ctx-hit {
  background: #FEF08A;
  color: #78350F;
  padding: 1px 5px;
  border-radius: 6px;
}

@media (max-width: 1280px) {
  .methods-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .home-grid, .reading-studio, .wardrobe-layout, .vocab-hero, .fc-detail-grid {
    grid-template-columns: 1fr;
  }
  .vocab-stage-bar {
    grid-template-columns: 1fr;
  }
  .methods-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .passage-panel, .ollie-preview-card {
    position: static;
    max-height: none;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .sidebar { display: none; }
  .main-column { margin-left: 0; padding-bottom: 74px; }
  .mobile-nav { display: grid; }
  .mobile-brand { display: flex; }
  .topbar-crumb { display: none; }
  .topbar { padding: 0 14px; }
  .stat-unit { display: none; }
  .stat-chip { padding: 5px 10px; font-size: 0.82rem; }
  .mobile-only-btn { display: inline-flex; }
  .app-view { padding: 18px 14px 40px; }
  .hero-banner { grid-template-columns: 1fr; text-align: center; padding: 20px 18px; }
  .hero-actions { justify-content: center; }
  .options-grid, .methods-grid, .fc-rate-bar, .match-board { grid-template-columns: 1fr; }
  .vocab-unit-grid, .vocab-list-grid { grid-template-columns: 1fr; }
  .fc-word { font-size: 2.2rem; }
}

/* Print styles for Daily Report Card */
@media print {
  .sidebar, .topbar, .mobile-nav, .toast-container, #confetti-canvas { display: none !important; }
  .main-column { margin-left: 0; }
}
