:root {
  --bg: #f8f3ff;
  --panel: rgba(255, 255, 255, 0.82);
  --ink: #1f1840;
  --muted: #665f85;
  --line: rgba(162, 132, 255, 0.22);
  --accent: #118ab2;
  --accent-2: #ff5ea8;
  --accent-3: #7c4dff;
  --sun: #ffcf56;
  --mint: #8be9d7;
  --shadow: 0 24px 50px rgba(72, 36, 135, 0.12);
  --radius: 22px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 94, 168, 0.26), transparent 0 24%),
    radial-gradient(circle at 86% 8%, rgba(124, 77, 255, 0.22), transparent 0 26%),
    radial-gradient(circle at 70% 72%, rgba(139, 233, 215, 0.18), transparent 0 24%),
    linear-gradient(180deg, #fff8ff 0%, #f6eeff 38%, #eef8ff 100%),
    var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 132, 200, 0.18), transparent 0 20%),
    radial-gradient(circle at 74% 18%, rgba(116, 209, 255, 0.2), transparent 0 22%),
    radial-gradient(circle at 54% 66%, rgba(255, 212, 94, 0.16), transparent 0 18%);
  animation: skyDrift 18s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.58) 0 1.2px, transparent 1.4px),
    radial-gradient(circle, rgba(124, 77, 255, 0.14) 0 1.1px, transparent 1.3px);
  background-size: 32px 32px, 76px 76px;
  background-position: 0 0, 12px 18px;
  opacity: 0.55;
  animation: sparkleShift 26s linear infinite;
}

body::before {
  background:
    linear-gradient(120deg, rgba(185, 234, 212, 0.24), transparent 42%),
    linear-gradient(240deg, rgba(126, 200, 227, 0.18), transparent 48%);
  animation: none;
}

.hero {
  padding: 84px 20px 36px;
  position: relative;
  overflow: hidden;
}

.hero--scene {
  min-height: 410px;
}

.hero__inner,
.page {
  max-width: var(--max);
  margin: 0 auto;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__inner--scene {
  display: grid;
  gap: 12px;
}

.hero__welcome {
  display: grid;
  gap: 4px;
}

.hero__whisper {
  margin: 0;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-3);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 4.35rem;
  line-height: 0.94;
}

.lede {
  max-width: 720px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero__badges span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  font-size: 0.92rem;
}

.hero__badges--magic span {
  box-shadow: 0 10px 25px rgba(123, 82, 255, 0.1);
}

.page {
  padding: 0 20px 40px;
}

.panel,
.card,
.resource {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 24px;
  margin-bottom: 20px;
}

.panel--accent {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 249, 255, 0.88));
}

.panel--glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 251, 255, 0.84));
}

.panel--student {
  position: relative;
  overflow: hidden;
}

.panel-copy {
  margin: 6px 0 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

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

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

.grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.resource {
  padding: 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover,
.resource:hover,
.material-card:hover,
.mini-card:hover,
.rule:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(72, 36, 135, 0.16);
  border-color: rgba(124, 77, 255, 0.28);
}

.card h3,
.resource h3,
.panel h2 {
  margin-top: 0;
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.kicker {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resource p {
  color: var(--muted);
  line-height: 1.5;
}

.resource__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.resource__meta span {
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.09);
  color: var(--accent-3);
  padding: 7px 10px;
  font-size: 0.82rem;
}

.resource__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.resource__actions a {
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  color: white;
  box-shadow: 0 12px 24px rgba(124, 77, 255, 0.22);
}

.button--ghost {
  background: rgba(17, 138, 178, 0.08);
  color: var(--accent);
  border-color: rgba(17, 138, 178, 0.16);
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.06);
}

.formula {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-3);
  letter-spacing: 0.04em;
}

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

.timeline__item {
  padding: 14px 16px;
  border-left: 5px solid var(--accent-2);
  background: rgba(255, 94, 168, 0.06);
  border-radius: 14px;
}

.timeline__item strong {
  display: block;
  margin-bottom: 6px;
}

.timeline__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.timeline__actions a {
  text-decoration: none;
}

.flat-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

.flat-list--numbered {
  padding-left: 22px;
}

.hero--science {
  padding-bottom: 28px;
}

.mini-card,
.rule {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.mini-card h3,
.rule h3 {
  margin-top: 0;
}

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

.pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.1);
  color: var(--accent-3);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

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

.data-table th {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.note-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(17, 138, 178, 0.08);
  border: 1px solid rgba(17, 138, 178, 0.16);
  color: var(--ink);
}

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

