/* ============================================
   Basic Korean Web App - Main Stylesheet
   暖铜橙设计系统 · 借鉴 CC Switch / OpenModel
   ============================================ */

:root {
  /* 主色：暖铜橙（OpenModel #c46a29）*/
  --primary: #c46a29;
  --primary-light: #e28c51;
  --primary-lighter: #fff3e7;

  /* 强调色 */
  --accent: #e28c51;
  --accent-light: #fff3e7;

  /* 底色：暖奶油 */
  --bg: #f6f6f5;
  --card-bg: #fbfbfa;

  /* 文字：暖深棕 */
  --text: #1f1b17;
  --text-light: #6d635a;

  /* 边框：暖米色 */
  --border: #e4ddd4;

  /* 头部背景（毛玻璃底色） */
  --header-bg: rgba(246,246,245,0.72);
  --nav-show-bg: rgba(246,246,245,0.95);

  /* 功能色 */
  --success: #21825f;
  --warning: #d4731a;
  --error: #d0573a;

  /* 阴影：多层暖色阴影 */
  --shadow: 0 2px 8px rgba(28,23,19,0.04), 0 8px 24px -12px rgba(226,140,81,0.08);
  --shadow-hover: 0 4px 12px rgba(28,23,19,0.06), 0 16px 40px -16px rgba(226,140,81,0.15);

  /* 圆角加大 */
  --radius: 20px;
  --radius-sm: 12px;

  /* 缓动 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* 间距系统 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* 字体大小系统 */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;

  /* 过渡动画时间 */
  --transition-fast: 150ms var(--ease);
  --transition-base: 250ms var(--ease);
  --transition-slow: 400ms var(--ease);
}

/* ===== 暗色主题 ===== */
[data-theme="dark"] {
  --bg: #1a1714;
  --card-bg: #221d17;
  --text: #f3ece4;
  --text-light: #b3a89c;
  --border: #3a342c;
  --primary: #e8924f;
  --primary-lighter: #2e2317;
  --accent: #e8924f;
  --accent-light: #2e2317;
  --header-bg: rgba(26,23,20,0.82);
  --nav-show-bg: rgba(26,23,20,0.97);
  --shadow: 0 2px 8px rgba(0,0,0,0.35), 0 8px 24px -12px rgba(0,0,0,0.5);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.4), 0 16px 40px -16px rgba(0,0,0,0.6);
  /* 词性色块：暗色下沉 */
  --elem-stem-bg: #3a2e25;
  --elem-stem-color: #e6cfb8;
  --elem-particle-bg: #3a1f1f;
  --elem-particle-color: #e89a8a;
  --elem-ending-terminal-bg: #3a2e1f;
  --elem-ending-terminal-color: #e6bf8a;
  --elem-ending-connective-bg: #1f3328;
  --elem-ending-connective-color: #8cd4a0;
  --elem-ending-tense-bg: #3a2e1f;
  --elem-ending-tense-color: #e6bf8a;
  --elem-negation-bg: #2a1f33;
  --elem-negation-color: #c28ad4;
  --elem-mood-bg: #1f2e33;
  --elem-mood-color: #8ac4d4;
}
[data-theme="dark"] .elem-stem { background: var(--elem-stem-bg); color: var(--elem-stem-color); }
[data-theme="dark"] .elem-particle { background: var(--elem-particle-bg); color: var(--elem-particle-color); }
[data-theme="dark"] .elem-ending-terminal { background: var(--elem-ending-terminal-bg); color: var(--elem-ending-terminal-color); }
[data-theme="dark"] .elem-ending-connective { background: var(--elem-ending-connective-bg); color: var(--elem-ending-connective-color); }
[data-theme="dark"] .elem-ending-tense { background: var(--elem-ending-tense-bg); color: var(--elem-ending-tense-color); }
[data-theme="dark"] .elem-negation { background: var(--elem-negation-bg); color: var(--elem-negation-color); }
[data-theme="dark"] .elem-mood { background: var(--elem-mood-bg); color: var(--elem-mood-color); }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans KR', 'Noto Sans SC', -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  /* 背景：暖奶油底 + 顶部橙色光晕 */
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(226,140,81,0.06), transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(226,140,81,0.03), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
.header {
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.logo-icon { font-size: 28px; }
.logo-text { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.logo-badge {
  font-size: 11px;
  background: var(--primary-lighter);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.nav { display: flex; gap: 4px; }
.nav-item {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
}
.nav-item:hover { background: var(--primary-lighter); color: var(--primary); }
.nav-item.active { background: var(--primary); color: white; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }
.theme-toggle { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text); padding: 4px 8px; border-radius: 8px; transition: background 0.2s var(--ease); }
.theme-toggle:hover { background: var(--primary-lighter); }
.stats-toggle { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text); padding: 4px 8px; border-radius: 8px; transition: background 0.2s var(--ease); }
.stats-toggle:hover { background: var(--primary-lighter); }

/* ---- Main ---- */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  min-height: calc(100vh - 128px);
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* ---- Hero Section ---- */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.hero p { font-size: 16px; color: var(--text-light); max-width: 600px; margin: 0 auto 32px; }
.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.hero-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: 1px solid var(--border);
}
.hero-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(226,140,81,0.3);
  transform: translateY(-3px);
}
.hero-card .icon { font-size: 32px; margin-bottom: 8px; }
.hero-card h3 { font-size: 18px; margin-bottom: 4px; font-weight: 700; }
.hero-card p { font-size: 13px; color: var(--text-light); }
.hero-card-wide { grid-column: span 2; }

