@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap');

:root {
  color-scheme: only light;
  --ink: #1e2925;
  --muted: #68736e;
  --paper: #ffffff;
  --white: #ffffff;
  --soft: #f7f8f6;
  --saffron: #f2a900;
  --coral: #e76142;
  --teal: #155b51;
  --green-soft: #dceadf;
  --red-soft: #f8ddd5;
  --line: rgba(30, 41, 37, 0.13);
  --shadow: 0 20px 55px rgba(50, 42, 25, 0.1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: #ffffff; }
body { margin: 0; background: #ffffff; color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid rgba(242, 169, 0, 0.45); outline-offset: 3px; }

.lesson-topbar { height: 72px; display: grid; grid-template-columns: 270px 1fr 50px; align-items: center; gap: 24px; padding: 0 24px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.lesson-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lesson-brand span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: 11px 11px 11px 3px; font-family: Georgia, serif; font-size: 1.35rem; }
.lesson-brand .lesson-brand-copy { width: auto; height: auto; display: block; background: transparent; color: var(--ink); border-radius: 0; font-family: "DM Sans", system-ui, sans-serif; font-size: inherit; }
.lesson-brand-copy strong, .lesson-brand-copy small { display: block; }
.lesson-brand-copy small { margin-top: 1px; color: var(--muted); font-size: 0.62rem; font-weight: 500; }
.top-progress { justify-self: center; width: min(540px, 100%); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; font-size: 0.74rem; color: var(--muted); }
.progress-track { height: 7px; overflow: hidden; background: #e9e2d5; border-radius: 99px; }
.progress-track div { height: 100%; width: 0; background: var(--saffron); border-radius: inherit; transition: width 300ms ease; }
.top-progress strong { color: var(--ink); }
.icon-button { border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 1.3rem; }
.menu-button { display: none; }

.lesson-layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.course-sidebar { background: var(--soft); border-right: 1px solid var(--line); padding: 28px 18px; position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; }
.sidebar-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 8px 21px; border-bottom: 1px solid var(--line); }
.sidebar-heading h2 { font-family: "Newsreader", Georgia, serif; margin: 5px 0 0; font-size: 1.45rem; }
.overline { color: var(--coral); text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.66rem; font-weight: 700; }
.sidebar-close { display: none; }
.course-map { padding-top: 14px; }
.module-group { border-bottom: 1px solid rgba(30, 41, 37, 0.09); }
.module-toggle { width: 100%; display: grid; grid-template-columns: 27px 1fr auto; gap: 8px; align-items: center; padding: 14px 8px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.module-toggle .module-count { color: var(--coral); font-size: 0.67rem; font-weight: 700; }
.module-toggle strong { font-size: 0.82rem; line-height: 1.2; }
.module-toggle .chevron { color: var(--muted); transition: transform 160ms ease; }
.module-group.open .chevron { transform: rotate(90deg); }
.lesson-list { display: none; padding: 0 0 10px 34px; }
.module-group.open .lesson-list { display: block; }
.module-lesson { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 0; background: transparent; color: var(--muted); padding: 7px 8px; border-radius: 8px; font-size: 0.75rem; line-height: 1.35; text-align: left; cursor: pointer; }
.module-lesson::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; border: 1px solid currentColor; border-radius: 50%; }
.module-lesson:hover { background: rgba(255, 253, 248, 0.65); color: var(--ink); }
.module-lesson.active { background: var(--white); color: var(--teal); font-weight: 700; box-shadow: 0 5px 18px rgba(50, 42, 25, 0.07); }
.module-lesson.completed::before { background: var(--teal); border-color: var(--teal); }

.lesson-main { min-width: 0; }
.lesson-loading { min-height: calc(100vh - 72px); display: grid; place-items: center; color: var(--muted); }
#lessonContent { width: min(920px, calc(100% - 56px)); margin: 0 auto; padding: 27px 0 80px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 0.72rem; margin-bottom: 27px; }
.breadcrumbs a { text-decoration: none; }

.lesson-hero { display: grid; grid-template-columns: 1fr 245px; align-items: center; gap: 50px; min-height: 300px; padding: 42px 0 50px; border-bottom: 1px solid var(--line); }
.lesson-number { color: var(--coral); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.68rem; font-weight: 700; }
.lesson-hero h1 { margin: 12px 0 15px; font-family: "Newsreader", Georgia, serif; font-size: clamp(3.1rem, 6vw, 5.5rem); line-height: 0.95; letter-spacing: -0.045em; }
.lesson-hero-copy > p { color: var(--muted); line-height: 1.7; max-width: 620px; }
.lesson-meta-row { display: flex; gap: 19px; flex-wrap: wrap; margin-top: 23px; color: var(--muted); font-size: 0.73rem; }
.listen-card { width: 100%; border: 1px solid var(--line); border-radius: 20px; background: var(--white); padding: 25px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 13px; color: var(--ink); box-shadow: var(--shadow); cursor: pointer; transition: transform 160ms ease; }
.listen-card:hover { transform: translateY(-3px); }
.listen-circle { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 10px rgba(242, 169, 0, 0.14); }
.listen-card strong, .listen-card small { display: block; }
.listen-card small { color: var(--muted); margin-top: 3px; }
.listen-card.is-speaking .listen-circle { animation: pulse 1s ease-in-out infinite alternate; }

.goal-card { display: grid; grid-template-columns: 50px 1fr; gap: 17px; align-items: center; margin: 32px 0 78px; padding: 21px 24px; background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: 15px; }
.goal-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 12px; background: var(--saffron); font-size: 1.3rem; }
.goal-card p { margin: 5px 0 0; line-height: 1.55; }

.lesson-roadmap { margin-bottom: 86px; }
.roadmap-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--white); }
.roadmap-step { min-height: 150px; padding: 22px; border-right: 1px solid var(--line); }
.roadmap-step:last-child { border-right: 0; }
.roadmap-step > span { display: block; color: var(--coral); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 27px; }
.roadmap-step strong { display: block; font-family: "Newsreader", Georgia, serif; font-size: 1.25rem; line-height: 1.1; }
.roadmap-step p { margin: 7px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }

.lesson-section { margin-bottom: 90px; }
.lesson-section-heading { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; margin-bottom: 28px; }
.lesson-section-heading h2, .practice-header h2, .recap-card h2 { margin: 6px 0 0; font-family: "Newsreader", Georgia, serif; font-size: 2.35rem; letter-spacing: -0.025em; }
.lesson-section-heading > p { color: var(--muted); max-width: 260px; font-size: 0.8rem; line-height: 1.5; margin: 0; }
.phrase-list { border-top: 1px solid var(--line); }
.phrase-row { display: grid; grid-template-columns: 54px 1.15fr 1fr; gap: 18px; align-items: center; min-height: 110px; padding: 16px 8px; border-bottom: 1px solid var(--line); }
.voice-button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ink); color: var(--white); cursor: pointer; font-size: 0.68rem; transition: transform 150ms ease, background 150ms ease; }
.voice-button:hover { transform: scale(1.06); background: var(--coral); }
.voice-button.is-speaking { background: var(--coral); animation: pulse 0.7s ease-in-out infinite alternate; }
.phrase-hindi { font-family: Georgia, serif; font-size: 2rem; color: var(--teal); }
.phrase-roman { font-weight: 700; font-size: 0.95rem; margin-top: 4px; }
.phrase-sound-cue { display: inline-block; margin-top: 7px; color: var(--coral); background: rgba(231,97,66,0.09); padding: 4px 7px; border-radius: 6px; font-size: 0.65rem; font-weight: 700; }
.phrase-meaning { color: var(--muted); font-size: 0.9rem; }
.phrase-meaning strong, .phrase-meaning span { display: block; }
.phrase-meaning strong { color: var(--ink); font-size: 0.88rem; }
.phrase-meaning span { margin-top: 6px; font-size: 0.72rem; line-height: 1.45; }

.pronunciation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pronunciation-card { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: 0 10px 32px rgba(50,42,25,0.05); }
.pronunciation-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.pronunciation-top > div span, .pronunciation-top > div strong { display: block; }
.pronunciation-phrase { color: var(--teal); font-family: Georgia, serif; font-size: 1.65rem; }
.pronunciation-top strong { margin-top: 3px; font-size: 0.8rem; }
.sound-chunks { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 14px; }
.sound-chunks span { padding: 7px 10px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 0.78rem; }
.pronunciation-notes { padding-top: 13px; border-top: 1px solid var(--line); }
.pronunciation-notes p { margin: 5px 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.pronunciation-notes strong { color: var(--ink); }

.culture-card { display: grid; grid-template-columns: 180px 1fr; gap: 38px; align-items: center; min-height: 290px; margin-bottom: 90px; padding: 36px; border: 1px solid var(--line); border-left: 6px solid var(--saffron); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.culture-symbol { width: 145px; height: 145px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); font-family: Georgia, serif; font-size: 6.5rem; line-height: 1; text-align: center; color: var(--teal); transform: rotate(-7deg); }
.culture-card h2 { margin: 7px 0 12px; font-family: "Newsreader", Georgia, serif; font-size: 2.35rem; }
.culture-card p { line-height: 1.65; margin: 0; max-width: 610px; }
.culture-card .overline { color: var(--coral); }
.culture-tips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.culture-tips span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: 0.69rem; font-weight: 700; }

