:root {
  --ink: #1e293b;
  --muted: #64748b;
  --paper: #f8fafc;
  --surface: #ffffff;
  --blue: #2563eb;
  --green: #22c55e;
  --yellow: #facc15;
  --orange: #fb923c;
  --purple: #a855f7;
  --red: #ef4444;
  --teal: #14b8a6;
  --line: #dbe5ef;
  --shadow: 0 18px 40px rgba(30, 41, 59, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.menu-open {
  overflow-y: auto;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid rgba(219, 229, 239, 0.85);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: conic-gradient(from 120deg, var(--blue), var(--green), var(--yellow), var(--orange), var(--purple), var(--blue));
  border-radius: 8px;
  font-weight: 950;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a,
.footer-links a {
  padding: 9px 10px;
  color: var(--ink);
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 850;
  text-decoration: none;
}

.main-nav a.active,
.main-nav a:hover {
  color: #fff;
  background: var(--blue);
}

.menu-button {
  display: none;
  min-height: 42px;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: min(560px, calc(100vh - 72px));
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.8) 42%, rgba(248, 250, 252, 0.22) 74%),
    linear-gradient(0deg, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0) 34%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(650px, calc(100% - 36px));
  margin-left: clamp(18px, 6vw, 78px);
  padding: 52px 0 86px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 4.7rem);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.8vw, 2.8rem);
  line-height: 1.05;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
}

p {
  margin: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 570px;
  margin-top: 12px;
  color: #334155;
  font-size: clamp(1.04rem, 2.2vw, 1.32rem);
}

.hero-actions,
.button-row,
.age-buttons,
.filters,
.pill-row,
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions,
.age-buttons {
  margin-top: 16px;
}

.button,
.chip,
.filter-chip,
.answer-button,
.memory-card,
.word-choice {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button.green {
  color: #063719;
  background: var(--green);
  border-color: var(--green);
}

.button.orange-button,
.orange-button {
  color: #431407;
  background: var(--orange);
  border-color: var(--orange);
}

.button.yellow {
  color: #3b2d00;
  background: var(--yellow);
  border-color: var(--yellow);
}

.button.ghost {
  background: transparent;
}

.button.small {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.9rem;
}

.section {
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(30px, 5vw, 58px) clamp(16px, 4vw, 42px);
}

.section-heading {
  max-width: 800px;
  margin-bottom: 26px;
}

.section-heading p:not(.eyebrow),
.muted {
  color: var(--muted);
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}

.quick-strip div {
  padding: 22px clamp(14px, 4vw, 42px);
  background: #fff;
}

.quick-strip strong,
.quick-strip span {
  display: block;
}

.quick-strip strong {
  color: var(--blue);
  font-size: 1.35rem;
}

.quick-strip span {
  color: var(--muted);
}

.band-blue {
  background: #eaf2ff;
}

.band-green {
  background: #ecfdf5;
}

.band-yellow {
  background: #fff9db;
}

.band-purple {
  background: #f5edff;
}

.tabs-section {
  padding-top: 24px;
  padding-bottom: 24px;
  background: #fff;
}

.color-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
  gap: 8px;
}

.color-tab {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(0);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.color-tab:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.color-tab span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  font-weight: 950;
}

.color-tab strong {
  line-height: 1.1;
}

.games-tab {
  background: var(--blue);
}

.science-tab {
  color: #063719;
  background: #86efac;
}

.events-tab {
  background: var(--green);
}

.fans-tab {
  background: var(--purple);
}

.animals-tab {
  background: var(--orange);
}

.badges-tab {
  color: #3b2d00;
  background: var(--yellow);
}

.weekly-tab {
  background: var(--teal);
}

.parents-tab {
  background: var(--ink);
}

.ai-tab {
  background: #0ea5e9;
}

.account-tab {
  background: #ec4899;
}

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

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.08);
}

.card-pad {
  padding: clamp(14px, 2.2vw, 20px);
}

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

.feature-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 950;
}

