/* =====================================================================
   Englightment · cozy english grammar
   Flat, compact, cohesive. One solid page (not floating cards):
   a fixed frame (header + side menu) wrapping a plain content surface.
   ===================================================================== */

:root {
  /* surfaces — warm cream & ivory, sampled from the landing page */
  --bg: #f1ebdb;          /* warm cream page background */
  --frame: #d0d2ad;       /* muted sage-beige sidebar + topbar */
  --content: #faf6ea;     /* warm ivory cards / surfaces */
  --content-2: #eee9db;   /* soft ivory inset */
  --surface-soft: #f4eedf;/* soft warm card */
  --surface-hover: #e9e3d3;/* warm hover */
  --lesson-frame: #fff9ee;/* brighter lesson frames */
  --lesson-frame-soft: #fbf2e3;
  --lesson-frame-line: #c9bd9a;

  /* ink — charcoal & warm muted */
  --ink: #27251f;         /* headings / primary text */
  --ink-body: #38342a;    /* body text */
  --ink-soft: #554f3f;    /* muted / helper text */
  --muted: #5f5947;       /* low emphasis / placeholder */
  --frame-ink: #232219;   /* text on the green frame */
  --frame-muted: #3f3b2d; /* softer text on the green frame */

  /* accents — muted olive, sage & terracotta */
  --clay: #8a8a65;        /* soft olive — secondary accent */
  --clay-hover: #737355;
  --clay-deep: #575a3d;   /* deep olive text on tints */
  --clay-tint: #eee8d8;   /* warm sand tint */
  --clay-line: #d1caad;   /* olive-beige hairline */
  --sage: #6f7256;        /* primary muted olive */
  --sage-hover: #5d6046;
  --sage-deep: #4a4d38;   /* dark olive */
  --sage-soft: #b2b291;   /* soft sage */
  --sage-tint: #e7e4d4;   /* sage-cream tint */
  --sage-line: #b7b98f;   /* olive line */
  --section-active: #b9ba88;    /* selected — muted olive */
  --section-active-tint: #e5e1c7;
  --rose: #c0876c;        /* terracotta accent */
  --rose-tint: #f0e1d4;

  /* info boxes — honey, sage & terracotta on warm ivory */
  --honey-tint: #f1ead8;
  --honey-line: #d4c9a8;
  --sky-tint: #e9e6d1;
  --sky-line: #c0be99;
  --berry-tint: #f3e5d6;
  --berry-line: #ddb69b;

  /* feedback */
  --ok-bg: #eae7d0;
  --ok-line: #bcbb93;
  --ok-text: #565937;
  --no-bg: #f3e4d5;
  --no-line: #ddb69b;
  --no-text: #8b4a30;

  /* structure — thin warm/olive lines */
  --line: #d8d1bd;        /* soft border */
  --line-strong: #b9b48f; /* strong border */
  --divider: #e1dac8;     /* subtle divider */

  --r-xs: 8px;
  --r-sm: 11px;
  --r-md: 16px;
  --r-pill: 999px;

  --font-display: "Jost", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --topbar-h: 58px;
  --sidebar-w: 264px;
  --wrap: 900px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

p, h1, h2, h3, figure, ul, ol {
  margin: 0;
}

h1, h2, h3, .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ink);
}

::selection {
  background: var(--clay-tint);
  color: var(--clay-deep);
}

/* =====================================================================
   Banner (fixed, simple)
   ===================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--topbar-h);
  background: var(--frame);
  border-bottom: 1px solid var(--line-strong);
  color: var(--frame-ink);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 3px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--rose);
  font-size: 1.05rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* On the pages with a topic panel, the wordmark is held to the panel's width
   so the search box starts exactly where the page column does. */
.lesson-page .brand { width: calc(var(--level-topic-w) - 36px); }
.vocabulary-page .brand { width: calc(var(--vocab-topic-w) - 36px); }

@media (max-width: 980px) {
  .lesson-page .brand,
  .vocabulary-page .brand { width: auto; }
}

.topic-search {
  position: relative;
  flex: 1 1 360px;
  max-width: 460px;
  min-width: 180px;
}

.topic-search-input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--content);
  color: var(--ink);
  font: 800 0.88rem/1 var(--font-body);
  outline: none;
  padding: 0 16px;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.topic-search-input::placeholder {
  color: var(--muted);
}

.topic-search-input:focus {
  border-color: var(--clay);
  background: var(--content);
  box-shadow: 0 0 0 3px rgba(201, 129, 107, 0.3);
}

.topic-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 3px;
  max-height: min(380px, calc(100vh - var(--topbar-h) - 24px));
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--content);
  box-shadow: 0 16px 34px rgba(84, 65, 46, 0.16);
}

.topic-search-results[hidden] {
  display: none;
}

.topic-search-result {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--ink);
}

.topic-search-result:hover,
.topic-search-result.is-active {
  background: var(--clay-tint);
}

.topic-search-result[hidden] {
  display: none;
}

.topic-search-result-title {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.2;
}

.topic-search-result-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-search-empty {
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-soft);
}

.language-option {
  display: grid;
  place-items: center;
  min-width: 76px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  color: var(--ink-body);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.language-option:hover {
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.language-option.is-active {
  background: var(--clay);
  color: var(--content);
}

.language-option-short {
  display: none;
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--sage);
  color: var(--content);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s var(--ease), transform 0.14s var(--ease);
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.14s var(--ease);
}

.account-menu summary:hover {
  background: var(--sage-hover);
  transform: translateY(-1px);
}

.account-menu[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.account-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: grid;
  min-width: 160px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--content);
  box-shadow: 0 16px 34px rgba(84, 65, 46, 0.16);
}

.account-menu-list a {
  padding: 9px 11px;
  border-radius: var(--r-xs);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.account-menu-list a:hover {
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--sage);
  color: var(--content);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s var(--ease), transform 0.14s var(--ease);
}

.account-link:hover {
  background: var(--sage-hover);
  transform: translateY(-1px);
}

.account-link.is-active {
  border-color: var(--clay-deep);
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.account-link + .account-link,
.home-nav-account + .home-nav-account {
  margin-left: 4px;
}

.account-top-form {
  display: flex;
  margin: 0;
}

.account-link-button {
  font-family: var(--font-body);
  cursor: pointer;
}

.progress-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.progress-topbar-actions .language-switch {
  margin-left: 0;
}

/* =====================================================================
   Shell + fixed side menu (own internal scroll)
   ===================================================================== */
.site-shell {
  display: block;
}

.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 15;
  width: var(--sidebar-w);
  background: var(--frame);
  border-right: 1px solid var(--line-strong);
  color: var(--frame-ink);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 8px 8px;
}

.sidebar-label {
  flex: none;
  padding: 2px 10px 12px;
  color: var(--frame-muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.course-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6px 10px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 95, 70, 0.35) transparent;
}

.course-nav::-webkit-scrollbar {
  width: 7px;
}

.course-nav::-webkit-scrollbar-thumb {
  border-radius: var(--r-pill);
  background: rgba(160, 95, 70, 0.28);
}

.course-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 95, 70, 0.45);
}

.nav-summary {
  cursor: pointer;
  list-style: none;
}

.nav-summary::-webkit-details-marker {
  display: none;
}

/* level (drawer) row */
.level-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 9px 30px 9px 12px;
  border-radius: var(--r-sm);
  color: var(--frame-ink);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.level-summary:hover {
  background: var(--surface-hover);
}

.level-summary::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--frame-muted);
  border-bottom: 2px solid var(--frame-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.22s var(--ease), border-color 0.15s var(--ease);
}

.level-group[open] > .level-summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.test-direct::after {
  display: none;
}

.level-summary-text {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.level-summary-main {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
}

.level-summary-sub {
  overflow: hidden;
  color: var(--frame-muted);
  font-size: 0.63rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-summary-count {
  flex: none;
  margin-left: auto;
  max-width: 88px;
  color: var(--frame-muted);
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.level-group.is-active > .level-summary,
.test-direct.is-active {
  background: var(--sage);
  color: var(--content);
}

.level-group.is-active > .level-summary .level-summary-sub,
.level-group.is-active > .level-summary .level-summary-count,
.test-direct.is-active .level-summary-sub,
.test-direct.is-active .level-summary-count {
  color: #faf6ea;
}

.level-group.is-active > .level-summary::after {
  border-color: #faf6ea;
}

/* tree */
.nav-children {
  display: grid;
  gap: 2px;
}

.topic-list {
  margin: 3px 0 4px 13px;
  padding-left: 11px;
  border-left: 1px solid var(--line-strong);
}

.page-list {
  margin: 2px 0 4px 8px;
  padding-left: 11px;
  border-left: 1px solid var(--line);
}

/* topic (sub-drawer) row */
.topic-summary {
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  color: var(--frame-muted);
  transition: background 0.15s var(--ease);
}

.topic-summary:hover {
  background: var(--surface-hover);
}

.topic-summary-content {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.topic-summary-text {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.18;
}

.topic-summary-title {
  overflow-wrap: anywhere;
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--frame-ink);
}

.topic-summary-sub {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--frame-muted);
  font-size: 0.64rem;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.topic-summary-count {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: rgba(250, 246, 234, 0.68);
  color: var(--frame-ink);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
}

.topic-group.is-active > .topic-summary,
.topic-summary.is-active {
  background: var(--section-active);
}

.topic-group.is-active > .topic-summary .topic-summary-title,
.topic-summary.is-active .topic-summary-title {
  color: var(--ink);
}

/* page (leaf) row */
.nav-page-direct {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: var(--r-sm);
  color: var(--frame-muted);
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.nav-page-direct:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.nav-page-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--content-2);
  color: var(--frame-muted);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.nav-page-title {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.nav-page-direct.is-active {
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-weight: 800;
}

.nav-page-direct.is-active .nav-page-num {
  background: var(--clay);
  color: var(--content);
}

.nav-page-direct.is-active .nav-page-title {
  color: var(--clay-deep);
}

.nav-empty {
  padding: 6px 10px;
  color: var(--frame-muted);
  font-size: 0.74rem;
  font-weight: 800;
  font-style: italic;
}

/* a small grove resting at the foot of the course map */
.sidebar-flora {
  flex: none;
  margin: 0 -8px -8px;
  padding-top: 8px;
  pointer-events: none;
  opacity: 0.9;
}

.sidebar-flora-svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-height: 620px) {
  .sidebar-flora { display: none; }
}

/* =====================================================================
   Page surface
   ===================================================================== */
.page {
  position: relative;
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  background: var(--bg);
}

.page-inner {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px clamp(18px, 4vw, 52px) 56px;
}

/* =====================================================================
   Watercolor flowers — soft hand-painted blooms in the page corners
   ===================================================================== */
.page-flora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.flora {
  position: absolute;
}

.flora-svg {
  display: block;
  width: 100%;
  height: auto;
}

.flora-tr {
  top: -18px;
  right: -26px;
  width: 210px;
  opacity: 0.92;
}

.falling-leaf {
  position: absolute;
  top: 34px;
  left: 58%;
  width: 13px;
  height: 22px;
  border: 1px solid rgba(39, 37, 31, 0.42);
  border-radius: 100% 0;
  background: #c9816b;
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(-28deg);
  transform-origin: 50% 90%;
  animation: falling-leaf 13s ease-in-out infinite;
}

.falling-leaf::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 1px;
  height: 15px;
  border-radius: 999px;
  background: rgba(39, 37, 31, 0.28);
  transform: rotate(18deg);
}

.falling-leaf-1 {
  left: 64%;
  background: #c9816b;
  animation-delay: 1.5s;
}

.falling-leaf-2 {
  left: 78%;
  top: 48px;
  width: 11px;
  height: 19px;
  background: #8fa066;
  animation-delay: 6s;
  animation-duration: 15s;
}

.falling-leaf-3 {
  left: 51%;
  top: 58px;
  width: 10px;
  height: 18px;
  background: #b9ba88;
  animation-delay: 10s;
  animation-duration: 17s;
}

.flora-br {
  bottom: 40px;
  right: -30px;
  width: 205px;
  opacity: 0.82;
}

/* Gentle breeze — flowers sway softly, hedgehog breathes. */
@keyframes flora-sway {
  0%, 100% { transform: rotate(-1.8deg); }
  50%      { transform: rotate(1.8deg); }
}

@keyframes falling-leaf {
  0%, 16% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-28deg);
  }
  21% {
    opacity: 0.88;
  }
  48% {
    opacity: 0.86;
    transform: translate3d(-24px, 70px, 0) rotate(38deg);
  }
  72% {
    opacity: 0;
    transform: translate3d(18px, 132px, 0) rotate(116deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(18px, 132px, 0) rotate(116deg);
  }
}

.flora-tr, .flora-br {
  transform-origin: bottom center;
  animation: flora-sway 7s ease-in-out infinite;
}

.flora-tr { animation-duration: 6.5s; }
.flora-br { animation-duration: 7.5s; animation-delay: -4s; }

@media (prefers-reduced-motion: reduce) {
  .flora-tr, .flora-br { animation: none; }
  .falling-leaf { display: none; }
}

@media (max-width: 860px) {
  .flora-tr { width: 150px; opacity: 0.64; }
  .flora-br { width: 150px; opacity: 0.58; }
}

[id] {
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

/* hero */
.lesson-hero {
  display: flex;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.hero-text {
  min-width: 0;
}

.hero-kicker {
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--clay);
}

.hero-text h1 {
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
}

.hero-meta {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

/* =====================================================================
   Lesson flow (one continuous column, no cards)
   ===================================================================== */
.lesson-grid {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-badge {
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--clay);
  color: var(--content);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.practice-badge {
  background: var(--sage);
}

.panel-head h2 {
  font-size: 1.16rem;
  font-weight: 500;
  color: var(--ink);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: stretch;
}

.practice-panel {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.lesson-choice-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: -8px 0 24px;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
}

.lesson-choice {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  max-width: min(260px, 68vw);
  padding: 9px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--lesson-frame-line);
  background: var(--lesson-frame-soft);
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.lesson-choice:hover {
  background: var(--surface-hover);
  border-color: var(--clay-line);
}

.lesson-choice.is-active {
  background: var(--clay);
  border-color: var(--clay);
}

.lesson-choice-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
}

.lesson-choice.is-active .lesson-choice-num {
  background: var(--content);
  color: var(--clay-deep);
}

.lesson-choice-title {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lesson-choice.is-active .lesson-choice-title {
  color: var(--content);
}

/* =====================================================================
   Text blocks (flat)
   ===================================================================== */
.block-heading {
  align-self: flex-start;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-size: 0.98rem;
  font-weight: 500;
}

.test-heading {
  display: inline-block;
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--sage-line);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.block-p {
  color: var(--ink-soft);
}

.word-lookup {
  all: unset;
  display: inline;
  border-radius: 4px;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.14s var(--ease), background 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.word-lookup:hover,
.word-lookup:focus-visible,
.word-lookup.is-selected {
  color: var(--sage-deep);
  background: rgba(143, 160, 102, 0.14);
  box-shadow: 0 0 0 2px rgba(143, 160, 102, 0.14);
}

.word-card {
  position: fixed;
  z-index: 80;
  width: min(360px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  box-shadow: 0 18px 42px rgba(57, 53, 40, 0.18);
  color: var(--ink);
}

.word-card-close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--clay-line);
  border-radius: 50%;
  background: var(--content);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.word-card-close:hover {
  color: var(--sage-deep);
  border-color: var(--sage-line);
}

.word-card-label {
  margin-bottom: 5px;
  color: var(--clay-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  line-height: 1.2;
  text-transform: uppercase;
}

.word-card-word {
  padding-right: 32px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.18;
}

.word-card-translation {
  margin-top: 4px;
  color: var(--sage-deep);
  font-size: 1rem;
  font-weight: 800;
}

.word-card-phrase {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--clay-line);
}

.word-card-phrase p:not(.word-card-label) {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.word-card-phrase-translation {
  margin-top: 6px;
  color: var(--sage-deep) !important;
}

.word-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.word-card-btn {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--sage-line);
  border-radius: var(--r-pill);
  background: var(--content);
  color: var(--sage-deep);
  font-weight: 900;
  font-size: 0.78rem;
  cursor: pointer;
}

.word-card-btn.primary {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--content);
}

.word-card-btn:hover:not(:disabled) {
  border-color: var(--sage-deep);
}

.word-card-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.word-card-status {
  min-height: 1.2em;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.inline-link {
  display: inline;
  color: var(--clay-deep);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: var(--sage-deep);
}

.section-break {
  width: 100%;
  height: 1px;
  margin: 10px 0 2px;
  background: var(--line-strong);
}

.note {
  padding: 12px 15px 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--lesson-frame-line);
  border-left: 3px solid var(--clay);
  background: var(--lesson-frame);
  color: var(--ink);
  font-weight: 600;
}

.soft-list {
  display: grid;
  gap: 8px;
  padding-left: 4px;
  list-style: none;
}

.soft-list li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-soft);
}

.soft-list li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

.numbered-list {
  counter-reset: rule;
}

.numbered-list li {
  counter-increment: rule;
  padding-left: 32px;
}

.numbered-list li::before {
  content: counter(rule);
  top: 0.05em;
  left: 0;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--clay);
  color: var(--content);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
}

.rule-examples {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

.rule-example {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  counter-increment: rule;
  padding: 12px 14px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame);
}

.rule-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clay);
  color: var(--content);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
}

.rule-number::before {
  content: counter(rule);
}

.rule-text {
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
}

.rule-example-box {
  grid-column: 2;
  width: fit-content;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px dashed var(--lesson-frame-line);
  border-radius: var(--r-sm);
  background: var(--content);
  color: var(--ink-soft);
  font-weight: 700;
  font-style: italic;
}

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

.checklist li {
  position: relative;
  padding: 10px 14px 10px 42px;
  border-radius: var(--r-sm);
  background: var(--sage-tint);
  border: 1px solid var(--sage-line);
  font-weight: 700;
  color: var(--sage-deep);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--sage);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--clay-tint);
  border: 1px solid var(--clay-line);
  color: var(--clay-deep);
  font-weight: 800;
  font-size: 0.88rem;
}

.lines {
  display: grid;
  gap: 8px;
}

.lines p {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  border: 1px dashed var(--lesson-frame-line);
  color: var(--ink-soft);
  font-weight: 600;
}

.formula-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.formula-box {
  padding: 9px 15px;
  border-radius: var(--r-sm);
  background: var(--clay-tint);
  border: 1px solid var(--clay-line);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--clay-deep);
}

.formula-plus {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--clay);
}

.formula-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: #f6edd8;
  border: 1px solid #d4bc84;
}

.formula-card-stacked {
  grid-template-columns: 1fr;
}

.formula-card-item {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--lesson-frame-line);
  background: var(--lesson-frame);
}

