:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f7f5f1;
  --ink: #222;
  --muted: #555;
  --faint: #666;
  --line: #ddd;
  --card: #fff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

img {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px;
}

a {
  color: inherit;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.card-error {
  border: 1px solid #c9a0a0;
}

.id {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}

.term {
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  margin: 12px 0 4px;
  line-height: 1.15;
}

.translation {
  font-size: 1.2rem;
  color: var(--muted);
}

.phonetic {
  margin: 16px 0;
}

.example {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.example p {
  margin: 8px 0 0;
}

.back-links {
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--muted);
}

button {
  font: inherit;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #bbb;
  background: #fff;
  min-height: 44px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status,
.status-error {
  margin: 0;
}

.status-error {
  color: #8b2e2e;
}

/* Home */
.site-header {
  margin-bottom: 36px;
}

.brand {
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.home-nav {
  display: grid;
  gap: 12px;
}

.nav-link {
  display: block;
  background: var(--card);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  min-height: 56px;
}

.nav-link:hover,
.nav-link:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}

.home-body .home-main {
  max-width: 430px;
  padding: 0;
}

.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding:
    max(28px, env(safe-area-inset-top, 0px))
    22px
    calc(18px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  animation: lesson-enter 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 50% 18%, rgba(255, 249, 240, 0.95) 0%, transparent 58%),
    radial-gradient(70% 50% at 80% 90%, rgba(31, 77, 58, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, #f3ebe0 0%, #efeae2 42%, #e4ddd1 100%);
  pointer-events: none;
}

.home-hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 12% 8% auto;
  height: 42%;
  border-radius: 40% 60% 55% 45%;
  background:
    linear-gradient(145deg, rgba(255, 252, 247, 0.55), rgba(215, 204, 186, 0.28));
  filter: blur(2px);
  opacity: 0.9;
  animation: home-glow 7s ease-in-out infinite alternate;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 0 12px;
}

.home-brand {
  margin: 0 0 18px;
  line-height: 1.05;
  animation: home-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-brand-stickara {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: clamp(3rem, 14vw, 4.1rem);
  letter-spacing: -0.035em;
  color: var(--lesson-ink);
}

.home-brand-rest {
  display: block;
  margin-top: 0.18em;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--lesson-muted);
}

.home-line {
  margin: 0 0 28px;
  max-width: 16em;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--lesson-muted);
  animation: home-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}

.home-cta {
  width: 100%;
  max-width: 280px;
  animation: home-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) 140ms both;
}

.home-cta-primary {
  text-decoration: none;
}

.home-scroll-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lesson-faint);
  font-weight: 600;
  animation: nudge-fade 1.4s ease 0.7s both;
}

.home-explore {
  padding: 28px 18px 48px;
  border-top: 1px solid var(--lesson-line);
  background: rgba(255, 252, 247, 0.45);
}

.home-explore .room-eyebrow {
  text-align: center;
  margin-bottom: 14px;
}

.home-explore-list {
  display: grid;
  gap: 12px;
}

#home-room-list {
  display: grid;
  gap: 12px;
}

.home-explore-card {
  animation: lesson-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-explore-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.home-explore-icon {
  font-size: 1.45rem;
  line-height: 1;
  margin-top: 2px;
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes home-glow {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(8px) scale(1.03);
  }
}

/* Section pages */
.page-header {
  margin-bottom: 24px;
}

.brand-small {
  margin: 0 0 12px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.brand-small a {
  text-decoration: none;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
}

.lede {
  margin: 0;
  color: var(--muted);
}

.object-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.object-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(26, 26, 24, 0.06);
}

.object-list a:hover,
.object-list a:focus-visible {
  outline: none;
  border-color: rgba(31, 77, 58, 0.28);
}

.room-main {
  padding-bottom: 48px;
}

.room-hero {
  padding: 18px 18px 8px;
  text-align: center;
}

.room-hero-kitchen {
  position: relative;
  margin: 14px 18px 0;
  min-height: 280px;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  text-align: left;
  color: #fffcf7;
  box-shadow: 0 18px 38px rgba(40, 29, 18, 0.2);
  isolation: isolate;
  animation: lesson-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.room-hero-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(23, 20, 15, 0.1) 0%, rgba(23, 20, 15, 0.78) 100%),
    url("../images/home-kitchen.jpg") center / cover no-repeat,
    var(--lesson-photo-fall);
  transform: scale(1.02);
}

