:root {
  --bg: #FFF9EE;
  --card: #FFFFFF;
  --primary: #FF8C42;
  --primary-dark: #E67328;
  --green: #2EC4B6;
  --green-dark: #20A396;
  --blue: #4EA8DE;
  --yellow: #FFD166;
  --pink: #FF6B8B;
  --text: #2D3142;
  --muted: #6C757D;
  --border: #F1E5D1;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(255, 140, 66, 0.12);
}

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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Nunito", system-ui, sans-serif;
  background: radial-gradient(circle at top left, #FFF3D6 0%, var(--bg) 55%, #EEF8FF 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 顶部栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

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

.brand-badge {
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #FFF0D4;
  display: grid;
  place-items: center;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-title {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
}

.lesson-switcher {
  border: 1.5px solid #FFD89B;
  background: #FFF6E5;
  color: #8A4A0B;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  max-width: 320px;
  text-overflow: ellipsis;
}

.lesson-switcher:hover {
  background: #FFE8C2;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

/* 星星栏 */
.stars-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF6DC;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid #FFE29A;
}

.star {
  font-size: 24px;
  filter: grayscale(1) opacity(0.3);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
}

.star.earned {
  filter: none;
  transform: scale(1.15);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 通用按钮 */
.btn {
  border: none;
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.96);
}

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

.btn-soft {
  background: #FFF3E2;
  color: #9A4E16;
}

.btn-soft:hover {
  background: #FFE5C2;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 140, 66, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-finish {
  background: linear-gradient(135deg, #FF758F, #FF8C42);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 117, 143, 0.3);
}

/* 主课堂双区 */
.classroom-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 16px;
  padding: 16px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 左侧外教舞台 */
.avatar-panel {
  padding: 14px;
  gap: 10px;
}

.avatar-stage {
  position: relative;
  flex: 0 0 268px;
  min-height: 240px;
  border-radius: 18px;
  background: linear-gradient(180deg, #DDF2FF 0%, #FFF6E5 75%, #FFE8C2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #E8F3FF;
}

.avatar-switch-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 6;
  border: 1.5px solid #FFD89B;
  background: rgba(255, 255, 255, 0.92);
  color: #9A4E16;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: inherit;
  transition: transform 0.12s, background 0.2s, border-color 0.2s;
}

.avatar-switch-pill:hover {
  transform: scale(1.03);
  background: #FFF6E5;
}

.avatar-switch-pill.dad-mode {
  border-color: #93C5FD;
  color: #1D4ED8;
  background: rgba(239, 246, 255, 0.94);
}

#avatar-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#avatar-container svg {
  max-height: 256px;
  width: auto;
  max-width: 92%;
  filter: drop-shadow(0 12px 18px rgba(74, 124, 179, 0.14));
}

.cheer-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FFD166, #FF9F1C);
  color: #5C2C06;
  font-weight: 900;
  font-size: 18px;
  padding: 8px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(255, 159, 28, 0.35);
  animation: popIn 0.35s ease;
  z-index: 5;
}

/* 孩子摄像头画中画 */
.child-pip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 132px;
  height: 98px;
  border-radius: 14px;
  overflow: hidden;
  background: #2D3142;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  z-index: 4;
}

.child-pip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.pip-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #D8DEE9;
  font-size: 12px;
  text-align: center;
  padding: 6px;
}

.pip-tag {
  position: absolute;
  left: 6px;
  top: 5px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
}

/* 课堂聊天记录与录音回放框 */
.chat-history-box {
  flex: 1;
  min-height: 165px;
  max-height: 245px;
  background: #FFFBF4;
  border: 2px solid #FFE2B8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #FFF2DC;
  border-bottom: 1.5px solid #FFE2B8;
  font-size: 12px;
  font-weight: 800;
  color: #9A4E16;
}

.chat-clear-btn {
  border: none;
  background: #FFFFFF;
  color: #9A4E16;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.chat-clear-btn:hover {
  background: #FFE5C2;
}

.mic-meter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #FFE2B8;
}

.mic-meter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: background 0.12s, transform 0.12s;
}

.mic-meter-dot.active {
  background: #22C55E;
  transform: scale(1.25);
}

.mic-meter-track {
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
  display: inline-block;
}

.mic-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2EC4B6, #22C55E);
  transition: width 0.08s linear;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
  word-break: break-word;
}

.chat-bubble.tutor {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1.5px solid #FFE2B8;
  border-top-left-radius: 4px;
}

.chat-bubble.child {
  align-self: flex-end;
  background: #E6FBF5;
  border: 1.5px solid #A8ECE0;
  border-top-right-radius: 4px;
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #8A4A0B;
}

.chat-bubble.child .bubble-meta {
  color: #14746A;
}

.bubble-text {
  color: var(--text);
  font-weight: 600;
}

.play-rec-btn {
  border: none;
  background: #FFF0D4;
  color: #9A4E16;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.12s, background 0.15s;
}

