/* ============================================================
   Mr. Bob's ESL Class — shared stylesheet (Website V3)
   Used by: index.html, about.html, schedule.html, blog.html,
            store.html, games.html
   Part 1 is the original V2 design system (unchanged look).
   Part 2 adds components for the multi-page expansion.
   ============================================================ */

:root {
  --forest: #254735;
  --forest-deep: #173527;
  --forest-soft: #426b54;
  --sage: #d9e5d2;
  --sage-soft: #eef4e9;
  --blue: #6f9fb0;
  --blue-deep: #426f7f;
  --sky-soft: #e3f1f3;
  --cream: #fbf3df;
  --cream-2: #f6ead2;
  --paper: #fffaf0;
  --sand: #e8d5b6;
  --brown: #9b7145;
  --brown-deep: #6f4d2f;
  --ink: #2a2a22;
  --muted: #607067;
  --line: rgba(37, 71, 53, 0.18);
  --line-strong: rgba(37, 71, 53, 0.32);
  --shadow: 0 28px 70px rgba(37, 71, 53, 0.16);
  --shadow-soft: 0 18px 42px rgba(37, 71, 53, 0.09);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.66;
  background:
    radial-gradient(circle at 12% 0%, rgba(111, 159, 176, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 6%, rgba(217, 229, 210, 0.62), transparent 30rem),
    linear-gradient(180deg, var(--cream), var(--cream-2) 48%, #f7eddb);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.28;
  background-image:
    radial-gradient(rgba(37, 71, 53, 0.16) 0.7px, transparent 0.7px),
    radial-gradient(rgba(155, 113, 69, 0.12) 0.7px, transparent 0.7px);
  background-size: 23px 23px, 31px 31px;
  background-position: 0 0, 11px 15px;
}

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

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

p, ul {
  margin: 0;
}

h1, h2, h3 {
  margin: 0;
  color: #29241e;
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(2.65rem, 4.6vw, 4.4rem);
  max-width: 780px;
}

h2 {
  font-size: clamp(2.05rem, 4vw, 3.8rem);
  max-width: 960px;
}

h3 {
  font-size: 1.45rem;
}

.container {
  width: min(var(--max), calc(100% - 42px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  z-index: 999;
  background: var(--forest);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 999px;
}

.skip-link:focus {
  left: 16px;
}

.ornament {
  width: min(210px, 52vw);
  height: 20px;
  margin: 2px 0;
  color: var(--brown);
}

.ornament.center {
  margin-left: auto;
  margin-right: auto;
}

.ornament svg {
  width: 100%;
  height: 100%;
  display: block;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.46rem 0.84rem;
  border-radius: 999px;
  color: var(--forest);
  background: rgba(217, 229, 210, 0.86);
  border: 1px solid rgba(37, 71, 53, 0.12);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.eyebrow::before {
  content: "";
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: var(--forest);
  box-shadow: 0 0 0 5px rgba(37, 71, 53, 0.10);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 243, 223, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(37, 71, 53, 0.16);
  border: 2px solid rgba(255, 250, 240, 0.8);
}

.brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--forest-deep);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  color: #4e4c42;
  font-size: 0.92rem;
  font-weight: 750;
}

.nav-links a:not(.btn) {
  position: relative;
  padding: 0.3rem 0;
  white-space: nowrap;
}

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: var(--forest);
  transition: width 0.2s ease;
}

.nav-links a:not(.btn):hover::after,
.nav-links a[aria-current="page"]:not(.btn)::after {
  width: 100%;
}

.menu-button {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.8);
  color: var(--forest);
  padding: 0.62rem 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.84rem 1.18rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

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

.btn-primary {
  color: var(--paper);
  background: var(--forest);
  box-shadow: 0 16px 34px rgba(37, 71, 53, 0.22);
}

.btn-primary:hover {
  background: var(--forest-deep);
}

.btn-secondary {
  color: var(--forest-deep);
  background: rgba(255, 250, 240, 0.48);
  border-color: rgba(37, 71, 53, 0.34);
}

.btn-clay {
  color: #fffaf0;
  background: var(--brown);
  box-shadow: 0 16px 34px rgba(155, 113, 69, 0.2);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 68px;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -38% auto;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(217, 229, 210, 0.9), transparent 64%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
  gap: 46px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.lead {
  max-width: 720px;
  color: #4d5c52;
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.88rem;
  margin-top: 4px;
}

.parent-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 690px;
  padding: 15px 18px;
  border: 1px solid rgba(37, 71, 53, 0.12);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.56);
  color: var(--muted);
  font-size: 0.98rem;
}

.parent-note strong {
  color: var(--forest-deep);
}

.hero-art {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.74), rgba(217, 229, 210, 0.38));
  border: 1px solid rgba(37, 71, 53, 0.16);
  box-shadow: var(--shadow);
}