.formula-card-link {
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.formula-card-link:hover,
.formula-card-link:focus-visible {
  border-color: var(--olive);
  box-shadow: 0 8px 18px rgba(91, 95, 63, 0.14);
  transform: translateY(-1px);
}

.formula-card-link:focus-visible {
  outline: 2px solid rgba(91, 95, 63, 0.32);
  outline-offset: 3px;
}

.formula-card-item:nth-child(1) {
  background: var(--sage-tint);
  border-color: var(--sage-line);
}

.formula-card-item:nth-child(2) {
  background: var(--clay-tint);
  border-color: var(--clay-line);
}

.formula-card-form {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
}

.formula-card-meaning {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.used-to-would-table td {
  padding-top: 18px;
  padding-bottom: 18px;
  line-height: 2.05;
}

/* callouts (flat) */
.callout {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid;
}

.callout-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.callout-line {
  color: var(--ink-body);
  font-weight: 600;
}

.callout-line + .callout-line {
  margin-top: 3px;
}

.spaced-rules .callout-line + .callout-line {
  margin-top: 14px;
}

.future-continuous-use {
  margin-bottom: 20px;
}

.future-continuous-use .callout-line {
  font-weight: 400;
}

.lead-then-list .callout-line:nth-of-type(3) {
  margin-top: 14px;
}

.link-callout {
  border-width: 1.5px;
}

.callout-link {
  display: inline-block;
  margin: 0 3px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--content);
  border: 1px solid var(--lesson-frame-line);
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-weight: 700;
  transition: background 0.14s var(--ease);
}

.callout-link:hover {
  background: var(--clay-tint);
}

/* warm info box */
.callout-honey,
.callout-berry { background: #fbf1df; border-color: #d9c59b; }
.callout-honey .callout-title,
.callout-berry .callout-title { color: #7c5f20; }

/* cool sage info box */
.callout-sage,
.callout-sky { background: #f4f0dd; border-color: #c8c49d; }
.callout-sage .callout-title,
.callout-sky .callout-title { color: var(--sage-deep); }

/* tables (flat) */
.table-card {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--lesson-frame-line);
  box-shadow: 0 10px 22px rgba(74, 59, 50, 0.06);
  -webkit-overflow-scrolling: touch;
}

.table-card + .table-card {
  margin-top: 14px;
}

table {
  width: 100%;
  min-width: min(620px, 100%);
  border-collapse: collapse;
}

.table-caption {
  caption-side: top;
  padding: 12px 16px 10px;
  background: var(--content);
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.linking-ideas-table table {
  min-width: min(860px, 100%);
}

th {
  padding: 12px 16px;
  background: var(--table-head, var(--clay-deep));
  color: var(--table-head-text, var(--content));
  font-family: var(--font-display);
  font-weight: 600;
  text-align: left;
  font-size: 0.95rem;
  letter-spacing: 0;
}

td {
  padding: 14px 16px;
  border-top: 1px solid var(--table-line, #d8cfb8);
  color: var(--ink);
  line-height: 1.85;
  vertical-align: top;
}

td + td,
th + th {
  border-left: 1px solid var(--table-line, #d8cfb8);
}

tbody tr:nth-child(odd) td {
  background: var(--table-row-a, var(--content));
}

tbody tr:nth-child(even) td {
  background: var(--table-row-b, #f3ebd9);
}

tbody tr:hover td {
  background: var(--table-hover, #f2e6d8);
}

.examples-wide-table table {
  table-layout: fixed;
  min-width: min(760px, 100%);
}

.examples-wide-table th:nth-child(1),
.examples-wide-table td:nth-child(1) {
  width: 18%;
}

.examples-wide-table th:nth-child(2),
.examples-wide-table td:nth-child(2) {
  width: 38%;
}

.examples-wide-table th:nth-child(3),
.examples-wide-table td:nth-child(3) {
  width: 44%;
}

.tenses-review-table {
  width: min(1120px, calc(100vw - var(--sidebar-w) - clamp(36px, 8vw, 104px)));
  max-width: calc(100vw - var(--sidebar-w) - 36px);
  margin-left: 50%;
  transform: translateX(-50%);
}

.tenses-review-table table {
  table-layout: fixed;
  min-width: 1040px;
}

.tenses-review-table th,
.tenses-review-table td {
  padding-left: 14px;
  padding-right: 14px;
}

.tenses-review-table th:nth-child(1),
.tenses-review-table td:nth-child(1) {
  width: 15%;
}

.tenses-review-table th:nth-child(2),
.tenses-review-table td:nth-child(2) {
  width: 23%;
}

.tenses-review-table th:nth-child(3),
.tenses-review-table td:nth-child(3) {
  width: 25%;
}

.tenses-review-table th:nth-child(4),
.tenses-review-table td:nth-child(4) {
  width: 20%;
}

.tenses-review-table th:nth-child(5),
.tenses-review-table td:nth-child(5) {
  width: 17%;
}

.all-tenses-b2-table {
  width: min(1080px, calc(100vw - var(--sidebar-w) - clamp(36px, 8vw, 104px)));
  max-width: calc(100vw - var(--sidebar-w) - 36px);
  margin-left: 50%;
  transform: translateX(-50%);
  border-color: rgba(127, 116, 87, 0.42);
  box-shadow: 0 18px 34px rgba(74, 59, 50, 0.08);
}

.all-tenses-b2-table table {
  table-layout: fixed;
  min-width: 1180px;
}

.all-tenses-b2-table th {
  background: var(--sage);
}

.all-tenses-b2-table th,
.all-tenses-b2-table td {
  padding-left: 14px;
  padding-right: 14px;
}

.all-tenses-b2-table td {
  line-height: 1.62;
}

.all-tenses-b2-table .tense-sign-line {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 8px;
  margin: 0 0 7px;
}

.all-tenses-b2-table .tense-sign-line:last-child {
  margin-bottom: 0;
}

.all-tenses-b2-table .tense-sign-chip {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(127, 116, 87, 0.42);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.all-tenses-b2-table .tense-sign-text {
  padding-top: 1px;
}

.all-tenses-b2-table .tense-sign-positive .tense-sign-chip {
  background: #eef1df;
  color: var(--sage-deep);
}

.all-tenses-b2-table .tense-sign-negative .tense-sign-chip {
  position: relative;
  background: #fbf1df;
  color: #7c5f20;
  font-size: 0;
}

.all-tenses-b2-table .tense-sign-negative .tense-sign-chip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.all-tenses-b2-table .tense-sign-question .tense-sign-chip {
  background: #f7efd9;
  color: var(--clay-deep);
}

.all-tenses-b2-table th:nth-child(1),
.all-tenses-b2-table td:nth-child(1) {
  width: 16%;
}

.all-tenses-b2-table th:nth-child(2),
.all-tenses-b2-table td:nth-child(2) {
  width: 28%;
}

.all-tenses-b2-table th:nth-child(3),
.all-tenses-b2-table td:nth-child(3) {
  width: 26%;
}

.all-tenses-b2-table th:nth-child(4),
.all-tenses-b2-table td:nth-child(4) {
  width: 30%;
}

.all-tenses-b2-table td:nth-child(1),
.all-tenses-b2-table tbody tr:nth-child(odd) td:nth-child(1),
.all-tenses-b2-table tbody tr:nth-child(even) td:nth-child(1) {
  background: #eef1df;
  color: var(--sage-deep);
}

.all-tenses-b2-table td:nth-child(2),
.all-tenses-b2-table tbody tr:nth-child(odd) td:nth-child(2),
.all-tenses-b2-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #fbf1df;
  color: var(--clay-deep);
}

.compounds-main-table {
  width: min(1080px, calc(100vw - var(--sidebar-w) - clamp(36px, 8vw, 104px)));
  max-width: calc(100vw - var(--sidebar-w) - 36px);
  margin-left: 50%;
  transform: translateX(-50%);
}

.connectors-discourse-table {
  width: min(1120px, calc(100vw - var(--sidebar-w) - clamp(36px, 8vw, 104px)));
  max-width: calc(100vw - var(--sidebar-w) - 36px);
  margin-left: 50%;
  transform: translateX(-50%);
}

.connectors-discourse-table table {
  table-layout: fixed;
  min-width: 1040px;
}

.connectors-discourse-table th:nth-child(1),
.connectors-discourse-table td:nth-child(1) {
  width: 14%;
}

.connectors-discourse-table th:nth-child(2),
.connectors-discourse-table td:nth-child(2) {
  width: 28%;
}

.connectors-discourse-table th:nth-child(3),
.connectors-discourse-table td:nth-child(3) {
  width: 58%;
}

.compounds-main-table table {
  table-layout: fixed;
  min-width: 980px;
}

.compounds-main-table th,
.compounds-main-table td {
  padding-left: 14px;
  padding-right: 14px;
}

.compounds-main-table th:nth-child(1),
.compounds-main-table td:nth-child(1) {
  width: 10%;
}

.compounds-main-table th:nth-child(2),
.compounds-main-table td:nth-child(2) {
  width: 21%;
}

.compounds-main-table th:nth-child(3),
.compounds-main-table td:nth-child(3) {
  width: 17%;
}

.compounds-main-table th:nth-child(4),
.compounds-main-table td:nth-child(4) {
  width: 22%;
}

.compounds-main-table th:nth-child(5),
.compounds-main-table td:nth-child(5) {
  width: 30%;
}

@media (max-width: 1024px) {
  .tenses-review-table,
  .all-tenses-b2-table,
  .connectors-discourse-table,
  .compounds-main-table {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }
}

.present-continuous-table th,
.present-continuous-table td {
  text-align: center;
}

.present-continuous-table td {
  vertical-align: middle;
}

.past-be-table th,
.past-be-table td {
  text-align: center;
}

.past-be-table td {
  vertical-align: middle;
}

.be-going-to-a1-table table,
.future-simple-a1-table table {
  table-layout: fixed;
  min-width: min(720px, 100%);
}

.be-going-to-a1-table th,
.be-going-to-a1-table td,
.future-simple-a1-table th,
.future-simple-a1-table td {
  text-align: center;
  vertical-align: middle;
}

.be-going-to-a1-table tbody tr:first-child td,
.be-going-to-a1-table tbody tr:first-child:nth-child(odd) td,
.future-simple-a1-table tbody tr:first-child td,
.future-simple-a1-table tbody tr:first-child:nth-child(odd) td {
  background: #f4f0dd;
  box-shadow: inset 0 0 0 1px rgba(127, 116, 87, 0.42);
  color: var(--sage-deep);
  line-height: 1.55;
}

.tense-signal-frame {
  border-color: rgba(127, 116, 87, 0.55);
}

.tense-signal-frame table {
  table-layout: fixed;
  min-width: min(680px, 100%);
}

.tense-signal-frame th,
.tense-signal-frame td {
  text-align: center;
}

.tense-signal-frame td {
  vertical-align: middle;
}

.tense-signal-frame th:nth-child(1) {
  background: var(--clay-deep);
}

.tense-signal-frame th:nth-child(2) {
  background: var(--sage);
}

.tense-signal-frame tbody tr td:nth-child(1),
.tense-signal-frame tbody tr:nth-child(odd) td:nth-child(1),
.tense-signal-frame tbody tr:nth-child(even) td:nth-child(1) {
  background: #fff4df;
}

.tense-signal-frame tbody tr td:nth-child(2),
.tense-signal-frame tbody tr:nth-child(odd) td:nth-child(2),
.tense-signal-frame tbody tr:nth-child(even) td:nth-child(2) {
  background: #eef1df;
}

.tense-signal-frame tbody tr:hover td:nth-child(1) {
  background: #f9ebd2;
}

.tense-signal-frame tbody tr:hover td:nth-child(2) {
  background: #e6ead4;
}

.table-tone-0 {
  --table-head: var(--clay-deep);
  --table-head-text: var(--content);
  --table-row-a: var(--content);
  --table-row-b: #f7efd9;
  --table-hover: #f6e5d4;
  --table-line: var(--line);
}

.table-tone-1 {
  --table-head: var(--sage);
  --table-head-text: var(--content);
  --table-row-a: var(--content);
  --table-row-b: #f7efd9;
  --table-hover: var(--sage-tint);
  --table-line: var(--line);
}

.table-tone-2 {
  --table-head: var(--clay);
  --table-head-text: var(--content);
  --table-row-a: var(--content);
  --table-row-b: #f7efd9;
  --table-hover: #f6e5d4;
  --table-line: var(--line);
}

.table-tone-3 {
  --table-head: var(--sage-deep);
  --table-head-text: var(--content);
  --table-row-a: var(--content);
  --table-row-b: #f7efd9;
  --table-hover: var(--sage-tint);
  --table-line: var(--line);
}

.word-table td {
  width: 50%;
}

.word-cell {
  font-weight: 800;
}

.answer-cell {
  padding: 8px 12px;
}

/* poster / conjugation (flat) */
.poster {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--lesson-frame-line);
  background: var(--lesson-frame);
}

.poster-title {
  padding: 12px 18px;
  background: var(--clay-deep);
  color: var(--content);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.poster-cols {
  display: grid;
  gap: 1px;
  background: var(--line-strong);
}

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

.poster-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 18px 14px;
  background: var(--content);
  text-align: center;
}

.poster-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.05;
}

.accent-clay .poster-head { color: var(--clay); }
.accent-olive .poster-head { color: var(--sage-deep); }
.accent-rose .poster-head { color: var(--rose); }

.poster-sub {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: -3px;
}

.poster-dots {
  display: block;
  width: 60%;
  height: 0;
  margin: 4px 0;
  border-top: 2px dotted var(--line-strong);
}

.poster-formula {
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.framed-formulas .poster-formula {
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--clay);
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.framed-formulas .accent-olive .poster-formula {
  border-color: var(--sage);
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.framed-formulas .accent-rose .poster-formula {
  border-color: var(--rose);
  background: var(--rose-tint);
  color: var(--sage-deep);
}

.poster-lines {
  display: grid;
  gap: 3px;
}

.poster-lines span {
  color: var(--ink);
  font-weight: 600;
}

.poster-example {
  margin-top: auto;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--clay-tint);
  border: 1px dashed var(--clay);
  color: var(--clay-deep);
  font-weight: 700;
}

.accent-olive .poster-example {
  background: var(--sage-tint);
  border-color: var(--sage);
  color: var(--sage-deep);
}

.accent-rose .poster-example {
  background: var(--rose-tint);
  border-color: var(--rose);
  color: var(--sage-deep);
}

/* subject-pronoun reference table */
.pronoun-table-card {
  overflow-x: auto;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  box-shadow: 0 10px 22px rgba(74, 59, 50, 0.06);
  -webkit-overflow-scrolling: touch;
}

.pronoun-table {
  min-width: min(520px, 100%);
}

.pronoun-table th {
  background: var(--sage);
  color: var(--content);
}

.pronoun-table td {
  vertical-align: middle;
}

.pronoun-table-picture {
  width: 92px;
  text-align: center;
}

.pronoun-table-picture img {
  display: inline-block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  vertical-align: middle;
}

.pronoun-table-word {
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.pronoun-table-translation {
  font-weight: 800;
}

.pronoun-picture-card {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  box-shadow: 0 10px 22px rgba(74, 59, 50, 0.06);
}

.pronoun-picture-stage {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--r-md) - 4px);
}

.pronoun-picture-image {
  display: block;
  width: 100%;
  height: auto;
}

.pronoun-picture-label {
  position: absolute;
  left: var(--pronoun-x);
  top: var(--pronoun-y);
  width: min(18.5%, 150px);
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.pronoun-picture-sound {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 5px 8px 6px;
  border-color: rgba(126, 139, 91, 0.62);
  border-radius: 15px;
  background: rgba(255, 252, 244, 0.92);
  box-shadow: 0 8px 18px rgba(74, 59, 50, 0.12);
  color: var(--sage-deep);
  line-height: 1.05;
  pointer-events: auto;
}

.pronoun-picture-sound:hover {
  background: rgba(255, 252, 244, 0.98);
}

.pronoun-picture-word {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.pronoun-picture-translation {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .pronoun-picture-card {
    padding: 6px;
  }

  .pronoun-picture-label {
    width: 20.5%;
  }

  .pronoun-picture-sound {
    gap: 2px;
    min-height: 30px;
    padding: 3px 4px 4px;
    border-radius: 11px;
  }

  .pronoun-picture-word {
    font-size: 0.72rem;
  }

  .pronoun-picture-translation {
    font-size: 0.53rem;
    letter-spacing: 0.04em;
  }
}

/* scheme */
.scheme-body {
  display: grid;
  gap: 1px;
  background: var(--lesson-frame-line);
}

.scheme-section {
  padding: 16px 18px;
  background: var(--lesson-frame);
}

.scheme-section-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--clay-deep);
  margin-bottom: 12px;
}

.scheme-rows {
  display: grid;
  gap: 9px;
}

.scheme-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  border: 1px solid var(--lesson-frame-line);
}

.tag {
  justify-self: start;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: lowercase;
}

.tag-affirmative { background: var(--clay-tint); color: var(--clay-deep); }
.tag-negative { background: #eee7d7; color: #776a54; }
.tag-question { background: var(--honey-tint); color: #7c5f20; }

.scheme-formula {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
}

.scheme-example {
  color: var(--ink-soft);
  font-weight: 600;
}

.scheme-mark {
  display: inline-block;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--honey-tint);
  color: var(--clay-deep);
  font-weight: 900;
}

.scheme-mark-future {
  background: var(--sky-tint);
  color: var(--sage-deep);
}

.scheme-mark-green {
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.inline-tone-result {
  color: var(--sage-deep);
}

.scheme-note {
  padding: 12px 18px;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
  font-style: italic;
  background: var(--lesson-frame);
}

/* photo */
.photo {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--lesson-frame-line);
  background: var(--lesson-frame);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo figcaption {
  padding: 10px 16px;
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

/* =====================================================================
   Typable exercises (flat)
   ===================================================================== */
.blank {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--clay-deep);
  background: var(--lesson-frame);
  border: none;
  border-bottom: 2px solid var(--lesson-frame-line);
  padding: 3px 8px;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}

.blank::placeholder {
  color: var(--muted);
  font-weight: 600;
}

.blank:focus {
  outline: none;
  border-bottom-color: var(--clay);
  background: var(--clay-tint);
}

.blank.is-filled {
  border-bottom-color: var(--sage);
}

.blank.is-correct {
  border-color: var(--ok-line);
  border-bottom-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.blank.is-wrong {
  border-color: var(--no-line);
  border-bottom-color: var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.blank-inline {
  width: 88px;
  text-align: center;
  border-radius: 6px 6px 0 0;
}

.blank-answer {
  flex: 1;
  min-width: 120px;
  border-radius: 6px 6px 0 0;
}

.blank-cell {
  width: 100%;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  padding: 8px 12px;
}

.blank-cell:focus { border-color: var(--clay); }
.blank-cell.is-filled { border-color: var(--sage); }

.blank-full {
  width: 100%;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  padding: 8px 12px;
}

.blank-full:focus { border-color: var(--clay); }
.blank-full.is-filled { border-color: var(--sage); }

.answer-line {
  min-height: 40px;
  border: none;
  border-bottom: 2px solid var(--lesson-frame-line);
  border-radius: 7px 7px 0 0;
  background: var(--lesson-frame-soft);
}

.answer-line:focus {
  border-bottom-color: var(--clay);
}

.answer-line.is-filled {
  border-bottom-color: var(--sage);
}

textarea.blank-full {
  resize: vertical;
  min-height: 76px;
  line-height: 1.45;
  text-align: left;
}

select.blank {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--clay) 50%),
    linear-gradient(135deg, var(--clay) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(1.05em),
    calc(100% - 12px) calc(1.05em);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

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

.exercise-card {
  display: flex;
  gap: 11px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  border: 1px solid var(--lesson-frame-line);
  transition: border-color 0.14s var(--ease);
}

.exercise-card:focus-within {
  border-color: var(--clay);
}

.exercise-card.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.exercise-card.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
}

.exercise-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: 0.8rem;
}

.exercise-number:nth-of-type(3n + 1) {
  background: var(--rose-tint);
  color: var(--no-text);
}

.exercise-number:nth-of-type(3n + 2) {
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.exercise-number:nth-of-type(3n) {
  background: var(--honey-tint);
  color: var(--clay-deep);
}

.placement-question:nth-of-type(3n + 1) .exercise-number,
.exercise-card:nth-of-type(3n + 1) .exercise-number {
  background: var(--rose-tint);
  color: var(--no-text);
}

.placement-question:nth-of-type(3n + 2) .exercise-number,
.exercise-card:nth-of-type(3n + 2) .exercise-number {
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.placement-question:nth-of-type(3n) .exercise-number,
.exercise-card:nth-of-type(3n) .exercise-number {
  background: var(--honey-tint);
  color: var(--clay-deep);
}

.exercise-body {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  flex: 1;
}

.exercise-prompt {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.9;
}

.click-choice-grid {
  align-items: stretch;
}

.click-choice-options {
  display: grid;
  gap: 7px;
}

.click-choice-option {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-sm);
  background: var(--content);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), color 0.14s var(--ease);
}

.click-choice-option:hover,
.click-choice-option:focus-visible {
  outline: none;
  border-color: var(--clay);
  background: var(--clay-tint);
}

.click-choice-option.is-selected {
  border-color: var(--sage);
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.audio-prompt-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.audio-play {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--sage);
  border-radius: var(--r-pill);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), opacity 0.14s var(--ease), transform 0.14s var(--ease);
}

.audio-play:hover {
  background: var(--lesson-frame);
  border-color: var(--clay);
  transform: translateY(-1px);
}

.audio-play:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.audio-play.is-unavailable {
  opacity: 0.55;
}

.audio-play.is-loading {
  cursor: wait;
  opacity: 0.68;
}

.audio-play-inline {
  min-height: 30px;
  margin-left: 8px;
  padding: 5px 10px;
  font-size: 0.78rem;
  vertical-align: middle;
}

.picture-sound-card {
  display: grid;
  width: min(100%, 620px);
  margin: 8px auto 16px;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: rgba(255, 252, 245, 0.72);
  box-shadow: 0 10px 22px rgba(74, 59, 50, 0.05);
}

.picture-sound-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.84);
}

.picture-sound-image {
  display: block;
  width: 100%;
  height: auto;
}

.picture-sound-boxes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.picture-sound-box {
  position: absolute;
  left: var(--picture-sound-x, 50%);
  top: var(--picture-sound-y, 50%);
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: min(168px, 28vw);
  min-height: 42px;
  margin: 0;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.94);
  box-shadow: 0 8px 18px rgba(74, 59, 50, 0.1);
  transform: translate(-50%, -100%);
  pointer-events: auto;
}

.picture-sound-box:hover,
.picture-sound-box:focus-visible {
  transform: translate(-50%, -100%);
}

.picture-sound-word {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
}

.picture-sound-note {
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

@media (max-width: 680px) {
  .picture-sound-card {
    width: min(100%, 430px);
  }

  .picture-sound-box {
    min-width: 108px;
    min-height: 40px;
    padding: 5px 7px;
  }

  .picture-sound-word {
    font-size: 0.82rem;
  }

  .picture-sound-note {
    font-size: 0.56rem;
  }
}

.number-answer {
  width: 120px;
}

.answer-feedback {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.answer-feedback.is-correct {
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.answer-feedback.is-wrong {
  border: 1px solid var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.answer-feedback-note {
  font-weight: 700;
  color: var(--muted);
}

.exercise-list {
  display: grid;
  gap: 9px;
  list-style: none;
  padding: 0;
  counter-reset: ex;
}

.exercise-list li {
  counter-increment: ex;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px 11px 44px;
  position: relative;
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  border: 1px solid var(--lesson-frame-line);
  transition: border-color 0.14s var(--ease);
}

.exercise-list li:focus-within {
  border-color: var(--clay);
}

.exercise-list li::before {
  content: counter(ex);
  position: absolute;
  left: 12px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.exercise-list li:nth-child(3n + 1)::before {
  background: var(--rose-tint);
  color: var(--no-text);
}

.exercise-list li:nth-child(3n + 2)::before {
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.exercise-list li:nth-child(3n)::before {
  background: var(--honey-tint);
  color: var(--clay-deep);
}

.exercise-list .exercise-prompt {
  font-weight: 700;
}

.arrow {
  color: var(--clay);
  font-weight: 900;
  font-size: 1rem;
}

.drag-gap {
  display: grid;
  gap: 14px;
}

.drag-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--sky-tint);
  border: 1px solid var(--sky-line);
}

.compound-drag {
  display: grid;
  gap: 14px;
}

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

.compound-drag-bank {
  align-content: flex-start;
}

.compound-drag-bank-label {
  width: 100%;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.drag-chip {
  min-height: 34px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--sage-line);
  background: var(--content);
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.9rem;
  cursor: grab;
  box-shadow: 0 4px 10px rgba(74, 59, 50, 0.05);
}

.drag-chip:active {
  cursor: grabbing;
}

.drag-chip.is-selected {
  border-color: var(--clay);
  color: var(--clay-deep);
  background: var(--clay-tint);
}

.drag-chip:disabled {
  opacity: 0.38;
  cursor: default;
}

.drag-gap-list {
  display: grid;
  gap: 10px;
}

.drag-gap-card {
  display: flex;
  gap: 11px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  border: 1px solid var(--lesson-frame-line);
}

.drag-gap-card.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.drag-gap-card.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
}

.drag-gap-prompt {
  flex: 1;
  min-width: 0;
}

.drag-drop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  min-height: 34px;
  margin: 0 4px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px dashed var(--sage-soft);
  background: var(--content);
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-weight: 900;
  vertical-align: middle;
  cursor: pointer;
}

.drag-gap-nowrap {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.drag-gap-nowrap .drag-drop {
  flex: 0 0 auto;
}

.drag-drop::before {
  content: "";
}

.drag-drop.is-filled {
  border-style: solid;
  background: var(--sky-tint);
}

.drag-drop.is-over {
  border-color: var(--clay);
  background: var(--clay-tint);
}

.drag-drop.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.drag-drop.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.compound-drag-word {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px;
  vertical-align: middle;
}

.compound-drag-word .drag-drop {
  min-width: 88px;
  margin: 0;
}

.compound-drag-plus {
  color: var(--muted);
  font-weight: 900;
}

.compound-drag-card.is-correct .compound-drag-drop {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.compound-drag-card.is-wrong .compound-drag-drop {
  border-color: var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.action-order-list {
  display: grid;
  gap: 10px;
}

.action-order-card .exercise-body {
  gap: 9px;
}

.action-order-bank {
  justify-self: start;
  padding: 7px;
  background: var(--sage-tint);
  border-color: var(--sage-line);
}

.action-order-chip {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sage-deep);
}

.action-order-prompt {
  margin: 0;
  line-height: 2.25;
}

.action-order-part {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: normal;
}

.action-order-text {
  display: inline;
}

.action-order-joiner {
  white-space: pre-wrap;
}

.action-order-drop {
  min-width: 42px;
  min-height: 32px;
  margin: 0 2px;
  padding: 4px 10px;
}

.matching-lines {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  padding: 4px 0;
}

.matching-lines-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.matching-line-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.82;
  filter: drop-shadow(0 2px 2px rgba(74, 59, 50, 0.08));
}

.matching-column {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.match-card {
  width: 100%;
  min-height: 46px;
  align-items: center;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
}

.match-card-left {
  padding: 10px 12px;
}

.match-card-right {
  display: flex;
  padding: 12px 14px;
  border: 1px solid var(--lesson-frame-line);
  background: var(--lesson-frame);
  color: var(--ink);
  font-weight: 900;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), transform 0.14s var(--ease);
}

.match-card-text {
  color: var(--ink);
  font-weight: 900;
}

.match-card-left.is-selected,
.match-card-right:hover {
  border-color: var(--clay);
  background: var(--clay-tint);
}

.match-card-left.is-filled {
  border-color: var(--sage);
}

.match-card-right.is-used {
  border-color: var(--sage-line);
  background: var(--sage-tint);
}

.match-card-left.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.match-card-left.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
}

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

.picture-drag-card {
  align-items: stretch;
}

.picture-drag-body {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
}

.question-illustration {
  display: grid;
  place-items: center;
  width: min(100%, 132px);
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--sky-tint);
  color: var(--sage-deep);
  border: 1px solid var(--sky-line);
}

.question-illustration-svg {
  width: 74%;
  height: 74%;
}

.picture-drag-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picture-drag .drag-drop {
  min-width: 118px;
  margin: 0;
}

.sort-columns {
  display: grid;
  gap: 14px;
}

.sort-bank {
  min-height: 56px;
}

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

.sort-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px dashed var(--lesson-frame-line);
  background: var(--lesson-frame);
}

.sort-column.is-over,
.sort-bank.is-over {
  border-color: var(--clay);
  background: var(--clay-tint);
}

.sort-column-title {
  margin: 0;
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.sort-column-drop {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 126px;
}

.sort-token {
  display: inline-grid;
}

.sort-token.is-selected .sort-chip {
  border-color: var(--clay);
  color: var(--clay-deep);
  background: var(--clay-tint);
}

.sort-token.is-correct .sort-chip {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.sort-token.is-wrong .sort-chip {
  border-color: var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.sort-token .answer-feedback {
  display: none;
}

.writing {
  display: grid;
  gap: 10px;
}

.ai-writing-check {
  display: grid;
  gap: 12px;
}

.ai-writing-lines {
  display: grid;
  gap: 10px;
}

.ai-writing-line {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  border: 1px solid var(--lesson-frame-line);
  transition: border-color 0.14s var(--ease);
}

.ai-writing-line:focus-within {
  border-color: var(--clay);
}

.ai-writing-input {
  flex: 1;
}

.ai-writing-result {
  white-space: pre-wrap;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--sage-line);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-weight: 700;
  line-height: 1.55;
}

.ai-writing-result.is-error {
  border-color: var(--rose);
  background: var(--rose-tint);
  color: var(--no-text);
}

.ai-writing-result[hidden] {
  display: none;
}

.placement-test {
  display: grid;
  gap: 16px;
}

.placement-test-list {
  display: grid;
  gap: 10px;
}

.placement-question {
  display: flex;
  gap: 11px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  border: 1px solid var(--lesson-frame-line);
  transition: border-color 0.14s var(--ease);
}

.placement-question[hidden],
.placement-page-button[hidden],
.placement-finish-button[hidden] {
  display: none !important;
}

.placement-question:focus-within {
  border-color: var(--clay);
}

.placement-question-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.placement-topic {
  width: fit-content;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-size: 0.72rem;
  font-weight: 900;
}

.placement-actions,
.practice-actions {
  display: grid;
  gap: 12px;
}

.practice-actions {
  margin-top: 14px;
}

.btn-check {
  justify-self: start;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--clay);
  color: var(--content);
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.14s var(--ease);
}

.btn-check:hover {
  background: var(--clay-hover);
}

.btn-ai-practice {
  justify-self: start;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--sage-line);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease);
}

.btn-ai-practice:hover {
  background: var(--surface-hover);
  border-color: var(--sage);
}

.btn-check:disabled {
  cursor: wait;
  opacity: 0.7;
}

.btn-ai-practice:disabled {
  cursor: wait;
  opacity: 0.72;
}

.ai-practice-result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--sage-line);
  border-radius: var(--r-md);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.ai-practice-result[hidden] {
  display: none;
}

.ai-practice-result.is-error {
  border-color: var(--rose);
  background: var(--rose-tint);
  color: var(--no-text);
  font-weight: 800;
}

.ai-practice-result h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.ai-practice-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ai-practice-list {
  display: grid;
  gap: 10px;
}

.ai-practice-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--content);
}

.ai-practice-item.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.ai-practice-item.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
}

.ai-practice-prompt {
  flex: 1;
  min-width: 0;
  line-height: 1.7;
}

.ai-practice-input {
  min-width: 140px;
  margin: 0 5px;
}

.ai-practice-check {
  margin-top: 2px;
}

.placement-pager {
  display: grid;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-md);
  background: var(--surface-soft);
}

.placement-page-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
}

.placement-page-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
}

.placement-page-button,
.placement-finish-button,
.placement-jump-button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.placement-page-button,
.placement-jump-button {
  border: 1px solid var(--clay-line);
  background: var(--lesson-frame);
  color: var(--clay-deep);
}

.placement-page-button:hover,
.placement-jump-button:hover {
  background: var(--clay-tint);
}