/* ---- Page Title ---- */
.page-title { margin-bottom: 28px; }
.page-title h2 { font-size: 30px; color: var(--text); font-weight: 800; letter-spacing: -0.02em; }
.page-title p { color: var(--text-light); font-size: 14px; margin-top: 4px; }

/* ---- Card ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
}
.badge-blue { background: #fff3e7; color: #c46a29; }
.badge-green { background: #edf7ed; color: #2e7d32; }
.badge-orange { background: #fff4e0; color: #d4731a; }
.badge-purple { background: var(--primary-lighter); color: var(--primary); }
.badge-red { background: #fef0ec; color: #c0392b; }
.badge-cyan { background: #e8f6f8; color: #007587; }

.level-badge-core { font-size:11px;padding:1px 8px;border-radius:99px;background:#fef0ec;color:#c0392b;font-weight:700; }
.level-badge-common { font-size:11px;padding:1px 8px;border-radius:99px;background:#fff4e0;color:#d4731a;font-weight:500; }
.level-badge-optional { font-size:11px;padding:1px 8px;border-radius:99px;background:#f5f5f5;color:#9e9e9e;font-weight:500; }

/* ---- Rule Accordion ---- */
.rule-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--card-bg);
  transition: all 0.2s var(--ease);
}
.rule-item:hover { border-color: rgba(226,140,81,0.25); box-shadow: var(--shadow); }
.rule-header {
  padding: 16px 20px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s var(--ease);
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
}
.rule-header:hover { background: var(--primary-lighter); }
.rule-header .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.rule-header .arrow { margin-left: auto; transition: transform 0.3s var(--ease); font-size: 14px; }
.rule-header.open .arrow { transform: rotate(180deg); }
/* rule-body 展开动效在动效系统区块定义 */
.rule-body p { margin-bottom: 12px; }
.rule-body .highlight { color: var(--primary); font-weight: 600; }