.hero-art img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(37, 71, 53, 0.16);
  background: var(--paper);
}

.hero-art .seal {
  position: absolute;
  left: -20px;
  bottom: -24px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 7px;
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid rgba(37, 71, 53, 0.22);
  box-shadow: 0 18px 42px rgba(37, 71, 53, 0.18);
}

.hero-art .seal img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.stats {
  background: rgba(255, 250, 240, 0.48);
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px 0;
}

.stat {
  padding: 18px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: none;
}

.stat strong {
  display: block;
  color: var(--brown-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  margin-bottom: 10px;
}

.stat span {
  color: #55645b;
  font-size: 0.96rem;
}

section {
  padding: 82px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
}

.section-head.center {
  text-align: center;
  justify-items: center;
}

.section-head p {
  color: var(--muted);
  max-width: 780px;
  font-size: 1.06rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -52px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(217, 229, 210, 0.46);
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h3 {
  margin: 0 0 10px;
}

.card p {
  color: #56655c;
}

.icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--sage), var(--sky-soft));
  border: 1px solid rgba(37, 71, 53, 0.14);
  color: var(--forest);
}

.icon svg {
  width: 29px;
  height: 29px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 42px;
  align-items: center;
}

.panel {
  position: relative;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel.decorated::before,
.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(155, 113, 69, 0.28);
  border-radius: 24px;
}

.path-list {
  display: grid;
  gap: 14px;
}

.path-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(238, 244, 233, 0.72);
  border: 1px solid rgba(37, 71, 53, 0.12);
}

.level {
  align-self: start;
  display: inline-flex;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: var(--forest);
  color: white;
  font-size: 0.92rem;
  font-weight: 900;
}

.path-item strong {
  display: block;
  color: #2c2a21;
  margin-bottom: 3px;
  font-weight: 900;
}

.path-item p {
  color: #59675f;
}

.art-card {
  position: relative;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.art-card img {
  border-radius: 24px;
  border: 1px solid rgba(37, 71, 53, 0.14);
  width: 100%;
}

.soft-section {
  background:
    radial-gradient(circle at 18% 14%, rgba(111, 159, 176, 0.20), transparent 25rem),
    linear-gradient(135deg, rgba(217, 229, 210, 0.48), rgba(255, 250, 240, 0.12));
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 42px;
  align-items: center;
}

.portrait-wrap {
  position: relative;
  padding: 12px;
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 240, 0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.portrait-wrap img {
  border-radius: 24px;
  width: 100%;
  border: 1px solid rgba(37, 71, 53, 0.16);
}

.about-copy {
  display: grid;
  gap: 20px;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #4f5f55;
}

.check {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest);
  font-weight: 1000;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: process;
}

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

.step {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow-soft);
}

.step::before {
  counter-increment: process;
  content: counter(process);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--brown);
  color: white;
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(155, 113, 69, 0.18);
}

.step h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.step p {
  color: #59675f;
}

