:root {
  --dls-green: #0c6c1c;
  --dls-green-dark: #0a5f18;
  --dls-green-soft: #edf7ef;
  --dls-coral: #f03c70;
  --dls-coral-dark: #c92f5c;
  --dls-coral-soft: #fff0f4;
  --cream: #fffaf1;
  --warm: #f7eddc;
  --gold: #dba84b;
  --ink: #18301f;
  --muted: #5d6b61;
  --card: #ffffff;
  --line: #eadfcd;
  --shadow: 0 18px 45px rgba(24, 48, 31, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(240, 60, 112, 0.12), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(12, 108, 28, 0.13), transparent 28rem),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 42%, #ffffff 100%);
}

body.overlay-open { overflow: hidden;
  isolation: isolate; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 40;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--dls-green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 14px; }

.site-header {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(234, 223, 205, 0.65);
  box-shadow: 0 2px 18px rgba(24, 48, 31, 0.035);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.62rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  gap: 0.78rem;
  min-width: max-content;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 68px;
  max-width: none;
  height: auto;
  object-fit: contain;
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.brand-wordmark img {
  width: 188px;
  height: auto;
}

.header-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.55rem);
  color: var(--dls-green);
  font-weight: 600;
  font-size: clamp(0.88rem, 1vw, 1rem);
}

.header-links a {
  text-decoration: none;
}

.nav-link {
  color: var(--dls-green);
  letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--dls-coral);
}

.mobile-contact-link,
.mobile-menu-toggle {
  display: none;
}

.nav-button,
.button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 14px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-button {
  min-width: 130px;
  text-align: center;
  color: #fff;
  background: var(--dls-green);
  padding: 0.72rem 1.05rem;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(12, 108, 28, 0.14);
}

.button-primary {
  background: var(--dls-green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(12, 108, 28, 0.18);
}

.button-accent {
  background: var(--dls-coral);
  color: #fff;
  box-shadow: 0 10px 22px rgba(240, 60, 112, 0.18);
}

.button-secondary {
  background: #fff;
  color: var(--dls-coral);
  border: 2px solid rgba(240, 60, 112, 0.72);
  box-shadow: 0 8px 18px rgba(240, 60, 112, 0.08);
}

.button-secondary:hover:not(:disabled),
.button-secondary:focus-visible:not(:disabled) {
  background: #fff7fa;
  color: var(--dls-coral);
  border-color: var(--dls-coral);
}

.nav-button:hover,
.nav-button:focus-visible {
  background: var(--dls-green-dark);
}

.button:hover:not(:disabled),
.nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(24, 48, 31, 0.16);
}

.button:focus-visible,
.nav-link:focus-visible,
.direction-button:focus-visible,
.level-option:focus-visible,
.mobile-contact-link:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 3px solid rgba(240, 60, 112, 0.35);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 34px;
  align-items: stretch;
  padding: clamp(34px, 5vw, 64px) 0 28px;
}

.hero-copy, .hero-card, .game-shell, .info-section {
  border: 1px solid rgba(12, 108, 28, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.hero-copy { padding: clamp(28px, 4vw, 48px); }

.section-kicker {
  margin: 0 0 10px;
  color: var(--dls-coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  color: var(--dls-green);
  font-family: var(--serif);
  line-height: 1.03;
}
h1 { font-size: clamp(48px, 7vw, 82px); }
.subtitle {
  margin: 16px 0 0;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--ink);
  font-weight: 700;
}
.hero-note {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.68;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(125px, 0.78fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 20px;
  padding: 30px;
  background:
    radial-gradient(circle at 25% 20%, rgba(240, 60, 112, 0.15), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.95), rgba(237,247,239,.84));
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -45px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(240, 60, 112, 0.08);
}
.hero-mascot {
  width: min(100%, 180px);
  margin: 0 auto;
  filter: drop-shadow(0 12px 18px rgba(24, 48, 31, 0.12));
  animation: petalFloat 3s ease-in-out infinite;
}
.mascot-intro {
  margin: 0 0 5px;
  color: var(--dls-coral);
  font-weight: 800;
}
.hero-card h2 { font-size: 36px; }
.hero-card ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.75; font-weight: 600; }

.info-section {
  margin: 26px 0;
  padding: clamp(24px, 3vw, 34px);
}
.info-section > h2 { font-size: clamp(34px, 4vw, 50px); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.steps article {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fffefb;
}
.steps article > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--dls-coral-soft);
  color: var(--dls-coral);
  font-weight: 900;
}
.steps h3 { margin-top: 14px; font-size: 30px; }
.steps p { margin: 10px 0 0; color: var(--muted); line-height: 1.62; }