.room-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  padding: 28px 22px 24px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.room-hero-kitchen .room-eyebrow,
.room-hero-kitchen .room-title,
.room-hero-kitchen .room-lede {
  color: inherit;
}

.room-hero-kitchen .room-eyebrow {
  margin-bottom: 6px;
  opacity: 0.86;
}

.room-hero-kitchen .room-title {
  font-size: clamp(2.6rem, 11vw, 3.45rem);
  line-height: 1;
}

.room-hero-kitchen .room-lede {
  max-width: 19rem;
  font-weight: 500;
  opacity: 0.94;
}

.room-packs {
  padding-top: 26px;
}

.room-packs-heading {
  padding: 0 18px 2px;
}

.room-packs-heading .room-eyebrow {
  margin-bottom: 4px;
}

.room-packs-heading h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--lesson-ink);
}

.room-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lesson-faint);
  font-weight: 600;
}

.room-title {
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  font-size: clamp(2rem, 8vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--lesson-ink);
}

.room-lede,
.room-copy {
  margin: 0;
  color: var(--lesson-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.room-copy {
  margin-top: 10px;
}

.pack-list {
  display: grid;
  gap: 12px;
  padding: 12px 18px 0;
}

.pack-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(26, 26, 24, 0.06);
  box-shadow: 0 10px 28px rgba(26, 26, 24, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.pack-card:hover,
.pack-card:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(26, 26, 24, 0.08);
}

.pack-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pack-card-icon {
  font-size: 1.45rem;
  line-height: 1;
  margin-top: 2px;
}

.pack-card-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lesson-ink);
}

.pack-card-meta {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--lesson-faint);
  font-weight: 600;
}