blockquote {
  margin: 0;
}

.student-carousel {
  display: grid;
  gap: 18px;
}

.student-carousel-top {
  display: flex;
  justify-content: flex-end;
}

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

.carousel-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.78);
  color: var(--forest);
  font-size: 1.18rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 71, 53, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-button:hover {
  transform: translateY(-2px);
  background: rgba(217, 229, 210, 0.82);
}

.student-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 360px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  scrollbar-color: rgba(37, 71, 53, 0.42) rgba(255, 250, 240, 0.5);
}

.student-track:focus {
  outline: 3px solid rgba(111, 159, 176, 0.46);
  outline-offset: 5px;
  border-radius: var(--radius-lg);
}

.student-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.student-card::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -58px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(217, 229, 210, 0.42);
  z-index: 0;
}

.student-card > * {
  position: relative;
  z-index: 1;
}

.student-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.student-avatar {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-deep);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 250, 240, 0.95), transparent 34%),
    linear-gradient(135deg, var(--sage), var(--sky-soft));
  border: 2px solid rgba(37, 71, 53, 0.18);
  box-shadow: inset 0 0 0 5px rgba(255, 250, 240, 0.46), 0 12px 24px rgba(37, 71, 53, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 900;
}

.student-meta h3 {
  font-size: 1.34rem;
  margin-bottom: 4px;
}

.student-meta p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.student-quote {
  color: #526158;
  margin: 0 0 18px;
  font-size: 1rem;
}

.theme-label {
  display: inline-flex;
  width: fit-content;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  color: var(--brown-deep);
  background: rgba(232, 213, 182, 0.5);
  font-size: 0.84rem;
  font-weight: 900;
}

.placeholder {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--brown-deep);
  background: rgba(232, 213, 182, 0.48);
  font-size: 0.88rem;
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 10px 28px rgba(37, 71, 53, 0.06);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  color: #29241e;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 900;
}

.faq-question span:last-child {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
  font-weight: 1000;
  transition: transform 0.2s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding: 0 22px 22px;
  color: #59675f;
}

.faq-item.open .faq-question span:last-child {
  transform: rotate(45deg);
}

.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: 28px;
  align-items: stretch;
}

.contact-card {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 86% 12%, rgba(111, 159, 176, 0.34), transparent 20rem),
    linear-gradient(135deg, var(--forest-deep), var(--forest-soft));
  color: var(--paper);
  box-shadow: var(--shadow);
}

.contact-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.09);
}

.contact-card h2 {
  color: var(--paper);
  margin-bottom: 16px;
}

.contact-card p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  color: rgba(255, 250, 240, 0.88);
  font-size: 1.06rem;
  margin-bottom: 24px;
}

.contact-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-actions .btn {
  background: var(--paper);
  color: var(--forest-deep);
}

.contact-actions .btn.outline {
  background: rgba(255, 250, 240, 0.10);
  color: var(--paper);
  border-color: rgba(255, 250, 240, 0.44);
}

.contact-details {
  display: grid;
  gap: 12px;
}

.detail {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 10px 26px rgba(37, 71, 53, 0.06);
}

.detail strong {
  display: block;
  margin-bottom: 4px;
  color: #29241e;
}

.detail a, .detail span {
  color: #58675e;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 32px 0;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.46);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  color: var(--forest);
}

.footer-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
  color: var(--forest);
}

/* ============================================================
   PART 2 — V3 multi-page components
   ============================================================ */

/* Smaller hero used by subpages (About, Schedule, Blog, Store, Games) */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 54px;
  border-bottom: 1px solid var(--line);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -55% auto;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 229, 210, 0.85), transparent 64%);
  z-index: -1;
}

.page-hero .container {
  display: grid;
  gap: 18px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

/* Honest status labels: "Coming soon", "In development", "Sample post" */
.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  color: var(--brown-deep);
  background: rgba(232, 213, 182, 0.48);
  border: 1px dashed rgba(155, 113, 69, 0.5);
  font-size: 0.84rem;
  font-weight: 800;
}