.summary-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.summary-card__label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card__value {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.quick-launch-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.quick-launch-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.quick-launch-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.schedule-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.schedule-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.schedule-block__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-block__head h3 {
  margin: 0;
}

.schedule-block__minutes {
  min-width: 68px;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(124, 77, 255, 0.1);
  color: var(--accent-3);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.schedule-block__purpose,
.schedule-block__action,
.schedule-block__evidence {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.schedule-block__links {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.schedule-block__links-title {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-link {
  display: inline-flex;
  min-height: 42px;
  max-width: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 96, 83, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-decoration: none;
}

.schedule-link:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 18px rgba(37, 92, 76, 0.11);
  transform: translateY(-1px);
}

.schedule-link strong {
  color: var(--accent);
  font-size: 0.88rem;
  line-height: 1.1;
}

.schedule-link span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

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

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

.material-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.material-card h3 {
  margin: 0;
}

.material-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.evidence-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 138, 178, 0.14);
  background: rgba(17, 138, 178, 0.06);
}

.evidence-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.print-note {
  margin: 0;
  color: var(--muted);
}

.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.stars span {
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
  animation: twinkle 4.8s ease-in-out infinite;
}

.stars span:nth-child(1) { top: 20%; left: 9%; }
.stars span:nth-child(2) { top: 14%; right: 14%; background: var(--sun); }
.stars span:nth-child(3) { top: 54%; left: 7%; background: var(--mint); }
.stars span:nth-child(4) { top: 28%; right: 28%; }
.stars span:nth-child(5) { top: 62%; right: 8%; background: #ffd7f0; }
.stars--wide span:nth-child(6) { top: 8%; left: 36%; background: #d9f8ff; animation-delay: -0.8s; }
.stars--wide span:nth-child(7) { top: 48%; right: 40%; background: #ffe6a7; animation-delay: -1.5s; }
.stars--wide span:nth-child(8) { top: 70%; left: 32%; background: #ffffff; animation-delay: -2.2s; }

.stat {
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 244, 255, 0.92));
}

.stat__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat__value {
  margin: 10px 0 4px;
  color: var(--accent-3);
  font-size: 2.4rem;
  font-weight: 800;
}

.stat__value--word {
  font-size: 1.8rem;
}

.stat__note {
  margin: 0;
  color: var(--muted);
}

.stat--magic {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 241, 255, 0.9));
}

.card--magic {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(238, 247, 255, 0.9));
}

.launch-card {
  min-height: 100%;
}

.checklist-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.check-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(72, 36, 135, 0.12);
}

.check-item--done {
  border-color: rgba(255, 94, 168, 0.3);
  background: linear-gradient(180deg, rgba(255, 248, 252, 0.96), rgba(240, 249, 255, 0.92));
}

.check-item__spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.12);
  color: var(--accent-3);
  font-size: 1rem;
}

.check-item--done .check-item__spark {
  background: linear-gradient(135deg, rgba(255, 94, 168, 0.18), rgba(124, 77, 255, 0.18));
}

.sparkle-meter {
  margin: 14px 0 0;
  color: var(--accent-3);
  font-weight: 700;
}

.timer-panel {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.timer-display {
  margin: 0;
  color: var(--accent-3);
  font-size: 2.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brain-break-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.brain-break-card__label {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brain-break-card__prompt {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.ambient-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 210, 236, 0.24), transparent 0 18%),
    radial-gradient(circle at 82% 14%, rgba(133, 189, 255, 0.22), transparent 0 18%),
    radial-gradient(circle at 72% 82%, rgba(255, 231, 173, 0.18), transparent 0 16%);
  animation: skyPulse 22s ease-in-out infinite alternate;
}

.ambient-glyphs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ambient-glyphs span {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(124, 77, 255, 0.12);
  color: rgba(92, 76, 164, 0.32);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: floatGlyph 16s ease-in-out infinite;
}

.ambient-glyphs span:nth-child(1) { top: 10%; left: 4%; }
.ambient-glyphs span:nth-child(2) { top: 22%; right: 6%; animation-delay: -2s; }
.ambient-glyphs span:nth-child(3) { top: 52%; left: 2%; animation-delay: -5s; }
.ambient-glyphs span:nth-child(4) { top: 70%; right: 8%; animation-delay: -8s; }
.ambient-glyphs span:nth-child(5) { top: 78%; left: 10%; animation-delay: -11s; }
.ambient-glyphs span:nth-child(6) { top: 38%; right: 18%; animation-delay: -6s; }

.hero__scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero__scene--science {
  opacity: 0.94;
}

.hero__sprite {
  position: absolute;
  filter: drop-shadow(0 28px 36px rgba(74, 36, 135, 0.18));
}

.hero__sprite--scene {
  width: min(43vw, 420px);
  right: max(2vw, 20px);
  bottom: 8px;
  animation: floatScene 8.5s ease-in-out infinite;
}

.hero__sprite--buddy {
  width: min(16vw, 160px);
  right: min(42vw, 430px);
  bottom: 48px;
  animation: floatBuddy 7.2s ease-in-out infinite;
}

.hero__sprite--small {
  width: min(13vw, 136px);
  right: min(40vw, 380px);
}

.hero__code-ribbon {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.hero__code-ribbon span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(32, 24, 72, 0.08);
  border: 1px solid rgba(124, 77, 255, 0.12);
  color: rgba(47, 38, 92, 0.68);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero__code-ribbon--science span {
  background: rgba(17, 138, 178, 0.08);
  color: rgba(17, 92, 128, 0.8);
}

@keyframes skyDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.05); }
}

