/* ==========================================================
   小陈老师编程课堂 —— 全站样式
   配色：奶油底色 + 珊瑚橙 / 薄荷绿 / 天空蓝 / 柠檬黄
   风格：清新明亮、圆角卡通，适合小学生
   ========================================================== */

:root {
  --cream: #FFF8EF;
  --cream-2: #F2FBFF;
  --card: #FFFFFF;
  --ink: #34495E;
  --ink-soft: #7C8FA5;
  --orange: #FF8A5B;
  --orange-soft: #FFE6DA;
  --mint: #42C2A0;
  --mint-soft: #DEF7EF;
  --sky: #5B8DEF;
  --sky-soft: #E1EBFF;
  --lemon: #FFC53D;
  --lemon-soft: #FFF3D1;
  --pink: #FF9AB5;
  --pink-soft: #FFE4EB;
  --green: #38B26B;
  --red: #F0605D;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 26px rgba(70, 120, 180, 0.13);
  --shadow-hover: 0 16px 34px rgba(70, 120, 180, 0.2);
  --font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 8% 4%, rgba(255, 197, 61, 0.20), transparent 42%),
    radial-gradient(circle at 92% 0%, rgba(91, 141, 239, 0.16), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(66, 194, 160, 0.16), transparent 45%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 248, 239, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(91, 141, 239, 0.10);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 15px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(70, 120, 180, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.back-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(70, 120, 180, 0.18); }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.brand .dot {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--orange), var(--lemon));
  font-size: 16px;
  box-shadow: 0 6px 14px rgba(255, 138, 91, 0.35);
}

.lesson-chip {
  margin-left: auto;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--sky);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------------- 容器 ---------------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}
.wrap.narrow { max-width: 760px; }

.page-title {
  margin: 4px 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.page-sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #FFB36B);
  box-shadow: 0 10px 22px rgba(255, 138, 91, 0.36);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(255, 138, 91, 0.44); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(70, 120, 180, 0.14);
}
.btn.mint { background: linear-gradient(135deg, var(--mint), #6BD9BD); box-shadow: 0 10px 22px rgba(66, 194, 160, 0.34); }
.btn.sky { background: linear-gradient(135deg, var(--sky), #82ACFF); box-shadow: 0 10px 22px rgba(91, 141, 239, 0.32); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- 欢迎页 ---------------- */
.welcome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 22px;
  position: relative;
  overflow: hidden;
}

.welcome .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.55;
  animation: floatBlob 9s ease-in-out infinite;
}
.blob.b1 { width: 180px; height: 180px; background: var(--lemon-soft); top: 8%; left: 6%; }
.blob.b2 { width: 130px; height: 130px; background: var(--mint-soft); bottom: 12%; left: 16%; animation-delay: 1.4s; }
.blob.b3 { width: 200px; height: 200px; background: var(--sky-soft); top: 16%; right: 4%; animation-delay: 2.2s; }
.blob.b4 { width: 110px; height: 110px; background: var(--pink-soft); bottom: 18%; right: 14%; animation-delay: 0.7s; }

@keyframes floatBlob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-22px) scale(1.06); }
}

.welcome-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 18px;
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.welcome h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--orange), var(--lemon) 45%, var(--mint) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome .slogan {
  margin: 0 0 34px;
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}

.welcome .start-btn {
  padding: 17px 52px;
  font-size: 19px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--sky), #7FB2FF 60%, var(--mint));
  box-shadow: 0 14px 30px rgba(91, 141, 239, 0.4);
  animation: pulse 2.4s ease-in-out infinite;
  transition: transform 0.18s ease;
}
.welcome .start-btn:hover { transform: translateY(-3px) scale(1.03); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 14px 30px rgba(91, 141, 239, 0.4); }
  50% { box-shadow: 0 16px 38px rgba(91, 141, 239, 0.62); }
}

