:root {
  color-scheme: light;
  --blue: #000091;
  --blue-dark: #00005f;
  --blue-soft: #e9e9ff;
  --red: #e1000f;
  --red-dark: #b6000c;
  --red-soft: #fff0f0;
  --white: #ffffff;
  --paper: #fbfaf5;
  --cream: #f3f0e6;
  --ink: #17172b;
  --muted: #656577;
  --line: #d9d7cf;
  --success: #087a55;
  --success-soft: #e7f6f0;
  --radius-sm: 6px;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 70, 0.11);
  --heading: "Playfair Display", Georgia, serif;
  --body: "Inter", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.65;
}

button, select, textarea, input { font: inherit; }
button, select, input[type="radio"] { cursor: pointer; }
button:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(225, 0, 15, 0.35);
  outline-offset: 3px;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.12; }
h2 { margin-bottom: 0.3rem; color: var(--blue); font-size: clamp(2rem, 4vw, 3.6rem); }
h3 { color: var(--blue); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 1rem;
  transform: translateY(-140%);
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
  padding: 0.8rem clamp(1rem, 4vw, 3.5rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand-lockup, .header-actions { display: flex; align-items: center; gap: 0.8rem; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { color: var(--blue); letter-spacing: -0.02em; }
.brand-lockup small { color: var(--muted); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: var(--white);
  border-bottom: 5px solid var(--red);
  font-family: var(--heading);
  font-weight: 800;
}
.book-chip {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--blue);
  border-radius: 100px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.lesson-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(0, 0, 80, 0.16);
}
.nav-scroll {
  display: flex;
  align-items: stretch;
  max-width: 1380px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: thin;
}
.nav-tab {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 0.8rem 1rem;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav-tab:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.nav-tab.is-active { border-bottom-color: var(--red); color: var(--white); background: rgba(255, 255, 255, 0.12); }
.reading-progress { height: 3px; background: rgba(255, 255, 255, 0.2); }
.reading-progress span { display: block; width: 9%; height: 100%; background: var(--red); transition: width 220ms ease; }

.lesson-page {
  width: min(1160px, calc(100% - 2rem));
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0 clamp(3rem, 6vw, 6rem);
}
.lesson-page[hidden] { display: none; }
.eyebrow, .series-label, .scene-number, .grammar-label, .mission-label {
  margin-bottom: 0.55rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.translation, .heading-fr, .cover-intro-fr, .line-fr { color: var(--muted); font-style: italic; }
.heading-fr { margin-bottom: 1.8rem; font-family: var(--heading); font-size: 1.2rem; }
.page-heading { max-width: 820px; margin-bottom: 2.5rem; }

.cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  min-height: 510px;
}
.book-number {
  display: inline-block;
  margin-bottom: 1.2rem;
  padding: 0.35rem 0.65rem;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cover-copy h1 {
  max-width: 760px;
  margin-bottom: 0.35rem;
  color: var(--blue);
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  letter-spacing: -0.055em;
}
.french-title { margin-bottom: 2rem; color: var(--red); font-family: var(--heading); font-size: clamp(1.5rem, 3vw, 2.4rem); font-style: italic; }
.cover-intro, .cover-intro-fr { max-width: 670px; margin-bottom: 0.35rem; font-size: 1.05rem; }
.cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; }
.primary-button, .check-button, .secondary-button {
  min-height: 48px;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
}
.primary-button, .check-button { border: 1px solid var(--blue); background: var(--blue); color: var(--white); }
.primary-button:hover, .check-button:hover { background: var(--blue-dark); }
.secondary-button { border: 1px solid var(--blue); background: var(--white); color: var(--blue); }
.time-note { color: var(--muted); font-size: 0.84rem; }

.list-illustration { position: relative; min-height: 430px; }
.list-paper {
  position: absolute;
  inset: 10px 28px 20px 0;
  padding: 2.3rem 2rem;
  transform: rotate(2.5deg);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 37px, #d9e5ff 38px), #fffdf5;
  border: 1px solid #ded8c8;
  box-shadow: var(--shadow);
}
.list-paper::before { content: ""; position: absolute; top: 0; bottom: 0; left: 44px; width: 1px; background: rgba(225, 0, 15, 0.35); }
.list-paper p { position: relative; z-index: 1; margin: 0 0 0.8rem 1.1rem; font-family: var(--heading); font-size: 1.25rem; }
.list-paper .handwritten-title { margin-bottom: 1.7rem; color: var(--blue); font-size: 1.8rem; font-weight: 800; }
.check { color: var(--success); font-weight: 800; }
.empty-box { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--ink); vertical-align: -1px; }
.paper-note {
  position: absolute;
  right: -22px;
  bottom: 35px;
  width: 150px;
  padding: 1rem;
  transform: rotate(-7deg);
  background: #ffe8a8;
  box-shadow: 0 8px 18px rgba(50, 35, 0, 0.16);
  color: #493500;
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 700;
}
.pencil { position: absolute; right: 5px; bottom: 20px; width: 16px; height: 260px; transform: rotate(28deg); background: var(--red); border: 1px solid var(--red-dark); }
.pencil::before { content: ""; position: absolute; top: -23px; left: -1px; border-right: 8px solid transparent; border-bottom: 24px solid #d5b18a; border-left: 8px solid transparent; }

.learning-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1rem 0 2rem; border-block: 1px solid var(--line); }
.learning-strip > div { display: grid; grid-template-columns: auto 1fr; column-gap: 0.8rem; padding: 1.3rem; }
.learning-strip > div + div { border-left: 1px solid var(--line); }
.learning-strip strong, .learning-strip small { grid-column: 2; }
.learning-strip small { color: var(--muted); }
.strip-number { grid-row: 1 / span 2; color: var(--red); font-family: var(--heading); font-size: 1.5rem; font-weight: 800; }
.objectives-card { padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--blue); color: var(--white); border-left: 8px solid var(--red); }
.objectives-card h2 { color: var(--white); font-size: 1.8rem; }
.objective-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 2rem; margin-bottom: 0; padding-left: 1.2rem; }

