/* Hora Academy · Interactive Lesson Stylesheet (Sunny Primary Maths) */
.lesson-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 22px 84px;
}

/* Student & Voice Controls in Topbar */
.student-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #ffd43b;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 212, 59, 0.22);
}
.st-switch {
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}
.st-switch:hover { background: #e2e8f0; }
.st-stars {
  background: #fff3bf;
  color: #9c5700;
  padding: 2px 9px;
  border-radius: 999px;
}
.speed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}
.speed-pill select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 800;
  color: #0c8599;
  outline: none;
  cursor: pointer;
}

/* Lesson Hero Banner (Vibrant Storybook Style) */
.lesson-hero {
  position: relative;
  border-radius: 30px;
  background: linear-gradient(125deg, #0c8599 0%, #15aabf 48%, #ff922b 100%);
  border: 3px solid rgba(255, 255, 255, 0.8);
  padding: 30px 34px;
  box-shadow: 0 22px 46px rgba(12, 133, 153, 0.24);
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 26px;
  align-items: center;
  margin-bottom: 24px;
  color: #fff;
  overflow: hidden;
}
.lesson-hero::before {
  content: "2  3  5  7  11  13  ÷4  ÷8";
  position: absolute;
  left: 24px; bottom: 8px;
  font-size: 24px; font-weight: 900; letter-spacing: 10px;
  color: rgba(255,255,255,0.12);
  pointer-events: none;
}
.lesson-hero .breadcrumb { color: rgba(255,255,255,0.92); background: rgba(255,255,255,0.16); padding: 4px 12px; border-radius: 999px; display: inline-flex; margin-bottom: 10px; }
.lesson-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 4px 14px rgba(15, 27, 45, 0.2);
}
.lesson-hero .sub-zh {
  font-size: 15px;
  font-weight: 800;
  color: #fff3bf;
  margin-bottom: 10px;
}
.lesson-hero p { margin: 0 0 14px; font-size: 14.5px; color: rgba(255,255,255,0.94); }
.hero-illu {
  border-radius: 22px;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 16px 34px rgba(15, 27, 45, 0.26);
  aspect-ratio: 16 / 9;
  background: #e3fafc;
}
.hero-illu img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Rainbow Step Cards (Each step gets its own joyful pastel theme!) */
.l-card {
  position: relative;
  background: linear-gradient(155deg, var(--step-bg, #ffffff) 0%, #ffffff 55%);
  border: 2px solid var(--step-bd, var(--line));
  border-top: 6px solid var(--step-accent, #15aabf);
  border-radius: 26px;
  padding: 26px 28px;
  margin-bottom: 24px;
  box-shadow: 0 12px 28px rgba(30, 58, 95, 0.08);
  scroll-margin-top: 84px;
}
.l-card:nth-of-type(6n+2) { --step-accent:#ff922b; --step-bg:#fff8eb; --step-bd:#ffd8a8; }
.l-card:nth-of-type(6n+3) { --step-accent:#12b886; --step-bg:#ebfbee; --step-bd:#b2f2bb; }
.l-card:nth-of-type(6n+4) { --step-accent:#339af0; --step-bg:#eef7ff; --step-bd:#a5d8ff; }
.l-card:nth-of-type(6n+5) { --step-accent:#7950f2; --step-bg:#f6f3ff; --step-bd:#d0bfff; }
.l-card:nth-of-type(6n+6) { --step-accent:#f06595; --step-bg:#fff0f6; --step-bd:#fcc2d7; }
.l-card:nth-of-type(6n+7) { --step-accent:#fab005; --step-bg:#fffbeb; --step-bd:#ffe066; }

.l-step {
  width: 44px; height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--step-accent, #15aabf), color-mix(in srgb, var(--step-accent, #15aabf) 70%, #ffd43b));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--step-accent, #15aabf) 30%, transparent);
}

/* Colorful Vocabulary Cards */
.vocab-card:nth-child(6n+1) { background: #fff5f5; border-color: #ffc9c9; }
.vocab-card:nth-child(6n+2) { background: #fff9db; border-color: #ffec99; }
.vocab-card:nth-child(6n+3) { background: #ebfbee; border-color: #b2f2bb; }
.vocab-card:nth-child(6n+4) { background: #e7f5ff; border-color: #a5d8ff; }
.vocab-card:nth-child(6n+5) { background: #f3f0ff; border-color: #d0bfff; }
.vocab-card:nth-child(6n+6) { background: #e3fafc; border-color: #99e9f2; }

/* Illustrated Visual Callout inside Lesson */
.story-poster {
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 14px 30px rgba(30, 58, 95, 0.14);
  margin-bottom: 16px;
}
.story-poster img { width: 100%; height: auto; display: block; }

/* Step Journey Navigation */
.step-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.9);
  border: 1.5px solid var(--line);
  border-radius: 18px;
}
.step-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  background: #f8fafc;
  color: var(--ink-2);
  border: 1px solid var(--line);
  transition: all .15s ease;
}
.step-nav a:hover { background: #0c8599; color: #fff; border-color: #0c8599; }

/* Lesson Section Card */
.l-card {
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--line);
  border-radius: 26px;
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 84px;
}
.l-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.l-head-left { display: flex; align-items: center; gap: 12px; }
.l-step {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #15aabf, #0c8599);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 17px;
  flex-shrink: 0;
}
.l-head h2 { margin: 0; font-size: 21px; font-weight: 900; }
.l-head small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }

/* Teacher Speech Bubble & Audio Button */
.speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid #66d9e8;
  background: #e3fafc;
  color: #0b7285;
  font-size: 12.5px;
  font-weight: 800;
  transition: all .16s ease;
}
.speak-btn:hover { background: #0c8599; color: #fff; border-color: #0c8599; transform: translateY(-1px); }

.teacher-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fffbeb;
  border: 1.5px solid #ffe066;
  border-radius: 18px;
  padding: 15px 18px;
  margin-bottom: 16px;
}
.teacher-ava {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd43b, #ff922b);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}
.teacher-box p { margin: 0; font-size: 14.5px; color: #4a3300; font-weight: 600; }

/* Animated Video Lesson Player */
.video-player {
  background: #0f2537;
  border-radius: 22px;
  padding: 16px;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 37, 55, 0.22);
}
.video-screen {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #16324a, #0e2030);
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(102, 217, 232, 0.28);
}
.video-screen canvas { width: 100%; height: 100%; display: block; }
.video-subtitle {
  position: absolute;
  left: 16px; right: 16px; bottom: 14px;
  background: rgba(9, 20, 32, 0.82);
  backdrop-filter: blur(6px);
  color: #fff9db;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.video-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.v-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: #ffd43b;
  color: #4a2600;
  font-weight: 900;
  font-size: 13px;
}
.v-btn.sec { background: rgba(255,255,255,0.14); color: #fff; }
.v-progress {
  flex: 1;
  min-width: 140px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
}
.v-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #66d9e8, #ffd43b);
  transition: width .3s ease;
}
.v-scene-label { font-size: 12px; font-weight: 800; color: #99e9f2; }

/* Interactive Lab Container */
.lab-box {
  background: #f4fbff;
  border: 2px dashed #74c0fc;
  border-radius: 20px;
  padding: 20px;
  margin-top: 14px;
}
.lab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.lab-btn {
  padding: 8px 15px;
  border-radius: 12px;
  border: 1.5px solid #74c0fc;
  background: #fff;
  color: #1971c2;
  font-weight: 800;
  font-size: 13px;
  transition: all .15s ease;
}
.lab-btn:hover, .lab-btn.active { background: #228be6; color: #fff; border-color: #228be6; }
.lab-btn.gold { border-color: #fab005; color: #9c5700; background: #fff9db; }
.lab-btn.gold:hover { background: #fab005; color: #fff; }

/* 100-Grid Sieve */
.sieve-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  max-width: 560px;
  margin: 12px auto;
}
.sieve-cell {
  aspect-ratio: 1;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
  background: #fff;
  border: 1.5px solid #dcebfa;
  color: var(--ink);
  transition: all .28s ease;
}
.sieve-cell.one { background: #e2e8f0; color: #94a3b8; text-decoration: line-through; }
.sieve-cell.cross-2 { background: #ffe3e3; color: #c92a2a; opacity: 0.45; }
.sieve-cell.cross-3 { background: #fff3bf; color: #b45309; opacity: 0.45; }
.sieve-cell.cross-5 { background: #d3f9d8; color: #2b8a3e; opacity: 0.45; }
.sieve-cell.cross-7 { background: #e5dbff; color: #5f3dc4; opacity: 0.45; }
.sieve-cell.prime-win {
  background: linear-gradient(135deg, #ffd43b, #ff922b);
  color: #fff;
  border-color: #f76707;
  transform: scale(1.06);
  box-shadow: 0 4px 10px rgba(255, 146, 43, 0.35);
}

/* Cookie Array Grid */
.arrays-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 14px 0;
}
.array-box {
  background: #fff;
  border: 2px solid #ffe066;
  border-radius: 16px;
  padding: 12px 14px;
  text-align: center;
}
.cookie-grid {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
  justify-content: center;
}
.cookie-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f5b971, #c97b32);
  box-shadow: inset -2px -2px 4px rgba(100, 45, 0, 0.35);
  position: relative;
}
.cookie-dot::after {
  content: "";
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: #4a2600;
  top: 5px; left: 6px;
  box-shadow: 6px 2px 0 #4a2600, 2px 7px 0 #4a2600;
}

/* Worked Examples & Quiz */
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ex-card {
  background: #fbfdff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.ex-card h4 { margin: 0 0 8px; font-size: 15.5px; color: #0c8599; }
.quiz-item {
  background: #fbfdff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.quiz-q { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.quiz-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.q-opt {
  padding: 8px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink);
  transition: all .15s ease;
}
.q-opt:hover { border-color: #0c8599; }
.q-opt.correct { background: #d3f9d8; border-color: #2f9e44; color: #2b8a3e; }
.q-opt.wrong { background: #ffe3e3; border-color: #fa5252; color: #c92a2a; }
.quiz-fb { margin-top: 8px; font-size: 13px; font-weight: 700; min-height: 20px; }

/* Vocabulary Cards */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.vocab-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  transition: transform .16s ease, border-color .16s ease;
}
.vocab-card:hover { transform: translateY(-2px); border-color: #0c8599; }
.vocab-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.vocab-en { font-weight: 900; font-size: 15.5px; color: #0c8599; }
.vocab-zh { font-weight: 800; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.vocab-ex { font-size: 12.5px; color: var(--muted); }

/* Interactive Mind Map */
.mindmap-wrap {
  background: linear-gradient(135deg, #f8fbff, #fffdf5);
  border: 2px solid #dcebfa;
  border-radius: 22px;
  padding: 24px 20px;
}
.mm-center {
  width: fit-content;
  margin: 0 auto 22px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #15aabf, #4c6ef5);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(21, 170, 191, 0.28);
}
.mm-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.mm-node {
  background: #fff;
  border: 2px solid var(--b-color, #74c0fc);
  border-radius: 18px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mm-node:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.mm-node h4 { margin: 0 0 6px; font-size: 15px; color: var(--b-color, #1971c2); display: flex; justify-content: space-between; }
.mm-node ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }

/* Homework Checklist */
.hw-list { display: flex; flex-direction: column; gap: 10px; }
.hw-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fbfdff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 15px;
  cursor: pointer;
}
.hw-item input { width: 20px; height: 20px; accent-color: #12b886; margin-top: 2px; flex-shrink: 0; }
.hw-item.checked { background: #ebfbee; border-color: #69db7c; }

@media (max-width: 860px) {
  .lesson-hero, .example-grid, .vocab-grid, .mm-branches { grid-template-columns: 1fr; }
}
