:root {
  --brand-red: #B8433C;
  --brand-red-dark: #963630;
  --ink: #183B5B;
  --muted: #65717b;
  --line: #d8dde1;
  --page: #F5F1EB;
  --panel: #ffffff;
  --soft: #eeeeee;
  --shadow: 0 20px 55px rgba(37, 55, 70, 0.12);
  --serif: "Plus Jakarta Sans", sans-serif;
  --sans: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 324px minmax(0, 1fr);
  min-height: 100vh;
}

.standalone-activity .app-shell {
  display: block;
}

.standalone-activity .sidebar,
.standalone-activity .topbar,
.standalone-activity .lesson-hero,
.standalone-activity .resource-heading {
  display: none;
}

.standalone-activity .main-panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 54px);
}

.standalone-activity .resource-section {
  box-shadow: none;
  padding: 0;
}

.standalone-activity .resource-card.vocab-card,
.standalone-activity .resource-card.game-card,
.standalone-activity .resource-card.personalities-card,
.standalone-activity .resource-card.classroom-card,
.standalone-activity .resource-card.reading-demo-card,
.standalone-activity .resource-card.listening-demo-card,
.standalone-activity .resource-card.oral-production-card,
.standalone-activity .resource-card.written-production-card,
.standalone-activity .resource-card.useful-links-card {
  grid-column: 1 / -1;
}

.sidebar {
  background: #f7f7f7;
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-block {
  display: block;
  padding: 0 10px 24px;
  border-bottom: 1px dashed #aeb6bd;
}

.brand-name,
.brand-city {
  margin: 0;
  font-family: var(--serif);
}

.brand-name {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.05;
}

.brand-city {
  color: var(--brand-red);
  font-size: 18px;
  font-style: italic;
  margin-top: 4px;
}

.course-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
  padding: 14px 16px;
  background: var(--brand-red);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.course-label span {
  font-size: 13px;
}

.course-label strong {
  font-size: 15px;
}

.unit-nav {
  display: grid;
  gap: 8px;
}

.unit-group {
  border: 1px solid var(--line);
  background: var(--panel);
}

.unit-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 14px 15px;
  text-align: left;
  text-transform: uppercase;
}

.unit-button strong {
  font-size: 14px;
}

.unit-button span {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.unit-group.is-open .unit-button,
.unit-button:hover {
  color: var(--brand-red);
}

.lesson-list {
  display: none;
  padding: 0 10px 10px;
}

.unit-group.is-open .lesson-list {
  display: grid;
  gap: 6px;
}

.lesson-button {
  width: 100%;
  border: 1px solid transparent;
  background: #f7f7f7;
  color: var(--ink);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
}

.lesson-button:hover,
.lesson-button.is-active {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
}

.main-panel {
  min-width: 0;
  padding: 30px clamp(18px, 4vw, 54px) 48px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px dotted #c6ccd1;
  padding-bottom: 24px;
}

.eyebrow,
.section-kicker {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
}

h1 {
  color: var(--brand-red);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  text-transform: uppercase;
}

h2 {
  color: var(--ink);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
}

h3 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
}

.status-pill {
  flex: 0 0 auto;
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 700;
  padding: 16px 22px;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.lesson-hero {
  margin: 34px 0 24px;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line);
}

.lesson-note {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin: 20px 0 0;
}

.resource-section {
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 38px);
}