.character-grid { display: grid; gap: 1.2rem; }
.character-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 8px solid var(--blue);
  box-shadow: 0 8px 24px rgba(0, 0, 70, 0.06);
}
.nina-card { border-left-color: var(--red); }
.olivier-card { border-left-color: var(--success); }
.portrait {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 50%;
  font-family: var(--heading);
  font-size: 3rem;
  font-weight: 800;
}
.nina-card .portrait { background: var(--red-soft); color: var(--red); }
.olivier-card .portrait { background: var(--success-soft); color: var(--success); }
.character-card h3 { margin-bottom: 0.5rem; font-size: 2rem; }
.character-role { margin-bottom: 0.25rem; color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.character-phrase { display: inline-block; padding: 0.3rem 0.55rem; background: var(--cream); color: var(--blue); font-family: var(--heading); font-weight: 700; }
.story-setup { margin-top: 2rem; padding: 1.4rem; border: 1px solid var(--blue); background: var(--blue-soft); }
.setup-label { display: inline-block; margin-bottom: 0.65rem; color: var(--blue); font-weight: 800; text-transform: uppercase; }
.story-setup p:last-child { margin-bottom: 0; }

.scene-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding-bottom: 1.25rem; border-bottom: 3px solid var(--blue); }
.scene-heading h2 { margin-bottom: 0.15rem; }
.scene-heading .heading-fr { margin-bottom: 0; }
.scene-setting { flex: 0 0 auto; padding: 0.7rem 1rem; border-left: 4px solid var(--red); background: var(--cream); text-align: right; }
.scene-setting span, .scene-setting small { display: block; }
.scene-setting span { color: var(--blue); font-weight: 800; }
.scene-setting small { color: var(--muted); }
.scene-intro { margin: 1.7rem 0 0.15rem; font-size: 1.05rem; }
.scene-intro-fr { margin-bottom: 1.8rem; }
.dialogue { display: grid; gap: 0.75rem; }
.dialogue-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 150ms ease, transform 150ms ease;
}
.dialogue-line:hover { border-color: #aaa8c7; transform: translateX(3px); }
.speaker-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--white); font-family: var(--heading); font-size: 1.25rem; font-weight: 800; }
.speaker-badge.marta { background: var(--blue); }
.speaker-badge.nina { background: var(--red); }
.speaker-badge.olivier { background: var(--success); }
.speaker-name { margin-bottom: 0.15rem; color: var(--blue); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.line-en { margin-bottom: 0.15rem; font-size: 1.05rem; font-weight: 600; }
.line-fr { margin-bottom: 0; font-size: 0.9rem; }
mark { padding: 0 0.15em; background: #fff0b8; color: inherit; }
.audio-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 92px;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--blue);
  border-radius: 100px;
  background: var(--white);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}