.dialogue-card { background: var(--teal); color: var(--white); border-radius: 24px; padding: 34px; position: relative; overflow: hidden; }
.dialogue-card::after { content: "बात"; position: absolute; right: -10px; bottom: -30px; font-family: Georgia, serif; font-size: 8rem; color: rgba(255,255,255,0.05); }
.dialogue-context { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: end; margin: -4px 0 15px; padding-bottom: 21px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.dialogue-context span, .dialogue-context strong { display: block; }
.dialogue-context span { color: var(--saffron); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.63rem; font-weight: 700; }
.dialogue-context strong { margin-top: 5px; font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; }
.dialogue-context p { max-width: 270px; margin: 0; color: rgba(255,255,255,0.68); font-size: 0.72rem; line-height: 1.5; }
.dialogue-line { position: relative; z-index: 1; display: grid; grid-template-columns: 42px 1fr 36px; gap: 15px; align-items: center; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.dialogue-line:last-child { border-bottom: 0; }
.speaker-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--saffron); color: var(--ink); font-weight: 700; }
.dialogue-line:nth-child(even) .speaker-avatar { background: var(--coral); color: var(--white); }
.dialogue-speaker { color: rgba(255,255,255,0.62); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em; }
.dialogue-text { font-size: 1.05rem; margin-top: 3px; }
.dialogue-translation { color: rgba(255,255,255,0.65); font-size: 0.76rem; margin-top: 4px; }
.dialogue-line .voice-button { width: 34px; height: 34px; background: rgba(255,255,255,0.13); }

.roleplay-card { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 35px; margin: -30px 0 90px; padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.roleplay-copy h2 { margin: 7px 0 12px; font-family: "Newsreader", Georgia, serif; font-size: 2.25rem; line-height: 1.05; }
.roleplay-copy > p { color: var(--muted); line-height: 1.6; font-size: 0.82rem; }
.roleplay-checks { display: grid; gap: 7px; margin-top: 22px; }
.roleplay-checks span { color: var(--teal); font-size: 0.72rem; font-weight: 700; }
.roleplay-prompts { display: grid; gap: 10px; }
.roleplay-prompt { display: grid; grid-template-columns: 1fr 42px; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--soft); border: 1px solid rgba(30,41,37,0.08); }
.roleplay-prompt span { color: var(--coral); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.6rem; font-weight: 700; }
.roleplay-prompt strong { display: block; margin-top: 3px; font-size: 0.82rem; }
.roleplay-prompt p { margin: 5px 0 0; color: var(--muted); font-size: 0.72rem; }