.resource-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.lesson-path {
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  padding: 10px 12px;
  white-space: nowrap;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.resource-card {
  min-height: 138px;
  border: 1px solid var(--line);
  background: #fbfbfb;
  padding: 0;
}

.resource-card.is-selected {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(184, 67, 60, 0.1);
}

.category-button {
  display: block;
  width: 100%;
  min-height: 138px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 18px;
  text-align: left;
}

.category-button:hover,
.category-button:focus-visible {
  background: #ffffff;
  outline: 2px solid rgba(184, 67, 60, 0.22);
  outline-offset: -2px;
}

.resource-card.vocab-card {
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card.vocab-card:has(.vocab-resource) {
  grid-column: 1 / -1;
}

.resource-card.game-card {
  background: #ffffff;
  padding: 18px;
}

.resource-card.game-card:has(.drag-game) {
  grid-column: 1 / -1;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card.personalities-card {
  grid-column: 1 / -1;
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card.classroom-card {
  grid-column: 1 / -1;
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card.reading-demo-card {
  grid-column: 1 / -1;
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card.listening-demo-card {
  grid-column: 1 / -1;
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card.oral-production-card,
.resource-card.written-production-card,
.resource-card.useful-links-card {
  grid-column: 1 / -1;
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
}

.resource-card header {
  display: flex;
  align-items: start;
  gap: 12px;
}

.resource-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 700;
}

.activity-brand {
  display: grid;
  flex: 0 0 112px;
  gap: 2px;
  width: 112px;
  font-family: var(--serif);
  line-height: 1.05;
}

.activity-brand strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}

.activity-brand span {
  color: var(--brand-red);
  font-size: 14px;
  font-style: italic;
}

.resource-card h4 {
  font-size: 17px;
  line-height: 1.25;
  margin: 0;
}

.resource-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 12px 0 0;
}

.empty-state {
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
  text-transform: uppercase;
}

.open-resource-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  margin-top: 18px;
  min-height: 42px;
  padding: 10px 14px;
  text-transform: uppercase;
}

.link-resource-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0;
  font-weight: 700;
  gap: 0;
  margin-left: 8px;
  margin-top: 18px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  text-transform: uppercase;
  width: 42px;
}

.link-resource-button::before {
  content: "⧉";
  font-size: 20px;
  line-height: 1;
}

.link-resource-button.is-copied {
  border-color: #2f7d57;
  color: #2f7d57;
}

.link-resource-button.is-copied::before {
  content: "✓";
}

.inline-link-button {
  align-self: start;
  flex: 0 0 auto;
  margin-left: auto;
  margin-top: 0;
}

.category-detail {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: clamp(18px, 3vw, 28px);
}

.category-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-detail h4 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

.activity-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.activity-tile {
  border: 1px solid var(--line);
  background: #fbfbfb;
  cursor: pointer;
  padding: 18px;
}

.activity-tile:hover,
.activity-tile:focus-visible {
  border-color: var(--brand-red);
  background: #ffffff;
  outline: 0;
}

.activity-tile h5 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  margin: 0;
}

.activity-tile p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 10px 0 16px;
}

.activity-tile span {
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.category-empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 15px;
  padding: 18px;
}

.activity-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.activity-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 55, 70, 0.52);
}

.activity-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-dialog {
  width: min(820px, 100%);
}

.activity-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.activity-modal-close:hover,
.activity-modal-close:focus-visible {
  border-color: var(--brand-red);
  color: var(--brand-red);
  outline: 0;
}

.modal-resource-card {
  border: 0;
  box-shadow: none;
}

.activity-dialog .modal-resource-card > header {
  padding-right: 56px;
}

.modal-category-detail {
  border: 0;
  padding: clamp(22px, 4vw, 34px);
}

.open-resource-button:hover,
.open-resource-button:focus-visible,
.link-resource-button:hover,
.link-resource-button:focus-visible {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
  color: #ffffff;
  outline: 0;
}

.vocab-resource {
  display: grid;
  gap: 30px;
  margin-top: 26px;
}

.vocab-table-block h5 {
  border-left: 5px solid var(--brand-red);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 14px;
  padding-left: 12px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.vocab-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}

.vocab-table th,
.vocab-table td {
  border: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: middle;
}

.vocab-table thead th {
  background: var(--brand-red);
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.vocab-table tbody th {
  width: 22%;
  background: #f5f5f5;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
}

.compact-table tbody th {
  width: 18%;
}

.phrase-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.audio-expression {
  display: inline-grid;
  max-width: 250px;
}

td > .audio-expression {
  max-width: 100%;
}

.audio-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d1d7dc;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.25;
  padding: 7px 10px;
  text-align: left;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.audio-chip:hover,
.audio-chip:focus-visible,
.audio-chip.is-speaking {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  outline: 0;
}

.audio-chip.is-unavailable {
  border-color: var(--brand-red-dark);
  color: var(--brand-red-dark);
}

.drag-game {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.expression-bank {
  border: 1px solid var(--line);
  background: #f7f7f7;
  padding: 18px;
}

.expression-bank h5,
.scene-copy h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 12px;
}

.draggable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drag-chip {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: grab;
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 11px;
}

.drag-chip:hover,
.drag-chip:focus-visible,
.drag-chip.is-selected {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  outline: 0;
}

.drag-chip.is-used,
.drag-chip:disabled {
  border-color: #cfd6dc;
  background: #eef1f3;
  color: #87919a;
  cursor: default;
  opacity: 0.72;
}

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

.scene-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: copy;
  min-height: 100%;
  padding: 16px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.scene-photo,
.scene-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background: #f7f7f7;
  object-fit: cover;
}