.placement-page-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.placement-finish-button {
  justify-self: auto;
}

.placement-page-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.placement-jump-button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.76rem;
}

.placement-jump-button.is-active {
  border-color: var(--sage);
  background: var(--sage);
  color: var(--content);
}

.placement-jump-result {
  border-color: var(--berry-line);
  background: var(--rose-tint);
  color: var(--no-text);
}

.placement-result {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--sage-line);
  background:
    radial-gradient(circle at top left, rgba(192, 135, 108, 0.16), transparent 34%),
    linear-gradient(135deg, var(--lesson-frame), var(--sage-tint));
  color: var(--sage-deep);
  font-weight: 700;
}

.practice-result {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--sage-line);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-weight: 700;
}

.placement-result[hidden],
.practice-result[hidden],
.practice-actions[hidden] {
  display: none;
}

.placement-result-title {
  display: grid;
  gap: 2px;
  padding-bottom: 2px;
}

.placement-result-title span {
  color: var(--clay-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

.placement-result-title strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.08;
}

.placement-topic-panel {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-md);
  background: rgba(250, 246, 234, 0.78);
}

.placement-topic-panel::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 72px;
  height: 42px;
  opacity: 0.16;
  background:
    radial-gradient(ellipse at 20% 80%, transparent 0 40%, var(--sage-deep) 41% 43%, transparent 44%),
    radial-gradient(ellipse at 42% 35%, var(--sage-deep) 0 16%, transparent 17%),
    radial-gradient(ellipse at 62% 50%, var(--sage-deep) 0 14%, transparent 15%),
    radial-gradient(ellipse at 80% 28%, var(--sage-deep) 0 12%, transparent 13%);
  pointer-events: none;
}

.placement-topic-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.placement-topic-panel-icon {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--sage-line);
  border-radius: 50%;
  background: var(--sage-tint);
}

.placement-topic-panel-icon::before,
.placement-topic-panel-icon::after {
  content: "";
  position: absolute;
  border-radius: 100% 0;
  background: var(--sage);
  transform: rotate(-35deg);
}

.placement-topic-panel-icon::before {
  left: 9px;
  top: 8px;
  width: 9px;
  height: 15px;
}

.placement-topic-panel-icon::after {
  left: 17px;
  top: 12px;
  width: 8px;
  height: 13px;
  opacity: 0.72;
  transform: rotate(35deg);
}

.placement-topic-panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.12;
}

.placement-topic-panel-head p {
  max-width: 520px;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.placement-topic-panel-review {
  border-color: var(--berry-line);
  background: rgba(251, 241, 223, 0.86);
}

.placement-topic-panel-review .placement-topic-panel-icon {
  border-color: var(--berry-line);
  background: var(--rose-tint);
}

.placement-topic-panel-review .placement-topic-panel-icon::before,
.placement-topic-panel-review .placement-topic-panel-icon::after {
  background: var(--rose);
}

.placement-topic-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: placement-topic;
}

.placement-topic-item {
  counter-increment: placement-topic;
}

.placement-topic-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid rgba(185, 180, 143, 0.72);
  border-radius: var(--r-sm);
  background: rgba(255, 249, 238, 0.82);
  color: var(--ink);
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), transform 0.14s var(--ease);
}

.placement-topic-link::before {
  content: counter(placement-topic);
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
}

a.placement-topic-link:hover {
  border-color: var(--clay);
  background: var(--lesson-frame);
  transform: translateY(-1px);
}

.placement-topic-name {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.2;
}

.placement-topic-details {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.placement-topic-badge {
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--sage);
  color: var(--content);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.placement-topic-panel-review .placement-topic-badge {
  background: var(--rose);
}

.placement-topic-empty {
  position: relative;
  z-index: 1;
  padding: 12px 14px;
  border: 1px dashed var(--clay-line);
  border-radius: var(--r-sm);
  background: rgba(255, 249, 238, 0.7);
  color: var(--ink-soft);
  font-weight: 800;
}

.placement-result-link {
  color: var(--clay-deep);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.placement-result-link:hover {
  color: var(--clay);
}

/* exercise tabs (flat) */
.exercise-tabs {
  display: grid;
  gap: 14px;
}

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

.exercise-tab {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame-soft);
  color: var(--ink-body);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.exercise-tab:hover {
  background: var(--surface-hover);
}

.exercise-tab.is-active {
  border-color: var(--clay);
  background: var(--clay);
  color: var(--content);
}

.exercise-tab.is-active .exercise-tab-subtitle {
  color: #faf6ea;
}

.exercise-tab-title {
  overflow-wrap: anywhere;
  font-weight: 900;
  line-height: 1.15;
}

.exercise-tab-subtitle {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.exercise-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.exercise-tab-panel[hidden] {
  display: none;
}

.practice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

.btn-clear {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--content);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.14s var(--ease);
}

.btn-clear:hover {
  background: var(--clay-tint);
}

.saved-hint {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.83rem;
}

/* pager */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.pager-btn {
  display: grid;
  gap: 2px;
  padding: 13px 18px;
  border-radius: var(--r-md);
  background: var(--content);
  border: 1px solid var(--lesson-frame-line);
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease);
}

.pager-btn.next {
  text-align: right;
}

.pager-btn:hover {
  background: var(--clay-tint);
  border-color: var(--clay-line);
}

.pager-dir {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--clay-deep);
}

.pager-label {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.88rem;
}

/* footer */
.page-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.page-foot span {
  font-family: var(--font-display);
  color: var(--clay-deep);
}

/* =====================================================================
   Account + progress
   ===================================================================== */
body.progress-page {
  background: var(--bg);
}

.account-page {
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  margin-top: var(--topbar-h);
  overflow: hidden;
  background: var(--bg);
}

.account-page-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 44px clamp(18px, 4vw, 52px) 68px;
}

.account-page-inner-wide {
  max-width: 1320px;
}

.account-hero {
  max-width: 620px;
  margin-bottom: 24px;
}

.account-hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1;
}

.account-hero p:last-child {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 700;
}

.account-card,
.account-profile,
.progress-list-section {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--content);
  box-shadow: none;
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  margin-bottom: 18px;
}

.account-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.account-entry-grid .account-card {
  align-items: stretch;
  flex-direction: column;
  margin-bottom: 0;
}

.account-login-options {
  display: grid;
  gap: 14px;
}

.account-login-option-title {
  margin: 0;
  color: var(--clay-deep);
  font-size: 0.86rem;
  font-weight: 900;
}

.account-section {
  margin-bottom: 24px;
}

.account-section-head {
  margin-bottom: 10px;
}

.account-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.1;
}

.account-section-head p:not(.account-card-kicker) {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.account-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 24px;
  padding: 24px;
  margin-bottom: 18px;
}

.account-profile-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.account-profile-main {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.account-photo {
  display: grid;
  flex: 0 0 auto;
  width: 142px;
  height: 142px;
  place-items: center;
  border: 1px solid var(--sage-line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(250, 246, 234, 0.92) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--sage-tint), var(--rose-tint));
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-size: 3.7rem;
  font-weight: 600;
  text-transform: uppercase;
  overflow: hidden;
}

.account-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-profile-copy {
  min-width: 0;
}

.account-profile-copy h2 {
  overflow-wrap: anywhere;
}

.account-profile-copy h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.account-profile-note {
  max-width: 320px;
}

.account-profile-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.account-profile-progress div {
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.account-profile-progress strong {
  display: block;
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.account-profile-progress span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-private-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.account-private-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 900;
}

.account-private-row span {
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-private-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  text-align: right;
}

.account-settings-card {
  align-items: stretch;
}

.account-settings-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--content);
}

.account-settings-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.account-settings-summary > div:last-child {
  min-width: 0;
}

.account-photo-mini {
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--sage-line);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-tint), var(--rose-tint));
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.account-photo-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-settings-summary h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.account-settings-summary p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.anki-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--content);
}

.anki-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.anki-panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
}

.anki-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame-soft);
}

.anki-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.anki-list {
  display: grid;
  gap: 10px;
}

.anki-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.anki-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.anki-card-picture {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background: rgba(250, 246, 234, 0.92);
}

.anki-card-word {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.anki-card-translation {
  margin: 0;
  color: var(--sage-deep);
  font-weight: 900;
  line-height: 1.35;
}

.anki-card-phrase {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-weight: 800;
  line-height: 1.4;
}

.anki-card-phrase-translation {
  margin: 0;
  color: var(--sage-deep);
  font-weight: 800;
  line-height: 1.4;
}

.anki-card-date {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.anki-card-remove {
  flex: 0 0 auto;
}

.todo-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--content);
}

.todo-create-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}

.todo-create-panel h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
}

.todo-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.5fr) auto auto;
  gap: 10px;
  align-items: center;
}

.todo-style-picker,
.todo-list-style {
  position: relative;
}

.todo-style-picker summary,
.todo-list-style summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-pill);
  background: var(--lesson-frame-soft);
  color: var(--clay-deep);
  font-size: 0.78rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.todo-style-picker summary::-webkit-details-marker,
.todo-list-style summary::-webkit-details-marker {
  display: none;
}

.todo-style-picker-body,
.todo-list-style-body {
  display: grid;
  gap: 8px;
  min-width: 250px;
  max-width: min(340px, calc(100vw - 40px));
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--content);
  box-shadow: 0 14px 28px rgba(84, 65, 46, 0.13);
}

.todo-style-picker-body {
  position: absolute;
  right: 0;
  z-index: 30;
}

.todo-decoration-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.todo-emoji-group {
  gap: 5px;
}

.todo-decoration-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.todo-decoration-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-pill);
  background: var(--content);
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.todo-decoration-option input:checked + .todo-decoration-swatch {
  border-color: var(--sage);
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.todo-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-summary-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-pill);
  background: var(--lesson-frame-soft);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.todo-summary-row strong {
  margin-right: 5px;
  color: var(--sage-deep);
}

.todo-save-status {
  color: var(--muted) !important;
}

.todo-period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 14px;
}

.todo-period-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame-soft);
}

.todo-period-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.todo-period-head .account-card-kicker {
  margin: 0;
}

.todo-period-head span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--content);
  color: var(--clay-deep);
  font-weight: 900;
}

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

.todo-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--clay-line);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.todo-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-sm);
  background: var(--content);
}