.welcome .tips {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.welcome .tips span {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(70, 120, 180, 0.1);
}

.welcome footer {
  position: absolute;
  bottom: 18px;
  font-size: 12px;
  color: #A9B8C7;
}

/* ---------------- 选课页 ---------------- */
.unit-block {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.unit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.unit-tag {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}
.unit-tag.orange { background: linear-gradient(135deg, var(--orange), #FFB36B); }
.unit-tag.mint { background: linear-gradient(135deg, var(--mint), #6BD9BD); }
.unit-tag.sky { background: linear-gradient(135deg, var(--sky), #82ACFF); }
.unit-tag.lemon { background: linear-gradient(135deg, #FFB01F, var(--lemon)); }
.unit-title { font-size: 17px; font-weight: 800; }
.unit-count { margin-left: auto; font-size: 13px; color: var(--ink-soft); }

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.lesson-card {
  position: relative;
  display: block;
  padding: 18px 16px 16px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 6px 16px rgba(70, 120, 180, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: left;
}
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.lesson-card .code {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--sky);
  background: var(--sky-soft);
  padding: 3px 9px;
  border-radius: 8px;
  margin-bottom: 9px;
}
.lesson-card .title { font-size: 15px; font-weight: 800; margin-bottom: 5px; line-height: 1.4; }
.lesson-card .desc { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }

.lesson-card.is-current {
  border-color: var(--orange);
  background: linear-gradient(180deg, #FFFDF8, #fff);
}
.lesson-card.is-current::after {
  content: "当前课程";
  position: absolute;
  top: -10px; right: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--orange);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(255, 138, 91, 0.4);
}

.lesson-card.soon { background: #FFFEFB; }
.lesson-card.soon .title { color: #97A6B6; }
.lesson-card.soon::before {
  content: "即将上线";
  position: absolute;
  top: 12px; right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--lemon);
  background: var(--lemon-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.lesson-card.locked { background: #F7F9FB; cursor: not-allowed; }
.lesson-card.locked .title, .lesson-card.locked .desc { color: #AEBAC7; }
.lesson-card.locked .code { background: #EDF1F5; color: #AEBAC7; }
.lesson-card .lock-icon {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 16px;
  opacity: 0.7;
}

/* ---------------- 工具页九宫格 ---------------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  position: relative;
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.tool-card .t-emoji {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: 16px;
  margin-bottom: 14px;
}
.tool-card .t-name { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.tool-card .t-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.tool-card.orange .t-emoji { background: var(--orange-soft); }
.tool-card.mint .t-emoji { background: var(--mint-soft); }
.tool-card.sky .t-emoji { background: var(--sky-soft); }
.tool-card.lemon .t-emoji { background: var(--lemon-soft); }
.tool-card.pink .t-emoji { background: var(--pink-soft); }
.tool-card.disabled { background: #FAFBFC; cursor: not-allowed; }
.tool-card.disabled .t-name { color: #9FAEBD; }
.tool-card.disabled:hover { transform: none; box-shadow: var(--shadow); }
.tool-card .badge-soon {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #9FAEBD;
  background: #EDF1F5;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------------- 通用卡片 / 面板 ---------------- */
.panel {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.panel-title { font-size: 17px; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.panel-note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }

/* ---------------- 单词卡片页 ---------------- */
.word-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.word-card {
  position: relative;
  padding: 20px 18px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 8px 20px rgba(70, 120, 180, 0.1);
  border: 2px solid #F0F4F8;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  text-align: left;
  width: 100%;
}
.word-card:hover { transform: translateY(-3px); border-color: var(--sky-soft); box-shadow: var(--shadow-hover); }
.word-card:active { transform: scale(0.985); }
.word-card .w-en { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: 0.5px; }
.word-card .w-ipa { font-size: 13px; color: var(--sky); margin-top: 4px; font-weight: 600; }
.word-card .w-zh { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.word-card .w-sound {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mint-soft);
  font-size: 15px;
}
.word-card.speaking { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(66, 194, 160, 0.16); }
.word-card.done { border-color: var(--mint); }
.word-card.done::after {
  content: "✓";
  position: absolute;
  bottom: 14px; right: 16px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--mint);
  color: #fff;
  font-size: 13px;
  display: grid; place-items: center;
  font-weight: 800;
}

.word-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #EDF2F7;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  transition: width 0.4s ease;
}

.empty-tip {
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}
.empty-tip .big { font-size: 40px; display: block; margin-bottom: 10px; }

/* ---------------- 选择题页 ---------------- */
.quiz-item { margin-bottom: 20px; }
.quiz-q {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 14px;
}
.quiz-q .num {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--sky-soft);
  color: var(--sky);
  font-size: 12px;
  margin-right: 8px;
  vertical-align: 2px;
}

.opt-list { display: grid; gap: 10px; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: #FBFCFE;
  border: 2px solid #EEF3F8;
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  width: 100%;
  transition: all 0.16s ease;
}
.opt:hover:not(:disabled) { background: #fff; border-color: var(--sky); transform: translateX(3px); }
.opt .letter {
  width: 26px; height: 26px;
  flex: 0 0 26px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: #fff;
  border: 1.5px solid #DDE6EF;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
}
.opt.correct { background: #EDFBF4; border-color: var(--green); }
.opt.correct .letter { background: var(--green); border-color: var(--green); color: #fff; }
.opt.wrong { background: #FEF0EF; border-color: var(--red); }
.opt.wrong .letter { background: var(--red); border-color: var(--red); color: #fff; }
.opt:disabled { cursor: default; }

.explain {
  display: none;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--lemon-soft);
  border-left: 4px solid var(--lemon);
  font-size: 13.5px;
  line-height: 1.8;
  color: #7A6524;
}
.explain.show { display: block; animation: fadeIn 0.3s ease; }
.explain .tag { font-weight: 800; margin-right: 6px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.score-board {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--sky-soft), var(--mint-soft));
  margin-bottom: 20px;
}
.score-board .s-big { font-size: 30px; font-weight: 900; color: var(--sky); }
.score-board .s-text { font-size: 14px; color: var(--ink); font-weight: 600; }
.score-board .s-sub { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------- 勋章墙 ---------------- */
.badge-progress-wrap { margin-bottom: 22px; }
.badge-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}
.badge-progress-head .p-num { color: var(--orange); }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.badge-card {
  padding: 20px 14px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 8px 20px rgba(70, 120, 180, 0.1);
  text-align: center;
  border: 2px solid #F2F5F9;
  transition: transform 0.18s ease;
}
.badge-card:hover { transform: translateY(-3px); }
.badge-card .b-emoji {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 30px;
  background: linear-gradient(135deg, var(--lemon-soft), var(--orange-soft));
  box-shadow: inset 0 0 0 3px #fff, 0 6px 16px rgba(255, 160, 90, 0.24);
}
.badge-card .b-name { font-size: 14.5px; font-weight: 800; margin-bottom: 6px; }
.badge-card .b-desc { font-size: 11.5px; color: var(--ink-soft); line-height: 1.6; min-height: 34px; }
.badge-card .b-time {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
  background: var(--mint-soft);
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-block;
}
.badge-card.locked .b-emoji { filter: grayscale(1); opacity: 0.42; box-shadow: inset 0 0 0 3px #fff; }
.badge-card.locked .b-name { color: #9FAEBD; }
.badge-card.locked .b-desc { color: #B7C3CF; }
.badge-card.locked .b-time { color: #A9B7C4; background: #F1F4F7; }
.badge-card.got { border-color: var(--lemon); }

/* ---------------- 占位页 ---------------- */
.holder {
  text-align: center;
  padding: 46px 24px 40px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
.holder .h-emoji { font-size: 58px; display: block; margin-bottom: 16px; animation: bob 3s ease-in-out infinite; }
.holder h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; }
.holder p { margin: 0 auto 8px; max-width: 460px; font-size: 14px; color: var(--ink-soft); line-height: 1.9; }
.holder .h-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.holder .h-tip {
  margin-top: 22px;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lemon-soft);
  color: #8A6F1E;
  font-size: 12.5px;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 24px);
  padding: 13px 24px;
  border-radius: 999px;
  background: rgba(52, 73, 94, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(52, 73, 94, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s ease;
  z-index: 999;
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 页脚 ---------------- */
.site-footer {
  text-align: center;
  padding: 26px 18px 34px;
  font-size: 12px;
  color: #ADBCC9;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .wrap { padding: 18px 14px 50px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand { font-size: 14px; }
  .brand .dot { width: 26px; height: 26px; font-size: 14px; border-radius: 9px; }
  .back-btn { padding: 7px 12px; font-size: 13px; }
  .lesson-chip { padding: 6px 11px; font-size: 12px; }
  .page-title { font-size: 21px; }
  .page-sub { font-size: 13px; margin-bottom: 18px; }

  .welcome h1 { font-size: 28px; }
  .welcome .slogan { font-size: 13px; margin-bottom: 26px; }
  .welcome .start-btn { padding: 15px 40px; font-size: 17px; }
  .welcome-emoji { font-size: 52px; }

  .unit-block { padding: 16px 14px 18px; border-radius: 20px; }
  .unit-title { font-size: 15px; }
  .unit-count { display: none; }
  .lesson-card { padding: 14px 12px; }
  .lesson-card .title { font-size: 14px; }
  .lesson-card .desc { font-size: 11.5px; }

  .tool-grid { gap: 11px; }
  .tool-card { padding: 16px 13px; border-radius: 20px; }
  .tool-card .t-emoji { width: 42px; height: 42px; font-size: 21px; border-radius: 13px; margin-bottom: 10px; }
  .tool-card .t-name { font-size: 14px; }
  .tool-card .t-desc { font-size: 11px; }

  .word-grid { grid-template-columns: 1fr; }
  .word-card .w-en { font-size: 20px; }

  .quiz-q { font-size: 15px; }
  .opt { font-size: 14px; padding: 12px 13px; }

  .badge-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .badge-card { padding: 16px 10px; }
  .badge-card .b-emoji { width: 52px; height: 52px; font-size: 25px; }

  .panel { padding: 17px 15px; border-radius: 20px; }
  .holder { padding: 34px 18px 30px; }
  .holder h2 { font-size: 19px; }
}

/* ==========================================================
   阶段直播入口（选课页顶部）
   ========================================================== */
.live-wrap { margin: 0 0 24px; }
.live-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; flex-wrap: wrap; }
.live-head h2 { margin: 0; font-size: 17px; }
.live-head .live-badge {
  background: var(--pink-soft); color: #D9436A; font-size: 12px;
  font-weight: 800; padding: 3px 10px; border-radius: 999px;
}
.live-head .live-hint { font-size: 12.5px; color: var(--ink-soft); }
.live-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 12px; }
.live-card {
  background: var(--card); border-radius: var(--radius-md); padding: 15px 16px;
  box-shadow: var(--shadow); border-left: 6px solid var(--sky);
}
.live-card.live { border-left-color: var(--red); }
.live-card.soon { border-left-color: var(--lemon); }
.live-card.ended { border-left-color: #CBD5E1; opacity: .74; }
.live-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.live-dot {
  font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink-soft); white-space: nowrap;
}
.live-dot.live { background: #FFE3E3; color: var(--red); }
.live-dot.soon { background: var(--lemon-soft); color: #A97600; }
.live-title { font-weight: 800; font-size: 14.5px; margin: 8px 0 4px; line-height: 1.45; }
.live-meta { font-size: 12.5px; color: var(--ink-soft); }
.live-actions { margin-top: 11px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.live-actions .btn { padding: 8px 15px; font-size: 12.5px; }
.live-actions .btn[disabled] { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.live-actions .live-note { font-size: 11.5px; color: var(--ink-soft); }

/* ==========================================================
   预习视频页
   ========================================================== */
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pv-head .pv-tag {
  font-size: 12px; font-weight: 800; color: #8A5A00;
  background: var(--lemon-soft); padding: 3px 10px; border-radius: 999px;
}
.pv-frame {
  position: relative; margin-top: 14px; border-radius: var(--radius-md); overflow: hidden;
  background: #243244; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
}
.pv-frame video { width: 100%; height: 100%; display: block; background: #000; }
.pv-placeholder { text-align: center; color: #E8F0FA; padding: 22px 18px; }
.pv-placeholder .pv-emoji { font-size: 46px; line-height: 1; }
.pv-placeholder h3 { margin: 10px 0 6px; font-size: 17px; color: #fff; }
.pv-placeholder p { margin: 0; font-size: 12.5px; color: #B9C7D8; line-height: 1.7; }
.pv-sec-title { font-size: 15px; font-weight: 800; margin: 22px 0 10px; }
.pv-point {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--cream-2); border-radius: var(--radius-sm);
  padding: 11px 13px; margin-bottom: 9px; font-size: 13.5px; line-height: 1.62;
  cursor: pointer; transition: background .18s ease;
}
.pv-point .pv-tick {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 8px;
  background: #fff; border: 2px solid var(--sky-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: transparent; font-weight: 800;
}
.pv-point.done { background: var(--mint-soft); }
.pv-point.done .pv-tick { background: var(--mint); border-color: var(--mint); color: #fff; }
.pv-point.done .pv-text { text-decoration: line-through; color: var(--ink-soft); }
.pv-progress { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-progress .pv-bar { flex: 1; min-width: 140px; height: 10px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.pv-progress .pv-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--lemon)); transition: width .3s ease; }
.pv-progress .pv-num { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.pv-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 10px; margin-top: 12px; }
.pv-item {
  background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px;
  box-shadow: var(--shadow); border: 2px solid transparent; cursor: pointer;
}
.pv-item.active { border-color: var(--orange); }
.pv-item .pv-code { font-size: 12px; font-weight: 800; color: var(--sky); }
.pv-item .pv-name { font-weight: 700; font-size: 13.5px; margin: 3px 0; }
.pv-item .pv-dur { font-size: 12px; color: var(--ink-soft); }
.pv-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* 课程锁定 / 直播阶段标签（课程页补充） */
.lesson-card .lock-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #94A3B4;
}
.lesson-card.locked .lock-note { color: #B6C1CD; }
.live-card .live-stage {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--sky);
  background: var(--sky-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .live-strip { grid-template-columns: 1fr; }
  .pv-list { grid-template-columns: 1fr; }
  .pv-placeholder .pv-emoji { font-size: 38px; }
}