.status-chip.live {
  color: var(--forest-deep);
  background: rgba(217, 229, 210, 0.7);
  border: 1px solid rgba(37, 71, 53, 0.28);
}

/* Four-column card grid (homepage "Explore" previews) */
.cards.four {
  grid-template-columns: repeat(4, 1fr);
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 900;
  color: var(--forest);
}

.card-link::after {
  content: " \2192";
}

.card .status-chip {
  margin-top: 12px;
}

/* Resume-style timeline (About page) */
.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(238, 244, 233, 0.72);
  border: 1px solid rgba(37, 71, 53, 0.12);
}

.timeline-item .when {
  font-weight: 900;
  color: var(--forest-deep);
}

.timeline-item strong {
  display: block;
  color: #2c2a21;
  margin-bottom: 3px;
  font-weight: 900;
}

.timeline-item p {
  color: #59675f;
}

/* Dashed placeholder box (Schedule page calendar area) */
.calendar-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  min-height: 260px;
  padding: 34px;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(37, 71, 53, 0.35);
  background: rgba(255, 250, 240, 0.6);
  color: var(--muted);
  font-size: 1.02rem;
}

.calendar-placeholder strong {
  color: var(--forest-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

/* Blog / Parent Help Center */
.blog-search {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.blog-search input {
  width: 100%;
  min-height: 56px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.92);
  font: inherit;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(37, 71, 53, 0.08);
}

.blog-search input:focus {
  outline: 3px solid rgba(111, 159, 176, 0.46);
  outline-offset: 2px;
}

.blog-search .search-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.blog-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.blog-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.blog-card p {
  color: #56655c;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.category-chip {
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest-deep);
  font-weight: 800;
  font-size: 0.8rem;
}

.blog-card-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.no-results {
  display: none;
  gap: 14px;
  max-width: 720px;
  margin: 26px auto 0;
  padding: 28px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(238, 244, 233, 0.72);
  color: #4f5f55;
}

.no-results.visible {
  display: grid;
  justify-items: center;
}

/* Lesson Store */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-button {
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.8);
  color: var(--forest-deep);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-button:hover {
  background: rgba(217, 229, 210, 0.8);
}

.filter-button.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.product-card h3 {
  font-size: 1.28rem;
}

.product-card p {
  color: #56655c;
  font-size: 0.98rem;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.tag.level {
  background: var(--forest);
  color: white;
}

.tag.skill {
  background: var(--sky-soft);
  color: var(--blue-deep);
}

.price-line {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-weight: 900;
  color: var(--brown-deep);
}

/* Games */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.game-card h3 {
  font-size: 1.28rem;
}

.game-card p {
  color: #56655c;
}

.game-card .status-chip {
  margin-top: auto;
}

/* Vocabulary Match demo game */
.match-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.match-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.match-column h3 {
  font-size: 1.1rem;
  text-align: center;
  color: var(--forest-deep);
}

.match-tile {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.88);
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.match-tile:hover:not(.matched) {
  transform: translateY(-2px);
}

.match-tile.selected {
  background: var(--sage);
  border-color: var(--forest);
}

.match-tile.matched {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
  cursor: default;
}

.match-tile.wrong {
  background: #f3d9cf;
  border-color: #b0654a;
}

.match-status {
  min-height: 1.6em;
  margin-top: 18px;
  text-align: center;
  font-weight: 800;
  color: var(--forest-deep);
}

.match-controls {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* CTA band reused on subpages */
.cta-band {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.cta-band .hero-actions {
  justify-content: center;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1120px) {
  .nav-links {
    gap: 0.85rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .about-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

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

  .cards.four,
  .blog-grid,
  .product-grid,
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid,
  .process,
  .process.three-step {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: none;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .nav-links {
    position: fixed;
    top: 78px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 250, 240, 0.98);
    box-shadow: var(--shadow);
    font-size: 0.98rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.72rem 0.5rem;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-art .seal {
    width: 112px;
    height: 112px;
    left: 18px;
    bottom: -28px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    min-height: 70px;
  }

  .brand img {
    width: 46px;
    height: 46px;
  }

  .brand span {
    font-size: 1.02rem;
  }

  .nav-links {
    top: 70px;
    left: 14px;
    right: 14px;
  }

  .hero {
    padding: 50px 0 60px;
  }

  section {
    padding: 58px 0;
  }

  .page-hero {
    padding: 44px 0 46px;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .stats-grid,
  .process,
  .process.three-step {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: none;
  }

  .path-item {
    grid-template-columns: 1fr;
  }

  .panel,
  .contact-card {
    padding: 26px;
  }

  .cards.four,
  .blog-grid,
  .product-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .student-carousel-top {
    justify-content: center;
  }

  .student-track {
    grid-auto-columns: minmax(260px, 88vw);
    padding-bottom: 16px;
  }

  .student-card {
    padding: 22px;
  }

  .student-avatar {
    width: 62px;
    height: 62px;
  }

  .hero-art {
    padding: 10px;
  }

  .hero-art .seal {
    width: 92px;
    height: 92px;
    left: 14px;
    bottom: -22px;
  }

  .match-tile {
    padding: 12px 10px;
    font-size: 0.92rem;
  }
}

/* ============================================================
   PART 3 — Games hub (games.html, Website V3.1)
   ============================================================ */

.hub-step {
  margin-bottom: 30px;
}

.hub-step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 900;
  color: var(--forest-deep);
  font-size: 1.06rem;
}

.level-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.level-button {
  min-width: 64px;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.85);
  color: var(--forest-deep);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.level-button:hover {
  background: rgba(217, 229, 210, 0.8);
  transform: translateY(-2px);
}

.level-button.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.game-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.game-select-button {
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.8);
  cursor: pointer;
  font: inherit;
  box-shadow: 0 10px 24px rgba(37, 71, 53, 0.06);
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.game-select-button:hover {
  transform: translateY(-2px);
}

.game-select-button strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  color: #29241e;
  margin-bottom: 4px;
}

.game-select-button span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  display: block;
}

.game-select-button.active {
  border-color: var(--forest);
  background: rgba(217, 229, 210, 0.7);
}

.game-stage {
  margin-top: 36px;
}

.game-stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.game-stage-head h3 {
  font-size: 1.5rem;
}

.game-instructions {
  color: var(--muted);
  margin-bottom: 22px;
}

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

.match-heading {
  margin: 0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  color: var(--forest-deep);
}

.match-tile.picture {
  font-size: 2.1rem;
  line-height: 1.2;
  padding: 10px 12px;
}

.line-label {
  font-weight: 800;
  color: var(--forest-deep);
  font-size: 0.92rem;
}

.answer-line,
.tile-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border-radius: 16px;
}

.answer-line {
  border: 2px dashed var(--line-strong);
  background: rgba(255, 250, 240, 0.6);
}

.tile-bank {
  border: 1px solid var(--line);
  background: rgba(238, 244, 233, 0.6);
}

.word-tile {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.word-tile:hover:not(:disabled) {
  transform: translateY(-2px);
}

.word-tile:disabled {
  opacity: 0.3;
  cursor: default;
}

.word-tile.picked {
  background: var(--sage);
  border-color: var(--forest);
}

.word-tile.right {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.word-tile.wrong {
  background: #f3d9cf;
  border-color: #b0654a;
}

.word-tile.missed {
  border: 2px dashed var(--brown);
  color: var(--brown-deep);
}

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

.story-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.85);
}

.story-card.correct-spot {
  border-color: var(--forest);
  background: rgba(217, 229, 210, 0.6);
}

.story-text {
  color: #3f4f45;
}

.order-buttons {
  display: grid;
  gap: 6px;
}

.order-buttons button {
  width: 40px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--forest);
  font-weight: 900;
  cursor: pointer;
}

.order-buttons button:hover {
  background: var(--sage);
}

.quiz-block {
  display: grid;
  gap: 10px;
}

.quiz-question {
  font-weight: 800;
  color: #29241e;
  font-size: 1.12rem;
}

.option-list {
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.option-button {
  text-align: left;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.88);
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.option-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.option-button.selected {
  border-color: var(--forest);
  background: var(--sage);
}

.option-button.right {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.option-button.wrong {
  background: #f3d9cf;
  border-color: #b0654a;
}

.option-button:disabled {
  cursor: default;
}

.phonics-target {
  font-weight: 900;
  color: var(--forest-deep);
  font-size: 1.1rem;
}

.phonics-words {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.passage {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(238, 244, 233, 0.65);
  border: 1px solid var(--line);
  color: #3f4f45;
  font-size: 1.02rem;
  line-height: 1.7;
}

.game-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.game-buttons .btn {
  width: auto;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
}

.progress-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.linklike {
  border: none;
  background: none;
  padding: 0 4px;
  color: var(--forest);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 980px) {
  .game-select {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .game-select {
    grid-template-columns: 1fr;
  }

  .game-buttons .btn {
    width: auto;
  }

  .level-button {
    min-width: 52px;
    padding: 0.55rem 0.95rem;
  }

  .match-tile.picture {
    font-size: 1.8rem;
  }

  .story-card {
    gap: 10px;
    padding: 12px;
  }

  .option-button,
  .word-tile {
    font-size: 0.95rem;
  }
}

/* ============================================================
   PART 4 — Typing Adventure (games.html, Website V3.2)
   ============================================================ */

.typing-choice-group {
  display: grid;
  gap: 8px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-button {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.85);
  color: var(--forest-deep);
  font: inherit;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.choice-button:hover {
  background: rgba(217, 229, 210, 0.8);
  transform: translateY(-2px);
}

.choice-button.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.typing-preview {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(238, 244, 233, 0.65);
}

.typing-preview-text {
  color: #4f5f55;
  font-style: italic;
}

.typing-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-box {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.8);
  text-align: center;
}

.stat-box strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  color: var(--brown-deep);
  line-height: 1.1;
}

.stat-box span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.typing-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.stage-dungeon {
  background: linear-gradient(135deg, rgba(74, 78, 105, 0.18), rgba(37, 71, 53, 0.14));
}

.stage-zoo {
  background: linear-gradient(135deg, rgba(217, 229, 210, 0.7), rgba(227, 241, 243, 0.5));
}

.stage-library {
  background: linear-gradient(135deg, rgba(232, 213, 182, 0.5), rgba(217, 229, 210, 0.4));
}

.stage-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 130px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.9);
  text-align: center;
}

.stage-emoji {
  font-size: 1.9rem;
  line-height: 1.2;
}

.stage-card strong {
  font-size: 0.92rem;
  color: #29241e;
}

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

.stage-middle {
  min-width: 0;
  text-align: center;
}

.typing-feedback {
  font-weight: 800;
  color: var(--forest-deep);
  font-size: 0.98rem;
}

.hp-bar {
  width: 110px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.9);
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest-soft), var(--forest));
  transition: width 0.25s ease;
}