.chat-bubble.child .play-rec-btn {
  background: #2EC4B6;
  color: #FFFFFF;
}

.play-rec-btn:hover {
  transform: scale(1.04);
}

.play-rec-btn.playing {
  background: #FF6B8B !important;
  color: #FFFFFF !important;
}

/* 单词胶囊高亮 & 音标样式 */
.word-pill.active {
  background: #FF8C42;
  border-color: #E67328;
  color: #FFFFFF;
  transform: scale(1.06);
}

.word-card-phonetic {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #EEF6FF;
  border: 1.5px solid #C5E0FF;
  color: #2B6CB0;
  font-size: 20px;
  font-weight: 700;
  font-family: "Segoe UI", "Lucida Sans Unicode", Arial, sans-serif;
  letter-spacing: 0.5px;
}

.word-card-nav {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.word-nav-btn {
  border: 1.5px solid #FFD89B;
  background: #FFFFFF;
  color: #8A4A0B;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.theme-banner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.theme-banner-svg {
  width: 240px;
  height: 85px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(45, 49, 66, 0.08);
}

.theme-badge-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.episode-meta-pill {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #FFF8E1;
  border: 1.5px solid #FCD34D;
  color: #92400E;
  font-size: 12px;
  font-weight: 800;
}

#lessons-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.current-lesson-row {
  border-color: #FF8C42 !important;
  background: #FFF8EE !important;
}

.lesson-status-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.lesson-status-tag.done {
  background: #DCFCE7;
  color: #166534;
}

.lesson-status-tag.progress {
  background: #FEF3C7;
  color: #92400E;
}

.lesson-status-tag.planned {
  background: #EFF6FF;
  color: #1E40AF;
}

/* 6 阶段课堂实时进度条 */
.stage-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 5px 8px;
  overflow-x: auto;
}

.stage-chip {
  flex: 1;
  min-width: 72px;
  border: 1.5px solid transparent;
  background: #FFFFFF;
  color: #64748B;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 6px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}

.stage-chip:hover {
  border-color: #FFD89B;
  color: #9A4E16;
}

.stage-chip.done {
  background: #DCFCE7;
  color: #166534;
  border-color: #86EFAC;
}

.stage-chip.active {
  background: linear-gradient(135deg, #FF8C42, #FF6B35);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(255, 140, 66, 0.28);
}

/* 情景短剧短句卡片与复习卡片 */
.drama-sentences-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-sentence-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid #FFE2B8;
  background: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
}

.drama-sentence-card:hover {
  transform: translateY(-1px);
  border-color: #FF8C42;
}

.drama-sentence-card.active {
  background: #FFF6E5;
  border-color: #FF8C42;
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.18);
}

.drama-s-idx {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFE8C2;
  color: #9A4E16;
}

.drama-s-text {
  flex: 1;
  text-align: left;
  font-size: 17px;
  font-weight: 900;
  color: #E65100;
}

.review-word-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid #FFE29A;
  background: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: #1E293B;
}

.review-word-chip:hover {
  background: #FFF8E1;
}