.pack-card-copy {
  margin: 12px 0 0;
  color: var(--lesson-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.room-hero-pack {
  position: relative;
  margin: 14px 18px 0;
  min-height: 240px;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  text-align: left;
  color: #fffcf7;
  box-shadow: 0 18px 38px rgba(40, 29, 18, 0.2);
  isolation: isolate;
  animation: lesson-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.room-hero-pack .room-hero-photo {
  background:
    linear-gradient(180deg, rgba(23, 20, 15, 0.18) 0%, rgba(23, 20, 15, 0.82) 100%),
    url("../images/home-kitchen.jpg") center / cover no-repeat,
    var(--lesson-photo-fall);
}

.room-hero-pack .room-hero-copy {
  min-height: 240px;
  padding: 28px 22px 24px;
}

.room-hero-pack .room-eyebrow,
.room-hero-pack .room-title,
.room-hero-pack .room-lede {
  color: inherit;
}

.room-hero-pack .room-eyebrow {
  margin-bottom: 6px;
  opacity: 0.86;
}

.room-hero-pack .room-title {
  font-size: clamp(2.2rem, 9vw, 3rem);
  line-height: 1.02;
}

.room-hero-pack .room-lede {
  max-width: 20rem;
  font-weight: 500;
  opacity: 0.94;
}

.pack-objects-section {
  padding-top: 22px;
}

.pack-objects-section .room-copy {
  margin-top: 8px;
  max-width: 28rem;
}

.pack-object-list {
  padding: 12px 18px 0;
}

.pack-object-list .pack-object-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(26, 26, 24, 0.06);
  box-shadow: 0 8px 20px rgba(40, 29, 18, 0.05);
  transition: border-color 160ms ease, transform 160ms ease;
}

.pack-object-list .pack-object-link:hover,
.pack-object-list .pack-object-link:focus-visible {
  outline: none;
  border-color: rgba(31, 77, 58, 0.28);
  transform: translateY(-1px);
}

.pack-object-thumb-wrap {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.pack-object-thumb-wrap.is-empty {
  background: var(--lesson-photo-fall);
}

.pack-object-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.pack-object-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.pack-object-list .list-term {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.pack-object-list .list-meta {
  color: var(--lesson-muted);
  font-size: 0.9rem;
}

.pack-object-chevron {
  flex: 0 0 auto;
  color: var(--lesson-faint);
  font-size: 1.35rem;
  line-height: 1;
}

.lesson-header .lesson-brand {
  text-decoration: none;
}

.list-term {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
}

.list-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.plain-list,
.link-list,
.day-list {
  margin: 0;
  padding: 0;
}

.plain-list {
  padding-left: 1.2rem;
}

.link-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.link-list a {
  display: block;
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  min-height: 52px;
}

.day-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.day-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.day-card ol {
  margin: 0;
  padding-left: 1.2rem;
}

.day-card li {
  margin-bottom: 6px;
}

.mission-card .term {
  font-size: clamp(1.6rem, 6vw, 2.1rem);
}

/* Dialogue */
.dialogue-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.dialogue-line {
  background: var(--bg);
  border-radius: 14px;
  padding: 14px 16px;
}

.dialogue-line.customer {
  margin-left: 0;
  border-left: 3px solid #3a5a40;
}

.dialogue-line.barista {
  margin-right: 0;
  border-left: 3px solid #6b5b45;
}

.speaker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.line-fr {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

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

.line-phrase-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--faint);
}

.dialogue-line.broken .line-fr {
  color: #8b2e2e;
}

/* Generated detail pages */
.qr-block {
  text-align: left;
}

.qr-image {
  display: block;
  width: 200px;
  height: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.qr-actions {
  margin: 14px 0 8px;
}

.button-link {
  display: inline-block;
  font: inherit;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #bbb;
  background: #fff;
  min-height: 44px;
  text-decoration: none;
  line-height: 1.2;
}

.button-link:hover,
.button-link:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}

.qr-url {
  font-size: 0.85rem;
  word-break: break-all;
}

.audio-pending {
  margin: 16px 0;
}

.object-title {
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  margin: 12px 0 8px;
  line-height: 1.15;
}

.french-word {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.gender {
  margin: 12px 0 0;
  color: var(--muted);
}

.gender .label {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.audio-player {
  margin: 18px 0 16px;
}

.audio-replay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #bbb;
  background: #fff;
  min-height: 52px;
  cursor: pointer;
}

.audio-replay:hover,
.audio-replay:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}

.audio-replay:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.audio-replay-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.audio-hint,
.audio-missing {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------------------
   Object lesson card — mobile-first immersion screen
   --------------------------------------------------------------------------- */
:root {
  --lesson-ink: #1a1a18;
  --lesson-muted: #5c5a55;
  --lesson-faint: #8a877f;
  --lesson-line: rgba(26, 26, 24, 0.08);
  --lesson-surface: #f3f0ea;
  --lesson-card: #fffcf7;
  --lesson-accent: #1f4d3a;
  --lesson-accent-soft: #e6efe9;
  --lesson-photo-fall: linear-gradient(160deg, #d9d2c5 0%, #b7b0a2 100%);
}

.lesson-body {
  font-family: "Outfit", system-ui, sans-serif;
  background:
    radial-gradient(120% 80% at 50% -10%, #fff9f0 0%, transparent 55%),
    linear-gradient(180deg, #efeae2 0%, var(--lesson-surface) 40%, #e7e2d8 100%);
  color: var(--lesson-ink);
  min-height: 100dvh;
}

.lesson-main {
  max-width: 430px;
  margin: 0 auto;
  padding: 0;
}

.lesson-card {
  min-height: 100dvh;
}

.lesson-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0 18px calc(44px + env(safe-area-inset-bottom, 0px));
  animation: lesson-enter 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lesson-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  margin: 0 -18px;
  padding: 6px 10px;
  padding-top: max(6px, env(safe-area-inset-top, 0px));
  background: rgba(243, 240, 234, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26, 26, 24, 0.06);
}

.lesson-header-start {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.lesson-brand {
  margin: 0;
  text-align: left;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.lesson-brand:hover .lesson-brand-stickara,
.lesson-brand:focus-visible .lesson-brand-stickara {
  color: var(--lesson-accent);
}

.lesson-brand:focus-visible {
  outline: none;
}

.lesson-brand-stickara {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--lesson-ink);
}

.lesson-brand-rest {
  display: inline-block;
  margin-left: 0.28em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lesson-faint);
}

.speed-seg {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  border-radius: 10px;
  background: rgba(26, 26, 24, 0.06);
}

.speed-seg-btn {
  min-height: 28px;
  min-width: 0;
  padding: 3px 7px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--lesson-muted);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.speed-seg-btn[aria-pressed="true"],
.speed-seg-btn.is-active {
  background: var(--lesson-card);
  color: var(--lesson-ink);
  box-shadow: 0 1px 3px rgba(26, 26, 24, 0.1);
}

.speed-seg-btn:focus-visible {
  outline: 2px solid var(--lesson-accent);
  outline-offset: 1px;
}

@keyframes lesson-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lesson-photo {
  flex: 0 0 auto;
  width: calc(100% + 36px);
  max-width: none;
  aspect-ratio: 4 / 3;
  max-height: min(30vh, 240px);
  border-radius: 0;
  overflow: hidden;
  margin: 0 -18px 10px;
  background: var(--lesson-photo-fall);
  animation: photo-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes photo-rise {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lesson-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
}

.lesson-photo-fallback {
  background: var(--lesson-photo-fall);
}

.lesson-words {
  text-align: center;
  padding: 2px 4px 4px;
}

.lesson-french {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 650;
  font-size: clamp(2.35rem, 9.5vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--lesson-ink);
}

.lesson-english {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--lesson-muted);
}

.lesson-grammar {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--lesson-faint);
}

.lesson-pack {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lesson-faint);
}

.lesson-pack-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 135, 127, 0.45);
}

.lesson-pack-link:hover,
.lesson-pack-link:focus-visible {
  color: var(--lesson-accent);
  border-bottom-color: rgba(31, 77, 58, 0.45);
}

.common-phrase-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.common-phrase-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--lesson-line);
}