.todo-theme-sage { border-color: var(--sage-line); background: #f6f4e8; }
.todo-theme-clay { border-color: #cfad96; background: #fff5ec; }
.todo-theme-honey { border-color: #d8c79a; background: #fff8df; }
.todo-theme-rose { border-color: #d9b9ad; background: #fff2ef; }

.todo-list-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.todo-list-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 50%;
  background: var(--lesson-frame-soft);
  color: var(--sage-deep);
  font-size: 1.25rem;
  font-weight: 900;
}

.todo-list-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.todo-list-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.todo-remove {
  width: 28px;
  height: 28px;
  border: 1px solid var(--clay-line);
  border-radius: 50%;
  background: var(--content);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.todo-remove:hover {
  color: var(--sage-deep);
  border-color: var(--sage-line);
}

.todo-task-list {
  display: grid;
  gap: 6px;
}

.todo-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
  border-radius: var(--r-xs);
  background: rgba(250, 246, 234, 0.74);
  color: var(--ink-soft);
  font-weight: 800;
  line-height: 1.3;
}

.todo-task input {
  margin-top: 2px;
  accent-color: var(--sage);
}

.todo-task span {
  overflow-wrap: anywhere;
}

.todo-task.is-done span {
  color: var(--muted);
  text-decoration: line-through;
}

.todo-task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.todo-task-form .account-input {
  min-height: 38px;
  border-radius: var(--r-sm);
  font-size: 0.84rem;
}

.todo-task-form .account-secondary {
  min-height: 38px;
  padding: 0 12px;
}

.todo-list-decor {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.todo-list-style {
  justify-self: start;
}

.todo-list-emojis {
  padding-top: 2px;
}

.todo-list-decor button {
  min-height: 28px;
  min-width: 30px;
  padding: 0 9px;
  border: 1px solid var(--clay-line);
  border-radius: var(--r-pill);
  background: rgba(250, 246, 234, 0.72);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.todo-list-decor button:hover {
  border-color: var(--sage-line);
  color: var(--sage-deep);
}

.account-settings-card > div:first-child {
  flex: 0 1 310px;
}

.account-settings-forms {
  display: grid;
  flex: 1 1 520px;
  gap: 14px;
}

.account-mini-form {
  display: grid;
  gap: 8px;
}

.account-file-input {
  padding-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-file-input::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-family: var(--font-body);
  font-weight: 900;
  cursor: pointer;
}

.account-card-kicker {
  margin: 0 0 5px;
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.account-card h2,
.account-profile h2,
.progress-list-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
}

.account-card p:not(.account-card-kicker):not(.account-error):not(.account-message),
.account-profile p:not(.account-card-kicker):not(.account-error):not(.account-message) {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.account-form {
  flex: 1 1 420px;
  max-width: 520px;
}

.account-form-fields {
  display: grid;
  gap: 8px;
}

.account-label {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-form-row {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.account-input {
  width: 100%;
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--content);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  outline: none;
}

.account-input:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(138, 138, 101, 0.18);
}

.account-primary,
.account-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.account-primary {
  border: 1px solid var(--sage);
  background: var(--sage);
  color: var(--content);
}

.account-primary:hover {
  background: var(--sage-hover);
}

.account-primary:disabled,
.account-primary.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.account-secondary {
  border: 1px solid var(--clay-line);
  background: var(--clay-tint);
  color: var(--clay-deep);
}

.account-secondary:hover {
  background: var(--section-active-tint);
}

.account-error {
  margin: 0 0 10px;
  color: var(--no-text);
  font-weight: 900;
}

.account-message {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-weight: 900;
  line-height: 1.35;
}

.account-message-error {
  border: 1px solid var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.account-message-success {
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-text);
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.progress-stat {
  display: grid;
  gap: 4px;
  min-height: 112px;
  align-content: center;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--content);
}

.progress-stat-value {
  color: var(--clay-deep);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1;
}

.progress-stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.progress-list-section {
  padding: 18px;
}

.progress-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 16px;
}

.progress-list {
  display: grid;
  gap: 8px;
}

.progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), transform 0.14s var(--ease);
}

.progress-item:hover {
  background: var(--content);
  border-color: var(--clay-line);
  transform: translateY(-1px);
}

.progress-item.is-started {
  background: var(--sage-tint);
  border-color: var(--sage-line);
}

.progress-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.progress-item-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.progress-item-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.progress-item-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.progress-item-state,
.progress-item-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.progress-item-state {
  background: var(--content);
  color: var(--muted);
}

.progress-item.is-started .progress-item-state {
  background: var(--clay);
  color: var(--content);
}

.progress-item-count {
  background: var(--content);
  color: var(--clay-deep);
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1024px) {
  .topbar {
    position: sticky;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
  }

  .sidebar-inner {
    height: auto;
    padding: 12px 14px;
  }

  .course-nav {
    max-height: 46vh;
  }

  .page {
    margin-left: 0;
    margin-top: 0;
  }

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

  .todo-create-form {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 0.5fr);
  }
}

@media (max-width: 640px) {
  .compound-drag-banks {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.08rem;
  }

  .topic-search {
    flex-basis: 130px;
    min-width: 0;
  }

  .topic-search-input {
    height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .topic-search-results {
    position: fixed;
    top: calc(var(--topbar-h) + 6px);
    left: 12px;
    right: 12px;
    max-height: min(360px, calc(100vh - var(--topbar-h) - 18px));
  }

  .language-switch {
    gap: 4px;
    padding: 3px;
  }

  .language-option {
    min-width: 38px;
    min-height: 32px;
    padding: 7px 9px;
    font-size: 0.72rem;
  }

  .language-option-name {
    display: none;
  }

  .language-option-short {
    display: inline;
  }

  .account-menu summary {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .account-menu summary::after {
    width: 5px;
    height: 5px;
    margin-left: 6px;
  }

  .account-menu-list {
    min-width: 142px;
  }

  .account-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .progress-topbar-actions {
    gap: 6px;
  }

  .placement-result {
    padding: 12px;
  }

  .placement-topic-panel {
    padding: 12px;
  }

  .placement-topic-panel::after {
    opacity: 0.1;
  }

  .placement-topic-link {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 7px 9px;
  }

  .placement-topic-details,
  .placement-topic-badge {
    grid-column: 2;
    justify-self: start;
  }

  .placement-pager {
    gap: 10px;
  }

  .placement-page-controls {
    justify-content: stretch;
    justify-self: stretch;
  }

  .placement-page-button,
  .placement-finish-button {
    flex: 1 1 0;
    padding-inline: 10px;
  }

  .placement-page-jump {
    gap: 6px;
  }

  .placement-jump-button {
    flex: 1 1 calc(50% - 6px);
    padding-inline: 8px;
  }

  .account-page-inner {
    padding: 24px 12px 44px;
  }

  .account-card {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .account-entry-grid {
    grid-template-columns: 1fr;
  }

  .account-profile {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }

  .account-photo {
    width: 112px;
    height: 112px;
    font-size: 3rem;
  }

  .account-settings-panel {
    gap: 12px;
    padding: 14px;
  }

  .account-settings-summary {
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .account-photo-mini {
    width: 52px;
    height: 52px;
    font-size: 1.45rem;
  }

  .account-profile-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-private-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .account-private-row strong {
    text-align: left;
  }

  .account-form-row {
    flex-direction: column;
    gap: 8px;
  }

  .account-input,
  .account-primary,
  .account-secondary {
    min-height: 42px;
    border-radius: var(--r-sm);
  }

  .account-file-input {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .account-file-input::file-selector-button {
    margin-right: 7px;
    padding: 6px 8px;
    border-radius: var(--r-xs);
  }

  .account-primary,
  .account-secondary,
  .account-secondary-link {
    width: 100%;
  }

  .progress-stats {
    grid-template-columns: 1fr;
  }

	  .progress-list-head,
	  .progress-item {
	    align-items: stretch;
	    flex-direction: column;
	  }

	  .anki-panel-head,
	  .anki-empty,
	  .anki-card {
	    align-items: stretch;
	    flex-direction: column;
	  }

	  .todo-create-panel,
	  .todo-create-form,
	  .todo-period-grid,
	  .todo-task-form {
	    grid-template-columns: 1fr;
	  }

	  .progress-item-side {
    justify-items: start;
  }

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

  .formula-card {
    grid-template-columns: 1fr;
  }

  .sort-column-grid {
    grid-template-columns: 1fr;
  }

  .exercise-tab-list {
    grid-template-columns: 1fr;
  }

  .scheme-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .poster-cols.cols-3 {
    grid-template-columns: 1fr;
  }

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

  .pager-btn.next {
    text-align: left;
  }

  .matching-lines {
    gap: 28px;
  }

  .match-card {
    min-height: 42px;
    padding: 9px;
  }

  .picture-drag-grid {
    grid-template-columns: 1fr;
  }

  .question-illustration {
    width: 112px;
  }
}

@media (max-width: 440px) {
  .brand-name {
    display: none;
  }

  .topbar-inner {
    gap: 8px;
  }

  .language-option {
    min-width: 34px;
    padding-inline: 8px;
  }

  .topic-search {
    display: none;
  }

  .account-menu summary {
    padding-inline: 9px;
  }

  .account-link {
    padding-inline: 9px;
  }

  .account-page-inner {
    padding-inline: 10px;
  }

  .account-settings-panel {
    padding: 12px;
  }

  .account-settings-summary {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   Resource pages
   ===================================================================== */
.resource-page {
  background: var(--bg);
}

.resource-main {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 42px) 20px 64px;
  overflow: hidden;
}

.vocabulary-page { --vocab-topic-w: clamp(236px, 19vw, 268px); }

.vocabulary-shell {
  min-height: 100vh;
}

.vocabulary-shell .resource-main {
  margin-left: var(--vocab-topic-w);
  padding-left: clamp(30px, 4vw, 58px);
  padding-right: clamp(26px, 5vw, 70px);
}

.vocab-topic-panel {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 3;
  width: var(--vocab-topic-w);
  padding: 14px 8px 8px;
  border-right: 1px solid var(--line-strong);
  background-color: var(--frame);
  color: var(--frame-ink);
}

.vocab-topic-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0 6px 10px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 95, 70, 0.35) transparent;
}

.vocab-topic-panel .level-topic-list {
  flex: none;
  align-content: start;
  justify-items: start;
}

.vocab-topic-panel .level-topic-link {
  grid-template-columns: 28px minmax(0, 1fr);
  width: min(218px, 100%);
  min-height: 38px;
  gap: 9px;
  padding: 5px 9px;
  border-radius: var(--r-sm);
}

.vocab-topic-panel .level-topic-num {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.vocab-topic-panel .level-topic-title {
  font-size: 0.9rem;
}

.vocab-topic-panel .level-topic-sub {
  display: none;
}

.vocab-topic-panel .level-topic-count {
  display: none;
}

.routine-phrase-lookup,
.vocab-prompt-lookup {
  font-weight: inherit;
}

.vocab-mini-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.resource-hero,
.resource-card,
.resource-message {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-inline: auto;
}

.vocabulary-page .resource-hero,
.vocabulary-page .resource-card,
.vocabulary-page .resource-message,
.vocabulary-page .vocab-lesson-section,
.vocabulary-page .vocab-choice-row,
.vocabulary-page .vocab-pager {
  max-width: 920px;
}

.vocabulary-page .resource-card {
  padding: 20px;
}

.vocabulary-page [hidden] {
  display: none !important;
}

.vocabulary-page .vocab-choice-row {
  margin: -8px auto 16px;
}

.vocab-learn-before {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  width: min(100%, 920px);
  margin: 0 auto 24px;
  padding: 12px 14px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.62);
}

.vocab-learn-before .resource-kicker {
  margin: 0;
  color: var(--olive);
}

.vocab-learn-before .family-grammar-links {
  gap: 7px;
}

.vocab-learn-before .family-grammar-link {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.68rem;
}

.resource-hero {
  margin-bottom: 22px;
}

.resource-hero h1 {
  margin-top: 6px;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
}

.resource-hero p:last-child {
  max-width: 620px;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.vocab-topic-card {
  margin-bottom: 14px;
}

.vocab-lesson-section {
  position: relative;
  z-index: 1;
  margin: 18px auto 0;
}

.vocab-subsection-head {
  max-width: 720px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(114, 126, 91, 0.22);
}

.vocab-subsection-head h2 {
  margin-top: 4px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.vocab-section-head {
  margin-bottom: 12px;
}

.vocab-section-head h2,
.vocab-section-head h3 {
  margin-top: 4px;
  font-size: 1.3rem;
}

.vocab-section-link {
  color: inherit;
  text-decoration: none;
}

.vocab-section-link:hover {
  color: var(--clay-deep);
}

.vocab-note {
  max-width: 720px;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-weight: 800;
}

.family-empty-practice-card {
  min-height: 180px;
}

.closed-syllable-page {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.closed-syllable-stage {
  position: relative;
  display: grid;
  align-items: center;
  width: min(100%, 720px);
  padding-inline: 46px;
}

.closed-syllable-card {
  display: grid;
  gap: 8px;
  width: min(100%, 600px);
  margin-inline: auto;
}

.closed-syllable-card[hidden] {
  display: none;
}

.closed-syllable-head {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.72);
}

.closed-syllable-vowel {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.closed-syllable-sound {
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.closed-syllable-sound-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.closed-syllable-sound-group .closed-syllable-sound {
  padding: 3px 6px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: 999px;
  background: rgba(250, 246, 234, 0.62);
}

.closed-syllable-picture {
  position: relative;
  overflow: hidden;
  width: min(100%, 570px);
  justify-self: center;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.closed-syllable-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.closed-syllable-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.closed-syllable-word {
  appearance: none;
  position: absolute;
  left: var(--closed-word-x);
  top: var(--closed-word-y);
  z-index: 1;
  min-width: clamp(54px, 7vw, 94px);
  max-width: 30%;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.86);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.56rem, 0.82vw, 0.68rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.closed-syllable-word:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.closed-syllable-word:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.closed-syllable-arrow {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 50px;
  border: 1px solid rgba(114, 126, 91, 0.3);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.9);
  color: var(--sage-deep);
  box-shadow: 0 8px 18px rgba(84, 65, 46, 0.08);
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.closed-syllable-arrow:hover {
  border-color: rgba(114, 126, 91, 0.5);
  background: rgba(250, 246, 234, 0.98);
  color: var(--clay-deep);
}

.closed-syllable-arrow:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.closed-syllable-arrow-prev {
  left: 0;
}

.closed-syllable-arrow-next {
  right: 0;
}

.closed-syllable-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.closed-syllable-dot {
  appearance: none;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(114, 126, 91, 0.26);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.72);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.closed-syllable-dot.is-active {
  border-color: rgba(96, 106, 76, 0.48);
  background: var(--sage);
  color: var(--content);
}

.family-grammar-card {
  display: grid;
  gap: 12px;
}

.family-grammar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.family-grammar-link {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-xs);
  background: rgba(255, 252, 245, 0.82);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
}

.family-grammar-link:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.family-tree-vocab-card {
  padding: clamp(14px, 2.4vw, 24px);
}

.family-tree-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.12fr) minmax(230px, 0.58fr);
  align-items: start;
  gap: clamp(14px, 2vw, 22px);
}

.family-tree-picture {
  position: relative;
  width: min(100%, 610px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.family-tree-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.family-tree-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.family-tree-label {
  appearance: none;
  position: absolute;
  left: var(--family-label-left);
  top: var(--family-label-top);
  z-index: 1;
  width: clamp(66px, 10vw, 106px);
  min-height: 34px;
  padding: 4px 7px;
  border: 1px solid rgba(114, 126, 91, 0.3);
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.46rem, 1.05vw, 0.58rem);
  font-weight: 900;
  letter-spacing: 0.045em;
  line-height: 1.08;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.family-name-practice {
  display: grid;
  gap: 10px;
  align-content: start;
}

.family-name-exercise-list {
  display: grid;
  gap: 7px;
}

.family-name-card {
  align-items: flex-start;
  padding: 9px;
}

.family-name-card .exercise-number {
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
}

.family-name-card .exercise-body {
  gap: 7px;
}

.family-name-card .exercise-prompt {
  font-size: 0.78rem;
  line-height: 1.25;
}

.family-name-card .blank-full {
  min-height: 34px;
  font-size: 0.76rem;
}

.family-to-be-practice {
  display: grid;
  gap: 10px;
  margin-top: clamp(16px, 2.2vw, 24px);
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.family-to-be-practice .vocab-note {
  margin: 0;
}

.family-exercise-pages {
  display: grid;
  gap: 12px;
  margin-top: clamp(16px, 2.2vw, 24px);
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.family-exercise-tabs {
  width: 100%;
  max-width: 100%;
}

.family-exercise-pages .family-to-be-practice {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.family-final-practice-pages {
  width: min(100%, 920px);
  margin-inline: auto;
}

.family-final-practice-pages > .resource-card {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}

.family-final-practice-pages .vocab-exercise-tabs {
  box-sizing: border-box;
}

.family-final-practice-pages .vocab-exercise-tab {
  flex: 1 1 150px;
  min-width: 0;
  line-height: 1.15;
  white-space: normal;
}

.family-final-practice-pages .exercise-prompt {
  overflow-wrap: anywhere;
}

.family-exercise-grammar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.family-to-be-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.family-to-be-card {
  align-items: flex-start;
}

.family-to-be-card .drag-gap-prompt {
  line-height: 1.45;
}

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

.family-choice-card {
  align-items: flex-start;
}

.family-choice-card .exercise-body {
  gap: 9px;
}

.family-choice-card .exercise-prompt {
  line-height: 1.35;
}

.family-sentence-grid {
  display: grid;
  gap: 10px;
}

.family-sentence-card {
  align-items: flex-start;
}

.family-sentence-card .exercise-body {
  gap: 10px;
}

.family-sentence-bank,
.family-sentence-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.family-sentence-bank {
  padding: 9px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-sm);
  background: rgba(229, 225, 199, 0.22);
}

.family-sentence-token {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 0.82rem;
}

.family-sentence-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 36px;
  padding: 3px;
  border: 1px dashed rgba(114, 126, 91, 0.42);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.82);
  cursor: pointer;
}

.family-sentence-slot.is-over {
  border-color: var(--clay);
  background: var(--clay-tint);
}

.family-sentence-slot .family-sentence-token {
  width: 100%;
  min-height: 28px;
}

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

.family-possessive-examples article {
  padding: 11px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.78);
}

.family-possessive-examples p {
  display: grid;
  gap: 5px;
  margin: 0;
}

.family-possessive-examples .resource-kicker {
  margin-bottom: 7px;
}

.family-possessive-examples span,
.family-word-prompt {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.family-possessive-examples strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

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

.family-possessive-card {
  align-items: flex-start;
}

.family-possessive-card .exercise-body {
  gap: 8px;
}

.family-possessive-card .answer-line {
  min-height: 38px;
}

.family-final-gap-mark {
  display: inline-block;
  margin-inline: 0.28em;
  color: var(--sage-deep);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.people-vocab-card {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  padding: clamp(14px, 2.4vw, 24px);
}

.people-picture {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.people-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.people-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.people-picture-label {
  appearance: none;
  position: absolute;
  left: var(--people-label-left);
  top: var(--people-label-top);
  z-index: 1;
  min-width: clamp(62px, 10vw, 96px);
  max-width: 116px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.54rem, 1.15vw, 0.68rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.people-picture-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.people-picture-label:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.people-picture-practice {
  display: grid;
  gap: 12px;
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

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

.people-picture-practice-card {
  align-items: stretch;
}

.people-picture-practice-card .exercise-body {
  gap: 9px;
}

.people-picture-thumb {
  width: 100%;
  max-width: 168px;
  margin: 0 auto;
  aspect-ratio: 1307 / 1203;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--people-crop-x, 50%) var(--people-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 300% 300%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.colors-vocab-card {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  padding: clamp(14px, 2.4vw, 24px);
}

.colors-picture {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.colors-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.colors-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.colors-picture-label {
  appearance: none;
  position: absolute;
  left: var(--colors-label-left);
  top: var(--colors-label-top);
  z-index: 1;
  min-width: clamp(64px, 8vw, 96px);
  max-width: 112px;
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.52rem, 1vw, 0.66rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.colors-picture-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.colors-picture-label:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.colors-picture-practice {
  display: grid;
  gap: 12px;
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.colors-picture-practice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.colors-picture-practice-card {
  align-items: stretch;
}

.colors-picture-practice-card .exercise-body {
  gap: 9px;
}

.colors-picture-thumb {
  display: block;
  width: 100%;
  max-width: 116px;
  margin: 0 auto;
  aspect-ratio: 701 / 748;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--colors-crop-x, 50%) var(--colors-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 400% 300%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.colors-sound-match {
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1fr);
  gap: 48px;
}

.colors-sound-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
  min-height: 58px;
  align-items: center;
}

.colors-sound-card .vocab-feedback {
  grid-column: 1 / -1;
}

.colors-sound-listen {
  justify-self: start;
}

.colors-picture-match-card {
  justify-content: center;
  min-height: 76px;
  padding: 6px;
}

.colors-match-thumb {
  width: min(100%, 68px);
  max-width: 68px;
}

.colors-picture-match-card.is-used {
  opacity: 0.58;
}

.body-parts-vocab-card {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  padding: clamp(14px, 2.4vw, 24px);
}

.body-parts-picture-slider {
  display: grid;
  gap: 10px;
}

.body-parts-picture-stage {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
}

.body-parts-picture {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.body-parts-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.body-parts-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.body-parts-picture-label {
  appearance: none;
  position: absolute;
  left: var(--body-label-left);
  top: var(--body-label-top);
  z-index: 1;
  min-width: clamp(62px, 7vw, 94px);
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.5rem, 0.82vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.body-parts-picture-label:hover,
.body-parts-picture-label:focus-visible {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
  outline: none;
}

.body-parts-picture-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.body-parts-picture-dot {
  appearance: none;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.7);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.body-parts-picture-dot.is-active {
  border-color: rgba(114, 126, 91, 0.58);
  background: rgba(114, 126, 91, 0.16);
  color: var(--sage-deep);
}

.body-parts-exercise-pages {
  width: min(100%, 940px);
  margin-inline: auto;
}

.body-parts-practice-card {
  gap: 14px;
}

.body-parts-crop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.body-parts-crop-card {
  align-items: stretch;
}

.body-parts-crop-card .exercise-body {
  gap: 9px;
}

.body-parts-thumb {
  display: block;
  width: 100%;
  max-width: 118px;
  margin: 0 auto;
  aspect-ratio: 298 / 528;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--body-crop-x, 50%) var(--body-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 500% 200%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.body-parts-sound-match {
  grid-template-columns: minmax(126px, 0.52fr) minmax(0, 1fr);
  gap: 36px;
}

.body-parts-sound-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 6px;
  min-height: 46px;
  padding: 7px;
  align-items: center;
}

.body-parts-sound-card .vocab-feedback {
  grid-column: 1 / -1;
}

.body-parts-picture-match-card {
  justify-content: center;
  min-height: 106px;
  padding: 6px;
}

.body-parts-match-thumb {
  width: min(100%, 64px);
  max-width: 64px;
}

.body-parts-picture-match-card.is-used {
  opacity: 0.58;
}

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

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

.body-appearance-dialogue-practice .drag-bank {
  background: rgba(229, 225, 199, 0.24);
}

.body-appearance-example {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.body-appearance-example span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.body-appearance-example p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.body-appearance-example strong {
  color: var(--ink);
}

.body-appearance-dialogue-practice .greetings-dialogue-lines {
  gap: 6px;
}

.body-appearance-dialogue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  padding: 9px 12px;
}

.body-appearance-dialogue-prompt {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 0;
  line-height: 1.35;
}

.body-appearance-dialogue-row {
  border-radius: var(--r-sm);
}

.body-appearance-dialogue-prompt .drag-gap-nowrap {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.body-appearance-dialogue-prompt .drag-drop {
  min-width: 108px;
  margin: 0;
}

.body-appearance-question-match {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(22px, 4vw, 48px);
}

.body-appearance-question-card,
.body-appearance-answer-card {
  align-items: center;
  min-height: 56px;
  line-height: 1.32;
}

.body-appearance-question-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
}

.body-appearance-question-card .vocab-feedback {
  grid-column: 1 / -1;
}

.body-appearance-answer-card {
  justify-content: flex-start;
  padding: 10px 12px;
  text-align: left;
}

.body-appearance-describe-card {
  width: min(100%, 1040px);
}

.body-appearance-describe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.72fr);
  gap: clamp(14px, 2.4vw, 24px);
  align-items: start;
}

.body-appearance-picture {
  position: relative;
  width: min(100%, 520px);
  margin: 0;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.76);
}

.body-appearance-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.body-appearance-number-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.body-appearance-number {
  position: absolute;
  left: var(--appearance-number-x);
  top: var(--appearance-number-y);
  display: grid;
  place-items: center;
  width: clamp(24px, 3vw, 34px);
  height: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(114, 126, 91, 0.5);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.92);
  color: var(--sage-deep);
  box-shadow: 0 8px 18px rgba(74, 59, 50, 0.12);
  font-family: var(--font-ui);
  font-size: clamp(0.66rem, 1vw, 0.82rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: translate(-50%, -50%);
}

.body-appearance-writing {
  display: grid;
  gap: 9px;
}

.body-appearance-people-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.68);
}

.body-appearance-people-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.body-appearance-people-list strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(114, 126, 91, 0.36);
  border-radius: 999px;
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
}

.body-appearance-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-sm);
  background: rgba(229, 225, 199, 0.2);
}

.body-appearance-word-bank span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.84);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.body-appearance-word-bank span:nth-child(3n + 2) {
  border-color: rgba(201, 129, 107, 0.26);
  color: var(--clay-deep);
}

.body-appearance-word-bank span:nth-child(3n) {
  border-color: rgba(126, 128, 104, 0.28);
  color: var(--muted);
}

.body-appearance-writing-field {
  display: grid;
  gap: 5px;
}

.body-appearance-writing-field span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.animals-vocab-card {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  padding: clamp(14px, 2.4vw, 24px);
}

.animals-picture-slider {
  display: grid;
  gap: 10px;
}

.animals-picture-stage {
  position: relative;
  width: min(100%, 620px);
  margin: 0 auto;
}

.animals-picture {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.animals-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.animals-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.animals-picture-label {
  appearance: none;
  position: absolute;
  left: var(--animals-label-left);
  top: var(--animals-label-top);
  z-index: 1;
  min-width: clamp(62px, 8vw, 104px);
  max-width: 118px;
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.5rem, 0.95vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.animals-picture-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.animals-picture-label:focus-visible,
.animals-picture-arrow:focus-visible,
.animals-picture-dot:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.animals-picture-arrow {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 52px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.92);
  color: var(--sage-deep);
  box-shadow: 0 8px 18px rgba(84, 65, 46, 0.1);
  font-family: var(--font-ui);
  font-size: 1.65rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.animals-picture-arrow:hover {
  border-color: rgba(114, 126, 91, 0.5);
  background: rgba(250, 246, 234, 0.98);
  color: var(--clay-deep);
}

.animals-picture-arrow-prev {
  left: -13px;
}

.animals-picture-arrow-next {
  right: -13px;
}

.animals-picture-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.animals-picture-dot {
  appearance: none;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(114, 126, 91, 0.26);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.72);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.animals-picture-dot.is-active {
  border-color: rgba(96, 106, 76, 0.48);
  background: var(--sage);
  color: var(--content);
}

.animals-picture-practice {
  display: grid;
  gap: 12px;
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.animals-exercise-pages {
  display: grid;
  gap: 12px;
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.animals-exercise-pages .animals-picture-practice {
  padding-top: 0;
  border-top: 0;
}

.animals-picture-practice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.animals-picture-practice-card {
  align-items: stretch;
}

.animals-picture-practice-card .exercise-body {
  gap: 9px;
}

.animals-picture-thumb {
  display: block;
  width: 100%;
  max-width: 112px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--animals-crop-x, 50%) var(--animals-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 400% 300%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.animal-sort-bank {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.animal-sort-token {
  grid-template-rows: 84px auto minmax(0, auto);
  gap: 5px;
  min-height: 122px;
  padding: 5px;
}

.animal-sort-thumb {
  max-width: 96px;
}

.animal-sort-token strong {
  font-size: 0.72rem;
  line-height: 1.08;
}

.animals-sound-match {
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1fr);
  gap: 48px;
}

.animals-sound-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
  min-height: 58px;
  align-items: center;
}

.animals-sound-card .vocab-feedback {
  grid-column: 1 / -1;
}

.animals-sound-listen {
  justify-self: start;
}

.animals-picture-match-card {
  justify-content: center;
  min-height: 74px;
  padding: 6px;
}

.animals-match-thumb {
  width: min(100%, 74px);
  max-width: 74px;
}

.animals-picture-match-card.is-used {
  opacity: 0.58;
}

.emotions-vocab-card {
  justify-items: center;
}

.emotions-picture-slider,
.emotions-exercise-pages {
  width: 100%;
}

.emotions-picture-stage {
  width: min(100%, 560px);
}

.emotions-picture-label {
  min-width: clamp(64px, 7vw, 94px);
  max-width: 108px;
}

.emotions-picture-thumb {
  aspect-ratio: 2 / 3;
  max-width: 96px;
  background-size: 400% 200%;
}

.emotions-sort-token {
  grid-template-rows: 112px auto minmax(0, auto);
  min-height: 154px;
}

.emotions-sort-thumb {
  max-width: 76px;
}

.emotions-picture-match-card {
  min-height: 110px;
}

.emotions-match-thumb {
  width: min(100%, 64px);
  max-width: 64px;
}

.basic-picture-vocab-card {
  display: grid;
  gap: clamp(14px, 1.8vw, 20px);
  padding: clamp(14px, 2.4vw, 24px);
}

.basic-picture-vocab {
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.basic-picture-vocab-wide {
  width: min(100%, 640px);
}

.basic-picture-vocab-square {
  width: min(100%, 460px);
}

.basic-picture-vocab-tall {
  width: min(100%, 340px);
}

.basic-picture-vocab img {
  display: block;
  width: 100%;
  height: auto;
}

.basic-word-chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  max-width: 680px;
  margin: 0 auto;
}

.basic-word-chip {
  min-height: 30px;
  padding: 5px 11px;
  border-color: rgba(114, 126, 91, 0.28);
  background: rgba(255, 252, 245, 0.82);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.months-vocab-card {
  gap: clamp(12px, 1.7vw, 18px);
}

.months-picture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 18px);
  justify-items: center;
  max-width: 700px;
  margin: 0 auto;
}

.months-picture {
  position: relative;
  width: min(100%, 320px);
}

.months-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.month-picture-label {
  appearance: none;
  position: absolute;
  left: var(--month-label-left);
  top: var(--month-label-top);
  z-index: 1;
  min-width: clamp(70px, 8vw, 104px);
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.93);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.5rem, 0.95vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.month-picture-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.month-picture-label:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.months-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.months-choice-card,
.months-next-card {
  align-items: stretch;
}

.months-choice-card .exercise-body,
.months-next-card .exercise-body {
  gap: 9px;
}

.months-choice-thumb {
  display: block;
  width: 100%;
  max-width: 112px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--month-crop-x, 50%) var(--month-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 200% 300%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.objects-vocab-card {
  justify-items: center;
}

.basic-actions-vocab-card {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.basic-actions-picture {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.basic-actions-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.basic-actions-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.basic-actions-label {
  appearance: none;
  position: absolute;
  left: var(--action-label-left);
  top: var(--action-label-top);
  z-index: 1;
  min-width: 74px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.88);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: pointer;
}

.basic-actions-practice {
  width: 100%;
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.basic-actions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.basic-actions-card .exercise-body {
  gap: 8px;
}

.basic-actions-thumb {
  display: block;
  width: 100%;
  max-width: 132px;
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--action-crop-x, 50%) var(--action-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 400% 200%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.basic-actions-exercise-pages {
  width: min(100%, 880px);
  margin-inline: auto;
}

.basic-actions-practice-card {
  display: grid;
  gap: 14px;
}

.basic-actions-examples {
  padding-block: 10px;
}

.basic-actions-sound-match {
  grid-template-columns: minmax(130px, 0.52fr) minmax(0, 1fr);
  gap: 34px;
}

.basic-actions-sound-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 6px;
  min-height: 46px;
  padding: 7px;
  align-items: center;
}

.basic-actions-sound-card .vocab-feedback {
  grid-column: 1 / -1;
}

.basic-actions-picture-match-card {
  justify-content: center;
  min-height: 104px;
  padding: 6px;
}

.basic-actions-match-thumb {
  width: min(100%, 72px);
  max-width: 72px;
}

.basic-actions-picture-match-card.is-used {
  opacity: 0.58;
}

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

.basic-actions-imperative-card {
  align-items: stretch;
}

.basic-actions-imperative-card .exercise-body {
  gap: 8px;
}

.basic-actions-imperative-card .basic-actions-thumb {
  max-width: 88px;
}

.basic-actions-sign-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.basic-actions-sign {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(114, 126, 91, 0.3);
  border-radius: 50%;
  background: rgba(250, 246, 234, 0.88);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.basic-actions-sign.is-negative {
  color: #9A5E48;
}

.basic-actions-imperative-input {
  text-align: center;
}

.a1-actions-vocab-card {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
}

.a1-actions-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 800px);
  margin-inline: auto;
}

.a1-action-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.78);
}

.a1-actions-picture {
  display: block;
  width: 100%;
  aspect-ratio: var(--a1-action-ratio, 4 / 3);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--a1-action-crop-x, 50%) var(--a1-action-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: var(--a1-action-size-x, 200%) var(--a1-action-size-y, 200%);
}

.a1-actions-picture-tall {
  aspect-ratio: 2 / 3;
}

.a1-action-caption {
  display: grid;
  align-content: end;
  min-height: 94px;
  padding: 8px 9px 10px;
  border-top: 1px solid rgba(114, 126, 91, 0.18);
  background: rgba(255, 252, 245, 0.9);
}

.a1-action-caption h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.12;
}

.a1-action-caption p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.a1-action-caption .routine-listen {
  justify-self: start;
}

.a1-actions-exercises {
  display: grid;
  gap: 12px;
  width: min(100%, 800px);
  margin: 0 auto;
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

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

.a1-actions-listen-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.a1-action-practice-card {
  align-items: stretch;
}

.a1-action-practice-card .exercise-body,
.a1-action-listen-card .exercise-body {
  gap: 9px;
}

.a1-actions-practice-picture {
  max-width: 164px;
  margin-inline: auto;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
}

.a1-action-listen-card .routine-listen {
  justify-self: center;
}

.a1-action-listen-card .click-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.objects-table-exercise-pages {
  margin-top: 0;
}

.objects-table-practice-card {
  display: grid;
  gap: 14px;
}

.objects-table-edit-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px dashed rgba(114, 126, 91, 0.34);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.78);
}

.objects-table-edit-tools .btn-ai-practice,
.objects-table-edit-tools .btn-check {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 0.62rem;
}

.objects-table-edit-tools .btn-check:disabled {
  opacity: 0.5;
  cursor: default;
}

.objects-table-save-note {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.objects-table-examples {
  display: grid;
  gap: 8px;
  margin-top: -2px;
  padding: 12px 14px;
  border: 1px solid rgba(114, 126, 91, 0.3);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 245, 0.76);
}

.objects-table-examples-label {
  margin: 0;
  color: var(--olive);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.objects-table-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.objects-table-example {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.35;
  word-spacing: 0.18em;
}

.objects-table-stage {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.objects-table-picture {
  position: relative;
  width: 100%;
  min-width: 760px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.objects-table-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.objects-table-answers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.objects-table-answer {
  position: absolute;
  left: var(--object-answer-left);
  top: var(--object-answer-top);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 5px;
  align-items: center;
  width: min(19%, 158px);
  min-width: 122px;
  padding: 5px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.9);
  box-shadow: 0 8px 18px rgba(84, 65, 46, 0.12);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.objects-table-picture.is-moving .objects-table-answer {
  cursor: grab;
  outline: 2px dashed rgba(111, 114, 86, 0.5);
  outline-offset: 3px;
}

.objects-table-picture.is-moving .objects-table-answer.is-dragging {
  cursor: grabbing;
  box-shadow: 0 12px 24px rgba(84, 65, 46, 0.2);
}

.objects-table-number {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--content);
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
}

.objects-table-input {
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.96);
  font-size: 0.64rem;
}

.objects-table-answer .vocab-feedback {
  grid-column: 2;
  min-height: 13px;
  margin: -2px 0 0;
  font-size: 0.54rem;
  line-height: 1.15;
}

.objects-picture-slider {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: 100%;
}

.objects-picture-stage {
  width: min(100%, 430px);
}

.objects-picture {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.objects-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.objects-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.objects-picture-label {
  appearance: none;
  position: absolute;
  left: var(--object-label-left);
  top: var(--object-label-top);
  z-index: 1;
  width: min(21%, 76px);
  min-height: 21px;
  padding: 3px 4px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.88);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: 0.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.objects-picture-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.objects-picture-label:focus-visible,
.objects-picture-dot:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.objects-picture-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.objects-picture-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.objects-picture-dot {
  appearance: none;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(114, 126, 91, 0.26);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.72);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.objects-picture-dot.is-active {
  border-color: rgba(96, 106, 76, 0.48);
  background: var(--sage);
  color: var(--content);
}

.objects-crop-practice {
  width: 100%;
}

.objects-exercise-pages {
  display: grid;
  gap: 12px;
  width: 100%;
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.objects-crop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.objects-crop-card {
  align-items: stretch;
}

.objects-crop-card .exercise-body {
  gap: 9px;
}

.objects-crop-thumb {
  display: block;
  width: 100%;
  max-width: 128px;
  margin: 0 auto;
  aspect-ratio: 15 / 16;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--object-crop-x, 50%) var(--object-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 400% auto;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.objects-sound-match {
  grid-template-columns: minmax(112px, 0.48fr) minmax(0, 1fr);
  gap: 36px;
}

.objects-sound-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 6px;
  min-height: 46px;
  padding: 7px;
  align-items: center;
}

.objects-sound-card .vocab-feedback {
  grid-column: 1 / -1;
}

.objects-sound-listen {
  justify-self: start;
}

.objects-picture-match-card {
  justify-content: center;
  min-height: 118px;
  padding: 6px;
}

.objects-match-thumb {
  width: min(100%, 104px);
  max-width: 104px;
}

.objects-picture-match-card.is-used {
  opacity: 0.58;
}

.furniture-vocab-card {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  padding: clamp(14px, 2.4vw, 24px);
}

.furniture-picture-slider,
.furniture-exercise-pages {
  display: grid;
  gap: 12px;
}

.furniture-picture-stage {
  position: relative;
  width: min(100%, 720px);
  margin: 0 auto;
}

.furniture-picture {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.72);
}

.furniture-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.furniture-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.furniture-picture-label {
  appearance: none;
  position: absolute;
  left: var(--furniture-label-left);
  top: var(--furniture-label-top);
  z-index: 1;
  min-width: clamp(64px, 7.5vw, 98px);
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.44rem, 0.68vw, 0.56rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.furniture-picture-label:hover,
.furniture-picture-label:focus-visible {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
  outline: none;
}

.furniture-picture-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.furniture-picture-dot {
  appearance: none;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.7);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.furniture-picture-dot.is-active {
  border-color: rgba(114, 126, 91, 0.58);
  background: rgba(114, 126, 91, 0.16);
  color: var(--sage-deep);
}

.furniture-exercise-pages {
  padding-top: clamp(14px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.furniture-crop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.furniture-crop-card {
  align-items: stretch;
}

.furniture-crop-card .exercise-body {
  gap: 9px;
}

.furniture-crop-thumb {
  max-width: 118px;
  aspect-ratio: 1 / 1;
  background-position: var(--furniture-crop-x, 50%) var(--furniture-crop-y, 50%);
  background-size: 400% 300%;
  box-shadow: inset 0 -10px 20px rgba(114, 126, 91, 0.06);
}

.furniture-sound-match {
  grid-template-columns: minmax(112px, 0.48fr) minmax(0, 1fr);
  gap: 36px;
}

.furniture-sound-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 6px;
  min-height: 46px;
  padding: 7px;
  align-items: center;
}

.furniture-sound-card .vocab-feedback {
  grid-column: 1 / -1;
}

.furniture-picture-match-card {
  justify-content: center;
  min-height: 112px;
  padding: 6px;
}

.furniture-match-thumb {
  width: min(100%, 76px);
  max-width: 76px;
}

.furniture-picture-match-card.is-used {
  opacity: 0.58;
}

.furniture-writing-practice-card {
  display: grid;
  gap: 14px;
}

.furniture-practice-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.74fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.furniture-practice-picture {
  width: min(100%, 430px);
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.9);
}

.furniture-practice-picture img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--r-sm) - 4px);
}

.furniture-writing-guide {
  display: grid;
  gap: 10px;
}

.furniture-writing-example {
  margin: 0;
}

.furniture-writing-word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.furniture-writing-word-bank span {
  padding: 5px 9px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.72);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.furniture-writing-question-card {
  align-items: flex-start;
  background: rgba(255, 252, 245, 0.58);
  border-color: rgba(114, 126, 91, 0.18);
}

.furniture-writing-question-body {
  gap: 8px;
}

.furniture-writing-question-body .exercise-prompt {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.furniture-writing-answer {
  min-height: 104px;
}

.objects-practice-pages {
  width: min(100%, 880px);
  margin-inline: auto;
}

.objects-picture-choice-card .exercise-body {
  gap: 10px;
}

.objects-question-grid {
  align-items: stretch;
}

.objects-question-card {
  align-items: flex-start;
}

.objects-question-card .exercise-body {
  gap: 9px;
}

.objects-question-card .exercise-prompt {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.3;
}

.objects-question-input {
  min-height: 36px;
  font-size: 0.74rem;
}

.objects-practice-picture {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(114, 126, 91, 0.16);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.62);
}

.objects-practice-picture.is-plural {
  gap: 5px;
}

.objects-practice-thumb {
  width: min(100%, 86px);
  max-width: 86px;
  flex: 0 1 86px;
}

.objects-practice-picture.is-plural .objects-practice-thumb {
  width: min(31%, 62px);
  max-width: 62px;
}

.objects-this-those-practice-card {
  display: grid;
  gap: 14px;
}

.objects-this-those-sort {
  display: grid;
  gap: 12px;
}

.objects-this-those-bank {
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
}

.objects-this-those-token {
  grid-template-rows: 92px auto minmax(0, auto);
  min-height: 142px;
  padding: 7px;
}

.objects-this-those-thumb {
  width: min(100%, 86px);
  max-width: 86px;
  align-self: center;
}

.objects-this-those-token strong {
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.objects-this-those-columns .food-sort-column h3 {
  color: var(--olive);
}

.objects-this-those-slot {
  min-height: 120px;
}

.basic-word-practice {
  display: grid;
  gap: 12px;
  padding-top: clamp(12px, 1.8vw, 18px);
  border-top: 1px solid rgba(114, 126, 91, 0.18);
}

.days-next-grid {
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
}

.days-next-card {
  align-items: stretch;
}

.days-next-card .exercise-body {
  gap: 8px;
}

.days-next-prompt {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.2;
}

.seasons-choice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seasons-picture {
  position: relative;
}

.seasons-picture-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.season-picture-label {
  appearance: none;
  position: absolute;
  left: var(--season-label-left);
  top: var(--season-label-top);
  z-index: 1;
  min-width: clamp(68px, 8vw, 104px);
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(114, 126, 91, 0.32);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: clamp(0.5rem, 0.95vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.season-picture-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.season-picture-label:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.seasons-choice-card {
  align-items: stretch;
}

.seasons-choice-card .exercise-body {
  gap: 9px;
}

.seasons-choice-thumb {
  display: block;
  width: 100%;
  max-width: 116px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--season-crop-x, 50%) var(--season-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.picture-card-save-target {
  cursor: pointer;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: outline-color 160ms ease, transform 160ms ease;
}

.picture-card-save-target:hover,
.picture-card-save-target:focus-visible {
  outline-color: rgba(114, 126, 91, 0.42);
}

.picture-card-save-target[data-picture-card-saving="true"] {
  cursor: progress;
}

.picture-confirm-card {
  position: fixed;
  z-index: 95;
  padding: 14px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--lesson-frame);
  box-shadow: 0 16px 34px rgba(57, 53, 40, 0.16);
  color: var(--ink);
}

.picture-confirm-kicker {
  margin: 0 0 4px;
  color: var(--clay-deep);
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.picture-confirm-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.picture-confirm-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.picture-confirm-btn {
  min-height: 30px;
  padding: 7px 13px;
  border: 1px solid var(--sage-line);
  border-radius: var(--r-pill);
  background: var(--content);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.picture-confirm-btn.primary {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--content);
}

.picture-confirm-btn:hover,
.picture-confirm-btn:focus-visible {
  border-color: var(--sage-deep);
}

.picture-saved-moment {
  position: fixed;
  z-index: 110;
  width: 164px;
  height: 120px;
  pointer-events: none;
}

.picture-saved-label {
  position: absolute;
  left: 50%;
  top: 26px;
  transform: translateX(-50%);
  padding: 7px 14px;
  border: 1px solid rgba(114, 126, 91, 0.26);
  border-radius: var(--r-pill);
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 12px 28px rgba(57, 53, 40, 0.13);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
  animation: pictureSavedLabel 1.65s ease forwards;
}

.picture-saved-star {
  position: absolute;
  top: 0;
  left: var(--star-x);
  color: #c9816b;
  font-size: var(--star-size);
  line-height: 1;
  opacity: 0;
  text-shadow: 0 2px 9px rgba(201, 129, 107, 0.22);
  animation: pictureSavedStar 1.35s ease-out var(--star-delay) forwards;
}

.picture-saved-star:nth-child(3n) {
  color: #8f9a66;
}

.picture-saved-star:nth-child(4n) {
  color: #d9a08b;
}

@keyframes pictureSavedStar {
  0% {
    opacity: 0;
    transform: translate3d(0, -4px, 0) scale(0.74) rotate(0deg);
  }

  18% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--star-drift), 92px, 0) scale(0.36) rotate(86deg);
  }
}

@keyframes pictureSavedLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.96);
  }

  18%,
  70% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -6px) scale(0.98);
  }
}

.family-tree-label span,
.family-tree-label small {
  display: block;
}

.family-tree-label small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.86em;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
}

.family-tree-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.98);
}

.family-tree-label:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.routine-picture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.home-vocab-picture-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.home-vocab-picture-grid-rooms {
  grid-template-columns: 1fr;
}

.home-vocab-picture-grid .routine-picture-card {
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 0;
  padding: 14px;
}

.home-vocab-picture-grid .routine-picture {
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 8px;
  background: rgba(250, 246, 234, 0.92);
}

.home-vocab-picture-grid .routine-picture img {
  object-fit: contain;
}

.home-vocab-single-card .routine-picture-card {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
}

.home-vocab-single-card .routine-picture {
  position: relative;
  width: 100%;
  max-width: 860px;
  min-height: clamp(280px, 52vw, 560px);
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  padding: 10px;
  background: rgba(250, 246, 234, 0.92);
}

.home-vocab-single-card .routine-picture img,
.home-vocab-single-card .routine-picture svg {
  object-fit: contain;
}

.home-vocab-single-card .routine-picture-card > div {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.food-vocab-single-card .routine-picture {
  max-width: 470px;
  min-height: 0;
  aspect-ratio: 1055 / 1491;
}

.food-vocab-single-card .routine-picture-card > div {
  max-width: 470px;
}

.food-vocab-wide-card .routine-picture {
  max-width: 860px;
  min-height: clamp(300px, 50vw, 560px);
  aspect-ratio: 1402 / 1122;
}

.food-vocab-wide-card .routine-picture-card > div {
  max-width: 860px;
}

.clothes-vocab-single-card .clothes-vocab-picture-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.clothes-vocab-single-card .clothes-picture-slider {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
}

.clothes-picture-stage {
  position: relative;
  width: min(100%, 560px);
}

.clothes-picture-slide {
  width: 100%;
}

.clothes-picture-slide[hidden] {
  display: none;
}

.clothes-picture-stage .routine-picture {
  max-width: 100%;
}

.clothes-picture-dots {
  margin-top: 2px;
}

.clothes-vocab-single-card .routine-picture-card {
  padding: 12px;
}

.clothes-vocab-single-card .routine-picture {
  max-width: 520px;
  min-height: 0;
  aspect-ratio: 1122 / 1402;
}

.clothes-vocab-single-card.vocab-picture-section-accessories .routine-picture {
  max-width: 440px;
}

.clothes-vocab-single-card .food-product-label {
  max-width: 116px;
  font-size: 0.52rem;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.clothes-vocab-single-card .food-product-label:hover {
  transform: translate(-50%, calc(-50% - 1px));
}

.food-product-labels {
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
}

.food-product-label {
  appearance: none;
  position: absolute;
  left: var(--food-label-left, 0%);
  top: var(--food-label-top, 0%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 126px;
  padding: 4px 6px 4px 4px;
  border: 1px solid rgba(114, 126, 91, 0.3);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.84);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(84, 65, 46, 0.08);
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.05;
  pointer-events: auto;
  text-transform: uppercase;
  transform: translate(-1px, -1px);
  cursor: pointer;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), transform 0.14s var(--ease);
}

.food-product-label:hover {
  border-color: rgba(114, 126, 91, 0.52);
  background: rgba(250, 246, 234, 0.96);
  transform: translate(-1px, -2px);
}

.food-product-label:focus-visible {
  outline: 2px solid rgba(111, 114, 86, 0.45);
  outline-offset: 2px;
}

.food-product-label-num {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--content);
  font-size: 0.55rem;
  line-height: 1;
}

.food-product-label-word {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.home-vocab-zoom-trigger {
  appearance: none;
  color: inherit;
  cursor: zoom-in;
}

.home-vocab-zoom-trigger:focus-visible {
  outline: 3px solid rgba(111, 114, 86, 0.45);
  outline-offset: 3px;
}

.home-vocab-picture-grid .routine-picture-card h4 {
  font-size: 1.16rem;
}

.home-vocab-picture-grid .routine-picture-card p {
  font-size: 0.94rem;
}

.home-vocab-inner-tabs {
  margin-bottom: 16px;
}

.home-vocab-inner-tabs .vocab-exercise-tab {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.home-object-exercise-card {
  margin-top: 16px;
}

.home-object-exercise-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.home-object-exercise-grid .exercise-card {
  display: block;
}

.home-object-exercise-grid .exercise-body {
  display: grid;
  gap: 8px;
}

.home-object-number {
  justify-self: center;
  min-width: 104px;
  min-height: 30px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  background: rgba(250, 246, 234, 0.96);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.home-object-thumb {
  width: 100%;
  aspect-ratio: var(--object-ratio, 4 / 3);
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-xs);
  background-color: rgba(250, 246, 234, 0.92);
  background-position: var(--object-position, 50% 50%);
  background-repeat: no-repeat;
  background-size: var(--object-size, 240%);
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.home-object-exercise-grid .home-object-thumb {
  justify-self: center;
  width: min(100%, 180px);
}

.food-object-exercise-card .home-object-thumb {
  aspect-ratio: var(--object-ratio, 1 / 1);
  width: min(100%, 140px);
}

.food-object-exercise-card .home-object-exercise-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.clothes-object-exercise-card .home-object-exercise-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.clothes-object-exercise-card .home-object-thumb {
  width: min(100%, 138px);
}

.clothes-object-exercise-card .clothes-season-token {
  grid-template-rows: 128px auto minmax(0, auto);
  min-height: 176px;
}

.clothes-object-exercise-card .clothes-season-token .food-sort-thumb {
  max-width: 150px;
  max-height: 128px;
}

.clothes-object-exercise-card .food-sort-slot .clothes-season-token {
  grid-template-rows: 102px auto minmax(0, auto);
  min-height: 138px;
}

.clothes-object-exercise-card .food-sort-slot .clothes-season-token .food-sort-thumb {
  max-width: 124px;
  max-height: 102px;
}

.clothes-audio-picture-match {
  display: grid;
  gap: 14px;
}

.clothes-audio-match-layout {
  display: grid;
  gap: 14px;
}

.clothes-audio-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.clothes-audio-slot {
  align-content: start;
  min-height: 168px;
  gap: 8px;
}

.clothes-audio-match-button {
  justify-self: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.9rem;
}

.clothes-audio-picture-bank {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.clothes-audio-picture-token {
  grid-template-rows: 104px minmax(0, auto);
  min-height: 124px;
}

.clothes-audio-picture-token .food-sort-thumb {
  max-width: 112px;
  max-height: 104px;
}

.clothes-audio-slot .clothes-audio-picture-token {
  grid-template-rows: 82px minmax(0, auto);
  min-height: 98px;
  align-self: end;
}

.clothes-audio-slot .clothes-audio-picture-token .food-sort-thumb {
  max-width: 92px;
  max-height: 82px;
}

.people-jobs-audio-picture-match {
  display: grid;
  gap: 14px;
}

.people-jobs-audio-match-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.people-jobs-audio-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 10px;
}

.people-jobs-audio-slot {
  align-content: start;
  min-height: 148px;
  gap: 8px;
}

.people-jobs-audio-button {
  justify-self: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.9rem;
}

.people-jobs-audio-picture-bank {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.people-jobs-audio-picture-token {
  grid-template-rows: minmax(0, 112px) minmax(0, auto);
  min-height: 128px;
}

.people-jobs-audio-picture {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 112px;
  max-height: 112px;
}

.people-jobs-audio-slot .people-jobs-audio-picture-token {
  grid-template-rows: minmax(0, 82px) minmax(0, auto);
  align-self: end;
  min-height: 98px;
}

.people-jobs-audio-slot .people-jobs-audio-picture {
  max-width: 92px;
  max-height: 82px;
}

.food-grammar-card {
  display: grid;
  gap: 14px;
}

.food-sort-layout {
  display: grid;
  gap: 16px;
}

.food-sort-bank,
.food-sort-column {
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.72);
}

.food-sort-bank {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  justify-content: start;
  gap: 10px;
  padding: 12px;
}

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

.food-sort-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 240px;
  padding: 10px;
}

.food-sort-column h3 {
  margin: 0;
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.food-sort-column-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-content: start;
  gap: 8px;
  min-height: 168px;
  padding: 6px;
  border: 1px dashed rgba(114, 126, 91, 0.28);
  border-radius: var(--r-xs);
  background: rgba(255, 252, 245, 0.52);
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}

.food-sort-slot {
  display: grid;
  min-height: 134px;
  padding: 5px;
  border: 1px dashed rgba(114, 126, 91, 0.34);
  border-radius: var(--r-xs);
  background:
    linear-gradient(135deg, rgba(250, 246, 234, 0.52), rgba(255, 252, 245, 0.82));
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}

.food-sort-bank.is-over,
.food-sort-slot.is-over {
  border-color: rgba(114, 126, 91, 0.62);
  background: rgba(233, 229, 205, 0.42);
}

.food-sort-token {
  display: grid;
  grid-template-rows: 118px auto minmax(0, auto);
  gap: 7px;
  align-content: start;
  min-width: 0;
  min-height: 166px;
  padding: 8px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-xs);
  background: rgba(255, 252, 245, 0.9);
  cursor: grab;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), transform 0.14s var(--ease);
}

.food-sort-token:active {
  cursor: grabbing;
}

.food-sort-token:focus-visible {
  outline: 3px solid rgba(111, 114, 86, 0.35);
  outline-offset: 2px;
}

.food-sort-token.is-selected {
  border-color: rgba(114, 126, 91, 0.62);
  background: rgba(233, 229, 205, 0.5);
  transform: translateY(-1px);
}

.food-sort-token.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.food-sort-token.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
}

.food-sort-slot .food-sort-token {
  grid-template-rows: 82px auto minmax(0, auto);
  gap: 5px;
  align-self: start;
  min-height: 122px;
  padding: 6px;
  height: auto;
}

.food-sort-slot .food-sort-thumb {
  max-width: 104px;
  max-height: 82px;
}

.food-sort-slot .food-sort-token.is-tall .food-sort-thumb {
  height: 82px;
}

.food-sort-thumb {
  aspect-ratio: var(--object-ratio, 4 / 3);
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 132px;
  max-height: 118px;
  min-height: 0;
}

.food-sort-token.is-tall .food-sort-thumb {
  width: auto;
  height: 118px;
}

.food-sort-token.is-wide .food-sort-thumb {
  height: auto;
}

.food-sort-token strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.home-object-exercise-grid .exercise-prompt {
  font-size: 0.88rem;
}

@media (min-width: 1080px) {
  .home-vocab-picture-grid-rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .food-sort-columns {
    grid-template-columns: 1fr;
  }

  .food-sort-bank {
    grid-template-columns: repeat(auto-fill, 116px);
  }

  .body-parts-crop-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .body-parts-sound-match {
    gap: 18px;
  }

  .body-appearance-two-grid,
  .body-appearance-sentence-grid {
    grid-template-columns: 1fr;
  }

  .body-appearance-question-match,
  .body-appearance-describe-layout {
    grid-template-columns: 1fr;
  }

  .body-appearance-people-list {
    grid-template-columns: 1fr;
  }

  .body-appearance-dialogue-card {
    grid-template-columns: 1fr;
  }

  .a1-actions-card-grid,
  .a1-actions-practice-grid,
  .a1-actions-listen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a1-action-caption {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .a1-actions-card-grid,
  .a1-actions-practice-grid,
  .a1-actions-listen-grid {
    grid-template-columns: 1fr;
  }

  .a1-action-caption {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .lesson-shell,
  .vocabulary-shell {
    background-attachment: scroll;
  }

  .resource-main {
    padding: calc(var(--topbar-h) + 24px) 14px 44px;
  }

  .vocabulary-shell .resource-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .vocabulary-page .resource-card {
    padding: 14px;
  }

  .resource-hero {
    margin-bottom: 16px;
  }

  .resource-hero h1,
  .lesson-shell .hero-text h1 {
    font-size: clamp(1.75rem, 10vw, 2.25rem);
    line-height: 1.04;
  }

  .resource-hero p:last-child,
  .lesson-shell .hero-meta {
    margin-top: 9px;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .vocabulary-page .vocab-choice-row {
    margin: -4px auto 18px;
    padding-bottom: 6px;
  }

  .lesson-choice {
    gap: 6px;
    max-width: none;
    min-height: 38px;
    padding: 7px 10px;
  }

  .lesson-choice-num {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .lesson-choice-title {
    font-size: 0.78rem;
  }

  .vocab-topic-panel {
    padding: calc(var(--topbar-h) + 10px) 12px 0;
  }

  .vocab-topic-panel-inner {
    padding: 10px 4px 12px;
  }

  .vocab-topic-panel .level-topic-link {
    flex-basis: min(190px, 68vw);
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 42px;
    padding: 7px 8px;
  }

  .vocab-topic-panel .level-topic-num {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .vocab-topic-panel .level-topic-title {
    font-size: 0.8rem;
  }

  .lesson-shell .page-inner {
    padding: 20px 14px 44px;
  }

  .lesson-shell .lesson-hero {
    margin-bottom: 18px;
  }

  .level-topic-panel {
    padding: 12px 12px 0;
  }

  .level-topic-panel-inner {
    padding: 10px 4px 12px;
  }

  .level-topic-head {
    padding: 0 4px 8px;
  }

  .level-topic-head h2 {
    font-size: 1rem;
  }

  .level-topic-list {
    gap: 7px;
  }

  .level-topic-link {
    flex-basis: min(220px, 72vw);
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 48px;
    padding: 7px 8px;
  }

  .level-topic-num {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .level-topic-title {
    font-size: 0.82rem;
  }

  .level-topic-sub {
    font-size: 0.66rem;
    -webkit-line-clamp: 1;
  }

  .home-vocab-single-card .routine-picture-card {
    padding: 10px;
  }

  .home-vocab-single-card .routine-picture {
    min-height: 0;
    padding: 6px;
  }

  .food-vocab-single-card .routine-picture {
    max-width: min(100%, 340px);
    min-height: 0;
  }

  .food-vocab-wide-card .routine-picture {
    max-width: 100%;
    min-height: 0;
  }

  .clothes-vocab-single-card .clothes-vocab-picture-list {
    grid-template-columns: 1fr;
  }

  .clothes-vocab-single-card .routine-picture {
    max-width: 100%;
  }

  .clothes-picture-stage {
    width: min(100%, 380px);
  }

  .food-product-label {
    gap: 3px;
    max-width: 98px;
    padding: 3px 5px 3px 3px;
    font-size: 0.48rem;
  }

  .food-product-labels {
    inset: 6px;
  }

  .food-product-label-num {
    width: 15px;
    height: 15px;
    font-size: 0.48rem;
  }

  .family-tree-layout {
    grid-template-columns: 1fr;
  }

  .family-tree-picture {
    width: min(100%, 430px);
  }

  .family-to-be-list {
    grid-template-columns: 1fr;
  }

  .family-choice-grid {
    grid-template-columns: 1fr;
  }

  .family-possessive-examples,
  .family-possessive-grid {
    grid-template-columns: 1fr;
  }

  .people-picture {
    width: min(100%, 430px);
  }

  .people-picture-practice-grid {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  }

  .people-picture-thumb {
    max-width: 132px;
  }

  .colors-picture {
    width: min(100%, 360px);
  }

  .colors-picture-practice-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .colors-picture-thumb {
    max-width: 104px;
  }

  .body-parts-picture-stage {
    width: min(100%, 390px);
  }

  .body-parts-picture-label {
    min-width: 48px;
    padding: 3px 5px;
    font-size: 0.42rem;
  }

  .body-parts-thumb {
    max-width: 96px;
  }

  .body-parts-match-thumb {
    max-width: 56px;
  }

  .basic-actions-picture {
    width: min(100%, 420px);
  }

  .basic-actions-label {
    min-width: 58px;
    padding-inline: 6px;
    font-size: 0.4rem;
  }

  .basic-actions-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .basic-actions-thumb {
    max-width: 104px;
  }

  .basic-actions-sound-match {
    grid-template-columns: minmax(96px, 0.5fr) minmax(0, 1fr);
    gap: 14px;
  }

  .basic-actions-match-thumb {
    max-width: 58px;
  }

  .basic-actions-imperative-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .basic-actions-imperative-card .basic-actions-thumb {
    max-width: 82px;
  }

  .objects-table-stage {
    margin-inline: -6px;
    padding-inline: 6px;
  }

  .objects-table-picture {
    min-width: 700px;
  }

  .objects-table-answer {
    min-width: 116px;
  }

  .objects-table-input {
    font-size: 0.6rem;
  }

  .objects-picture-stage {
    width: min(100%, 360px);
  }

  .furniture-picture-stage {
    width: min(100%, 390px);
  }

  .objects-picture-label {
    width: min(22%, 72px);
    font-size: 0.4rem;
  }

  .furniture-picture-label {
    min-width: 54px;
    padding: 3px 5px;
    font-size: 0.38rem;
  }

  .objects-crop-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .furniture-crop-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .objects-crop-thumb {
    max-width: 110px;
  }

  .furniture-crop-thumb {
    max-width: 112px;
  }

  .objects-sound-match {
    grid-template-columns: minmax(96px, 0.5fr) minmax(0, 1fr);
    gap: 14px;
  }

  .furniture-sound-match {
    grid-template-columns: minmax(96px, 0.5fr) minmax(0, 1fr);
    gap: 14px;
  }

  .objects-match-thumb {
    max-width: 82px;
  }

  .furniture-match-thumb {
    max-width: 72px;
  }

  .furniture-practice-layout,
  .furniture-writing-question-grid {
    grid-template-columns: 1fr;
  }

  .furniture-practice-picture {
    width: min(100%, 360px);
    justify-self: center;
  }

  .months-picture-grid {
    grid-template-columns: 1fr;
    max-width: 330px;
  }

  .months-picture {
    width: min(100%, 300px);
  }

  .month-picture-label {
    min-width: 62px;
    padding: 3px 7px;
    font-size: 0.47rem;
  }

  .months-choice-thumb {
    max-width: 104px;
  }

  .seasons-choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .seasons-choice-thumb {
    max-width: 104px;
  }

  .season-picture-label {
    min-width: 58px;
    padding: 3px 7px;
    font-size: 0.47rem;
  }

  .colors-sound-match {
    gap: 18px;
  }

  .colors-match-thumb {
    max-width: 62px;
  }

  .animals-picture-stage {
    width: min(100%, 390px);
  }

  .animals-picture-label {
    min-width: 58px;
    max-width: 92px;
    padding: 3px 6px;
    font-size: 0.48rem;
  }

  .animals-picture-practice-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .animals-picture-thumb {
    max-width: 98px;
  }

  .animal-sort-bank {
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  }

  .animal-sort-token {
    grid-template-rows: 74px auto minmax(0, auto);
    min-height: 110px;
    padding: 5px;
  }

  .animal-sort-thumb {
    max-width: 84px;
  }

  .animals-sound-match {
    gap: 18px;
  }

  .animals-match-thumb {
    max-width: 62px;
  }

  .emotions-picture-stage {
    width: min(100%, 360px);
  }

  .emotions-picture-label {
    min-width: 54px;
    max-width: 84px;
    font-size: 0.43rem;
  }

  .emotions-picture-thumb {
    max-width: 84px;
  }

  .emotions-sort-token {
    grid-template-rows: 102px auto minmax(0, auto);
    min-height: 142px;
  }

  .emotions-sort-thumb {
    max-width: 68px;
  }

  .emotions-match-thumb {
    max-width: 56px;
  }

  .home-object-exercise-grid,
  .food-object-exercise-card .home-object-exercise-grid {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 8px;
  }

  .home-object-exercise-grid .exercise-card {
    padding: 8px;
    border-radius: var(--r-sm);
  }

  .home-object-exercise-grid .exercise-body {
    gap: 7px;
  }

  .home-object-exercise-grid .home-object-thumb {
    width: min(100%, 150px);
  }

  .food-object-exercise-card .home-object-thumb {
    width: min(100%, 118px);
  }

  .clothes-object-exercise-card .home-object-thumb {
    width: min(100%, 118px);
  }

  .clothes-object-exercise-card .home-object-exercise-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .clothes-object-exercise-card .clothes-season-token {
    grid-template-rows: 108px auto minmax(0, auto);
    min-height: 154px;
  }

  .clothes-object-exercise-card .clothes-season-token .food-sort-thumb {
    max-width: 128px;
    max-height: 108px;
  }

  .clothes-object-exercise-card .food-sort-slot .clothes-season-token {
    grid-template-rows: 88px auto minmax(0, auto);
    min-height: 126px;
  }

  .clothes-object-exercise-card .food-sort-slot .clothes-season-token .food-sort-thumb {
    max-width: 108px;
    max-height: 88px;
  }

  .clothes-audio-slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  }

  .clothes-audio-slot {
    min-height: 142px;
  }

  .clothes-audio-match-button {
    width: 36px;
    min-height: 36px;
  }

  .clothes-audio-picture-bank {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }

  .clothes-audio-picture-token {
    grid-template-rows: 88px minmax(0, auto);
    min-height: 106px;
  }

  .clothes-audio-picture-token .food-sort-thumb {
    max-width: 96px;
    max-height: 88px;
  }

  .clothes-audio-slot .clothes-audio-picture-token {
    grid-template-rows: 68px minmax(0, auto);
    min-height: 82px;
  }

  .clothes-audio-slot .clothes-audio-picture-token .food-sort-thumb {
    max-width: 78px;
    max-height: 68px;
  }

  .home-object-number {
    min-width: 82px;
    min-height: 25px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .blank-full {
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .vocab-note {
    margin-bottom: 12px;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .closed-syllable-page {
    gap: 8px;
  }

  .closed-syllable-stage {
    width: 100%;
    padding-inline: 28px;
  }

  .closed-syllable-card {
    width: min(100%, 390px);
  }

  .closed-syllable-head {
    gap: 7px;
    padding: 4px 8px;
  }

  .closed-syllable-vowel {
    font-size: 1.05rem;
  }

  .closed-syllable-sound {
    font-size: 0.58rem;
    letter-spacing: 0.09em;
  }

  .closed-syllable-word {
    min-width: 40px;
    max-width: 31%;
    min-height: 21px;
    padding: 3px 5px;
    font-size: 0.44rem;
    letter-spacing: 0.03em;
  }

  .closed-syllable-picture {
    width: min(100%, 360px);
  }

  .closed-syllable-arrow {
    width: 25px;
    height: 42px;
    font-size: 1.28rem;
  }

  .closed-syllable-dot {
    min-width: 29px;
    height: 27px;
    padding: 0 8px;
    font-size: 0.56rem;
  }

  .vocab-exercise-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .vocab-exercise-tab {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .food-sort-bank {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  }

  .food-sort-column-items {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 7px;
    padding: 6px;
  }

  .food-sort-slot {
    min-height: 116px;
    padding: 5px;
  }

  .food-sort-token {
    grid-template-rows: 104px auto minmax(0, auto);
    gap: 6px;
    min-height: 150px;
    padding: 6px;
  }

  .food-sort-token strong {
    font-size: 0.78rem;
  }

  .food-sort-thumb {
    max-width: 118px;
    max-height: 104px;
  }

  .food-sort-token.is-tall .food-sort-thumb {
    height: 104px;
  }

  .food-sort-slot .food-sort-token {
    grid-template-rows: 72px auto minmax(0, auto);
    min-height: 106px;
    padding: 5px;
  }

  .food-sort-slot .food-sort-thumb {
    max-width: 92px;
    max-height: 72px;
  }

  .food-sort-slot .food-sort-token.is-tall .food-sort-thumb {
    height: 72px;
  }
}

.vocab-word-groups {
  display: grid;
  gap: 18px;
}

.vocab-word-group-cards {
  display: grid;
  gap: 16px;
}

.vocab-word-group-card {
  margin: 0;
}

.vocab-word-group-card-large {
  padding: 18px;
}

.routine-picture-grid-large {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.routine-picture-grid-crops {
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  width: min(100%, 900px);
  margin-inline: auto;
  gap: 12px;
}

.paged-vocab-picture-card {
  gap: 14px;
}

.paged-vocab-picture-tabs {
  width: min(100%, 360px);
  margin-inline: auto;
  justify-content: center;
}

.paged-vocab-picture-grid {
  width: min(100%, 900px);
}

.home-vocab-pages-card {
  gap: 16px;
}

.home-vocab-picture-tabs {
  width: min(100%, 520px);
  margin-inline: auto;
  justify-content: center;
}

.home-vocab-page-head {
  justify-items: center;
  text-align: center;
}

.home-vocab-page-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  width: min(100%, 1120px);
  gap: 14px;
}

.home-vocab-objects-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.home-vocab-object-sections {
  display: grid;
  justify-items: center;
  gap: 24px;
  width: 100%;
}

.home-vocab-object-section {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
}

.home-vocab-object-section > h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 1120px);
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.home-vocab-object-section > h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(114, 126, 91, 0.22);
}

.home-vocab-page-grid .routine-picture-card-crop > div:last-child {
  min-height: 88px;
}

.home-vocab-page-grid .routine-picture-card-crop h4 {
  font-size: 0.86rem;
}

.home-object-picture-practice-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  width: min(100%, 1120px);
}

.home-object-practice-sections {
  gap: 22px;
}

.adjective-vocab-card {
  gap: 16px;
}

.adjective-vocab-grid,
.adjective-picture-practice-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  width: min(100%, 1120px);
  gap: 14px;
}

.adjective-vocab-grid .routine-picture-card-crop > div:last-child {
  min-height: 82px;
}

.adjective-vocab-grid .routine-picture-card-crop h4 {
  font-size: 0.84rem;
}

.adjective-comparison-grid,
.adjective-order-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.adjective-comparison-card,
.adjective-order-card {
  min-height: 166px;
}

.vocab-word-group-card-large .routine-picture-card {
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 128px;
  padding: 13px;
}

.vocab-word-group-card-large .routine-picture-card h4 {
  font-size: 1.03rem;
}

.vocab-word-group-card-large .routine-picture-card p {
  font-size: 0.84rem;
}

.vocab-word-group {
  display: grid;
  gap: 10px;
}

.vocab-word-group > h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.routine-picture-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 102px;
  padding: 10px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.routine-picture-card-crop {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}

.routine-picture,
.routine-match-picture {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.74), transparent 35%),
    linear-gradient(145deg, rgba(229, 225, 199, 0.72), rgba(250, 246, 232, 0.95));
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
  font-size: 2.1rem;
}

.routine-picture-crop {
  display: block;
  aspect-ratio: auto;
  border-radius: var(--r-xs);
  background: rgba(250, 246, 234, 0.92);
  box-shadow: inset 0 -12px 24px rgba(114, 126, 91, 0.08);
}

.vocab-crop-picture {
  display: block;
  width: 100%;
  max-height: 100%;
  aspect-ratio: var(--vocab-crop-ratio, 1 / 1);
  border-radius: inherit;
  background-color: rgba(250, 246, 234, 0.92);
  background-image: var(--vocab-crop-image);
  background-position: var(--vocab-crop-x, 50%) var(--vocab-crop-y, 50%);
  background-repeat: no-repeat;
  background-size: var(--vocab-crop-size-x, 100%) var(--vocab-crop-size-y, 100%);
}

.routine-picture img,
.routine-match-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vocab-picture-fallback {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 4px;
  color: var(--ink);
}

.vocab-picture-fallback svg {
  width: min(78%, 76px);
  height: auto;
  overflow: visible;
}

.vocab-picture-fallback svg g {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocab-picture-fallback span {
  max-width: 100%;
  color: var(--sage-deep);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.routine-match-picture .vocab-picture-fallback span {
  font-size: 0.54rem;
}

.routine-picture-card h4,
.image-library-info h3 {
  letter-spacing: 0;
}

.routine-picture-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.14;
}

.routine-picture-card-crop > div:last-child {
  display: grid;
  align-content: end;
  min-height: 92px;
  padding: 8px 8px 4px;
}

.routine-picture-card-crop h4 {
  font-size: 0.78rem;
  line-height: 1.12;
}

.routine-picture-card-crop p {
  font-size: 0.68rem;
  line-height: 1.24;
}

.routine-phrase-lookup {
  overflow-wrap: anywhere;
  text-align: left;
}

.routine-picture-card p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.24;
}

.routine-listen {
  margin: 6px 0 0;
  padding: 5px 9px;
  font-size: 0.72rem;
}

@media (max-width: 560px) {
  .routine-picture-grid {
    grid-template-columns: 1fr;
  }

  .routine-picture-grid-large {
    grid-template-columns: 1fr;
  }

  .vocab-word-group-card-large {
    padding: 14px;
  }

  .vocab-word-group-card-large .routine-picture-card {
    grid-template-columns: 74px minmax(0, 1fr);
    min-height: 110px;
  }

  .routine-picture-card {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: 94px;
  }
}

.routine-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.routine-match-grid-crops {
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  width: min(100%, 900px);
  margin-inline: auto;
  gap: 12px;
}

.routine-match-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.routine-match-card-crop {
  gap: 8px;
  padding: 8px;
}

.routine-match-picture {
  font-size: 2.8rem;
}

.vocab-image-lightbox[hidden] {
  display: none;
}

.vocab-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.vocab-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(39, 37, 31, 0.72);
  cursor: zoom-out;
}

.vocab-image-lightbox-frame {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 1120px);
  max-height: calc(100vh - 40px);
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(250, 246, 234, 0.36);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  box-shadow: 0 24px 70px rgba(39, 37, 31, 0.32);
}

.vocab-image-lightbox-frame img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 128px);
  object-fit: contain;
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.92);
}

.vocab-image-lightbox-frame figcaption {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
}

.vocab-image-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-pill);
  background: rgba(250, 246, 234, 0.96);
  color: var(--ink);
  font: 950 1.25rem/1 var(--font-body);
  cursor: pointer;
}

