:root {
  --ink: #17212b;
  --muted: #657383;
  --line: #d9e0e7;
  --soft: #f5f7fa;
  --panel: #ffffff;
  --accent: #1976a3;
  --accent-strong: #115b7d;
  --warm: #e9a23b;
  --green: #3f8f6b;
  --shadow: 0 18px 45px rgba(21, 37, 54, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #edf2f6;
  font-family: Arial, Helvetica, sans-serif;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  overflow: visible;
}

.nav-button,
.icon-button,
.day-button,
.module-tab,
.secondary-button,
.primary-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 40px;
  padding: 0 13px;
}

.nav-button {
  white-space: nowrap;
}

.nav-button-printable {
  border-color: var(--warm);
  background: #fff8ee;
  color: #7a4c06;
  font-weight: 800;
}

.nav-button-complete-printable {
  border-color: #2d8f67;
  background: #effaf4;
  color: #146143;
  font-weight: 800;
}

.nav-button.is-active,
.day-button.is-active,
.module-tab.is-active {
  border-color: var(--accent);
  background: #e8f5fb;
  color: var(--accent-strong);
  font-weight: 700;
}

.day-button.is-disabled {
  cursor: default;
  opacity: 0.62;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-weight: 800;
}

.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 0;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  padding: 20px;
  border-right: 1px solid var(--line);
  background: #f9fbfd;
}

.sidebar-block {
  margin-bottom: 22px;
}

.sidebar label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}

.day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.day-button {
  padding: 0 8px;
  display: grid;
  place-items: center;
}

.day-button small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.sidebar-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note span {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}

.sidebar-print-button {
  width: 100%;
  margin-top: 12px;
}

.content-stage {
  padding: 28px;
  overflow: auto;
}

.sidebar-collapsed .workspace {
  grid-template-columns: 1fr;
}

.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar-collapsed .content-stage {
  padding: 22px;
}

.page-header,
.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.page-header h1,
.hero-panel h1 {
  margin: 4px 0 10px;
  font-size: 34px;
  line-height: 1.12;
}

.page-header p,
.hero-panel p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.page-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.secondary-button {
  background: white;
  font-weight: 700;
}

a.primary-button,
a.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.complete-printable-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #bde8cf;
  border-radius: 8px;
  background: #f3fbf6;
  color: #24523c;
}

.complete-printable-toolbar strong {
  white-space: nowrap;
  font-size: 18px;
}

.complete-printable-toolbar span {
  color: var(--muted);
}

.hero-panel,
.classroom-panel,
.info-card,
.tips-panel,
.print-surface,
.schema-panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 32px;
  min-height: 260px;
  align-items: center;
}

.hero-quickstart {
  width: 260px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-left: 4px solid var(--warm);
  background: #fff8ee;
}

.hero-quickstart span {
  color: var(--muted);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 26px 0 14px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
}

.level-grid,
.architecture-grid,
.teacher-grid,
.homework-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.level-card {
  min-height: 138px;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
}

.level-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px #b9ddec;
}

.level-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf2f6;
  font-weight: 800;
}

.level-card strong {
  font-size: 20px;
}

.level-card small {
  color: var(--muted);
}

.info-card {
  padding: 18px;
  box-shadow: none;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 10px;
}

.info-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.roadmap-section {
  margin-top: 26px;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.roadmap-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 20px;
  box-shadow: var(--shadow);
}

.roadmap-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.roadmap-card p {
  color: var(--muted);
  line-height: 1.55;
}

.roadmap-card dl {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.roadmap-card dt {
  font-weight: 800;
  color: var(--accent-strong);
}

.roadmap-card dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.principle-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.principle-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.lesson-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

.module-rail {
  display: grid;
  gap: 8px;
  align-content: start;
}

.module-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-start;
  text-align: left;
  min-height: 46px;
}

.module-tab span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2f6;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-collapsed .lesson-layout {
  grid-template-columns: 1fr;
}

.sidebar-collapsed .module-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.sidebar-collapsed .module-tab {
  min-width: 150px;
  justify-content: center;
  min-height: 42px;
}