.scene-card.is-hovered {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(184, 67, 60, 0.12);
}

.scene-card.is-correct {
  border-color: #2f7d57;
  box-shadow: 0 0 0 4px rgba(47, 125, 87, 0.13);
}

.scene-card.is-wrong {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(184, 67, 60, 0.18);
  transform: translateY(-2px);
}

.image-answer {
  position: absolute;
  right: 26px;
  bottom: 26px;
  left: 26px;
  display: flex;
  justify-content: center;
  min-height: 42px;
  pointer-events: none;
}

.scene-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.drop-zone {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 96px;
  border: 2px dashed #c4ccd3;
  background: #fbfbfb;
  padding: 12px;
}

.drop-zone.is-hovered {
  border-color: var(--brand-red);
  background: #fff5f7;
}

.drop-zone.is-correct {
  border-color: #7cae91;
  background: #f3faf6;
}

.drop-zone.is-wrong {
  border-color: var(--brand-red);
  background: #fff1f3;
}

.drop-placeholder {
  align-self: center;
  border: 1px dashed rgba(255, 255, 255, 0.92);
  background: rgba(37, 55, 70, 0.72);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 10px;
}

.placed-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(37, 55, 70, 0.2);
  font-size: 14px;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 11px;
}

.placed-chip[data-result="correct"] {
  border-color: #2f7d57;
  background: #edf8f2;
  color: #225f42;
}

.placed-chip[data-result="incorrect"] {
  border-color: var(--brand-red);
  background: #fff1f3;
  color: var(--brand-red-dark);
}

.personalities-resource {
  margin-top: 26px;
}

.personality-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.personality-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.personality-card:hover,
.personality-card:focus-visible {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(184, 67, 60, 0.1);
  outline: 0;
}

.personality-photo-wrap,
.personality-modal-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f7f7f7;
}

.personality-photo-wrap {
  aspect-ratio: 4 / 5;
}

.personality-photo-wrap::before,
.personality-modal-photo::before {
  content: attr(data-initials);
  color: var(--brand-red);
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
}

.personality-photo-wrap img,
.personality-modal-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personality-photo-wrap img.is-hidden,
.personality-modal-photo img.is-hidden {
  display: none;
}

.personality-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.personality-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(37, 55, 70, 0.48);
  padding: clamp(18px, 4vw, 42px);
}

.personality-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  width: min(940px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.personality-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.personality-close:hover,
.personality-close:focus-visible {
  border-color: var(--brand-red);
  color: var(--brand-red);
  outline: 0;
}

.personality-modal-photo {
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 760px;
}

.personality-modal-content {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 42px) clamp(54px, 5vw, 64px) clamp(24px, 4vw, 42px) clamp(24px, 4vw, 42px);
}

.personality-modal-content h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 0.95;
  margin: 0;
  overflow-wrap: anywhere;
}

.audio-hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.personality-speech {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfbfb;
  color: var(--ink);
  cursor: pointer;
  font-size: 19px;
  line-height: 1.45;
  padding: 18px;
  text-align: left;
  overflow-wrap: anywhere;
}

.personality-speech:hover,
.personality-speech:focus-visible,
.personality-speech.is-speaking {
  border-color: var(--brand-red);
  background: #fff7f8;
  outline: 0;
}

.personality-speech span {
  display: block;
  padding: 2px 0;
}

.personality-speech span.is-current {
  background: #ffe4e9;
  color: var(--brand-red-dark);
  font-weight: 700;
}

.personality-audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.personality-audio-controls button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 12px;
}

.personality-audio-controls button:hover,
.personality-audio-controls button:focus-visible {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  outline: 0;
}

.classroom-game {
  display: grid;
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  margin-top: 26px;
}

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