.common-phrase-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: rgba(31, 77, 58, 0.1);
  color: var(--lesson-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.common-phrase-play:hover,
.common-phrase-play:focus-visible {
  background: rgba(31, 77, 58, 0.16);
}

.common-phrase-fr {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--lesson-ink);
}

.common-phrase-en {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--lesson-muted);
  line-height: 1.4;
}

.common-phrase-audio {
  display: none;
}

.module-gate {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 0 22px 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

.module-gate-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 24px 0 32px;
}

.module-gate-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lesson-faint);
}

.module-gate-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.85rem, 7vw, 2.4rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--lesson-ink);
}

.module-gate-desc {
  margin: 0 auto;
  max-width: 28ch;
  color: var(--lesson-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.module-gate-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--lesson-faint);
  font-weight: 500;
}

.module-gate-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.dev-qr {
  margin-top: 64px;
  padding: 28px 0 8px;
  text-align: center;
  border-top: 1px solid var(--lesson-line);
}

.dev-qr-image {
  display: block;
  width: 90px;
  height: 90px;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}

.dev-qr-caption {
  margin: 10px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lesson-faint);
  font-weight: 600;
}

.lesson-voices {
  margin-top: clamp(0.75rem, 3.5vh, 1.5rem);
  padding-top: 0;
}

.voice-actions {
  display: grid;
  gap: 8px;
}

.native-example {
  margin-top: 2px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.native-example.is-revealed {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 250ms ease, transform 250ms ease;
}

.native-example-static {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  margin-top: 10px;
}

.lesson-voices.has-example-open .voice-btn-tertiary {
  opacity: 0.55;
}

.lesson-spacer {
  flex: 1 1 auto;
  min-height: 16px;
}

.lesson-nudge {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 430px);
  margin: 0;
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--lesson-faint);
  pointer-events: none;
  background: linear-gradient(to top, rgba(243, 240, 234, 0.96) 35%, rgba(243, 240, 234, 0));
  animation: nudge-fade 1.4s ease 0.6s both;
}

.lesson-side-nav {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 22;
  width: min(100%, 430px);
  max-width: 430px;
  transform: translateX(-50%);
  pointer-events: none;
}

.lesson-side-btn {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 72px;
  margin: 0;
  border: none;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
  color: var(--lesson-accent);
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 500;
  text-decoration: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 4px rgba(26, 26, 24, 0.08);
  transition: background 140ms ease, opacity 140ms ease;
}

.lesson-side-prev {
  left: max(2px, env(safe-area-inset-left, 0px));
}

.lesson-side-next {
  right: max(2px, env(safe-area-inset-right, 0px));
}

.lesson-side-btn:hover,
.lesson-side-btn:focus-visible {
  outline: none;
  background: rgba(255, 252, 247, 0.95);
}

.lesson-side-btn:active {
  opacity: 0.78;
}

.lesson-side-btn.is-disabled {
  opacity: 0.28;
  pointer-events: none;
  box-shadow: none;
  background: transparent;
}

.lesson-after-fold {
  max-width: 430px;
  margin: 0 auto;
  padding: 8px 18px 0;
}

.lesson-conversation {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
}

.native-example-fr {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.4;
}

.native-example-en {
  margin: 6px 0 0;
  color: var(--lesson-muted);
  font-size: 0.92rem;
}