.classroom-panel {
  min-height: 620px;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

.module-title h2 {
  margin: 6px 0 0;
  font-size: 38px;
}

.teaching-canvas {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
  gap: 18px;
  min-height: 380px;
}

.presentation-canvas {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(420px, 1fr) auto;
  gap: 16px;
}

.presentation-visual {
  min-height: 420px;
  display: grid;
}

.presentation-canvas .lesson-image-stack,
.presentation-canvas .official-sequence,
.presentation-canvas .reading-workshop {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.presentation-canvas .lesson-image,
.presentation-canvas .official-step,
.presentation-canvas .reading-stage {
  box-shadow: none;
}

.presentation-canvas .lesson-image img,
.presentation-canvas .official-step img {
  max-height: min(62vh, 720px);
}

.presentation-canvas .reading-workshop .official-step img {
  max-height: min(60vh, 700px);
}

.presentation-prompt {
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.presentation-prompt p {
  font-size: 22px;
}

.sidebar-collapsed .teaching-canvas {
  grid-template-columns: minmax(440px, 1.35fr) minmax(320px, 0.8fr);
}

.sidebar-collapsed .presentation-canvas {
  grid-template-columns: 1fr;
}

.lesson-image-stack {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.official-sequence {
  display: grid;
  gap: 14px;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.official-step {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.official-step-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.official-step-header span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.official-step-header strong,
.official-step-header small {
  display: block;
}

.official-step-header small {
  margin-top: 2px;
  color: var(--muted);
}

.official-step img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: #f8fafb;
}

.official-script-step img {
  width: auto;
  max-width: 100%;
  max-height: min(44vh, 460px);
  margin: 0 auto;
}

.full-image-link {
  width: fit-content;
  margin-top: 10px;
  text-decoration: none;
}

.official-step figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.reading-workshop {
  display: grid;
  gap: 14px;
  max-height: 690px;
  overflow: auto;
  padding-right: 4px;
}

.reading-workshop .official-sequence {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.reading-workshop .official-step img {
  max-height: 520px;
}

.reading-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.reading-stage-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.reading-stage-header > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.reading-stage-header strong,
.reading-stage-header small {
  display: block;
}

.reading-stage-header strong {
  font-size: 19px;
}

.reading-stage-header small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}

.reading-vocab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reading-vocab-card {
  min-height: 136px;
  border: 1px solid #d6e3e9;
  border-radius: 8px;
  background: #fafdff;
  padding: 8px;
  text-align: center;
}

.reading-vocab-card img {
  width: 100%;
  height: 78px;
  object-fit: contain;
  display: block;
  margin-bottom: 6px;
  border-radius: 6px;
  background: #fff;
}

.reading-vocab-card strong,
.reading-vocab-card small {
  display: block;
}

.reading-vocab-card strong {
  color: var(--ink);
  font-size: 15px;
}

.reading-vocab-card small {
  color: var(--muted);
  margin-top: 2px;
}

.reading-word-card {
  min-height: 78px;
  display: grid;
  place-items: center;
}

.reading-word-card strong {
  font-size: 18px;
}

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

.strategy-grid div {
  background: #f7fafc;
  border: 1px solid #d9e4ea;
  border-radius: 8px;
  padding: 12px;
}

.strategy-grid h4 {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 16px;
}

.strategy-grid ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.strategy-grid li {
  line-height: 1.35;
}

.reading-reinforcement-stage .matching-activity {
  margin-top: 12px;
}

.definition-matching-activity {
  margin-top: 12px;
  border: 1px solid #d7e4ea;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.vocabulary-reinforcement {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #cfe3d3;
  border-radius: 10px;
  background: #fbfffb;
}

.vocabulary-reinforcement .mixed-question-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.vocabulary-reinforcement .activity-question-card p {
  margin: 8px 0;
  line-height: 1.45;
}

.picture-spotting-activity {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #cfe3d3;
  border-radius: 10px;
  background: #fbfffb;
}

.picture-spotting-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.picture-spotting-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.picture-spotting-grid img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.picture-spotting-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.definition-match-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
}

.definition-match-grid h4 {
  color: var(--accent-strong);
  font-size: 16px;
  margin: 8px 0;
}

.definition-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  padding: 8px 10px;
  text-align: left;
}

.definition-card strong,
.definition-card span {
  display: block;
}

.definition-card span {
  margin-top: 6px;
  color: var(--muted);
}

.visual-placeholder,
.lesson-image {
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px dashed #b8c7d5;
  background: linear-gradient(135deg, #f7fbfd, #f4f7f1);
  color: var(--accent-strong);
  font-size: 46px;
  font-weight: 800;
  text-align: center;
  padding: 18px;
}

.lesson-image {
  margin: 0;
  border-style: solid;
  background: #f9fbfd;
  overflow: hidden;
}

.lesson-image img {
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: contain;
  display: block;
}

.lesson-image figcaption,
.paper-source-image figcaption {
  width: 100%;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.student-prompt {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
  background: #f7faf5;
  border: 1px solid #d8e7d9;
}

.student-prompt h3,
.student-prompt p {
  margin: 0;
}

.student-prompt p {
  font-size: 26px;
  line-height: 1.35;
}

.speaking-workshop-panel .student-prompt p {
  font-size: 22px;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.word-card {
  min-height: 62px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
  padding: 10px;
}

.word-card strong,
.word-card small {
  display: block;
}

.word-card strong {
  font-size: 15px;
}

.word-card small {
  color: var(--muted);
  margin-top: 4px;
}

.dual-vocabulary-block {
  display: grid;
  gap: 14px;
}

.dual-vocabulary-block section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.dual-vocabulary-block h4 {
  color: var(--accent-strong);
  font-size: 17px;
  margin-bottom: 8px;
}

.listening-picture-preview {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.listening-picture-preview h4 {
  color: var(--accent-strong);
  font-size: 18px;
}

.picture-word-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.picture-word-card {
  min-height: 142px;
  border: 1px solid #d6e3e9;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  text-align: center;
}

.picture-word-card img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  display: block;
  margin-bottom: 6px;
  border-radius: 6px;
  background: #f8fafb;
}

.picture-word-card strong,
.picture-word-card small {
  display: block;
}

.picture-word-card strong {
  color: var(--ink);
  font-size: 15px;
}

.picture-word-card small {
  color: var(--muted);
  margin-top: 2px;
}

.rule-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: #fff8ee;
  border: 1px solid #efd3a6;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  font-weight: 700;
}

.activity-set {
  display: grid;
  gap: 12px;
}

.spiral-activity-card {
  border: 1px solid #d7e4ea;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.spiral-activity-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.spiral-activity-head > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.spiral-activity-head strong,
.spiral-activity-head small {
  display: block;
}

.spiral-activity-head strong {
  color: var(--accent-strong);
  font-size: 17px;
}

.spiral-activity-head small {
  color: var(--muted);
  margin-top: 2px;
}

.spiral-activity-card p {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.reading-integration-card {
  padding: 16px;
  background: #ffffff;
}

.reading-integration-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.reading-passage-box,
.reading-question-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 14px;
}

.reading-passage-box {
  background: #fffdf8;
  border-color: #ecd7af;
}

.reading-passage-box h4,
.reading-question-box h4 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--ink);
}

.reading-passage-box p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
}

.answer-chip {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid #efd3a6;
  border-radius: 8px;
  background: #fff8ee;
  color: #7a4e00;
  font-weight: 800;
}

.answer-toggle {
  margin-top: 8px;
}

.answer-toggle summary,
.answer-overlay-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  cursor: pointer;
  border: 1px solid #efd3a6;
  border-radius: 8px;
  background: #fff8ee;
  color: #7a4e00;
  font-weight: 900;
  padding: 6px 10px;
}

.exam-answer-page {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #efd3a6;
  border-radius: 10px;
  background: #fffaf1;
}

.exam-answer-page small {
  color: var(--muted);
  font-weight: 700;
}

.answer-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.56);
}