.feature-card:nth-child(2) .feature-icon,
.game-card:nth-child(2n) .feature-icon {
  background: var(--green);
}

.feature-card:nth-child(3) .feature-icon,
.game-card:nth-child(3n) .feature-icon {
  color: #473400;
  background: var(--yellow);
}

.feature-card:nth-child(4) .feature-icon,
.game-card:nth-child(4n) .feature-icon {
  background: var(--orange);
}

.feature-card p,
.game-card p,
.event-card p,
.dashboard-card p,
.profile-card p,
.detail-panel p,
.safety-list li {
  color: var(--muted);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
  background: #eaf2ff;
}

.page-hero .card {
  overflow: hidden;
}

.page-hero img {
  width: 100%;
  min-height: 260px;
  object-fit: cover;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(145px, 0.45fr));
  gap: 10px;
  margin-bottom: 24px;
}

.events-toolbar {
  grid-template-columns: minmax(160px, 1fr) repeat(5, minmax(126px, 0.5fr));
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b8c7d6;
  border-radius: 8px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.game-card,
.event-card,
.fan-card,
.animal-card,
.dashboard-card,
.profile-card {
  display: grid;
  gap: 14px;
}

.meta-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.badge,
.status {
  width: fit-content;
  padding: 5px 9px;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.badge-token .badge,
.badge-objective-head .badge {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 4px solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px rgba(30, 41, 59, 0.18),
    0 7px 16px rgba(30, 41, 59, 0.16);
  font-size: 1rem;
}

.badge-token.earned .badge,
.badge-objective-head .badge {
  animation: badgeGlow 2.8s ease-in-out infinite;
}

.badge-token .badge::after,
.badge-objective-head .badge::after {
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 30px;
  height: 12px;
  content: "";
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: inset 0 0 0 3px rgba(30, 41, 59, 0.18), 0 7px 16px rgba(30, 41, 59, 0.16); }
  50% { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.34), 0 0 24px rgba(250, 204, 21, 0.5); }
}

.tag.green,
.badge.green {
  color: #063719;
  background: var(--green);
}

.tag.yellow,
.badge.yellow {
  color: #3b2d00;
  background: var(--yellow);
}

.tag.orange,
.badge.orange {
  background: var(--orange);
}

.tag.purple,
.badge.purple {
  background: var(--purple);
}

.status {
  color: #063719;
  background: #bbf7d0;
}

.skills {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.filters {
  margin-bottom: 20px;
}

.filter-chip,
.chip {
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.filter-chip.active,
.chip.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
}

.detail-panel {
  display: grid;
  gap: 18px;
}

.play-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
}

.game-play-card {
  display: grid;
  gap: 18px;
  min-height: 430px;
  align-content: start;
}

.question-number {
  color: var(--muted);
  font-weight: 900;
}

.challenge-text {
  color: var(--blue);
  font-size: clamp(2.8rem, 9vw, 6rem);
  font-weight: 950;
  line-height: 1;
}

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

.answer-button {
  min-height: 72px;
  color: #fff;
  background: var(--blue);
  font-size: 1.5rem;
}

.answer-button:nth-child(2) {
  color: #063719;
  background: var(--green);
}

.answer-button:nth-child(3) {
  color: #3b2d00;
  background: var(--yellow);
}

.answer-button:nth-child(4) {
  background: var(--purple);
}