.complete-card {
  border-color: #F59E0B !important;
  background: linear-gradient(180deg, #FFFDF2 0%, #FFF3C4 100%) !important;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.22) !important;
}

.word-nav-btn:hover {
  background: #FFF0D4;
}

/* 通话控制栏 */
.call-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-call {
  flex: 1.4;
  padding: 14px 18px;
  font-size: 17px;
  background: linear-gradient(135deg, var(--green), #25B0A3);
  color: #fff;
  box-shadow: 0 6px 18px rgba(46, 196, 182, 0.35);
}

.btn-call.active {
  background: linear-gradient(135deg, #EF476F, #D9365E);
  box-shadow: 0 6px 18px rgba(239, 71, 111, 0.35);
}

.btn-ctrl {
  flex: 1;
  padding: 14px 12px;
  background: #F4F7FA;
  color: var(--text);
  border: 2px solid #E2E8F0;
}

.btn-ctrl.on {
  background: #E6F8F6;
  border-color: var(--green);
  color: #166B63;
}

.btn-demo {
  flex: 1;
  padding: 14px 12px;
  background: #FFD166;
  color: #5C3A00;
}

/* 右侧互动白板 */
.whiteboard-panel {
  padding: 14px;
  gap: 12px;
}

.whiteboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-tag {
  font-weight: 800;
  font-size: 15px;
  color: #2B6CB0;
  background: #EBF8FF;
  padding: 6px 12px;
  border-radius: 999px;
}

.wb-words-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.word-pill {
  background: #FFF4E0;
  border: 1.5px solid #FFD89B;
  color: #8A4A0B;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.word-pill:hover {
  background: #FFE4B8;
}

.whiteboard-stage {
  flex: 1;
  min-height: 310px;
  border-radius: 18px;
  background: #FDFEFF;
  border: 3px dashed #CFE6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  position: relative;
}

.wb-welcome {
  text-align: center;
  max-width: 460px;
}

.wb-welcome-emoji {
  font-size: 62px;
  margin-bottom: 8px;
}

.wb-welcome h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.wb-welcome p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}

.wb-stages-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: left;
}

.stage-mini {
  background: #F6FAFF;
  border: 1.5px solid #DCEEFF;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
}

.stage-mini strong {
  display: block;
  color: #2B6CB0;
  margin-bottom: 2px;
}

/* 单词大卡片 */
.word-card-big {
  text-align: center;
  background: linear-gradient(180deg, #FFFDF7, #FFF4E0);
  border: 3px solid #FFD166;
  border-radius: 26px;
  padding: 24px 30px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 14px 30px rgba(255, 209, 102, 0.25);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.word-card-emoji {
  font-size: 92px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.word-card-en {
  font-size: 46px;
  font-weight: 900;
  color: #FF6B35;
  letter-spacing: 1px;
}

.word-card-cn {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.word-card-ex {
  margin-top: 12px;
  font-size: 16px;
  color: #3D5A80;
  background: #FFFFFF;
  padding: 8px 14px;
  border-radius: 12px;
  display: inline-block;
}

.word-card-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* 点图小游戏 */
.game-box {
  width: 100%;
  text-align: center;
  animation: popIn 0.3s ease;
}

.game-question {
  font-size: 20px;
  font-weight: 800;
  color: #2B6CB0;
  margin-bottom: 10px;
}

.game-feedback {
  min-height: 26px;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #E67328;
}

.game-feedback.ok {
  color: #169B8E;
}

.game-feedback.err {
  color: #E63963;
}

.game-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.game-opt-btn {
  background: #FFFFFF;
  border: 3px solid #D9ECFF;
  border-radius: 20px;
  padding: 18px 10px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.game-opt-btn:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.game-opt-btn .opt-emoji {
  font-size: 58px;
}

.game-opt-btn .opt-word {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.game-opt-btn.correct {
  background: #E6FBF5;
  border-color: var(--green);
  transform: scale(1.05);
}

.game-opt-btn.wrong {
  background: #FFF0F3;
  border-color: var(--pink);
  animation: shake 0.35s;
}

/* 快捷互动栏 */
.quick-chat-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.chip:hover {
  background: #FFF0D4;
  border-color: var(--primary);
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}

.chat-input-row input:focus {
  border-color: var(--primary);
}

.btn-send {
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
}

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 59, 0.52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal.hidden, .hidden {
  display: none !important;
}

.modal-card {
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.modal-large {
  max-width: 860px;
}

.modal-small {
  max-width: 420px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  border: none;
  background: #F1F5F9;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px 0;
  border-bottom: 1.5px solid var(--border);
}

.tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.info-banner {
  background: #FFF8EB;
  border: 1.5px solid #FFE0A3;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.form-grid label.full, .form-grid .full {
  grid-column: 1 / -1;
}

.form-grid input, .form-grid select, .form-grid textarea {
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.inline-form input {
  flex: 1;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 10px 12px;
}

.plan-generator-box, .vocab-box, .lessons-history {
  background: #FAFAFC;
  border: 1.5px solid #E9EEF5;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.vocab-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.vocab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.vtag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #E6F8F6;
  color: #166B63;
}

.vtag.review {
  background: #FFF0D4;
  color: #9A4E16;
}

/* 报告卡片 */
.report-card {
  background: #FFFDF9;
  border: 2px solid #FFE2B8;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.report-score {
  background: #E6F8F6;
  color: #15736A;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.report-section {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.lesson-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  margin-top: 8px;
}

/* 二维码 */
.qr-body {
  text-align: center;
}

.qr-body img {
  width: 210px;
  height: 210px;
  border-radius: 14px;
  border: 2px solid var(--border);
}

.qr-url {
  font-weight: 800;
  color: var(--primary-dark);
  margin: 10px 0 14px;
  word-break: break-all;
}

/* 加载层 */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 90;
}

.loading-box {
  background: #fff;
  padding: 26px 34px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #FFE2B8;
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.9s linear infinite;
}

/* 烟花纸屑 */
#confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  animation: fall 2.4s linear forwards;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(540deg); opacity: 0; }
}

/* 第 5 环节动作示范动画舞台 */
.action-demo-stage {
  width: 280px;
  height: 186px;
  margin: 8px auto 10px;
  border-radius: 18px;
  border: 2.5px solid #A8ECE0;
  background: #F0FDFA;
  box-shadow: 0 8px 20px rgba(46, 196, 182, 0.14);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-demo-stage canvas {
  width: 280px;
  height: 186px;
  display: block;
}

/* 竖屏平板/小屏响应式 */
@media (max-width: 900px) {
  .classroom-grid {
    grid-template-columns: 1fr;
  }
  .form-grid, .vocab-columns {
    grid-template-columns: 1fr;
  }
}