body.has-vocab-image-lightbox {
  overflow: hidden;
}

.vocab-practice-tabs-card {
  gap: 16px;
}

.vocab-exercise-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-sm);
  background: rgba(229, 225, 199, 0.28);
}

.vocab-exercise-tab {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.vocab-exercise-tab:hover {
  border-color: rgba(114, 126, 91, 0.24);
  background: rgba(255, 252, 245, 0.72);
}

.vocab-exercise-tab.is-active {
  border-color: rgba(114, 126, 91, 0.34);
  background: var(--lesson-frame);
  color: var(--ink);
}

.vocab-exercise-panel {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.vocab-exercise-panel[hidden] {
  display: none;
}

.vocab-exercise-grid {
  margin-top: 12px;
}

.vocab-sentence-match {
  gap: 56px;
  margin-top: 2px;
}

.vocab-match-left {
  min-height: 48px;
}

.vocab-sentence-match .match-card-text {
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0;
}

.vocab-sentence-match .match-card-right {
  min-height: 48px;
  align-items: center;
}

.vocab-match-left .vocab-feedback {
  margin-left: auto;
  white-space: nowrap;
}

.vocab-match-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.vocab-match-help strong {
  color: var(--ink);
  font-weight: 900;
}

.vocab-reading-text {
  display: grid;
  gap: 12px;
  max-width: 760px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
}

.vocab-reading-text p {
  margin: 0;
}

.vocab-reading-highlight {
  color: var(--ink);
  font-weight: 950;
}

.vocab-audio-empty,
.vocab-transcript-empty,
.vocab-questions-empty {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px dashed rgba(114, 126, 91, 0.28);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.54);
}

.vocab-audio-upload {
  grid-template-columns: minmax(170px, 0.9fr) minmax(230px, 1.2fr) auto;
  align-items: end;
}

.vocab-audio-upload-card {
  padding: 10px 12px;
}

.vocab-fold-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.vocab-fold-toggle > span:first-child {
  display: grid;
  gap: 2px;
}

.vocab-fold-toggle strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.vocab-fold-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: 999px;
  background: var(--lesson-frame);
  color: var(--sage-deep);
  font-size: 1.1rem;
  font-weight: 900;
}