@keyframes sparkleShift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-24px, 18px, 0); }
}

@keyframes skyPulse {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.04) translateY(8px); }
}

@keyframes floatGlyph {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-2deg); }
}

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

@keyframes floatBuddy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-1.2deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.92; transform: rotate(45deg) scale(0.88); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.14); }
}

@media (max-width: 820px) {
  .grid--three,
  .grid--two,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .hero--scene {
    min-height: 540px;
  }

  .hero__sprite--scene {
    width: min(84vw, 360px);
    right: auto;
    left: calc(50% - 180px);
    bottom: 36px;
  }

  .hero__sprite--buddy,
  .hero__sprite--small {
    width: 126px;
    right: auto;
    left: 24px;
    bottom: 34px;
  }

  .hero__code-ribbon {
    bottom: 0;
  }

  .ambient-glyphs span:nth-child(6) {
    display: none;
  }

  .schedule-block__head {
    flex-direction: column;
  }
}

/* Nisamina Wonder Zoo Academy theme */
:root {
  --bg: #f5fbf3;
  --panel: rgba(255, 255, 255, 0.88);
  --ink: #16322d;
  --muted: #56716b;
  --line: rgba(31, 96, 83, 0.18);
  --accent: #117a65;
  --accent-2: #d94f70;
  --accent-3: #2e5aa7;
  --sun: #f4c84f;
  --mint: #b9ead4;
  --shadow: 0 22px 46px rgba(37, 92, 76, 0.14);
  --radius: 8px;
}

body,
.page-theme--zoo {
  background:
    linear-gradient(120deg, rgba(244, 200, 79, 0.22), transparent 34%),
    linear-gradient(250deg, rgba(126, 200, 227, 0.18), transparent 42%),
    linear-gradient(180deg, #fffdf4 0%, #f4fbf2 44%, #edf8ff 100%),
    var(--bg);
}

body::after {
  background-image:
    linear-gradient(90deg, rgba(17, 122, 101, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 122, 101, 0.08) 1px, transparent 1px),
    linear-gradient(45deg, transparent 0 46%, rgba(244, 200, 79, 0.14) 46% 54%, transparent 54%);
  background-size: 34px 34px, 34px 34px, 88px 88px;
}

.hero {
  padding-top: 96px;
}

.hero__sprite--scene {
  width: min(54vw, 620px);
  filter: drop-shadow(0 28px 38px rgba(37, 92, 76, 0.22));
}

.hero__sprite--buddy {
  width: min(16vw, 160px);
  opacity: 0.92;
}

.panel,
.card,
.resource,
.material-card,
.mini-card,
.rule,
.summary-card,
.schedule-block,
.note-box,
.timeline__item {
  border-radius: 8px;
}

.button {
  border-radius: 8px;
}

.button--primary {
  background: linear-gradient(135deg, #117a65, #2e8fb0);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.74);
}

.card--magic,
.stat--magic,
.panel--accent {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 252, 244, 0.9));
}

.kicker,
.eyebrow {
  color: var(--accent);
}

.hero__whisper,
.stat__value,
.formula {
  color: var(--accent-3);
}

.brain-break-card {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 200, 79, 0.22), rgba(185, 234, 212, 0.42));
}

.is-hidden {
  display: none !important;
}