.answer-overlay-panel {
  width: min(1120px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid #efd3a6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.answer-overlay-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #efd3a6;
  background: #fff8ee;
}

.answer-overlay-header h2 {
  margin: 2px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
  color: var(--ink);
}

.answer-overlay-close {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #d19b3f;
  border-radius: 8px;
  background: #8a5700;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.answer-overlay-content {
  padding: 18px 20px 22px;
}

.answer-overlay-content .answer-chip {
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.35;
}

.inline-answer-reveal {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 8px;
}

.inline-answer-content {
  width: 100%;
  padding: 16px;
  border: 2px solid #f0d4a5;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 0 8px 22px rgba(122, 78, 0, 0.08);
}

.inline-answer-reveal.is-open .answer-overlay-button {
  background: #8a5700;
  color: #fff;
  border-color: #8a5700;
}

.inline-answer-sheet {
  display: grid;
  gap: 14px;
}

.inline-answer-sheet h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
}

.inline-answer-list {
  display: grid;
  gap: 12px;
}

.inline-answer-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #f0d4a5;
  border-radius: 8px;
  background: #fffaf2;
}

.inline-answer-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #8a5700;
  color: white;
  font-weight: 900;
}

.inline-answer-row p {
  margin: 0;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.45;
}

.inline-answer-fill {
  display: inline-flex;
  align-items: center;
  min-width: 110px;
  min-height: 38px;
  margin: 0 4px;
  padding: 3px 12px;
  border-bottom: 4px solid #d0871e;
  background: #fff0d8;
  color: #7a4e00;
  font-weight: 900;
}

.inline-answer-arrow {
  color: var(--muted);
  font-weight: 800;
}

.answer-overlay-content .exam-answer-meta,
.answer-overlay-content .exam-answer-images,
.answer-overlay-content .exam-answer-key-list {
  padding-left: 0;
  padding-right: 0;
}

.exam-answer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

.exam-answer-images {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.exam-answer-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 16px 14px 10px;
  padding: 10px 12px;
  border: 1px solid #d7e3ec;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--muted);
  font-size: 14px;
}

.exam-answer-source-strip strong {
  color: var(--ink);
}