/* ---- Training Sentence ---- */
.sentence-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.sentence-card:hover {
  border-color: rgba(226,140,81,0.3);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.sentence-card .kr { font-size: 22px; font-weight: 500; margin-bottom: 8px; font-family: 'Noto Sans KR', sans-serif; }
.sentence-card .kr .word { display: inline-block; padding: 2px 4px; border-radius: 4px; cursor: help; position: relative; }
.sentence-card .kr .word:hover { background: var(--primary-lighter); }
.sentence-card .kr .particle { color: var(--accent); font-weight: 700; cursor: pointer; border-bottom: 2px dashed var(--accent); }
.sentence-card .kr .ending { color: var(--primary); font-weight: 700; cursor: pointer; border-bottom: 2px dashed var(--primary); }
/* breakdown 展开动效在动效系统区块定义 */
.sentence-card .breakdown-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.sentence-card .breakdown-item { background: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.sentence-card .breakdown-item .mean { color: var(--text-light); font-size: 12px; display: block; }
.sentence-card .sentence-num { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.sentence-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.master-btn { background: var(--bg); border: 1px solid var(--border); color: var(--text-light); border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; flex-shrink: 0; transition: all 0.2s var(--ease); }
.master-btn:hover { border-color: var(--primary); color: var(--primary); }
.master-btn.mastered { background: var(--primary); color: #fff; border-color: var(--primary); }
.sentence-card.mastered { opacity: 0.55; }
.practice-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.practice-card { background: var(--primary-lighter); border-radius: var(--radius-sm); padding: 18px; margin-bottom: 16px; border: 1px solid var(--border); }
.practice-card .kr { font-size: 24px; font-weight: 500; font-family: 'Noto Sans KR', sans-serif; margin: 8px 0; }
.practice-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---- Vue Training Card Component Styles ---- */
.sentence-card .sentence-group-badge {
  font-size: 11px; color: var(--text-light); margin-bottom: 6px;
  display: inline-block; background: var(--bg); padding: 2px 10px;
  border-radius: 99px; font-weight: 500;
}
.sentence-card .sentence-kr {
  font-size: 22px; font-weight: 500; margin-bottom: 8px;
  font-family: 'Noto Sans KR', sans-serif; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.sentence-card .play-btn {
  background: var(--primary); color: #fff; border: none;
  border-radius: 6px; cursor: pointer; font-size: 16px;
  padding: 4px 10px; line-height: 1.4;
  transition: transform var(--transition-fast, 150ms ease);
}
.sentence-card .play-btn:active { transform: scale(0.96); }
.sentence-card .sentence-details { margin-top: 12px; }
.sentence-card .sentence-breakdown {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px;
}
.sentence-card .sentence-breakdown span {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.sentence-card .elem-label {
  font-size: 10px; opacity: 0.8; font-weight: 400; margin-top: 2px;
}
.sentence-card .sentence-full {
  font-size: 14px; color: var(--text-light); margin-top: 8px;
  padding: 8px 12px; background: var(--bg); border-radius: 8px;
}
.sentence-card .sentence-actions { margin-top: 12px; }
.sentence-card .check {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-light); border-radius: 99px; padding: 6px 14px;
  font-size: 13px; cursor: pointer; transition: all 0.2s var(--ease);
}
.sentence-card .check.done {
  background: var(--success); color: #fff; border-color: var(--success);
}
/* Vue Training Page component styles */
.training-page .page-title { margin-bottom: 20px; }
.training-page .page-title h2 { margin: 0 0 4px; }
.training-page .page-title p { margin: 0; color: var(--text-light); font-size: 14px; }
.training-stats-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 14px;
  background: var(--primary-lighter); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
}
/* Shared progress bar base styles */
.training-stats-bar .progress-bar,
.progress-overview .progress-bar {
  height: 8px; background: var(--card-bg);
  border-radius: 4px; overflow: hidden;
}
.training-stats-bar .progress-fill,
.progress-overview .progress-fill {
  height: 100%; background: var(--primary);
  transition: width 0.3s ease;
}
.training-stats-bar .progress-bar {
		  flex: 1;
		}
	.celebration-banner {
  text-align: center; padding: 20px; margin-bottom: 16px;
  font-size: 18px; font-weight: 600;
  background: var(--success); color: #fff;
  border-radius: var(--radius-sm); animation: pulse 1s ease-in-out infinite;
}
.training-grid { display: flex; flex-direction: column; gap: 0; }
/* slide-up transition */
.slide-up-enter-active { transition: all 0.3s var(--ease); }
.slide-up-leave-active { transition: all 0.2s var(--ease); }
.slide-up-enter-from { opacity: 0; transform: translateY(10px); }
.slide-up-leave-to { opacity: 0; transform: translateY(-10px); }
.key-btn { background: transparent; border: none; cursor: pointer; font-size: 14px; opacity: 0.35; margin-left: 6px; padding: 0; transition: opacity 0.2s var(--ease); }
.key-btn.on { opacity: 1; }
.review-msg-ai.keyed { border-left: 3px solid var(--primary); }
.korean-copy-btn { background: transparent; border: none; cursor: pointer; font-size: 14px; margin-left: 4px; vertical-align: middle; padding: 2px 6px; border-radius: 6px; transition: background 0.2s var(--ease); }
.korean-copy-btn:hover { background: var(--primary-lighter); }
.stats-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.stats-modal { background: var(--card-bg); border-radius: var(--radius); padding: 24px; max-width: 420px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-hover); }
.stats-modal h2 { font-size: 20px; margin-bottom: 16px; }
.stats-close { position: absolute; right: 16px; top: 16px; background: transparent; border: none; color: var(--text-light); cursor: pointer; font-size: 20px; padding: 4px 8px; border-radius: 6px; }
.stats-close:hover { background: var(--bg); color: var(--text); }
.stats-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.stats-row:last-child { border: none; }
.stats-row .stat-value { font-weight: 700; color: var(--primary); }

/* ---- StatsPanel Vue Component ---- */
.stats-panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 0;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-hover);
}
.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border);
}
.stats-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.stats-header .stats-close {
  position: static;
  font-size: 18px;
  padding: 6px 10px;
}
.stats-body {
  padding: 16px 24px 24px;
}
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.stat-item:last-of-type {
  border-bottom: none;
}
.stat-label {
  color: var(--text);
  font-weight: 500;
}
.stat-version {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  padding: 12px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.stat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.stat-btn {
  flex: 1;
  min-width: calc(50% - 4px);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  color: var(--text);
  text-align: center;
}
.stat-btn:hover {
  border-color: var(--primary);
  background: var(--primary-lighter);
  color: var(--primary);
}
.stat-btn-danger {
  border-color: rgba(208,87,58,0.3);
  color: var(--error);
}
.stat-btn-danger:hover {
  border-color: var(--error);
  background: rgba(208,87,58,0.08);
  color: var(--error);
}

/* Vue transition: fade */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.25s var(--ease);
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
.onboarding-overlay { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; animation: onboarding-in 0.4s ease; }
.onboarding-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: -1; }
.onboarding-modal { background: var(--card-bg); border-radius: var(--radius); padding: 32px; max-width: 460px; width: 100%; text-align: center; box-shadow: var(--shadow-hover); animation: onboarding-modal-in 0.4s ease; }
.onboarding-fade-out { animation: onboarding-out 0.3s ease forwards !important; }
@keyframes onboarding-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes onboarding-modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes onboarding-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
.onboarding-modal h2 { font-size: 24px; margin-bottom: 8px; }
.onboarding-modal p { color: var(--text-light); font-size: 14px; margin-bottom: 24px; }
.onboarding-steps { text-align: left; margin: 0 auto 24px; max-width: 340px; }
.onboarding-step { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.onboarding-step:last-child { border: none; }
.onboarding-step .step-icon { width: 28px; text-align: center; font-size: 20px; flex-shrink: 0; }
.onboarding-step .step-text { color: var(--text); }
.onboarding-step .step-text strong { display: block; }
.tip-banner { margin-bottom: 20px; padding: 16px; background: var(--primary-lighter); border-radius: var(--radius-sm); font-size: 14px; position: relative; }
.tip-banner.accent { background: var(--accent-light); }
.tip-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--text-light); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 6px; }