.kid-launch-panel {
  overflow: hidden;
}

.mission-dock,
.mission-tile-grid,
.reagent-grid,
.lab-controls,
.sensor-grid,
.hypothesis-grid,
.mission-link-grid,
.progress-board {
  display: grid;
  gap: 12px;
}

.mission-dock {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.mission-dock--wide {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.mission-dock__button,
.mission-tile,
.reagent-card,
.hypothesis-card,
.progress-row,
.notebook-row,
.ticket-question,
.certificate-panel,
.sensor-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 26px rgba(37, 92, 76, 0.08);
}

.mission-dock__button,
.mission-tile,
.reagent-card,
.hypothesis-card {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mission-dock__button,
.mission-tile {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 18px;
}

.mission-dock__button--primary,
.mission-tile.is-selected {
  border-color: rgba(17, 122, 101, 0.38);
  background:
    linear-gradient(135deg, rgba(17, 122, 101, 0.12), rgba(46, 143, 176, 0.14)),
    rgba(255, 255, 255, 0.95);
}

.mission-dock__button:hover,
.mission-tile:hover,
.reagent-card:hover,
.hypothesis-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 92, 76, 0.12);
}

.mission-tile[disabled],
.mission-tile.is-locked {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.mission-tile-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mission-tile-grid--four {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.mission-tile__tag {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mission-dock__button strong,
.mission-tile strong,
.reagent-card strong,
.hypothesis-card strong {
  font-size: 1.08rem;
}

.mission-dock__button span,
.mission-tile span,
.reagent-card span,
.hypothesis-card span {
  color: var(--muted);
  line-height: 1.45;
}

.lab-section {
  align-items: stretch;
}

.child-practice-panel {
  position: relative;
  overflow: hidden;
}

.math-stage,
.vet-clinic-stage {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  align-items: stretch;
}

.math-patient-card,
.math-workbench,
.care-station {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 26px rgba(37, 92, 76, 0.08);
}

.math-equation {
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(244, 200, 79, 0.22);
  color: var(--accent-3);
  font-size: 2.2rem;
  font-weight: 900;
  text-align: center;
}

.math-workbench {
  display: grid;
  gap: 14px;
}

.math-token-tray {
  display: grid;
  gap: 10px;
}

.math-token-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(17, 122, 101, 0.16);
  background: rgba(185, 234, 212, 0.2);
}

.math-token-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.math-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(17, 122, 101, 0.22);
  color: var(--accent);
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(37, 92, 76, 0.08);
}

.math-token--second {
  color: var(--accent-2);
  border-color: rgba(217, 79, 112, 0.22);
}

.math-token-operator {
  color: var(--accent-3);
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
}

.math-answer-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

.math-answer-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
}

.note-box.is-success {
  border-color: rgba(17, 122, 101, 0.32);
  background: rgba(185, 234, 212, 0.34);
}

.lab-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.slider-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.slider-stack label {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.slider-value {
  color: var(--accent-3);
  font-weight: 900;
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.reagent-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.reagent-card,
.hypothesis-card {
  display: grid;
  gap: 6px;
  min-height: 98px;
  padding: 14px;
  font: inherit;
}

.reagent-card.is-selected,
.hypothesis-card.is-selected {
  border-color: rgba(217, 79, 112, 0.36);
  background:
    linear-gradient(135deg, rgba(244, 200, 79, 0.2), rgba(185, 234, 212, 0.28)),
    rgba(255, 255, 255, 0.94);
}

.beaker-stage,
.reef-scene,
.volcano-scene,
.habitat-scene {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ecfbff, #fffdf4);
}

.beaker-stage {
  display: grid;
  place-items: center;
}

.beaker {
  position: relative;
  width: min(190px, 58vw);
  height: 230px;
  border: 7px solid rgba(22, 50, 45, 0.24);
  border-top: 0;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
}

.beaker__liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  transition: height 250ms ease, background 250ms ease;
}

.beaker__bubbles {
  position: absolute;
  inset: 12px 18px 24px;
  opacity: 0.2;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 6px, transparent 7px),
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 4px, transparent 5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 5px, transparent 6px);
  background-position: 12px 140px, 64px 112px, 116px 158px;
  background-size: 62px 92px, 74px 104px, 88px 116px;
  animation: bubbleRise 2.6s linear infinite;
}

.beaker__mark {
  position: absolute;
  right: 14px;
  width: 34px;
  border-top: 2px solid rgba(22, 50, 45, 0.26);
}