.spoken-word {
  display: inline;
  border-radius: 6px;
  padding: 0 3px;
  transition: color 120ms ease, background-color 120ms ease, font-weight 120ms ease;
}

.spoken-word.is-spoken {
  color: var(--lesson-accent);
  font-weight: 700;
  background: rgba(31, 77, 58, 0.12);
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 15px 18px;
  border-radius: 16px;
  min-height: 54px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.voice-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.voice-btn-primary {
  border: none;
  background: var(--lesson-accent);
  color: #f7faf8;
  box-shadow: 0 10px 28px rgba(31, 77, 58, 0.28);
}

.voice-btn-primary:hover,
.voice-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 12px 32px rgba(31, 77, 58, 0.36);
}

.voice-btn-secondary {
  border: 1px solid rgba(26, 26, 24, 0.12);
  background: var(--lesson-card);
  color: var(--lesson-ink);
}

.voice-btn-tertiary {
  border: 1px dashed rgba(26, 26, 24, 0.18);
  background: transparent;
  color: var(--lesson-faint);
  font-weight: 500;
  min-height: 48px;
  padding: 12px 16px;
}

.voice-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  box-shadow: none;
}

.voice-btn-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.voice-btn-primary.is-pulse {
  animation: coach-pulse 1.8s ease-in-out infinite;
}

@keyframes coach-pulse {
  0%,
  100% {
    box-shadow: 0 10px 28px rgba(31, 77, 58, 0.28);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 14px 36px rgba(31, 77, 58, 0.42);
    transform: scale(1.015);
  }
}

.lesson-hint,
.lesson-missing {
  text-align: center;
  margin: 12px 0 0;
  font-size: 0.92rem;
}

@keyframes nudge-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lesson-below {
  padding: 8px 18px 48px;
  border-top: 1px solid var(--lesson-line);
  background: rgba(255, 252, 247, 0.55);
}

.lesson-section {
  padding: 28px 0 8px;
}

.lesson-section + .lesson-section {
  border-top: 1px solid var(--lesson-line);
}

.lesson-section-title {
  margin: 0 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lesson-faint);
  font-weight: 600;
}

.lesson-example-fr {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

.lesson-example-en {
  margin: 8px 0 0;
  color: var(--lesson-muted);
}

.mission-preview-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.mission-preview-fr {
  margin: 4px 0 0;
  color: var(--lesson-muted);
  font-family: "Fraunces", Georgia, serif;
}

.mission-preview-goal {
  margin: 12px 0 18px;
  color: var(--lesson-muted);
  font-size: 0.98rem;
}

.mission-start {
  text-decoration: none;
  margin-top: 4px;
}

.lesson-french-phrase {
  font-size: clamp(1.55rem, 6.2vw, 2.15rem);
  line-height: 1.18;
}

.lesson-french-mission {
  font-size: clamp(1.85rem, 7vw, 2.55rem);
  line-height: 1.12;
}

.mission-goal {
  margin: 8px 0 0;
  text-align: center;
  color: var(--lesson-muted);
  font-size: 0.98rem;
  line-height: 1.45;
  padding: 0 4px;
}

.mission-placement {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mission-placement-item {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.9);
  color: var(--lesson-ink);
  font-weight: 500;
}

.mission-days {
  display: grid;
  gap: 0;
}

.mission-day {
  padding: 18px 0;
}

.mission-day + .mission-day {
  border-top: 1px solid var(--lesson-line);
}

.mission-day-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lesson-faint);
  font-weight: 600;
}

.mission-day-title {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--lesson-ink);
}

.mission-day-copy {
  margin: 0;
  color: var(--lesson-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.lesson-screen-phrase .lesson-voices,
.lesson-screen-mission .mission-goal {
  margin-top: clamp(0.75rem, 3vh, 1.35rem);
}

.related-objects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 8px;
}

.lesson-section-future .muted {
  margin: 0 0 12px;
}

.lesson-below .link-list a {
  background: var(--lesson-card);
  border: 1px solid var(--lesson-line);
  border-radius: 14px;
  box-shadow: none;
}

.lesson-below .list-term {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
}

@media (min-height: 780px) {
  .lesson-photo {
    max-height: min(34vh, 280px);
  }
}

@media (max-height: 700px) {
  .lesson-photo {
    max-height: min(28vh, 220px);
    aspect-ratio: 16 / 10;
  }

  .lesson-french {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .voice-btn,
  .slow-toggle {
    min-height: 46px;
    padding: 10px 14px;
  }
}