.typing-passage {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.85);
  font-size: 1.05rem;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.typing-passage span.done {
  color: var(--forest);
  background: rgba(217, 229, 210, 0.55);
}

.typing-passage span.miss {
  color: #8f3d20;
  background: #f3d9cf;
  border-radius: 3px;
}

.typing-passage span.current {
  border-bottom: 3px solid var(--brown);
}

.typing-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--line-strong);
  background: var(--paper);
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  resize: vertical;
}

.typing-input:focus {
  outline: 3px solid rgba(111, 159, 176, 0.46);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .typing-stage {
    grid-template-columns: 1fr 1fr;
  }

  .stage-middle {
    grid-column: 1 / -1;
    order: 3;
  }

  .stage-card {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .typing-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .choice-button {
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
  }

  .typing-passage {
    font-size: 0.98rem;
    line-height: 1.8;
  }
}

/* ---- Typing Adventure results celebration ---- */

.result-celebration {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  text-align: center;
}

.celebrate-heading {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #29241e;
  letter-spacing: -0.02em;
}

.dancers {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
}

.dancer {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.dancer-emoji {
  display: inline-block;
  font-size: 3rem;
  line-height: 1.1;
}

.dance-a .dancer-emoji {
  animation: mrbob-dance 0.9s ease-in-out infinite;
}

.dance-b .dancer-emoji {
  animation: mrbob-dance 0.9s ease-in-out infinite 0.45s;
}

.dancer strong {
  font-size: 0.9rem;
  color: #29241e;
}

.celebrate-caption {
  max-width: 540px;
  color: #4f5f55;
  font-weight: 700;
}

.fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fireworks span {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  animation: mrbob-firework 2s ease-out infinite;
}

.fireworks span:nth-child(1) { left: 8%;  top: 18%; animation-delay: 0s; }
.fireworks span:nth-child(2) { left: 88%; top: 22%; animation-delay: 0.35s; }
.fireworks span:nth-child(3) { left: 16%; top: 68%; animation-delay: 0.7s; }
.fireworks span:nth-child(4) { left: 80%; top: 66%; animation-delay: 1.05s; }
.fireworks span:nth-child(5) { left: 48%; top: 12%; animation-delay: 1.4s; }
.fireworks span:nth-child(6) { left: 60%; top: 74%; animation-delay: 1.75s; }

@keyframes mrbob-dance {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-10px) rotate(8deg); }
}