.audio-button:hover, .audio-button.is-playing { background: var(--blue); color: var(--white); }
.audio-button.is-loading { opacity: 0.65; }
.notice-box, .language-tip { margin-top: 1.5rem; padding: 1.1rem 1.25rem; border-left: 5px solid var(--red); background: var(--red-soft); }
.story-ending { display: grid; gap: 0.2rem; margin-top: 1.5rem; padding: 1.4rem; background: var(--blue); color: var(--white); text-align: center; }
.story-ending span { color: #cacaef; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.story-ending strong { font-family: var(--heading); font-size: 1.6rem; }
.story-ending small { font-style: italic; }

.vocab-layout, .grammar-columns, .homework-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.vocab-group, .grammar-card, .exercise-card, .homework-step, .reflection-box { padding: clamp(1.2rem, 3vw, 2rem); background: var(--white); border: 1px solid var(--line); }
.vocab-group h3 { padding-bottom: 0.8rem; border-bottom: 3px solid var(--blue); font-size: 1.5rem; }
.vocab-list { margin: 0; }
.vocab-list div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.vocab-list dt { color: var(--blue); font-weight: 800; }
.vocab-list dd { margin: 0; color: var(--muted); font-style: italic; }
.useful-phrases { margin-top: 1.5rem; padding: clamp(1.2rem, 3vw, 2rem); background: var(--blue); color: var(--white); }
.useful-phrases h3 { color: var(--white); }
.phrase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.phrase-grid p { margin: 0; padding: 0.8rem; background: rgba(255, 255, 255, 0.1); }
.phrase-grid strong, .phrase-grid span { display: block; }
.phrase-grid span { color: #d5d5f5; font-size: 0.88rem; font-style: italic; }

.grammar-card { border-top: 8px solid var(--blue); }
.grammar-card.uncountable { border-top-color: var(--red); }
.grammar-card h3 { margin-bottom: 0.15rem; font-size: 2rem; }
.example-pair { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; padding: 0.7rem; background: var(--cream); font-weight: 700; }
.question-pattern { margin: 1rem 0 0; padding: 0.7rem; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.grammar-table-wrap { margin-top: 1.5rem; overflow-x: auto; background: var(--white); border: 1px solid var(--line); }
.grammar-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.grammar-table th, .grammar-table td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grammar-table th { background: var(--blue); color: var(--white); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.language-tip strong { color: var(--red-dark); }
.language-tip p { margin: 0.4rem 0 0; }

#practice-form { display: grid; gap: 1.5rem; }
.exercise-card { border-top: 5px solid var(--blue); }
.exercise-heading { display: flex; gap: 1rem; margin-bottom: 1.4rem; }
.exercise-heading > span { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; background: var(--red); color: var(--white); border-radius: 50%; font-family: var(--heading); font-size: 1.3rem; font-weight: 800; }
.exercise-heading h3 { margin-bottom: 0.15rem; font-size: 1.5rem; }
.exercise-heading p { margin-bottom: 0; color: var(--muted); }
.question-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.question-grid label, .sentence-questions label { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem; background: var(--cream); color: var(--blue); font-weight: 700; }
select { min-height: 40px; margin-left: auto; padding: 0.35rem 0.55rem; border: 1px solid #aaa8b6; border-radius: var(--radius-sm); background: var(--white); color: var(--ink); }
select.is-correct, fieldset.is-correct { border-color: var(--success); background: var(--success-soft); }
select.is-incorrect, fieldset.is-incorrect { border-color: var(--red); background: var(--red-soft); }
.sentence-questions { display: grid; gap: 0.6rem; }
.multiple-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.multiple-choice fieldset { display: grid; gap: 0.45rem; margin: 0; padding: 1rem; border: 1px solid var(--line); }
.multiple-choice legend { padding: 0 0.25rem; color: var(--blue); font-weight: 800; }
.multiple-choice label { display: flex; gap: 0.5rem; align-items: center; }
.exercise-footer, .practice-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }
.feedback { margin: 0; font-weight: 800; }
.feedback.success { color: var(--success); }
.feedback.needs-work { color: var(--red-dark); }
.practice-summary { padding: 1.2rem; background: var(--blue); color: var(--white); }
.practice-summary div { display: flex; flex-direction: column; }
#score-value { font-family: var(--heading); font-size: 2rem; font-weight: 800; }

.mission-card { display: grid; grid-template-columns: 170px 1fr; align-items: stretch; background: var(--blue); color: var(--white); }
.mission-number { display: grid; place-content: center; padding: 1.5rem; background: var(--red); font-family: var(--heading); font-size: 2.4rem; font-weight: 800; text-align: center; }
.mission-number span { display: block; font-family: var(--body); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.mission-copy { padding: clamp(1.5rem, 4vw, 2.5rem); }
.mission-copy h3 { color: var(--white); font-size: 2rem; }
.mission-copy .translation { color: #d9d9f4; }
.homework-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
.homework-step > span { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 1rem; background: var(--blue-soft); color: var(--blue); border-radius: 50%; font-family: var(--heading); font-weight: 800; }
.speaking-frame { margin-top: 1.5rem; padding: 1.5rem; border: 2px solid var(--blue); background: var(--white); }
.speaking-frame blockquote { margin: 0; color: var(--blue); font-family: var(--heading); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.8; }
.reflection-box { margin-top: 1.5rem; }
.reflection-box label strong, .reflection-box label span { display: block; }
.reflection-box label span { color: var(--muted); font-size: 0.9rem; font-style: italic; }
.reflection-box textarea { width: 100%; margin-top: 0.8rem; padding: 0.8rem; resize: vertical; border: 1px solid #aaa8b6; border-radius: var(--radius-sm); }
.save-note { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.78rem; }
.completion-banner { margin-top: 1.5rem; padding: clamp(2rem, 5vw, 4rem); background: var(--cream); border-top: 8px solid var(--red); text-align: center; }
.completion-banner .translation { max-width: 700px; margin-inline: auto; }

.lesson-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 92px; padding: 0.8rem clamp(1rem, 4vw, 3.5rem); background: var(--white); border-top: 1px solid var(--line); }
.lesson-footer > p { margin: 0; text-align: center; }
.lesson-footer > p span, .lesson-footer > p small, .page-button small, .page-button strong { display: block; }
.lesson-footer > p span { color: var(--blue); font-weight: 800; }
.lesson-footer > p small, .page-button small { color: var(--muted); }
.page-button { display: flex; align-items: center; gap: 0.7rem; justify-self: start; padding: 0.6rem; border: 0; background: transparent; color: var(--blue); text-align: left; }
.page-button.next { justify-self: end; text-align: right; }
.page-button:disabled { opacity: 0.35; cursor: not-allowed; }
.audio-status { position: fixed; z-index: 50; right: 1rem; bottom: 1rem; max-width: 300px; padding: 0.7rem 1rem; transform: translateY(140%); background: var(--ink); color: var(--white); border-radius: var(--radius-sm); font-size: 0.82rem; transition: transform 180ms ease; }
.audio-status.is-visible { transform: translateY(0); }

.library-book-cover {
  width: min(390px, 100%);
  margin: 0 auto;
}

.book-cover-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--blue);
  border: 1px solid rgba(0, 0, 70, 0.18);
  box-shadow: -14px 16px 0 var(--blue-dark), 0 28px 54px rgba(0, 0, 70, 0.24);
}

.book-cover-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 12px solid rgba(255, 255, 255, 0.86);
  pointer-events: none;
}

.book-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-overlay {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 1;
  padding: 1.25rem;
  background: rgba(0, 0, 145, 0.94);
  color: var(--white);
  border-top: 6px solid var(--red);
}

.book-cover-overlay span,
.book-cover-overlay strong,
.book-cover-overlay em,
.book-cover-overlay small {
  display: block;
}

.book-cover-overlay span,
.book-cover-overlay small {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-cover-overlay strong {
  margin: 0.35rem 0 0.1rem;
  font-family: var(--heading);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1;
}

.book-cover-overlay em {
  margin-bottom: 0.7rem;
  color: #e7e7ff;
  font-family: var(--heading);
}

.library-book-cover figcaption {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.notice-box p {
  margin: 0.4rem 0 0;
}

.notice-box .notice-fr {
  padding-top: 0.4rem;
  border-top: 1px solid rgba(225, 0, 15, 0.16);
}

.video-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  overflow: hidden;
  background: var(--blue);
  border: 12px solid var(--white);
  box-shadow: var(--shadow);
}

.video-stage video {
  width: 100%;
  max-height: 70vh;
  background: #000;
}

.video-empty {
  max-width: 620px;
  padding: 3rem 2rem;
  color: var(--white);
  text-align: center;
}

.video-empty h3 {
  margin: 1rem 0 0.7rem;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.video-empty .translation {
  color: #d9d9f4;
}

.video-play-symbol {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  padding-left: 5px;
  background: var(--red);
  border: 6px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  font-size: 2rem;
}

.teacher-note {
  margin-top: 1.5rem;
  padding: 1.3rem 1.5rem;
  background: var(--cream);
  border-left: 6px solid var(--blue);
}

.teacher-note p {
  margin: 0.4rem 0 0;
}

.vocab-list dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.vocab-audio {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
}

.vocab-audio .audio-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.recording-studio {
  margin-top: 1.5rem;
  padding: clamp(1.3rem, 4vw, 2.2rem);
  background: var(--white);
  border: 2px solid var(--blue);
  border-top: 8px solid var(--red);
}

.recorder-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
}

.recorder-heading h3 {
  margin-bottom: 0.45rem;
  font-size: 2rem;
}

.recording-time {
  min-width: 112px;
  padding: 0.7rem 1rem;
  background: var(--blue);
  color: var(--white);
  font-family: var(--heading);
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.recorder-status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  background: var(--cream);
  color: var(--blue);
  font-weight: 700;
}

.recording-indicator {
  width: 12px;
  height: 12px;
  background: #9a9a9a;
  border-radius: 50%;
}

.recording-indicator.is-recording {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(225, 0, 15, 0.12);
  animation: recording-pulse 1.2s ease-in-out infinite;
}

.recorder-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.record-control {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--blue);
  font-weight: 800;
}

.record-control.start {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.record-control.subtle {
  border-color: var(--line);
  color: var(--muted);
}

.record-control:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

#homework-playback {
  width: 100%;
  margin-top: 1rem;
}

.recorder-privacy {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes recording-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@media (max-width: 820px) {
  .cover-grid, .vocab-layout, .grammar-columns { grid-template-columns: 1fr; }
  .cover-grid { min-height: 0; }
  .list-illustration { width: min(420px, 100%); margin: 0 auto; }
  .learning-strip, .homework-grid { grid-template-columns: 1fr; }
  .learning-strip > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .question-grid, .multiple-choice, .phrase-grid { grid-template-columns: 1fr; }
  .scene-heading { align-items: flex-start; flex-direction: column; }
  .scene-setting { text-align: left; }
  .book-cover-frame { box-shadow: -9px 11px 0 var(--blue-dark), 0 20px 38px rgba(0, 0, 70, 0.2); }
}

@media (max-width: 620px) {
  .site-header { align-items: flex-start; }
  .book-chip { display: none; }
  .brand-lockup small { font-size: 0.72rem; }
  .lesson-page { width: min(100% - 1.2rem, 1160px); }
  .cover-copy h1 { font-size: clamp(3rem, 16vw, 4.6rem); }
  .objective-list { grid-template-columns: 1fr; }
  .character-card { grid-template-columns: 1fr; }
  .portrait { width: 72px; height: 72px; font-size: 2.2rem; }
  .dialogue-line { grid-template-columns: 40px minmax(0, 1fr); }
  .audio-button { grid-column: 2; justify-self: start; }
  .mission-card { grid-template-columns: 1fr; }
  .mission-number { display: block; text-align: left; }
  .mission-number span { display: inline; margin-left: 0.4rem; }
  .recorder-heading { grid-template-columns: 1fr; }
  .recording-time { justify-self: start; }
  .record-control { flex: 1 1 145px; }
  .exercise-footer, .practice-summary { align-items: stretch; flex-direction: column; }
  .lesson-footer { grid-template-columns: 1fr 1fr; }
  .lesson-footer > p { display: none; }
}

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

@media print {
  .site-header, .lesson-nav, .lesson-footer, .audio-button, .cover-actions, .exercise-footer, .practice-summary, .recorder-controls { display: none !important; }
  .lesson-page, .lesson-page[hidden] { display: block !important; width: 100%; min-height: 0; padding: 1rem 0; break-after: page; }
  body { background: var(--white); color: #000; }
  .dialogue-line, .character-card, .exercise-card { box-shadow: none; break-inside: avoid; }
}
