:root {
  --brand-paper: #fff9ee;
  --brand-paper-cool: #f6fbff;
  --brand-surface: #ffffff;
  --brand-ink: #173653;
  --brand-muted: #657789;
  --brand-line: #e4e1d8;
  --brand-blue: #1976d2;
  --brand-blue-soft: #eaf4ff;
  --brand-yellow: #f3be3e;
  --brand-mint: #5bbe9a;
  --brand-coral: #f1836a;
  --brand-orange: #e99a4a;
  --brand-radius-sm: 8px;
  --brand-radius-md: 12px;
  --brand-radius-lg: 20px;
  --brand-shadow: 0 18px 46px rgba(42, 72, 99, 0.08);
  --brand-control-min: 44px;
  --brand-accent: var(--brand-blue);
  --brand-accent-soft: var(--brand-blue-soft);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--brand-paper);
}

body {
  color: var(--brand-ink);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--brand-paper);
  background-image:
    linear-gradient(rgba(51, 94, 130, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 94, 130, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}

.portal-page,
.games-page {
  --brand-accent: var(--brand-blue);
  --brand-accent-soft: var(--brand-blue-soft);
}

.kidword-page {
  --brand-accent: #1976d2;
  --brand-accent-soft: #eaf4ff;
}

.midword-page {
  --brand-accent: #247c5d;
  --brand-accent-soft: #eaf7f1;
}

.kidmath-page {
  --brand-accent: #9c5d15;
  --brand-accent-soft: #fff4e4;
}

.kidwrite-page {
  --brand-accent: #b84d3b;
  --brand-accent-soft: #fff0ec;
}

.portal-shell,
.coming-shell,
.page-shell,
.site-shell,
.write-shell {
  width: min(1240px, calc(100vw - 48px));
}

.backdrop,
.page-bg,
.arcade-sky {
  display: none;
}

/* Shared navigation */
.portal-topbar,
.site-topbar,
.site-topbar.panel,
.topbar,
.write-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid rgba(228, 225, 216, 0.96);
  border-radius: 0;
  color: var(--brand-ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.site-topbar,
.topbar,
.write-topbar {
  padding: 11px 16px;
  margin-bottom: 24px;
}

.portal-topbar {
  padding: 13px 0;
}

.portal-brand-logo {
  width: 156px;
  height: 48px;
  object-fit: contain;
}

.portal-brand,
.site-brand,
.brand,
.write-brand {
  min-width: var(--brand-control-min);
  min-height: var(--brand-control-min);
}

.site-brand-mark,
.write-brand-mark,
.brand img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  box-shadow: none;
}

.site-brand-copy strong,
.write-brand-copy strong,
.brand strong {
  color: var(--brand-ink);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.portal-nav,
.quick-nav,
.nav,
.write-nav {
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.portal-nav::-webkit-scrollbar,
.quick-nav::-webkit-scrollbar,
.nav::-webkit-scrollbar,
.write-nav::-webkit-scrollbar {
  display: none;
}

.portal-nav a,
.quick-nav a,
.nav a,
.write-nav a {
  min-height: var(--brand-control-min);
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 0;
  border-radius: var(--brand-radius-sm);
  color: #506477;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.portal-nav a:hover,
.quick-nav a:hover,
.nav a:hover,
.write-nav a:hover {
  color: var(--brand-ink);
  background: #f4f2eb;
}

.quick-nav a.is-current,
.nav a.is-current,
.write-nav a.is-current,
.arcade-topbar .portal-nav a[aria-current="page"] {
  color: #fff;
  background: var(--brand-accent);
}

.quick-nav a.portal-link,
.nav a.portal-link,
.write-nav a.portal-link {
  color: var(--brand-accent);
  border: 1px solid color-mix(in srgb, var(--brand-accent) 22%, transparent);
  background: var(--brand-accent-soft);
}

.portal-main,
.main-layout,
.page-main,
.write-main,
.arcade-main {
  gap: 24px;
}

.portal-main {
  padding: 28px 0 56px;
}

.main-layout,
.write-main {
  margin-top: 0;
}

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

/* Warm learning-desk hero family */
.hero-panel,
.page-shell > .hero.panel,
.site-shell .hero,
.write-hero.panel,
.composition-hero.panel,
.page-intro.panel,
.page-intro.section-panel,
.arcade-intro {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius-lg);
  color: var(--brand-ink);
  background-color: #fffdf8;
  background-image:
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--brand-accent) 12%, transparent), transparent 29%),
    linear-gradient(rgba(51, 94, 130, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 94, 130, 0.045) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  box-shadow: var(--brand-shadow);
}

.hero-panel::before,
.page-shell > .hero::before,
.site-shell .hero::before,
.write-hero::before,
.composition-hero.panel::before,
.page-intro::before,
.arcade-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(420px, 46%);
  height: 5px;
  display: block;
  background: var(--brand-accent);
}