@keyframes mrbob-firework {
  0%   { opacity: 0; transform: scale(0.4) translateY(8px); }
  25%  { opacity: 1; transform: scale(1.2) translateY(0); }
  60%  { opacity: 0.85; }
  100% { opacity: 0; transform: scale(0.7) translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .dance-a .dancer-emoji,
  .dance-b .dancer-emoji,
  .fireworks span {
    animation: none;
  }

  .fireworks span {
    opacity: 0.8;
  }
}

/* ============================================================
   PART 5 — Typing Adventure polish pass (Website V3.2.1)
   World theming, world cards, gold pops, feedback flashes.

   FUTURE ART NOTES (see Website\TYPING_ADVENTURE_ART_PLAN.md):
   - Real backgrounds later attach to .typing-stage / .result-celebration
     via their data-art-slot attributes (stage-background-<world>,
     celebration-<world>) — e.g. a background-image rule per slot.
   - Sprites later replace the emoji inside .hero-art-slot,
     .objective-art-slot (data-art-name = monster/animal slug),
     .dancer-emoji, and .world-card-emoji.
   - Until real art exists, everything below is pure CSS + emoji:
     no image files are referenced anywhere.
   ============================================================ */

/* --- setup screen: world cards --- */

.world-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.world-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.85);
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.world-card:hover {
  transform: translateY(-2px);
}