.practice-shell { margin: 0 0 90px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); overflow: hidden; box-shadow: var(--shadow); }
.practice-header { padding: 28px 30px 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.practice-points { color: var(--teal); background: rgba(21, 91, 81, 0.09); padding: 7px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; }
.practice-tabs { display: flex; gap: 3px; padding: 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.practice-tabs button { flex: 1; min-width: 118px; padding: 14px 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.practice-tabs button.active { color: var(--ink); border-bottom-color: var(--saffron); }
.practice-panel { display: none; min-height: 360px; padding: 30px; }
.practice-panel.active { display: block; }
.activity-intro { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.activity-intro h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 1.55rem; }
.activity-intro p { margin: 5px 0 0; color: var(--muted); font-size: 0.8rem; }
.activity-score { color: var(--coral); font-weight: 700; font-size: 0.8rem; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 30px; }
.match-column { display: grid; gap: 10px; align-content: start; }
.match-button { min-height: 53px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); color: var(--ink); cursor: pointer; text-align: left; }
.match-button:hover { border-color: var(--saffron); }
.match-button.selected { background: rgba(242, 169, 0, 0.15); border-color: var(--saffron); }
.match-button.matched { background: var(--green-soft); border-color: rgba(21,91,81,0.3); color: var(--teal); cursor: default; }
.match-button.wrong { background: var(--red-soft); border-color: var(--coral); animation: shake 180ms ease-in-out 2; }
.activity-complete { padding: 22px; text-align: center; border-radius: 14px; background: var(--green-soft); color: var(--teal); font-weight: 700; }

.builder-card { max-width: 690px; margin: 0 auto; }
.builder-prompt span, .builder-prompt strong { display: block; }
.builder-prompt span { color: var(--coral); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.63rem; font-weight: 700; }
.builder-prompt strong { margin-top: 5px; font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; }
.builder-answer { min-height: 78px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 13px; padding: 13px; border: 2px dashed rgba(21,91,81,0.25); border-radius: 13px; background: rgba(21,91,81,0.04); }
.answer-placeholder { color: var(--muted); font-size: 0.76rem; }
.builder-bank { min-height: 73px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px; border-radius: 13px; background: var(--soft); }
.builder-token { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--white); color: var(--ink); cursor: pointer; font-family: Georgia, serif; font-size: 1rem; box-shadow: 0 3px 8px rgba(50,42,25,0.05); }
.builder-token:hover { border-color: var(--saffron); transform: translateY(-1px); }
.builder-feedback { min-height: 44px; padding: 12px 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.builder-feedback.correct { color: var(--teal); }
.builder-feedback.wrong { color: var(--coral); }
.builder-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.builder-check { border: 0; border-radius: 999px; padding: 10px 17px; background: var(--ink); color: var(--white); font-size: 0.76rem; font-weight: 700; cursor: pointer; }

.flashcard-stage { max-width: 560px; margin: 0 auto; text-align: center; }
.flashcard { min-height: 225px; padding: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 20px; background: var(--soft); cursor: pointer; }
.flashcard .front { font-family: Georgia, serif; font-size: 3.4rem; color: var(--teal); }
.flashcard .back { display: none; }
.flashcard.revealed .front { display: none; }
.flashcard.revealed .back { display: block; font-size: 1.15rem; line-height: 1.7; }
.flashcard-hint { color: var(--muted); font-size: 0.72rem; margin-top: 9px; }
.flash-controls { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }
.small-button { border: 1px solid var(--line); border-radius: 999px; background: transparent; padding: 9px 15px; color: var(--ink); cursor: pointer; font-weight: 700; font-size: 0.75rem; }
.small-button:hover { background: var(--soft); }

.quiz-question { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.quiz-question h3 { font-size: 0.95rem; margin: 0 0 13px; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quiz-option { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); text-align: left; cursor: pointer; }
.quiz-option.correct { background: var(--green-soft); border-color: var(--teal); }
.quiz-option.wrong { background: var(--red-soft); border-color: var(--coral); }
.quiz-result { font-weight: 700; color: var(--teal); }

.speaking-mission { margin-bottom: 90px; padding: 35px; border-radius: 24px; background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.speaking-mission::after { content: "बोलो"; position: absolute; right: -15px; top: -22px; font-family: Georgia, serif; font-size: 8rem; color: rgba(255,255,255,0.035); }
.mission-heading { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 0.7fr; gap: 40px; align-items: end; margin-bottom: 25px; }
.mission-heading .overline { grid-column: 1; grid-row: 1; align-self: end; }
.mission-heading h2 { margin: 6px 0 0; font-family: "Newsreader", Georgia, serif; font-size: 2.45rem; line-height: 1.05; }
.mission-heading h2 { grid-column: 1; grid-row: 2; }
.mission-heading p { grid-column: 2; grid-row: 1 / span 2; color: rgba(255,255,255,0.65); line-height: 1.55; font-size: 0.8rem; }
.mission-steps { position: relative; z-index: 1; display: grid; gap: 9px; }
.mission-step { display: grid; grid-template-columns: 24px 1fr 38px; gap: 13px; align-items: center; padding: 14px 16px; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; background: rgba(255,255,255,0.05); cursor: pointer; }
.mission-step input { width: 18px; height: 18px; accent-color: var(--saffron); }
.mission-step strong, .mission-step small { display: block; }
.mission-step strong { font-size: 0.8rem; }
.mission-step small { margin-top: 4px; color: rgba(255,255,255,0.58); font-size: 0.68rem; }
.mission-step:has(input:checked) { border-color: rgba(242,169,0,0.55); background: rgba(242,169,0,0.11); }
.mission-voice { width: 34px; height: 34px; background: rgba(255,255,255,0.12); }
.mission-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: rgba(255,255,255,0.68); font-size: 0.72rem; }
.mission-footer .small-button { color: var(--white); border-color: rgba(255,255,255,0.2); }
.speaking-mission.complete { box-shadow: inset 0 0 0 2px var(--saffron), var(--shadow); }

.recap-card { min-height: 180px; display: grid; grid-template-columns: 1fr 58px; align-items: center; gap: 25px; padding: 32px 36px; margin-bottom: 54px; background: rgba(231, 97, 66, 0.11); border: 1px solid rgba(231, 97, 66, 0.25); border-radius: 20px; }
.recap-card p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.voice-button-large { width: 55px; height: 55px; background: var(--coral); }
.lesson-footer-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-top: 28px; border-top: 1px solid var(--line); }
.lesson-footer-actions a { text-decoration: none; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.next-link { justify-self: end; }
.complete-button { min-height: 49px; border: 0; border-radius: 999px; padding: 0 21px; background: var(--ink); color: var(--white); font-weight: 700; cursor: pointer; }
.complete-button span { color: var(--saffron); margin-left: 7px; }
.complete-button.completed { background: var(--teal); }
.empty-state { min-height: 240px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 7px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 120px); opacity: 0; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--white); box-shadow: var(--shadow); font-size: 0.78rem; transition: transform 220ms ease, opacity 220ms ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes pulse { to { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(242,169,0,0.08); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 980px) {
  .lesson-topbar { grid-template-columns: 190px 1fr 42px; }
  .lesson-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .course-sidebar { width: 240px; }
  .lesson-hero { grid-template-columns: 1fr 200px; gap: 28px; }
  .roadmap-grid { grid-template-columns: 1fr 1fr; }
  .roadmap-step:nth-child(2) { border-right: 0; }
  .roadmap-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 780px) {
  .lesson-topbar { grid-template-columns: 1fr auto; padding: 0 16px; }
  .top-progress { display: none; }
  .menu-button { display: block; }
  .lesson-layout { display: block; }
  .course-sidebar { position: fixed; top: 0; left: 0; z-index: 50; width: min(330px, 88vw); height: 100vh; transform: translateX(-105%); transition: transform 220ms ease; box-shadow: var(--shadow); }
  .course-sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  #lessonContent { width: min(100% - 32px, 920px); padding-top: 18px; }
  .lesson-hero { grid-template-columns: 1fr; gap: 25px; padding-top: 25px; }
  .lesson-hero h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .listen-card { flex-direction: row; text-align: left; padding: 18px; }
  .listen-circle { width: 52px; height: 52px; box-shadow: none; }
  .goal-card { margin-bottom: 62px; }
  .roleplay-card { grid-template-columns: 1fr; }
  .mission-heading { grid-template-columns: 1fr; gap: 8px; }
  .mission-heading .overline, .mission-heading h2, .mission-heading p { grid-column: 1; grid-row: auto; }
  .lesson-section-heading { grid-template-columns: 1fr; gap: 7px; }
  .lesson-section-heading > p { max-width: none; }
  .phrase-row { grid-template-columns: 46px 1fr; }
  .phrase-meaning { grid-column: 2; margin-top: -13px; }
  .practice-header { align-items: flex-start; flex-direction: column; }
  .lesson-footer-actions { grid-template-columns: 1fr 1fr; }
  .complete-button { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 520px) {
  .breadcrumbs { display: none; }
  .lesson-hero { padding-top: 42px; }
  .lesson-meta-row { gap: 11px; }
  .goal-card { grid-template-columns: 40px 1fr; padding: 18px; }
  .goal-icon { width: 38px; height: 38px; }
  .roadmap-grid, .pronunciation-grid { grid-template-columns: 1fr; }
  .roadmap-step { border-right: 0; border-bottom: 1px solid var(--line); min-height: 125px; }
  .roadmap-step:last-child { border-bottom: 0; }
  .culture-card { grid-template-columns: 1fr; gap: 5px; padding: 25px; }
  .culture-symbol { font-size: 5rem; text-align: left; }
  .culture-card h2 { font-size: 2rem; }
  .lesson-section { margin-bottom: 68px; }
  .lesson-section-heading h2, .practice-header h2, .recap-card h2 { font-size: 2rem; }
  .phrase-hindi { font-size: 1.65rem; }
  .dialogue-card { padding: 22px 18px; }
  .dialogue-line { grid-template-columns: 35px 1fr 32px; gap: 10px; }
  .dialogue-context { grid-template-columns: 1fr; gap: 8px; }
  .roleplay-card { padding: 24px 19px; }
  .speaker-avatar { width: 34px; height: 34px; }
  .practice-panel { padding: 22px 17px; }
  .match-grid, .quiz-options { grid-template-columns: 1fr; }
  .match-grid { gap: 20px; }
  .builder-actions { justify-content: space-between; flex-wrap: wrap; }
  .speaking-mission { padding: 25px 18px; }
  .mission-heading h2 { font-size: 2rem; }
  .recap-card { grid-template-columns: 1fr; padding: 25px; }
  .lesson-footer-actions { gap: 12px; }
  .lesson-footer-actions a { font-size: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