.game-shell {
  margin: 26px 0;
  padding: clamp(20px, 3vw, 34px);
}
.game-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.game-heading h2 { font-size: clamp(36px, 4vw, 52px); }
.score-card {
  min-width: 160px;
  padding: 15px 18px;
  border: 1px solid rgba(240, 60, 112, 0.16);
  border-radius: 22px;
  background: var(--dls-coral-soft);
  text-align: center;
}
.score-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.score-value { display: block; margin-top: 2px; color: var(--dls-coral); font-size: 34px; font-weight: 900; }

.maze-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(12, 108, 28, 0.11);
  border-radius: 22px;
  background: #fffefb;
}
.level-picker { margin: 0; padding: 0; border: 0; }
.field-label { display: block; margin-bottom: 10px; color: var(--ink); font-size: 14px; font-weight: 800; }
.level-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.level-option {
  min-height: 74px;
  width: 100%;
  border: 1px solid rgba(12, 108, 28, 0.16);
  border-radius: 18px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.level-option:hover { transform: translateY(-1px); border-color: var(--dls-green); }
.level-option.active {
  border-color: var(--dls-green);
  background: var(--dls-green-soft);
  box-shadow: inset 0 0 0 1px rgba(12,108,28,.08);
}
.level-option span { display: block; color: var(--dls-green-dark); font-size: 14px; font-weight: 800; }
.level-option small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.25; }
.toolbar-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sound-toggle-button { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.sound-toggle-button .sound-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.sound-toggle-button .sound-label { line-height: 1; }
.sound-toggle-button.sound-muted { color: var(--dls-coral); border-color: rgba(240, 60, 112, 0.48); background: #fff7fa; }
.toolbar-actions .button { width: 100%; padding-inline: 14px; }

.play-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.status-chip {
  min-width: 92px;
  padding: 11px 14px;
  border-radius: 17px;
  background: var(--dls-green-soft);
  text-align: center;
}
.status-chip span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.status-chip strong { display: block; color: var(--dls-green); font-size: 23px; }
.message {
  min-height: 50px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--line);
  text-align: center;
  font-weight: 700;
}
.message.success { color: var(--dls-green-dark); background: var(--dls-green-soft); border-color: rgba(12,108,28,.18); }
.message.warning { color: #855b0d; background: #fff8df; border-color: #f0d98d; }
.input-hint { color: var(--muted); font-size: 12px; font-weight: 600; text-align: right; }

.maze-play-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 18px;
  align-items: center;
}
.maze-frame {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(12, 108, 28, 0.13);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(237,247,239,.66), rgba(255,250,241,.72)),
    #fff;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.75);
}
.maze-label-row {
  display: flex;
  justify-content: space-between;
  padding: 0 6px 8px;
  color: var(--dls-green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.goal-label { color: var(--dls-coral); }
.maze-board {
  --cols: 11;
  --rows: 7;
  --hedge-thickness: clamp(10px, 0.9vw, 14px);
  position: relative;
  width: 100%;
  aspect-ratio: var(--cols) / var(--rows);
  min-height: 360px;
  max-height: 620px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  border: 9px solid #4f8f1f;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 24%, rgba(132, 184, 67, 0.12) 0 2px, transparent 2.5px),
    radial-gradient(circle at 72% 68%, rgba(240, 60, 112, 0.07) 0 1.6px, transparent 2px),
    radial-gradient(circle at 12% 80%, rgba(121, 170, 58, 0.12) 0 1.4px, transparent 1.8px),
    linear-gradient(180deg, #fffaf0, #fff6e5);
  background-size: 38px 38px, 54px 54px, 46px 46px, auto;
  box-shadow:
    inset 0 0 0 2px rgba(200, 232, 138, 0.55),
    0 16px 34px rgba(24,48,31,.12);
  outline: none;
  touch-action: none;
  user-select: none;
}
.maze-board:focus-visible { box-shadow: 0 0 0 4px rgba(240,60,112,.25), inset 0 0 0 2px rgba(154, 211, 75, 0.55), 0 16px 34px rgba(24,48,31,.12); }
.maze-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  cursor: pointer;
  background:
    radial-gradient(circle at 28% 22%, rgba(118, 166, 55, 0.1) 0 1.2px, transparent 1.5px),
    radial-gradient(circle at 76% 72%, rgba(219, 168, 75, 0.08) 0 1.1px, transparent 1.5px),
    radial-gradient(circle at 18% 80%, rgba(144, 194, 72, 0.08) 0 1px, transparent 1.3px),
    linear-gradient(180deg, #fffaf0, #fff6e8);
  background-size: 28px 28px, 34px 34px, 26px 26px, auto;
}
.maze-cell.wall-top,
.maze-cell.wall-right,
.maze-cell.wall-bottom,
.maze-cell.wall-left {
  border: 0;
}

.hedge {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
  border-radius: 999px;
  background-color: #65a92a;
  box-shadow:
    inset 0 1px 2px rgba(225, 247, 173, 0.38),
    inset 0 -2px 3px rgba(42, 91, 17, 0.34),
    0 2px 4px rgba(42, 83, 16, 0.2);
}

.hedge::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background-repeat: repeat;
  opacity: 0.98;
}

.hedge-top::before {
  background-image: url("../assets/images/hedge-horizontal.png");
  background-size: 128px 28px;
}

.hedge-left::before {
  background-image: url("../assets/images/hedge-vertical.png");
  background-size: 28px 128px;
}

.hedge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), transparent 48%, rgba(37,78,15,0.10));
}