.classroom-image-card {
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: grab;
  padding: 8px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.classroom-image-card:hover,
.classroom-image-card:focus-visible,
.classroom-image-card.is-selected {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(184, 67, 60, 0.1);
  outline: 0;
}

.classroom-image-card.is-selected {
  transform: translateY(-2px);
}

.classroom-image-card.is-used {
  cursor: default;
  opacity: 0.36;
}

.classroom-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.classroom-phrases {
  display: grid;
  gap: 12px;
}

.classroom-drop {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 98px;
  border: 2px dashed #c4ccd3;
  background: #fbfbfb;
  cursor: pointer;
  padding: 12px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.classroom-drop:hover,
.classroom-drop:focus-visible,
.classroom-drop.is-hovered {
  border-color: var(--brand-red);
  background: #fff7f8;
  outline: 0;
}

.classroom-drop.is-correct {
  border-style: solid;
  border-color: #2f7d57;
  background: #f3faf6;
}

.classroom-drop.is-wrong {
  border-color: var(--brand-red);
  background: #fff1f3;
  transform: translateX(3px);
}

.classroom-answer {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.classroom-answer img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.classroom-placeholder {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.classroom-drop p {
  color: var(--ink);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.headphone-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #2f7d57;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 19px;
}

.headphone-button:hover,
.headphone-button:focus-visible {
  background: #2f7d57;
  color: #ffffff;
  outline: 0;
}

.classroom-feedback {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.classroom-drop.is-correct .classroom-feedback {
  color: #225f42;
}

.classroom-drop.is-wrong .classroom-feedback {
  color: var(--brand-red-dark);
}

.classroom-success {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #2f7d57;
  background: #edf8f2;
  color: #225f42;
  font-size: 18px;
  font-weight: 700;
  padding: 16px;
}

.classroom-success button {
  border: 1px solid #2f7d57;
  background: #ffffff;
  color: #225f42;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 12px;
}

.classroom-success button:hover,
.classroom-success button:focus-visible {
  background: #2f7d57;
  color: #ffffff;
  outline: 0;
}

.reading-demo {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.listening-demo {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.reading-text {
  border-left: 5px solid var(--brand-red);
  background: #fbfbfb;
  padding: 18px 20px;
}

.reading-text h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 10px;
}

.reading-text p:last-child {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

.listening-video-placeholder {
  border-left: 5px solid var(--brand-red);
  background: #fbfbfb;
  padding: 20px;
}

.listening-video-placeholder h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 10px;
}

.listening-video-placeholder p:last-child {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.listening-video-shell {
  aspect-ratio: 16 / 9;
  background: #111820;
  overflow: hidden;
}

.listening-video-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fbfbfb;
  color: var(--muted);
  font-size: 14px;
  padding: 12px 14px;
}

.video-fallback a {
  border: 1px solid var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.video-fallback a:hover,
.video-fallback a:focus-visible {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
  outline: 0;
}

.useful-links-resource {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.useful-link-group {
  border: 1px solid var(--line);
  background: #ffffff;
}

.useful-link-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 28px;
  align-items: center;
  gap: 18px;
  background: #fff4f6;
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  transition: background 160ms ease, color 160ms ease;
}

.useful-link-group summary::-webkit-details-marker {
  display: none;
}

.useful-link-group summary::after {
  content: "+";
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.useful-link-group[open] summary::after {
  content: "−";
}

.useful-link-group summary:hover,
.useful-link-group summary:focus-visible {
  background: #ffe9ed;
  color: var(--brand-red-dark);
  outline: 0;
}

.useful-link-group summary span {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.1;
}

.useful-link-group summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.useful-link-list {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fafafa;
  padding: 14px;
}

.useful-link-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-red);
  background: #ffffff;
  color: var(--ink);
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

@media (max-width: 560px) {
  .useful-link-group summary {
    grid-template-columns: minmax(0, 1fr) auto 28px;
    gap: 10px;
    padding: 16px;
  }

  .useful-link-group summary span {
    font-size: 23px;
  }
}

.useful-link-card:hover,
.useful-link-card:focus-visible {
  border-color: var(--brand-red);
  box-shadow: var(--shadow);
  outline: 0;
  transform: translateY(-1px);
}

.useful-link-card span {
  color: var(--brand-red-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.useful-link-card strong {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  line-height: 1.12;
}

.useful-link-card small {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.production-activity {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.production-prompt {
  border-left: 5px solid var(--brand-red);
  background: #fbfbfb;
  padding: 18px 20px;
}

.production-prompt h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 10px;
}

.production-prompt p:last-of-type {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 14px;
}

.model-box {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  padding: 14px;
}

.recorder-panel,
.writing-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: clamp(18px, 3vw, 26px);
}

.recording-status {
  color: var(--ink);
  font-weight: 700;
  margin: 0;
}

.production-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.production-actions button,
.download-link {
  border: 1px solid var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.production-actions button:hover,
.production-actions button:focus-visible,
.download-link:hover,
.download-link:focus-visible {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
  outline: 0;
}

.production-actions button:disabled {
  border-color: var(--line);
  background: #eeeeee;
  color: #8b949b;
  cursor: not-allowed;
}

.production-actions .secondary-wizard-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.recorder-actions {
  align-items: center;
  gap: 18px;
}

.production-actions .recorder-icon-button {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-red);
  color: #ffffff;
  padding: 0;
  position: relative;
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.production-actions .recorder-icon-button:hover,
.production-actions .recorder-icon-button:focus-visible {
  background: var(--brand-red-dark);
  outline: 3px solid rgba(184, 67, 60, 0.18);
  transform: translateY(-1px);
}

.production-actions .recorder-icon-button:disabled {
  background: #eeeeee;
  color: #a7b0b7;
  cursor: not-allowed;
  opacity: 0.75;
}

.recorder-icon-button.is-record span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: currentColor;
}

.recorder-icon-button.is-stop span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: currentColor;
}

.recording-output {
  display: grid;
  gap: 12px;
}

.recording-output audio {
  width: 100%;
}

.writing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: start;
}

.writing-panel textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  padding: 14px;
}

.writing-panel textarea:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(184, 67, 60, 0.1);
  outline: 0;
}

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

.accent-toolbar button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.accent-toolbar button:hover,
.accent-toolbar button:focus-visible {
  border-color: var(--brand-red);
  color: var(--brand-red-dark);
  outline: 0;
}

.wizard-panel {
  border: 1px solid var(--line);
  background: #ffffff;
}

.wizard-progress {
  border-bottom: 1px solid var(--line);
  background: #f7f7f7;
  padding: 16px 18px;
}

.wizard-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 10px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #e3e7ea;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--brand-red);
  transition: width 180ms ease;
}

.wizard-question {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.question-type {
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.wizard-question h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
}

.reading-options {
  display: grid;
  gap: 10px;
}

.reading-option,
.reading-short-answer,
.reading-match select,
.listening-select-list select {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.reading-option {
  cursor: pointer;
  text-align: left;
}

.reading-option:hover,
.reading-option:focus-visible,
.reading-option.is-selected,
.reading-short-answer:focus,
.reading-match select:focus,
.listening-select-list select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(184, 67, 60, 0.1);
  outline: 0;
}

.reading-option.is-selected {
  background: #fff5f7;
  font-weight: 700;
}

.reading-match {
  display: grid;
  gap: 12px;
}

.reading-match label {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.reading-match span {
  font-weight: 700;
}

.listening-select-list {
  display: grid;
  gap: 12px;
}

.listening-select-list label {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.listening-select-list span {
  color: var(--ink);
  font-weight: 700;
}

.listening-audio-button {
  justify-self: start;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 14px;
  text-transform: uppercase;
}

.listening-audio-button:hover,
.listening-audio-button:focus-visible {
  border-color: var(--brand-red);
  color: var(--brand-red-dark);
  outline: 0;
}

.reading-feedback {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  padding: 14px;
}

.reading-feedback.is-correct {
  border-color: #2f7d57;
  background: #edf8f2;
  color: #225f42;
}

.reading-feedback.is-hint {
  border-color: #d7b45a;
  background: #fff8e4;
  color: #60480f;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.wizard-actions button,
.reading-result button {
  border: 1px solid var(--brand-red);
  background: var(--brand-red);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 14px;
  text-transform: uppercase;
}

.wizard-actions button:hover,
.wizard-actions button:focus-visible,
.reading-result button:hover,
.reading-result button:focus-visible {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
  outline: 0;
}

.wizard-actions .secondary-wizard-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.wizard-actions .secondary-wizard-button:hover,
.wizard-actions .secondary-wizard-button:focus-visible {
  border-color: var(--ink);
  background: #f7f7f7;
  color: var(--ink);
}

.reading-result {
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fbfbfb;
  padding: clamp(24px, 4vw, 44px);
  text-align: center;
}

.result-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  background: #2f7d57;
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  margin: 0;
}

.reading-result h5 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  margin: 0;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    position: relative;
    height: auto;
    max-height: 70vh;
  }

  .sidebar.is-visible {
    display: block;
  }

  .main-panel {
    padding-top: 20px;
  }

  .topbar {
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .topbar-title {
    grid-column: 1 / -1;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .status-pill {
    justify-self: end;
    font-size: 13px;
    grid-column: 3;
    padding: 12px 14px;
  }

  .lesson-hero,
  .resource-heading {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .lesson-path {
    white-space: normal;
  }

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

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

  .personality-dialog {
    grid-template-columns: 1fr;
  }

  .personality-modal-photo {
    width: 100%;
    min-height: 320px;
    max-height: 420px;
  }

  .personality-modal-content {
    padding: 24px;
  }

  .classroom-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .classroom-game {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .main-panel {
    padding-inline: 16px;
  }

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

  .topbar-title {
    grid-column: 1 / -1;
  }

  .status-pill {
    grid-column: 1 / -1;
    justify-self: start;
    width: fit-content;
  }

  .eyebrow,
  .section-kicker {
    font-size: 14px;
  }

  .lesson-hero {
    margin-top: 24px;
    padding-bottom: 28px;
  }

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

  .image-answer {
    right: 22px;
    bottom: 22px;
    left: 22px;
  }

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

  .personality-card {
    padding: 10px;
  }

  .personality-speech {
    font-size: 17px;
  }

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

  .classroom-drop {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .headphone-button {
    grid-column: 2;
    justify-self: start;
  }

  .classroom-feedback {
    grid-column: 1 / -1;
  }

  .reading-match label,
  .listening-select-list label {
    grid-template-columns: 1fr;
  }

  .writing-row {
    grid-template-columns: 1fr;
  }

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

  .wizard-actions {
    justify-content: stretch;
  }

  .wizard-actions button,
  .reading-result button {
    width: 100%;
  }
}

/* Francolatino visual identity */
.brand-block img{width:100%;height:auto}.back-home{display:block;margin-top:12px;color:var(--ink);font-size:14px;text-decoration:none;font-weight:600}
.sidebar{background:#fff;border-right:1px solid var(--line)}
h1,h2,h3,.category-detail h4{font-weight:700;line-height:1.2;text-transform:none}h1{font-size:clamp(26px,3.5vw,42px);color:var(--ink)}h2{font-size:clamp(32px,5vw,56px)}h3{font-size:clamp(24px,3vw,32px)}
.eyebrow,.section-kicker{font-family:var(--sans);font-size:13px;font-weight:700;letter-spacing:.08em;color:var(--brand-red)}
.course-label,.status-pill,.resource-icon{background:#183B5B;border-radius:14px}
.unit-group,.lesson-button,.resource-section,.resource-card,.category-detail,.activity-tile,.open-resource-button,.link-resource-button,.menu-toggle{border-radius:16px}
.lesson-button{background:#F5F1EB}.resource-card,.activity-tile{background:#F7F8FA}
.resource-section{box-shadow:0 14px 36px rgba(24,35,46,.08)}.lesson-hero{padding:30px;background:#fff;border:1px solid var(--line);border-radius:24px}
.activity-brand{display:flex;align-items:center;flex-basis:150px;width:150px}.activity-brand img{width:150px;height:auto}
button:focus-visible,a:focus-visible{outline:3px solid #5D7C5B;outline-offset:3px}
@media(max-width:560px){.lesson-hero{padding:22px}.activity-brand{flex-basis:110px;width:110px}.activity-brand img{width:110px}}
.brand-block img{max-width:260px;max-height:105px;object-fit:contain}.brand-block{padding-bottom:14px}.sidebar{padding:20px}@media(max-width:900px){.sidebar{max-height:60vh}.brand-block img{max-height:80px}}