.hero-panel::after {
  right: 48px;
  bottom: 42px;
  width: 132px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand-yellow);
  transform: rotate(-2deg);
  opacity: 0.9;
}

.hero-panel {
  grid-template-columns: minmax(0, 0.96fr) minmax(430px, 1.04fr);
  gap: clamp(36px, 5vw, 68px);
  min-height: 520px;
  padding: clamp(42px, 5vw, 68px);
}

.hero-copy h1,
.hero-panel h1,
.write-hero h1,
.composition-hero h1,
.page-intro h1,
.site-shell .hero h1,
.arcade-intro h1 {
  color: var(--brand-ink);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.hero-panel .hero-copy h1 {
  max-width: 7.5em;
  font-size: clamp(54px, 6vw, 80px);
  line-height: 0.98;
}

.page-shell > .hero h1,
.site-shell .hero h1,
.write-hero h1 {
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.06;
}

.page-intro h1,
.composition-hero h1 {
  max-width: 18em;
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.1;
}

.hero-kicker,
.eyebrow,
.section-kicker,
.hero-copy .eyebrow,
.hero-copy .hero-kicker,
.page-intro .eyebrow,
.page-intro .section-kicker,
.arcade-overline {
  color: var(--brand-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hero-panel .hero-copy > p,
.page-shell > .hero .hero-copy > p,
.site-shell .hero .hero-copy > p,
.site-shell .hero .hero-text,
.write-hero .hero-copy > p,
.composition-hero p,
.page-intro > p,
.page-intro .intro-text,
.arcade-intro .arcade-lead {
  color: var(--brand-muted);
  font-size: 17px;
  line-height: 1.78;
}

.hero-button,
.pill-button,
.primary-button,
.secondary-button,
.ghost-button,
.button,
.button-primary,
.button-secondary,
.link-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 800;
}

.hero-button-primary,
.pill-button,
.primary-button,
.button.primary,
.button-primary {
  border-color: transparent;
  color: #fff;
  background: var(--brand-accent);
}

.hero-button-secondary,
.page-shell > .hero .pill-button.neutral,
.page-shell > .hero .pill-button.ghost,
.site-shell .hero .button.secondary,
.write-hero .button-secondary,
.composition-hero .button-secondary,
.page-intro .pill-button.ghost,
.page-intro .button-secondary {
  border: 1px solid color-mix(in srgb, var(--brand-accent) 22%, var(--brand-line));
  color: var(--brand-accent);
  background: #fff;
}

.hero-note {
  border-color: var(--brand-line);
}

.hero-note p {
  color: var(--brand-muted);
}

.hero-note strong {
  color: var(--brand-ink);
}

.hero-note > span {
  color: #fff;
  background: var(--brand-mint);
}

.today-board,
.page-shell > .hero .hero-visual,
.write-hero .hero-media-card,
.composition-hero-panel,
.site-shell .hero .math-hero-board {
  border: 1px solid color-mix(in srgb, var(--brand-accent) 18%, var(--brand-line));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 38px rgba(42, 72, 99, 0.08);
  backdrop-filter: blur(12px);
}

.today-board-head strong,
.page-shell > .hero .hero-progress-row strong,
.page-shell > .hero .stat-card strong,
.write-hero .hero-stat-pill strong,
.composition-hero-panel strong,
.site-shell .hero .math-hero-board strong {
  color: var(--brand-ink);
}

.today-board-head > div span,
.page-shell > .hero .hero-progress-row span,
.page-shell > .hero .stat-card span,
.page-shell > .hero .stat-card .muted,
.write-hero .hero-stat-pill span,
.site-shell .hero .math-hero-board p,
.site-shell .hero .math-board-kicker {
  color: var(--brand-muted);
}

.today-date {
  color: var(--brand-accent);
  background: var(--brand-accent-soft);
}

.today-item {
  border-color: var(--brand-line);
  color: var(--brand-ink);
  background: #fff;
}

.today-item strong,
.today-item b {
  color: var(--brand-ink);
}

.today-item small {
  color: var(--brand-muted);
}

.today-item:hover {
  border-color: color-mix(in srgb, var(--brand-accent) 34%, var(--brand-line));
  background: var(--brand-accent-soft);
}

.page-shell > .hero .hero-visual {
  padding: 18px;
}

.page-shell > .hero .hero-progress,
.page-shell > .hero .hero-mini-pill,
.page-shell > .hero .stat-card,
.write-hero .hero-stat-pill {
  border-color: var(--brand-line);
  background: #fff;
}

.page-shell > .hero .progress-bar {
  background: #e8edf0;
}

.page-shell > .hero .progress-fill {
  background: var(--brand-accent);
}

.site-shell .hero .math-pattern i,
.site-shell .hero .math-pattern b {
  color: var(--brand-ink);
  background: var(--brand-accent-soft);
}

.write-hero .hero-media-card {
  padding: 10px;
}

/* Content surfaces */
.apps-panel,
.games-panel,
.highlights-panel,
.panel,
.section,
.section-panel,
.priority-zone,
.library-zone {
  border: 1px solid var(--brand-line);
  border-radius: 16px;
  background: var(--brand-surface);
  box-shadow: 0 10px 30px rgba(42, 72, 99, 0.05);
}

.apps-panel,
.games-panel,
.highlights-panel {
  padding: clamp(30px, 4vw, 50px);
}

.section,
.section-panel {
  padding: 30px;
}

.section-head {
  gap: 32px;
  margin-bottom: 26px;
}

.section-head h2,
.apps-panel .section-head h2,
.games-panel .section-head h2,
.highlights-panel .section-head h2 {
  color: var(--brand-ink);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(32px, 3.7vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head > p,
.section-head p,
.home-games-actions > p {
  color: var(--brand-muted);
  line-height: 1.72;
}

.section-head .section-kicker,
.apps-panel .section-kicker,
.games-panel .section-kicker,
.highlights-panel .section-kicker {
  color: var(--brand-accent);
}

.app-card,
.home-game-card,
.feature-card,
.card,
.focus-card,
.module-card,
.flow-card,
.lesson-detail,
.story-section,
.detail-card,
.homework-card,
.activity-card,
.summary-card,
.stat-card,
.source-card,
.source-file-card,
.topic-card,
.stage-card,
.composition-route-card,
.essay-card {
  border-color: var(--brand-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.app-card {
  min-height: 280px;
  padding: 26px;
}

.app-card::after {
  opacity: 0.35;
}

.app-card-word { background: #eff7ff; }
.app-card-mid { background: #eef9f5; }
.app-card-write { background: #fff2ee; }
.app-card-math { background: #fff7e7; }

.app-card h3,
.home-game-card h3,
.feature-card strong,
.module-card h3,
.composition-route-card h3 {
  color: var(--brand-ink);
  letter-spacing: -0.025em;
}

.app-card h3 {
  font-size: 30px;
}

.app-card p,
.home-game-card p,
.feature-card p,
.module-card p,
.composition-route-card p {
  color: var(--brand-muted);
}

.home-game-card {
  min-height: 240px;
  padding: 28px;
}

.home-game-card-main {
  border-color: #bcd9f3;
  background: #eff7ff;
}

.home-game-card-lab {
  border-color: #f0c8bd;
  background: #fff3ee;
}

.home-game-emblem {
  color: var(--brand-blue);
  background: #fff;
}

.home-game-emblem-lab {
  color: #c9624e;
}

.highlight-card strong {
  color: var(--brand-ink);
  font-size: 20px;
}

.highlight-card p {
  color: var(--brand-muted);
}

/* Internal page intros */
.page-intro {
  min-height: 240px;
  display: grid;
  align-content: center;
  padding: clamp(32px, 4.5vw, 54px);
}

.page-intro .page-tools {
  margin-top: 22px;
}

.composition-intro {
  min-height: 230px;
}

/* Unified learning subpages */
.learning-subpage {
  --subpage-radius: 20px;
  --subpage-control-radius: 10px;
  --subpage-section-gap: 24px;
  color: var(--brand-ink);
}

.learning-subpage :where(.main-layout, .page-main, .write-main) {
  gap: var(--subpage-section-gap);
}

.learning-subpage :where(.site-topbar, .topbar, .write-topbar) {
  min-height: 72px;
  align-items: center;
  padding: 11px 16px;
  margin-bottom: 24px;
  border-color: var(--brand-line);
  background: rgba(255, 255, 255, 0.94);
}

.learning-subpage :where(.site-brand-copy, .write-brand-copy, .brand > span) > span {
  color: var(--brand-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.learning-subpage .page-intro {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 0;
  padding: clamp(38px, 4vw, 48px);
  border: 1px solid var(--brand-line);
  border-radius: var(--subpage-radius);
  color: var(--brand-ink);
  background-color: #fffdf8;
  background-image:
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--brand-accent) 12%, transparent), transparent 29%),
    linear-gradient(rgba(51, 94, 130, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 94, 130, 0.045) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  box-shadow: var(--brand-shadow);
}

.learning-subpage .page-intro > :where(.eyebrow, .section-kicker) {
  margin: 0 0 14px;
  color: var(--brand-accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.14em;
}

.learning-subpage .page-intro h1 {
  max-width: 22em;
  margin: 0;
  color: var(--brand-ink);
  font-size: clamp(38px, 3.5vw, 48px);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.learning-subpage .page-intro > :where(p, .intro-text) {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--brand-muted);
  font-size: 17px;
  line-height: 1.75;
}

.learning-subpage .page-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 0;
}

.learning-subpage .page-tools > :where(a, button) {
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--subpage-control-radius);
}

.learning-subpage :where(.section, .section-panel):not(.page-intro) {
  padding: 30px;
  border: 1px solid var(--brand-line);
  border-radius: var(--subpage-radius);
  background: var(--brand-surface);
  box-shadow: 0 12px 34px rgba(42, 72, 99, 0.055);
}

.learning-subpage .section-head {
  gap: 28px;
  margin-bottom: 26px;
}

.learning-subpage .section-head h2 {
  margin: 0;
  color: var(--brand-ink);
  font-size: clamp(29px, 2.7vw, 38px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.learning-subpage .section-head > p {
  max-width: 520px;
  color: var(--brand-muted);
  line-height: 1.72;
}

.learning-subpage :where(
  .card,
  .focus-card,
  .module-card,
  .flow-card,
  .lesson-detail,
  .story-section,
  .detail-card,
  .homework-card,
  .activity-card,
  .summary-card,
  .stat-card,
  .source-card,
  .source-file-card,
  .topic-card,
  .stage-card,
  .composition-route-card,
  .essay-card,
  .topic-detail,
  .practice-board,
  .practice-summary
) {
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  background-color: #fff;
  box-shadow: none;
}

.learning-subpage :where(input, select, textarea) {
  border: 1px solid var(--brand-line);
  border-radius: var(--subpage-control-radius);
  color: var(--brand-ink);
  background: #fff;
  box-shadow: none;
  font: inherit;
}

.learning-subpage :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select) {
  min-height: 48px;
  padding: 11px 14px;
}

.learning-subpage textarea {
  min-height: 120px;
  padding: 13px 14px;
  line-height: 1.65;
  resize: vertical;
}

.learning-subpage :where(
  button,
  .button,
  .button-primary,
  .button-secondary,
  .primary-button,
  .secondary-button,
  .tiny-button,
  .filter-chip,
  .filter-pill,
  .chip,
  .composition-tab,
  .tag-chip
) {
  min-height: var(--brand-control-min);
  border-radius: var(--subpage-control-radius);
  box-shadow: none;
  font-weight: 800;
}

.learning-subpage :where(.filter-chip.active, .filter-pill.is-active, .chip.is-active, .composition-tab.is-current) {
  border-color: var(--brand-accent);
  color: #fff;
  background: var(--brand-accent);
}

.learning-subpage :where(.search-box, .practice-toolbar, .module-filter-bar, .composition-tabs, .chip-row) {
  gap: 10px;
}

.learning-subpage :where(summary, .text-link, .inline-link) {
  min-height: var(--brand-control-min);
  display: inline-flex;
  align-items: center;
  padding-block: 8px;
}

.learning-subpage :where(.write-brand, .site-brand, .brand) {
  min-width: var(--brand-control-min);
  min-height: var(--brand-control-min);
}

.learning-subpage :where(table) {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.learning-subpage :where(th) {
  color: var(--brand-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.learning-subpage :where(th, td) {
  border-bottom: 1px solid var(--brand-line);
}

/* Games */
.arcade-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  min-height: 260px;
  align-items: center;
  padding: 44px;
}

.arcade-intro h1 {
  font-size: clamp(48px, 6vw, 72px);
}

.arcade-intro .arcade-overline {
  color: var(--brand-blue);
}

.arcade-intro .arcade-purpose > span {
  border-color: var(--brand-line);
  color: var(--brand-ink);
  background: #fff;
}

.arcade-intro .arcade-purpose b {
  color: var(--brand-blue);
}

.arcade-intro .arcade-purpose small {
  color: var(--brand-muted);
}

.priority-zone {
  padding: 38px;
}

.priority-game {
  min-height: 380px;
  border-radius: 14px;
  background: #fff;
}

.priority-game-type { background: #f1f8ff; }
.priority-game-sword { background: #f1faf5; }

.priority-copy h3 {
  font-size: clamp(34px, 4vw, 50px);
}

.library-zone {
  padding: 34px;
}

.game-cartridge {
  border-radius: 10px;
}

.portal-footer,
.arcade-footer {
  padding: 28px 0 38px;
  color: var(--brand-muted);
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid rgba(25, 118, 210, 0.48);
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  .portal-shell,
  .coming-shell,
  .page-shell,
  .site-shell,
  .write-shell {
    width: min(100vw - 32px, 100%);
  }

  .hero-panel {
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
    gap: 30px;
    min-height: 0;
    padding: 40px;
  }
}

@media (max-width: 820px) {
  .hero-panel,
  .page-shell > .hero,
  .site-shell .hero,
  .write-hero,
  .composition-hero,
  .arcade-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    padding: 34px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  body {
    background-size: 40px 40px;
  }

  .portal-shell,
  .coming-shell,
  .page-shell,
  .site-shell,
  .write-shell {
    width: min(100vw - 16px, 100%);
  }

  .portal-topbar,
  .site-topbar,
  .topbar,
  .write-topbar {
    min-height: 64px;
  }

  .portal-topbar {
    padding: 10px 0;
  }

  .site-topbar,
  .topbar,
  .write-topbar {
    padding: 9px 10px;
    margin-bottom: 14px;
  }

  .portal-brand-logo {
    width: 126px;
    height: 40px;
  }

  .site-brand-mark,
  .write-brand-mark,
  .brand img {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .portal-nav a,
  .quick-nav a,
  .nav a,
  .write-nav a {
    min-height: var(--brand-control-min);
    padding: 0 10px;
    font-size: 12px;
  }

  .portal-main {
    padding: 18px 0 36px;
  }

  .hero-panel,
  .page-shell > .hero,
  .site-shell .hero,
  .write-hero,
  .composition-hero,
  .page-intro,
  .arcade-intro {
    border-radius: 16px;
  }

  .hero-panel {
    gap: 24px;
    padding: 30px 22px;
  }

  .hero-panel .hero-copy h1 {
    font-size: clamp(42px, 12vw, 56px);
  }

  .page-shell > .hero h1,
  .site-shell .hero h1,
  .write-hero h1 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .page-intro h1,
  .composition-hero h1 {
    font-size: clamp(30px, 8vw, 40px);
  }

  .hero-panel .hero-copy > p,
  .page-shell > .hero .hero-copy > p,
  .site-shell .hero .hero-copy > p,
  .site-shell .hero .hero-text,
  .write-hero .hero-copy > p,
  .composition-hero p,
  .page-intro > p,
  .page-intro .intro-text,
  .arcade-intro .arcade-lead {
    font-size: 16px;
  }

  .apps-panel,
  .games-panel,
  .highlights-panel,
  .section,
  .section-panel,
  .priority-zone,
  .library-zone {
    padding: 22px;
    border-radius: 14px;
  }

  .section-head h2,
  .apps-panel .section-head h2,
  .games-panel .section-head h2,
  .highlights-panel .section-head h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .page-intro {
    min-height: 220px;
    padding: 28px 22px;
  }

  .learning-subpage :where(.site-topbar, .topbar, .write-topbar) {
    min-height: 64px;
    padding: 9px 10px;
    margin-bottom: 14px;
  }

  .learning-subpage .page-intro {
    min-height: 230px;
    padding: 30px 22px;
  }

  .learning-subpage .page-intro h1 {
    font-size: clamp(30px, 8.6vw, 40px);
    line-height: 1.12;
  }

  .learning-subpage .page-intro > :where(p, .intro-text) {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.68;
  }

  .learning-subpage .page-tools {
    gap: 10px;
    margin-top: 20px;
  }

  .learning-subpage .page-tools > :where(a, button) {
    min-height: 44px;
    flex: 1 1 150px;
  }

  .learning-subpage :where(.section, .section-panel):not(.page-intro) {
    padding: 22px;
    border-radius: 16px;
  }

  .learning-subpage .section-head h2 {
    font-size: clamp(27px, 7.5vw, 34px);
  }

  .learning-subpage :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
  }

  .arcade-intro {
    min-height: 0;
    padding: 30px 22px;
  }

  .app-card {
    min-height: 250px;
    padding: 22px;
  }

  .home-game-card,
  .priority-game {
    min-height: 0;
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