.feedback {
  min-height: 28px;
  color: var(--muted);
  font-weight: 900;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.score-strip div {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-strip strong,
.score-strip span {
  display: block;
}

.score-strip strong {
  font-size: 1.6rem;
}

.progress-track {
  height: 14px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-choice {
  padding: 8px 12px;
  color: #fff;
  background: var(--purple);
}

.story-output {
  min-height: 130px;
  padding: 16px;
  background: #fff9db;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #533d00;
  font-weight: 800;
}

.memory-grid,
.habitat-grid,
.map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 10px;
}

.memory-card {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: transparent;
  background: var(--blue);
  font-size: clamp(1.2rem, 5vw, 1.8rem);
}

.memory-card.flipped,
.memory-card.matched {
  color: var(--ink);
  background: var(--yellow);
}

.memory-card.matched {
  background: #bbf7d0;
}

.match-card {
  min-height: 74px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.match-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.match-card.matched {
  color: #063719;
  background: #bbf7d0;
  border-color: var(--green);
}

.notice {
  padding: 14px 16px;
  color: #533d00;
  background: #fff7cc;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-weight: 800;
}

.warning {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.fan-card,
.animal-card,
.badge-card {
  align-content: start;
}

.safe-image,
.animal-illustration {
  display: grid;
  width: 100%;
  aspect-ratio: 1.45;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    var(--purple);
  border-radius: 8px;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 950;
}

.safe-image.music,
.safe-image.author {
  background-color: var(--purple);
}

.safe-image.movies {
  background-color: var(--orange);
}

.safe-image.sports {
  background-color: var(--green);
}

.safe-image.science {
  background-color: var(--teal);
}

.safe-image.history {
  color: #3b2d00;
  background-color: var(--yellow);
}

.safe-image.large,
.animal-illustration.large {
  width: 132px;
  min-width: 132px;
  aspect-ratio: 1;
}

.fan-media {
  position: relative;
  overflow: hidden;
}

.fan-media::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  color: #fff;
  content: "Wiki";
  background: rgba(15, 23, 42, 0.68);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.fan-media:not(.has-photo)::after {
  content: "Safe";
}

.fan-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.source-note {
  font-size: 0.9rem;
}

.fine-print {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.fine-print a {
  color: #1d4ed8;
}

.mini-progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
}

.coming-soon-card {
  opacity: 0.82;
}

.table-scroll {
  overflow-x: auto;
}

.resource-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.resource-table th,
.resource-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.resource-table th {
  color: #334155;
  background: #f8fafc;
}

.animal-illustration {
  color: #431407;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 28%),
    var(--orange);
}

.animal-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.fan-hero-line {
  display: flex;
  align-items: center;
  gap: 18px;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-tabs a {
  padding: 8px 10px;
  color: #fff;
  background: var(--purple);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.mini-work {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-work span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 950;
}

.mini-work small {
  color: var(--muted);
  font-weight: 800;
}

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

.timeline-list div {
  padding-left: 14px;
  border-left: 4px solid var(--purple);
}

.quiz-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.word-choice.correct {
  background: var(--green);
}

.word-choice.wrong {
  background: var(--red);
}

.count-animals-scene {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 10px;
  padding: 14px;
  margin: 14px 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(180deg, #dbeafe, #bfdbfe 55%, #93c5fd);
  border: 2px solid #60a5fa;
  border-radius: 8px;
}

.count-animals-scene.fruit-scene {
  background: linear-gradient(180deg, #dcfce7, #bbf7d0);
  border-color: #86efac;
}

.count-animals-scene.pond-scene {
  grid-template-columns: repeat(2, minmax(72px, 1fr));
}

.count-animal {
  display: grid;
  min-height: 82px;
  place-items: center;
  padding: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
}

.count-animal span {
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1;
}

.count-animal small {
  color: #1e3a8a;
  font-weight: 900;
}

.animal-hero {
  background: #fff1e8;
}

.animal-tabs {
  margin-top: -8px;
}

.progress-card {
  gap: 12px;
}

.badge-wall {
  display: grid;
  gap: 10px;
}

.simple-badge-card.complete {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), var(--shadow);
}

.featured-badge-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border-color: #86efac;
}

.learning-item-card {
  align-content: start;
}

.badge-level-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.badge-level-steps span {
  padding: 10px;
  color: #475569;
  text-align: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.badge-level-steps span.earned {
  color: #064e3b;
  background: #dcfce7;
  border-color: #86efac;
}

.badge-token {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.badge-token:hover,
.badge-token:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.badge-token.locked {
  opacity: 0.58;
}

.badge-token small,
.pathway-line small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.pathway-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.pathway-line span,
.pathway-line a {
  padding: 8px 10px;
  color: var(--muted);
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.pathway-line span.earned,
.pathway-line a.earned {
  color: #063719;
  background: #bbf7d0;
  border-color: var(--green);
}

.pathway-line b {
  color: var(--muted);
}

.badge-objective-card {
  gap: 14px;
}

.badge-objective-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-objective-head.large .badge {
  width: 74px;
  height: 74px;
  font-size: 32px;
}

.badge-detail-card h2 {
  margin-top: 22px;
  margin-bottom: 8px;
}

.subject-flow-card .button {
  width: fit-content;
}

.grade-path-picker {
  padding-top: 20px;
}

.grade-pills .filter-chip.active,
.filter-chip.active {
  color: #fff;
  background: var(--blue);
}

.grade-path-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.grade-path-card {
  gap: 12px;
}

.pathway-line.compact {
  gap: 6px;
}

.pathway-line.compact a {
  padding: 6px 8px;
  font-size: 0.82rem;
}

.grade-badge-grid {
  margin-top: 14px;
}

.weekly-card {
  max-width: 920px;
  margin: 0 auto;
}

.auth-page .card {
  align-self: stretch;
}

.auth-form {
  gap: 14px;
}

.auth-form h3 {
  color: var(--blue);
}

.auth-form input,
.auth-form select {
  background: #f8fafc;
}

.profile-card .button {
  margin-top: auto;
}

.weekly-card h2 {
  margin: 18px 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.weekly-options .word-choice:disabled {
  cursor: default;
  opacity: 0.85;
}

.media-table {
  overflow: hidden;
}

.media-row {
  display: grid;
  grid-template-columns: 0.85fr 1.25fr 1.25fr 0.8fr 1.35fr;
  gap: 1px;
  align-items: stretch;
  background: var(--line);
}

.media-row > * {
  padding: 12px;
  background: #fff;
  overflow-wrap: anywhere;
}

.media-head > * {
  color: #fff;
  background: var(--ink);
}

.status-pill {
  display: inline-grid;
  min-height: 32px;
  align-items: center;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: capitalize;
}

.status-pill.verified {
  color: #063719;
  background: #bbf7d0;
}

.status-pill.source-identified {
  color: #3b2d00;
  background: #fef3c7;
}

.status-pill.coming-soon,
.status-pill.needed {
  color: #334155;
  background: #e2e8f0;
}

.reward-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.reward-card {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  padding: clamp(24px, 5vw, 38px);
  background:
    radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.55), transparent 24%),
    radial-gradient(circle at 84% 20%, rgba(34, 197, 94, 0.35), transparent 24%),
    #ffffff;
  border: 4px solid var(--yellow);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.reward-card h2 {
  margin-bottom: 12px;
  color: var(--blue);
}

.reward-burst {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin: 0 auto 14px;
  color: #3b2d00;
  background: var(--yellow);
  border: 8px solid #fff2a8;
  border-radius: 50%;
  font-size: 2.7rem;
  box-shadow: 0 0 0 10px rgba(250, 204, 21, 0.18);
}

.reward-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 950;
}

.warning-text {
  color: #b91c1c;
}

.mini-progress {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

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

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: 20px;
  align-items: stretch;
}

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

.parent-control-card,
.dashboard-list-card {
  align-content: start;
}

.compact-heading {
  margin-bottom: 12px;
}

.compact-heading h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.reward-slider {
  width: 100%;
  accent-color: var(--green);
}

.dashboard-event-list,
.reward-idea-list {
  display: grid;
  gap: 12px;
}

.dashboard-event-item,
.reward-idea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-event-item p,
.reward-idea p {
  margin: 4px 0;
  color: var(--muted);
}

.reward-idea small {
  color: #475569;
  font-weight: 800;
}

.avatar {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: #fff;
  background: var(--purple);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 950;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.certificate {
  color: #3b2d00;
  background: #fffbeb;
  border-color: #fde68a;
}

.suggestion-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.suggestion-list li {
  color: var(--muted);
}

.empty-state {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 28px clamp(16px, 5vw, 72px);
  color: #fff;
  background: var(--ink);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  color: #cbd5e1;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ava-launcher-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.ava-launcher,
.ava-panel {
  pointer-events: auto;
}

.ava-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #fff;
  background: #1e293b;
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.ava-launcher:hover {
  transform: translateY(-2px);
}

.ava-mascot {
  display: block;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.18));
}

.ava-small {
  width: 46px;
  height: 46px;
}

.ava-medium {
  width: 86px;
  height: 86px;
}

.ava-large {
  width: 132px;
  height: 132px;
}

.ava-panel {
  position: fixed;
  inset: 18px;
  width: auto;
  max-height: none;
  overflow: auto;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.ava-full-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.ava-topic-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ava-topic-tools select,
.ava-topic-tools input {
  width: 100%;
}

.ava-badge-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  margin-bottom: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.ava-ai-response {
  display: grid;
  gap: 8px;
}

.ava-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 14px;
}

.ava-study-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.ava-help-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ava-route-section {
  min-height: calc(100vh - 180px);
}

.ava-route-shell {
  min-height: calc(100vh - 220px);
}

.ava-route-shell .ava-close {
  display: none;
}

.ava-chat-window {
  display: grid;
  gap: 10px;
  max-width: 980px;
  margin: 0 auto;
}

.ava-question-card,
.ava-final-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

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

.ava-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.ava-answer-grid .word-choice {
  justify-content: flex-start;
  min-height: 46px;
  text-align: left;
}

.converted-game-card {
  border-top: 4px solid #22c55e;
}

.game-lanes-section {
  background: #f8fafc;
}

.game-lane-card {
  border-top: 4px solid #2563eb;
}

.game-lane-card.lab-lane {
  border-top-color: #facc15;
}

.game-lane-card.test-lane {
  border-top-color: #22c55e;
}

.lab-card {
  border-top: 4px solid #facc15;
}

.lab-card.lab-complete {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), var(--shadow);
}

.digital-lab-board {
  min-height: 620px;
}

.digital-lab-workspace {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.lab-label-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lab-label.selected,
.word-choice.selected {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.lab-label.matched,
.lab-target.matched,
.word-choice.matched {
  color: #14532d;
  background: #dcfce7;
  border-color: #22c55e;
}

.lab-diagram-wrap {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.lab-diagram {
  display: block;
  width: 100%;
  min-height: 360px;
}

.lab-diagram-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f8fafc;
}

.lab-hotspots {
  position: absolute;
  inset: 0;
}

.lab-target {
  position: absolute;
  min-width: 84px;
  min-height: 38px;
  padding: 8px 10px;
  font-weight: 900;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #bfdbfe;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  transform: translate(-50%, -50%);
}

.lab-built-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
}

.lab-built-sequence span,
.lab-bin-items span {
  display: inline-flex;
  padding: 6px 9px;
  font-size: 0.9rem;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lab-bin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.lab-bin {
  display: grid;
  gap: 10px;
  min-height: 140px;
  padding: 14px;
  text-align: left;
  background: #f8fafc;
  border: 2px dashed #bfdbfe;
  border-radius: 16px;
}

.lab-bin-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.open-source-roadmap-card {
  border-top: 4px solid #7c3aed;
}

.game-creator-academy {
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  border-top: 1px solid #c7d2fe;
  border-bottom: 1px solid #bae6fd;
}

.academy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.academy-hero-card {
  border-top: 4px solid #2563eb;
}

.academy-step-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.academy-step {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.academy-step strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
}

.academy-step span {
  display: block;
  font-weight: 900;
}

.academy-step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.academy-mini-card {
  border-left: 4px solid #22c55e;
}

.admin-hero {
  background: linear-gradient(135deg, #f5edff, #eef2ff);
}

.admin-status-card,
.admin-panel,
.admin-metric {
  border-top: 4px solid #7c3aed;
}

.admin-metric {
  display: grid;
  gap: 4px;
}

.admin-metric span {
  color: var(--blue);
  font-size: 2rem;
  font-weight: 900;
}

.admin-metric strong {
  font-size: 1rem;
}

.admin-metric small {
  color: var(--muted);
}

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

.admin-import-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.admin-import-box textarea {
  min-height: 120px;
  resize: vertical;
}

.shop-hero {
  background: linear-gradient(135deg, #fff9db, #ecfdf5);
}

.shop-product-card {
  border-top: 4px solid #f97316;
}

.featured-shop-product {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22), var(--shadow);
}

.shop-product-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #7c3aed);
  border-radius: 16px;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  color: #334155;
  background: #f8fafc;
}

.converted-play-card {
  min-height: 560px;
}

.converted-game-board {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.phaser-game-shell {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.phaser-game-host {
  overflow: hidden;
  width: 100%;
  min-height: 520px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 14px 30px rgba(15, 23, 42, 0.08);
}

.phaser-game-host canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

.mechanic-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.mechanic-token {
  display: grid;
  place-items: center;
  min-width: 92px;
  min-height: 72px;
  padding: 10px;
  color: #fff;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.treasure-card,
.treasure-reward-card {
  border-top: 4px solid #facc15;
}

.cash-register-game {
  background: linear-gradient(180deg, #ecfeff, #ffffff 46%, #f8fafc);
}

.cash-game-topline,
.cash-register-stage,
.coin-bank {
  display: grid;
  gap: 12px;
}

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

.cash-score-pill {
  padding: 8px 12px;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #5eead4;
  border-radius: 999px;
  font-weight: 900;
}

.cash-register-stage {
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  align-items: stretch;
}

.cash-store-shelf,
.cash-register-machine {
  min-height: 250px;
  padding: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
}

.cash-store-shelf {
  display: grid;
  align-content: space-between;
  background: #fff7ed;
}

.store-awning {
  padding: 10px;
  color: #fff;
  text-align: center;
  background: repeating-linear-gradient(90deg, #ef4444 0 24px, #fb923c 24px 48px);
  border-radius: 8px;
  font-weight: 950;
}

.store-item {
  display: grid;
  place-items: center;
  min-height: 116px;
  color: #0f172a;
  background: #ffffff;
  border: 2px dashed #f97316;
  border-radius: 12px;
  text-align: center;
}

.store-item span {
  font-size: 1.35rem;
  font-weight: 950;
}

.store-item strong {
  font-size: 2.6rem;
  line-height: 1;
}

.cash-register-machine {
  display: grid;
  gap: 12px;
  background: #e0f2fe;
}

.register-display {
  padding: 14px;
  color: #dcfce7;
  background: #14532d;
  border: 5px solid #0f172a;
  border-radius: 12px;
}

.register-display span,
.register-display strong {
  display: block;
}

.register-display strong {
  font-size: 2.4rem;
}

.register-tape {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 52px;
  padding: 10px;
  background: #ffffff;
  border: 2px solid #93c5fd;
  border-radius: 10px;
}

.register-tape span {
  padding: 5px 8px;
  background: #dbeafe;
  border-radius: 999px;
  font-weight: 900;
}

.register-drawer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: #475569;
  border-radius: 10px;
}

.register-drawer span {
  min-height: 34px;
  background: #e2e8f0;
  border-radius: 6px;
}

.coin-bank {
  grid-template-columns: repeat(4, minmax(88px, 1fr));
}

.coin-button {
  display: grid;
  place-items: center;
  min-height: 106px;
  color: #1e293b;
  background: #ffffff;
  border: 0;
  cursor: pointer;
}

.coin-button span {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #0f172a;
  background: #facc15;
  border: 5px solid #ca8a04;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45), 0 10px 18px rgba(15, 23, 42, 0.12);
  font-weight: 950;
}

.coin-button small {
  margin-top: 6px;
  font-weight: 900;
}

.coin-button:hover,
.coin-button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.coin-dime span {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.coin-nickel span {
  background: #cbd5e1;
  border-color: #64748b;
}

.coin-penny span {
  background: #fdba74;
  border-color: #c2410c;
}

.life-quest-hero {
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.96)),
    url("assets/avavic-jr-hero.png") center/cover;
}

.life-quest-disclaimer {
  max-width: 820px;
  border-left: 5px solid #2563eb;
}

.life-quest-stats {
  margin: 14px 0;
}

.life-town-map {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 20%, rgba(250, 204, 21, 0.28), transparent 18%),
    linear-gradient(180deg, #dff7e6, #bfdbfe);
  border: 4px solid #0f766e;
  border-radius: 18px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.35), 0 18px 42px rgba(15, 23, 42, 0.18);
}

.life-town-map::before,
.life-town-map::after {
  position: absolute;
  content: "";
  background: rgba(34, 197, 94, 0.28);
  border-radius: 999px;
}

.life-town-map::before {
  right: -90px;
  bottom: -120px;
  width: 330px;
  height: 330px;
}

.life-town-map::after {
  left: -80px;
  top: -110px;
  width: 250px;
  height: 250px;
}

.life-town-road {
  position: absolute;
  z-index: 1;
  background: #64748b;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.18);
}

.road-main {
  left: 49%;
  top: -10%;
  width: 84px;
  height: 120%;
  transform: rotate(18deg);
}

.road-cross {
  left: -10%;
  top: 48%;
  width: 120%;
  height: 86px;
  transform: rotate(-7deg);
}

.life-building {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 3px;
  width: min(170px, 28vw);
  min-height: 82px;
  padding: 12px;
  color: #0f172a;
  text-decoration: none;
  background: #fff;
  border: 3px solid #0f766e;
  border-radius: 10px 10px 8px 8px;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.2);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.life-building::before {
  position: absolute;
  left: 12px;
  right: 12px;
  top: -18px;
  height: 18px;
  content: "";
  background: #f97316;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.life-building strong {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  line-height: 1.1;
}

.life-building span {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.life-building:hover,
.life-building:focus-visible,
.life-building.active {
  border-color: #2563eb;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.25);
  outline: none;
  transform: translate(-50%, -54%);
}

.life-avatar {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border: 4px solid #fff;
  border-radius: 50% 50% 44% 44%;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.26);
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.life-card {
  border-top: 4px solid #14b8a6;
}

.selected-life-card {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22), var(--shadow);
}

.tournament-card {
  border-top: 4px solid #facc15;
}

.memory-grid,
.merge-board,
.block-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.memory-card,
.merge-tile,
.sort-block,
.snake-food {
  min-height: 78px;
  padding: 10px;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
  border: 2px solid #bfdbfe;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.memory-card:not(.flipped) {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.memory-card.matched {
  color: #14532d;
  background: #dcfce7;
  border-color: #22c55e;
}

.snake-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.snake-head {
  display: grid;
  place-items: center;
  min-height: 78px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #22c55e, #15803d);
  border-radius: 999px;
}

.wordle-slots,
.path-nodes,
.sort-bins,
.defense-lane {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wordle-slots span,
.path-nodes span {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  font-weight: 900;
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
}

.path-nodes span.done {
  color: #14532d;
  background: #dcfce7;
  border-color: #22c55e;
}

.path-nodes span.active {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #2563eb;
}

.sort-bins div,
.defense-lane span {
  flex: 1 1 180px;
  padding: 12px;
  font-weight: 800;
  text-align: center;
  background: #fff;
  border: 2px dashed #94a3b8;
  border-radius: 10px;
}

.defense-lane {
  justify-content: space-between;
  padding: 14px;
  background: linear-gradient(90deg, #fee2e2, #dcfce7);
  border-radius: 12px;
}

.ava-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.ava-chat-head h3 {
  margin: 0;
}

.ava-chat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ava-chat-tabs .filter-chip {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.84rem;
}

.ava-message {
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
}

.ava-message-ava {
  margin-right: 22px;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.ava-message-kid {
  margin-left: 22px;
  color: #fff;
  background: var(--blue);
}

.word-bank.compact {
  gap: 6px;
}

.word-bank.compact .word-choice {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.ava-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ava-close {
  float: right;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.ava-suggestion-card,
.ai-report-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ava-quick-actions,
.ai-report-grid {
  margin-top: 12px;
}

.ava-inline {
  display: grid;
  place-items: center;
}

.ai-setup-card select,
.ai-setup-card input {
  width: 100%;
}

.reward-splash-inline {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.learn-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.topic-list-panel h2 {
  margin-bottom: 4px;
}

.topic-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.topic-row {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.topic-row:hover,
.topic-row:focus-visible,
.topic-row.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.topic-row strong,
.topic-row span {
  display: block;
}

.topic-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.ava-learning-window {
  min-height: 540px;
}

.ava-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.ava-mode-tabs .filter-chip {
  min-height: 38px;
}

.question-number {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.feedback {
  min-height: 28px;
  margin-top: 12px;
  color: var(--ink);
  font-weight: 700;
}

.project-lab-card {
  align-content: start;
  gap: 10px;
}

.project-lab-card .button {
  margin-top: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links a {
  color: #fff;
}

@media (max-width: 1000px) {
  .toolbar,
  .events-toolbar,
  .page-hero,
  .detail-layout,
  .play-shell,
  .cash-register-stage,
  .life-town-map,
  .dashboard-hero,
  .dashboard-control-grid,
  .grade-path-summary,
  .learn-layout {
    grid-template-columns: 1fr;
  }

  .grid.four,
  .grid.three,
  .color-tabs,
  .quick-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .main-nav {
    position: fixed;
    inset: 73px 14px auto 14px;
    display: none;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a {
    width: 100%;
  }

  .hero {
    min-height: 690px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.82) 55%, rgba(248, 250, 252, 0.12) 92%),
      linear-gradient(0deg, rgba(248, 250, 252, 0.95), rgba(248, 250, 252, 0));
  }

  .hero-copy {
    width: min(100% - 32px, 600px);
    margin-inline: 16px;
    padding: 48px 0 220px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .color-tabs,
  .quick-strip,
  .answer-grid,
  .coin-bank,
  .cash-game-topline,
  .life-quest-stats,
  .score-strip {
    grid-template-columns: 1fr;
  }

  .count-animals-scene {
    grid-template-columns: repeat(2, minmax(58px, 1fr));
  }

  .dashboard-event-item,
  .reward-idea {
    grid-template-columns: 1fr;
  }

  .featured-badge-shortcut {
    align-items: stretch;
    flex-direction: column;
  }

  .badge-level-steps {
    grid-template-columns: 1fr;
  }

  .memory-grid,
  .habitat-grid,
  .map-grid {
    grid-template-columns: repeat(2, minmax(64px, 1fr));
  }

  .button,
  .hero-actions a {
    width: 100%;
  }

  .ava-launcher-wrap {
    right: 12px;
    bottom: 12px;
  }

  .ava-launcher span {
    display: none;
  }

  .ava-panel {
    inset: 8px;
    width: auto;
  }

  .ava-topic-tools {
    grid-template-columns: 1fr;
  }

  .ava-workspace-grid {
    grid-template-columns: 1fr;
  }

  .academy-layout,
  .academy-step-row,
  .admin-action-grid {
    grid-template-columns: 1fr;
  }

  .ava-answer-grid,
  .ava-final-card {
    grid-template-columns: 1fr;
  }

  .fan-hero-line {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .life-town-map {
    min-height: 920px;
  }

  .life-building {
    width: min(190px, 42vw);
  }
}