.world-card-emoji {
  font-size: 2rem;
  line-height: 1.2;
}

.world-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  color: #29241e;
}

.world-card-blurb {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.world-card.active {
  border-color: var(--forest);
  background: rgba(217, 229, 210, 0.75);
  box-shadow: 0 0 0 3px rgba(37, 71, 53, 0.14);
}

/* --- world theming (CSS only, applies to play stage AND celebration) --- */

.typing-stage,
.result-celebration {
  position: relative;
  overflow: hidden;
}

.typing-stage > *,
.result-celebration > * {
  position: relative;
  z-index: 1;
}

.stage-dungeon::before,
.stage-zoo::before,
.stage-zoo::after,
.stage-library::before,
.stage-library::after {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Dungeon: stone dusk + flickering torch glow in both corners */
.stage-dungeon {
  border-color: rgba(56, 58, 82, 0.4);
}

.stage-dungeon::before {
  content: "";
  inset: 0;
  background:
    radial-gradient(circle at 5% 18%, rgba(255, 172, 64, 0.35), transparent 26%),
    radial-gradient(circle at 95% 18%, rgba(255, 172, 64, 0.35), transparent 26%),
    linear-gradient(180deg, rgba(56, 58, 82, 0.10), rgba(37, 71, 53, 0.06));
  animation: mrbob-torch 2.4s ease-in-out infinite;
}

/* Zoo: sunny sky and a swaying leaf */
.stage-zoo::before {
  content: "🌿";
  left: 10px;
  bottom: 4px;
  font-size: 1.6rem;
  opacity: 0.5;
  animation: mrbob-sway 3.2s ease-in-out infinite;
}

.stage-zoo::after {
  content: "☀️";
  right: 12px;
  top: 6px;
  font-size: 1.3rem;
  animation: mrbob-glowpulse 4s ease-in-out infinite;
}

/* Library: soft sparkle and floating letters */
.stage-library::before {
  content: "✨";
  left: 12px;
  top: 8px;
  font-size: 1.1rem;
  animation: mrbob-glowpulse 3.2s ease-in-out infinite;
}

.stage-library::after {
  content: "a b c";
  right: 14px;
  bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.35em;
  color: var(--brown-deep);
  opacity: 0.35;
  animation: mrbob-drift 5s ease-in-out infinite;
}

/* --- play screen feedback effects --- */

.stat-box {
  position: relative;
}

.gold-pop {
  position: absolute;
  top: -12px;
  right: 6px;
  z-index: 5;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--brown-deep);
  white-space: nowrap;
  pointer-events: none;
  animation: mrbob-goldpop 0.9s ease-out forwards;
}

.typing-feedback.crit-flash {
  animation: mrbob-crit 0.5s ease-out;
}

.typing-feedback.block-flash {
  animation: mrbob-block 0.6s ease-out;
}

.stage-card.objective-clear {
  animation: mrbob-clear 0.6s ease-out;
}

.typing-input:focus {
  border-color: var(--forest);
  box-shadow: 0 6px 18px rgba(37, 71, 53, 0.14);
}

/* --- keyframes --- */

@keyframes mrbob-torch {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

@keyframes mrbob-sway {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(7deg); }
}

@keyframes mrbob-glowpulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.08); }
}

@keyframes mrbob-drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes mrbob-goldpop {
  0%   { opacity: 0; transform: translateY(6px) scale(0.8); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-22px) scale(1.05); }
}

@keyframes mrbob-crit {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.18); color: #a86e12; }
  100% { transform: scale(1); }
}

@keyframes mrbob-block {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.1); color: var(--blue-deep); }
  100% { transform: scale(1); }
}

@keyframes mrbob-clear {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.1) rotate(2deg); box-shadow: 0 0 0 6px rgba(217, 229, 210, 0.7); }
  100% { transform: scale(1); }
}

/* --- reduced motion: switch all Part 5 animation off --- */

@media (prefers-reduced-motion: reduce) {
  .stage-dungeon::before,
  .stage-zoo::before,
  .stage-zoo::after,
  .stage-library::before,
  .stage-library::after,
  .typing-feedback.crit-flash,
  .typing-feedback.block-flash,
  .stage-card.objective-clear {
    animation: none;
  }

  .gold-pop {
    animation: none;
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .world-row {
    grid-template-columns: 1fr;
  }

  .world-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    column-gap: 12px;
  }

  .world-card-emoji {
    grid-row: span 2;
  }
}