.vocab-fold-content {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.vocab-fold-content[hidden] {
  display: none;
}

.vocab-audio-title-field,
.vocab-audio-transcript-field,
.vocab-listening-question-fields,
.vocab-transcript-form label {
  grid-column: 1 / -1;
}

.vocab-audio-upload button {
  grid-column: 1 / -1;
  justify-self: end;
}

.vocab-audio-upload textarea,
.vocab-transcript-form input,
.vocab-transcript-form textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(255, 252, 245, 0.9);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  padding: 10px 12px;
}

.vocab-transcript-form input {
  min-height: 42px;
  resize: none;
}

.vocab-audio-player {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.vocab-audio-player audio {
  width: 100%;
  display: block;
}

.vocab-audio-player p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.greetings-warmup-card {
  display: grid;
  gap: 18px;
}

.greetings-warmup-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.greetings-warmup-picture {
  align-self: start;
  justify-self: center;
  width: min(100%, 700px);
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.greetings-warmup-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.greetings-warmup-listening {
  width: min(100%, 700px);
  justify-self: center;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  padding: 16px 18px 18px;
  border: 1px solid rgba(150, 138, 101, 0.22);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.84), rgba(247, 241, 224, 0.82)),
    repeating-linear-gradient(135deg, rgba(114, 126, 91, 0.035) 0 1px, transparent 1px 8px);
  box-shadow: inset 0 1px 0 rgba(255, 252, 245, 0.78), 0 8px 18px rgba(70, 62, 44, 0.05);
}

.greetings-audio-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.greetings-warmup-listening h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.greetings-warmup-player,
.greetings-warmup-transcript {
  margin-bottom: 0;
}

.greetings-warmup-player {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(128, 101, 71, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 252, 243, 0.86), rgba(246, 238, 216, 0.72)),
    repeating-linear-gradient(0deg, rgba(120, 96, 67, 0.025) 0 1px, transparent 1px 7px);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 245, 0.62);
}

.greetings-player-doodles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 8px;
  opacity: 0.78;
}

.greetings-player-leaf {
  width: 20px;
  height: 9px;
  border: 1px solid rgba(114, 126, 91, 0.48);
  border-radius: 999px 999px 999px 2px;
  background: rgba(185, 198, 154, 0.22);
}

.greetings-player-leaf-left {
  transform: rotate(-18deg);
}

.greetings-player-leaf-right {
  transform: scaleX(-1) rotate(-18deg);
}

.greetings-player-flower {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(196, 103, 70, 0.66);
  box-shadow:
    -6px 0 0 rgba(222, 169, 78, 0.7),
    6px 0 0 rgba(222, 169, 78, 0.7),
    0 -6px 0 rgba(222, 169, 78, 0.7),
    0 6px 0 rgba(222, 169, 78, 0.7);
}

.greetings-waveform {
  height: 22px;
  cursor: pointer;
  border-radius: var(--r-sm);
}

.greetings-waveform svg {
  display: block;
  width: 100%;
  height: 100%;
}

.greetings-waveform path {
  fill: none;
  stroke: rgba(114, 126, 91, 0.7);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.greetings-player-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: rgba(68, 58, 42, 0.68);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.greetings-progress-line {
  --audio-progress: 0%;
  position: relative;
  width: 100%;
  height: 22px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.greetings-progress-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(128, 101, 71, 0.28);
}

.greetings-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(196, 103, 70, 0.7);
}

.greetings-progress-handle {
  position: absolute;
  left: 0%;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 252, 245, 0.96);
  border-radius: 999px;
  background: rgba(114, 126, 91, 0.9);
  box-shadow: 0 0 0 1px rgba(68, 58, 42, 0.2);
}

.greetings-player-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
}

.greetings-player-small,
.greetings-player-play,
.greetings-player-speed button {
  border: 1px solid rgba(128, 101, 71, 0.26);
  background: rgba(255, 252, 245, 0.68);
  color: var(--ink);
  font: 900 0.82rem/1 var(--font-body);
  cursor: pointer;
}

.greetings-player-small {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: rgba(68, 58, 42, 0.7);
  font-size: 1.05rem;
}

.greetings-player-play {
  width: 42px;
  height: 42px;
  border-color: rgba(196, 103, 70, 0.34);
  border-radius: 999px;
  background: rgba(255, 246, 226, 0.86);
  color: rgba(65, 54, 39, 0.92);
  font-size: 0.62rem;
}

.greetings-player-play span {
  display: inline-block;
  transform: none;
}

.greetings-player-speed {
  display: flex;
  gap: 5px;
}

.greetings-player-speed button {
  min-width: 36px;
  height: 28px;
  border-radius: 999px;
  color: rgba(68, 58, 42, 0.66);
}

.greetings-player-speed button.is-active {
  border-color: rgba(114, 126, 91, 0.44);
  background: rgba(185, 198, 154, 0.28);
  color: var(--sage-deep);
}

.greetings-player-small:focus-visible,
.greetings-player-play:focus-visible,
.greetings-player-speed button:focus-visible,
.greetings-waveform:focus-visible,
.greetings-progress-line:focus-visible {
  outline: 2px solid rgba(114, 126, 91, 0.34);
  outline-offset: 3px;
}

.greetings-warmup-transcript .vocab-transcript-panel {
  max-width: none;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.greetings-dialogue-line {
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(114, 126, 91, 0.12);
}

.greetings-dialogue-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.greetings-practice-card {
  display: grid;
  gap: 16px;
  width: min(100%, 880px);
  max-width: none;
}

.greetings-dialogue-practice {
  gap: 16px;
}

.greetings-exercise-pages {
  width: min(100%, 880px);
  margin-inline: auto;
}

.greetings-exercise-pages .family-exercise-tabs {
  width: 100%;
}

.greetings-dialogue-bank {
  justify-content: center;
  background: rgba(255, 252, 245, 0.64);
  border-color: rgba(114, 126, 91, 0.2);
}

.greetings-dialogue-lines {
  gap: 8px;
}

.greetings-dialogue-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(76px, auto);
  gap: 12px;
  align-items: center;
  background: rgba(255, 252, 245, 0.7);
  border-color: rgba(114, 126, 91, 0.16);
}

.greetings-dialogue-card-plain {
  grid-template-columns: 68px minmax(0, 1fr);
  background: rgba(247, 241, 224, 0.36);
}

.greetings-dialogue-speaker {
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.greetings-dialogue-prompt {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

.greetings-dialogue-prompt .drag-drop {
  min-width: 98px;
}

.greetings-vocab-dialogue-card {
  grid-template-columns: 42px minmax(0, 1fr) minmax(76px, auto);
}

.greetings-phrase-drop {
  width: auto;
  min-width: min(100%, 92px);
  white-space: normal;
}

.greetings-reply-grid {
  grid-template-columns: 1fr;
}

.greetings-reply-card .click-choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.greetings-dictation-list {
  display: grid;
  gap: 10px;
}

.greetings-dictation-card {
  display: grid;
  grid-template-columns: auto 96px minmax(0, 1fr) minmax(76px, auto);
  gap: 12px;
  align-items: center;
  background: rgba(255, 252, 245, 0.7);
  border-color: rgba(114, 126, 91, 0.16);
}

.greetings-dictation-listen {
  justify-self: start;
}

.greetings-dictation-input {
  min-width: 0;
}

.greetings-vocab-card {
  display: grid;
  gap: 18px;
}

.greetings-template-stack {
  display: grid;
  gap: 18px;
}

.greetings-template-scroll {
  overflow-x: auto;
  padding: 2px 0 8px;
}

.greetings-template-card {
  position: relative;
  width: min(100%, 880px);
  min-width: 600px;
  margin: 0 auto;
  color: #4a3c29;
}

.greetings-template-card img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.greetings-template-grid {
  position: absolute;
  display: grid;
}

.greetings-template-grid-phrases {
  left: 8.2%;
  top: 13.55%;
  width: 83.6%;
  height: 66.1%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 13.6% repeat(5, minmax(0, 1fr));
}

.greetings-template-grid-pattern {
  left: 11.55%;
  top: 31.25%;
  width: 76.8%;
  height: 47.05%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 18% repeat(3, minmax(0, 1fr));
  column-gap: 1.25%;
  row-gap: 3.5%;
}

.greetings-template-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 8.5%;
  color: rgba(67, 54, 36, 0.88);
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 0.9vw, 0.82rem);
  font-weight: 700;
  line-height: 1.58;
  overflow-wrap: normal;
  word-break: normal;
  word-spacing: 0.18em;
}

.greetings-template-card-phrases .greetings-template-cell {
  justify-content: center;
  text-align: center;
}

.greetings-template-card-pattern .greetings-template-cell {
  justify-content: center;
  text-align: center;
  padding: 0 4.5%;
  font-size: clamp(0.58rem, 0.82vw, 0.76rem);
}

.greetings-template-card-pattern .greetings-template-formula {
  gap: 0.62em;
}

.greetings-template-head {
  color: rgba(255, 250, 236, 0.95);
  font-family: var(--font-ui);
  font-size: clamp(0.46rem, 0.58vw, 0.62rem);
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  word-spacing: 0.02em;
}

.greetings-template-formula {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34em;
  color: rgba(84, 92, 62, 0.96);
  font-family: var(--font-ui);
  font-size: clamp(0.54rem, 0.74vw, 0.68rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.5;
  word-spacing: 0.18em;
  white-space: nowrap;
}

.greetings-template-text {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.32em;
}

.greetings-text-part,
.greetings-formula-part {
  display: inline-block;
}

.greetings-template-number {
  position: absolute;
  left: 13%;
  top: 14.25%;
  display: grid;
  place-items: center;
  width: 4.5%;
  aspect-ratio: 1;
  color: rgba(84, 92, 62, 0.9);
  font-family: var(--font-ui);
  font-size: clamp(0.58rem, 1vw, 0.9rem);
  font-weight: 900;
}

.greetings-template-title {
  position: absolute;
  left: 19.8%;
  top: 13.65%;
  display: flex;
  align-items: center;
  width: 68.6%;
  height: 11.3%;
  margin: 0;
  padding: 0 4%;
  color: rgba(67, 54, 36, 0.78);
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1vw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.personal-info-vocab-card {
  display: grid;
  gap: 16px;
  width: min(100%, 820px);
  margin-inline: auto;
}

.personal-info-question-pattern {
  display: grid;
  gap: 10px;
  padding: 15px 17px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.74);
}

.personal-info-question-pattern .resource-kicker {
  margin: 0;
  color: var(--olive);
}

.personal-info-pattern-line,
.personal-info-pattern-example {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0;
}

.personal-info-pattern-part,
.personal-info-pattern-example span,
.personal-info-pattern-table span {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-xs);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
}

.personal-info-pattern-plus {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 900;
}

.personal-info-pattern-example {
  padding-top: 3px;
}

.personal-info-pattern-example::before {
  content: "Example";
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pattern-question {
  background: rgba(201, 129, 107, 0.18);
  color: #8A4F3E;
}

.pattern-be {
  background: rgba(143, 160, 102, 0.2);
  color: #58663B;
}

.pattern-subject {
  background: rgba(205, 179, 127, 0.24);
  color: #705C35;
}

.pattern-predicate {
  background: rgba(116, 136, 142, 0.16);
  color: #4F6268;
}

.personal-info-question-order-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.personal-info-question-order-card .vocab-section-head {
  margin-bottom: 0;
}

.personal-info-question-order-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.personal-info-question-order-item {
  border-color: rgba(114, 126, 91, 0.18);
  background: rgba(255, 252, 245, 0.58);
}

.personal-info-question-order-item .exercise-body {
  gap: 10px;
}

.personal-info-question-order-bank {
  background: rgba(250, 246, 234, 0.76);
}

.personal-info-question-token {
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-xs);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: none;
  white-space: nowrap;
}

.personal-info-question-token[data-question-piece="question"] {
  background: rgba(201, 129, 107, 0.18);
  color: #8A4F3E;
}

.personal-info-question-token[data-question-piece="be"] {
  background: rgba(143, 160, 102, 0.2);
  color: #58663B;
}

.personal-info-question-token[data-question-piece="subject"] {
  background: rgba(205, 179, 127, 0.24);
  color: #705C35;
}

.personal-info-question-token[data-question-piece="predicate"] {
  background: rgba(116, 136, 142, 0.16);
  color: #4F6268;
}

.personal-info-question-order-slots {
  align-items: center;
}

.personal-info-question-order-slot {
  min-width: 62px;
  min-height: 38px;
  border-color: rgba(114, 126, 91, 0.32);
  background: rgba(255, 252, 245, 0.78);
}

.personal-info-question-order-slot .personal-info-question-token {
  width: 100%;
}

.personal-info-answer-choice-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.personal-info-answer-choice-card .vocab-section-head {
  margin-bottom: 0;
}

.personal-info-answer-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personal-info-answer-card {
  background: rgba(255, 252, 245, 0.58);
  border-color: rgba(114, 126, 91, 0.18);
}

.personal-info-answer-card .exercise-prompt {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
}

.personal-info-answer-card .click-choice-options {
  grid-template-columns: 1fr;
}

.personal-info-dialogue-card,
.personal-info-own-answer-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.personal-info-dialogue-card .vocab-section-head,
.personal-info-own-answer-card .vocab-section-head {
  margin-bottom: 0;
}

.personal-info-dialogue-practice {
  gap: 11px;
}

.personal-info-dialogue-bank {
  background: rgba(250, 246, 234, 0.76);
}

.personal-info-dialogue-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.personal-info-dialogue-line {
  background: rgba(255, 252, 245, 0.58);
  border-color: rgba(114, 126, 91, 0.18);
}

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

.personal-info-own-answer-item {
  align-items: flex-start;
  background: rgba(255, 252, 245, 0.58);
  border-color: rgba(114, 126, 91, 0.18);
}

