:root {
  --bg: #faf7f3;
  --paper: #ffffff;
  --paper-soft: #fef5e7;
  --line: #eadfce;
  --ink: #2d2218;
  --muted: #7a6e60;
  --berry: #e8453c;
  --berry-dark: #c0392b;
  --leaf: #6b8e4e;
  --sky: #edf3ee;
  --sun: #f0a830;
  --sand: #f5ead8;
  --shadow: 0 4px 24px rgba(45, 34, 24, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --latin-font: "Avenir Next", "Trebuchet MS", "Helvetica Neue", sans-serif;
  --hanzi-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display-font: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --learner-hanzi-size: 1.3rem;
  --learner-pinyin-size: 0.95rem;
  --learner-english-size: 1.1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--latin-font);
  line-height: 1.6;
  background: var(--bg);
}

button {
  font: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display-font);
}

.zh {
  font-family: var(--hanzi-font);
}

.site-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.global-view-menu {
  position: fixed;
  top: 4px;
  left: 16px;
  z-index: 160;
}

.global-view-menu > summary {
  list-style: none;
}

.global-view-menu > summary::marker {
  content: "";
  font-size: 0;
}

.global-view-menu > summary::-webkit-details-marker {
  display: none;
}

.global-view-trigger {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(45, 34, 24, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(45, 34, 24, 0.1);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.global-view-trigger:hover,
.global-view-trigger:focus-visible {
  background: var(--paper-soft);
  transform: translateX(2px);
}

.global-view-icon,
.global-view-icon::before,
.global-view-icon::after {
  display: block;
  width: 27px;
  height: 3px;
  border-radius: 999px;
  background: #a5680b;
}

.global-view-icon {
  position: relative;
}

.global-view-icon::before,
.global-view-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.global-view-icon::before {
  top: -9px;
}

.global-view-icon::after {
  top: 9px;
}

.global-view-panel {
  position: absolute;
  top: 0;
  left: 66px;
  display: grid;
  width: 156px;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(45, 34, 24, 0.14);
}

.global-view-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.global-view-item:hover,
.global-view-item:focus-visible {
  transform: translateX(2px);
  background: var(--paper-soft);
}

.global-view-item.is-active {
  border-color: rgba(240, 168, 48, 0.32);
  background: var(--paper-soft);
}

.global-view-zh {
  font-family: var(--hanzi-font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}

.global-view-en {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.18;
  text-transform: uppercase;
}

.global-view-item.is-active .global-view-zh {
  color: #a5680b;
}

.global-view-item.is-active .global-view-en {
  color: #a5680b;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 18px;
}

.site-mark,
.site-nav-links {
  display: flex;
  align-items: center;
}

.site-mark {
  gap: 25px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-mark-hanzi {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fffaf5;
  background: linear-gradient(135deg, var(--berry-dark), var(--berry));
  font-family: var(--hanzi-font);
  font-size: 1.35rem;
}

.site-nav-links {
  gap: 6px;
}

.site-nav-link {
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  color: var(--berry-dark);
  background: rgba(255, 253, 248, 0.74);
}

.site-nav-culture {
  color: var(--berry-dark);
  background: var(--paper-soft);
}

.library-hero {
  display: grid;
  justify-items: center;
  padding: clamp(56px, 9vw, 94px) 28px clamp(46px, 7vw, 72px);
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 56% 48% at 50% 0%, rgba(240, 168, 48, 0.12), transparent),
    linear-gradient(180deg, rgba(232, 69, 60, 0.04), transparent 55%),
    var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.library-hero-hanzi {
  color: #a5680b;
  font-family: var(--hanzi-font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.library-hero h1 {
  margin-top: 14px;
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.library-hero h2 {
  margin-top: 14px;
  color: var(--sun);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.library-hero-subtitle {
  max-width: 58ch;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.library-hero-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  width: min(760px, 100%);
  margin-top: 28px;
}

.library-hero-route {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.library-hero-route:hover,
.library-hero-route:focus-visible,
.library-hero-route.is-active {
  transform: translateY(-3px);
  border-color: rgba(240, 168, 48, 0.32);
  box-shadow: 0 12px 34px rgba(45, 34, 24, 0.1);
}

.library-route-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #a5680b;
  background: var(--paper-soft);
  font-family: var(--hanzi-font);
  font-size: 1.25rem;
  font-weight: 800;
}

.library-route-copy {
  display: grid;
  gap: 2px;
}

.library-route-zh {
  font-family: var(--hanzi-font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.library-route-en {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.library-hero-route.is-active .library-route-en {
  color: #a5680b;
}

.landing-hero {
  display: grid;
  justify-items: center;
  padding: clamp(56px, 9vw, 104px) 28px clamp(48px, 7vw, 78px);
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 55% 50% at 50% 0%, rgba(240, 168, 48, 0.14), transparent),
    linear-gradient(180deg, rgba(232, 69, 60, 0.045), transparent 50%),
    var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.landing-hero-hanzi {
  color: var(--berry);
  font-family: var(--hanzi-font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.landing-hero h1 {
  max-width: 15ch;
  margin-top: 14px;
  font-size: clamp(3rem, 6.4vw, 5.5rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.landing-hero h1 em {
  color: var(--berry);
  font-style: normal;
}

.landing-hero-subtitle {
  max-width: 55ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.landing-action {
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.landing-action:hover,
.landing-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 9px 18px rgba(45, 34, 24, 0.12);
}

.landing-action-primary {
  color: #fff;
  background: var(--berry);
}

.landing-action-quiet {
  border-color: rgba(45, 34, 24, 0.1);
  color: var(--berry-dark);
  background: var(--paper);
}

.landing-hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.landing-routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.landing-route {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  min-height: 222px;
  padding: 28px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.landing-route:hover,
.landing-route:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45, 34, 24, 0.1);
}

.landing-route::before {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--route-accent);
  content: "";
}

.landing-route-learn { --route-accent: var(--berry); }
.landing-route-culture { --route-accent: var(--sun); }

.landing-route-symbol {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: var(--berry-dark);
  background: #fff0df;
  font-family: var(--hanzi-font);
  font-size: 1.7rem;
  font-weight: 700;
}

.landing-route-culture .landing-route-symbol {
  color: #a5680b;
  background: var(--paper-soft);
}

.landing-route-copy {
  display: grid;
  gap: 7px;
}

.landing-route-kicker {
  color: var(--route-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.landing-route-copy strong {
  font-family: var(--display-font);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.03;
}

.landing-route-copy small {
  max-width: 35ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.landing-route-arrow {
  color: var(--route-accent);
  font-size: 1.45rem;
  font-weight: 700;
}

.main-layout {
  margin-top: 38px;
}

.is-topic-page .library-hero,
.is-topic-page .switcher-panel {
  display: none;
}

.switcher-panel,
.detail-panel {
  border-color: rgba(45, 34, 24, 0.07);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.view-switcher {
  padding: 5px;
  background: var(--paper-soft);
}

.view-tab {
  font-weight: 700;
}

.view-tab.is-active {
  background: var(--berry);
}

.section-heading h2,
.detail-heading h2 {
  letter-spacing: -0.035em;
}

.browser-group {
  border-color: rgba(45, 34, 24, 0.07);
  background: #fffaf4;
}

.browser-group-header:hover {
  background: var(--paper-soft);
}

.browser-group-meta,
.topic-row-meta,
.lesson-row-meta {
  color: var(--berry);
}

.topic-row,
.lesson-row,
.lookup-card {
  border: 1px solid rgba(45, 34, 24, 0.07);
  background: var(--paper);
}

.topic-row.is-selected,
.lesson-row.is-selected {
  outline-color: rgba(232, 69, 60, 0.18);
  background: #fff6e9;
}

.focus-card {
  border: 1px solid rgba(45, 34, 24, 0.06);
  background: #fffaf4;
}

.learning-category {
  padding: 30px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.learning-category-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(45, 34, 24, 0.05);
}

.learning-category-header h3 {
  font-size: clamp(1.65rem, 2.5vw, 2.05rem);
  letter-spacing: -0.03em;
}

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

.topic-library-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: 18px;
  color: var(--ink);
  background: #fffaf4;
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.topic-library-card:hover,
.topic-library-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(232, 69, 60, 0.3);
  box-shadow: 0 9px 18px rgba(45, 34, 24, 0.08);
}

.topic-library-card.is-selected {
  border-color: rgba(232, 69, 60, 0.38);
  background: #fff1df;
  box-shadow: 0 0 0 3px rgba(232, 69, 60, 0.09);
}

.topic-library-card .topic-scene {
  width: 116px;
  height: 92px;
  border-radius: 15px;
}

.book-browser {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.book-home-board {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-library-grid {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  width: 100%;
}

.book-browser-card,
.book-lesson-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.book-browser-card {
  min-height: 84px;
  padding: 14px;
  border-top: 4px solid var(--book-accent, var(--sun));
}

.book-browser-card span {
  color: var(--book-accent, var(--berry-dark));
  font-family: var(--display-font);
  font-size: 1.25rem;
  font-weight: 700;
}

.book-library-card {
  min-height: 0;
  padding: 0;
}

.book-browser-card small,
.book-lesson-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.book-browser-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.3;
}

.book-browser-card:hover,
.book-browser-card:focus-visible,
.book-browser-card.is-selected,
.book-lesson-card:hover,
.book-lesson-card:focus-visible,
.book-lesson-card.is-selected {
  border-color: color-mix(in srgb, var(--book-accent, var(--sun)) 36%, white);
  background: #fff0dc;
}

.book-browser-card:hover,
.book-lesson-card:hover {
  transform: translateY(-2px);
}

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

.book-category-book-card {
  min-height: 96px;
}

.book-category-section.is-selected {
  border-color: color-mix(in srgb, var(--category-accent, var(--sun)) 26%, white);
}

.book-category-lessons {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 2px solid rgba(45, 34, 24, 0.06);
}

.book-category-lessons-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.book-category-lessons-head h3 {
  margin-top: 4px;
  color: var(--book-accent, var(--berry));
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  line-height: 1.08;
}

.book-category-lessons-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

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

.book-lesson-card {
  position: relative;
  gap: 6px;
  min-height: 0;
  padding: 18px;
  border: 1px solid rgba(221, 207, 187, 0.76);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: none;
}

.book-lesson-card::after {
  display: none;
}

.book-lesson-card strong {
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero,
.switcher-panel,
.detail-panel,
.topic-card,
.book-card,
.lesson-chip,
.step-card,
.guide-card,
.small-button,
.view-tab {
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: center;
  padding: 44px;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(249, 243, 232, 0.94));
}

.hero-kicker,
.section-kicker,
.progress-label {
  color: var(--berry);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 8px;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  line-height: 0.94;
}

.hero-text,
.section-heading p,
.detail-heading p,
.sub-panel-heading p,
.guide-card p,
.topic-card p,
.book-card p,
.step-card p,
.alignment-item p {
  color: var(--muted);
  line-height: 1.45;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-proof span {
  padding: 7px 10px;
  border: 1px solid rgba(148, 66, 48, 0.14);
  border-radius: 999px;
  color: var(--berry-dark);
  background: rgba(255, 250, 245, 0.66);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-button,
.small-button,
.view-tab,
.topic-card,
.lesson-chip {
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.small-button {
  padding: 12px 18px;
  border-radius: 18px;
  min-height: 52px;
  font-weight: 700;
}

.hero-button:hover,
.small-button:hover,
.view-tab:hover,
.topic-card:hover,
.lesson-chip:hover {
  transform: translateY(-2px);
}

.hero-button {
  padding: 14px 18px;
  border-radius: 999px;
}

.hero-button-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, var(--berry), #d07d5f);
}

.hero-button-secondary,
.small-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.hero-button-secondary {
  text-decoration: none;
}

.hero-illustration {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--sky) 0%, #eff4e8 56%, #f7ead6 100%);
}

.hero-sun {
  position: absolute;
  top: 34px;
  right: 44px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(243, 201, 119, 0.88);
}

.hero-hill {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 50% 50% 0 0;
}

.hero-hill-back {
  bottom: 86px;
  height: 120px;
  background: #bed0ba;
}

.hero-hill-front {
  bottom: 0;
  height: 160px;
  background: #92ad86;
}

.hero-path {
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: 160px;
  height: 220px;
  transform: translateX(-50%);
  border-radius: 90px 90px 0 0;
  background: #f5e7cf;
}

.hero-card {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 118px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  text-align: center;
  font-weight: 700;
}

.hero-card-left {
  left: 22px;
  bottom: 30px;
}

.hero-card-right {
  right: 22px;
  top: 118px;
}

.hero-card-emoji {
  font-family: var(--hanzi-font);
  font-size: 1.35rem;
}

.hero-speech {
  position: absolute;
  top: 34px;
  left: 30px;
  padding: 10px 14px;
  border-radius: 18px;
  color: var(--berry-dark);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 10px 20px rgba(35, 49, 59, 0.1);
  font-family: var(--hanzi-font);
  font-size: 1.5rem;
  font-weight: 700;
  transform: rotate(-4deg);
}

.pathway-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.6fr);
  gap: 26px;
  align-items: end;
  margin-top: 22px;
  padding: 26px 30px;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: var(--radius-xl);
  background: linear-gradient(105deg, #f1e4cd, #fffaf1 48%, #edf3e9);
  box-shadow: var(--shadow);
}

.pathway-heading {
  display: grid;
  gap: 8px;
}

.pathway-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.05;
}

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

.pathway-step {
  display: grid;
  gap: 5px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.pathway-step:hover,
.pathway-step:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(35, 49, 59, 0.1);
}

.pathway-number {
  color: var(--berry);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pathway-hanzi {
  color: var(--berry-dark);
  font-family: var(--hanzi-font);
  font-size: 1.7rem;
  line-height: 1;
}

.pathway-step small {
  color: var(--muted);
  line-height: 1.25;
}

.main-layout {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.switcher-panel,
.detail-panel {
  padding: 24px;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.94);
}

.view-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: var(--paper-soft);
}

.view-tab {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
}

.view-tab.is-active {
  color: #fffaf5;
  background: linear-gradient(135deg, var(--berry-dark), var(--berry));
}

.view-panel {
  margin-top: 20px;
}

.view-panel.is-hidden {
  display: none;
}

.section-heading,
.detail-heading,
.sub-panel-heading {
  display: grid;
  gap: 8px;
}

.detail-back-nav {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(45, 34, 24, 0.08);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 4px 14px rgba(78, 55, 43, 0.07);
}

.detail-back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.32rem 0.62rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--berry);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.detail-back-link.is-book {
  color: #9b6516;
}

.detail-back-link:hover,
.detail-back-link:focus-visible {
  color: var(--berry-dark);
  background: #fff0e8;
  transform: translateY(-0.5px);
  text-decoration: none;
}

.detail-back-link.is-book:hover,
.detail-back-link.is-book:focus-visible {
  background: #ffe9be;
  color: #754608;
}

.is-topic-page .detail-layout {
  padding-top: 18px;
}

.section-heading h2,
.detail-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.browser-groups,
.detail-layout,
.topic-columns {
  display: grid;
  gap: 18px;
}

.browser-groups {
  margin-top: 18px;
}

.browser-group {
  border: 1px solid rgba(221, 207, 187, 0.74);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fcf8f0, #f2e8d8);
  overflow: hidden;
}

.browser-group-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.browser-group-header:hover {
  background: rgba(255, 255, 255, 0.24);
}

.browser-group-copy {
  display: grid;
  gap: 6px;
}

.browser-group-copy h3 {
  font-size: 1.2rem;
}

.browser-group-meta {
  color: var(--berry-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.browser-group-chevron {
  color: var(--berry-dark);
  font-size: 1.15rem;
  font-weight: 700;
}

.browser-group-body {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding: 0 18px 18px;
}

.browser-group.is-collapsed .browser-group-body {
  display: none;
}

.topic-row,
.lesson-row {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius-md);
  text-align: left;
  background: linear-gradient(180deg, #fffdf8, #f4ede0);
  cursor: pointer;
}

.topic-row {
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  min-height: 132px;
  padding: 16px;
}

.topic-row.is-selected,
.lesson-row.is-selected {
  outline: 3px solid rgba(190, 91, 73, 0.18);
  background: linear-gradient(180deg, #fff9f3, #efe2cc);
}

.topic-row-title,
.lesson-row-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.topic-row-meta,
.lesson-row-meta {
  color: var(--berry-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.topic-scene {
  display: grid;
  place-items: center;
  width: 132px;
  height: 100px;
  border-radius: 24px;
  color: #fffaf5;
  font-family: var(--hanzi-font);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: inset 0 -10px 0 rgba(255, 255, 255, 0.12);
}

.topic-scene-art {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -10px 0 rgba(255, 255, 255, 0.1);
}

.topic-scene-art::before {
  content: "";
  position: absolute;
  inset: 10px 12px auto auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.topic-scene-chip-row,
.topic-scene-rhyme-row,
.topic-scene-dots,
.topic-scene-rhythm-bars,
.topic-scene-faces {
  position: absolute;
}

.topic-scene-chip-row,
.topic-scene-rhyme-row {
  display: flex;
  gap: 6px;
  left: 12px;
  right: 12px;
  bottom: 16px;
  justify-content: center;
}

.topic-scene-chip {
  min-width: 28px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 250, 245, 0.92);
  color: rgba(75, 46, 28, 0.92);
  font-family: var(--hanzi-font);
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(61, 37, 27, 0.12);
}

.topic-scene-chip-accent {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--topic-accent) 82%, white);
}

.topic-scene-dots {
  top: 18px;
  left: 18px;
  display: flex;
  gap: 6px;
}

.topic-scene-dots span,
.topic-scene-rhythm-bars span,
.topic-scene-faces span {
  display: block;
}

.topic-scene-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--topic-accent) 78%, white);
  box-shadow: 0 2px 4px rgba(61, 37, 27, 0.12);
}

.topic-scene-rhythm-bars {
  left: 22px;
  right: 22px;
  top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.topic-scene-rhythm-bars span {
  width: 14px;
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
}

.topic-scene-rhythm-bars span:nth-child(1) {
  height: 18px;
}

.topic-scene-rhythm-bars span:nth-child(2) {
  height: 28px;
}

.topic-scene-rhythm-bars span:nth-child(3) {
  height: 22px;
}

.topic-scene-rhythm-bars span:nth-child(4) {
  height: 34px;
}

.topic-scene-bubble,
.topic-scene-name-tag,
.topic-scene-pill {
  position: absolute;
  background: rgba(255, 250, 245, 0.92);
  color: rgba(75, 46, 28, 0.92);
  box-shadow: 0 4px 10px rgba(61, 37, 27, 0.12);
}

.topic-scene-bubble {
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 14px;
  font-family: var(--hanzi-font);
  font-size: 1.15rem;
}

.topic-scene-bubble::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 12px;
  height: 12px;
  background: rgba(255, 250, 245, 0.92);
  transform: rotate(45deg);
}

.topic-scene-bubble-left {
  left: 18px;
  top: 30px;
}

.topic-scene-bubble-left::after {
  left: 9px;
}

.topic-scene-bubble-right {
  right: 18px;
  top: 22px;
}

.topic-scene-bubble-right::after {
  right: 9px;
}

.topic-scene-bubble-wide {
  width: 58px;
  left: 18px;
  top: 26px;
}

.topic-scene-heart {
  position: absolute;
  right: 24px;
  top: 34px;
  width: 18px;
  height: 18px;
  background: color-mix(in srgb, var(--topic-accent) 76%, white);
  transform: rotate(-45deg);
  border-radius: 4px 4px 0 0;
}

.topic-scene-heart::before,
.topic-scene-heart::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: color-mix(in srgb, var(--topic-accent) 76%, white);
  border-radius: 50%;
}

.topic-scene-heart::before {
  top: -9px;
  left: 0;
}

.topic-scene-heart::after {
  top: 0;
  left: 9px;
}

.topic-scene-spark {
  position: absolute;
  width: 12px;
  height: 12px;
  background: color-mix(in srgb, var(--topic-accent) 80%, white);
  transform: rotate(45deg);
  border-radius: 3px;
}

.topic-scene-spark-top {
  left: 58px;
  top: 18px;
}

.topic-scene-name-tag {
  left: 16px;
  top: 26px;
  padding: 8px 12px;
  border-radius: 14px;
  font-family: var(--hanzi-font);
  font-size: 1.15rem;
}

.topic-scene-faces {
  right: 16px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.topic-scene-faces span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--topic-accent) 74%, white);
  box-shadow: 0 4px 10px rgba(61, 37, 27, 0.12);
}

.topic-scene-faces span:nth-child(2) {
  background: rgba(255, 250, 245, 0.9);
}

.topic-scene-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-family: var(--hanzi-font);
  font-size: 0.98rem;
}

.topic-scene-pill-age {
  left: 16px;
  top: 24px;
}

.topic-scene-pill-grade {
  right: 16px;
  bottom: 18px;
  background: color-mix(in srgb, var(--topic-accent) 76%, white);
}

.topic-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.topic-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.lookup-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.lookup-shell.is-hidden {
  display: none;
}

.lookup-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.lookup-field span {
  color: var(--berry-dark);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lookup-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(221, 207, 187, 0.9);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fffdf8;
  font: inherit;
}

.lookup-card {
  display: grid;
  gap: 22px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.lookup-meta {
  color: var(--berry-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.lookup-title {
  font-size: 1.15rem;
  font-weight: 700;
}

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

.detail-layout {
  grid-template-columns: 1fr;
}

.detail-layout.is-hidden {
  display: none;
}

.progress-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--paper-soft);
}

.progress-copy {
  display: grid;
  gap: 4px;
}

.topic-lesson-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.topic-lesson-strip.is-hidden {
  display: none;
}

.topic-lesson-card {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 14px;
  color: var(--ink);
  background: #fffaf4;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.topic-lesson-card:hover,
.topic-lesson-card:focus-visible {
  transform: translateY(-2px);
  background: var(--paper-soft);
}

.topic-lesson-card.is-active {
  border-color: rgba(240, 168, 48, 0.32);
  background: var(--paper-soft);
}

.topic-lesson-meta {
  color: #a5680b;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.topic-lesson-card strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.topic-lesson-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.inline-book-lesson-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: #a5680b;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

.inline-book-lesson-link::after {
  content: "↗";
  font-size: 0.9rem;
}

.inline-book-lesson-link:hover,
.inline-book-lesson-link:focus-visible {
  color: var(--berry);
  text-decoration: underline;
}

.is-pinyin-hidden #topic-detail [class*="pinyin"] {
  display: none !important;
}

.is-english-hidden #topic-detail [class*="english"],
.is-english-hidden #topic-detail .topic-lesson-en,
.is-english-hidden #topic-detail .focus-status,
.is-english-hidden #topic-detail .numbers-game-note,
.is-english-hidden #topic-detail #activity-panel-title,
.is-english-hidden #topic-detail #activity-panel-summary,
.is-english-hidden #topic-detail .visual-vocabulary-heading h4,
.is-english-hidden #topic-detail .visual-vocabulary-heading > p,
.is-english-hidden #topic-detail .numbers-game-top h4,
.is-english-hidden #topic-detail .greetings-game-feedback,
.is-english-hidden #topic-detail .greetings-game-scene-note p:not(.body-match-kicker),
.is-english-hidden #topic-detail .body-sentence-note,
.is-english-hidden #topic-detail .math-game-feedback,
.is-english-hidden #topic-detail .guide-detail {
  display: none !important;
}

/* The strokes lesson supplies its English labels without the shared English classes. */
.is-english-hidden #topic-detail .stroke-lab-header > div > p,
.is-english-hidden #topic-detail .stroke-lab-title-en,
.is-english-hidden #topic-detail .stroke-level-tabs button span,
.is-english-hidden #topic-detail .stroke-explanation-frame h4 span,
.is-english-hidden #topic-detail .stroke-explanation-frame > p:last-child,
.is-english-hidden #topic-detail .stroke-picker-button > span small,
.is-english-hidden #topic-detail .stroke-rules .body-match-kicker,
.is-english-hidden #topic-detail .stroke-rules small,
.is-english-hidden #topic-detail .stroke-practice-library .body-match-kicker,
.is-english-hidden #topic-detail .stroke-order-practice .body-match-kicker,
.is-english-hidden #topic-detail .stroke-order-practice h4 span,
.is-english-hidden #topic-detail .stroke-order-practice header p:last-child,
.is-english-hidden #topic-detail .stroke-build-preview p {
  display: none !important;
}

.focus-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fffdf8, #f7efe2);
}

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

#toggle-audio-button,
#toggle-pinyin-button,
#toggle-english-button {
  display: none;
}

.small-button.is-toggle-active {
  background: linear-gradient(135deg, #ffffff, #f2e7d5);
  color: var(--berry-dark);
  font-weight: 700;
}

.small-button.is-toggle-inactive {
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
}

.small-button.is-action-button {
  color: #fffaf5;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 20px;
  min-height: 56px;
  background: linear-gradient(135deg, var(--berry-dark), #cf7f56);
  border: 1px solid rgba(148, 66, 48, 0.18);
  box-shadow: 0 10px 24px rgba(190, 91, 73, 0.2);
}

.small-button.is-action-button:hover,
.small-button.is-action-button:focus-visible {
  background: linear-gradient(135deg, #8f3b2d, #d8895f);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.16), 0 14px 28px rgba(190, 91, 73, 0.24);
}

/* Clear restarts only the learner's answer; it must never look like New game. */
.intro-build-actions .small-button.is-clear-button {
  color: var(--berry-dark);
  background: #fffaf4;
  border-color: rgba(148, 66, 48, 0.25);
}

.intro-build-actions .small-button.is-clear-button:hover,
.intro-build-actions .small-button.is-clear-button:focus-visible {
  background: #f8eadc;
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.14);
}

.numbers-game-top .small-button.is-clear-button {
  color: var(--berry-dark);
  background: #fffaf4;
  border-color: rgba(148, 66, 48, 0.25);
}

.numbers-game-top .small-button.is-clear-button:hover,
.numbers-game-top .small-button.is-clear-button:focus-visible {
  background: #f8eadc;
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.14);
}

.small-button.is-play-button,
.small-button.is-practice-advance-button,
.small-button.is-playback-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px !important;
  height: 58px;
  min-width: 58px;
  max-width: 58px;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(46, 112, 67, 0.42);
  border-radius: 16px;
  flex: 0 0 58px;
  color: #f9fff5;
  background: linear-gradient(145deg, #79b866, #3f8d58);
  box-shadow: 0 9px 20px rgba(52, 121, 74, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 0;
}

.small-button.is-play-button::before,
.small-button.is-practice-advance-button::before,
.small-button.is-playback-control-button::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentColor;
  filter: drop-shadow(0 1px 0 rgba(27, 76, 42, 0.24));
}

.small-button.is-pause-button::before {
  width: 16px;
  height: 20px;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 5px, transparent 5px 11px, currentColor 11px 16px);
}

.small-button.is-stop-button::before {
  width: 18px;
  height: 18px;
  border: 0;
  background: currentColor;
  border-radius: 3px;
}

.small-button.is-pause-button {
  color: #5d4511;
  border-color: rgba(177, 126, 30, 0.48);
  background: linear-gradient(145deg, #f7d568, #dfa92d);
  box-shadow: 0 9px 20px rgba(191, 139, 28, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.small-button.is-stop-button {
  color: #fff8f5;
  border-color: rgba(142, 54, 46, 0.46);
  background: linear-gradient(145deg, #df806d, #b9473b);
  box-shadow: 0 9px 20px rgba(171, 61, 49, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.small-button.is-resume-button::before {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentColor;
  background: transparent;
}

.small-button.is-play-button:hover,
.small-button.is-play-button:focus-visible,
.small-button.is-practice-advance-button:hover,
.small-button.is-practice-advance-button:focus-visible,
.small-button.is-playback-control-button:hover,
.small-button.is-playback-control-button:focus-visible {
  background: linear-gradient(145deg, #89c873, #347d4d);
  box-shadow: 0 0 0 4px rgba(82, 158, 91, 0.2), 0 12px 24px rgba(52, 121, 74, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.small-button.is-play-button:active,
.small-button.is-practice-advance-button:active,
.small-button.is-playback-control-button:active {
  transform: translateY(1px) scale(0.98);
}

.small-button.is-pause-button:hover,
.small-button.is-pause-button:focus-visible {
  background: linear-gradient(145deg, #ffe17b, #d89d22);
  box-shadow: 0 0 0 4px rgba(234, 183, 53, 0.22), 0 12px 24px rgba(191, 139, 28, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.small-button.is-stop-button:hover,
.small-button.is-stop-button:focus-visible {
  background: linear-gradient(145deg, #ed927c, #a93d34);
  box-shadow: 0 0 0 4px rgba(198, 75, 61, 0.2), 0 12px 24px rgba(171, 61, 49, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.small-button.is-hidden {
  display: none;
}

.focus-explorer {
  margin-top: 18px;
}

.pinyin-lab {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid rgba(184, 95, 117, 0.18);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff9ef 0%, #fff2f5 52%, #f3f7ff 100%);
}

.pinyin-course-lab {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pinyin-lab-header,
.pinyin-listen-card,
.pinyin-tone-card,
.pinyin-blend-card,
.pinyin-use-card,
.pinyin-tone-result,
.pinyin-practice-card .numbers-game-top {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.pinyin-lab-header h3,
.pinyin-lab h4 {
  margin-top: 3px;
}

.pinyin-lab-header > div > p:last-child,
.pinyin-lab p:not(.body-match-kicker) {
  color: var(--muted);
}

.pinyin-lab-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: #8f3d5a;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
  text-align: center;
}

.pinyin-lab-badge small {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
}

.pinyin-course-nav {
  padding: 0;
  border-radius: 16px;
  background: transparent;
}

.pinyin-course-books {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pinyin-course-book {
  display: grid;
  min-height: 74px;
  place-items: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(184, 95, 117, 0.22);
  border-radius: 18px;
  color: #8f3d5a;
  background: #fff7f8;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.pinyin-course-book small {
  font-size: 0.66rem;
  font-weight: 700;
  opacity: 0.72;
}

.pinyin-course-book > span {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.15;
}

.pinyin-course-book > span b {
  color: currentColor;
  font-weight: 500;
  opacity: 0.58;
}

.pinyin-chapter-section {
  gap: 14px;
}

.school-scene-grid.pinyin-chapter-grid {
  grid-template-columns: minmax(0, 1fr);
}

.pinyin-chapter-section-note {
  color: var(--muted);
  font-size: 0.96rem;
}

.pinyin-chapter-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pinyin-basic-chapter-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pinyin-chapter-card h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 1.08rem;
  font-weight: 800;
}

.pinyin-chapter-english,
.pinyin-chapter-helper {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.pinyin-chapter-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
}

.pinyin-chapter-heading .body-match-kicker,
.pinyin-chapter-heading .pinyin-chapter-english {
  margin: 0;
}

.pinyin-chapter-heading .pinyin-play-all {
  margin-left: auto;
}

.pinyin-chapter-heading .body-match-kicker {
  color: #bd4335;
  font-size: 1.2rem;
}

.pinyin-chapter-definition {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.pinyin-chapter-card-body {
  display: grid;
  gap: 12px;
}

.pinyin-chapter-card-body > section {
  display: grid;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid rgba(45, 34, 24, 0.08);
}

.pinyin-chapter-card .pinyin-ready-sounds {
  gap: 7px;
}

.pinyin-sound-chip {
  min-width: 42px;
  padding: 8px;
  border: 0;
  border-radius: 13px;
  color: #a34363;
  background: #fff1f4;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}

.pinyin-basic-sound-row {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(62px, 1fr));
  width: 100%;
  gap: 14px !important;
}

.pinyin-chapter-sound-row.pinyin-sound-count-3 {
  grid-template-columns: repeat(3, minmax(62px, 1fr));
}

.pinyin-chapter-sound-row.pinyin-sound-count-4 {
  grid-template-columns: repeat(4, minmax(62px, 1fr));
}

.pinyin-chapter-sound-row.pinyin-sound-count-5 {
  grid-template-columns: repeat(5, minmax(62px, 1fr));
}

.pinyin-chapter-card .pinyin-basic-sound-row .pinyin-sound-chip {
  min-width: 62px;
  padding: 18px 12px;
  font-size: 2.6rem;
  line-height: 1;
}

.pinyin-unit-blending-tones .pinyin-basic-sound-row .pinyin-sound-chip {
  padding: 18px 10px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.pinyin-unit-whole-yiwu .pinyin-basic-examples > div {
  grid-template-columns: 42px repeat(4, minmax(0, 1fr));
}

.pinyin-unit-blending-tones .pinyin-basic-examples > div {
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(0, 1fr));
}

.pinyin-unit-blending-tones .pinyin-basic-examples strong {
  white-space: nowrap;
}

.pinyin-basic-examples {
  grid-template-columns: 1fr;
  gap: 0 !important;
}

.pinyin-basic-examples > div {
  display: grid;
  grid-template-columns: 42px repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(45, 34, 24, 0.08);
}

.pinyin-standard-chapter-card {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(45, 34, 24, 0.1);
}

.pinyin-chapter-practice {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #fff8ef;
}

.pinyin-chapter-practice-options {
  display: grid;
  gap: 9px;
}

.pinyin-chapter-practice-options.pinyin-sound-count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pinyin-chapter-practice-options.pinyin-sound-count-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pinyin-chapter-practice-options.pinyin-sound-count-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pinyin-chapter-practice-options.pinyin-sound-count-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pinyin-chapter-practice .answer-result-mark {
  top: 6px;
  right: 7px;
  width: 20px;
  height: 20px;
  font-size: 0.85rem;
}

.pinyin-basic-examples > div:last-child {
  border-bottom: 0;
}

.pinyin-basic-examples strong {
  color: #8f3d5a;
  font-size: 1.35rem;
}

.pinyin-word-audio {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  color: var(--ink) !important;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.pinyin-word-audio b,
.pinyin-word-audio span {
  display: block;
}

.pinyin-basic-examples .pinyin-word-audio span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.pinyin-u-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 15px;
  color: #735967;
  background: #fff4f6;
}

.pinyin-u-rule strong {
  color: #8f3d5a;
}

.pinyin-u-rule p {
  margin: 0;
}

.pinyin-tone-chapter-card {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(45, 34, 24, 0.1);
}

.pinyin-tone-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.pinyin-tone-row > button {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: repeat(3, 1fr);
  gap: 5px 10px;
  align-items: center;
  align-content: center;
  min-height: 132px;
  padding: 13px 15px;
  border: 0;
  border-radius: 14px;
  color: inherit;
  background: #fff4f6;
  text-align: left;
  cursor: pointer;
}

.pinyin-tone-row strong,
.pinyin-tone-row .pinyin-tone-contour {
  color: #8f3d5a;
}

.pinyin-tone-row strong {
  font-size: 1.55rem;
  line-height: 1;
}

.pinyin-tone-contour {
  width: 64px;
  height: 32px;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}

.pinyin-tone-contour path {
  fill: none;
  stroke: #c34a3d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.pinyin-tone-contour polygon {
  fill: #c34a3d;
}

.pinyin-tone-row b {
  grid-column: 1;
  font-family: var(--hanzi-font);
  font-size: 1.55rem;
}

.pinyin-tone-row small {
  grid-column: 1;
  color: var(--muted);
  font-size: 1rem;
}

.pinyin-basics-practice {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.pinyin-basics-practice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.pinyin-basics-practice-tone .pinyin-ear-game:last-child,
.pinyin-basics-practice-final .pinyin-ear-game:first-child {
  display: none;
}

.pinyin-spelling-rules .pinyin-chapter-definition {
  max-width: 760px;
}

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

.pinyin-rule-list section {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff4f6;
}

.pinyin-rule-list strong {
  color: #8f3d5a;
}

.pinyin-rule-list p {
  margin: 5px 0 0;
}

.pinyin-ear-game {
  padding: 20px;
  border-radius: 20px;
  background: #fff8ef;
}

.pinyin-ear-game-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pinyin-ear-game-heading h4 {
  flex: 1;
}

.pinyin-ear-game-heading h4,
.pinyin-ear-game > p {
  margin: 0;
}

.pinyin-tone-choice-row,
.pinyin-final-choice-row {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.pinyin-tone-choice-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pinyin-final-choice-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pinyin-tone-choice,
.pinyin-final-choice {
  position: relative;
  min-height: 66px;
  border: 1px solid rgba(143, 61, 90, 0.22);
  border-radius: 14px;
  color: #8f3d5a;
  background: #fff4f6;
  font-weight: 800;
  cursor: pointer;
}

.pinyin-final-choice {
  font-size: 1.65rem;
}

.pinyin-tone-choice {
  display: grid;
  place-items: center;
}

.pinyin-tone-choice-contour {
  width: min(86%, 88px);
  height: 42px;
}

.pinyin-tone-choice-contour path {
  fill: none;
  stroke: #c34a3d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.pinyin-tone-choice-contour polygon {
  fill: #c34a3d;
}

.pinyin-tone-choice .answer-result-mark,
.pinyin-final-choice .answer-result-mark {
  top: 6px;
  right: 7px;
  width: 20px;
  height: 20px;
  font-size: 0.85rem;
}

.pinyin-tone-choice.is-correct,
.pinyin-final-choice.is-correct {
  border-color: #4d9b63;
  color: #286b43;
  background: #eaf7e8;
}

.pinyin-tone-choice.is-wrong,
.pinyin-final-choice.is-wrong {
  border-color: #c5514a;
  color: #a83d36;
  background: #fff0ee;
}

.pinyin-basics-feedback {
  min-height: 25px;
  margin: 13px 0 0 !important;
  color: var(--muted);
}

@media (max-width: 980px) {
  .pinyin-basics-practice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .pinyin-ear-game {
    padding: 16px;
  }

  .pinyin-final-choice-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pinyin-chapter-use {
  color: var(--muted);
}

.pinyin-chapter-word {
  font-family: var(--hanzi-font);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.pinyin-practice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.pinyin-course-book:hover,
.pinyin-course-book:focus-visible,
.pinyin-course-book.is-selected {
  border-color: #a34363;
  color: #fff;
  background: #a34363;
}

.pinyin-course-select-label {
  display: flex;
  flex: 1 1 280px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.pinyin-course-select-label select {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(184, 95, 117, 0.24);
  border-radius: 10px;
  color: #8f3d5a;
  background: #fffdfd;
  font: inherit;
  font-weight: 700;
}

.pinyin-ready-card {
  display: grid;
  gap: 10px;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid rgba(184, 95, 117, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
}

.pinyin-ready-sounds {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pinyin-ready-sounds span {
  min-width: 52px;
  padding: 11px;
  border-radius: 13px;
  color: #a34363;
  background: #fff1f4;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

.pinyin-ready-rule {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #8f3d5a;
}

.pinyin-ready-rule strong {
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff1f4;
}

.pinyin-sound-tabs,
.pinyin-tone-options,
.pinyin-practice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pinyin-sound-tab,
.pinyin-tone-button,
.pinyin-practice-option {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 74px;
  border: 1px solid rgba(184, 95, 117, 0.16);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.pinyin-sound-tab > span {
  color: #a34363;
  font-size: 1.65rem;
  font-weight: 800;
}

.pinyin-sound-tab small,
.pinyin-tone-button small,
.pinyin-practice-option small {
  color: var(--muted);
  font-size: 0.76rem;
}

.pinyin-sound-tab:hover,
.pinyin-sound-tab:focus-visible,
.pinyin-sound-tab.is-selected,
.pinyin-tone-button:hover,
.pinyin-tone-button:focus-visible,
.pinyin-tone-button.is-selected,
.pinyin-practice-option:hover,
.pinyin-practice-option:focus-visible {
  border-color: rgba(184, 95, 117, 0.5);
  background: #fff;
  transform: translateY(-2px);
}

.pinyin-listen-card,
.pinyin-tone-card,
.pinyin-blend-card,
.pinyin-use-card,
.pinyin-practice-card {
  padding: clamp(16px, 2.8vw, 24px);
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.pinyin-listen-card {
  justify-content: flex-start;
}

.pinyin-letter-stage {
  display: grid;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #d9788d, #a34363);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.28), 0 10px 22px rgba(163, 67, 99, 0.24);
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1;
}

.pinyin-listen-copy {
  display: grid;
  gap: 5px;
}

.pinyin-tone-card,
.pinyin-blend-card,
.pinyin-use-card {
  display: grid;
  gap: 14px;
}

.pinyin-tone-options,
.pinyin-practice-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pinyin-tone-button {
  min-height: 110px;
}

.pinyin-tone-mark {
  color: #a34363;
  font-size: 2.1rem;
  font-weight: 800;
}

.pinyin-tone-arrow,
.pinyin-practice-option > span {
  color: #6a6fb3;
  font-size: 1.55rem;
  font-weight: 800;
}

.pinyin-tone-result {
  justify-content: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff8e9;
}

.pinyin-tone-result strong {
  color: #a34363;
  font-size: 1.45rem;
}

.text-play-button {
  margin-left: auto;
  border: 0;
  color: #8f3d5a;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pinyin-blend-equation {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a34363;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
}

.pinyin-blend-equation strong {
  display: grid;
  min-width: 58px;
  min-height: 48px;
  place-items: center;
  border-radius: 12px;
  color: #a3a0a0;
  background: #f2edf0;
}

.pinyin-blend-equation strong.is-revealed {
  color: #347d4d;
  background: #e8f5e5;
}

.pinyin-use-card h4 {
  font-family: var(--hanzi-font);
  font-size: 2.55rem;
}

.pinyin-use-reading {
  color: #8f3d5a !important;
  font-weight: 800;
}

.pinyin-practice-card {
  display: grid;
  gap: 16px;
}

.pinyin-practice-step {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(45, 34, 24, 0.09);
}

.pinyin-practice-step:first-of-type {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.pinyin-practice-step h4,
.pinyin-practice-step p {
  margin: 0;
}

.pinyin-practice-english-title {
  margin: -9px 0 2px !important;
  color: var(--muted) !important;
  font-size: 0.96rem;
  font-weight: 700;
}

.pinyin-practice-instruction {
  display: grid;
  gap: 2px;
  color: var(--ink) !important;
  font-size: 1.08rem;
  font-weight: 800;
}

.pinyin-practice-instruction span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.pinyin-practice-word {
  color: var(--ink) !important;
  font-family: var(--hanzi-font);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
}

.pinyin-practice-reading {
  color: #8f3d5a !important;
  font-size: 1.05rem;
  font-weight: 800;
}

.pinyin-build-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pinyin-build-piece {
  min-width: 74px;
  min-height: 58px;
  padding: 10px 16px;
  border: 1px solid rgba(184, 95, 117, 0.24);
  border-radius: 16px;
  color: #8f3d5a;
  background: #fff1f4;
  cursor: pointer;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 800;
}

.pinyin-build-piece:hover:not(:disabled),
.pinyin-build-piece:focus-visible:not(:disabled) {
  border-color: #a34363;
  background: #fff;
}

.pinyin-build-piece:disabled {
  cursor: default;
}

.pinyin-build-answer {
  min-height: 26px;
  color: #347d4d !important;
  font-size: 1.1rem;
  font-weight: 800;
}

.pinyin-practice-option {
  min-height: 88px;
}

.pinyin-practice-option.is-correct {
  border-color: rgba(52, 125, 77, 0.55);
  background: #e8f5e5;
}

.pinyin-practice-option.is-wrong {
  border-color: rgba(190, 71, 59, 0.52);
  background: #ffebe6;
}

.pinyin-practice-feedback {
  min-height: 24px;
  color: #347d4d;
  font-weight: 700;
}

.stroke-lab {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid rgba(71, 124, 134, 0.2);
  border-radius: 24px;
  background: linear-gradient(135deg, #f4fbfb, #f9f7ef 58%, #fff4e9);
}

.stroke-lab-header,
.stroke-tian-card {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.stroke-lab-header > span {
  padding: 8px 11px;
  border-radius: 999px;
  color: #316a75;
  background: #e2f2f2;
  font-weight: 800;
}

.stroke-level-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stroke-level-tabs button {
  padding: 10px;
  border: 1px solid rgba(71, 124, 134, 0.22);
  border-radius: 12px;
  color: #316a75;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
  cursor: pointer;
}

.stroke-level-tabs button small { color: var(--muted); font-weight: 600; }
.stroke-level-tabs button { font-size: 1.16rem; }
.stroke-level-tabs button span { color: inherit; font-family: inherit; font-size: inherit; font-weight: inherit; }
.stroke-level-tabs button.is-active { border-color: #316a75; background: #dff1ed; }

.stroke-tian-card,
.stroke-book-card,
.stroke-compound-card,
.stroke-practice-card {
  padding: clamp(16px, 2.8vw, 24px);
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

/* Keep English guidance comfortably readable throughout the strokes lesson. */
.stroke-lab,
.stroke-practice-library,
.stroke-order-practice,
.stroke-build-preview {
  --stroke-english-min-size: 1.5rem;
}

.stroke-player {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1.5px solid rgba(71, 124, 134, 0.3);
  border-radius: 0;
  background-color: #fffdf8;
  background-image: linear-gradient(rgba(71, 124, 134, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(71, 124, 134, 0.1) 1px, transparent 1px);
  background-size: 25% 25%;
}

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

.stroke-single-frame,
.stroke-character-frame,
.stroke-explanation-frame {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 230px;
  padding: 14px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.stroke-character-frame svg {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(71, 124, 134, 0.3);
  background-color: #fffdf8;
  background-image: linear-gradient(rgba(71, 124, 134, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(71, 124, 134, 0.1) 1px, transparent 1px);
  background-size: 25% 25%;
}

.stroke-character-frame > strong {
  justify-self: center;
  color: #316a75;
  font-family: var(--hanzi-font);
  font-size: 1.45rem;
}

.stroke-character-path { fill: #b9c6c4; }
.stroke-character-path.is-highlighted { fill: #be5b49; }
.stroke-explanation-frame h4 { margin: 0; color: #316a75; font-family: var(--hanzi-font); font-size: 2.1rem; }
.stroke-explanation-frame h4 span { font-family: var(--body-font); font-size: var(--stroke-english-min-size); font-weight: 700; }
.stroke-explanation-frame p { margin: 0; font-size: var(--stroke-english-min-size); }
.stroke-explanation-frame small { color: var(--muted); }

.stroke-guide {
  fill: #d7e5e4;
}

.stroke-demo-fill {
  fill: #316a75;
}

.stroke-reveal {
  fill: none;
  stroke: #fff;
  stroke-width: 164;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: stroke-draw 1100ms linear forwards;
}

.stroke-motion {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 9;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  opacity: 0;
  animation: stroke-direction-show 260ms ease-out 1120ms forwards;
}

.stroke-arrowhead { fill: rgba(255, 255, 255, 0.92); }

@keyframes stroke-draw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

@keyframes stroke-direction-show {
  to { opacity: 0.92; }
}

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

.stroke-picker-button,
.stroke-practice-options button {
  display: grid;
  gap: 3px;
  min-height: 70px;
  padding: 8px;
  border: 1px solid rgba(71, 124, 134, 0.2);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.stroke-picker-button strong {
  color: #316a75;
  font-family: var(--hanzi-font);
  font-size: 1.48rem;
}

.stroke-picker-button small,
.stroke-rules small,
.stroke-practice-options small {
  color: var(--muted);
}

.stroke-picker-button:hover,
.stroke-picker-button:focus-visible,
.stroke-picker-button.is-selected {
  border-color: rgba(49, 106, 117, 0.56);
  background: #eaf6f4;
}

.stroke-picker-button {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.stroke-picker-button svg { width: 57px; height: 57px; }
.stroke-picker-button svg path { fill: #316a75; }
.stroke-picker-button > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.stroke-picker-button > span strong { font-size: 1.48rem; }
.stroke-picker-button em { color: #7d7162; font-size: var(--stroke-english-min-size); font-style: normal; }
.stroke-picker-button em::before { content: "· "; }
.stroke-picker-button > span small { width: 100%; margin-top: 2px; font-size: var(--stroke-english-min-size); }

.stroke-rules {
  display: grid;
  gap: 10px;
}

.stroke-rules > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.stroke-rules button {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(226, 242, 242, 0.74);
  cursor: pointer;
  text-align: left;
}

.stroke-rules button:hover,
.stroke-rules button:focus-visible {
  border-color: #316a75;
  background: #dff1ed;
}

.stroke-rules strong { color: #316a75; font-family: var(--hanzi-font); font-size: 1.5rem; }
.stroke-rules small { font-size: var(--stroke-english-min-size); }

.stroke-lab .body-match-kicker,
.stroke-practice-library .body-match-kicker,
.stroke-order-practice .body-match-kicker {
  font-size: var(--stroke-english-min-size);
}

.stroke-lab-header > div > p:last-child,
.stroke-level-tabs button {
  font-size: var(--stroke-english-min-size);
}

.stroke-lab-header h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--berry-dark);
  font-family: var(--hanzi-font);
  font-size: 1.5rem;
  font-weight: 800;
}

.stroke-lab-title-en {
  color: inherit;
  font-family: var(--latin-font);
  font-size: inherit;
  font-weight: inherit;
}

#topic-detail:has(.stroke-lab) #activity-panel-title,
#topic-detail:has(.stroke-lab) #activity-panel-summary {
  font-size: 1.5rem;
}

.stroke-csl-anchor {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
  margin: 12px 0;
  padding: 8px 10px;
  border-left: 3px solid #8ab9af;
  border-radius: 0 10px 10px 0;
  background: rgba(226, 242, 242, 0.66);
}

.stroke-csl-anchor span,
.stroke-csl-anchor em { color: var(--muted); font-size: 0.78rem; font-style: normal; }
.stroke-csl-anchor strong { color: #316a75; font-family: var(--hanzi-font); font-size: 1.7rem; line-height: 1; }
.stroke-csl-anchor em { grid-column: 1 / -1; }

.stroke-compound-card { display: grid; gap: 16px; }

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

.stroke-compound-choice {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-align: left;
  background: rgba(226, 242, 242, 0.74);
  cursor: pointer;
}

.stroke-compound-choice.is-selected { border-color: #316a75; background: #d5eeee; }
.stroke-compound-choice svg { width: 58px; height: 58px; }
.stroke-compound-choice svg path { fill: #316a75; }
.stroke-compound-choice div { display: grid; gap: 1px; }
.stroke-compound-choice strong { color: #316a75; }
.stroke-compound-choice em { color: #7d7162; font-size: .76rem; font-style: normal; }
.stroke-compound-choice small { color: var(--muted); font-size: .73rem; }

.stroke-compound-grid strong { color: #316a75; }
.stroke-compound-grid span { font-family: var(--hanzi-font); font-size: 1.45rem; line-height: 1; }
.stroke-compound-grid small { grid-column: 1 / -1; color: var(--muted); font-size: 0.73rem; }

.stroke-book-card {
  display: grid;
  gap: 10px;
}

.stroke-book-card > .body-match-kicker { margin: 0; }

.stroke-book-frames {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.stroke-book-frames figure {
  position: relative;
  margin: 0;
  border: 1px solid rgba(71, 124, 134, 0.28);
  background: #fffdf8;
}

.stroke-book-frames figcaption {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #316a75;
  font-size: 0.78rem;
  font-weight: 800;
}

.stroke-book-frames svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 4px;
  background-color: #fffdf8;
  background-image: linear-gradient(rgba(71, 124, 134, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(71, 124, 134, 0.1) 1px, transparent 1px);
  background-size: 25% 25%;
}

.stroke-book-frame-ink {
  fill: #316a75;
}


.stroke-tian-card { align-items: flex-start; }

.stroke-tian-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 250px;
}

.stroke-tian-steps span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #a9b3b2;
  background: #edf1ee;
  font-weight: 800;
}

.stroke-tian-steps span.is-visible {
  color: #316a75;
  background: #dff1ed;
}

.stroke-practice-card {
  display: grid;
  gap: 14px;
}

.stroke-practice-library { display: grid; gap: 9px; padding: 2px 0 8px; }
.stroke-practice-library .body-match-kicker { margin: 0; }
.stroke-practice-stroke-picker,
.stroke-practice-character-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.stroke-practice-stroke-picker button,
.stroke-practice-character-picker button { min-width: 48px; min-height: 42px; padding: 6px 10px; border: 1px solid rgba(71, 124, 134, .24); border-radius: 11px; color: #316a75; background: rgba(255,255,255,.76); cursor: pointer; }
.stroke-practice-stroke-picker button { display: grid; width: 88px; height: 68px; place-items: center; padding: 7px; }
.stroke-practice-stroke-picker svg { width: 100%; height: 100%; }
.stroke-practice-stroke-picker path { fill: #316a75; }
.stroke-practice-character-picker button { display: grid; grid-template-columns: 1fr; min-width: 76px; min-height: 64px; place-items: center; padding: 9px 13px; }
.stroke-practice-character-picker strong { font-family: var(--hanzi-font); font-size: 2.05rem; line-height: 1; }
.stroke-practice-character-picker small { color: var(--muted); }
.stroke-practice-stroke-picker button:hover,
.stroke-practice-stroke-picker button:focus-visible,
.stroke-practice-stroke-picker button.is-selected,
.stroke-practice-character-picker button:hover,
.stroke-practice-character-picker button:focus-visible,
.stroke-practice-character-picker button.is-selected { border-color: #316a75; background: #eaf6f4; }

.stroke-practice-character {
  color: #316a75;
  font-family: var(--hanzi-font);
  font-size: 5rem;
  line-height: 1;
  text-align: center;
}

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

.stroke-practice-options button.is-correct { border-color: #347d4d; background: #e8f5e5; }
.stroke-practice-options button.is-wrong { border-color: #be473b; background: #ffebe6; }

.stroke-order-practice { gap: 18px; }
.stroke-order-practice header { display: flex; gap: 18px; align-items: center; }
.stroke-order-practice h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin: 0; color: #316a75; font-family: var(--body-font); font-size: 1.55rem; }
.stroke-order-practice h4 span { color: var(--muted); font-family: var(--body-font); font-size: var(--stroke-english-min-size); font-weight: 500; }
.stroke-order-practice header p:last-child { margin: 4px 0 0; color: var(--muted); font-size: var(--stroke-english-min-size); }
.stroke-order-slots,
.stroke-piece-bank { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 146px)); justify-content: start; gap: 9px; }
.stroke-order-slots button,
.stroke-piece-bank button { position: relative; min-height: 88px; border: 1px dashed rgba(71, 124, 134, 0.42); border-radius: 12px; background: #fffdf8; cursor: pointer; }
.stroke-order-slots button:disabled { cursor: default; color: #a9b3b2; }
.stroke-order-slots button b { position: absolute; z-index: 1; top: 6px; left: 7px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #316a75; font-size: .75rem; }
.stroke-order-slots button svg,
.stroke-piece-bank svg { width: 100%; height: 70px; padding: 6px; background-color: #fffdf8; background-image: linear-gradient(rgba(71, 124, 134, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(71, 124, 134, .1) 1px, transparent 1px); background-size: 25% 25%; }
.stroke-order-slots button svg path,
.stroke-piece-bank > button svg path { fill: #316a75; }
.stroke-order-slots button.is-filled { border-style: solid; }
.stroke-order-slots button.is-last-correct { border: 2px solid #3d965d; background: #edf8ef; }
.stroke-order-slots button.is-last-wrong { border: 2px solid #cf594d; background: #fff0ed; }
.stroke-piece-bank button.is-last-wrong { border: 2px solid #cf594d; background: #fff0ed; }
.stroke-order-slots button i,
.stroke-piece-bank button i { position: absolute; z-index: 2; right: 7px; bottom: 6px; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #fff; font-family: var(--body-font); font-size: 1rem; font-style: normal; font-weight: 800; }
.stroke-order-slots button.is-last-correct i { background: #3d965d; }
.stroke-order-slots button.is-last-wrong i,
.stroke-piece-bank button.is-last-wrong i { background: #cf594d; }

.stroke-build-preview { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; border-radius: 16px; background: #f7fbfa; }
.stroke-build-preview p { margin: 0; color: #7d7162; font-size: var(--stroke-english-min-size); font-weight: 700; }
.stroke-build-preview svg { width: 104px; height: 94px; grid-column: 2; }
.stroke-build-preview path { fill: #316a75; }
.stroke-piece-bank button { display: grid; min-height: 0; aspect-ratio: 1; padding: 0; border: 0; border-radius: 0; background: transparent; }
.stroke-piece-placeholder { display: block; aspect-ratio: 1; }
.stroke-piece-bank svg { height: auto; aspect-ratio: 1; padding: 4px; border: 1px solid rgba(71, 124, 134, .28); }
.stroke-piece-bank button:hover,
.stroke-piece-bank button:focus-visible { border-color: #316a75; background: #eaf6f4; }
.stroke-piece-bank.is-animation { display: grid; grid-template-columns: 1fr; min-height: 184px; }
.stroke-piece-animation-slot { display: grid; min-height: 184px; place-items: center; }
.stroke-piece-animation-slot .stroke-practice-animation { width: min(100%, 176px); }
.stroke-order-feedback { display: grid; gap: 10px; justify-items: center; color: #347d4d; text-align: center; }
.stroke-step-feedback { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 13px; border: 1px solid transparent; border-radius: 999px; font-size: 1rem; line-height: 1.25; }
.stroke-step-feedback.is-correct { color: #226b42; border-color: #abd9bb; background: #e8f6ea; }
.stroke-step-feedback.is-wrong { color: #aa3e35; border-color: #efbbb3; background: #fff0ed; }
.stroke-practice-animation { width: min(100%, 280px); aspect-ratio: 1; border: 1px solid rgba(71, 124, 134, .3); background-color: #fffdf8; background-image: linear-gradient(rgba(71, 124, 134, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(71, 124, 134, .1) 1px, transparent 1px); background-size: 25% 25%; }
.stroke-practice-ghost { fill: #d7e5e4; }
.stroke-practice-ink { fill: #316a75; opacity: 0; }
.stroke-practice-ink-0 { animation: stroke-practice-appear 1ms linear 0ms forwards; }
.stroke-practice-ink-1 { animation: stroke-practice-appear 1ms linear 1050ms forwards; }
.stroke-practice-ink-2 { animation: stroke-practice-appear 1ms linear 2100ms forwards; }
.stroke-practice-ink-3 { animation: stroke-practice-appear 1ms linear 3150ms forwards; }
.stroke-practice-ink-4 { animation: stroke-practice-appear 1ms linear 4200ms forwards; }
.practice-reveal-0 { animation-delay: 0ms; }
.practice-reveal-1 { animation-delay: 1050ms; }
.practice-reveal-2 { animation-delay: 2100ms; }
 .practice-reveal-3 { animation-delay: 3150ms; }
.practice-reveal-4 { animation-delay: 4200ms; }
@keyframes stroke-practice-appear { to { opacity: 1; } }
.stroke-practice-animation .stroke-reveal,
.stroke-practice-animation .stroke-practice-ink { animation: none; }
.stroke-practice-animation.is-playing .stroke-reveal { animation: stroke-draw 1100ms linear forwards; }
.stroke-practice-animation.is-playing .stroke-practice-ink { animation: stroke-practice-appear 1ms linear forwards; }

.pictograph-lab { display: grid; gap: 18px; padding: 22px; border-radius: 22px; background: #fffaf2; }
.pictograph-lab-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.pictograph-lab-header h3, .pictograph-note h4 { margin: 0; color: #6d4737; }
.pictograph-lab-header p, .pictograph-note p { margin: 5px 0 0; color: #786d63; }
.pictograph-lab-badge { padding: 7px 10px; border-radius: 999px; color: #914b32; background: #f9e4d7; font-weight: 700; white-space: nowrap; }
.pictograph-tabs { display: grid; grid-template-columns: repeat(8, minmax(54px, 1fr)); gap: 8px; }
.pictograph-tabs button { display: grid; gap: 2px; place-items: center; min-height: 68px; border: 1px solid #e5cdbd; border-radius: 12px; color: #6d4737; background: #fffdf8; cursor: pointer; }
.pictograph-tabs button.is-selected { border-color: #b46a47; background: #f9e4d7; box-shadow: inset 0 0 0 1px #b46a47; }
.pictograph-tabs span { font-size: 1.55rem; }.pictograph-tabs small { font-family: var(--hanzi-font); font-size: 1.1rem; }
.pictograph-story { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; }
.pictograph-stage { display: grid; min-height: 180px; place-items: center; align-content: center; border: 1px solid #ead8c9; border-radius: 18px; background: #fffdf8; }
.pictograph-stage > span { display: block; height: 94px; color: #a35c40; font-family: var(--hanzi-font); font-size: 5rem; line-height: 1; }.pictograph-stage small { margin-top: 10px; color: #786d63; font-weight: 700; }
.pictograph-stage.is-today { border-color: #b46a47; background: #f9e4d7; }.pictograph-hanzi { color: #6d4737 !important; }.pictograph-arrow { color: #b46a47; font-size: 2rem; }
.pictograph-note { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: #f7eee4; }
.pictograph-practice-card { display: grid; gap: 16px; padding: 20px; border-radius: 18px; background: #fffaf2; }.pictograph-practice-prompt { display: flex; gap: 14px; align-items: center; }.pictograph-practice-prompt > span { font-size: 3.3rem; }.pictograph-practice-prompt p { margin: 0; color: #6d4737; }
.pictograph-practice-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }.pictograph-practice-options button { position: relative; display: grid; gap: 3px; min-height: 104px; place-items: center; border: 1px solid #e5cdbd; border-radius: 14px; color: #6d4737; background: #fffdf8; cursor: pointer; }.pictograph-practice-options strong { font-family: var(--hanzi-font); font-size: 2.7rem; }.pictograph-practice-options small { font-size: 1rem; }.pictograph-practice-options button.is-correct { border: 2px solid #3d965d; background: #edf8ef; }.pictograph-practice-options button.is-wrong { border: 2px solid #cf594d; background: #fff0ed; }.pictograph-practice-options i { position: absolute; top: 7px; right: 7px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: #3d965d; font-style: normal; font-weight: 800; }.pictograph-practice-options button.is-wrong i { background: #cf594d; }.pictograph-practice-feedback { margin: 0; color: #786d63; }.pictograph-practice-feedback.correct { color: #226b42; font-weight: 700; }
@media (max-width: 680px) { .pictograph-lab-header, .pictograph-note { align-items: stretch; flex-direction: column; }.pictograph-tabs { grid-template-columns: repeat(4, 1fr); }.pictograph-story { grid-template-columns: 1fr; }.pictograph-arrow { transform: rotate(90deg); justify-self: center; }.pictograph-stage { min-height: 132px; }.pictograph-practice-options { grid-template-columns: repeat(2, 1fr); } }

.pictograph-book { display: grid; gap: 18px; padding: 22px; border-radius: 24px; background: linear-gradient(150deg, #edf8fb, #fdfdfb 58%, #eef7e7); }
.pictograph-book-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }.pictograph-book-header h3 { margin: 0; color: #276b78; font-size: clamp(1.8rem, 3vw, 2.5rem); }.pictograph-book-header p { margin: 5px 0 0; color: #597279; }
.pictograph-story-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 2px; }.pictograph-story-tabs button { display: grid; grid-template-columns: 24px 1fr; flex: 0 0 86px; align-items: center; gap: 6px; padding: 9px; border: 1px solid #c6dde0; border-radius: 14px; color: #276b78; background: #fff; cursor: pointer; }.pictograph-story-tabs button.is-selected { border: 2px solid #3c96a8; background: #dff2f5; }.pictograph-story-tabs b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #3c96a8; font-size: .74rem; }.pictograph-tab-character { display: grid; width: 34px; height: 34px; place-items: center; }.pictograph-story-tabs .pictograph-character-svg { width: 30px; height: 30px; }.pictograph-story-tabs .pictograph-character-loading { width: 28px; height: 28px; border-radius: 8px; }
.pictograph-picture-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); overflow: hidden; border: 1px solid #c6dde0; border-radius: 20px; background: #fff; }.pictograph-picture-page > img { width: 100%; min-height: 330px; height: 100%; object-fit: cover; }.pictograph-picture-copy { display: grid; align-content: center; gap: 12px; padding: clamp(20px, 4vw, 42px); }.pictograph-page-number { margin: 0; color: #3c96a8; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.pictograph-picture-copy h4 { margin: 0; color: #276b78; font-size: clamp(1.45rem, 2.4vw, 2.1rem); line-height: 1.18; }.pictograph-picture-copy > p:not(.pictograph-page-number) { margin: 0; color: #597279; font-size: 1.08rem; }
.pictograph-reveal-button { padding: 13px 16px; border: 0; border-radius: 14px; color: #fff; background: #e3704f; box-shadow: 0 4px 0 #bd563b; cursor: pointer; font: inherit; font-weight: 800; }.pictograph-character-reveal { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 12px; padding: 13px; border-radius: 16px; background: #edf8fb; }.pictograph-character-svg { width: 66px; height: 66px; }.pictograph-character-svg path { fill: #276b78; }.pictograph-character-loading { width: 62px; height: 62px; border-radius: 14px; background: linear-gradient(90deg, #dbeef0, #f8fdfd, #dbeef0); background-size: 220% 100%; animation: pictograph-loading 1s linear infinite; }.pictograph-character-reveal p { margin: 0; color: #456b72; }.pictograph-book-footer { margin: 0; color: #597279; font-size: .95rem; text-align: center; }
.pictograph-character-explainer { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(0, 1.1fr); align-items: center; gap: 16px; }.pictograph-big-character { display: grid; min-height: 240px; place-items: center; border-radius: 18px; background: #e6f5f7; }.pictograph-big-character .pictograph-character-svg { width: min(250px, 82%); height: 250px; }.pictograph-big-character .pictograph-character-loading { width: 140px; height: 180px; }.pictograph-river-connection { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: #edf8fb; }.pictograph-river-connection p { margin: 0; color: #456b72; }
.pictograph-evolution-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }.pictograph-evolution-card { display: grid; align-content: start; gap: 7px; min-width: 0; }.pictograph-stage-art { position: relative; display: grid; aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid #c6dde0; border-radius: 18px; background: #f7fcfd; }.pictograph-stage-art > img { width: 100%; height: 100%; object-fit: cover; }.pictograph-glyph-stage { color: #285b69; background: #edf8fb; }.pictograph-glyph-stage > .pictograph-oracle-image { width: 78%; height: 78%; object-fit: contain; }.pictograph-glyph-stage > .pictograph-oracle-image.is-person { transform: scale(1.23); }.pictograph-early-glyph { width: 67%; height: 67%; }.pictograph-modern-stage { background: #e1f1f5; }.pictograph-modern-stage .pictograph-character-svg { width: 70%; height: 70%; }.pictograph-modern-stage .pictograph-character-svg.is-person { transform: scale(1.1); }.pictograph-description-stage { padding: 18px; place-items: center; background: #f0f9f4; }.pictograph-description-stage p { margin: 0; color: #3f6970; font-size: clamp(1rem, 1.55vw, 1.24rem); line-height: 1.55; }.pictograph-description-stage strong { color: #276b78; }.pictograph-evolution-card p, .pictograph-evolution-card h4 { margin: 0; }.pictograph-evolution-card h4 { color: #276b78; font-size: clamp(1.02rem, 1.7vw, 1.28rem); line-height: 1.2; }.pictograph-evolution-card > p:not(.pictograph-stage-label) { color: #597279; font-size: .94rem; line-height: 1.35; }.pictograph-stage-label { color: #3c96a8; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }.pictograph-evolution-card .small-button { justify-self: start; margin-top: 3px; }.pictograph-story-note { display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: start; padding: 15px 17px; border-radius: 16px; background: #edf8fb; color: #456b72; }.pictograph-story-note strong { color: #276b78; }.pictograph-story-note p { margin: 0; }
.pictograph-frame-play { position: static; z-index: 1; margin: 0 !important; }
.pictograph-story-book { gap: 34px; }.pictograph-story-row { display: grid; gap: 14px; padding-top: 30px; border-top: 2px solid color-mix(in srgb, var(--pictograph-tone) 35%, transparent); }.pictograph-story-row:first-of-type { padding-top: 0; border-top: 0; }.pictograph-story-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.pictograph-story-header p { margin: 0; color: var(--pictograph-tone); font-size: .82rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }.pictograph-story-header h3 { margin: 0; color: #276b78; font-size: clamp(1.55rem, 2.6vw, 2.2rem); }.pictograph-story-header .pictograph-frame-play { flex: 0 0 auto; }.pictograph-story-row .pictograph-stage-art { border-color: color-mix(in srgb, var(--pictograph-tone) 44%, #c6dde0); }.pictograph-story-row .pictograph-glyph-stage, .pictograph-story-row .pictograph-modern-stage { color: var(--pictograph-tone); background: color-mix(in srgb, var(--pictograph-tone) 12%, white); }.pictograph-story-row .pictograph-character-svg path { fill: var(--pictograph-tone); }.pictograph-story-row .pictograph-stage-label { color: var(--pictograph-tone); }.pictograph-story-row .pictograph-description-stage { background: color-mix(in srgb, var(--pictograph-tone) 8%, white); }
@keyframes pictograph-loading { to { background-position: -220% 0; } }
@media (max-width: 720px) { .pictograph-book-header { align-items: flex-start; flex-direction: column; }.pictograph-picture-page { grid-template-columns: 1fr; }.pictograph-picture-page > img { min-height: 220px; max-height: 300px; }.pictograph-character-reveal { grid-template-columns: 58px 1fr; }.pictograph-character-reveal button { grid-column: 1 / -1; }.pictograph-character-explainer { grid-template-columns: 1fr; }.pictograph-big-character { min-height: 210px; }.pictograph-big-character .pictograph-character-svg { height: 220px; }.pictograph-evolution-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }.pictograph-story-note { grid-template-columns: 1fr; gap: 5px; } }
.stroke-practice-animation.is-playing .practice-reveal-0 { animation-delay: 0ms; }
.stroke-practice-animation.is-playing .practice-reveal-1 { animation-delay: 1050ms; }
.stroke-practice-animation.is-playing .practice-reveal-2 { animation-delay: 2100ms; }
.stroke-practice-animation.is-playing .practice-reveal-3 { animation-delay: 3150ms; }
.stroke-practice-animation.is-playing .practice-reveal-4 { animation-delay: 4200ms; }
.stroke-practice-animation.is-playing .stroke-practice-ink-0 { animation: stroke-practice-appear 1ms linear 0ms forwards; }
.stroke-practice-animation.is-playing .stroke-practice-ink-1 { animation: stroke-practice-appear 1ms linear 1050ms forwards; }
.stroke-practice-animation.is-playing .stroke-practice-ink-2 { animation: stroke-practice-appear 1ms linear 2100ms forwards; }
.stroke-practice-animation.is-playing .stroke-practice-ink-3 { animation: stroke-practice-appear 1ms linear 3150ms forwards; }
.stroke-practice-animation.is-playing .stroke-practice-ink-4 { animation: stroke-practice-appear 1ms linear 4200ms forwards; }
.stroke-order-practice footer { display: flex; justify-content: space-between; gap: 10px; }

@media (max-width: 620px) {
  .stroke-lab-header,
  .stroke-tian-card { align-items: flex-start; flex-direction: column; }
  .stroke-teaching-frames { grid-template-columns: 1fr; }
  .stroke-book-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stroke-compound-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stroke-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stroke-order-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stroke-piece-bank { grid-template-columns: repeat(auto-fit, minmax(98px, 126px)); }
  .stroke-rules > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .pinyin-lab-header,
  .pinyin-listen-card,
  .pinyin-practice-card .numbers-game-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .pinyin-tone-options,
  .pinyin-practice-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pinyin-course-nav {
    align-items: stretch;
  }

  .pinyin-course-books,
  .pinyin-practice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pinyin-basic-examples {
    grid-template-columns: 1fr;
  }

  .pinyin-basic-sound-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pinyin-chapter-practice-options.pinyin-sound-count-4,
  .pinyin-chapter-practice-options.pinyin-sound-count-5,
  .pinyin-chapter-practice-options.pinyin-sound-count-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .pinyin-basic-examples > div {
    grid-template-columns: 30px repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .pinyin-lab-badge,
  .pinyin-practice-card .small-button {
    align-self: flex-start;
  }
}

.focus-status {
  min-height: 28px;
  margin-top: 14px;
  color: var(--berry-dark);
  font-size: 0.98rem;
  font-weight: 700;
}

.focus-status:empty {
  display: none;
}

.focus-display {
  margin-top: 18px;
  min-height: 132px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.78);
}

.focus-display.is-hidden {
  display: none;
}

.focus-hanzi {
  font-family: var(--hanzi-font);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.focus-pinyin {
  margin-top: 10px;
  color: var(--berry-dark);
  font-size: 1.15rem;
  font-weight: 700;
}

.focus-english {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.05rem;
}

.focus-helper {
  color: var(--muted);
  font-size: 1rem;
}

.visual-vocabulary-board {
  padding: 18px;
  border: 1px solid rgba(221, 207, 187, 0.76);
  border-radius: 28px;
  background: linear-gradient(180deg, #fffaf2, #f2eadc);
}

.visual-vocabulary-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.visual-vocabulary-heading h4 {
  margin-top: 4px;
  font-size: 1.25rem;
}

.visual-vocabulary-heading > p {
  max-width: 40ch;
  color: var(--muted);
  line-height: 1.4;
}

.visual-vocabulary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.visual-vocabulary-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(221, 207, 187, 0.78);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.82);
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.visual-vocabulary-card:hover,
.visual-vocabulary-card:focus-visible,
.visual-vocabulary-card.is-selected {
  border-color: rgba(190, 91, 73, 0.48);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.visual-vocabulary-card:hover,
.visual-vocabulary-card:focus-visible {
  transform: translateY(-2px);
}

.visual-vocabulary-image-wrap {
  display: grid;
  overflow: hidden;
  aspect-ratio: 1 / 0.86;
  place-items: center;
  border-radius: 14px;
  background: #f5efe4;
}

.visual-vocabulary-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-vocabulary-copy {
  display: grid;
  gap: 3px;
}

.visual-vocabulary-copy strong {
  font-family: var(--hanzi-font);
  font-size: 1.35rem;
  line-height: 1.1;
}

.visual-vocabulary-copy span {
  color: var(--berry-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.visual-vocabulary-copy small {
  color: var(--muted);
  font-size: 0.85rem;
}

.focus-word-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.focus-word-list.is-hidden {
  display: none;
}

.focus-word-list.is-family-book-words {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.family-book-words-heading,
.family-book-words-note {
  grid-column: 1 / -1;
}

.family-book-words-heading {
  padding: 2px 2px 4px;
}

.family-book-words-heading .greetings-note-copy {
  margin-top: 8px;
  max-width: 66ch;
}

.focus-word-button {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 0;
  border-radius: var(--radius-md);
  text-align: left;
  background: rgba(255, 253, 248, 0.86);
  cursor: pointer;
}

.focus-word-button.is-selected {
  outline: 3px solid rgba(190, 91, 73, 0.18);
  background: linear-gradient(180deg, #fff9f3, #efe2cc);
}

.focus-word-button.is-matched {
  background: linear-gradient(180deg, #eef7ea, #dcefd2);
  outline: 3px solid rgba(111, 143, 97, 0.18);
}

.focus-word-hanzi {
  font-family: var(--hanzi-font);
  font-size: 1.6rem;
  color: var(--ink);
}

.focus-word-label {
  color: var(--berry-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.numbers-board {
  display: grid;
  gap: 14px;
}

.numbers-stage-card,
.numbers-showcase-card,
.numbers-practice-card,
.numbers-game-card {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(221, 207, 187, 0.76);
}

.numbers-stage-card h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.numbers-showcase-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(260px, 0.52fr);
  gap: 22px;
  align-items: center;
  min-height: 196px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
}

.numbers-showcase-copy {
  display: grid;
  min-height: 142px;
  align-content: center;
}

.numbers-current-line {
  display: flex;
  gap: 18px;
  align-items: baseline;
  min-width: 0;
}

.numbers-hanzi {
  font-family: var(--hanzi-font);
  font-size: clamp(3rem, 5.6vw, 4.55rem);
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.numbers-arabic {
  min-width: 2ch;
  min-height: 1.16em;
  font-size: clamp(2.8rem, 5vw, 4.15rem);
  font-weight: 800;
  color: var(--berry-dark);
}

.numbers-arabic.is-hidden {
  visibility: hidden;
}

.numbers-count-board {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: center;
}

.numbers-visual-note {
  color: var(--muted);
}

.numbers-object-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.numbers-object {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 2.5rem;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.numbers-bundle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.numbers-bundle-card {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 108px;
  padding: 16px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
}

.numbers-bundle-emoji {
  font-size: 2.4rem;
}

.numbers-bundle-count {
  color: var(--berry-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.numbers-practice-line {
  font-weight: 700;
  color: var(--ink);
}

.numbers-practice-note {
  color: var(--muted);
}

.numbers-game-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.numbers-game-top > div {
  display: grid;
  gap: 4px;
}

.numbers-game-top h4 {
  margin: 0;
  font-size: 1.08rem;
}

.numbers-game-note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0;
}

.identity-board {
  gap: 16px;
}

.identity-question-section {
  display: grid;
  gap: 14px;
}

.identity-question-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

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

.identity-country-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.identity-country-card.is-selected {
  border-color: #5e9a5a;
  background: #eef8e9;
  box-shadow: 0 0 0 3px rgba(94, 154, 90, 0.2);
}

.identity-flag {
  width: 72px;
  height: 48px;
  object-fit: contain;
}

.identity-practice-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf2;
}

.identity-practice-visual {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.identity-practice-visual .identity-flag {
  width: 96px;
  height: 64px;
}

.identity-practice-options,
.identity-language-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.identity-practice-options .choice-button,
.identity-language-card {
  min-height: 80px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.identity-language-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-height: 156px;
}

.identity-language-card.is-selected {
  border-color: #5e9a5a;
  background: #eef8e9;
  box-shadow: 0 0 0 3px rgba(94, 154, 90, 0.2);
}

.identity-practice-feedback {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.nationality-practice-shell .practice-split-board {
  grid-template-columns: minmax(0, 1fr);
}

.nationality-practice-flag {
  display: grid;
  place-items: center;
  margin: 14px 0 2px;
  min-height: 90px;
}

.nationality-practice-flag img {
  width: 120px;
  height: 80px;
  object-fit: contain;
}

.nationality-conversation-reveal {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.nationality-conversation-reveal article {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6fbf3;
}

.nationality-conversation-reveal p {
  margin: 0;
}

.nationality-match-country {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.nationality-match-copy,
.nationality-match-symbol-card {
  display: grid;
  gap: 4px;
}

.nationality-match-symbol-card {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
}

.nationality-match-symbol-card .numbers-game-english,
.nationality-match-copy .numbers-game-english {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.25;
}

.nationality-match-flag { width: 72px; height: 48px; object-fit: contain; }
.nationality-match-symbol { width: 76px; height: 76px; object-fit: contain; }

.identity-explore-section {
  padding-top: 4px;
}

.identity-explore-section > div > p:last-child {
  color: var(--muted);
  margin-top: 4px;
}

.identity-symbol-detail {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.identity-symbol-detail img {
  width: 112px;
  aspect-ratio: 1;
  object-fit: contain;
}

.identity-symbol-detail p {
  color: var(--muted);
  margin: 0;
}

.identity-language-section {
  margin-top: 2px;
}

@media (max-width: 700px) {
  .identity-question-top {
    flex-direction: column;
  }

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

  .identity-practice-options,
  .identity-language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .identity-symbol-detail {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .identity-symbol-detail img {
    width: 88px;
  }
}

.numbers-game-visual {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
}

.numbers-game-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

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

.age-listen-options .greetings-game-option {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  justify-items: start;
  align-content: center;
  padding-inline: 20px;
  text-align: left;
}

.age-listen-options .numbers-game-hanzi,
.age-listen-options .numbers-game-pinyin,
.age-listen-options .numbers-game-english {
  justify-self: start;
  text-align: left;
}

.greetings-game-audio-row {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.greetings-game-play {
  width: fit-content;
  min-width: 196px;
}

.greetings-game-feedback {
  color: var(--berry-dark);
  font-weight: 700;
}

.greetings-game-feedback.is-correct {
  color: #386c32;
}

.greetings-game-feedback.is-wrong {
  color: var(--berry-dark);
}

.greetings-game-option {
  min-height: 132px;
  justify-content: center;
  border-radius: 24px;
}

.numbers-game-option.family-listen-option {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  justify-items: stretch;
  align-items: stretch;
  text-align: left;
}

.family-listen-copy {
  display: grid;
  grid-template-rows: 2.1rem 1.5rem 2.5rem;
  align-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  text-align: left;
}

.family-listen-copy .numbers-game-hanzi,
.family-listen-copy .numbers-game-pinyin,
.family-listen-copy .numbers-game-english {
  display: block;
  align-self: center;
  justify-self: stretch;
  text-align: left;
}

.family-listen-option.is-correct {
  border-color: rgba(111, 143, 97, 0.42);
  background: linear-gradient(180deg, #f4fbf0, #dcefd2);
  box-shadow: 0 0 0 3px rgba(111, 143, 97, 0.14);
}

.family-listen-option.is-wrong {
  border-color: rgba(190, 91, 73, 0.34);
  background: linear-gradient(180deg, #fff7f4, #f7ded8);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.1);
}

.answer-result-mark {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.is-correct .answer-result-mark,
.is-solved .answer-result-mark {
  background: #5f8f51;
}

.is-wrong .answer-result-mark {
  background: #be5b49;
}

.practice-split-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.family-practice-shell {
  display: block;
}

.lesson-practice-shell .practice-split-board {
  align-items: start;
}

.lesson-practice-shell .numbers-game-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Date sentences can be much longer than a single word or short phrase.
   Keep each option on its own row so the complete Chinese, pinyin, and English
   stay readable and share one clear left edge. */
.dates-listen-practice .numbers-game-options {
  grid-template-columns: minmax(0, 1fr);
}

.dates-listen-practice .family-listen-copy {
  justify-items: start;
}

.practice-split-card [data-template-match-new] {
  width: 124px;
}

.lesson-practice-shell .polite-match-card {
  height: 92px;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-content: center;
  align-items: baseline;
  column-gap: 8px;
}

.lesson-practice-shell .polite-match-card > .numbers-game-hanzi { grid-column: 1; }
.lesson-practice-shell .polite-match-card > .numbers-game-pinyin { grid-column: 2; }
.lesson-practice-shell .polite-match-card > .numbers-game-english { grid-column: 3; min-width: 0; text-align: right; }

/* Greeting phrases need the full card width. Keep the Chinese and pinyin in
   their original vertical stack so the two match columns never overlap. */
.greetings-practice-shell .polite-match-card,
.polite-words-practice-shell .polite-match-card,
.weekdays-practice-shell .polite-match-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
}

/* Greetings has short phrases beside longer situation descriptions. Give
   every language line a shared left edge instead of centering each line by
   itself, which keeps both columns easy to scan. */
.greetings-practice-shell .polite-match-card {
  justify-items: stretch;
  text-align: left;
}

.greetings-practice-shell .polite-match-card > .numbers-game-hanzi,
.greetings-practice-shell .polite-match-card > .numbers-game-pinyin,
.greetings-practice-shell .polite-match-card > .numbers-game-english,
.polite-words-practice-shell .polite-match-card > .numbers-game-hanzi,
.polite-words-practice-shell .polite-match-card > .numbers-game-pinyin,
.polite-words-practice-shell .polite-match-card > .numbers-game-english,
.weekdays-practice-shell .polite-match-card > .numbers-game-hanzi,
.weekdays-practice-shell .polite-match-card > .numbers-game-pinyin,
.weekdays-practice-shell .polite-match-card > .numbers-game-english {
  grid-column: 1;
  text-align: left;
}

.greetings-practice-shell .polite-match-card > .numbers-game-hanzi,
.greetings-practice-shell .polite-match-card > .numbers-game-pinyin,
.greetings-practice-shell .polite-match-card > .numbers-game-english,
.greetings-practice-shell .polite-match-card-meaning .match-answer-label {
  text-align: left;
}

/* Requests & Permission already has a two-panel practice board. Keep its
   matching phrases stacked so the narrow half-panel stays readable. */
.requests-permission-practice-shell .polite-match-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
}

.requests-permission-practice-shell .polite-match-card > .numbers-game-hanzi,
.requests-permission-practice-shell .polite-match-card > .numbers-game-pinyin,
.requests-permission-practice-shell .polite-match-card > .numbers-game-english {
  grid-column: 1;
  text-align: left;
}

.meals-match-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

/* Meals & Feelings contains full questions and replies. Each side already has
   its own match column, so keep a card's Chinese, pinyin, and English stacked
   rather than squeezing three languages into a single horizontal row. */
.meals-feelings-practice-shell .polite-match-card:has(.meals-match-copy) {
  min-height: 126px;
  height: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: start;
  gap: 5px;
}

.meals-feelings-practice-shell .meals-match-copy .numbers-game-hanzi {
  white-space: nowrap;
}

.meals-feelings-practice-shell .meals-match-english {
  font-size: var(--learner-english-size);
  text-align: left;
}

.lesson-practice-shell .polite-match-card-meaning .match-answer-label,
.lesson-practice-shell .family-match-pair-card .match-answer-label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
}

.practice-split-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(221, 207, 187, 0.72);
}

.request-sentence-builder .request-builder-visual {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 14px 0;
  border-radius: 18px;
  object-fit: cover;
}

/* Shared compact practice layout: prompt and choices share an iPad screen,
   while phone widths return to a simple one-column flow. */
.practice-compact-split {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  column-gap: 18px;
  row-gap: 12px;
  align-items: start;
}

.practice-compact-split > .numbers-game-top { grid-column: 1 / -1; }

.practice-compact-split > .practice-compact-visual {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-width: 360px;
  margin: 0;
  justify-self: center;
}

.practice-compact-content {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  gap: 12px;
  min-width: 0;
  align-content: start;
}

.practice-compact-content > * { margin-top: 0; margin-bottom: 0; }

.toys-practice-shell.practice-compact-split {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto 332px;
}

.toys-practice-shell .practice-compact-content {
  grid-template-rows: 4.8rem minmax(0, 1fr);
  height: 100%;
}

.toys-practice-shell .clothes-quiz-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 100%;
}

.toys-practice-shell .clothes-quiz-option {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, auto);
  min-height: 0;
  gap: 4px;
  align-items: center;
}

.toys-practice-shell .clothes-quiz-option > .numbers-game-hanzi {
  grid-column: 1;
}

.toys-practice-shell .clothes-quiz-option > .numbers-game-pinyin {
  grid-column: 1;
  text-align: center;
}

.toys-practice-shell .clothes-quiz-option > .numbers-game-english {
  grid-column: 1;
  text-align: center;
}

.toys-practice-shell > .practice-compact-visual {
  align-self: stretch;
  height: auto;
  aspect-ratio: auto;
  max-width: 420px;
}

.backpack-game-card {
  gap: 12px;
}

.backpack-game-progress {
  display: flex;
  gap: 8px;
  align-items: center;
}

.backpack-game-progress-dot {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(161, 179, 147, 0.7);
  border-radius: 50%;
  color: transparent;
  background: #f7f3e9;
  font-size: 0.86rem;
  font-weight: 800;
}

.backpack-game-progress-dot.is-packed {
  border-color: #5f8f51;
  color: #fff;
  background: #5f8f51;
}

.backpack-game-visual {
  position: relative;
  display: grid;
  min-height: 276px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 12px;
  background: #f8f4ea;
}

.backpack-game-bag {
  width: min(100%, 360px);
  height: 264px;
  object-fit: contain;
  transform: translateX(-38px);
}

.backpack-game-target {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 158px;
  height: 142px;
  place-items: center;
  padding: 10px;
  border: 1px solid rgba(221, 207, 187, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.backpack-game-target img {
  width: 76%;
  height: 76%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.backpack-game-packed-item {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.backpack-game-packed-items {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.backpack-game-packed-item {
  position: absolute;
  width: 52px;
  height: 44px;
  animation: backpack-pack-item 320ms ease-out both;
}

.backpack-game-packed-item.is-item-0 {
  bottom: 48px;
  left: 32%;
}

.backpack-game-packed-item.is-item-1 {
  bottom: 40px;
  left: 44%;
}

.backpack-game-packed-item.is-item-2 {
  bottom: 51px;
  left: 56%;
}

.backpack-game-complete-mark {
  position: absolute;
  right: 24%;
  bottom: 22%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #5f8f51;
  box-shadow: 0 0 0 4px rgba(95, 143, 81, 0.16);
  font-size: 1.8rem;
  font-weight: 900;
}

.backpack-game-complete-message {
  margin: -2px 0 0;
  color: #456f3b;
  font-weight: 800;
  text-align: center;
}

.backpack-game-options {
  margin-top: 0;
}

.backpack-game-options .greetings-game-option {
  min-height: 86px;
  border-radius: 12px;
}

.food-hunger-game-card {
  gap: 12px;
}

.food-hunger-kicker-english {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 8px;
  text-transform: none;
}

.food-hunger-tabs {
  margin-bottom: 0;
}

.food-hunger-visual {
  position: relative;
  display: grid;
  min-height: 276px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 12px;
  background: #f8f4ea;
}

.food-hunger-target {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 142px;
  height: 126px;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(221, 207, 187, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.food-hunger-target img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.food-hunger-cart {
  position: relative;
  width: min(86%, 360px);
  height: 290px;
  margin-top: 22px;
}

.food-hunger-cart-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.food-hunger-plated-item {
  position: absolute;
  width: 86px;
  height: 76px;
  object-fit: contain;
  mix-blend-mode: multiply;
  animation: backpack-pack-item 320ms ease-out both;
}

.food-hunger-plated-item.is-item-0 {
  top: 26%;
  left: 18%;
}

.food-hunger-plated-item.is-item-1 {
  top: 22%;
  left: 40%;
}

.food-hunger-plated-item.is-item-2 {
  top: 27%;
  right: 14%;
}

.food-hunger-complete-mark {
  position: absolute;
  right: -2%;
  bottom: 7%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #5f8f51;
  box-shadow: 0 0 0 4px rgba(95, 143, 81, 0.16);
  font-size: 1.8rem;
  font-weight: 900;
}

.food-hunger-options {
  margin-top: 0;
}

.food-hunger-options .greetings-game-option {
  min-height: 86px;
  border-radius: 12px;
}

.stationery-picture-match-card {
  gap: 12px;
}

.stationery-picture-match-visual {
  display: grid;
  min-height: 280px;
  aspect-ratio: 4 / 3;
  margin: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 12px;
  background: #f8f4ea;
}

.stationery-picture-match-visual img {
  width: 100%;
  height: 100%;
  padding: 22px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

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

.stationery-picture-match-column {
  display: grid;
  gap: 7px;
}

.stationery-picture-match-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.stationery-picture-match-option {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 8px 5px;
  border: 1px solid rgba(221, 207, 187, 0.88);
  border-radius: 10px;
  color: var(--ink);
  background: #fffdf8;
  cursor: pointer;
}

.stationery-picture-match-option:hover:not(:disabled) {
  border-color: rgba(109, 138, 79, 0.72);
  background: #f4f8ee;
}

.stationery-picture-match-option:disabled {
  cursor: default;
}

.stationery-picture-match-word {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.stationery-picture-match-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
  line-height: 1.2;
}

.stationery-picture-match-option .answer-result-mark {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  font-size: 0.76rem;
}

.stationery-picture-match-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: #f2f8ed;
}

.stationery-picture-match-result > div {
  display: grid;
  gap: 2px;
}

.stationery-picture-match-result strong {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
}

.stationery-picture-match-result span:not(.answer-result-mark) {
  color: var(--muted);
  font-size: var(--learner-english-size);
  line-height: 1.25;
}

.stationery-picture-match-result .telephone-line-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

@keyframes backpack-pack-item {
  from {
    opacity: 0;
    transform: translate(45px, -80px) scale(1.8);
  }

  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

.food-category-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.food-book-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 12px;
}

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

.lesson-word-tabs .food-book-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.lesson-word-tabs .food-book-tab small {
  color: #65715d;
  font-size: 1rem;
  font-weight: 700;
}

.lesson-word-tabs .lesson-word-tab-divider {
  color: currentColor;
  font-weight: 700;
}

.school-lesson-section {
  display: grid;
  gap: 10px;
}

.school-lesson-section + .school-lesson-section {
  margin-top: 8px;
}

.school-lesson-heading {
  margin: 0;
  color: var(--muted);
}

.school-lesson-section.is-lunch .school-scene-grid.is-single {
  width: calc(50% - 8px);
}

.food-book-tab {
  display: grid;
  min-height: 48px;
  place-items: center;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid #b9c7ad;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.food-book-tab small {
  color: #65715d;
  font-size: 0.72rem;
  font-weight: 600;
}

.food-category-book-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.food-category-book-tab > span {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.food-category-tab-divider {
  color: currentColor;
}

.food-category-book-tab-english {
  color: #65715d;
}

.food-book-tab.is-active {
  border-color: #5f8f51;
  background: #5f8f51;
  color: #ffffff;
}

.food-book-tab.is-active small {
  color: #ffffff;
}

.food-category-book-tab.is-active .food-category-book-tab-english {
  color: #ffffff;
}

.food-category-tab {
  display: grid;
  min-height: 64px;
  place-items: center;
  gap: 2px;
  padding: 8px;
  border: 2px solid #b9c7ad;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.food-category-tab small {
  color: #65715d;
  font-size: 0.78rem;
  font-weight: 600;
}

.food-category-tab.is-active {
  border-color: #5f8f51;
  background: #5f8f51;
  box-shadow: 0 0 0 3px rgba(95, 143, 81, 0.16);
  color: #ffffff;
}

.food-category-tab.is-active small {
  color: #ffffff;
}

.food-match-meaning {
  display: flex;
  align-items: center;
  gap: 10px;
}

.food-match-meaning img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
}

.food-match-meaning-card {
  min-height: 92px;
}

.intro-build-target {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
}

.intro-build-selected,
.intro-build-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-build-chip {
  padding: 12px 16px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
  cursor: pointer;
}

.intro-build-chip.is-selected {
  border-color: rgba(190, 91, 73, 0.42);
  background: linear-gradient(180deg, #fff7ef, #f1e2cf);
}

.intro-build-placeholder {
  color: var(--muted);
}

.intro-build-actions {
  display: flex;
  justify-content: flex-start;
}

.polite-match-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.polite-match-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.polite-match-card {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.polite-match-card:hover,
.polite-match-card:focus-visible {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.polite-match-card.is-selected {
  border-color: rgba(190, 91, 73, 0.42);
  background: linear-gradient(180deg, #fff7ef, #f1e2cf);
  box-shadow: 0 10px 24px rgba(35, 49, 59, 0.08);
}

.polite-match-card.is-solved {
  border-color: rgba(111, 143, 97, 0.32);
  background: linear-gradient(180deg, #eef7ea, #dcefd2);
  box-shadow: none;
}

.family-match-board-headings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.family-match-solved-pairs {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.family-match-solved-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.family-match-pair-card {
  cursor: default;
}

.family-match-pair-card .answer-result-mark {
  top: 10px;
  right: 12px;
  background: #5f8f51;
}

.family-match-open-board {
  margin-top: 10px;
}

.family-lesson-practice-shell .family-match-open-board .polite-match-card {
  height: 104px;
  min-height: 104px;
  padding-block: 10px;
  align-content: center;
}

.greetings-game-scene-note {
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
}

.greetings-note-card {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
  border: 1px solid rgba(221, 207, 187, 0.72);
}

.greetings-note-hanzi {
  margin-top: 6px;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
}

.greetings-note-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.numbers-game-option {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Number-choice cards keep the symbol pair and language pair in two columns.
   This makes every range, including 1–10, use the compact 11–20 treatment. */
.numbers-game-option[data-number-game-guess] {
  grid-template-columns: minmax(4.5rem, 0.7fr) minmax(0, 1fr);
  grid-template-rows: minmax(1.5rem, auto) minmax(1.25rem, auto);
  column-gap: 16px;
  row-gap: 5px;
  align-items: center;
}

.numbers-game-option[data-number-game-guess] .numbers-game-hanzi,
.numbers-game-option[data-number-game-guess] .numbers-game-arabic {
  grid-column: 1;
}

.numbers-game-option[data-number-game-guess] .numbers-game-pinyin,
.numbers-game-option[data-number-game-guess] .numbers-game-english {
  grid-column: 2;
}

.numbers-game-option[data-number-game-guess] .numbers-game-hanzi,
.numbers-game-option[data-number-game-guess] .numbers-game-pinyin {
  grid-row: 1;
}

.numbers-game-option[data-number-game-guess] .numbers-game-arabic,
.numbers-game-option[data-number-game-guess] .numbers-game-english {
  grid-row: 2;
}

.numbers-game-option:hover,
.numbers-game-option:focus-visible {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

/* Shared choice-game feedback: every selected answer stays visibly green or
   red, including the number cards that do not use the family-listen layout. */
.numbers-game-option.is-correct,
.numbers-game-option.is-correct:hover,
.numbers-game-option.is-correct:focus-visible {
  position: relative;
  border-color: rgba(111, 143, 97, 0.72);
  background: linear-gradient(180deg, #f4fbf0, #dcefd2);
  box-shadow: 0 0 0 3px rgba(111, 143, 97, 0.16);
}

.numbers-game-option.is-wrong,
.numbers-game-option.is-wrong:hover,
.numbers-game-option.is-wrong:focus-visible {
  position: relative;
  border-color: rgba(190, 91, 73, 0.62);
  background: linear-gradient(180deg, #fff7f4, #f7ded8);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.telephone-scene-card {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
  border: 1px solid rgba(221, 207, 187, 0.76);
}

.greetings-scene-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8f1, #efe2cc);
  border: 1px solid rgba(221, 207, 187, 0.76);
}

.greetings-practice-grid {
  display: grid;
  gap: 14px;
}

/* Clothes Review follows the shared visual-first two-column scene pattern. */
.clothes-scene-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clothes-scene-grid .greetings-scene-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.introductions-explorer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

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

/* Position scenes use the shared 2 × 2 lesson-card pattern: visual first,
   then the sentence box beneath it. */
.position-scene-grid .greetings-scene-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

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

/* Keep the two TV exchanges together first. The cola/water exchange then sits
   beside the teacher exchange; its short question still receives less width. */
.polite-scene-grid .is-request-cola-scene {
  order: 1;
}

.polite-scene-grid .is-request-teacher-scene {
  order: 1;
}

.greetings-scene-layout.polite-scene-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.polite-scene-layout .greetings-line-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.polite-scene-layout .greetings-line-stack.is-request-lines {
  grid-template-columns: minmax(0, 1fr) minmax(5.25rem, 0.42fr);
}

.polite-scene-layout .greetings-line-stack.is-request-lines.is-request-cola-lines {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
}

.greetings-exchange {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.greetings-exchange-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.greetings-exchange-prompt {
  color: var(--muted);
  margin-top: 6px;
}

.greetings-scene-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
  align-content: start;
}

.greetings-scene-visual {
  min-width: 0;
}

.greetings-scene-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid rgba(221, 207, 187, 0.78);
  background: #fffdf8;
}

.is-it-scene-card {
  max-width: 920px;
  margin: 0 auto;
}

.is-it-scene-image {
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: #f9e9b9;
}

.is-it-line-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-it-practice-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.is-it-practice-board {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 18px;
  align-items: start;
}

.is-it-practice-prompt {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.is-it-practice-board .is-it-practice-visual {
  width: 100%;
  max-width: none;
  margin: 0;
}

.is-it-practice-visual {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f9e9b9;
}

.is-it-practice-image {
  display: block;
  width: 200%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.is-it-practice-image.is-left {
  transform: translateX(0);
}

.is-it-practice-image.is-right {
  transform: translateX(-50%);
}

.is-it-question-card,
.is-it-practice-shell .everyday-actions-answer {
  text-align: center;
}

.is-it-practice-options {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: none;
  height: auto;
  margin-top: 0;
}

.is-it-practice-options .numbers-game-option {
  min-height: 86px;
}

@media (max-width: 760px) {
  .is-it-practice-board {
    grid-template-columns: minmax(0, 1fr);
  }

  .is-it-practice-options {
    grid-template-rows: none;
    height: auto;
  }

  .is-it-practice-options .numbers-game-option {
    min-height: 86px;
  }
}

.time-routine-card {
  background: linear-gradient(180deg, #fff8f1, #e7f0f4);
}

.greetings-scene-image.time-routine-scene-image {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

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

.time-routine-scene-grid .greetings-scene-layout {
  grid-template-columns: 1fr;
  gap: 10px;
}

.time-date-board {
  display: grid;
  gap: 16px;
}

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

.time-date-section-tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: 1.2rem;
  cursor: pointer;
}

.time-date-section-tab small {
  color: var(--muted);
  font-family: var(--latin-font);
  font-size: 0.76rem;
  font-weight: 700;
}

.time-date-section-tab.is-active {
  border-color: rgba(81, 123, 141, 0.46);
  background: #e7f0f4;
  box-shadow: 0 0 0 3px rgba(81, 123, 141, 0.12);
}

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

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

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

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

/* Twelve clock faces need enough space for children to read the hands. */
.time-asset-grid-clock {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.time-asset-grid-clock .book-word-card {
  flex-direction: row;
  justify-content: center;
  min-height: 12rem;
  text-align: left;
}

.time-asset-grid-clock .book-word-image {
  flex: 0 0 auto;
  width: min(64%, 11rem);
  height: auto;
}

.time-asset-grid-clock .book-word-copy {
  align-items: center;
  padding-left: 0.55rem;
}

.time-asset-grid-clock .time-asset-hanzi,
.time-asset-grid-clock .time-asset-pinyin,
.time-asset-grid-clock .time-asset-english {
  text-align: center;
}

.time-asset-grid.visual-transport {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.time-asset-grid.visual-transport .time-asset-image {
  object-fit: cover;
}

.time-asset-grid.visual-comparisons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.comparison-word-card {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 76px;
  padding: 8px 6px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
}

.comparison-word-card:hover,
.comparison-word-card:focus-visible {
  border-color: rgba(81, 123, 141, 0.46);
  box-shadow: 0 0 0 3px rgba(81, 123, 141, 0.12);
}

.comparison-word-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.1;
}

.comparison-word-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.comparison-word-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

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

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

.school-scene-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

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

.school-lesson-section.is-weather .weather-scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.school-scene-layout {
  display: grid;
  gap: 12px;
  align-content: start;
}

.school-scene-layout.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.school-scene-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 8px;
  background: #fffdf8;
}

/* Comparison illustrations have different source proportions. Keep the full
   visual inside the shared 4:3 scene frame instead of trimming its edges. */
.comparison-scene-grid .school-scene-image {
  object-fit: contain;
}

.date-scene-grid .school-scene-image {
  object-fit: contain;
}

.month-scene-grid .school-scene-image {
  object-fit: contain;
}

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

.school-word-grid.is-text-only {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.school-word-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
}

.school-word-card:hover,
.school-word-card:focus-visible {
  border-color: rgba(81, 123, 141, 0.46);
  box-shadow: 0 0 0 3px rgba(81, 123, 141, 0.12);
}

.school-word-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.school-word-grid.is-uniform-images .school-word-image {
  object-fit: cover;
}

.school-word-grid.is-text-only .school-word-card {
  min-height: 100px;
  align-content: center;
}

.school-word-card:not(.book-word-card) > span {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.school-build-visual {
  aspect-ratio: 4 / 3;
}

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

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

.room-scene-layout {
  display: grid;
  gap: 12px;
}

.room-scene-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 8px;
  background: #fffdf8;
}

.room-build-visual {
  aspect-ratio: 4 / 3;
}

.room-useful-note-grid {
  grid-template-columns: 1fr;
}

.visual-topic-notes {
  display: grid;
  gap: 10px;
}

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

.visual-topic-note-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.84);
}

.visual-topic-note-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.15;
}

.visual-topic-note-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.visual-topic-note-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.visual-topic-note-example {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.35;
}

.time-asset-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
}

.time-asset-card:hover,
.time-asset-card:focus-visible {
  border-color: rgba(81, 123, 141, 0.46);
  box-shadow: 0 0 0 3px rgba(81, 123, 141, 0.12);
}

.world-scene-card {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(13rem, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fffdf8;
}

.world-scene-card img {
  display: block;
  width: 100%;
  border-radius: 0.7rem;
}

.world-scene-card > div {
  display: grid;
  gap: 0.55rem;
}

.world-asset-grid .time-asset-card {
  text-align: center;
}

.nature-scene-image {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.nature-word-card {
  min-height: 5.75rem;
  padding: 0.7rem;
}

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

.world-asset-grid .time-asset-card.nature-word-card {
  align-items: center;
}

.nature-word-row {
  box-sizing: border-box;
  padding-left: 0.5rem;
}

.nature-word-icon {
  display: grid;
  width: 4.5rem;
  height: 3.45rem;
  place-items: center;
}

.nature-word-copy {
  min-width: 0;
  padding-left: 1.15rem;
}

.nature-word-card .time-asset-hanzi,
.nature-word-card .time-asset-pinyin,
.nature-word-card .time-asset-english {
  text-align: left;
}

.nature-word-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nature-fill-inline-icon {
  display: inline-block;
  width: 1.45em;
  height: 1.1em;
  margin-left: 0.2em;
  vertical-align: -0.13em;
}

.nature-fill-inline-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nature-fill-practice {
  display: grid;
  gap: 1rem;
}

.nature-fill-sentence {
  margin: 0;
  text-align: center;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.6;
}

.world-favourite-colour-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.world-favourite-sentence,
.world-nature-sentence {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.5;
}

.weather-dress-practice {
  align-items: start;
}

.weather-dress-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.weather-dress-option {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 0;
  border: 3px solid #d8cbb7;
  border-radius: 17px;
  background: #fffdf8;
  cursor: pointer;
}

.weather-dress-option:hover,
.weather-dress-option:focus-visible {
  border-color: #6d9c5c;
  box-shadow: 0 0 0 4px rgba(109, 156, 92, 0.17);
}

.weather-dress-option img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.weather-dress-option.is-correct { border-color: #5a9b57; }
.weather-dress-option.is-wrong { border-color: var(--berry); }

.weather-dress-feedback {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  border-radius: 15px;
  background: #fff3f1;
}

.weather-dress-feedback.is-correct { background: #f1faed; }
.weather-dress-feedback p { margin: 0; }
.weather-dress-feedback p:first-child { font-family: var(--hanzi-font); font-size: var(--learner-hanzi-size); }

.weather-fill-practice { display: grid; gap: 1rem; }

.weather-fill-visual {
  margin: 0;
}

.weather-fill-visual img {
  display: block;
  width: min(100%, 42rem);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 auto;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 12px;
}

.weather-fill-icon {
  display: inline-block;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.28rem;
  vertical-align: -0.56rem;
}

.weather-fill-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.weather-fill-sentence {
  margin: 0;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.55;
}

.weather-fill-blank {
  display: inline-block;
  min-width: 4.4em;
  margin: 0 0.1em;
  border-bottom: 3px solid #b98754;
  text-align: center;
}

.weather-fill-blank.is-correct { border-color: #5a9b57; color: #456d32; }
.weather-fill-blank.is-wrong { border-color: var(--berry); color: var(--berry-dark); }

.weather-fill-choice-groups {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.weather-fill-choice-label {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.weather-fill-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.weather-fill-option {
  position: relative;
  min-height: 4.2rem;
  border: 3px solid #d8cbb7;
  border-radius: 15px;
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  cursor: pointer;
}

.weather-fill-option:hover,
.weather-fill-option:focus-visible { border-color: #6d9c5c; box-shadow: 0 0 0 4px rgba(109, 156, 92, 0.17); }
.weather-fill-option.is-correct { border-color: #5a9b57; background: #f1faed; }
.weather-fill-option.is-wrong { border-color: var(--berry); background: #fff3f1; }
.weather-fill-feedback { margin: 0; color: var(--berry-dark); }

.weather-clothes-practice {
  display: grid;
  gap: 1rem;
}

.weather-clothes-visual {
  margin: 0;
}

.weather-clothes-visual img {
  display: block;
  width: min(100%, 42rem);
  max-height: 25rem;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(221, 207, 187, 0.72);
  border-radius: 12px;
}

.weather-clothes-sentence {
  margin: 0;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.6;
}

.weather-clothes-blank {
  display: inline-block;
  min-width: 5.6em;
  margin: 0 0.12em;
  border-bottom: 3px solid #d8cbb7;
  text-align: center;
}

.weather-clothes-blank.is-correct { border-color: #5a9b57; color: #456d32; }
.weather-clothes-blank.is-wrong { border-color: var(--berry); color: var(--berry-dark); }

.weather-clothes-choice-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}

.weather-clothes-choice-group {
  padding: 0.85rem;
  border: 1px solid #e5d7c1;
  border-radius: 14px;
  background: #fffaf4;
}

.clothes-colour-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
}

.clothes-colour-sentence .numbers-game-pinyin,
.clothes-colour-sentence .numbers-game-english {
  flex-basis: 100%;
}

.clothes-colour-choice-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}

.clothes-colour-choice-group {
  padding: 0.85rem;
  border: 1px solid #e5d7c1;
  border-radius: 14px;
  background: #fffaf4;
}

.clothes-colour-choice-group .clothes-quiz-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.time-routine-builder-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.time-routine-builder-options > div { min-width: 0; }

.time-routine-builder-group {
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 0.7rem;
}

.time-routine-builder-group.is-hour { background: #edf6ff; border-color: #b8d8ef; }
.time-routine-builder-group.is-minutes { background: #fff5e8; border-color: #efd1a8; }
.time-routine-builder-group.is-action { background: #f4effd; border-color: #d5c3ee; }

.time-routine-builder-options .weather-fill-choice-label {
  color: var(--ink);
  font-family: var(--latin-font);
  font-size: 1.12rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.time-routine-builder-group.is-hour .weather-fill-choice-label { color: #21638f; }
.time-routine-builder-group.is-minutes .weather-fill-choice-label { color: #9a5b19; }
.time-routine-builder-group.is-action .weather-fill-choice-label { color: #654497; }

.time-routine-builder-options .weather-fill-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.time-routine-builder-options .weather-fill-option {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 4.2rem;
}

.time-routine-builder-options .weather-fill-option.is-selected {
  background: #f1faed;
  border-color: #5a9b57;
  color: #456d32;
}

@media (max-width: 520px) {
  .weather-dress-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .weather-fill-choice-groups { grid-template-columns: 1fr; }
  .time-routine-builder-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
  .time-routine-builder-options .weather-fill-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
  .time-routine-builder-options .weather-fill-option { min-height: 3.6rem; }
}

.world-colour-mission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.45rem;
}

.world-colour-mission-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  min-height: 8.5rem;
  padding: 0.45rem;
  border: 2px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.world-colour-mission-card:hover,
.world-colour-mission-card:focus-visible {
  border-color: var(--berry);
  box-shadow: 0 0 0 3px rgba(232, 69, 60, 0.12);
}

.world-colour-mission-card.is-correct { border-color: #5a9b57; background: #f1faed; }
.world-colour-mission-card.is-wrong { border-color: var(--berry); background: #fff3f1; }
.world-colour-mission-feedback { min-height: 2rem; margin: 0.35rem 0 0; }
.world-colour-mission-feedback.is-placeholder { visibility: hidden; }
.world-colour-mission-sentence { color: var(--muted); }
.world-colour-mission-pinyin { margin-left: 0.45rem; font-family: var(--latin-font); font-size: 0.9rem; color: var(--muted); }

.world-colour-mission-art { width: 100%; max-width: 8rem; }
.world-colour-mission-art svg { display: block; width: 100%; height: auto; }
.world-colour-mission-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 0.8rem; background: #fffdf8; }
.world-colour-mission-label { min-height: 1.3rem; font-size: 0.82rem; color: var(--muted); }

.world-favourite-sentence span {
  display: block;
  font-family: var(--latin-font);
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 680px) {
  .world-scene-card {
    grid-template-columns: 1fr;
  }

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

.time-asset-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
}

.time-asset-grid-week .time-asset-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.weekday-scene-card .greetings-exchange-top {
  width: 100%;
}

.time-asset-grid-week .weekday-scene-card .time-asset-image {
  aspect-ratio: 4 / 3;
}

.weekday-scene-card .time-asset-context {
  font-size: var(--learner-hanzi-size);
  line-height: 1.4;
}

.weekday-scene-card .time-asset-context-pinyin {
  font-size: var(--learner-pinyin-size);
}

.weekday-scene-card .time-asset-context-english {
  font-size: var(--learner-english-size);
  line-height: 1.35;
}

.time-asset-grid-month .time-asset-context {
  font-size: var(--learner-hanzi-size);
  line-height: 1.4;
}

.time-asset-grid-month .time-asset-context-pinyin {
  font-size: var(--learner-pinyin-size);
}

.time-asset-grid-month .time-asset-context-english {
  font-size: var(--learner-english-size);
  line-height: 1.35;
}

.time-asset-grid-clock .time-asset-image,
.time-asset-grid-month .time-asset-image {
  aspect-ratio: 1 / 1;
}

.time-asset-grid-date .time-asset-image {
  aspect-ratio: 16 / 9;
}

.time-asset-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.1;
  text-align: center;
}

.time-asset-word-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.1;
}

.time-asset-word-list span + span {
  padding-left: 8px;
  border-left: 1px solid rgba(221, 207, 187, 0.92);
}

.time-asset-pinyin,
.time-asset-english {
  color: var(--muted);
  line-height: 1.2;
  text-align: center;
}

.time-asset-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.time-asset-english { font-size: var(--learner-english-size); }

.time-asset-context {
  font-family: var(--hanzi-font);
  color: var(--ink);
  font-size: var(--learner-hanzi-size);
  line-height: 1.35;
}

.time-asset-context-pinyin,
.time-asset-context-english {
  color: var(--muted);
  line-height: 1.25;
  text-align: center;
}

.time-asset-context-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.time-asset-context-english { font-size: var(--learner-english-size); }

.book-word-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 6rem;
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.book-word-image {
  display: block;
  flex: 0 0 5.25rem;
  width: 5.25rem;
  height: 4.25rem;
  object-fit: contain;
}

.book-word-image-fallback {
  display: grid;
  place-items: center;
  background: var(--cream, #fff7ec);
  color: var(--ink, #2f241d);
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.book-word-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  gap: 0.16rem;
}

.book-word-card .time-asset-hanzi,
.book-word-card .time-asset-pinyin,
.book-word-card .time-asset-english,
.book-word-card .time-asset-context,
.book-word-card .time-asset-context-pinyin,
.book-word-card .time-asset-context-english {
  text-align: left;
}

.book-word-card .time-asset-word-list {
  justify-content: flex-start;
}

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

.pet-food-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.pet-food-story-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
}

.pet-food-story-card:hover,
.pet-food-story-card:focus-visible {
  border-color: rgba(109, 156, 92, 0.72);
  box-shadow: 0 0 0 3px rgba(109, 156, 92, 0.14);
}

.pet-food-story-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--berry-dark);
  font-size: 1.2rem;
  font-weight: 800;
}

.pet-food-story-pair img {
  width: 4rem;
  height: 3.25rem;
  object-fit: contain;
}

.pet-food-story-copy {
  display: grid;
  gap: 0.1rem;
  text-align: center;
}

.pet-food-story-copy .time-asset-context,
.pet-food-story-copy .time-asset-context-pinyin,
.pet-food-story-copy .time-asset-context-english {
  text-align: center;
}

.animals-measure-prompt {
  margin: 0;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  text-align: center;
}

.animals-measure-blank {
  display: inline-block;
  min-width: 2.1rem;
  margin: 0 0.12rem;
  border-bottom: 3px solid var(--line);
  color: var(--berry-dark);
  text-align: center;
}

.animals-measure-blank.is-correct { border-color: #5a9b57; color: #357331; }
.animals-measure-blank.is-wrong { border-color: var(--berry); color: var(--berry-dark); }

.zoo-sentence-practice .numbers-game-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.numbers-game-option.zoo-sentence-choice {
  grid-template-columns: 3.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 5.1rem;
  padding: 0.38rem 0.62rem;
  text-align: left;
}

.zoo-sentence-choice-image {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: contain;
}

.zoo-sentence-choice-copy {
  display: grid;
  gap: 0.02rem;
  align-content: center;
}

.animals-measure-feedback {
  display: grid;
  gap: 0.12rem;
  justify-items: center;
  text-align: center;
}

.animals-measure-feedback p {
  margin: 0;
}

.pets-sentence-practice .numbers-game-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.pets-practice-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.pet-food-practice .numbers-game-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pets-sentence-practice .numbers-game-option {
  min-height: 4.4rem;
}

.numbers-game-option.pets-sentence-choice {
  grid-template-columns: 3.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.62rem;
  text-align: left;
}

.pets-sentence-choice-image {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: contain;
}

.pets-sentence-choice-copy {
  display: grid;
  gap: 0.02rem;
  align-content: center;
}

.pets-sentence-prompt {
  margin: 0;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  text-align: center;
}

.pets-practice-feedback {
  display: grid;
  gap: 0.12rem;
  justify-items: center;
  text-align: center;
}

.pets-practice-feedback p {
  margin: 0;
}

.pet-food-match-meaning {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pet-food-match-copy {
  display: grid;
  gap: 0.12rem;
}

.pet-food-match-copy .match-answer-label {
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 700;
  line-height: 1.15;
}

.pet-food-match-practice .polite-match-card {
  min-height: 6.75rem;
  align-content: center;
}

.pet-food-match-meaning img {
  width: 3.1rem;
  height: 2.6rem;
  object-fit: contain;
}

.time-months-intro {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.84);
}

.time-months-hanzi {
  margin-top: 4px;
  font-family: var(--hanzi-font);
  font-size: 1.7rem;
  line-height: 1.2;
}

.time-months-pinyin,
.time-months-english {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.time-months-pinyin {
  color: var(--berry-dark);
  font-weight: 700;
}

.time-routine-feature {
  margin: 0;
}

.time-routine-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.time-routine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
  align-items: center;
}

.time-routine-visual,
.time-routine-visual-split {
  min-width: 0;
}

.time-routine-visual-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: center;
}

.time-routine-kid-card,
.time-routine-clock-card,
.time-routine-scene-image {
  border-radius: 22px;
  border: 1px solid rgba(221, 207, 187, 0.78);
  background: rgba(255, 255, 255, 0.78);
}

.time-routine-kid-card,
.time-routine-clock-card {
  padding: 12px;
}

.time-routine-kid-image,
.time-routine-clock-image,
.time-routine-scene-image {
  display: block;
  width: 100%;
}

.time-routine-visual {
  position: relative;
}

.time-routine-kid-image,
.time-routine-clock-image {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.time-routine-scene-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 260px;
  height: auto;
  object-fit: cover;
}

.time-routine-time-of-day-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 251, 244, 0.94);
  border: 1px solid rgba(221, 207, 187, 0.92);
  box-shadow: 0 10px 20px rgba(73, 53, 31, 0.12);
}

.time-routine-time-of-day-hanzi {
  font-family: var(--hanzi-font);
  font-size: 1.45rem;
  line-height: 1;
}

.time-routine-time-of-day-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: lowercase;
}

.time-routine-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.time-routine-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.15;
}

.time-routine-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.time-routine-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.time-routine-chip-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.time-routine-chip {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 14px;
  min-height: 94px;
  border: 1px solid rgba(221, 207, 187, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.time-routine-chip.is-active,
.time-routine-chip:hover,
.time-routine-chip:focus-visible {
  border-color: rgba(81, 123, 141, 0.42);
  box-shadow: 0 0 0 3px rgba(81, 123, 141, 0.12);
}

.time-routine-chip-hanzi {
  font-family: var(--hanzi-font);
  font-size: 1.4rem;
}

.time-routine-chip-label {
  color: var(--muted);
  font-size: 0.94rem;
}

.greetings-line-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}

.greetings-line-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(221, 207, 187, 0.68);
}

.greetings-line-card[role="button"] {
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.greetings-line-card[role="button"]:active {
  transform: scale(0.985);
}

.greetings-line-card[role="button"].is-audio-playing,
.school-word-card.is-audio-playing,
.book-word-card.is-audio-playing,
.nature-word-card.is-audio-playing,
.comparison-word-card.is-audio-playing,
.time-asset-card.is-audio-playing,
.visual-vocabulary-card.is-audio-playing,
.focus-word-button.is-audio-playing,
.pet-food-story-card.is-audio-playing {
  border-color: rgba(190, 91, 73, 0.48);
  background: linear-gradient(180deg, #fff9f3, #efe2cc);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.greetings-line-card[role="button"]:focus-visible {
  outline: 3px solid rgba(190, 91, 73, 0.3);
  outline-offset: 3px;
}

.animals-scene-card .greetings-line-stack {
  gap: 7px;
}

.animals-scene-card .greetings-line-card {
  padding: 10px 12px;
  border-radius: 14px;
}

.animals-scene-card .telephone-bubble-copy {
  gap: 4px;
}

.family-scene-layout {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.95fr);
}

.family-scene-visual {
  min-width: 0;
}

.family-lesson-visual {
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
}

.family-lesson-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.family-lesson-visual-love {
  display: grid;
  align-content: center;
}

.family-lesson-visual-siblings {
  display: grid;
}

.family-room {
  position: relative;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(221, 207, 187, 0.78);
  background: linear-gradient(180deg, #fffefb, #f6ecdc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.family-room-scene-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 16px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.family-room-scene-copy {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(221, 207, 187, 0.68);
  box-shadow: 0 10px 20px rgba(48, 33, 24, 0.08);
}

.family-room-scene-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--berry-dark);
}

.family-room-scene-mood {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.family-room-scene-sun {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 34%, #ffe9a8, #f2c768 72%);
  box-shadow: 0 0 0 10px rgba(255, 233, 168, 0.18);
}

.family-room-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #f6fbfd 0%, #f7efe2 58%, #e7d5be 58%, #e5ccb2 100%);
}

.family-room-window {
  position: absolute;
  left: 50%;
  top: 56px;
  width: 182px;
  height: 118px;
  transform: translateX(-50%);
  border-radius: 24px 24px 14px 14px;
  border: 7px solid rgba(236, 219, 193, 0.95);
  overflow: hidden;
  background: linear-gradient(180deg, #edf9ff, #d9efe8);
  box-shadow: 0 8px 18px rgba(48, 33, 24, 0.08);
}

.family-room-window-sky,
.family-room-window-hill {
  position: absolute;
}

.family-room-window-sky {
  inset: 0;
  background: linear-gradient(180deg, #e8f6fb, #d4ecd9);
}

.family-room-window-hill {
  border-radius: 999px;
}

.family-room-window-hill-back {
  left: -10px;
  right: 16px;
  bottom: -38px;
  height: 88px;
  background: #bfd2b2;
}

.family-room-window-hill-front {
  left: 54px;
  right: -10px;
  bottom: -34px;
  height: 96px;
  background: #9eb68f;
}

.family-room-curtain {
  position: absolute;
  top: 48px;
  width: 34px;
  height: 132px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ecd1b9, #ddb897);
  box-shadow: inset -8px 0 0 rgba(255, 255, 255, 0.16);
}

.family-room-curtain-left {
  left: calc(50% - 122px);
}

.family-room-curtain-right {
  right: calc(50% - 122px);
}

.family-room-floor-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 92px;
  height: 2px;
  background: rgba(156, 121, 88, 0.22);
}

.family-room-rug {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 72%;
  height: 94px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(229, 239, 246, 0.92), rgba(191, 206, 214, 0.72));
}

.family-room-furniture {
  position: absolute;
}

.family-room-furniture-left {
  left: 18px;
  bottom: 40px;
  width: 108px;
  height: 118px;
  border-radius: 18px;
  background: linear-gradient(180deg, #d7b188, #b98b61);
  box-shadow: inset 0 -10px 0 rgba(255, 255, 255, 0.1);
}

.family-room-furniture-right {
  right: 24px;
  bottom: 48px;
  width: 160px;
  height: 96px;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(180deg, #f4d37d, #e5bc61);
  box-shadow: inset 0 -10px 0 rgba(255, 255, 255, 0.12);
}

.family-room-decor {
  position: absolute;
}

.family-room-decor-left {
  left: 42px;
  top: 116px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fef7d8, #f5ddb2);
  box-shadow: 0 6px 10px rgba(48, 33, 24, 0.06);
}

.family-room-decor-right {
  right: 54px;
  top: 118px;
  width: 44px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d7e7c5, #b8d199);
}

.family-room-decor-right::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 14px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #8db072, #6c9153);
}

.family-room-playroom .family-room-furniture-right {
  width: 128px;
  height: 118px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f0cf83, #d9b369);
}

.family-room-playroom .family-room-furniture-left {
  width: 110px;
  height: 94px;
}

.family-room-playroom .family-room-rug {
  background: radial-gradient(circle at center, rgba(255, 230, 191, 0.96), rgba(232, 192, 127, 0.72));
}

.family-room-playroom .family-room-decor-left {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f9a6af, #e67280 72%);
}

.family-room-playroom .family-room-decor-right {
  width: 54px;
  height: 18px;
  top: 130px;
  border-radius: 999px;
  background: linear-gradient(90deg, #89b3e0, #f0d07a);
}

.family-room-playroom .family-room-decor-right::before {
  width: 18px;
  height: 18px;
  top: 0;
  left: -8px;
  transform: none;
  border-radius: 50%;
  background: #87a9d9;
}

.family-room-visit .family-room-furniture-left,
.family-room-visit .family-room-furniture-right {
  background: linear-gradient(180deg, #d7c3a6, #b89b79);
}

.family-room-visit .family-room-rug {
  background: radial-gradient(circle at center, rgba(236, 223, 207, 0.96), rgba(201, 178, 152, 0.72));
}

.family-room-visit .family-room-decor-left {
  width: 46px;
  height: 18px;
  top: 128px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4ebe1, #dec7aa);
}

.family-room-visit .family-room-decor-left::before,
.family-room-visit .family-room-decor-left::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f4ebe1;
}

.family-room-visit .family-room-decor-left::before {
  left: 8px;
}

.family-room-visit .family-room-decor-left::after {
  right: 8px;
}

.family-room-visit .family-room-decor-right {
  width: 18px;
  height: 34px;
  top: 110px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #f1d494, #d8a860);
}

.family-room-visit .family-room-decor-right::before {
  width: 26px;
  height: 8px;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 247, 220, 0.86);
}

.family-room-cast {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 72px 26px 18px;
}

.family-room-person {
  display: grid;
  gap: 10px;
  justify-items: center;
  align-self: end;
  position: relative;
  z-index: 1;
}

.family-room-person-left {
  margin-left: 22px;
}

.family-room-person-right {
  margin-right: 18px;
}

.family-room-portrait {
  width: 132px;
  height: 204px;
  display: grid;
  align-items: end;
  justify-items: center;
}

.family-room-person-grandpa .family-room-portrait,
.family-room-person-grandma .family-room-portrait {
  width: 136px;
  height: 208px;
}

.family-room-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(48, 33, 24, 0.14));
}

.family-room-name {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--berry-dark);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(48, 33, 24, 0.08);
}

.family-room-name-hanzi {
  font-family: var(--hanzi-font);
  font-size: 1rem;
  color: var(--ink);
}

.family-room-name-english {
  font-size: 0.78rem;
  color: var(--muted);
}

.family-room-callout {
  position: absolute;
  top: 12px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(221, 207, 187, 0.74);
  box-shadow: 0 10px 18px rgba(48, 33, 24, 0.1);
  font-family: var(--hanzi-font);
  font-size: 1.05rem;
  color: var(--ink);
}

.family-room-callout::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.95);
  border-right: 1px solid rgba(221, 207, 187, 0.74);
  border-bottom: 1px solid rgba(221, 207, 187, 0.74);
  transform: rotate(45deg);
}

.family-room-person-left .family-room-callout {
  left: 8px;
}

.family-room-person-left .family-room-callout::after {
  left: 18px;
}

.family-room-person-right .family-room-callout {
  right: 8px;
}

.family-room-person-right .family-room-callout::after {
  right: 18px;
}

.family-match-card {
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  text-align: left;
}

.family-match-avatar {
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(221, 207, 187, 0.72);
  background: radial-gradient(circle at center, rgba(255, 250, 241, 0.96), rgba(244, 232, 215, 0.9));
  display: grid;
  place-items: center;
  padding: 4px;
}

.family-match-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-match-avatar-image-headshot {
  object-fit: cover;
}

.family-sentence-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.family-sentence-choice {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}

.family-sentence-choice-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.family-sentence-sibling-label {
  margin: 0;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 750;
}

.family-household-choice {
  margin-top: 0.9rem;
}

.family-household-label {
  margin: 0;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 750;
}

.family-household-choice-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.family-sentence-builder .numbers-game-option:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.family-sentence-builder .numbers-game-option {
  justify-items: center;
  text-align: center;
}

.family-sentence-choice-options .numbers-game-option {
  min-height: 2.55rem;
  padding: 0.4rem;
  font-size: 0.95rem;
}

.family-sentence-builder .numbers-game-option.is-selected {
  border-color: #5e9a5a;
  background: #eef8e9;
  color: #24572c;
  box-shadow: 0 0 0 3px rgba(94, 154, 90, 0.18);
}

.family-sentence-preview {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #eef6e3;
}

.family-sentence-preview p {
  margin: 0;
}

.family-sentence-preview p + p {
  margin-top: 0.25rem;
}

@media (max-width: 560px) {
  .introductions-explorer-grid {
    grid-template-columns: 1fr;
  }

  .family-scenes-grid {
    grid-template-columns: 1fr;
  }

  .family-sentence-choice-grid {
    grid-template-columns: 1fr;
  }
}

.family-match-copy {
  display: grid;
  gap: 2px;
}

.introductions-scene-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
}

.introductions-explorer-grid .introductions-scene-layout {
  grid-template-columns: minmax(0, 1fr);
}

.introductions-explorer-grid .greetings-line-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.family-scenes-grid .family-scene-layout {
  grid-template-columns: minmax(0, 1fr);
}

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

.family-scene-family-scene-1 .greetings-line-card:first-child {
  grid-column: 1 / -1;
}

.family-scene-family-scene-2 .greetings-line-stack {
  grid-template-columns: minmax(0, 1fr);
}

.family-scene-position-label {
  margin-right: 0.35rem;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
}

.family-scene-sentence-line {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.family-scene-sentence-line .telephone-line-hanzi {
  margin: 0;
}

.introductions-scene-layout .greetings-scene-image {
  aspect-ratio: 4 / 3;
}

.intro-scene-cast {
  display: grid;
  gap: 12px;
  align-content: start;
}

.intro-cast-card,
.intro-character-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(221, 207, 187, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  cursor: pointer;
}

.intro-cast-card:hover,
.intro-cast-card:focus-visible,
.intro-character-card:hover,
.intro-character-card:focus-visible {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.intro-cast-portrait,
.intro-character-portrait {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(221, 207, 187, 0.7);
  background: linear-gradient(180deg, #dcebef, #f7efe2 70%);
}

.intro-cast-portrait {
  aspect-ratio: 4 / 4.8;
}

.intro-character-portrait {
  aspect-ratio: 4 / 4.7;
}

.intro-cast-image,
.intro-character-image,
.intro-line-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.intro-character-image {
  transform: scale(1.1);
  transform-origin: center 35%;
}

.intro-character-image-anan {
  object-position: 28% 35%;
  transform-origin: 28% 35%;
}

.intro-cast-hanzi,
.intro-character-hanzi {
  font-family: var(--hanzi-font);
  font-size: 1.5rem;
  color: var(--ink);
}

.intro-cast-label,
.intro-character-label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.intro-line-card {
  align-items: stretch;
}

.intro-line-copy {
  display: grid;
  gap: 8px;
}

.intro-line-speaker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intro-line-portrait {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(221, 207, 187, 0.72);
  background: linear-gradient(180deg, #dcebef, #f7efe2 70%);
  flex-shrink: 0;
}

.intro-character-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.greetings-word-strip {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
}

.greetings-word-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.telephone-scene-people {
  display: grid;
  gap: 14px;
}

.telephone-bubble {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  position: relative;
}

.telephone-bubble-question::before,
.telephone-bubble-answer::before {
  content: "";
  position: absolute;
  top: 26px;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.78);
  transform: rotate(45deg);
}

.telephone-bubble-question::before {
  left: 102px;
}

.telephone-bubble-answer::before {
  left: 102px;
}

.telephone-figure-card {
  width: 92px;
  height: 132px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #dcebef, #f7efe2 70%);
  border: 1px solid rgba(221, 207, 187, 0.82);
}

.telephone-figure {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18px;
  transform: scale(1.04);
}

.telephone-figure-mirror {
  transform: scaleX(-1);
}

.telephone-bubble-copy {
  display: grid;
  gap: 8px;
}

.telephone-line-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
}

.telephone-line-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.telephone-line-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.telephone-number-strip {
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
}

.telephone-digit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.telephone-digit-chip {
  padding: 12px 16px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
  cursor: pointer;
}

.telephone-digit-chip:hover,
.telephone-digit-chip:focus-visible {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.telephone-digit-chip.is-selected {
  border-color: rgba(190, 91, 73, 0.48);
  background: linear-gradient(180deg, #fff9f3, #efe2cc);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.numbers-game-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
}

.numbers-game-arabic {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--berry-dark);
}

.numbers-game-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.numbers-game-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.match-answer-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.clothes-quiz-shell {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(221, 207, 187, 0.76);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.84);
}

.clothes-quiz-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.meals-picture-choice {
  margin-top: 16px;
}

/* Meals & Feelings uses four complete-sentence answers. Keep the picture and
   the 2-by-2 answer board level on wider screens, without changing the
   familiar one-column flow on phones. */
.meals-picture-choice.practice-compact-split {
  grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto 400px;
  align-items: stretch;
}

.meals-picture-choice > .practice-compact-visual {
  width: 400px;
  height: 400px;
  max-width: 100%;
  aspect-ratio: 1;
}

.meals-picture-choice .practice-compact-content {
  height: 100%;
}

.meals-picture-choice .clothes-quiz-options {
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 400px;
}

.meals-picture-choice .clothes-quiz-option {
  height: 100%;
  min-height: 0;
  text-align: center;
}

.meals-picture-choice .clothes-quiz-option > span:not(.answer-result-mark) {
  max-width: 100%;
}

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

.sentence-choice-options .clothes-quiz-option {
  min-height: 104px;
}

/* Home Hobbies has only two complete-sentence choices. Keep them stacked so
   their Chinese, pinyin, and English remain easy to scan. */
.hobbies-at-home-sentence-choice-options {
  grid-template-columns: minmax(0, 1fr);
}

.food-preference-choice-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.food-preference-builder-columns {
  display: grid;
  grid-template-columns: minmax(74px, 0.72fr) minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 12px;
}

.food-preference-builder-column,
.food-preference-builder-list {
  display: grid;
  gap: 8px;
}

.food-preference-pattern-column {
  grid-template-rows: auto minmax(0, 1fr);
}

.food-preference-pattern-column .food-preference-builder-list {
  align-content: center;
  gap: 16px;
}

.food-preference-food-options {
  grid-template-columns: minmax(0, 1fr);
}

.food-preference-subject-choice,
.food-preference-pattern-choice,
.food-preference-fill-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 68px;
  min-height: 68px;
  padding: 8px 6px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
}

.food-preference-fill-choice {
  min-width: 0;
  justify-content: flex-start;
  min-height: 68px;
  padding: 4px 6px;
}

.food-preference-choice-image {
  width: 2.52rem;
  height: 2.52rem;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(248, 244, 235, 0.82);
}

.food-preference-subject-choice.is-active,
.food-preference-pattern-choice.is-active,
.food-preference-fill-choice.is-active {
  border-color: var(--leaf);
  background: var(--sky);
  box-shadow: inset 0 0 0 1px var(--leaf);
}

.food-preference-subject-choice.is-active .numbers-game-hanzi,
.food-preference-pattern-choice.is-active .numbers-game-hanzi,
.food-preference-fill-choice.is-active .numbers-game-hanzi {
  color: #456d32;
}

.food-preference-subject-choice.is-active .numbers-game-pinyin,
.food-preference-pattern-choice.is-active .numbers-game-pinyin,
.food-preference-fill-choice.is-active .numbers-game-pinyin,
.food-preference-subject-choice.is-active .numbers-game-english,
.food-preference-pattern-choice.is-active .numbers-game-english,
.food-preference-fill-choice.is-active .numbers-game-english {
  color: #456d32;
}

.food-preference-builder-list .numbers-game-hanzi {
  font-size: var(--learner-hanzi-size);
  flex: 0 0 auto;
}

.food-preference-card-meta {
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
  white-space: normal;
  text-align: right;
}

.food-preference-card-copy {
  display: grid;
  flex: 0 1 auto;
  gap: 4px;
  min-width: 0;
}

.food-preference-builder-list .numbers-game-pinyin {
  font-size: var(--learner-pinyin-size);
}

.food-preference-builder-list .numbers-game-english {
  font-size: var(--learner-english-size);
}

.food-preference-built-sentence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: #fffdf8;
  text-align: left;
}

.food-preference-fill-choice:hover,
.food-preference-subject-choice:hover,
.food-preference-pattern-choice:hover {
  border-color: var(--leaf);
}

.clothes-quiz-visual {
  width: min(100%, 420px);
  margin: 0 auto;
  justify-self: center;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: #fffdf8;
  aspect-ratio: 4 / 3;
}

.clothes-quiz-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.clothes-quiz-image.hobbies-3b-practice-image {
  object-fit: cover;
}

/* Colour objects are square illustrations, so keep their practice prompt
   compact instead of inheriting the wider scene-sized quiz frame. */
.world-colour-picture-practice .clothes-quiz-visual {
  width: min(100%, 20rem);
  aspect-ratio: 1;
}

.world-colour-picture-practice .clothes-quiz-image {
  box-sizing: border-box;
  padding: 1rem;
}

.world-colour-answer-feedback {
  min-height: 2.7rem;
  margin: 0;
  color: #357331;
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 700;
  text-align: center;
}

.world-colour-answer-feedback.is-placeholder { visibility: hidden; }

.toy-practice-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 800;
}

.toy-practice-answer {
  display: grid;
  gap: 2px;
  min-height: 4.8rem;
  justify-items: start;
}

.toy-practice-sentence-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 6px 12px;
}

.toy-practice-answer-pinyin,
.toy-practice-answer-english {
  min-height: 1.5em;
  margin: 0;
  text-align: left;
}

.toy-practice-answer-english {
  justify-self: start;
}

.toy-practice-answer .is-placeholder {
  visibility: hidden;
}

.toy-practice-blank {
  min-width: 4.5em;
  padding: 3px 12px;
  border-bottom: 2px dashed rgba(143, 105, 136, 0.45);
  color: rgba(122, 110, 96, 0.54);
  text-align: center;
}

.toy-practice-blank.is-correct {
  border-bottom-style: solid;
  border-color: rgba(72, 137, 97, 0.55);
  color: #397452;
}

.clothes-sentence-frame {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: #fffdf8;
  text-align: center;
}

.clothes-sentence-frame .numbers-game-pinyin,
.clothes-sentence-frame .numbers-game-english {
  flex-basis: 100%;
}

.clothes-sentence-blank {
  min-width: 4.5em;
  padding: 3px 8px;
  border-bottom: 2px dashed rgba(143, 105, 136, 0.45);
  color: rgba(122, 110, 96, 0.54);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  font-weight: 800;
  text-align: center;
}

.clothes-sentence-frame.is-correct .clothes-sentence-blank {
  border-bottom-style: solid;
  border-color: rgba(72, 137, 97, 0.55);
  color: #397452;
}

.hobbies-sentence-slot {
  padding: 7px 10px;
  border: 1px dashed rgba(122, 110, 96, 0.24);
  border-radius: 999px;
  background: rgba(254, 245, 231, 0.58);
  color: rgba(122, 110, 96, 0.5);
  font-size: 0.82rem;
  font-weight: 800;
}

.time-routine-quiz-visual {
  aspect-ratio: 1 / 1;
}

.transport-quiz-visual {
  aspect-ratio: 5 / 4;
}

.position-quiz-visual {
  aspect-ratio: 5 / 4;
}

.comparison-quiz-visual {
  aspect-ratio: 5 / 4;
}

.greetings-scene-image.position-scene-image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.greetings-scene-image.position-scene-image-all-directions {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.transport-build-target {
  position: relative;
  display: flex;
  min-height: 82px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 48px 14px 14px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: #fffdf8;
}

.classroom-sentence-output {
  display: grid;
  gap: 5px;
  padding-right: 14px;
  text-align: center;
}

.classroom-sentence-object-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 10px;
}

.intro-build-chip.classroom-sentence-object-chip {
  min-height: 96px;
  padding: 9px 8px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  gap: 4px;
  font-size: var(--learner-hanzi-size);
  line-height: 1.2;
}

.classroom-sentence-object-icon {
  width: 58px;
  height: 52px;
  object-fit: contain;
}

.transport-build-hint {
  display: grid;
  gap: 3px;
}

.transport-build-hint-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.transport-build-hint-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.transport-build-target.is-correct {
  border-color: rgba(111, 143, 97, 0.42);
  background: linear-gradient(180deg, #f4fbf0, #dcefd2);
}

.transport-build-target.is-wrong {
  border-color: rgba(190, 91, 73, 0.34);
  background: linear-gradient(180deg, #fff7f4, #f7ded8);
}

.comparison-build-target {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.75;
}

.comparison-build-blank {
  display: inline-flex;
  min-width: 42px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--berry);
  color: var(--berry-dark);
  font-size: var(--learner-hanzi-size);
  font-weight: 700;
}

.clothes-quiz-option {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 94px;
  padding: 12px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
}

.clothes-quiz-option.is-wrong {
  border-color: rgba(190, 91, 73, 0.34);
  background: linear-gradient(180deg, #fff7f4, #f7ded8);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.1);
}

.clothes-quiz-option.is-correct {
  border-color: rgba(111, 143, 97, 0.42);
  background: linear-gradient(180deg, #f4fbf0, #dcefd2);
  box-shadow: 0 0 0 3px rgba(111, 143, 97, 0.14);
}

.clothes-quiz-next {
  display: flex;
  justify-content: center;
}

.math-game-form {
  margin-top: 14px;
}

.math-game-equation-wrap {
  display: grid;
  gap: 8px;
}

.math-game-equation,
.math-game-chinese {
  display: grid;
  grid-template-columns: 56px 56px 56px 72px 88px;
  gap: 10px;
  align-items: center;
}

.math-game-equation {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
}

.math-game-chinese {
  color: var(--berry-dark);
  font-size: 1.05rem;
  font-weight: 700;
}

.math-game-input {
  width: 88px;
  padding: 12px 14px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 1.6rem;
  text-align: center;
}

.math-game-feedback {
  margin-top: 12px;
  color: var(--berry-dark);
  font-weight: 700;
}

.math-game-next {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  font-size: 1.05rem;
}

.multiplication-board {
  display: grid;
  gap: 14px;
}

.multiplication-playback-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.multiplication-playback-controls .small-button {
  min-width: 0;
}

.multiplication-playback-controls .small-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.multiplication-matrix-card,
.multiplication-detail-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(221, 207, 187, 0.76);
}

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

.multiplication-corner,
.multiplication-header,
.multiplication-cell,
.multiplication-cell-empty {
  min-height: 64px;
  border-radius: 18px;
}

.multiplication-header {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f2c76d, #db9752);
  color: var(--ink);
  font-weight: 800;
}

.multiplication-cell,
.multiplication-cell-empty {
  display: grid;
  place-items: center;
  padding: 10px;
}

.multiplication-cell {
  border: 1px solid rgba(221, 207, 187, 0.84);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.multiplication-cell:hover,
.multiplication-cell:focus-visible,
.multiplication-cell.is-active {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.multiplication-cell.is-playing {
  border-color: #5e9a5a;
  background: #eef8e9;
  box-shadow: 0 0 0 3px rgba(94, 154, 90, 0.2);
}

.multiplication-cell-empty {
  background: rgba(255, 255, 255, 0.28);
}

.multiplication-cell-fact {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.multiplication-cell-product {
  color: var(--berry-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.multiplication-detail-card {
  display: grid;
  gap: 10px;
  position: relative;
}

.multiplication-detail-card .numbers-game-top {
  display: block;
}

.multiplication-detail-card .numbers-game-top .small-button {
  position: absolute;
  top: 18px;
  right: 18px;
}

.multiplication-line-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
}

.multiplication-line-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.multiplication-line-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.body-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 6px;
}

.body-listen-practice {
  display: grid;
  gap: 16px;
}

@media (min-width: 761px) {
  .body-spotlight-desktop {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    align-items: center;
  }

  .body-spotlight-desktop .body-listen-visual {
    min-height: 420px;
    margin: 0;
  }

  .body-spotlight-desktop .body-spotlight-options {
    margin-top: 0;
  }
}

.body-listen-visual {
  display: grid;
  place-items: center;
  min-height: 500px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(221, 207, 187, 0.76);
  border-radius: 22px;
  background: linear-gradient(180deg, #dcebef, #f7efe2 70%);
}

.body-listen-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.body-listen-scene-card {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1024 / 1536;
  overflow: hidden;
}

.body-spotlight-window {
  position: absolute;
  z-index: 1;
  top: var(--body-spotlight-y);
  left: var(--body-spotlight-x);
  width: var(--body-spotlight-width);
  height: var(--body-spotlight-height);
  transform: translate(-50%, -50%) rotate(var(--body-indicator-rotation, 0deg));
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 100vmax rgba(48, 41, 31, 0.64);
  pointer-events: none;
}

.body-spotlight-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.body-spotlight-option.is-wrong {
  border-color: rgba(190, 91, 73, 0.8);
  background: #fff3f1;
}

.body-spotlight-option.is-correct {
  border-color: rgba(111, 143, 97, 0.8);
  background: #eef7ea;
}
}

.body-listen-answer {
  padding: 14px 16px;
  border: 1px solid rgba(111, 143, 97, 0.32);
  border-radius: 18px;
  background: linear-gradient(180deg, #eef7ea, #dcefd2);
}

.body-practice-visual {
  display: grid;
  gap: 14px;
}

.body-more-practice-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf8, #f6eee1);
  border: 1px solid rgba(221, 207, 187, 0.76);
}

.body-more-practice-card h4 {
  font-size: 1.18rem;
  margin-bottom: 6px;
}

.body-sentence-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
}

.body-sentence-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.body-sentence-english {
  font-size: var(--learner-english-size);
}

.body-sentence-note {
  color: var(--muted);
}

.body-sentence-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.body-sentence-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  background: #f0e6d4;
  color: var(--ink);
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  cursor: pointer;
}

.body-sentence-chip.is-active {
  border-color: rgba(190, 91, 73, 0.34);
  background: linear-gradient(180deg, #fff7ef, #f1dfc9);
}

.body-sentence-chip:hover,
.body-sentence-chip:focus-visible {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.body-diagram {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(280px, 430px) minmax(140px, 1fr);
  gap: 18px;
  align-items: center;
}

.body-label-column {
  display: grid;
  gap: 12px;
}

.body-scene {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, #dcebef, #f7efe2 70%);
  border: 1px solid rgba(221, 207, 187, 0.82);
}

.body-scene-card {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1024 / 1536;
}

.body-scene-kid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.body-label-button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(221, 207, 187, 0.86);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.86);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.body-label-column-right .body-label-button {
  text-align: right;
}

.body-label-button:hover {
  transform: translateY(-2px);
}

.body-label-button.is-active {
  border-color: rgba(190, 91, 73, 0.28);
  background: linear-gradient(180deg, #fff8f1, #efe1cb);
  box-shadow: 0 14px 30px rgba(35, 49, 59, 0.08);
}

.body-label-button.is-muted {
  background: rgba(255, 255, 255, 0.7);
}

.body-label-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  line-height: 1.1;
  color: var(--ink);
}

.body-label-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.body-label-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.body-label-button.is-muted .body-label-hanzi,
.body-label-button.is-muted .body-label-pinyin,
.body-label-button.is-muted .body-label-english {
  color: #a9afb3;
}

.support-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.body-match-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8, #f6eee1);
  border: 1px solid rgba(221, 207, 187, 0.76);
}

.body-match-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.body-match-heading h4 {
  font-size: 1.2rem;
}

.body-match-kicker {
  color: var(--berry-dark);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#activity-panel-title,
.time-months-heading > .body-match-kicker,
.visual-topic-notes > .body-match-kicker {
  font-size: 1.4rem;
}

.visual-topic-notes > .body-match-kicker {
  font-size: 0;
}

.visual-topic-notes > .body-match-kicker::after {
  content: "Notes";
  font-size: 1.4rem;
}

.numbers-game-top .body-match-kicker {
  font-family: var(--latin-font);
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.15;
}

.body-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.body-match-actions .small-button {
  width: 124px;
}

.body-match-helper,
.body-match-progress {
  color: var(--muted);
}

.body-match-progress {
  font-size: 0.96rem;
  font-weight: 700;
}

.body-match-board-headings,
.body-match-solved-row,
.body-match-open-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.body-match-solved-pairs {
  display: grid;
  gap: 12px;
}

.body-match-open-board {
  align-items: start;
}

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

.body-match-card {
  display: grid;
  align-content: center;
  gap: 4px;
  height: 92px;
  padding: 14px;
  border: 1px solid rgba(221, 207, 187, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.body-match-card:hover {
  transform: translateY(-2px);
}

.body-match-card-chinese {
  place-content: center;
  text-align: center;
}

.body-match-card.is-selected {
  border-color: rgba(190, 91, 73, 0.34);
  background: linear-gradient(180deg, #fff7ef, #f1dfc9);
}

.body-match-card.is-solved {
  border-color: rgba(111, 143, 97, 0.32);
  background: linear-gradient(180deg, #eef7ea, #dcefd2);
  cursor: default;
}

.body-match-card.is-wrong {
  border-color: rgba(190, 91, 73, 0.48);
  background: linear-gradient(180deg, #fff7f4, #f7ded8);
}

.body-match-card:disabled {
  opacity: 1;
}

.body-match-hanzi {
  font-family: var(--hanzi-font);
  font-size: var(--learner-hanzi-size);
  color: var(--ink);
}

.body-match-pinyin {
  color: var(--berry-dark);
  font-size: var(--learner-pinyin-size);
  font-weight: 700;
}

.body-match-english {
  color: var(--muted);
  font-size: var(--learner-english-size);
}

.body-next-round {
  justify-self: start;
}

.body-part-indicator {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, 0.98);
  border-radius: 999px;
  background: rgba(190, 91, 73, 0.18);
  box-shadow: 0 0 0 12px rgba(190, 91, 73, 0.11);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: bodyPulse 1.8s ease-in-out infinite;
}

@keyframes bodyPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(var(--body-indicator-rotation, 0deg)) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) rotate(var(--body-indicator-rotation, 0deg)) scale(1.08);
  }
}

.body-part-indicator-head {
  top: 24.5%;
  left: 50%;
  width: 190px;
  height: 190px;
}

.body-part-indicator-forehead {
  top: 18.5%;
  left: 50%;
  width: 116px;
  height: 44px;
}

.body-part-indicator-hair {
  top: 12%;
  left: 50%;
  width: 122px;
  height: 70px;
}

.body-part-indicator-eyes {
  top: 29%;
  left: 50%;
  width: 120px;
  height: 48px;
}

.body-part-indicator-ears {
  top: 32%;
  left: 29%;
}

.body-part-indicator-nose {
  top: 32%;
  left: 50%;
}

.body-part-indicator-mouth {
  top: 35%;
  left: 50%;
  width: 68px;
  height: 34px;
}

.body-part-indicator-neck {
  top: 41%;
  left: 50%;
  width: 44px;
  height: 24px;
}

.body-part-indicator-hand {
  top: 62%;
  left: 25.2%;
  width: 44px;
  height: 56px;
}

.body-part-indicator-arm {
  top: 58.3%;
  left: 26.8%;
  width: 48px;
  height: 92px;
  --body-indicator-rotation: 30deg;
}

.body-part-indicator-leg {
  top: 79%;
  left: 42%;
  width: 62px;
  height: 118px;
}

.body-part-indicator-foot {
  top: 88.8%;
  left: 36.5%;
  width: 76px;
  height: 46px;
}

.topic-columns {
  margin-top: 18px;
  grid-template-columns: 1fr;
}

.topic-columns.is-hidden {
  display: none;
}

.sub-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #fbf8f1;
}

.step-list,
.pill-list,
.alignment-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.step-card,
.alignment-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #fffdf8;
  border: 1px solid rgba(221, 207, 187, 0.74);
}

.step-card {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.step-card:hover,
.step-card:focus-visible {
  border-color: rgba(190, 91, 73, 0.4);
  box-shadow: 0 0 0 3px rgba(190, 91, 73, 0.12);
}

.step-card.is-active {
  border-color: rgba(190, 91, 73, 0.42);
  background: linear-gradient(180deg, #fff7ef, #f1e2cf);
  box-shadow: 0 10px 24px rgba(35, 49, 59, 0.08);
}

.step-card-top,
.alignment-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.step-book,
.alignment-book {
  color: var(--berry-dark);
  font-weight: 700;
}

.step-title,
.alignment-title {
  font-weight: 700;
}

.pill-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.practice-pill {
  padding: 12px 14px;
  border-radius: 999px;
  background: #f0e6d4;
  color: var(--ink);
  text-align: center;
  font-weight: 700;
}

.guide-detail {
  display: none;
}

.guide-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #fbf8f1;
}

.guide-card h3 {
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .hero,
  .detail-layout,
  .topic-columns {
    grid-template-columns: 1fr;
  }

  .pathway-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .landing-routes {
    grid-template-columns: 1fr;
  }

  .topic-library-grid {
    grid-template-columns: 1fr;
  }

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

  .book-category-grid {
    grid-template-columns: 1fr;
  }

  .book-lesson-grid {
    grid-template-columns: 1fr;
  }

  .body-game {
    margin-top: 0;
    grid-template-columns: 1fr;
  }

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

  .greetings-exchange-top {
    flex-direction: column;
  }

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

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

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

  .time-routine-layout,
  .time-routine-visual-split {
    grid-template-columns: 1fr;
  }

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

  .practice-split-board,
  .polite-match-board,
  .family-match-board-headings,
  .family-match-solved-row {
    grid-template-columns: 1fr;
  }

  .body-diagram {
    grid-template-columns: 1fr;
  }

  .lookup-shell {
    grid-template-columns: 1fr;
  }

  .hero-illustration {
    min-height: 260px;
  }

  .visual-vocabulary-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .browser-group-body {
    grid-template-columns: 1fr;
  }

  .topic-row {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .topic-scene {
    width: 108px;
    height: 88px;
    border-radius: 20px;
    font-size: 1.25rem;
  }

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

  .pathway-steps {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding: 58px 20px 48px;
    border-radius: 24px;
  }

  .landing-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .landing-hero-actions {
    width: 100%;
  }

  .landing-action {
    width: 100%;
  }

  .landing-route {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
    padding: 24px 20px;
  }

  .library-hero {
    padding: 56px 20px 46px;
    border-radius: 24px;
  }

  .library-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .learning-category {
    padding: 20px 16px;
    border-radius: 24px;
  }

  .topic-library-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .topic-library-card .topic-scene {
    width: 96px;
    height: 82px;
  }

  .book-browser {
    grid-template-columns: 1fr 1fr;
  }

  .book-category-grid {
    grid-template-columns: 1fr;
  }

  .landing-route-arrow {
    display: none;
  }

  .telephone-bubble {
    grid-template-columns: 1fr;
  }

  .greetings-line-card {
    flex-direction: column;
    align-items: stretch;
  }

  .intro-character-grid {
    grid-template-columns: 1fr;
  }

  .telephone-bubble-question::before,
  .telephone-bubble-answer::before {
    display: none;
  }

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

  .body-scene {
    order: -1;
    min-height: 480px;
    padding: 12px;
  }

  .body-label-column-right .body-label-button {
    text-align: left;
  }

  .body-match-board-headings,
  .body-match-solved-row,
  .body-match-open-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100vw - 14px, 100%);
    padding-top: 8px;
  }

  .hero,
  .switcher-panel,
  .detail-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .topic-detail {
    padding: 0;
    border-radius: 0;
  }

  .site-nav {
    margin: 0 4px 12px;
  }

  .site-mark {
    font-size: 0.88rem;
  }

  .site-nav-link {
    padding: 8px;
    font-size: 0.86rem;
  }

  .pathway-panel {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-actions,
  .view-switcher {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-button,
  .view-tab,
  .small-button {
    width: 100%;
  }

  .progress-strip {
    align-items: stretch;
  }
}

/* Landing and lesson surfaces share the culture section's editorial card system. */
.main-layout {
  margin-top: 38px;
}

.switcher-panel,
.detail-panel {
  border-color: rgba(45, 34, 24, 0.07);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.view-switcher {
  padding: 5px;
  background: var(--paper-soft);
}

.view-tab {
  font-weight: 700;
}

.view-tab.is-active {
  background: var(--berry);
}

.browser-group {
  border-color: rgba(45, 34, 24, 0.07);
  background: #fffaf4;
}

.browser-group-header:hover {
  background: var(--paper-soft);
}

.topic-row,
.lesson-row,
.lookup-card {
  border: 1px solid rgba(45, 34, 24, 0.07);
  background: var(--paper);
}

.topic-row.is-selected,
.lesson-row.is-selected {
  outline-color: rgba(232, 69, 60, 0.18);
  background: #fff6e9;
}

.focus-card {
  border: 1px solid rgba(45, 34, 24, 0.06);
  background: #fffaf4;
}

.topic-detail {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Culture is a third landing-page path, parallel to Topics and Books. */
.culture-panel {
  padding: 0;
}

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

.culture-category-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 24px 14px 20px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.culture-category-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--cat-accent, var(--sun));
  content: "";
}

.culture-category-card:hover,
.culture-category-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45, 34, 24, 0.11);
}

.culture-category-card.is-selected {
  outline: 3px solid color-mix(in srgb, var(--cat-accent, var(--sun)) 24%, transparent);
  outline-offset: 2px;
}

.culture-card-emoji {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cat-accent, var(--sun)) 12%, transparent);
  font-size: 1.8rem;
  line-height: 1;
}

.culture-card-count {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 10px;
  color: #fff;
  background: var(--cat-accent, var(--sun));
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.4;
}

.culture-card-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.12;
}

.culture-card-name strong {
  font-family: var(--hanzi-font);
  font-size: 1.2rem;
}

.culture-card-name em {
  color: var(--cat-accent, var(--sun));
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 700;
}

.culture-card-name em::before {
  content: none;
}

.culture-card-hint {
  display: none;
}

.culture-category-section {
  margin-top: 40px;
  padding: 40px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  scroll-margin-top: 72px;
}

.culture-category-section .cat-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(45, 34, 24, 0.06);
}

.culture-category-section .cat-icon {
  display: grid;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--cat-accent, var(--sun)) 12%, transparent);
  font-size: 1.8rem;
  line-height: 1;
}

.culture-category-section .cat-head h3 {
  margin: 4px 0 0;
  color: var(--cat-accent, var(--berry));
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  line-height: 1.08;
}

.culture-category-section .cat-head > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.42rem;
}

.culture-category-section .cat-head h3::after {
  margin-left: 0.42rem;
  color: var(--cat-accent, var(--berry));
  content: "·";
}

.culture-category-section .cat-head h4 {
  margin: 0;
  color: var(--cat-accent, var(--berry));
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.08;
}

.culture-category-section .cat-desc {
  display: none;
}

.culture-category-section .topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.culture-category-section .topic {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 22px;
  border-radius: 16px;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.culture-category-section .topic .zh {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.culture-category-section .topic .en {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.culture-category-section .topic.done {
  border: 1px solid rgba(240, 168, 48, 0.25);
  background: var(--paper-soft);
}

.culture-category-section .topic.done a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
}

.culture-category-section .culture-difficulty {
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  margin-bottom: 3px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--cat-accent, var(--berry)) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-accent, var(--berry)) 8%, white);
  color: var(--cat-accent, var(--berry));
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.culture-category-section .culture-difficulty .zh,
.culture-category-section .culture-difficulty .en {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.culture-category-section .culture-difficulty .en::before {
  content: "·";
  margin-right: 5px;
}

.culture-category-section .topic.done:hover {
  transform: translateY(-2px);
  background: #fef0d9;
  box-shadow: var(--shadow);
}

.culture-category-section .topic.done .zh {
  color: var(--cat-accent, var(--berry));
}

.culture-category-section .topic.done .en {
  color: var(--cat-accent, var(--berry));
  font-weight: 500;
}

.culture-category-section .topic.done::after {
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--cat-accent, var(--berry));
  content: "→";
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 150ms ease, right 150ms ease;
}

.culture-category-section .topic.done:hover::after {
  right: 14px;
  opacity: 1;
}

.culture-category-section .topic.upcoming {
  border: 1px solid rgba(45, 34, 24, 0.05);
  background: #f8f6f3;
}

.culture-category-section .topic.upcoming .zh {
  color: #9a8e80;
}

.culture-category-section .topic.upcoming .en {
  color: #bab0a4;
}

@media (max-width: 800px) {
  .culture-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .culture-category-section {
    padding: 28px 20px;
  }

  .culture-category-section .topic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .culture-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .culture-category-section .cat-head {
    flex-direction: column;
    gap: 8px;
  }
}

/* Final cascade for the learning-home refactor. Keep this after legacy landing rules. */
.library-hero h1 {
  max-width: none;
  letter-spacing: 0;
}

/* Match the main page typography to culture/index.html. */
.library-hero {
  padding: 64px 48px 36px;
  border-radius: 28px;
}

.library-hero h1 {
  font-family: var(--display-font);
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: 0;
  background: linear-gradient(135deg, #7c5420, #b8863e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.library-hero h2 {
  margin-top: 8px;
  font-family: var(--display-font);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--sun);
}

.library-hero-subtitle {
  margin-top: 16px;
  max-width: 52ch;
  font-size: 0.98rem;
  line-height: 1.68;
}

.library-hero-routes {
  margin-top: 24px;
}

.story-highlights {
  width: 100%;
  margin: 24px auto 0;
}

.story-highlights-viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  border-radius: 20px;
  scrollbar-width: none;
  box-shadow: 0 12px 28px rgba(45, 34, 24, 0.14);
}

.story-highlights-viewport::-webkit-scrollbar {
  display: none;
}

.story-highlights-track {
  display: flex;
  width: 600%;
}

.story-highlight-slide {
  position: relative;
  display: block;
  flex: 0 0 16.666667%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  scroll-snap-align: start;
  color: #fff;
  background: #2d2218;
  text-decoration: none;
}

.story-highlight-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

/* Keep the money story as one full-bleed image with no added background treatment. */
.story-highlight-slide--money img {
  object-fit: cover;
  object-position: center center;
}

/* Keep Mulan's head clear of the upper crop when the slide scales on focus or hover. */
.story-highlight-slide--mulan img {
  object-position: center 25%;
}

.story-highlight-slide:hover img,
.story-highlight-slide:focus-visible img {
  transform: scale(1.045);
}

.story-highlight-slide::after {
  position: absolute;
  inset: 35% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(25, 17, 11, 0.9));
  pointer-events: none;
}

.story-highlight-copy {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 1;
  display: grid;
  gap: 3px;
}

.story-highlight-kicker {
  color: #ffe1a6;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-highlight-copy strong {
  font-family: var(--hanzi-font);
  font-size: 1.35rem;
  line-height: 1.18;
}

.story-highlight-copy small {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.86rem;
  line-height: 1.32;
}

.story-highlight-copy em {
  margin-top: 6px;
  color: #ffe1a6;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.story-highlight-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
}

.story-highlight-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(124, 84, 32, 0.26);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.story-highlight-dots button[aria-current="true"] {
  width: 24px;
  background: var(--berry);
}

.section-heading h2 {
  font-family: var(--display-font);
  letter-spacing: 0;
}

.view-tab {
  display: grid;
  gap: 2px;
  min-width: 152px;
  line-height: 1.1;
}

.tab-zh {
  font-family: var(--hanzi-font);
  font-size: 1.05rem;
}

.tab-en {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.learning-culture-nav {
  position: fixed;
  top: 0;
  left: 84px;
  right: 0;
  z-index: 100;
  display: flex;
  height: 64px;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  overflow: hidden;
  border-bottom: 1px solid rgba(45, 34, 24, 0.06);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 16px rgba(45, 34, 24, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scrollbar-width: none;
  transform: translateY(-100%);
  transition: transform 250ms ease;
}

.learning-culture-nav.visible {
  transform: translateY(0);
}

.learning-culture-nav-items {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.learning-culture-nav-items::-webkit-scrollbar {
  display: none;
}

.learning-culture-nav-item {
  display: flex;
  flex: 0 0 auto;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: center;
  white-space: nowrap;
  transition: background 150ms ease;
}

.learning-culture-nav-item:hover,
.learning-culture-nav-item:focus-visible {
  background: rgba(45, 34, 24, 0.04);
}

.learning-culture-nav-item.active {
  background: #fff4df;
}

.learning-culture-nav-item .zh {
  font-family: var(--hanzi-font);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
}

.learning-culture-nav-item .en {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.learning-culture-nav-item.active .zh {
  color: var(--category-accent, var(--berry));
}

.learning-culture-nav-item.active .en {
  color: var(--category-accent, var(--sun));
}

.learning-display-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-left: 12px;
}

.learning-display-toggle {
  display: inline-grid;
  width: 56px;
  height: 56px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(45, 34, 24, 0.08);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 250, 244, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.learning-display-toggle:hover,
.learning-display-toggle:focus-visible {
  background: var(--paper-soft);
}

.learning-display-toggle.is-toggle-active {
  border-color: rgba(240, 168, 48, 0.32);
  color: #a5680b;
  background: var(--paper-soft);
}

.learning-display-toggle.is-toggle-inactive {
  color: #9b9389;
  background: rgba(255, 250, 244, 0.5);
}

.learning-display-sound-icon {
  width: 33px;
  height: 33px;
}

.learning-display-letter-icon {
  display: block;
  font-family: var(--latin-font);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
}

.learning-display-pinyin-icon {
  font-family: var(--display-font);
  font-size: 1.5rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.learning-display-english-icon {
  font-family: var(--display-font);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.learning-home-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.learning-home-card {
  position: relative;
  display: flex;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.learning-home-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--category-accent, var(--sun));
}

.learning-home-card:hover,
.learning-home-card:focus-within,
.learning-home-card.is-selected {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45, 34, 24, 0.1);
}

.learning-home-card.is-selected {
  background: #fffaf4;
}

.learning-home-card-main {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 24px 14px 20px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.learning-card-count {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 10px;
  color: #fff;
  background: var(--category-accent, var(--sun));
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.4;
}

.learning-home-card-icon {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  place-items: center;
  margin: 0 0 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--category-accent, var(--sun)) 12%, transparent);
  font-size: 1.8rem;
  line-height: 1;
}

.category-generated-icon {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
}

.category-generated-icon-foundations {
  width: 48px;
  height: 48px;
}

.category-emoji-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.category-emoji-icon-school-life {
  font-size: 2.15rem;
}

.learning-category-section {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding: 40px;
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  scroll-margin-top: 72px;
}

.learning-category-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(45, 34, 24, 0.06);
}

.learning-category-head-icon {
  display: flex;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--category-accent, var(--sun)) 12%, transparent);
  font-size: 1.8rem;
  line-height: 1;
}

.learning-category-head-icon .category-generated-icon {
  width: 50px;
  height: 50px;
}

.learning-category-head h3 {
  margin: 4px 0 0;
  color: var(--category-accent, var(--berry));
  font-family: var(--hanzi-font);
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  line-height: 1.08;
}

.learning-category-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.42rem;
}

.learning-category-title-separator {
  color: var(--category-accent, var(--berry));
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 700;
}

.learning-category-head h4 {
  margin: 0;
  color: var(--category-accent, var(--berry));
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.08;
}

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

.category-topic-card {
  position: relative;
  display: flex;
  min-height: 96px;
  flex-direction: column;
  gap: 8px;
  padding: 18px 46px 18px 22px;
  border: 1px solid rgba(240, 168, 48, 0.25);
  border-radius: 16px;
  color: var(--ink);
  background: #fff8ed;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.category-topic-card::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 22px;
  color: var(--category-accent, var(--sun));
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 150ms ease, right 150ms ease;
}

.category-topic-card:hover,
.category-topic-card:focus-visible,
.category-topic-card.is-selected {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--category-accent, var(--sun)) 32%, white);
  background: #fff0dc;
  box-shadow: var(--shadow);
}

.category-topic-card:hover::after,
.category-topic-card:focus-visible::after,
.category-topic-card.is-selected::after {
  right: 16px;
  opacity: 1;
}

.category-topic-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
}

.category-topic-zh {
  color: var(--category-accent, var(--ink));
  font-family: var(--hanzi-font);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.category-topic-separator {
  color: var(--category-accent, var(--sun));
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.category-topic-en {
  color: var(--category-accent, var(--sun));
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.category-topic-hint {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.35;
}

.topic-library-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
  min-height: 218px;
  padding: 12px 12px 16px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.topic-library-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--topic-accent, var(--sun));
}

.topic-library-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
}

.topic-library-card:hover,
.topic-library-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(232, 69, 60, 0.24);
  box-shadow: 0 12px 34px rgba(45, 34, 24, 0.1);
}

.topic-library-card .topic-scene,
.topic-library-card .topic-scene-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1.18 / 1;
  border-radius: 16px;
}

.topic-scene-image {
  display: block;
  overflow: hidden;
  background: color-mix(in srgb, var(--topic-accent, var(--sun)) 10%, white);
  box-shadow: none;
}

.topic-scene-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-copy {
  display: block;
  min-width: 0;
}

.learning-home-card .topic-zh-title {
  font-family: var(--hanzi-font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.learning-home-card .topic-row-title {
  color: var(--category-accent, var(--sun));
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.learning-home-card .topic-row-title::before {
  content: " · ";
  color: #ccc5b8;
}

/* Category cards use a deliberate bilingual heading. Topic cards keep their
   compact inline Chinese · English title. */
.learning-home-card:not(.book-library-card) .topic-zh-title,
.learning-home-card:not(.book-library-card) .topic-row-title {
  display: block;
  line-height: 1.12;
}

.learning-home-card:not(.book-library-card) .topic-row-title {
  margin-top: 0.4rem;
}

.learning-home-card:not(.book-library-card) .topic-row-title::before {
  content: none;
}

.learning-home-card .topic-row-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.3;
}

.topic-subtopic-drawer {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(232, 69, 60, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(255, 244, 224, 0.95)),
    var(--paper-soft);
  box-shadow: var(--shadow);
}

.topic-subtopic-drawer-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.topic-subtopic-drawer-heading h3 {
  margin-top: 4px;
  color: var(--berry-dark);
  font-family: var(--hanzi-font);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.08;
}

.topic-subtopic-drawer-heading p {
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.topic-card-subtopics {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(232, 69, 60, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

.topic-card-subtopics.is-hidden {
  display: none;
}

.topic-card-subtopic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.topic-card-subtopic {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 13px;
  color: var(--ink);
  background: #fff8ed;
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.topic-card-subtopic:hover,
.topic-card-subtopic:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(232, 69, 60, 0.28);
  background: #fff0dc;
}

.topic-card-subtopic-zh {
  font-family: var(--hanzi-font);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.topic-card-subtopic-en {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.book-browser {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-lesson-section {
  display: grid;
  gap: 18px;
  padding: 32px;
  border: 1px solid rgba(45, 34, 24, 0.06);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  scroll-margin-top: 88px;
}

.book-lesson-section.is-selected {
  border-color: color-mix(in srgb, var(--book-accent, var(--sun)) 28%, white);
}

.book-lesson-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(45, 34, 24, 0.06);
}

.book-lesson-head h3 {
  margin-top: 4px;
  color: var(--book-accent, var(--berry));
  font-family: var(--display-font);
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  line-height: 1.08;
}

.book-lesson-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}


.subtopic-shelf {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(240, 168, 48, 0.24);
  border-radius: var(--radius-lg);
  background: #fff8ed;
}

.subtopic-shelf.is-hidden {
  display: none;
}

.subtopic-shelf-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.subtopic-shelf-heading h3 {
  margin-top: 4px;
  color: var(--berry-dark);
  font-family: var(--hanzi-font);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.1;
}

.subtopic-shelf-heading p {
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.subtopic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.subtopic-card {
  display: grid;
  gap: 9px;
  min-height: 168px;
  padding: 10px;
  border: 1px solid rgba(45, 34, 24, 0.07);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.subtopic-card:hover,
.subtopic-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(232, 69, 60, 0.26);
  box-shadow: 0 8px 18px rgba(45, 34, 24, 0.08);
}

.subtopic-image,
.subtopic-fallback {
  display: grid;
  overflow: hidden;
  aspect-ratio: 1.18 / 0.82;
  place-items: center;
  border-radius: 12px;
  background: #f6ead9;
}

.subtopic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subtopic-fallback {
  padding: 10px;
  color: var(--berry-dark);
  font-family: var(--hanzi-font);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.subtopic-copy {
  display: grid;
  gap: 2px;
}

.subtopic-copy strong {
  font-family: var(--hanzi-font);
  font-size: 1.15rem;
  line-height: 1.15;
}

.subtopic-copy small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 1180px) {
  .topic-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .learning-home-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 901px) {
  .site-shell {
    width: min(1240px, calc(100vw - 32px));
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 980px) {
  .topic-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

}

@media (max-width: 900px) {
  .pets-practice-list {
    grid-template-columns: 1fr;
  }

  .global-view-menu {
    top: 4px;
    left: 10px;
  }

  .global-view-panel {
    left: 66px;
  }

  .learning-culture-nav {
    left: 78px;
  }
}

@media (max-width: 760px) {
  .polite-scene-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .polite-scene-layout .greetings-line-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-word-card {
    gap: 0.5rem;
    padding: 0.55rem;
  }

  .book-word-image {
    flex-basis: 3.75rem;
    width: 3.75rem;
    height: 3.4rem;
  }

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

  .pet-food-story-grid {
    grid-template-columns: 1fr;
  }

  .visual-topic-note-grid {
    grid-template-columns: 1fr;
  }

  .time-months-intro {
    flex-direction: column;
  }

  .time-date-section-tabs,
  .time-asset-grid,
  .time-asset-grid-date,
  .comparison-word-grid,
  .time-routine-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .school-scene-layout.is-compact {
    grid-template-columns: 1fr;
  }

  .school-scene-grid,
  .school-word-grid,
  .school-word-grid.is-text-only {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .school-lesson-section.is-lunch .school-scene-grid.is-single {
    width: 100%;
  }

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

  .food-preference-builder-columns {
    gap: 6px;
  }

  .food-preference-subject-choice,
  .food-preference-pattern-choice,
  .food-preference-fill-choice {
    height: 62px;
    min-height: 62px;
    padding: 6px 4px;
  }

  .food-preference-fill-choice {
    padding-block: 2px;
  }

  .food-preference-fill-choice {
    padding-block: 2px;
  }

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

  .library-hero-routes {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topic-library-card {
    min-height: 190px;
    padding: 10px 10px 14px;
  }

  .category-topic-grid {
    grid-template-columns: 1fr;
  }

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

  .learning-category-head {
    align-items: start;
    flex-direction: column;
  }

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

  .topic-subtopic-drawer-heading {
    align-items: start;
    flex-direction: column;
  }

  .subtopic-shelf-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .school-scene-grid,
  .polite-scene-grid,
  .position-scene-grid,
  .room-scene-grid,
  .time-routine-scene-grid,
  .school-lesson-section.is-weather .weather-scene-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .learning-display-controls {
    gap: 4px;
    padding-left: 4px;
  }

  .learning-display-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .learning-display-sound-icon {
    width: 27px;
    height: 27px;
  }

  /* Long question cards, such as 我可以问老师吗？, need to grow instead of
     clipping their Hanzi and pinyin in the phone's two-column match board. */
  .lesson-practice-shell .polite-match-card {
    height: auto;
    min-height: 92px;
    align-content: start;
  }
}

@media (max-width: 760px) {
  .school-scene-grid .greetings-exchange-top,
  .polite-scene-grid .greetings-exchange-top,
  .room-scene-grid .greetings-exchange-top,
  .time-routine-scene-grid .greetings-exchange-top,
  .weather-scene-grid .greetings-exchange-top,
  .greetings-practice-grid .greetings-exchange-top {
    flex-direction: row;
    align-items: flex-start;
  }

  .school-scene-grid .small-button.is-play-button,
  .polite-scene-grid .small-button.is-play-button,
  .room-scene-grid .small-button.is-play-button,
  .time-routine-scene-grid .small-button.is-play-button,
  .weather-scene-grid .small-button.is-play-button,
  .greetings-practice-grid .small-button.is-play-button {
    width: 46px !important;
    height: 46px;
    flex: 0 0 46px;
  }

  .school-scene-grid .small-button.is-play-button::before,
  .polite-scene-grid .small-button.is-play-button::before,
  .room-scene-grid .small-button.is-play-button::before,
  .time-routine-scene-grid .small-button.is-play-button::before,
  .weather-scene-grid .small-button.is-play-button::before,
  .greetings-practice-grid .small-button.is-play-button::before {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 12px;
  }

  /* Matching depends on seeing both answer sets together. Keep the left and
     right columns side by side on phones instead of stacking them. */
  .polite-match-board,
  .family-match-board-headings,
  .family-match-solved-row,
  .body-match-board-headings,
  .body-match-solved-row,
  .body-match-open-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .school-scene-grid,
  .polite-scene-grid,
  .room-scene-grid,
  .time-routine-scene-grid,
  .school-lesson-section.is-weather .weather-scene-grid,
  .toys-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-scene-grid .greetings-exchange-top,
  .polite-scene-grid .greetings-exchange-top,
  .room-scene-grid .greetings-exchange-top,
  .time-routine-scene-grid .greetings-exchange-top,
  .weather-scene-grid .greetings-exchange-top,
  .greetings-practice-grid .greetings-exchange-top {
    min-height: 58px;
  }

  /* Keep the image row level across every two-column scene grid. Cards with
     fewer dialogue lines receive their extra height after the sentence stack,
     never above the illustration. */
  .school-scene-grid > .greetings-exchange,
  .polite-scene-grid > .greetings-exchange,
  .room-scene-grid > .greetings-exchange,
  .time-routine-scene-grid > .greetings-exchange,
  .weather-scene-grid > .greetings-exchange,
  .greetings-practice-grid > .greetings-exchange {
    grid-template-rows: minmax(58px, auto) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .practice-compact-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .toys-practice-shell.practice-compact-split {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .toys-practice-shell .practice-compact-content,
  .toys-practice-shell .clothes-quiz-options {
    height: auto;
  }

  .toys-practice-shell .clothes-quiz-options {
    grid-template-rows: none;
  }

  .toys-practice-shell .clothes-quiz-option {
    min-height: 104px;
  }

  .practice-compact-split > .practice-compact-visual,
  .practice-compact-content {
    grid-column: 1;
    grid-row: auto;
  }

  .practice-compact-split > .practice-compact-visual {
    width: min(100%, 24rem);
  }

  .meals-picture-choice.practice-compact-split {
    grid-template-rows: auto;
  }

  .meals-picture-choice .practice-compact-content,
  .meals-picture-choice .clothes-quiz-options {
    height: auto;
  }

  .meals-picture-choice .clothes-quiz-option {
    min-height: 104px;
  }
}

/* On phone-sized screens, the body artwork is narrow enough to keep the
   vocabulary and picture-choice cards beside it rather than wasting its sides. */
.body-spotlight-mobile {
  display: none;
}

@media (max-width: 760px) {
  .body-diagram {
    grid-template-columns: minmax(74px, 1fr) minmax(150px, 170px) minmax(74px, 1fr);
    gap: 6px;
    align-items: center;
  }

  .body-label-column {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .body-label-button,
  .body-label-column-right .body-label-button {
    padding: 7px 4px;
    border-radius: 12px;
    gap: 2px;
    text-align: center;
  }

  .body-scene {
    order: initial;
    min-height: 0;
    padding: 6px;
    border-radius: 18px;
  }

  .body-scene-card {
    width: 100%;
  }

  .body-spotlight-desktop {
    display: none;
  }

  .body-spotlight-mobile {
    display: grid;
    grid-template-columns: minmax(74px, 1fr) minmax(150px, 170px) minmax(74px, 1fr);
    gap: 6px;
    align-items: center;
  }

  .body-spotlight-mobile .body-listen-visual {
    min-height: 0;
    padding: 6px;
    border-radius: 18px;
  }

  .body-spotlight-mobile .body-listen-scene-card {
    width: 100%;
  }

  .body-spotlight-option-column {
    display: grid;
    gap: 6px;
  }

  .body-spotlight-option {
    min-width: 0;
    min-height: 0;
    padding: 7px 4px;
    border-radius: 12px;
    text-align: center;
  }
}

@media (min-width: 521px) and (max-width: 760px) and (orientation: landscape) {
  .body-diagram,
  .body-spotlight-mobile {
    grid-template-columns: minmax(110px, 1fr) minmax(210px, 260px) minmax(110px, 1fr);
    gap: 10px;
  }

  .body-label-button,
  .body-label-column-right .body-label-button,
  .body-spotlight-option {
    padding: 9px 7px;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .comparison-word-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  /* Let the featured-story carousel use the phone's available width. */
  .library-hero {
    padding: 48px 16px 30px;
  }

  .global-view-panel {
    width: min(156px, calc(100vw - 86px));
  }

  .view-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .view-tab {
    min-width: 0;
    width: 100%;
    padding: 10px 8px;
  }

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

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


  .story-highlights {
    margin-top: 18px;
  }

  .story-highlight-slide {
    aspect-ratio: 4 / 3;
  }

  .story-highlight-copy {
    right: 15px;
    bottom: 14px;
    left: 15px;
  }

  .story-highlight-copy strong {
    font-size: 1.2rem;
  }

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

  .learning-culture-nav {
    height: 64px;
    padding: 0 8px;
  }

  .learning-display-controls {
    gap: 25px;
    padding-left: 6px;
  }

  .learning-display-toggle {
    width: 56px;
    height: 56px;
  }

  .learning-culture-nav-item {
    padding: 5px 10px;
  }

  .learning-culture-nav-item .zh {
    font-size: 0.9rem;
  }

  .learning-category-section {
    padding: 18px;
    border-radius: 20px;
  }

  .topic-library-card {
    min-height: 174px;
  }

  .learning-home-card {
    min-height: 164px;
  }

  .topic-zh-title {
    font-size: 1.28rem;
  }

  .topic-row-title {
    font-size: 0.86rem;
  }

  .topic-row-meta {
    font-size: 0.72rem;
  }

  .subtopic-shelf {
    padding: 14px;
  }

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

.subtopic-card {
    min-height: 150px;
  }
}

/* Every scene occupies one consistent visual frame, regardless of source orientation. */
.everyday-actions-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.everyday-action-card {
  overflow: hidden;
  border: 1px solid rgba(45, 34, 24, 0.08);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.everyday-action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 0;
}

.everyday-action-visual {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  margin-top: 8px;
}

.everyday-action-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.everyday-action-copy {
  padding: 12px 14px 16px;
}

.everyday-action-word {
  margin-bottom: 4px;
  color: #a5680b;
  font-family: var(--hanzi-font);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
}

.everyday-actions-quiz-visual {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 12px;
  background: #fffaf0;
}

.everyday-actions-quiz-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.everyday-actions-answer {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: #f1faed;
  text-align: center;
}

@media (max-width: 520px) {
  .everyday-actions-gallery {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .everyday-actions-quiz-visual {
    min-height: 220px;
  }
}
.book-lesson-card .book-lesson-meta {
  color: var(--book-accent, var(--berry));
  font-family: var(--latin-font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}