/* ---- Stems Grid ---- */
.stem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.stem-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all 0.2s var(--ease);
}
.stem-item:hover { border-color: rgba(226,140,81,0.3); box-shadow: var(--shadow); transform: translateY(-1px); }
.stem-item .stem { font-size: 20px; font-weight: 500; font-family: 'Noto Sans KR', sans-serif; }
.stem-item .mean { font-size: 13px; color: var(--text-light); }
.stem-item .example { font-size: 12px; color: var(--primary); margin-top: 4px; }
.stem-category { margin-bottom: 28px; }
.stem-category h3 { font-size: 18px; margin-bottom: 12px; color: var(--primary); font-weight: 700; }

/* ---- Schedule ---- */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.day-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s var(--ease);
}
.day-card:hover { box-shadow: var(--shadow); border-color: rgba(226,140,81,0.2); }
.day-card .day-num { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.day-card .day-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.day-card .task { font-size: 13px; color: var(--text-light); padding: 4px 0; border-bottom: 1px dashed var(--border); }
.day-card .task:last-child { border: none; }
.day-card .check { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; margin-right: 8px; cursor: pointer; vertical-align: middle; transition: all 0.2s var(--ease); }
.day-card .check.done { background: var(--success); border-color: var(--success); position: relative; }
.day-card .check.done::after { content: "✓"; color: white; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 11px; font-weight: 700; }

/* ---- Schedule Page Progress ---- */
.progress-overview {
  margin-bottom: 16px; padding: 14px;
  background: var(--primary-lighter); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
}
.progress-overview .progress-bar {
		  margin-top: 8px;
		}

	/* ---- Reference Table ---- */
.ref-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ref-table th { background: var(--primary-lighter); color: var(--primary); padding: 10px 14px; text-align: left; font-weight: 600; }
.ref-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ref-table tr:hover td { background: var(--bg); }

/* ---- Filter ---- */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  color: var(--text-light);
  font-weight: 500;
}
.filter-btn:hover { border-color: rgba(226,140,81,0.4); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ---- Tag Badge ---- */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* ---- 统一色彩系统（暖色化）---- */
/* 词干/词根 → 暖棕蓝 */
.elem-stem { background: #fef7ef; color: #8b5e3c; }
/* 助词 → 暖红 */
.elem-particle { background: #fef0ec; color: #c0392b; }
/* 终结词尾 → 暖铜橙 */
.elem-ending-terminal { background: #fff3e7; color: #c46a29; }
/* 连接词尾 → 绿 */
.elem-ending-connective { background: #edf7ed; color: #2e7d32; }
/* 时态词尾 → 橙 */
.elem-ending-tense { background: #fff4e0; color: #d4731a; }
/* 否定 → 深紫 */
.elem-negation { background: #f5edf7; color: #7b3a9e; }
/* 语气(命令/提议/疑问) → 青 */
.elem-mood { background: #e8f6f8; color: #007587; }

/* 色彩图例 */
.color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.color-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-light);
}
.color-legend-swatch {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 统一拆解标签 */
.elem-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff8f0;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 999;
  pointer-events: none;
  box-shadow: var(--shadow-hover);
}
.toast.show { opacity: 1; }

/* ---- 韩文播放按钮 ---- */
.korean-speak-btn:hover {
  filter: brightness(1.1);
}

/* ============================================
   动效系统 · 借鉴 CC Switch / OpenModel
   ============================================ */

/* ---- 1. 页面切换淡入上滑 ---- */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main.page-enter > * {
  animation: pageEnter 0.45s var(--ease) both;
}

/* ---- 2. Hero 错落入场 ---- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main.page-enter .hero h1 { animation: heroFadeUp 0.5s var(--ease) 0.05s both; }
.main.page-enter .hero > p { animation: heroFadeUp 0.5s var(--ease) 0.15s both; }
.main.page-enter .hero-card:nth-child(1) { animation: heroFadeUp 0.5s var(--ease) 0.25s both; }
.main.page-enter .hero-card:nth-child(2) { animation: heroFadeUp 0.5s var(--ease) 0.35s both; }
.main.page-enter .hero-card:nth-child(3) { animation: heroFadeUp 0.5s var(--ease) 0.45s both; }
.main.page-enter .hero-card:nth-child(4) { animation: heroFadeUp 0.5s var(--ease) 0.55s both; }

/* ---- 3. 断句卡片平滑展开/折叠 ---- */
.sentence-card .breakdown {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.35s var(--ease), opacity 0.3s var(--ease), margin-top 0.3s var(--ease);
}
.sentence-card .breakdown.show {
  max-height: 600px;
  opacity: 1;
  margin-top: 12px;
}

/* ---- 4. 拆解项错落弹出 ---- */
.sentence-card .breakdown-item {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.sentence-card .breakdown.show .breakdown-item {
  opacity: 1;
  transform: translateY(0);
}
.sentence-card .breakdown.show .breakdown-item:nth-child(1) { transition-delay: 0.05s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(2) { transition-delay: 0.10s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(3) { transition-delay: 0.15s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(4) { transition-delay: 0.20s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(5) { transition-delay: 0.25s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(6) { transition-delay: 0.30s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(7) { transition-delay: 0.35s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(8) { transition-delay: 0.40s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(9) { transition-delay: 0.45s; }
.sentence-card .breakdown.show .breakdown-item:nth-child(10) { transition-delay: 0.50s; }

/* ---- 5. 骨架规则手风琴平滑展开 ---- */
.rule-body {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 20px;
  transition: max-height 0.35s var(--ease), opacity 0.3s var(--ease), padding 0.3s var(--ease);
}
.rule-body.open {
  max-height: 1200px;
  opacity: 1;
  padding: 0 20px 20px;
}

/* ---- 6. 卡片 hover 光晕 ---- */
.hero-card, .card, .sentence-card, .day-card, .stem-item {
  position: relative;
  overflow: hidden;
}
.hero-card::before, .card::before, .sentence-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(226,140,81,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.hero-card:hover::before, .card:hover::before, .sentence-card:hover::before {
  opacity: 1;
}

/* ---- 8. 背景渐变缓动 ---- */
@keyframes bgShift {
  0%   { background-position: 0% 0%, 0% 0%; }
  50%  { background-position: 100% 30%, 20% 50%; }
  100% { background-position: 0% 0%, 0% 0%; }
}
body {
  background-size: 200% 200%, 150% 150%;
  animation: bgShift 30s ease-in-out infinite;
}

/* ---- 9. 筛选按钮切换动效 ---- */
@keyframes filterPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.filter-btn.active { animation: filterPulse 0.3s var(--ease); }

/* ---- 10. Logo 徽章呼吸 ---- */
@keyframes badgeBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196,106,41,0.15); }
  50%      { box-shadow: 0 0 0 4px rgba(196,106,41,0); }
}
.logo-badge { animation: badgeBreathe 3s ease-in-out infinite; }

/* ---- 11. 列表项错落入场（断句/词干/日课通用）---- */
@keyframes listFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main.page-enter .sentence-card,
.main.page-enter .stem-item,
.main.page-enter .day-card,
.main.page-enter .rule-item,
.main.page-enter .card {
  animation: listFadeUp 0.4s var(--ease) both;
}

/* ---- 12. 标题下划线滑入 ---- */
@keyframes titleUnderline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.page-title h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
  margin-top: 8px;
  transform-origin: left;
  animation: titleUnderline 0.5s var(--ease) 0.2s both;
}

/* ---- 13. 打卡勾选弹跳 ---- */
@keyframes checkBounce {
  0%   { transform: scale(0.5); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.day-card .check.done { animation: checkBounce 0.3s var(--ease); }

/* ---- 14. Toast 滑入 ---- */
@keyframes toastSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast.show { animation: toastSlide 0.3s var(--ease); }

/* 庆祝脉冲动画 */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ---- AI 练句页 ---- */
.ai-input-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.ai-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.ai-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border 0.2s var(--ease);
  background: var(--bg);
  color: var(--text);
}
.ai-input:focus { border-color: var(--primary); background: var(--card-bg); }
.ai-input::placeholder { color: var(--text-light); opacity: 0.6; }
.ai-submit-btn {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  white-space: nowrap;
}
.ai-submit-btn:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196,106,41,0.2); }
.ai-submit-btn:active { transform: translateY(0); }
.ai-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-suggest-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  color: var(--text-light);
}
.ai-suggest-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lighter); }

/* AI 加载状态 */
.ai-loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}
.ai-loading p { margin-top: 16px; font-size: 14px; }
.ai-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: aiSpin 0.8s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }

/* AI 错误状态 */
.ai-error {
  text-align: center;
  padding: 36px 20px;
  background: var(--card-bg);
  border: 1px solid rgba(208,87,58,0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

/* AI 结果卡片 */
.ai-result-card {
  margin-bottom: 24px;
}
.ai-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* AI 拓展例句 */
.ai-examples {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 4px;
}
.ai-example-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s var(--ease);
}
.ai-example-card:last-child { margin-bottom: 0; }
.ai-example-card:hover { background: var(--primary-lighter); }

/* AI 历史 */
.ai-history-section { margin-top: 32px; }
.ai-history-list { display: flex; flex-direction: column; gap: 8px; }
.ai-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.ai-history-item:hover { border-color: rgba(226,140,81,0.3); box-shadow: var(--shadow); transform: translateX(4px); }
.ai-history-input { font-size: 14px; color: var(--text); font-weight: 500; }
.ai-history-kr { font-size: 13px; color: var(--primary); font-family: 'Noto Sans KR', sans-serif; margin-left: auto; }
.ai-history-del { background: transparent; border: none; color: var(--text-light); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px; flex-shrink: 0; }
.ai-history-del:hover { color: #c0392b; background: var(--bg); }

/* ---- AI Result Card ---- */
.ai-result-label { font-size: 12px; color: var(--text-light); }
.ai-result-sentence { cursor: default; margin-bottom: 16px; }
.ai-result-kr { font-size: 24px; font-weight: 500; margin-bottom: 8px; font-family: 'Noto Sans KR', sans-serif; }
.ai-result-breakdown { max-height: none; opacity: 1; margin-top: 12px; }
.breakdown-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ai-status-warn { margin: 10px 0; padding: 10px 14px; background: var(--accent-light); color: var(--warning); border-radius: 10px; font-size: 13px; }
.ref-hidden { display: none !important; }
.ai-result-full { margin-top: 8px; font-size: 14px; color: var(--text-light); }
.ai-result-rules { margin-top: 8px; font-size: 12px; color: var(--text-light); }
.ai-tip { margin-top: 8px; font-size: 13px; color: var(--accent); background: var(--accent-light); padding: 8px 12px; border-radius: 6px; }
.ai-examples-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.ai-example-kr { font-size: 18px; font-weight: 500; margin-bottom: 6px; font-family: 'Noto Sans KR', sans-serif; }
.ai-example-full { font-size: 13px; color: var(--text-light); }

/* ---- AI Scene Page ---- */
.scene-tips {
  margin-bottom: 20px; padding: 16px;
  background: var(--primary-lighter); border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.8; color: var(--text);
}
.scene-section { margin-bottom: 28px; }
.scene-section h3 { font-size: 16px; margin-bottom: 12px; color: var(--primary); font-weight: 700; }
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.scene-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  cursor: pointer; transition: all 0.2s var(--ease);
  position: relative;
}
.scene-card:hover { border-color: rgba(226,140,81,0.3); box-shadow: var(--shadow); transform: translateY(-1px); }
.scene-icon { font-size: 28px; flex-shrink: 0; }
.scene-info { flex: 1; min-width: 0; }
.scene-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.scene-desc { font-size: 12px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-go { font-size: 14px; color: var(--primary); flex-shrink: 0; }
.scene-delete {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; color: var(--text-light);
  font-size: 12px; cursor: pointer; opacity: 0;
  transition: opacity 0.2s var(--ease);
  padding: 4px 8px; border-radius: 6px;
}
.scene-card-custom:hover .scene-delete { opacity: 1; }
.scene-delete:hover { background: rgba(208,87,58,0.1); color: var(--error); }
.scene-empty { color: var(--text-light); font-size: 13px; padding: 12px 0; }
.scene-create-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.scene-create-card h3 { font-size: 16px; margin-bottom: 12px; color: var(--primary); font-weight: 700; }
.scene-textarea { width: 100%; min-height: 80px; resize: vertical; line-height: 1.6; }

/* ---- Scene Page (Vue) ---- */
.scene-list { margin-bottom: 24px; }
.scene-list h3 { font-size: 16px; margin-bottom: 12px; color: var(--primary); font-weight: 700; }
.scene-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 99px; font-size: 14px; cursor: pointer;
  transition: all 0.2s var(--ease); font-weight: 500;
}
.scene-chip:hover { border-color: var(--primary); background: var(--primary-lighter); color: var(--primary); }
.scene-chip.custom { border-style: dashed; }
.scene-chip-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; font-size: 10px;
  color: var(--text-light); cursor: pointer; transition: all 0.15s var(--ease);
  margin-left: 2px;
}
.scene-chip-del:hover { background: var(--error); color: #fff; }
.scene-history {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
}
.scene-history-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.scene-history-header h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.scene-history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 8px;
  transition: all 0.2s var(--ease);
}
.scene-history-item:hover { border-color: var(--primary-light); background: var(--primary-lighter); }
.shi-scene { font-weight: 600; font-size: 14px; flex: 1; }
.shi-time { font-size: 12px; color: var(--text-light); }
.shi-del {
  font-size: 12px; color: var(--text-light); cursor: pointer; padding: 2px 6px;
  border-radius: 4px; transition: all 0.15s var(--ease);
}
.shi-del:hover { background: var(--error); color: #fff; }
.chat-back {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
  transition: all 0.2s var(--ease); font-family: inherit; color: var(--text-light);
}
.chat-back:hover { background: var(--bg); color: var(--text); }
.chat-messages {
  max-height: calc(100vh - 340px); min-height: 300px;
  overflow-y: auto; padding: 8px 4px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-messages .chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-messages .chat-msg.user { justify-content: flex-end; }
.chat-messages .chat-msg.assistant { justify-content: flex-start; }
.msg-avatar { font-size: 24px; flex-shrink: 0; line-height: 1; padding-top: 4px; }
.msg-content {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 10px 14px; font-size: 14px; line-height: 1.6;
  max-width: 75%; word-break: break-word;
}
.chat-messages .chat-msg.user .msg-content {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.chat-input-row {
  display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border);
  margin-top: 12px;
}
.chat-input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: var(--card-bg); color: var(--text); outline: none;
  transition: border-color 0.2s var(--ease);
}
.chat-input:focus { border-color: var(--primary); }

/* ---- Chat Interface ---- */
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.chat-back-btn, .chat-end-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
  transition: all 0.2s var(--ease); font-family: inherit; color: var(--text-light);
}
.chat-back-btn:hover { background: var(--bg); color: var(--text); }
.chat-end-btn:hover { background: rgba(208,87,58,0.1); border-color: var(--error); color: var(--error); }
.chat-header-title { font-size: 16px; font-weight: 700; color: var(--text); }

.chat-container {
  max-height: calc(100vh - 280px); min-height: 300px;
  overflow-y: auto; padding: 8px 4px 16px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}

.chat-start-overlay {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center; flex: 1;
}
.chat-start-icon { font-size: 56px; margin-bottom: 16px; }
.chat-start-overlay p { color: var(--text-light); font-size: 14px; margin-bottom: 20px; }
.chat-start-btn { padding: 14px 32px !important; font-size: 16px !important; }

.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg-ai { justify-content: flex-start; }
.chat-avatar { font-size: 24px; flex-shrink: 0; line-height: 1; padding-top: 4px; }
.chat-content { max-width: 75%; }
.chat-bubble {
  padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6;
}
.chat-bubble-user {
  background: var(--primary); color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble-ai {
  background: var(--card-bg); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-bubble-user .chat-text { font-size: 14px; }
.chat-kr { font-size: 16px; font-family: 'Noto Sans KR', sans-serif; font-weight: 500; margin-bottom: 4px; }
.chat-zh { font-size: 13px; color: var(--text-light); }
.chat-toggle-btn {
  margin-top: 8px; background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 10px; font-size: 11px; color: var(--text-light);
  cursor: pointer; transition: all 0.2s var(--ease); font-family: inherit;
}
.chat-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-breakdown { margin-top: 8px; }
.chat-breakdown .breakdown-row { display: flex; gap: 4px; flex-wrap: wrap; }
.chat-breakdown .breakdown-item { background: var(--bg); padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.chat-breakdown .breakdown-item .mean { color: var(--text-light); font-size: 11px; display: block; }

/* Typing indicator */
.chat-typing { display: flex; gap: 4px; padding: 4px 0; }
.chat-typing span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border);
  animation: chatTyping 1.2s var(--ease) infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatTyping {
  0%, 60%, 100% { transform: scale(0.8); opacity: 0.4; }
  30% { transform: scale(1.1); opacity: 1; }
}

/* Chat input bar */
.chat-input-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--border);
  margin-top: 8px; position: sticky; bottom: 0;
  background: var(--bg);
}
.chat-mute-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 18px; cursor: pointer;
  transition: all 0.2s var(--ease); flex-shrink: 0;
}
.chat-mute-btn:hover { border-color: var(--primary); background: var(--primary-lighter); }

/* ---- Review Mode ---- */
.review-container {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.review-msg { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.review-msg:last-child { border: none; }
.review-msg-user { text-align: right; }
.review-role { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.review-text { font-size: 14px; }
.review-kr {
  font-size: 18px; font-family: 'Noto Sans KR', sans-serif; font-weight: 500;
  margin-bottom: 4px; padding: 4px 8px; border-radius: 6px; transition: background 0.3s var(--ease);
  display: inline-block;
}
.review-zh { font-size: 13px; color: var(--text-light); }
.review-actions { display: flex; gap: 12px; justify-content: center; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.show { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--nav-show-bg); backdrop-filter: blur(16px); padding: 12px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .mobile-menu-btn { display: block; }
  .header-inner { padding: 0 16px; }
  .hero h1 { font-size: 28px; }
  .hero-cards { grid-template-columns: 1fr; }
  .hero-cards .hero-card[style*="span 2"],
  .hero-card-wide { grid-column: span 1 !important; }
  .stem-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .schedule-grid { grid-template-columns: 1fr; }
  .ai-input-row { flex-direction: column; }
  .ai-submit-btn { width: 100%; }
  .scene-grid { grid-template-columns: 1fr; }
  .chat-content { max-width: 85%; }
  .chat-container { max-height: calc(100vh - 320px); }
  .review-actions { flex-direction: column; }
}

/* ===== 卡片交互动效 ===== */
.module-card,
.day-card,
.stem-card,
.sentence-card {
  transition: transform var(--transition-base, 250ms ease),
              box-shadow var(--transition-base, 250ms ease);
}
.module-card:hover,
.day-card:hover,
.stem-card:hover,
.sentence-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 按钮点击反馈 */
.nav-item,
.play-btn,
.check {
  cursor: pointer;
  transition: transform var(--transition-fast, 150ms ease),
              background var(--transition-fast, 150ms ease);
}
.nav-item:active,
.play-btn:active {
  transform: scale(0.96);
}

/* ===== 移动端导航 ===== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast, 150ms ease);
  }
  .mobile-menu-btn:hover {
    background: var(--border);
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: var(--space-xs, 4px);
    padding: var(--space-md, 16px) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--space-sm, 8px);
  }
  .nav.open {
    display: flex;
  }
  .nav-item {
    width: 100%;
    text-align: left;
    padding: var(--space-sm, 8px) var(--space-md, 16px);
    border-radius: var(--radius-sm);
  }
  .nav-item.active {
    background: var(--primary-lighter);
    color: var(--primary);
  }
}
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
  .nav {
    display: flex !important;
  }
}

/* ===== iOS 安全区适配 ===== */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
  }
  .footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ===== Design System 组件样式 ===== */
.bk-btn {
  display: inline-flex; align-items: center; gap: var(--space-xs, 4px);
  border: none; border-radius: var(--radius-sm, 12px); cursor: pointer;
  font-family: inherit; font-weight: 500;
  transition: all var(--transition-fast, 150ms ease);
}
.bk-btn:active { transform: scale(0.96); }
.bk-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bk-btn-primary { background: var(--primary); color: #fff; }
.bk-btn-secondary { background: var(--border); color: var(--text); }
.bk-btn-danger { background: var(--error); color: #fff; }
.bk-btn-sm { padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); }
.bk-btn-md { padding: var(--space-sm) var(--space-md); font-size: var(--text-base); }
.bk-btn-lg { padding: var(--space-md) var(--space-lg); font-size: var(--text-lg); }

.bk-card { background: var(--card-bg); border-radius: var(--radius, 20px); border: 1px solid var(--border, #e4ddd4); }
.bk-card-hoverable { transition: transform var(--transition-base, 250ms), box-shadow var(--transition-base, 250ms); }
.bk-card-hoverable:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.bk-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: var(--text-xs, 0.75rem); font-weight: 500; }
.bk-badge-primary { background: var(--primary-lighter); color: var(--primary); }
.bk-badge-success { background: var(--success); color: #fff; }
.bk-badge-warning { background: var(--warning); color: #fff; }

.bk-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; }
.bk-modal { background: var(--card-bg); border-radius: var(--radius, 20px); max-width: 480px; width: 90%; box-shadow: var(--shadow-hover); }
.bk-modal-header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border, #e4ddd4); }
.bk-modal-header h3 { margin: 0; }
.bk-modal-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-light); }
.bk-modal-body { padding: var(--space-lg); }

/* ===== 骨架规则页 Vue 过渡 ===== */
.slide-down-enter-active,
.slide-down-leave-active {
  transition: all var(--transition-base, 250ms ease);
  overflow: hidden;
}
.slide-down-enter-from,
.slide-down-leave-to {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
}
.slide-down-enter-to,
.slide-down-leave-from {
  opacity: 1;
  max-height: 2000px;
}