.beaker__mark--top { top: 54px; }
.beaker__mark--mid { top: 112px; }
.beaker__mark--low { top: 170px; }

.sensor-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 14px;
}

.sensor-card {
  padding: 13px;
}

.sensor-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sensor-card__head span {
  color: var(--accent-3);
  font-weight: 900;
}

.sensor-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 122, 101, 0.11);
}

.sensor-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width 220ms ease, background 220ms ease;
}

.sensor-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.reef-scene {
  --clarity: 0.82;
  --coral: 0.72;
  --current: 0.55;
  background:
    linear-gradient(180deg, rgba(130, 220, 255, calc(var(--clarity) * .78)), rgba(10, 112, 138, 0.82)),
    linear-gradient(180deg, #e9fbff, #cdf5ee);
}

.reef-sun {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(244, 200, 79, 0.84);
}

.reef-water {
  position: absolute;
  inset: 76px 0 0;
  background:
    repeating-linear-gradient(160deg, rgba(255, 255, 255, 0.16) 0 12px, transparent 12px 28px);
  opacity: var(--current);
  animation: reefCurrent 6s linear infinite;
}

.coral-garden {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-around;
  min-height: 82px;
  opacity: calc(0.35 + var(--coral) * 0.65);
}

.coral-garden span {
  width: 28px;
  border-radius: 14px 14px 4px 4px;
  background: #d94f70;
}

.coral-garden span:nth-child(1) { height: 42px; background: #d94f70; }
.coral-garden span:nth-child(2) { height: 72px; background: #f4c84f; }
.coral-garden span:nth-child(3) { height: 54px; background: #78c89b; }
.coral-garden span:nth-child(4) { height: 82px; background: #c477d7; }
.coral-garden span:nth-child(5) { height: 48px; background: #f08f61; }

.reef-fish {
  position: absolute;
  top: 112px;
  left: -140px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.84);
  color: #0c5d70;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(12, 93, 112, 0.12);
  animation: swimAcross var(--fish-speed, 6s) linear infinite;
}

.reef-fish--one { top: 86px; animation-delay: -1s; background: rgba(255, 233, 149, 0.9); }
.reef-fish--two { top: 130px; animation-delay: -3.4s; background: rgba(255, 197, 214, 0.9); }
.reef-fish--three { top: 168px; animation-delay: -5.2s; background: rgba(185, 234, 212, 0.9); }
.reef-fish--four { top: 208px; animation-delay: -7.6s; background: rgba(210, 232, 255, 0.9); }

.reef-fish:hover,
.reef-fish:focus {
  outline: none;
  border-color: #0c5d70;
  transform: translateY(-2px);
}

.reef-seagrass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background:
    repeating-linear-gradient(80deg, transparent 0 14px, rgba(33, 130, 90, 0.54) 14px 19px, transparent 19px 28px);
}

.resident-patient-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 14px;
}

.resident-patient {
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(37, 92, 76, 0.08);
}

.resident-patient.is-selected {
  border-color: rgba(17, 122, 101, 0.38);
  background:
    linear-gradient(135deg, rgba(17, 122, 101, 0.12), rgba(244, 200, 79, 0.18)),
    rgba(255, 255, 255, 0.95);
}

.resident-patient span {
  color: var(--accent);
  font-weight: 900;
}

.resident-patient small {
  color: var(--muted);
  line-height: 1.35;
}

.care-station {
  display: grid;
  gap: 10px;
  align-content: start;
}

.care-station p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.care-log {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.texas-core-map,
.curriculum-lane-grid,
.archive-ledger {
  display: grid;
  gap: 12px;
}

.texas-core-map {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 18px;
}

.texas-core-map article,
.curriculum-lane,
.archive-ledger div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  box-shadow: 0 12px 26px rgba(37, 92, 76, 0.08);
}

.texas-core-map strong,
.curriculum-lane h3,
.archive-ledger strong {
  color: var(--accent-3);
}

.texas-core-map span,
.curriculum-lane p,
.archive-ledger span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.curriculum-lane-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.archive-ledger {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.archive-ledger strong {
  display: block;
  font-size: 1.8rem;
}

.volcano-scene {
  background: linear-gradient(180deg, #dff3ff 0 45%, #f6e6ca 45% 100%);
}

.volcano-cone {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 260px;
  height: 188px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(115deg, #7f5a42 0 48%, #9b6b4c 49% 100%);
}

.lava-flow {
  position: absolute;
  left: 48%;
  bottom: 0;
  width: 34px;
  height: 28px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #ffdf6d, #ef4a2d);
  opacity: 0.3;
  transform: translateX(-50%);
  transition: height 250ms ease, opacity 250ms ease;
}

.ash-plume {
  position: absolute;
  left: 50%;
  bottom: 190px;
  width: 116px;
  height: 32px;
  border-radius: 999px 999px 24px 24px;
  background:
    radial-gradient(circle at 24% 28%, rgba(130, 130, 130, 0.58), transparent 0 32%),
    radial-gradient(circle at 64% 18%, rgba(93, 93, 93, 0.52), transparent 0 36%),
    rgba(116, 116, 116, 0.32);
  opacity: 0.2;
  transform: translateX(-50%);
  transition: height 250ms ease, opacity 250ms ease;
}

.volcano-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  background: rgba(88, 103, 72, 0.34);
}

.volcano-scene.is-explosive .ash-plume {
  animation: ashPulse 1.1s ease-in-out infinite alternate;
}

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

.data-notebook,
.exit-ticket {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.notebook-row,
.ticket-question,
.certificate-panel {
  padding: 14px;
}

.notebook-row div,
.progress-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notebook-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.notebook-row span,
.progress-row p {
  margin: 0;
  color: var(--muted);
}

.ticket-question {
  margin: 0;
}

.ticket-question legend {
  padding: 0 4px;
  color: var(--ink);
  font-weight: 900;
}

.ticket-option {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(31, 96, 83, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.ticket-option input {
  min-width: 18px;
  min-height: 18px;
}

.progress-row {
  padding: 12px;
}

.progress-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(17, 122, 101, 0.12);
  color: var(--accent);
  font-weight: 900;
}

.certificate-panel {
  margin-top: 14px;
  background:
    linear-gradient(135deg, rgba(244, 200, 79, 0.24), rgba(255, 255, 255, 0.96) 45%, rgba(185, 234, 212, 0.32));
}

.certificate-panel h3 {
  margin: 4px 0 8px;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.9rem;
}

@keyframes bubbleRise {
  from { background-position: 12px 140px, 64px 112px, 116px 158px; }
  to { background-position: 12px 28px, 64px 10px, 116px 34px; }
}

@keyframes reefCurrent {
  from { background-position: 0 0; }
  to { background-position: 120px 0; }
}

@keyframes swimAcross {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 260px)); }
}

@keyframes ashPulse {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.08); }
}

.hub-title {
  font-size: 3rem;
}

select,
.resource__meta span,
.pill,
.timeline__item,
.mini-card,
.rule,
.note-box,
.summary-card,
.schedule-block,
.schedule-block__minutes,
.material-card,
.evidence-item,
.check-item,
.brain-break-card,
.quick-launch-card,
.schedule-link,
.hero__code-ribbon span {
  border-radius: 8px;
}

.timer-display {
  font-size: 2.65rem;
}

@media (max-width: 820px) {
  h1 {
    font-size: 2.65rem;
  }

  .timer-display {
    font-size: 2.25rem;
  }

  .hub-title {
    font-size: 2.25rem;
  }
}

.checklist-item input:checked + span {
  text-decoration-color: var(--accent);
}

@media (max-width: 820px) {
  .hero {
    display: flex;
    flex-direction: column;
    padding: 52px 20px 26px;
  }

  .hero__sprite--scene {
    width: min(90vw, 430px);
    left: 50%;
    transform: translateX(-50%);
    animation: none;
  }

  .hero__inner {
    order: 1;
  }

  .hero__scene {
    position: relative;
    order: 2;
    inset: auto;
    min-height: 245px;
    margin-top: 18px;
  }

  .hero__code-ribbon {
    display: none;
  }

  .mission-dock,
  .mission-tile-grid,
  .mission-tile-grid--four,
  .lab-controls,
  .sensor-grid,
  .reagent-grid,
  .math-stage,
  .vet-clinic-stage,
  .math-answer-row {
    grid-template-columns: 1fr;
  }

  .mission-dock__button,
  .mission-tile {
    min-height: 112px;
  }

  .beaker-stage,
  .reef-scene,
  .volcano-scene,
  .habitat-scene {
    min-height: 245px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .certificate-panel,
  .certificate-panel * {
    visibility: visible;
  }

  .certificate-panel {
    position: absolute;
    inset: 28px;
    display: block !important;
    box-shadow: none;
    border: 3px solid #117a65;
  }
}