.personal-info-own-answer-body {
  display: grid;
  grid-template-columns: minmax(120px, 0.74fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.personal-info-own-answer-body .exercise-prompt {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
}

.personal-info-own-answer-input {
  width: 100%;
}

.personal-info-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.64);
}

.personal-info-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: var(--ink);
}

.personal-info-table th,
.personal-info-table td {
  padding: 14px 18px;
  border-top: 1px solid rgba(114, 126, 91, 0.14);
  text-align: left;
}

.personal-info-table th {
  border-top: 0;
  background: rgba(114, 126, 91, 0.14);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.personal-info-table td {
  background: rgba(255, 252, 245, 0.5);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
}

.personal-info-table tbody tr:nth-child(even) td {
  background: rgba(247, 241, 224, 0.48);
}

.personal-info-spelling-frame {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.82), rgba(247, 241, 224, 0.62)),
    repeating-linear-gradient(135deg, rgba(114, 126, 91, 0.035) 0 1px, transparent 1px 8px);
}

.personal-info-spelling-frame h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 700;
}

.personal-info-spelling-frame p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.55;
}

.personal-info-spelling-frame strong,
.personal-info-spelling-frame span {
  color: var(--ink);
  font-weight: 900;
}

.personal-info-pattern-table-card {
  display: grid;
  gap: 11px;
  padding: 16px 18px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.7);
}

.personal-info-pattern-table-card .resource-kicker,
.personal-info-pattern-table-card h4 {
  margin: 0;
}

.personal-info-pattern-table-card .resource-kicker {
  color: var(--olive);
}

.personal-info-pattern-table-card h4 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}

.personal-info-pattern-line-compact {
  padding-bottom: 2px;
}

.personal-info-pattern-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.58);
}

.personal-info-pattern-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
}

.personal-info-pattern-table th,
.personal-info-pattern-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(114, 126, 91, 0.13);
  text-align: left;
  vertical-align: middle;
}

.personal-info-pattern-table th {
  border-top: 0;
  background: rgba(114, 126, 91, 0.13);
  color: var(--sage-deep);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.personal-info-pattern-table td {
  background: rgba(255, 252, 245, 0.48);
}

.personal-info-pattern-table tbody tr:nth-child(even) td {
  background: rgba(247, 241, 224, 0.42);
}

.personal-info-pattern-subject-cell {
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .greetings-warmup-picture {
    aspect-ratio: 4 / 3;
  }

  .greetings-warmup-listening {
    padding: 14px;
  }

  .greetings-warmup-player {
    padding: 8px 9px;
  }

  .greetings-player-progress {
    grid-template-columns: 1fr 1fr;
  }

  .greetings-progress-line {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .greetings-player-progress span:first-child {
    grid-column: 1;
  }

  .greetings-player-progress span:last-child {
    grid-column: 2;
    justify-self: end;
  }

  .greetings-player-controls {
    gap: 7px;
  }

  .greetings-template-card {
    min-width: 580px;
  }

  .greetings-dialogue-card,
  .greetings-dialogue-card-plain {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .greetings-reply-card .click-choice-options {
    grid-template-columns: 1fr;
  }

  .personal-info-answer-card .click-choice-options {
    grid-template-columns: 1fr;
  }

  .personal-info-question-order-item .exercise-body,
  .personal-info-dialogue-lines,
  .personal-info-own-answer-grid,
  .personal-info-own-answer-body {
    grid-template-columns: 1fr;
  }

  .greetings-dictation-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.vocab-audio-manage {
  margin: -4px 0 16px;
}

.vocab-transcript-form {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-sm);
  background: rgba(252, 247, 236, 0.58);
}

.vocab-transcript-form label {
  display: grid;
  gap: 6px;
}

.vocab-transcript-form span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vocab-transcript-form button {
  justify-self: start;
}

.vocab-listening-question-fields {
  display: grid;
  gap: 10px;
}

.vocab-listening-question-fields label {
  display: grid;
  gap: 6px;
}

.vocab-form-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.vocab-listening-question-fields textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(255, 252, 245, 0.92);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  padding: 8px 10px;
}

.vocab-transcript {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.vocab-transcript-toggle {
  justify-self: start;
}

.vocab-transcript-panel {
  display: grid;
  gap: 10px;
  max-width: 760px;
  padding: 14px 16px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  color: var(--ink);
  line-height: 1.7;
}

.vocab-transcript-panel[hidden] {
  display: none;
}

.vocab-transcript-panel p {
  margin: 0;
}

.vocab-feedback {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.routine-match-card.is-correct,
.vocab-topic-card .exercise-card.is-correct {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.routine-match-card.is-wrong,
.vocab-topic-card .exercise-card.is-wrong {
  border-color: var(--no-line);
  background: var(--no-bg);
}

.vocab-writing-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.vocab-writing-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(260px, 0.75fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.vocab-writing-layout .vocab-writing-picture,
.vocab-writing-layout .vocab-writing-prompts {
  margin-bottom: 0;
}

.vocab-writing-picture {
  position: relative;
  width: min(100%, 920px);
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.92);
}

.vocab-writing-picture img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--r-sm) - 4px);
}

.vocab-writing-picture.has-picture-labels {
  width: min(100%, 560px);
}

.vocab-writing-picture-labels {
  position: absolute;
  inset: 8px;
  pointer-events: none;
}

.vocab-writing-picture-label {
  position: absolute;
  left: var(--picture-label-left, 0%);
  top: var(--picture-label-top, 0%);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(67, 72, 49, 0.34);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.9);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(84, 65, 46, 0.12);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  transform: translate(-1px, -1px);
}

.vocab-writing-prompts-framed {
  padding: 12px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.72);
}

.vocab-writing-prompts-title {
  flex: 0 0 100%;
  margin: 0 0 2px;
}

.vocab-writing-phrase-list {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 2px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.4;
}

.vocab-writing-example {
  flex: 0 0 100%;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-xs);
  background: rgba(255, 252, 245, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .vocab-writing-layout {
    grid-template-columns: 1fr;
  }
}

.vocab-writing-prompts span {
  padding: 7px 11px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-pill);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.vocab-writing-box {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  color: var(--ink);
  padding: 14px;
  font: 800 1rem/1.6 var(--font-body);
}

.vocab-writing-box:focus {
  border-color: var(--sage);
  outline: 2px solid rgba(114, 126, 91, 0.16);
}

.vocab-writing-actions {
  margin-top: 12px;
}

.vocab-writing-result {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-sm);
  background: var(--sage-tint);
}

.vocab-writing-result[hidden] {
  display: none;
}

.vocab-writing-result.is-error {
  border-color: var(--no-line);
  background: var(--no-bg);
}

.vocab-writing-summary {
  margin: 0;
  color: var(--sage-deep);
  font-weight: 900;
  line-height: 1.55;
}

.vocab-writing-result.is-error .vocab-writing-summary {
  color: var(--no-text);
}

.vocab-writing-feedback-list {
  display: grid;
  gap: 10px;
}

.vocab-writing-feedback-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: var(--card);
}

.vocab-writing-feedback-item p {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.5;
}

.vocab-writing-feedback-item span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.voice-lab-card {
  display: grid;
  gap: 18px;
}

.voice-lab-head,
.voice-lab-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.voice-lab-status {
  min-width: min(260px, 100%);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.voice-lab-status.is-error {
  color: var(--no-text);
}

.voice-lab-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.56fr);
  gap: 14px;
}

.voice-lab-mode-field {
  grid-column: 1 / -1;
}

.voice-lab-field,
.voice-lab-slider {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.voice-lab-mode {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  width: min(100%, 340px);
  padding: 3px;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.voice-lab-mode button {
  min-height: 36px;
  border: 0;
  border-radius: calc(var(--r-sm) - 3px);
  background: transparent;
  color: var(--ink-soft);
  font: 900 0.7rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.voice-lab-mode button.is-active {
  background: var(--sage);
  color: var(--cream);
}

.voice-lab-field-wide {
  grid-column: 1 / -1;
}

.voice-lab-field select,
.voice-lab-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  color: var(--ink);
  font: 800 0.96rem/1.5 var(--font-body);
}

.voice-lab-field select {
  min-height: 42px;
  padding: 8px 10px;
}

.voice-lab-field textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.voice-lab-slider {
  padding: 12px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.voice-lab-slider span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-lab-slider strong {
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}

.voice-lab-slider input {
  width: 100%;
  accent-color: var(--sage);
}

.voice-lab-download.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.voice-lab-player {
  padding: 14px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  display: grid;
  gap: 12px;
}

.voice-lab-player audio {
  width: 100%;
  display: block;
}

.voice-lab-listen-speed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voice-lab-listen-speed-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.voice-lab-listen-speed-options button {
  min-width: 52px;
  min-height: 30px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 243, 0.72);
  color: var(--ink-soft);
  font: 900 0.68rem/1 var(--font-body);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.voice-lab-listen-speed-options button.is-active {
  background: var(--sage);
  color: var(--cream);
}

.resource-card {
  padding: 22px;
  border: 1px solid var(--lesson-frame-line);
  border-radius: var(--r-md);
  background: var(--content);
  box-shadow: 0 14px 30px rgba(74, 59, 50, 0.06);
}

.resource-card + .resource-card,
.lesson-plan-card + .lesson-plan-card {
  margin-top: 16px;
}

.resource-kicker {
  color: var(--sage-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.resource-card h2 {
  margin-top: 4px;
  font-size: 1.45rem;
}

@media (max-width: 980px) {
  .vocabulary-shell {
    display: flex;
    flex-direction: column;
  }

  .vocabulary-shell .resource-main {
    margin-left: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .vocab-topic-panel {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    order: -1;
    width: auto;
    padding: calc(var(--topbar-h) + 18px) 18px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(185, 180, 143, 0.62);
  }

  .vocab-topic-panel-inner {
    height: auto;
    padding: 14px 12px;
  }

  .vocab-topic-panel .level-topic-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0 4px;
    -webkit-overflow-scrolling: touch;
  }

  .vocab-topic-panel .level-topic-link {
    flex: 0 0 min(230px, 72vw);
    width: auto;
    min-height: 46px;
  }

  .voice-lab-grid {
    grid-template-columns: 1fr;
  }

  .voice-lab-head,
  .voice-lab-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .voice-lab-status {
    text-align: left;
  }
}

.resource-empty {
  color: var(--ink-soft);
  font-weight: 800;
}

.resource-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--ok-line);
  border-radius: var(--r-sm);
  background: var(--ok-bg);
  color: var(--ok-text);
  font-weight: 900;
}

.resource-message-error {
  border-color: var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.upload-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.lesson-plan-upload {
  display: grid;
  grid-template-columns: minmax(92px, 0.45fr) minmax(160px, 0.8fr) minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.image-library-upload,
.audio-library-upload {
  grid-template-columns: minmax(160px, 0.9fr) minmax(220px, 1.2fr) auto;
}

.lesson-plan-upload label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lesson-plan-upload select,
.lesson-plan-upload input,
.lesson-plan-upload textarea,
.lesson-plan-upload button {
  min-height: 40px;
  border-radius: var(--r-sm);
  font: 800 0.9rem/1 var(--font-body);
}

.lesson-plan-upload select,
.lesson-plan-upload input,
.lesson-plan-upload textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--lesson-frame);
  color: var(--ink);
  padding: 0 12px;
}

.lesson-plan-upload textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
}

.lesson-plan-upload input[type="file"] {
  min-height: 40px;
  padding: 7px 10px;
  border-color: rgba(114, 126, 91, 0.34);
  background: linear-gradient(180deg, rgba(255, 253, 245, 0.96), rgba(246, 239, 217, 0.78));
  color: var(--ink-soft);
  font-size: 0.82rem;
  cursor: pointer;
}

.lesson-plan-upload input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(114, 126, 91, 0.36);
  border-radius: var(--r-pill);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.lesson-plan-upload input[type="file"]:hover,
.lesson-plan-upload input[type="file"]:focus-visible {
  border-color: var(--sage-line);
  outline: none;
}

.lesson-plan-upload input[type="file"]:hover::file-selector-button {
  border-color: var(--sage);
  background: var(--sage);
  color: var(--content);
}

.lesson-plan-upload button {
  border: 1px solid var(--sage);
  background: var(--sage);
  color: var(--content);
  padding: 0 18px;
  cursor: pointer;
}

.lesson-plan-levels {
  max-width: 980px;
  margin: 0 auto;
}

.lesson-plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.lesson-plan-list {
  display: grid;
  gap: 10px;
}

.lesson-plan-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}

.lesson-plan-file:hover {
  border-color: var(--sage-line);
  background: var(--sage-tint);
}

.lesson-plan-file-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-xs);
  background: var(--rose-tint);
  color: var(--clay-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.lesson-plan-file-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lesson-plan-file-name {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-plan-file-meta,
.lesson-plan-file-action {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.lesson-plan-file-action {
  color: var(--sage-deep);
}

.lesson-plan-manage {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 2px;
}

.lesson-plan-rename {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.lesson-plan-rename label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-plan-rename input,
.lesson-plan-rename button,
.lesson-plan-delete button {
  min-height: 36px;
  border-radius: var(--r-sm);
  font: 900 0.8rem/1 var(--font-body);
}

.lesson-plan-rename input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--content);
  color: var(--ink);
  padding: 0 10px;
}

.lesson-plan-rename button,
.lesson-plan-delete button {
  padding: 0 13px;
  cursor: pointer;
}

.lesson-plan-rename button {
  border: 1px solid var(--sage);
  background: var(--sage);
  color: var(--content);
}

.lesson-plan-delete button {
  border: 1px solid var(--no-line);
  background: var(--no-bg);
  color: var(--no-text);
}

.image-library-card {
  max-width: 1080px;
  margin: 0 auto;
}

.image-library-count {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.image-library-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.image-library-preview {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(114, 126, 91, 0.22);
  border-radius: var(--r-sm);
  background: var(--content);
}

.image-library-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-library-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.image-library-info h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-library-info p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.image-library-info .image-library-use {
  color: var(--sage-deep);
}

.image-library-manage {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 0;
}

.audio-library-card {
  max-width: 1080px;
  margin: 0 auto;
}

.audio-library-transcript-field {
  grid-column: 1 / -1;
}

.audio-library-grid {
  display: grid;
  gap: 14px;
}

.audio-library-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--lesson-frame);
}

.audio-library-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(114, 126, 91, 0.24);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 243, 0.78);
  color: var(--sage-deep);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.audio-library-item audio {
  grid-column: 1 / -1;
  width: 100%;
}

.audio-library-download {
  justify-self: end;
}

.audio-library-manage {
  grid-column: 1 / -1;
}

.audio-library-fold {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid rgba(114, 126, 91, 0.18);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.58);
}

.audio-library-fold + .audio-library-fold {
  margin-top: 0;
}

.audio-library-fold-toggle strong {
  font-size: 0.92rem;
}

.audio-library-fold-content {
  padding-top: 12px;
}

.audio-library-transcript-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.audio-library-exercises-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.audio-library-exercises-head {
  display: grid;
  gap: 2px;
}

.audio-library-exercises-head p {
  margin: 0;
}

.audio-library-exercises-head p:not(.resource-kicker) {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.audio-library-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audio-library-add-row button,
.audio-library-panel-head button {
  min-height: 32px;
  border: 1px solid rgba(114, 126, 91, 0.28);
  border-radius: var(--r-pill);
  background: var(--sage-tint);
  color: var(--sage-deep);
  padding: 0 12px;
  font: 900 0.76rem/1 var(--font-body);
  cursor: pointer;
}

.audio-library-add-row button[hidden] {
  display: none;
}

.audio-library-exercise-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(114, 126, 91, 0.16);
  border-radius: var(--r-sm);
  background: rgba(250, 246, 234, 0.48);
}

.audio-library-exercise-panel[hidden] {
  display: none;
}

.audio-library-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.audio-library-panel-head p {
  margin: 0;
}

.audio-library-panel-head button {
  min-height: 28px;
  background: var(--content);
  color: var(--ink-soft);
}

.audio-library-question-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.audio-library-transcript-form label,
.audio-library-exercises-form label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audio-library-transcript-form textarea,
.audio-library-exercises-form textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--content);
  color: var(--ink);
  padding: 10px;
  font: 800 0.84rem/1.45 var(--font-body);
}

.audio-library-transcript-form button,
.audio-library-exercises-form button {
  justify-self: start;
  min-height: 36px;
  border: 1px solid var(--sage);
  border-radius: var(--r-sm);
  background: var(--sage);
  color: var(--content);
  padding: 0 13px;
  font: 900 0.8rem/1 var(--font-body);
  cursor: pointer;
}

.audio-student-exercises {
  display: grid;
  gap: 16px;
  padding-top: 2px;
}

.audio-exercise-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(114, 126, 91, 0.2);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 245, 0.62);
}

.audio-exercise-head {
  margin-bottom: 0;
}

.audio-exercise-head h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
}

@media (max-width: 820px) {
  .routine-picture-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .upload-card,
  .lesson-plan-upload,
  .image-library-upload,
  .audio-library-upload,
  .lesson-plan-manage,
  .image-library-manage,
  .audio-library-manage,
  .lesson-plan-rename {
    grid-template-columns: 1fr;
  }

  .audio-library-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audio-library-download {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .audio-library-question-pair {
    grid-template-columns: 1fr;
  }

  .lesson-plan-file {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .lesson-plan-file-action,
  .lesson-plan-manage {
    grid-column: 1 / -1;
  }

}

/* =====================================================================
   Homepage hero — painted watercolour landing
   The watercolour landscape fills the screen as a backdrop; the top bar,
   headline and call-to-action sit over it as real, selectable text.
   ===================================================================== */

:root {
  --home-cream: #f3ebcf;
  --home-off: #faf6e8;
  --home-ink: #27251f;
  --home-coral: #c9816b;
  --home-terra: #d9a08b;
  --home-olive: #7e8068;
  --home-sage: #a3a58c;
  --home-gray: #ddd6be;
  --font-editorial: "Jost", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
}

body.home {
  margin: 0;
  background: #f7f0dd;
  color: var(--home-ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.home-page {
  position: relative;
  min-height: 100vh;
}

/* --- navigation --- */
.home-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.home-nav-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 11px;
  padding-top: 2px;
  text-decoration: none;
  color: var(--home-ink);
}

.home-brand-mark {
  font-size: 18px;
  line-height: 1.1;
  color: var(--home-coral);
}

.home-brand-name {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-brand-copy {
  display: grid;
  gap: 3px;
}

.home-brand-tagline {
  color: rgba(39, 37, 31, 0.58);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.home-nav-links .account-menu summary {
  min-height: auto;
  padding: 11px 20px;
  border: 1px solid rgba(39, 37, 31, 0.2);
  background: rgba(250, 246, 232, 0.3);
  color: var(--home-ink);
  font-family: var(--font-editorial);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease);
}

.home-nav-links .account-menu summary:hover {
  background: rgba(250, 246, 232, 0.58);
  opacity: 1;
  transform: none;
}

.home-nav-links .account-menu-list {
  min-width: 148px;
  border-color: rgba(39, 37, 31, 0.16);
  background: rgba(250, 246, 232, 0.96);
}

.home-nav-links .account-menu-list a {
  font-family: var(--font-editorial);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-nav-link {
  font-family: var(--font-editorial);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--home-ink);
  opacity: 0.78;
  transition: opacity 0.25s var(--ease);
}

.home-nav-link:hover {
  opacity: 1;
}

.home-nav-account {
  padding: 11px 20px;
  border: 1px solid rgba(39, 37, 31, 0.2);
  border-radius: var(--r-pill);
  background: rgba(250, 246, 232, 0.3);
  opacity: 0.9;
  white-space: nowrap;
}

.account-home-button {
  border: 1px solid rgba(39, 37, 31, 0.16);
  cursor: pointer;
  font-family: var(--font-editorial);
}

.home-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-lang-option {
  font-family: var(--font-editorial);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--home-ink);
  opacity: 0.5;
  min-width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease);
}

.home-lang-option:hover {
  opacity: 0.8;
}

.home-lang-option.is-active {
  opacity: 1;
  background: rgba(39, 37, 31, 0.08);
}

/* --- hero --- */
.home-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.home-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 12.4vh 24px 0;
}

.home-eyebrow {
  margin: 0 0 24px;
  font-family: var(--font-editorial);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.44em;
  text-indent: 0.44em;
  text-transform: uppercase;
  color: var(--home-coral);
}

.home-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 4.9vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--home-ink);
}

.home-subtitle {
  margin: 26px auto 0;
  max-width: 396px;
  font-size: 0.96rem;
  line-height: 1.78;
  color: rgba(39, 37, 31, 0.68);
}

.home-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.home-cta {
  display: inline-block;
  min-width: 202px;
  padding: 15px 32px;
  border-radius: var(--r-pill);
  background: var(--home-ink);
  color: var(--home-off);
  font-family: var(--font-editorial);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.home-cta:hover {
  transform: translateY(-2px);
  background: #12110d;
}

/* --- the painted landscape behind everything --- */
.home-painting {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
}

/* --- responsive --- */
@media (max-width: 900px) {
  .home-nav-inner { padding: 20px 24px; }
  .home-nav-links { gap: 18px; }
  .home-hero-content { padding-top: 14vh; max-width: 640px; }
  .home-title { font-size: clamp(2.4rem, 7.4vw, 4rem); }
  .home-subtitle { max-width: 400px; }
}

@media (max-width: 620px) {
  .home-nav-inner {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
    padding: 14px;
  }
  .home-nav-links {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: calc(100vw - 28px);
    margin-left: auto;
  }
  .home-nav-links .account-menu summary {
    padding: 7px 10px;
    font-size: 10px;
    letter-spacing: 0.09em;
  }
  .home-nav-links .account-menu summary::after {
    margin-left: 5px;
  }
  .home-nav-links .account-menu-list {
    right: auto;
    left: 0;
  }
  .home-nav-link { display: none; }
  /* Keep the sign-in / log-in buttons on one line and compact so the whole
     top row fits comfortably across a phone screen. */
  .home-nav-account {
    display: inline-flex;
    padding: 7px 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .home-brand-name { font-size: 14px; letter-spacing: 0.1em; }
  .home-brand-tagline { font-size: 10px; }
  .home-brand-mark { font-size: 16px; }
  .home-brand { gap: 7px; }
  .home-brand-copy { gap: 1px; }
  .home-lang { gap: 2px; }
  .home-lang-option { min-width: 26px; height: 26px; font-size: 10px; letter-spacing: 0.06em; }
  .home-hero-content { padding: clamp(92px, 13vh, 110px) 18px 0; }
  .home-eyebrow { margin-bottom: 12px; font-size: 10px; letter-spacing: 0.34em; text-indent: 0.34em; }
  .home-title { font-size: clamp(2.1rem, 11vw, 3rem); line-height: 1; }
  .home-subtitle { margin-top: 16px; max-width: 300px; font-size: 0.9rem; line-height: 1.5; }
  .home-cta-row { margin-top: 20px; }
  .home-cta { min-width: 0; padding: 13px 26px; font-size: 11px; letter-spacing: 0.16em; text-indent: 0.16em; }
  /* On a phone the wide painting would crop to the empty valley, so lean the
     view towards the left grove where the little house and mushrooms are. */
  .home-painting { background-position: 32% bottom; }
}

@media (max-width: 620px) and (max-height: 700px) {
  .home-nav-inner { padding-top: 12px; padding-bottom: 10px; }
  .home-hero-content { padding-top: 84px; }
  .home-eyebrow { margin-bottom: 9px; }
  .home-title { font-size: clamp(1.95rem, 9.8vw, 2.7rem); }
  .home-subtitle { margin-top: 12px; font-size: 0.86rem; line-height: 1.42; }
  .home-cta-row { margin-top: 16px; }
  .home-cta { padding: 11px 22px; }
}


/* ============================================================
 * The village map — an illustrated journey through the levels.
 * ============================================================ */
/* The map fills the whole screen under the top bar — no page text above it. */
.map-page {
  background: #faf2e2;
  overflow: hidden;
}
.map-main {
  height: 100vh;
  height: 100dvh;
  padding-top: var(--topbar-h);
  overflow: hidden;
}
.village-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #faf2e2;
}

/* The painting is scaled to cover the whole map area while keeping its own
   proportions, so the plaques pinned to it always land on their landmark. */
.village-stage {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  aspect-ratio: 1672 / 941;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  container-type: size;
}

/* --- a place on the map --- */
.village-stop {
  position: absolute;
  transform: translate(-50%, 0);
  display: grid;
  justify-items: center;
  gap: 0.22cqw;
  min-width: 8cqw;
  padding: 0.58cqw 0.85cqw 0.62cqw;
  border: 1px solid rgba(126, 128, 104, 0.5);
  border-radius: 0.62cqw;
  background: rgba(255, 250, 236, 0.86);
  box-shadow: 0 0.35cqw 0.85cqw rgba(39, 37, 31, 0.1);
  text-decoration: none;
  color: var(--ink);
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1),
    background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}


.village-stop:hover,
.village-stop:focus-visible {
  background: #fffcf4;
  border-color: rgba(126, 128, 104, 0.85);
  box-shadow: 0 0.6cqw 1.25cqw rgba(39, 37, 31, 0.16);
  transform: translate(-50%, -0.4cqw);
  outline: none;
}


.village-stop.is-current {
  border-color: #7e8068;
  border-width: 1.5px;
  background: #fffaf0;
}

.village-stop-head {
  display: flex;
  align-items: center;
  gap: 0.38cqw;
}

.village-stop-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 0.92cqw;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--ink);
}