.exam-answer-image {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.exam-answer-image img {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: contain;
}

.exam-answer-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.exam-answer-key-list {
  display: grid;
  gap: 14px;
  padding: 0;
}

.exam-answer-key-list article {
  border: 2px solid #f0d4a5;
  border-radius: 8px;
  background: #fff5e6;
  padding: 16px;
}

.exam-answer-key-list p {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 900;
  line-height: 1.45;
}

.exam-answer-key-list small {
  color: var(--muted);
}

.student-answer-line {
  display: none;
}

.activity-question-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.activity-question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.activity-question-card strong,
.activity-question-card span {
  display: block;
}

.activity-question-card span {
  color: var(--muted);
  margin-top: 6px;
}

.mini-conversation {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #d9e8ef;
  border-radius: var(--radius);
  background: #f7fbfd;
}

.mini-conversation-line {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
}

.mini-conversation-line strong {
  color: var(--primary);
}

.mini-conversation-line span {
  color: var(--ink);
  line-height: 1.45;
}

.audio-stack {
  display: grid;
  gap: 10px;
}

.audio-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.audio-stack .audio-pending {
  padding: 12px;
  border: 1px solid #f4c95d;
  border-radius: 8px;
  background: #fff8df;
  color: #5f4300;
}

.audio-stack .audio-pending small {
  color: #7a5a00;
  font-weight: 600;
}

.audio-stack audio {
  width: 100%;
}

.speaking-workshop-panel {
  gap: 16px;
}

.speaking-two-col {
  display: grid;
  grid-template-columns: minmax(520px, 1.45fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.speaking-official-page,
.speaking-flashcard {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.speaking-official-page img,
.speaking-flashcard img {
  width: auto;
  max-width: 100%;
  max-height: min(60vh, 620px);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  background: #f8fafb;
}

.speaking-official-page figcaption,
.speaking-flashcard figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.speaking-card-grid,
.speaking-object-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.speaking-object-card {
  border: 1px solid #d4e1ea;
  border-radius: 8px;
  background: white;
  padding: 8px;
  display: grid;
  gap: 7px;
  justify-items: center;
  cursor: grab;
  min-height: 126px;
}

.speaking-object-card:active {
  cursor: grabbing;
}

.speaking-object-card.is-selected {
  outline: 3px solid var(--accent);
}

.speaking-object-card img {
  width: 100%;
  height: 86px;
  object-fit: contain;
}

.speaking-object-card strong {
  font-size: 13px;
}

.preposition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preposition-chip {
  min-height: 48px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  color: var(--ink);
}

.teacher-note-inline {
  border: 1px solid #d8e7d9;
  border-radius: 8px;
  background: #f7faf5;
  padding: 14px;
}

.teacher-note-inline p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.speaking-workshop-stage {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.speaking-scene-drop {
  position: relative;
  border: 2px solid #d4e1ea;
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.speaking-scene-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.placed-speaking-card {
  position: absolute;
  width: 92px;
  height: 92px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: white;
  padding: 4px;
  box-shadow: var(--shadow);
}

.speaking-target-hint {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border: 2px dashed rgba(18, 107, 138, 0.55);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.speaking-question-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.speaking-question-panel h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.speaking-question-panel p {
  margin: 0;
  color: var(--muted);
}

.speaking-feedback {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid #efd3a6;
  background: #fff8ee;
  padding: 12px;
  font-weight: 800;
}

.speaking-section-note {
  margin: 0 0 14px;
  color: var(--muted);
}

.speaking-flashcard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: 650px;
  overflow: auto;
  padding-right: 4px;
}

.matching-activity {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  background: #f7faf5;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-header strong,
.activity-header span {
  display: block;
}

.activity-header span {
  color: var(--muted);
  margin-top: 3px;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
}

.matching-message {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.matching-message.is-correct {
  border-color: #9bcbb5;
  background: #eaf7f0;
  color: #236a4b;
}

.matching-board {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.matching-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.matching-column h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.match-word,
.match-picture {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.match-word {
  min-height: 54px;
  padding: 8px 10px;
  text-align: left;
}

.match-word span,
.match-word small {
  display: block;
}

.match-word span {
  font-weight: 800;
}

.match-word small {
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

.match-word.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px #b9ddec;
}

.match-picture {
  min-height: 86px;
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  text-align: left;
}

.match-picture img {
  width: 98px;
  height: 70px;
  object-fit: contain;
  border-radius: 6px;
  background: #f9fbfd;
}

.vocab-picture-card {
  width: 98px;
  min-height: 70px;
  border-radius: 8px;
  border: 1px solid #b7d7ec;
  background: linear-gradient(180deg, #fafdff 0%, #eaf6ff 100%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px;
  text-align: center;
}

.vocab-picture-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #d9eef9;
  color: var(--accent);
  font-weight: 900;
  font-size: 17px;
  line-height: 1;
}

.vocab-picture-card strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
}

.vocab-picture-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.match-picture span {
  color: var(--muted);
  font-weight: 800;
}

.match-word.is-complete,
.match-picture.is-complete {
  border-color: #9bcbb5;
  background: #eef8f3;
}

.match-word:disabled,
.match-picture:disabled {
  cursor: default;
  opacity: 1;
}

.lesson-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-dots {
  display: flex;
  gap: 7px;
}

.progress-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c7d1dc;
}

.progress-dots i.is-active {
  background: var(--accent);
}

.teacher-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-block h2 {
  font-size: 20px;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.clean-list li + li {
  margin-top: 7px;
}

.source-line {
  margin-top: 10px !important;
  font-size: 13px;
  color: var(--accent-strong) !important;
}

.answer-panel {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.answer-panel h2 {
  margin: 0 0 12px;
}

.answer-panel article {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.answer-panel article:first-of-type {
  border-top: 0;
}

.answer-panel p {
  margin: 8px 0;
  color: var(--muted);
}

.answer-panel small {
  color: var(--accent-strong);
}

.tips-panel {
  display: none;
  margin-top: 16px;
  padding: 20px;
}

.tips-panel.is-open {
  display: block;
}

.tips-panel h2 {
  margin: 0 0 8px;
}

.tips-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.print-surface {
  padding: 26px;
}

.worksheet-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.worksheet-title h2,
.worksheet-title p {
  margin: 0;
}

.worksheet-preview {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #f9fbfd;
  border: 1px solid var(--line);
}

.grammar-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.grammar-example-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.grammar-example-card img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

.grammar-example-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.worksheet-preview h3 {
  margin: 0 0 8px;
}

.worksheet-preview p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.exercise-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.exercise-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.exercise-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2f6;
  font-weight: 800;
}

.exercise-row small,
.exercise-row em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.homework-sheet {
  box-shadow: none;
}

.homework-item {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.homework-item p {
  color: var(--muted);
  line-height: 1.55;
}

.filter-bar {
  display: grid;
  grid-template-columns: 190px 190px minmax(220px, 1fr) 110px;
  gap: 10px;
  margin-bottom: 16px;
}

.schema-panel {
  padding: 18px;
  box-shadow: none;
  margin-bottom: 16px;
}

.schema-panel h2 {
  margin: 0 0 14px;
}

.field-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f9fbfd;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.resource-library-panel {
  margin-bottom: 22px;
}

.resource-library-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.resource-library-head h2 {
  margin-bottom: 6px;
}

.resource-library-head p {
  color: var(--muted);
  margin: 0;
}

.resource-library-stats {
  min-width: 190px;
  border: 1px solid #b9d9ca;
  border-radius: 8px;
  padding: 14px;
  background: #f4fbf7;
  text-align: right;
}

.resource-library-stats strong {
  display: block;
  font-size: 30px;
  color: #0f6b4b;
}

.resource-library-stats span {
  color: var(--muted);
  font-size: 13px;
}

.resource-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.resource-path-grid p {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  margin: 0;
}

.resource-path-grid strong,
.resource-path-grid code,
.resource-path-grid span {
  display: block;
}

.resource-path-grid strong {
  margin-bottom: 8px;
  color: var(--ink);
}

.resource-path-grid code,
.resource-card code {
  white-space: normal;
  word-break: break-word;
  color: #526173;
  font-size: 12px;
}

.resource-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.resource-card h3 {
  margin-bottom: 6px;
}

.resource-card p {
  color: var(--muted);
  margin: 0;
}

.resource-card dl {
  display: flex;
  gap: 10px;
  margin: 0;
}

.resource-card dl div {
  flex: 1;
  border-radius: 8px;
  padding: 10px;
  background: #f3f6f8;
}

.resource-card dt {
  color: var(--muted);
  font-size: 12px;
}

.resource-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.resource-type-table {
  margin-bottom: 18px;
}

.table-wrap {
  overflow: auto;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

td small {
  color: var(--muted);
}

th {
  background: #f3f6f8;
  font-size: 13px;
}

.printable-book {
  display: grid;
  gap: 18px;
  width: min(100%, 210mm);
  max-width: 210mm;
  margin: 0 auto;
  font-size: 16px;
}

.printable-cover,
.printable-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 24px;
  box-shadow: var(--shadow);
}

.printable-cover {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 12px;
  border-left: 6px solid var(--accent);
}

.printable-cover h2 {
  margin: 0;
  font-size: 36px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.printable-cover p,
.printable-section p {
  line-height: 1.55;
}

.printable-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.printable-section h3 {
  margin: 18px 0 10px;
  font-size: 17px;
}

.printable-source {
  color: var(--accent-strong);
  font-size: 13px;
  margin-top: -4px;
}

.printable-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.printable-word-bank span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f9fbfd;
  font-weight: 700;
}

.printable-book .answer-toggle,
.printable-book .answer-chip,
.printable-book .answer-overlay-button,
.printable-book .answer-overlay-backdrop {
  display: none !important;
}

.paper-match-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.printable-vocabulary-practice,
.printable-picture-spotting {
  margin-top: 8mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.printable-vocabulary-practice p,
.printable-picture-spotting p {
  line-height: 1.55;
}

.printable-picture-spotting .paper-source-image img {
  max-height: 180mm;
}

.paper-picture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.paper-source-stack {
  display: grid;
  gap: 12px;
}

.official-paper-step .official-step-header {
  margin-bottom: 8px;
}

.paper-picture-grid figure,
.paper-source-image {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.paper-picture-grid img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  display: block;
}

.image-placeholder {
  width: 100%;
  min-height: 130px;
  border: 1px dashed #9aa7b1;
  border-radius: 8px;
  background: #f8fafb;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.image-placeholder small {
  font-size: 12px;
  text-transform: uppercase;
}

.image-placeholder strong {
  color: var(--ink);
  font-size: 18px;
}

.paper-picture-grid figcaption {
  min-height: 34px;
  margin-top: 8px;
  color: var(--muted);
}

.paper-source-image img {
  width: 100%;
  max-height: 760px;
  object-fit: contain;
  display: block;
}

.official-print-page {
  min-height: 270mm;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.official-print-page img {
  flex: 1;
  min-height: 0;
  max-height: 244mm;
  object-fit: contain;
}

.qeh-activity-page {
  min-height: 180mm;
}

.printable-answer-lines {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.printable-answer-lines p {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: end;
}

.printable-answer-lines span,
.printable-writing-space span {
  display: block;
  min-height: 26px;
  border-bottom: 1px solid #7d8994;
}

.printable-writing-space {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.printable-writing-space strong {
  display: block;
  font-size: 16px;
}

.complete-edition {
  margin-top: 36px;
}

.complete-day {
  break-before: page;
}

.mock-printable .printable-section {
  break-inside: auto;
}

.ket-printable,
.pet-printable {
  font-size: 16px;
}

.ket-printable .qeh-worksheet-page,
.pet-printable .qeh-worksheet-page {
  min-height: auto;
}

.ket-printable .spiral-activity-card,
.pet-printable .spiral-activity-card,
.ket-printable .activity-question-card,
.pet-printable .activity-question-card {
  break-inside: avoid;
}

.ket-printable .official-print-page,
.pet-printable .official-print-page {
  min-height: auto;
}

.ket-printable .official-print-page img,
.pet-printable .official-print-page img {
  width: 100%;
  max-height: none;
}

.locked-milestone-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 820px;
  padding: 28px;
}

.locked-milestone-card h2 {
  font-size: 30px;
  margin-bottom: 10px;
}

.locked-milestone-card p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.pattern-box {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--accent-strong);
  font-size: 24px;
  font-weight: 800;
}

.paper-rule {
  box-shadow: none;
  margin: 10px 0;
}

.paper-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.copy-practice-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.copy-practice-list.compact {
  gap: 8px;
}

.copy-practice-row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) repeat(3, minmax(110px, 1fr));
  gap: 12px;
  align-items: end;
}

.copy-practice-list.compact .copy-practice-row {
  grid-template-columns: minmax(130px, 180px) repeat(2, minmax(130px, 1fr));
}

.copy-practice-row strong {
  font-size: 15px;
}

.copy-practice-row span {
  min-height: 28px;
  border-bottom: 1px solid #9aa7b1;
}

.student-line {
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fbfd;
}

.review-grid p {
  margin: 6px 0 0;
  color: var(--muted);
}

.homework-line {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.homework-line:first-of-type {
  border-top: 0;
}

.homework-line p {
  margin: 6px 0 0;
  color: var(--muted);
}

.source-map table {
  font-size: 13px;
}

.projector-mode .topbar,
.projector-mode .sidebar {
  display: none;
}

.projector-mode .workspace {
  display: block;
}

.projector-mode .content-stage {
  padding: 18px;
}

.focus-mode .workspace {
  grid-template-columns: 1fr;
}

.focus-mode .sidebar {
  display: none;
}

.focus-mode .content-stage {
  padding: 18px;
}

.focus-mode .page-header {
  margin-bottom: 12px;
}

.focus-mode .page-header p {
  display: none;
}

.focus-mode .classroom-panel {
  min-height: calc(100vh - 150px);
}

.focus-mode .lesson-layout {
  grid-template-columns: 190px minmax(0, 1fr);
}

.focus-mode.sidebar-collapsed .lesson-layout {
  grid-template-columns: 1fr;
}

.focus-mode.sidebar-collapsed .module-rail {
  display: flex;
  overflow-x: auto;
  padding-bottom: 6px;
}

.focus-mode .teaching-canvas {
  grid-template-columns: 1fr;
}

.focus-mode.sidebar-collapsed .teaching-canvas {
  grid-template-columns: 1fr;
}

.focus-mode .presentation-canvas {
  grid-template-rows: minmax(520px, 1fr) auto;
}

.focus-mode .presentation-visual {
  min-height: 520px;
}

.focus-mode .lesson-image-stack,
.focus-mode .official-sequence,
.focus-mode .reading-workshop {
  max-height: none;
  overflow: visible;
}

.focus-mode .lesson-image img,
.focus-mode .official-step img {
  max-height: min(70vh, 820px);
}

.focus-mode .presentation-prompt {
  padding: 16px 20px;
}

.focus-mode .presentation-prompt p {
  font-size: 24px;
}

@media (max-width: 980px) {
  .topbar {
    height: auto;
    padding: 12px;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .day-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .page-header,
  .hero-panel,
  .section-heading,
  .worksheet-title {
    display: grid;
  }

  .hero-quickstart {
    width: auto;
  }

  .level-grid,
  .architecture-grid,
  .teacher-grid,
  .homework-grid,
  .roadmap-grid,
  .lesson-layout,
  .teaching-canvas,
  .filter-bar,
  .paper-match-grid,
  .paper-two-col,
  .copy-practice-row,
  .copy-practice-list.compact .copy-practice-row {
    grid-template-columns: 1fr;
  }

  .module-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .module-tab {
    min-width: 170px;
  }

  .word-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matching-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .content-stage {
    padding: 16px;
  }

  .page-header h1,
  .hero-panel h1 {
    font-size: 28px;
  }

  .module-title h2,
  .visual-placeholder {
    font-size: 32px;
  }

  .student-prompt p {
    font-size: 21px;
  }

  .word-grid {
    grid-template-columns: 1fr;
  }

  .match-picture {
    grid-template-columns: 82px 1fr;
  }

  .match-picture img {
    width: 82px;
  }

  .day-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exercise-row {
    grid-template-columns: 36px 1fr;
  }

  .exercise-row em {
    grid-column: 2;
  }

  .paper-picture-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }
}

/* Reading Booster */
.reading-booster-panel .module-title {
  margin-bottom: 18px;
}

.booster-two-col,
.booster-task-grid,
.booster-vocab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.booster-illustration,
.booster-story-card,
.booster-cloze-card,
.booster-instructions,
.booster-question-list,
.vocab-definition-card {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
}

.booster-illustration {
  padding: 14px;
  margin: 0;
}

.booster-illustration img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
}

.booster-illustration.compact img {
  max-height: 360px;
}

.booster-illustration figcaption {
  margin-top: 10px;
  color: #64748b;
  font-weight: 700;
}

.vocabulary-box-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vocab-definition-card {
  padding: 14px;
}

.vocab-definition-card strong {
  display: block;
  color: #0f5f7f;
  font-size: 1.05rem;
}

.vocab-definition-card small {
  display: block;
  color: #64748b;
  margin: 4px 0;
  font-weight: 700;
}

.vocab-definition-card p {
  margin: 0;
  color: #1f2937;
}

.booster-story-card,
.booster-cloze-card,
.booster-question-list,
.booster-instructions {
  padding: 20px;
}

.booster-story-card h3,
.booster-cloze-card h3,
.booster-question-list h3 {
  margin-top: 0;
}

.booster-story-card p,
.booster-cloze-card p {
  line-height: 1.72;
  font-size: 1.05rem;
}

.word-choice-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.word-choice-box span {
  padding: 8px 12px;
  border: 1px solid #cfe0ec;
  border-radius: 8px;
  background: #f8fbfd;
  font-weight: 800;
}

.printable-vocab-definitions {
  columns: 2;
  column-gap: 24px;
}

.printable-vocab-definitions p {
  break-inside: avoid;
  margin: 0 0 10px;
}

@media (max-width: 900px) {
  .booster-two-col,
  .booster-task-grid,
  .booster-vocab-layout {
    grid-template-columns: 1fr;
  }

  .vocabulary-box-grid {
    grid-template-columns: 1fr;
  }
}

@page {
  size: A4;
  margin: 10mm;
}

@page {
  size: A4 portrait;
  margin: 10mm;
}

@media print {
  html,
  body {
    background: white;
    width: 210mm;
    min-height: 297mm;
  }

  .topbar,
  .sidebar,
  .page-actions,
  .filter-bar,
  .complete-printable-toolbar,
  .module-rail,
  .lesson-controls {
    display: none !important;
  }

  .workspace {
    display: block;
  }

  .content-stage {
    padding: 0;
    overflow: visible;
  }

  .page-header,
  .print-surface,
  .printable-cover,
  .printable-section,
  .classroom-panel,
  .info-card,
  .tips-panel,
  .schema-panel,
  .table-wrap {
    box-shadow: none;
  }

  .page-header {
    margin-bottom: 14px;
  }

  .print-surface,
  .printable-section,
  .info-card,
  .teacher-grid,
  .tips-panel {
    break-inside: avoid;
  }

  .printable-book {
    max-width: none;
    width: 190mm;
    gap: 0;
    font-size: 13pt;
    line-height: 1.5;
  }

  .printable-cover,
  .printable-section {
    box-shadow: none;
    border-radius: 0;
    padding: 8mm 0;
    border-left: 0;
    border-right: 0;
  }

  .printable-cover {
    min-height: 260mm;
  }

  .printable-cover h2 {
    font-size: 30pt;
  }

  .printable-section h2 {
    font-size: 20pt;
  }

  .printable-section h3 {
    font-size: 15pt;
  }

  .printable-source {
    font-size: 9.5pt;
  }

  .qeh-activity-page {
    min-height: auto;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .ket-printable .printable-section,
  .pet-printable .printable-section {
    padding: 9mm 0;
  }

  .ket-printable .qeh-activity-page,
  .ket-printable .qeh-worksheet-page,
  .pet-printable .qeh-activity-page,
  .pet-printable .qeh-worksheet-page {
    page-break-inside: auto;
    break-inside: auto;
  }

  .ket-printable .qeh-worksheet-page,
  .pet-printable .qeh-worksheet-page {
    page-break-before: always;
    break-before: page;
  }

  .ket-printable .spiral-activity-card,
  .pet-printable .spiral-activity-card,
  .ket-printable .activity-question-card,
  .pet-printable .activity-question-card,
  .ket-printable .rule-box,
  .pet-printable .rule-box,
  .ket-printable .printable-word-bank,
  .pet-printable .printable-word-bank {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .ket-printable .activity-set,
  .pet-printable .activity-set {
    display: block;
  }

  .ket-printable .spiral-activity-card,
  .pet-printable .spiral-activity-card {
    margin-bottom: 6mm;
    padding: 5mm;
  }

  .paper-source-image img {
    max-height: none;
    width: 100%;
  }

  .official-print-page {
    min-height: 277mm;
    page-break-before: always;
    page-break-inside: avoid;
    break-before: page;
    break-inside: avoid;
    border: 0;
    padding: 0;
    margin: 0;
  }

  .official-print-page .official-step-header {
    min-height: 14mm;
    margin-bottom: 3mm;
  }

  .official-print-page img {
    max-height: 252mm;
    width: 100%;
    object-fit: contain;
  }

  .ket-printable .official-print-page,
  .pet-printable .official-print-page {
    min-height: 277mm;
    display: block;
  }

  .ket-printable .official-print-page img,
  .pet-printable .official-print-page img {
    width: 100%;
    max-height: 246mm;
    object-fit: contain;
  }

  .ket-printable .official-print-page figcaption,
  .pet-printable .official-print-page figcaption {
    font-size: 9.5pt;
    margin-top: 2mm;
  }

  .ket-printable .printable-answer-lines span,
  .ket-printable .printable-writing-space span,
  .pet-printable .printable-answer-lines span,
  .pet-printable .printable-writing-space span {
    min-height: 10mm;
  }

  .ket-printable .student-answer-line,
  .pet-printable .student-answer-line {
    min-height: 10mm;
    margin-top: 4mm;
  }

  .official-print-page figcaption {
    font-size: 9pt;
    margin-top: 2mm;
  }

  .printable-answer-lines span,
  .printable-writing-space span {
    min-height: 9mm;
  }

  .printable-writing-space {
    gap: 4mm;
    margin-top: 7mm;
  }

  .complete-edition {
    margin-top: 0;
  }

  .complete-day {
    page-break-before: always;
  }

  .mock-printable .printable-section,
  .complete-edition .printable-section {
    page-break-inside: auto;
  }

  .mock-printable .paper-source-image,
  .complete-edition .paper-source-image {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 6mm;
  }

  .mock-printable .paper-source-image img,
  .complete-edition .paper-source-image img {
    max-height: 252mm;
  }

  .mock-printable .official-paper-step,
  .complete-edition .official-paper-step {
    page-break-before: always;
    break-before: page;
  }

  .answer-toggle,
  .answer-chip,
  .answer-overlay-button,
  .answer-overlay-backdrop,
  .exam-answer-page {
    display: none !important;
  }

  .student-answer-line {
    display: block;
    margin-top: 10px;
    min-height: 34px;
    border-bottom: 1px solid #6b7a88;
    color: #111827;
    font-weight: 700;
  }
}