.hedge.has-flower .hedge-flower,
.hedge.has-leaf .hedge-leaf {
  display: block;
}

.hedge-flower,
.hedge-leaf {
  position: absolute;
  display: none;
  z-index: 3;
  pointer-events: none;
}

.hedge-flower {
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffd86a 0 18%, transparent 20%),
    radial-gradient(circle at 50% 0, #f58cab 0 24%, transparent 26%),
    radial-gradient(circle at 100% 50%, #fffdfd 0 22%, transparent 24%),
    radial-gradient(circle at 50% 100%, #f58cab 0 24%, transparent 26%),
    radial-gradient(circle at 0 50%, #f6d567 0 22%, transparent 24%);
  filter: drop-shadow(0 1px 1px rgba(79,107,30,.3));
}

.hedge-leaf {
  width: 14px;
  height: 9px;
  background: linear-gradient(135deg, #99d45a, #4e8d1f);
  border-radius: 100% 0 100% 0;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.22);
  transform: rotate(-25deg);
}

.hedge-top .hedge-leaf {
  right: 18%;
  top: -3px;
}

.hedge-left .hedge-leaf {
  left: -3px;
  bottom: 18%;
  transform: rotate(55deg);
}

.hedge-top {
  top: calc(var(--hedge-thickness) / -2);
  left: calc(var(--hedge-thickness) / -2);
  width: calc(100% + var(--hedge-thickness));
  height: var(--hedge-thickness);
}

.hedge-left {
  top: calc(var(--hedge-thickness) / -2);
  left: calc(var(--hedge-thickness) / -2);
  width: var(--hedge-thickness);
  height: calc(100% + var(--hedge-thickness));
}
.maze-cell.start-cell { background: var(--dls-coral-soft); }
.maze-cell.goal-cell { background: #fff8d6; }
.maze-cell.hint-cell::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: rgba(240,60,112,.48);
  animation: hintPulse .65s ease-in-out infinite alternate;
}
.maze-character,
.maze-goal {
  position: absolute;
  inset: 2%;
  width: 96%;
  height: 96%;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
}
.maze-character {
  object-position: center bottom;
  filter: drop-shadow(0 3px 3px rgba(24,48,31,.18));
  animation: characterBounce .45s ease;
}
.maze-goal { animation: sunPulse 1.7s ease-in-out infinite; }

.direction-panel {
  padding: 18px 12px;
  border: 1px solid rgba(12,108,28,.12);
  border-radius: 22px;
  background: #fffefb;
  text-align: center;
}
.direction-panel > p:first-child { margin: 0 0 12px; color: var(--dls-green); font-weight: 800; }
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  gap: 6px;
  justify-content: center;
}
.direction-button {
  border: 1px solid rgba(12,108,28,.16);
  border-radius: 15px;
  background: #fff;
  color: var(--dls-green);
  cursor: pointer;
  box-shadow: 0 6px 13px rgba(24,48,31,.08);
  transition: transform .12s ease, background .12s ease;
  display: grid;
  place-items: center;
}
.direction-button:hover { background: var(--dls-green-soft); }
.direction-button:active { transform: scale(.94); }
.direction-icon {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.direction-button.up { grid-column: 2; grid-row: 1; }
.direction-button.up .direction-icon { transform: rotate(0deg); }
.direction-button.left { grid-column: 1; grid-row: 2; }
.direction-button.left .direction-icon { transform: rotate(-90deg); }
.dpad-center { grid-column: 2; grid-row: 2; display: grid; place-items: center; border-radius: 15px; color: var(--dls-coral); background: var(--dls-coral-soft); font-size: 25px; }
.direction-button.right { grid-column: 3; grid-row: 2; }
.direction-button.right .direction-icon { transform: rotate(90deg); }
.direction-button.down { grid-column: 2; grid-row: 3; }
.direction-button.down .direction-icon { transform: rotate(180deg); }
.rotate-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rotate-note strong { color: var(--dls-coral); }

.grownups {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 24px;
  align-items: center;
}
.grownups h2 { font-size: clamp(34px, 4vw, 50px); }
.grownups p { color: var(--muted); line-height: 1.72; }
.note-card { padding: 22px; border-radius: 20px; background: var(--dls-green-soft); border: 1px solid rgba(12,108,28,.12); }
.note-card h3 { font-size: 30px; }
.note-card p { margin-bottom: 0; }

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24,48,31,.62);
  backdrop-filter: blur(7px);
}
.celebration-overlay.hidden { display: none; }
.celebration-card {
  position: relative;
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: #fffefb;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  text-align: center;
  overflow: hidden;
}
.celebration-card::before,
.celebration-card::after {
  content: "★ ✦ ★ ✿ ✦";
  position: absolute;
  color: rgba(240,60,112,.18);
  font-size: 30px;
  letter-spacing: 14px;
  transform: rotate(-15deg);
}
.celebration-card::before { left: -18px; top: 42px; }
.celebration-card::after { right: -18px; bottom: 38px; }
.celebration-close {
  position: absolute;
  right: 15px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--dls-coral-soft);
  color: var(--dls-coral);
  font-size: 25px;
  cursor: pointer;
}
.celebration-petal { width: 120px; margin: 0 auto 6px; animation: celebrate .65s ease both; }
.celebration-kicker { margin: 0 0 6px; color: var(--dls-coral); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.celebration-card h2 { font-size: 42px; }
.earned-stars { margin: 12px 0; color: var(--gold); font-size: 38px; letter-spacing: 5px; text-shadow: 0 3px 0 rgba(219,168,75,.16); }
.celebration-text { color: var(--muted); line-height: 1.6; }
.celebration-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.site-footer {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 28px auto 0;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(12,108,28,.12);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}
.site-footer p { margin: 5px 0; }

@keyframes petalFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes characterBounce { 0% { transform: scale(.72); } 65% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes sunPulse { 0%,100% { transform: scale(.92); } 50% { transform: scale(1.05); } }
@keyframes hintPulse { from { transform: scale(.7); opacity: .45; } to { transform: scale(1.15); opacity: 1; } }
@keyframes celebrate { 0% { transform: translateY(30px) scale(.6) rotate(-8deg); opacity: 0; } 70% { transform: translateY(-6px) scale(1.08) rotate(3deg); opacity: 1; } 100% { transform: none; } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 170px 1fr; }
  .maze-toolbar { grid-template-columns: 1fr; }
  .toolbar-actions { grid-template-columns: repeat(3, 1fr); }
  .maze-play-area { grid-template-columns: minmax(0, 1fr); }
  .direction-panel { display: grid; grid-template-columns: auto 180px minmax(0, 1fr); align-items: center; gap: 14px; text-align: left; }
  .direction-panel > p:first-child { margin: 0; }
  .rotate-note { margin: 0; }
}

@media (max-width: 760px) {
  body.mobile-nav-open { overflow: hidden;
  isolation: isolate; }
  .site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(234, 223, 205, 0.75);
    box-shadow: 0 2px 18px rgba(24, 48, 31, 0.035);
  }
  .header-inner {
    min-height: 74px;
    max-width: var(--max-width);
    width: auto;
    margin: 0 auto;
    padding: 0.62rem 0.95rem;
    gap: 0.7rem;
  }
  .brand { gap: 0.5rem; }
  .brand-mark {
    width: 46px;
    height: 46px;
  }
  .brand-mark img {
    width: 58px;
    height: auto;
  }
  .brand-wordmark img { width: 140px; }
  .mobile-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-height: 38px;
    padding: 0.55rem 0.78rem;
    border: 1px solid rgba(234, 223, 205, 0.95);
    border-radius: 999px;
    background: #fff;
    color: var(--dls-green);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(24, 48, 31, 0.05);
  }
  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
    padding: 8px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(234, 223, 205, 0.95);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(24, 48, 31, 0.05);
  }
  .hamburger-line {
    width: 100%;
    height: 2px;
    border-radius: 99px;
    background: var(--dls-green);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .header-links {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 78px;
    z-index: 35;
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border: 1px solid rgba(234, 223, 205, 0.95);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(24, 48, 31, 0.18);
  }
  .header-links.open { display: flex; }
  .nav-link, .nav-button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
  }
  .nav-link { background: var(--dls-green-soft); }

  main { width: min(100% - 22px, var(--max-width)); }
  .hero { gap: 16px; padding: 20px 0 12px; }
  .hero-copy { padding: 24px 20px; }
  h1 { font-size: clamp(46px, 15vw, 66px); }
  .subtitle { font-size: 19px; }
  .hero-note { font-size: 14px; line-height: 1.6; }
  .hero-actions .button { flex: 1 1 140px; }
  .hero-card { grid-template-columns: 105px 1fr; gap: 10px; padding: 19px; }
  .hero-card h2 { font-size: 29px; }
  .hero-card ul { padding-left: 18px; font-size: 13px; line-height: 1.55; }
  .mascot-intro { font-size: 12px; }

  .info-section, .game-shell { margin: 16px 0; border-radius: 22px; padding: 18px 14px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .steps article { min-height: 0; padding: 17px; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; }
  .steps article > span { grid-row: 1 / 3; width: 36px; height: 36px; }
  .steps h3 { margin-top: 0; font-size: 27px; }
  .steps p { margin-top: 5px; font-size: 13px; }

  .game-heading { align-items: flex-start; margin-bottom: 14px; }
  .game-heading h2 { font-size: 35px; }
  .score-card { min-width: 104px; padding: 11px 9px; border-radius: 17px; }
  .score-label { font-size: 9px; }
  .score-value { font-size: 28px; }

  .maze-toolbar { padding: 13px; gap: 13px; border-radius: 18px; }
  .level-options { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .level-option { min-height: 69px; padding: 9px 7px; border-radius: 14px; text-align: center; }
  .level-option span { font-size: 12px; }
  .level-option small { font-size: 9px; }
  .toolbar-actions { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .toolbar-actions .button { min-height: 42px; padding: 10px 9px; font-size: 11px; }

  .play-status-row { grid-template-columns: auto minmax(0,1fr); gap: 8px; margin: 10px 0; }
  .status-chip { min-width: 72px; padding: 8px; }
  .status-chip strong { font-size: 20px; }
  .message { min-height: 44px; padding: 10px; font-size: 11px; line-height: 1.35; }
  .input-hint { grid-column: 1 / -1; text-align: center; font-size: 10px; }

  .maze-frame { padding: 8px; border-radius: 17px; }
  .maze-label-row { padding-bottom: 5px; font-size: 9px; }
  .maze-board {
    min-height: 0;
    max-height: none;
    border-width: 4px;
    border-radius: 11px;
  }
  .maze-board { --hedge-thickness: 7px; border-width: 7px; }
  .maze-character { inset: 2%; width: 96%; height: 96%; }
  .maze-goal { inset: 5%; width: 90%; height: 90%; }

  .direction-panel { display: block; padding: 12px; text-align: center; }
  .direction-panel > p:first-child { margin-bottom: 8px; font-size: 12px; }
  .dpad { grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 48px); gap: 5px; }
  .rotate-note { margin-top: 8px; font-size: 9px; }
  .grownups { grid-template-columns: 1fr; gap: 15px; }
  .celebration-card { padding: 24px 18px; }
  .celebration-card h2 { font-size: 34px; }
  .celebration-petal { width: 100px; }
}

@media (max-width: 430px) {
  .brand-wordmark img { width: 122px; }
  .mobile-contact-link { display: none; }
  .hero-card { grid-template-columns: 90px 1fr; }
  .toolbar-actions { grid-template-columns: repeat(2, 1fr); }
  .game-heading { gap: 8px; }
  .game-heading h2 { font-size: 31px; }
  .level-option small { display: none; }
  .level-option { min-height: 45px; }
}

@media (max-width: 760px) and (orientation: portrait) {
  .maze-board { aspect-ratio: var(--cols) / var(--rows); }
}

@media (max-width: 920px) and (orientation: landscape) {
  main { width: min(100% - 18px, 1180px); }
  .hero, #how-to-play, #grownups { display: none; }
  .game-shell { margin: 9px 0; padding: 10px; }
  .game-heading { margin-bottom: 7px; }
  .game-heading .section-kicker { display: none; }
  .game-heading h2 { font-size: 27px; }
  .score-card { padding: 6px 10px; }
  .maze-toolbar { grid-template-columns: minmax(0,1fr) auto; padding: 8px; gap: 8px; }
  .field-label { display: none; }
  .level-option { min-height: 42px; padding: 6px 8px; }
  .level-option small { display: none; }
  .toolbar-actions { grid-template-columns: repeat(4, auto); }
  .toolbar-actions .button { min-height: 38px; padding: 7px 11px; }
  .play-status-row { margin: 7px 0; }
  .input-hint { display: none; }
  .maze-play-area { grid-template-columns: minmax(0,1fr) 150px; gap: 8px; }
  .maze-frame { padding: 6px; }
  .maze-board { max-height: calc(100vh - 245px); min-height: 260px; }
  .direction-panel { display: block; padding: 7px; }
  .dpad { grid-template-columns: repeat(3, 43px); grid-template-rows: repeat(3, 43px); gap: 4px; }
  .rotate-note { display: none; }
  .site-footer { display: none; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ===== v2: align Little Maze Lab with the Money and Color Lab design system ===== */
/* Shared page widths and compact section rhythm. */
main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.hero,
.game-shell,
.info-section,
.site-footer {
  width: calc(100% - 2rem) !important;
  max-width: var(--max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero {
  padding: clamp(1rem, 2vw, 1.55rem) 0 0.7rem !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr) !important;
  gap: clamp(0.85rem, 2.2vw, 1.35rem) !important;
  align-items: center !important;
}

.hero-copy,
.hero-card,
.game-shell,
.info-section {
  border-radius: 28px !important;
  border: 1px solid rgba(12, 108, 28, 0.11) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 18px 45px rgba(24, 48, 31, 0.12) !important;
}

.hero-copy {
  padding: clamp(1.25rem, 3.2vw, 2.2rem) !important;
}

.section-kicker,
#grownups .section-kicker,
.grownups .section-kicker {
  margin: 0 0 0.5rem !important;
  color: var(--dls-coral) !important;
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  line-height: 1.25 !important;
  text-transform: uppercase !important;
}

.hero h1,
.game-heading h2,
.info-section h2,
.hero-card h2,
.celebration-card h2,
.grownups h2 {
  margin: 0 !important;
  color: var(--dls-green) !important;
  font-family: var(--serif) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.hero h1 {
  font-size: clamp(2.55rem, 5.2vw, 4.15rem) !important;
  line-height: 0.96 !important;
  margin-bottom: 0.45rem !important;
}

.subtitle {
  margin: 0 0 0.45rem !important;
  color: var(--ink) !important;
  font-family: var(--sans) !important;
  font-size: clamp(1rem, 1.55vw, 1.12rem) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.hero-note {
  display: block !important;
  max-width: 720px !important;
  margin: 0 0 0.85rem !important;
  color: var(--muted) !important;
  font-family: var(--sans) !important;
  font-size: clamp(0.9rem, 1.2vw, 0.96rem) !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

.hero-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.85rem !important;
  margin: 0 !important;
}

.hero-actions .button {
  min-height: 51px !important;
  padding: 0.78rem 1.2rem !important;
  font-family: var(--sans) !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
}

/* Petal uses the supplied mascot artwork, with the same compact learning card treatment. */
.hero-card {
  grid-template-columns: minmax(110px, 130px) minmax(0, 1fr) !important;
  gap: 1rem !important;
  align-items: center !important;
  padding: clamp(1.05rem, 1.8vw, 1.45rem) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(240, 60, 112, 0.11), transparent 38%),
    rgba(255, 255, 255, 0.9) !important;
}

.hero-card::after {
  display: none !important;
}

.hero-mascot {
  width: 100% !important;
  max-width: 130px !important;
  max-height: 205px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  animation: none !important;
  filter: drop-shadow(0 10px 14px rgba(24, 48, 31, 0.12)) !important;
}

.mascot-intro {
  margin: 0 0 0.22rem !important;
  color: var(--dls-coral) !important;
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

.hero-card h2,
.info-section h2,
.game-heading h2,
.grownups h2 {
  font-size: clamp(1.45rem, 3vw, 2.08rem) !important;
  line-height: 1.12 !important;
  margin-bottom: 0.65rem !important;
}

.hero-card ul {
  list-style: none !important;
  display: grid !important;
  gap: 0.62rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hero-card li {
  min-height: 0 !important;
  padding: 0.58rem 0.85rem !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--cream) !important;
  color: var(--muted) !important;
  font-family: var(--sans) !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

/* How to Play now follows the same typography and card layout as the first two labs. */
.info-section {
  margin-top: clamp(18px, 2.2vw, 26px) !important;
  margin-bottom: clamp(18px, 2.2vw, 26px) !important;
  padding: clamp(1.05rem, 2.4vw, 1.55rem) clamp(1rem, 3vw, 2rem) !important;
}

#how-to-play > h2 {
  max-width: 820px !important;
  margin-bottom: 1.1rem !important;
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(12px, 1.4vw, 16px) !important;
  margin-top: 0 !important;
}

#how-to-play .steps article {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-areas: "num title" "text text" !important;
  column-gap: 12px !important;
  row-gap: 8px !important;
  align-items: center !important;
  min-height: 142px !important;
  padding: clamp(14px, 1.7vw, 20px) !important;
  border-radius: 24px !important;
  background: var(--cream) !important;
}

#how-to-play .steps span {
  grid-area: num !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  align-self: center !important;
  justify-self: start !important;
  background: var(--dls-coral-soft) !important;
  color: var(--dls-coral) !important;
  font-family: var(--sans) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}

#how-to-play .steps h3 {
  grid-area: title !important;
  display: flex !important;
  align-items: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  color: var(--dls-green) !important;
  font-family: var(--sans) !important;
  font-size: clamp(0.98rem, 1.15vw, 1.08rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

#how-to-play .steps p {
  grid-area: text !important;
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-family: var(--sans) !important;
  font-size: clamp(0.92rem, 1.08vw, 1rem) !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

/* Game area keeps the extra horizontal space required by a maze, while sharing the same visual scale. */
.game-shell {
  margin-top: 0.9rem !important;
  margin-bottom: 0.75rem !important;
  padding: clamp(0.9rem, 2vw, 1.15rem) clamp(1rem, 3vw, 2rem) !important;
}

.game-heading {
  align-items: end !important;
  margin-bottom: 0.75rem !important;
}

.game-heading h2 {
  margin-bottom: 0 !important;
}

.score-card {
  min-width: 128px !important;
  padding: 0.55rem 0.85rem !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: white !important;
  box-shadow: 0 12px 28px rgba(24, 48, 31, 0.09) !important;
}

.score-label {
  color: var(--muted) !important;
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
}

.score-value {
  color: var(--dls-coral) !important;
  font-family: var(--sans) !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
}

.field-label,
.level-option,
.toolbar-actions .button,
.message,
.input-hint,
.status-chip,
.direction-panel,
.rotate-note {
  font-family: var(--sans) !important;
}

.level-option span,
.field-label,
.direction-panel > p:first-child {
  font-weight: 800 !important;
}

.level-option small,
.message,
.input-hint,
.rotate-note {
  color: var(--muted) !important;
  font-weight: 500 !important;
}

/* Grown-up section typography matches Money and Color rather than using oversized serif subheads. */
.grownups {
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 1rem !important;
  align-items: center !important;
}

.grownups > div:first-child > p:not(.section-kicker),
.note-card p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-family: var(--sans) !important;
  font-size: 0.94rem !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
}

.note-card {
  padding: 1.15rem !important;
}

.note-card h3 {
  margin: 0 0 0.65rem !important;
  color: var(--dls-green-dark) !important;
  font-family: var(--sans) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.celebration-petal {
  width: 130px !important;
  max-height: 170px !important;
  object-fit: contain !important;
}

@media (max-width: 980px) {
  .hero,
  .grownups {
    grid-template-columns: 1fr !important;
  }

  .hero-card {
    grid-template-columns: 150px minmax(0, 1fr) !important;
  }

  .hero-mascot {
    max-width: 145px !important;
    max-height: 215px !important;
  }
}

@media (max-width: 760px) {
  main {
    width: 100% !important;
  }

  .hero,
  .game-shell,
  .info-section,
  .site-footer {
    width: calc(100% - 2rem) !important;
  }

  .hero {
    padding: 1.1rem 0 0.7rem !important;
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .hero-copy {
    padding: 1.25rem !important;
  }

  /* Money and Color hide the secondary learning card on phones; Maze now does the same. */
  .hero-card {
    display: none !important;
  }

  .hero h1 {
    font-size: 2.55rem !important;
    line-height: 0.96 !important;
  }

  .subtitle {
    font-size: 0.96rem !important;
    line-height: 1.35 !important;
  }

  .hero-note {
    font-size: 0.94rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.85rem !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .hero-actions .button {
    width: 100% !important;
  }

  .info-section {
    padding: 1.25rem !important;
  }

  .info-section h2,
  .grownups h2 {
    font-size: 1.75rem !important;
    line-height: 1.08 !important;
  }

  .steps {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  #how-to-play .steps article {
    min-height: 0 !important;
    padding: 1rem !important;
  }

  #how-to-play .steps h3 {
    font-size: 0.98rem !important;
  }

  #how-to-play .steps p {
    font-size: 0.92rem !important;
  }

  .game-shell {
    padding: 0.72rem !important;
  }

  .game-heading {
    align-items: center !important;
    margin-bottom: 0.55rem !important;
  }

  .game-heading h2 {
    font-size: 1.55rem !important;
    line-height: 1.12 !important;
  }

  .score-card {
    min-width: 104px !important;
  }

  .score-label {
    font-size: 0.58rem !important;
  }

  .score-value {
    font-size: 1.55rem !important;
  }

  .grownups {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .grownups > div:first-child > p:not(.section-kicker),
  .note-card p {
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
  }

  .note-card {
    padding: 0.95rem !important;
  }
}

@media (max-width: 430px) {
  .hero h1 {
    white-space: nowrap !important;
    font-size: clamp(2.12rem, 10.4vw, 2.55rem) !important;
  }
}

/* v2.1 compact phone hero, matching the button height of the other labs. */
@media (max-width: 760px) {
  .hero-actions .button {
    min-height: 45px !important;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
  }
}

/* ===== v4: seamless hero rhythm + playful Petal motion ===== */
/* Match the compact Money Lab / Color Lab hero: copy sits directly on the page,
   while only the learning highlights remain inside a card. */
.hero {
  align-items: center !important;
  padding-top: clamp(0.95rem, 1.8vw, 1.35rem) !important;
  padding-bottom: 0.6rem !important;
}

.hero-copy {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hero h1 {
  font-weight: 600 !important;
  white-space: nowrap;
}

.subtitle {
  font-weight: 500 !important;
}

.hero-actions {
  margin-top: 0.9rem !important;
}

.hero-actions .button {
  min-width: 165px !important;
  min-height: 48px !important;
  padding: 0.72rem 1.2rem !important;
  border-radius: 8px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.hero-card {
  position: relative !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  gap: 0.9rem !important;
  min-height: 0 !important;
  padding: 0.95rem 1rem !important;
  overflow: hidden !important;
}

.hero-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 18px;
  top: 50%;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 60, 112, 0.16) 0 38%, rgba(116, 182, 29, 0.09) 39% 58%, transparent 60%);
  transform: translateY(-50%);
  animation: petalHalo 3.8s ease-in-out infinite;
}

.hero-mascot {
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: 104px !important;
  max-height: 150px !important;
  transform-origin: 50% 88%;
  will-change: transform;
  animation: petalGreeting 5.2s ease-in-out infinite !important;
}

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

.mascot-intro {
  font-weight: 700 !important;
}

.hero-card h2 {
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
}

.hero-card ul {
  gap: 0.42rem !important;
}

.hero-card li {
  padding: 0.48rem 0.72rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}

/* Petal stays gently lively while waiting, takes a small hop on each move,
   shakes when a wall is bumped, and celebrates at the sunshine. */
.maze-character {
  transform-origin: 50% 86%;
  will-change: transform;
  filter: drop-shadow(0 3px 4px rgba(24, 48, 31, 0.22)) !important;
}

.maze-character.is-idle {
  animation: mazePetalIdle 1.9s ease-in-out infinite !important;
}

.maze-character.is-stepping {
  --step-x: 0%;
  --step-y: 0%;
  --step-tilt: 0deg;
  --step-counter-tilt: 0deg;
  animation:
    mazePetalStep 0.38s cubic-bezier(.2, .88, .34, 1.18),
    mazePetalIdle 1.9s ease-in-out 0.4s infinite !important;
}

.maze-character.is-stepping[data-direction="left"] {
  --step-x: 18%;
  --step-tilt: -8deg;
  --step-counter-tilt: 3deg;
}

.maze-character.is-stepping[data-direction="right"] {
  --step-x: -18%;
  --step-tilt: 8deg;
  --step-counter-tilt: -3deg;
}

.maze-character.is-stepping[data-direction="up"] {
  --step-y: 18%;
  --step-tilt: -3deg;
  --step-counter-tilt: 1deg;
}

.maze-character.is-stepping[data-direction="down"] {
  --step-y: -18%;
  --step-tilt: 3deg;
  --step-counter-tilt: -1deg;
}

.maze-character.is-blocked {
  animation: mazePetalBlocked 0.34s ease !important;
}

.maze-character.reached-goal {
  animation: mazePetalCelebrate 0.72s cubic-bezier(.2, .9, .3, 1.2) both !important;
}

@keyframes petalGreeting {
  0%, 46%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  8% { transform: translateY(-4px) rotate(-2deg) scale(1.015); }
  14% { transform: translateY(-6px) rotate(2.2deg) scale(1.02); }
  20% { transform: translateY(-4px) rotate(-1.6deg) scale(1.015); }
  28% { transform: translateY(-7px) rotate(1deg) scale(1.025); }
  36% { transform: translateY(-2px) rotate(0deg) scale(1); }
}

@keyframes petalHalo {
  0%, 100% { opacity: 0.58; transform: translateY(-50%) scale(0.94); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.06); }
}

@keyframes mazePetalIdle {
  0%, 100% { transform: translateY(0) rotate(-1deg) scale(1); }
  50% { transform: translateY(-5%) rotate(1deg) scale(1.025); }
}

@keyframes mazePetalStep {
  0% { transform: translate(var(--step-x), var(--step-y)) scale(0.76) rotate(var(--step-tilt)); }
  58% { transform: translate(0, -8%) scale(1.12) rotate(var(--step-counter-tilt)); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

@keyframes mazePetalBlocked {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-10%) rotate(-7deg); }
  50% { transform: translateX(10%) rotate(7deg); }
  75% { transform: translateX(-5%) rotate(-3deg); }
}

@keyframes mazePetalCelebrate {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  35% { transform: translateY(-22%) scale(1.18) rotate(-8deg); }
  68% { transform: translateY(-10%) scale(1.12) rotate(8deg); }
  100% { transform: translateY(0) scale(1.04) rotate(0deg); }
}

@media (max-width: 980px) {
  .hero-card {
    grid-template-columns: 112px minmax(0, 1fr) !important;
  }

  .hero-mascot {
    max-width: 112px !important;
    max-height: 158px !important;
  }
}

@media (max-width: 760px) {
  .hero-copy {
    padding: 0 !important;
  }

  .hero h1 {
    white-space: normal !important;
  }

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

  .hero-actions .button {
    min-width: 0 !important;
    min-height: 45px !important;
    padding: 0.68rem 0.75rem !important;
  }
}

@media (max-width: 430px) {
  .hero h1 {
    white-space: nowrap !important;
  }
}