.village-stop-code {
  padding: 0.1cqw 0.36cqw;
  border-radius: 999px;
  background: #7e8068;
  color: #fff8ea;
  font-family: "Jost", sans-serif;
  font-size: 0.48cqw;
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.village-stop-blurb {
  font-family: "Jost", sans-serif;
  font-size: 0.56cqw;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(39, 37, 31, 0.66);
}

.village-stop-progress {
  display: flex;
  gap: 0.22cqw;
  margin-top: 0.15cqw;
}

.village-stop-progress i {
  width: 0.3cqw;
  height: 0.3cqw;
  border-radius: 999px;
  background: rgba(126, 128, 104, 0.28);
}

.village-stop-progress i.is-lit {
  background: #7e8068;
}

/* The way on up the mountain: a single invitation, no progress to report. */
.village-stop.is-forward {
  min-width: 0;
  padding: 0.55cqw 1.1cqw;
  background: rgba(255, 250, 236, 0.9);
  border-color: rgba(126, 128, 104, 0.6);
}
.village-stop.is-forward .village-stop-name {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  font-size: 0.95cqw;
}

/* The climb's subject — the plateau and the floating garden — sits high in
   its painting, so that picture hangs from the top of the map instead of
   standing on its floor. A short screen then trims the misty foreground
   rather than the garden. */
/* Below the picture its own foot is carried on down, fading into the mist, so
   a tall screen reads as more sky-country rather than a band with a seam. */
.climb-page .village-map { background: #d4c09a; }
.climb-page .village-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 60vh;
  background-image: url("/assets/home/summit-foot.webp?v=2");
  background-size: 100% auto;
  background-position: top;
  background-repeat: no-repeat;
  pointer-events: none;
}
.climb-page .village-stage {
  top: 0;
  bottom: auto;
}

/* Back down to the valley from the climb. */
.village-back {
  position: absolute;
  z-index: 2;
  left: 24px;
  top: 20px;
  padding: 9px 18px;
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  background: rgba(255, 250, 236, 0.88);
  box-shadow: 0 2px 7px rgba(39, 37, 31, 0.08);
  font-family: "Manrope", "Jost", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.village-back:hover {
  background: #fffcf4;
  border-color: var(--sage);
  transform: translateX(-3px);
}

/* A place still being built: hazy, quiet and not clickable. */
.village-stop.is-soon {
  cursor: default;
  border-style: dashed;
  border-color: rgba(126, 128, 104, 0.4);
  background: rgba(245, 241, 223, 0.78);
}
.village-stop.is-soon .village-stop-name { color: var(--sage-deep); }
.village-stop.is-soon .village-stop-code { background: #a3a58c; }
.village-stop.is-soon:hover {
  transform: translate(-50%, 0);
  box-shadow: 0 0.35cqw 0.85cqw rgba(39, 37, 31, 0.1);
  border-color: rgba(126, 128, 104, 0.4);
  background: rgba(245, 241, 223, 0.78);
}

/* Below 1024px the top bar joins the page flow instead of floating over it,
   so the map must not reserve room for it a second time. */
@media (max-width: 1024px) {
  .map-main {
    padding-top: 0;
    height: calc(100dvh - var(--topbar-h));
  }
}

/* A phone is far too narrow to hold the whole valley at a readable size, so
   the painting is sized to the height instead and the student swipes along it
   from the gate up to the summit, the same way the path runs. */
@media (max-width: 760px) {
  .village-map {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .village-map::-webkit-scrollbar { display: none; }
  .village-stage {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    /* Sized from the height so the whole valley keeps its proportions and
       simply runs off the side of the screen to be swiped along. */
    width: calc((100dvh - var(--topbar-h)) * 1672 / 941);
    height: 100%;
  }
  .village-stop { min-width: 9.2cqw; }
  .village-stop-name { font-size: 1.06cqw; }
  .village-stop-code { font-size: 0.55cqw; }
  .village-stop-blurb { font-size: 0.64cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .village-stop { transition: none; }
  .village-stop:hover,
  .village-stop:focus-visible { transform: translate(-50%, 0); }
}

/* Link back to the village map from the course sidebar. */
.sidebar-village-link {
  display: inline-block;
  margin: 0 0 14px;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--frame-ink);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 160ms ease;
}
.sidebar-village-link:hover { opacity: 1; text-decoration: underline; }

/* ============================================================
 * Inside a place — grammar, vocabulary, and test rooms.
 * ============================================================ */
.grammar-page { background: var(--bg); }
.place-page { background: #faf1dd; }
.place-main {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 22px) 24px 80px;
}
.grammar-main {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 22px) 24px 80px;
}
.place-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  padding: 9px 18px;
  background: var(--content);
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(39, 37, 31, 0.08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.place-back:hover {
  background: var(--surface-hover);
  border-color: var(--sage);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(39, 37, 31, 0.12);
}
.place-hero { text-align: center; max-width: 620px; margin: 0 auto 30px; }
.place-hero h1 {
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 6px 0 8px;
}
.place-code {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--sage);
  color: #FBF7E9;
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 1px;
}
.place-lede { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; margin: 0 auto; }

.place-level-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 26px;
}
.place-level-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--sage-line);
  border-radius: 16px;
  background: rgba(255, 248, 234, 0.78);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(39, 37, 31, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
a.place-level-step:hover {
  background: var(--content);
  border-color: var(--sage);
  box-shadow: 0 8px 18px rgba(39, 37, 31, 0.10);
  transform: translateY(-2px);
}
.place-level-step-next {
  align-items: flex-end;
  text-align: right;
}
.place-level-step-kicker {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
}
.place-level-step-title {
  overflow-wrap: anywhere;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.place-level-step.is-disabled {
  opacity: 0.48;
  background: rgba(250, 246, 234, 0.48);
  box-shadow: none;
}

.place-level-step-plan .place-level-step-title {
  font-family: var(--font-title, "Lora", Georgia, serif);
}

.room-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
}
.room-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 20px 24px;
  background: var(--content);
  border: 1px solid var(--sage-line);
  border-radius: 20px;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
a.room-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 26px rgba(39, 37, 31, 0.10);
  border-color: var(--sage);
}
.room-art {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 6px 0 10px;
}
.room-art-svg { width: 168px; height: auto; overflow: visible; }
.room-kicker {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 0 2px;
}
.room-head { width: 100%; }
.room-foot { margin-top: auto; padding-top: 12px; }
.room-head h2 {
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: 1.5rem;
  margin: 0 0 6px;
}
.room-enter {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sage);
  letter-spacing: 0.3px;
}
.room-card.is-soon {
  cursor: default;
  border-style: dashed;
  border-color: var(--clay-line);
  background: var(--surface-soft);
}
.room-card.is-soon .room-art-svg { opacity: 0.85; }

@media (max-width: 620px) {
  .place-level-nav { grid-template-columns: 1fr; max-width: 380px; }
  .room-cards { grid-template-columns: 1fr; max-width: 380px; }
}

/* =====================================================================
   Painted paper for the opened rooms
   The grammar lesson and the vocabulary lesson wear Stasya's layout
   watercolour: olive paper on the top bar and topic panel, cream paper
   behind the page, and the little cottage tucked into the top right.
   ===================================================================== */
.lesson-shell,
.vocabulary-shell {
  background-image: url("/assets/home/page-paper.webp?v=1");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

.lesson-shell .lesson-main-page,
.vocabulary-shell .resource-main {
  background: none;
}

/* The olive frame, cut to the shape each piece is stretched over. Every page
   with a top bar wears the same painted paper across it. */
.topbar {
  background-image: url("/assets/home/frame-paper-top.webp?v=1");
  background-size: cover;
  background-position: center;
}

.level-topic-panel,
.vocab-topic-panel {
  background-image: url("/assets/home/frame-paper-side.webp?v=1");
  background-size: cover;
  background-position: center top;
}

.lesson-shell .page-flora,
.vocabulary-shell .page-flora {
  display: none;
}

/* =====================================================================
   Level page typography (A0 - C1)
   A storybook pairing: Lora for the things worth naming, Manrope for the
   small labels, counts and actions around them. Warm charcoal for primary
   text, muted olive for everything secondary.
   ===================================================================== */
.place-page {
  --font-title: "Lora", "Iowan Old Style", Georgia, serif;
  --font-ui: "Manrope", "Jost", ui-sans-serif, system-ui, sans-serif;
  --level-secondary: #6b6550;
}

/* INSIDE THE GATE */
.place-page .hero-kicker {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--sage);
}

.place-page .place-hero h1 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.place-page .place-code {
  margin: 0;
  padding: 4px 12px;
  align-self: center;
  background: var(--sage);
  color: #fbf7e9;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.place-page .place-lede {
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--level-secondary);
}

/* Moving between levels. */
.place-page .place-level-step {
  align-items: center;
  text-align: center;
}
.place-page .place-level-step-kicker {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
}
.place-page .place-level-step-title {
  font-family: var(--font-title);
  font-size: 1.14rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.place-page .place-level-step.is-disabled .place-level-step-title,
.place-page .place-level-step.is-disabled .place-level-step-kicker {
  color: var(--level-secondary);
}

/* The three rooms. */
.place-page .room-kicker {
  margin: 0 0 4px;
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--sage);
}
.place-page .room-head h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.place-page .room-enter {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sage);
}
.place-page .room-enter-soon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  font-style: italic;
  color: var(--clay);
}
.place-page .place-back { font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.02em; }

/* =====================================================================
   The painted room-picker
   On a roomy screen the place page is laid over its watercolour: the
   painting supplies the title plaque, the two level cards and the three
   room cards, and the live text is positioned on top of them as a
   percentage of the artwork. Narrower screens keep the plain card layout.
   ===================================================================== */
@media (min-width: 900px) {
  .place-page .place-main {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    max-width: none;
    min-height: 100dvh;
    padding: var(--topbar-h) 0 0;
  }
  .place-page .page-flora { display: none; }

  .place-stage {
    position: relative;
    width: min(100%, calc((100dvh - var(--topbar-h)) * 1840 / 854));
    aspect-ratio: 1840 / 854;
    background: var(--place-painting) center / 100% 100% no-repeat;
    container-type: size;
  }

  /* Everything below is placed against the painted shapes. */
  .place-stage .place-back {
    position: absolute;
    left: 2.4%;
    top: 3.4%;
    margin: 0;
    padding: 0.5cqw 1.2cqw;
    font-size: 0.72cqw;
  }

  .place-stage .place-hero {
    position: static;
    max-width: none;
    margin: 0;
  }
  .place-stage .hero-kicker {
    position: absolute;
    left: 0;
    right: 0;
    top: 0.8%;
    margin: 0;
    font-size: 0.62cqw;
  }
  /* The name sits on the painted olive plaque, the level in its round bud. */
  .place-stage .place-hero h1 {
    position: static;
    margin: 0;
  }
  .place-stage .place-name {
    position: absolute;
    left: 40%;
    top: 4.5%;
    width: 17.5%;
    height: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.42cqw;
    line-height: 1.1;
    text-align: center;
    color: #fbf7e9;
  }
  .place-stage .place-code {
    position: absolute;
    left: 58.5%;
    top: 6.4%;
    width: 4.5%;
    height: 6.6%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    background: none;
    font-size: 0.8cqw;
    font-weight: 700;
    color: #fbf7e9;
  }
  .place-stage .place-lede {
    position: absolute;
    left: 30%;
    width: 40%;
    top: 20.6%;
    margin: 0;
    text-align: center;
    font-size: 0.78cqw;
    line-height: 1.4;
  }

  .place-stage .place-level-nav {
    display: block;
    max-width: none;
    margin: 0;
  }
  .place-stage .place-level-step {
    position: absolute;
    top: 23.5%;
    height: 12%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3cqw;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    text-align: center;
  }
  .place-stage .place-level-step-prev { left: 21.8%; width: 27.4%; }
  .place-stage .place-level-step-next { left: 51%; width: 27.2%; }
  .place-stage .place-level-step-kicker { font-size: 0.62cqw; }
  .place-stage .place-level-step-title { font-size: 1.06cqw; }
  .place-stage a.place-level-step:hover {
    transform: none;
    background: rgba(255, 252, 242, 0.4);
    border-radius: 1.6cqw;
  }

  /* The painting draws the three cards and their buildings, so the live
     cards are just click targets with their words at the foot. */
  .place-stage .room-cards {
    display: block;
    max-width: none;
    margin: 0;
  }
  .place-stage .room-card {
    position: absolute;
    top: 40%;
    height: 52%;
    display: block;
    padding: 0;
    background: none;
    border: none;
    border-radius: 2.2cqw;
    transition: background 200ms ease, transform 200ms ease;
  }
  .place-stage .room-card:nth-child(1) { left: 12.6%; width: 23.6%; }
  .place-stage .room-card:nth-child(2) { left: 38.3%; width: 23.1%; }
  .place-stage .room-card:nth-child(3) { left: 63.4%; width: 23.6%; }
  .place-stage a.room-card:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 252, 242, 0.45);
  }
  .place-stage .room-art { display: none; }
  /* The name sits in the clear strip above the painted building; the way in
     waits at the foot of the card. */
  .place-stage .room-head,
  .place-stage .room-foot {
    position: absolute;
    left: 1.5cqw;
    right: 1.5cqw;
    text-align: center;
  }
  .place-stage .room-head { top: 3.5%; width: auto; }
  .place-stage .room-foot { bottom: 5%; margin: 0; padding: 0; }
  .place-stage .room-kicker { margin: 0 0 0.2cqw; font-size: 0.58cqw; }
  .place-stage .room-head h2 { margin: 0; font-size: 1.34cqw; line-height: 1.25; }
  .place-stage .room-enter { font-size: 0.74cqw; }
  .place-stage .room-card.is-soon { border: none; background: none; }

  .place-stage .place-level-step-plan {
    background: rgba(255, 252, 242, 0.28);
    border-radius: 1.6cqw;
  }

  .place-stage .place-level-step-plan:hover {
    background: rgba(255, 252, 242, 0.5);
  }
}

/* Between 900px and 1024px the top bar is part of the page flow, so the
   painted stage must not reserve its height a second time. */
@media (min-width: 900px) and (max-width: 1024px) {
  .place-page .place-main {
    min-height: calc(100dvh - var(--topbar-h));
    padding-top: 0;
  }
  .place-stage { width: min(100%, calc((100dvh - var(--topbar-h)) * 1840 / 854)); }
}

/* ============================================================
 * Grammar — a garden of lesson tiles.
 * ============================================================ */
.grammar-page .page-flora {
  opacity: 0.38;
}
.grammar-page .place-hero {
  max-width: 560px;
  margin-bottom: 28px;
}
.grammar-page .place-hero h1 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}
.grammar-page .place-lede {
  max-width: 440px;
  font-size: 0.95rem;
}
.lesson-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 280px));
  justify-content: center;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}
.lesson-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px 14px;
  background: rgba(250, 246, 234, 0.68);
  border: 1px solid rgba(183, 185, 143, 0.54);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(39, 37, 31, 0.03);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.lesson-tile:hover {
  background: var(--content);
  box-shadow: 0 6px 14px rgba(39, 37, 31, 0.06);
  border-color: rgba(111, 114, 86, 0.62);
}
.lesson-tile-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-tint);
  border-radius: 12px;
}
.lesson-tile-icon .flora-icon { width: 34px; height: 34px; }
.lesson-tile-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lesson-tile-title {
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.22;
}
.lesson-tile-sub {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.28;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lesson-tile-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lesson-tile-spark { color: #9f7e3d; font-size: 0.72rem; }
.lesson-tile-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-tint);
  border-radius: 999px;
  color: var(--sage-deep);
  font-family: 'Jost', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
}
.lesson-tile.is-started {
  background: #fbf5e6;
  border-color: #d8c79a;
}
.lesson-tile.is-started .lesson-tile-icon { background: #F3E7C6; }

@media (max-width: 520px) {
  .lesson-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
}

.room-note-sprout { display: inline-block; width: 20px; height: 20px; vertical-align: -5px; }

.recommended-plan-main {
  position: relative;
  min-height: 100dvh;
  padding: calc(var(--topbar-h) + 16px) 18px 22px;
  background: var(--bg);
  text-align: center;
  overflow: hidden;
}

.recommended-plan-page .page-flora {
  opacity: 0.28;
}

.recommended-plan-page-head {
  position: relative;
  z-index: 1;
  width: min(100%, 1080px);
  margin: 0 auto 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 16px;
}

.recommended-plan-page-head > div {
  grid-column: 1;
  min-width: 0;
  text-align: center;
}

.recommended-plan-page-head .resource-kicker {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: "Cormorant Garamond", var(--font-title, "Lora", Georgia, serif);
  font-size: clamp(1rem, 1.45vw, 1.28rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.recommended-plan-page-head h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", var(--font-title, "Lora", Georgia, serif);
  font-size: clamp(1.38rem, 2.35vw, 2rem);
  font-weight: 600;
  line-height: 1.12;
}

.recommended-plan-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  white-space: nowrap;
}

.recommended-plan {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw, calc((100dvh - var(--topbar-h) - 112px) * 1.8008));
  margin: 0 auto;
  text-align: center;
}

.recommended-plan-picture {
  position: relative;
}

.recommended-plan-picture img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.recommended-plan-labels {
  position: absolute;
  inset: 0;
  margin: 0;
}

.recommended-plan-topic {
  position: absolute;
  left: var(--plan-x);
  top: var(--plan-y);
  width: 10.8%;
  height: 18.8%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0 1.3%;
  color: rgba(66, 55, 39, 0.9);
  text-align: center;
  text-decoration: none;
  border-radius: 18px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.recommended-plan-topic:hover,
.recommended-plan-topic:focus-visible {
  background: rgba(255, 251, 239, 0.52);
  color: rgba(48, 55, 37, 0.98);
  transform: translate(-50%, -50%) scale(1.03);
  outline: none;
}

.recommended-plan-number {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: clamp(15px, 1.85vw, 24px);
  height: clamp(15px, 1.85vw, 24px);
  border: 1px solid rgba(124, 127, 91, 0.4);
  border-radius: 999px;
  background: rgba(255, 251, 239, 0.45);
  color: rgba(112, 91, 58, 0.94);
  font-family: "Cormorant Garamond", var(--font-title, "Lora", Georgia, serif);
  font-size: clamp(0.62rem, 1vw, 0.84rem);
  font-weight: 500;
  line-height: 1;
}

.recommended-plan-title {
  display: block;
  min-width: 0;
  color: currentColor;
  font-family: "Cormorant Garamond", var(--font-title, "Lora", Georgia, serif);
  font-size: clamp(0.6rem, 1.1vw, 1rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: 0;
  text-wrap: balance;
}

.recommended-plan-fallback {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 20px auto 0;
  display: grid;
  gap: 8px;
}

.recommended-plan-fallback a {
  padding: 10px 12px;
  border: 1px solid var(--sage-line);
  border-radius: 12px;
  background: var(--content);
  color: var(--ink);
  font-family: var(--font-title, "Lora", Georgia, serif);
  text-decoration: none;
}

@media (max-width: 760px) {
  .recommended-plan-main {
    overflow: auto;
    padding: calc(var(--topbar-h) + 14px) 10px 18px;
  }

  .recommended-plan-page-head {
    width: min(100%, 560px);
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .recommended-plan-page-head > div,
  .recommended-plan-back {
    grid-column: 1;
  }

  .recommended-plan {
    width: min(1180px, calc((100dvh - var(--topbar-h) - 118px) * 1.8008));
    min-width: 760px;
  }

  .recommended-plan-topic {
    width: 10.8%;
    gap: 0.28em;
  }

  .recommended-plan-title {
    font-size: clamp(0.58rem, 1.05vw, 0.82rem);
  }

  .recommended-plan-number {
    width: clamp(14px, 2vw, 20px);
    height: clamp(14px, 2vw, 20px);
    font-size: clamp(0.54rem, 1vw, 0.68rem);
  }
}

/* Lesson page shown without the old course sidebar. */
.site-shell.no-sidebar { display: block; }
.page.page-full { margin-left: 0; }
.lesson-back { margin-bottom: 10px; }

.lesson-page { --level-topic-w: clamp(276px, 23vw, 326px); }

.lesson-shell {
  display: block;
  min-height: 100vh;
  padding-top: var(--topbar-h);
}

.lesson-shell .lesson-main-page {
  margin-top: 0;
  margin-left: var(--level-topic-w);
}

.lesson-shell .page-inner {
  max-width: 920px;
}

/* The grammar lesson wears the same head as the vocabulary lesson: the small
   olive kicker over one big serif title, with no rule beneath it. */
.lesson-shell .lesson-hero {
  padding-bottom: 0;
  margin-bottom: 26px;
  border-bottom: none;
}

.lesson-shell .hero-text h1 {
  margin-top: 6px;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
}

.lesson-shell .hero-meta {
  max-width: 620px;
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.level-topic-panel {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 2;
  width: var(--level-topic-w);
  padding: 14px 8px 8px;
  border-right: 1px solid var(--line-strong);
  background-color: var(--frame);
  color: var(--frame-ink);
}

.level-topic-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0 6px 10px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 95, 70, 0.35) transparent;
}

.level-topic-panel-inner::-webkit-scrollbar {
  width: 7px;
}

.level-topic-panel-inner::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(160, 95, 70, 0.28);
}

.level-topic-map-link {
  display: inline-flex;
  flex: none;
  margin: 2px 10px 12px;
  color: var(--frame-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.level-topic-map-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.level-topic-head {
  flex: none;
  padding: 0 10px 12px;
  color: var(--frame-muted);
  border-bottom: 1px solid rgba(35, 34, 25, 0.16);
}

.level-topic-head h2 {
  margin-top: 3px;
  font-size: 1.12rem;
  line-height: 1.12;
  color: var(--frame-ink);
}

.level-topic-list {
  display: grid;
  gap: 2px;
  flex: 1;
  min-height: 0;
  padding-top: 10px;
}

.level-topic-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  padding: 9px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--frame-muted);
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.level-topic-link:hover {
  border-color: transparent;
  background: var(--surface-hover);
}

.level-topic-link.is-active {
  border-color: transparent;
  background: var(--sage);
  box-shadow: none;
}

.level-topic-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(250, 246, 234, 0.48);
  border-radius: 999px;
  background: rgba(250, 246, 234, 0.82);
  color: var(--frame-ink);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
}

.level-topic-link.is-active .level-topic-num {
  border-color: rgba(250, 246, 234, 0.82);
  background: var(--content);
  color: var(--sage-deep);
}

.level-topic-copy {
  display: grid;
  min-width: 0;
}

.level-topic-title {
  overflow: hidden;
  color: var(--frame-ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-topic-sub {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--frame-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.level-topic-count {
  align-self: start;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(231, 228, 212, 0.86);
  color: var(--sage-deep);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
}

.level-topic-link.is-started .level-topic-count {
  background: #f3e7c6;
  color: #7c6330;
}

.level-topic-link.is-active .level-topic-title,
.level-topic-link.is-active .level-topic-sub,
.level-topic-link.is-active .level-topic-count {
  color: var(--content);
}

.level-topic-link.is-active .level-topic-count {
  background: rgba(250, 246, 234, 0.18);
}

@media (max-width: 980px) {
  .lesson-shell {
    display: flex;
    flex-direction: column;
  }

  .lesson-shell .lesson-main-page {
    margin-left: 0;
  }

  .level-topic-panel {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    order: -1;
    width: auto;
    padding: 18px 18px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(185, 180, 143, 0.62);
  }

  .level-topic-panel-inner {
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
    padding: 14px 12px;
    border-radius: 14px;
  }

  .level-topic-head {
    padding-bottom: 10px;
  }

  .level-topic-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .level-topic-link {
    flex: 0 0 min(290px, 78vw);
  }
}

@media (max-width: 680px) {
  .vocab-topic-panel {
    padding: calc(var(--topbar-h) + 10px) 12px 0;
  }

  .vocab-topic-panel-inner,
  .level-topic-panel-inner {
    padding: 10px 4px 12px;
  }

  .vocab-topic-panel .level-topic-link {
    flex-basis: min(190px, 68vw);
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 42px;
    padding: 7px 8px;
  }

  .level-topic-panel {
    padding: 12px 12px 0;
  }

  .level-topic-head {
    padding: 0 4px 8px;
  }

  .level-topic-head h2 {
    font-size: 1rem;
  }

  .level-topic-link {
    flex-basis: min(220px, 72vw);
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 48px;
    padding: 7px 8px;
  }

  .level-topic-num,
  .vocab-topic-panel .level-topic-num {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .level-topic-title {
    font-size: 0.82rem;
  }

  .vocab-topic-panel .level-topic-title {
    font-size: 0.8rem;
  }

  .level-topic-sub {
    font-size: 0.66rem;
    -webkit-line-clamp: 1;
  }

  .lesson-shell .page-inner {
    padding: 20px 14px 44px;
  }

  .lesson-shell .lesson-hero {
    margin-bottom: 18px;
  }
}

/* Numbered grammar tiles (in place of the botanical icon). */
.lesson-tile-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ece7d6;
  border: 1px solid rgba(183, 185, 143, 0.55);
  border-radius: 999px;
  color: var(--sage-deep);
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
}
.lesson-tile.is-started .lesson-tile-num {
  background: #f3e7c6;
  border-color: #d8c79a;
  color: #7c6330;
}
.lesson-tile-spark { flex: 0 0 auto; color: #9f7e3d; font-size: 0.72rem; }

@media (max-width: 760px) {
  .people-jobs-audio-match-layout {
    grid-template-columns: 1fr;
  }

  .people-jobs-audio-slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  }
}
