: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;
  --gold-soft: #fff8df;
  --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.11), transparent 34rem),
    radial-gradient(circle at 84% 11%, rgba(12, 108, 28, 0.12), transparent 28rem),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 42%, #fff 100%);
}
body.overlay-open { overflow: hidden; isolation: isolate; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; }

.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;
}
.hidden { display: none !important; }
.skip-link {
  position: absolute;
  left: 16px;
  top: -52px;
  z-index: 80;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--dls-green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 14px; }

/* Local header fallback. The shared lab stylesheet loaded after this file
   guarantees the final header is identical across every Little Learning Lab. */
.site-header {
  width: 100%;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(234,223,205,.65);
}
.header-inner {
  width: 100%;
  max-width: var(--max-width);
  min-height: 78px;
  margin: 0 auto;
  padding: .62rem clamp(1rem,3vw,2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.brand { display: inline-flex; align-items: center; gap: .78rem; text-decoration: none; }
.brand-mark, .brand-mark img { width: 54px; height: 54px; object-fit: contain; }
.brand-wordmark img { width: 188px; height: auto; }
.header-links { display: flex; align-items: center; gap: 1.25rem; }
.header-links a { color: var(--dls-green); font-weight: 600; text-decoration: none; }
.mobile-menu-toggle { display: none; }

.nav-button,
.button {
  min-height: 46px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  font: 800 14px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.nav-button,
.button-primary {
  color: #fff;
  background: var(--dls-green);
  box-shadow: 0 10px 22px rgba(12,108,28,.18);
}
.button-accent {
  color: #fff;
  background: var(--dls-coral);
  box-shadow: 0 10px 22px rgba(240,60,112,.18);
}
.button-secondary {
  color: var(--dls-coral);
  background: #fff;
  border: 2px solid rgba(240,60,112,.72);
  box-shadow: 0 8px 18px rgba(240,60,112,.08);
}
.button:hover:not(:disabled), .nav-button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(24,48,31,.16); }
.button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.button:focus-visible,
.mode-option:focus-visible,
.level-option:focus-visible,
.stepper button:focus-visible,
.choice-button:focus-visible,
.match-clock-button:focus-visible,
.text-button:focus-visible,
.analog-clock:focus-visible {
  outline: 3px solid rgba(240,60,112,.35);
  outline-offset: 3px;
}

main { width: min(var(--max-width), calc(100% - 32px)); margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(330px,.92fr);
  gap: 34px;
  align-items: stretch;
  padding: clamp(34px,5vw,64px) 0 28px;
}
.hero-copy,
.hero-card,
.info-section,
.game-shell {
  border: 1px solid rgba(12,108,28,.12);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.84);
  box-shadow: var(--shadow);
}
.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: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin-top: 0; color: var(--dls-green-dark); font-family: var(--serif); }
.hero h1 { margin-bottom: 12px; font-size: clamp(50px,6.3vw,76px); line-height: .95; letter-spacing: -.035em; }
.subtitle { margin: 0; color: var(--ink); font-size: clamp(18px,2vw,23px); font-weight: 600; line-height: 1.48; }
.hero-note { max-width: 700px; margin: 16px 0 0; color: var(--muted); font-size: 15px; font-weight: 500; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.time-hero-card {
  position: relative;
  min-height: 330px;
  padding: clamp(24px,3vw,34px);
  display: grid;
  grid-template-columns: minmax(190px,1fr) minmax(155px,.8fr);
  gap: 20px;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 16%, rgba(240,60,112,.13), transparent 10rem),
    linear-gradient(135deg, rgba(237,247,239,.96), rgba(255,255,255,.94) 54%, rgba(255,240,244,.92));
}
.time-hero-card::before,
.time-hero-card::after {
  content: "✦";
  position: absolute;
  color: var(--gold);
  font-size: 24px;
  opacity: .76;
  animation: sparkle 2.8s ease-in-out infinite;
}
.time-hero-card::before { top: 22px; right: 38px; }
.time-hero-card::after { bottom: 20px; left: 20px; animation-delay: .9s; color: var(--dls-coral); font-size: 17px; }
.hero-clock-svg {
  width: min(100%, 250px);
  height: auto;
  margin: auto;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 16px 22px rgba(24,48,31,.14));
}
.hero-clock-shadow { fill: rgba(12,108,28,.10); }
.hero-clock-rim { fill: var(--dls-green); }
.hero-clock-face { fill: #fffdf7; stroke: #e8efe4; stroke-width: 4; }
.hero-clock-marks line { stroke: rgba(12,108,28,.62); stroke-width: 3; stroke-linecap: round; }
.hero-clock-numbers text {
  fill: var(--dls-green-dark);
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}
.hero-clock-minute,
.hero-clock-hour { stroke-linecap: round; }
.hero-clock-minute { stroke: var(--dls-coral); stroke-width: 9; }
.hero-clock-hour { stroke: var(--dls-green-dark); stroke-width: 12; }
.hero-clock-pin-outer { fill: var(--dls-coral); stroke: #fff; stroke-width: 4; }
.hero-clock-pin-inner { fill: #fff; }
.hero-time-copy { position: relative; z-index: 2; text-align: center; }
.mascot-intro { margin: 0 0 8px; color: var(--dls-coral); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hero-digital {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border: 4px solid #073f15;
  border-radius: 13px;
  background: #0d4b21;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 10px 22px rgba(24,48,31,.12);
  font-size: clamp(28px,4vw,46px);
  font-weight: 700;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.hero-time-copy h2 { margin: 0; font-size: clamp(30px,3.4vw,42px); line-height: 1; }
.hero-time-copy p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.45; }

.info-section { margin-top: 24px; padding: clamp(24px,4vw,40px); }
.info-section > h2 { margin-bottom: 22px; font-size: clamp(34px,4vw,50px); line-height: 1; }
.steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.steps article {
  position: relative;
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(12,108,28,.10);
  border-radius: 20px;
  background: #fffefb;
  overflow: hidden;
}
.steps article:nth-child(2),
.steps article:nth-child(3) { background: #fffefb; }
.steps article::after {
  content: none;
}
.steps h3 { position: relative; z-index: 1; margin: 14px 0 0; font-size: 30px; line-height: 1; }
.steps p { position: relative; z-index: 1; margin: 10px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.62; }
.clock-steps article {
  min-height: 180px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-areas:
    "visual title"
    "text text";
  column-gap: 18px;
  row-gap: 12px;
  align-content: start;
  background: #fffefb;
}
.clock-steps article:nth-child(2),
.clock-steps article:nth-child(3) { background: #fffefb; }
.clock-steps .lesson-visual {
  grid-area: visual;
  align-self: center;
  justify-self: start;
}
.clock-steps h3 {
  grid-area: title;
  align-self: center;
  margin: 0;
  font-size: 30px;
}
.clock-steps p {
  grid-area: text;
  margin: 0;
}
.hand-symbol {
  position: relative;
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(12,108,28,.13);
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
  flex: 0 0 62px;
}
.hand-symbol::before,
.hand-symbol::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50%;
  border-radius: 999px;
  transform-origin: 50% 100%;
}
.hand-symbol::after {
  width: 10px;
  height: 10px;
  bottom: calc(50% - 5px);
  border-radius: 50%;
  background: var(--dls-coral);
  transform: translateX(-50%);
}
.short-hand-symbol::before {
  width: 7px;
  height: 20px;
  margin-left: -3.5px;
  background: var(--dls-green-dark);
  transform: rotate(70deg);
}
.long-hand-symbol::before {
  width: 5px;
  height: 28px;
  margin-left: -2.5px;
  background: var(--dls-coral);
}
.connect-hand-symbol {
  overflow: hidden;
  padding: 0;
}
.connect-hand-symbol::before,
.connect-hand-symbol::after {
  content: none;
}
.connect-hands-svg {
  width: 62px;
  height: 62px;
  display: block;
  pointer-events: none;
}

.digital-symbol {
  grid-area: num;
  width: 48px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #073f15;
  border-radius: 8px;
  background: #0d4b21;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}

.game-shell { margin-top: 24px; padding: clamp(22px,3.5vw,38px); }
.game-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.game-heading h2 { margin: 0; font-size: clamp(38px,4.5vw,56px); line-height: .95; }
.score-card {
  min-width: 130px;
  padding: 11px 15px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(12,108,28,.14);
  border-radius: 16px;
  background: var(--dls-green-soft);
  text-align: center;
}
.score-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.score-value { color: var(--dls-green-dark); font-size: 30px; font-weight: 800; line-height: 1; }

.mode-picker {
  margin-top: 24px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
  border: 1px solid rgba(12,108,28,.11);
  border-radius: 20px;
  background: rgba(247,237,220,.55);
}
.mode-option {
  min-width: 0;
  min-height: 86px;
  padding: 13px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 15px;
  background: rgba(255,255,255,.82);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.mode-option:hover { transform: translateY(-1px); border-color: rgba(12,108,28,.22); }
.mode-option.active { border-color: var(--dls-green); background: #fff; box-shadow: 0 8px 18px rgba(12,108,28,.1); }
.mode-icon {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dls-green-soft);
  color: var(--dls-green);
  font-size: 24px;
  font-weight: 800;
}
.mode-option:nth-child(2) .mode-icon { background: var(--dls-coral-soft); color: var(--dls-coral); }
.mode-option:nth-child(3) .mode-icon { background: var(--gold-soft); color: #9a6715; }
.mode-option > span:not(.mode-icon) { align-self: end; color: var(--dls-green-dark); font-size: 15px; font-weight: 800; line-height: 1.2; }
.mode-option small { align-self: start; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.25; }

.level-picker { margin: 20px 0 0; padding: 0; border: 0; }
.field-label { margin-bottom: 9px; color: var(--ink); font-size: 13px; font-weight: 800; }
.level-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.level-option {
  min-height: 70px;
  padding: 11px 10px;
  border: 1px solid rgba(12,108,28,.14);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .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,.1); }
.level-option span { display: block; color: var(--dls-green-dark); font-size: 13px; font-weight: 800; }
.level-option small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.3; }

.game-panel {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(270px,.76fr) minmax(430px,1.24fr);
  gap: 22px;
  align-items: stretch;
}
.challenge-panel {
  position: relative;
  min-width: 0;
  padding: clamp(22px,3vw,30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(12,108,28,.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(240,60,112,.09), transparent 8rem),
    linear-gradient(145deg,#fff,var(--dls-green-soft));
  overflow: hidden;
}
.challenge-panel::after {
  content: "✦";
  position: absolute;
  right: 28px;
  bottom: 22px;
  color: var(--gold);
  font-size: 26px;
  opacity: .65;
}
.challenge-label { margin: 0 0 7px; color: var(--dls-coral); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.challenge-panel h3 { max-width: 430px; margin: 0; font-size: clamp(32px,4vw,48px); line-height: .98; }
.target-time-row { margin-top: 24px; display: grid; gap: 11px; justify-items: start; }
.digital-display {
  min-width: 174px;
  padding: 13px 17px;
  border: 5px solid #073f15;
  border-radius: 16px;
  background: #0d4b21;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 12px 24px rgba(24,48,31,.14);
  font-size: clamp(42px,5.4vw,62px);
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.time-words { color: var(--dls-green-dark); font-family: var(--serif); font-size: clamp(28px,3.5vw,38px); font-weight: 700; line-height: 1; }
.challenge-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.hear-button { gap: 9px; }
.hear-button .sound-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.hear-button span { line-height: 1; }
.message {
  min-height: 62px;
  margin-top: 18px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(12,108,28,.12);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.message.success { color: var(--dls-green-dark); background: #fff; border-color: rgba(12,108,28,.3); }
.message.warning { color: #855b0d; background: var(--gold-soft); border-color: #f0d98d; }
.message.error { color: #9d2448; background: var(--dls-coral-soft); border-color: rgba(240,60,112,.28); }

.clock-workspace { min-width: 0; }
.clock-card {
  height: 100%;
  padding: clamp(16px,2.6vw,26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(12,108,28,.12);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 12px 32px rgba(24,48,31,.08);
}
.clock-wrap { position: relative; width: min(100%,420px); aspect-ratio: 1; }
.analog-clock { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: crosshair; }
.clock-shadow { fill: rgba(12,108,28,.12); filter: url(#clockShadow); }
.clock-rim { fill: var(--dls-green); }
.clock-face { fill: #fffdf7; stroke: rgba(255,255,255,.72); stroke-width: 3; }
.clock-tick { stroke: rgba(12,108,28,.52); stroke-linecap: round; }
.clock-tick.hour-tick { stroke: var(--dls-green-dark); }
.clock-number { fill: var(--dls-green-dark); font-family: var(--sans); font-size: 24px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
.clock-hand { stroke-linecap: round; transform-origin: 200px 200px; transition: transform .18s cubic-bezier(.2,.8,.2,1); pointer-events: stroke; cursor: grab; }
.clock-hand:active { cursor: grabbing; }
.hour-hand { stroke: var(--dls-green-dark); stroke-width: 14; }
.minute-hand { stroke: var(--dls-coral); stroke-width: 11; }
.clock-pin-outer { fill: var(--dls-coral); stroke: #fff; stroke-width: 5; filter: drop-shadow(0 3px 4px rgba(24,48,31,.18)); }
.clock-pin-inner { fill: #fff; opacity: .9; }
.hand-hit-area { fill: transparent; stroke: transparent; cursor: grab; transform-origin: 200px 200px; pointer-events: all; }
.hand-hit-area:active { cursor: grabbing; }
.clock-sparkle { position: absolute; color: var(--gold); pointer-events: none; animation: sparkle 2.5s ease-in-out infinite; }
.sparkle-one { right: 5%; top: 8%; font-size: 22px; }
.sparkle-two { left: 5%; bottom: 14%; color: var(--dls-coral); font-size: 16px; animation-delay: 1s; }

.hand-controls { width: 100%; max-width: 590px; margin-top: 4px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.hand-control-group { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(12,108,28,.11); border-radius: 14px; background: #fff; }
.hand-control-group.is-locked { opacity: .58; }
.hand-control-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.25; }
.hand-swatch { width: 5px; height: 24px; display: inline-block; border-radius: 999px; }
.hour-swatch { background: var(--dls-green-dark); }
.minute-swatch { background: var(--dls-coral); }
.stepper { display: grid; grid-template-columns: 34px minmax(34px,auto) 34px; gap: 4px; align-items: center; }
.stepper button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(12,108,28,.14);
  border-radius: 9px;
  background: var(--dls-green-soft);
  color: var(--dls-green-dark);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover:not(:disabled) { background: #dff1e3; }
.stepper button:disabled { cursor: not-allowed; opacity: .45; }
.stepper strong { min-width: 36px; color: var(--dls-green-dark); font-size: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.your-time {
  width: 100%;
  max-width: 590px;
  margin-top: 12px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 11px;
  align-items: center;
  border-radius: 13px;
  background: var(--dls-coral-soft);
}
.your-time span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.your-time strong { color: var(--dls-coral-dark); font-size: 22px; font-variant-numeric: tabular-nums; }
.your-time em { color: var(--dls-green-dark); font-family: var(--serif); font-size: 21px; font-style: normal; font-weight: 700; text-align: right; justify-self: end; }
.primary-game-actions { width: 100%; max-width: 590px; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.text-button { min-height: 40px; padding: 8px 2px; border: 0; background: transparent; color: var(--dls-coral); font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.answer-choices { width: 100%; max-width: 590px; margin-top: 15px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.choice-button {
  min-height: 68px;
  padding: 10px;
  border: 2px solid rgba(12,108,28,.14);
  border-radius: 15px;
  background: #fff;
  color: var(--dls-green-dark);
  font-size: clamp(21px,2.6vw,29px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.choice-button:hover { transform: translateY(-1px); border-color: var(--dls-green); background: var(--dls-green-soft); }
.choice-button.selected { border-color: var(--dls-coral); background: var(--dls-coral-soft); }
.choice-button.correct { border-color: var(--dls-green); background: var(--dls-green-soft); }
.choice-button.incorrect { border-color: var(--dls-coral); background: var(--dls-coral-soft); animation: nudge .3s ease; }

.clock-match-grid { width: 100%; max-width: 620px; margin-top: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.match-clock-button {
  min-width: 0;
  min-height: 160px;
  padding: 8px;
  border: 2px solid rgba(12,108,28,.12);
  border-radius: 17px;
  background: #fff;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.match-clock-button:hover { transform: translateY(-2px); border-color: var(--dls-green); background: var(--dls-green-soft); }
.match-clock-button.selected { border-color: var(--dls-coral); background: var(--dls-coral-soft); }
.match-clock-button.correct { border-color: var(--dls-green); background: var(--dls-green-soft); }
.match-clock-button.incorrect { border-color: var(--dls-coral); animation: nudge .3s ease; }
.mini-clock { width: 100%; max-width: 152px; margin: 0 auto; display: block; }
.mini-face { fill: #fffdf7; stroke: var(--dls-green); stroke-width: 9; }
.mini-tick { stroke: rgba(12,108,28,.54); stroke-width: 2.6; stroke-linecap: round; }
.mini-hour { stroke: var(--dls-green-dark); stroke-width: 9; stroke-linecap: round; transform-origin: 100px 100px; }
.mini-minute { stroke: var(--dls-coral); stroke-width: 6; stroke-linecap: round; transform-origin: 100px 100px; }
.mini-pin { fill: var(--dls-coral); stroke: #fff; stroke-width: 3; }

.grownups { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 18px; align-items: stretch; }
.grownups h2 { margin-bottom: 12px; }
.grownups .note-card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.grownups > div:first-child > p:last-child { margin: 0; color: var(--muted); line-height: 1.7; }
.note-card { padding: 22px; border: 1px solid rgba(12,108,28,.12); border-radius: 20px; background: var(--dls-green-soft); }
.note-card h3 { margin-bottom: 8px; font-family: var(--sans); font-size: 16px; font-weight: 800; }
.age-guidance { margin: 0; color: var(--muted); line-height: 1.55; }
.age-guidance strong, .age-guidance span { display: block; }
.age-guidance strong { color: var(--dls-green-dark); }
.age-guidance span { margin-top: 6px; font-size: 13px; }

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(24,48,31,.62);
  backdrop-filter: blur(5px);
}
.celebration-card {
  position: relative;
  width: min(100%,510px);
  padding: 32px 26px 28px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 15%, rgba(240,60,112,.13), transparent 9rem),
    radial-gradient(circle at 84% 80%, rgba(12,108,28,.12), transparent 10rem),
    #fffdf8;
  box-shadow: 0 30px 80px rgba(0,0,0,.24);
  text-align: center;
  overflow: hidden;
  animation: popIn .28s ease both;
}
.celebration-close {
  position: absolute;
  right: 15px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--dls-coral-soft);
  color: var(--dls-coral-dark);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.celebration-clock { margin-bottom: 5px; font-size: 70px; animation: clockBounce .8s cubic-bezier(.2,.85,.3,1.2) both; }
.celebration-kicker { margin: 0 0 5px; color: var(--dls-coral); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.celebration-card h2 { margin-bottom: 10px; font-size: clamp(38px,6vw,52px); line-height: .95; }
.celebration-text { max-width: 390px; margin: 0 auto; color: var(--muted); line-height: 1.62; }
.celebration-actions { position: relative; z-index: 2; margin-top: 20px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.confetti-burst span { position: absolute; width: 9px; height: 16px; border-radius: 3px; animation: confetti 1.5s ease-out infinite; }
.confetti-burst span:nth-child(1) { left: 8%; top: 18%; background: var(--dls-coral); transform: rotate(18deg); }
.confetti-burst span:nth-child(2) { left: 17%; top: 34%; background: var(--gold); animation-delay: .2s; }
.confetti-burst span:nth-child(3) { right: 13%; top: 22%; background: var(--dls-green); animation-delay: .4s; }
.confetti-burst span:nth-child(4) { right: 7%; top: 46%; background: var(--dls-coral); animation-delay: .1s; }
.confetti-burst span:nth-child(5) { left: 12%; bottom: 18%; background: var(--dls-green); animation-delay: .5s; }
.confetti-burst span:nth-child(6) { right: 22%; bottom: 14%; background: var(--gold); animation-delay: .35s; }
.confetti-burst span:nth-child(7) { left: 38%; top: 8%; background: var(--gold); animation-delay: .65s; }
.confetti-burst span:nth-child(8) { right: 40%; top: 12%; background: var(--dls-coral); animation-delay: .55s; }

.lab-footer { margin-bottom: 0; }

@keyframes sparkle { 0%,100% { opacity: .45; transform: scale(.82) rotate(0deg); } 50% { opacity: 1; transform: scale(1.14) rotate(16deg); } }
@keyframes nudge { 0%,100% { transform: translateX(0); } 33% { transform: translateX(-5px); } 66% { transform: translateX(5px); } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes clockBounce { 0% { opacity: 0; transform: translateY(18px) rotate(-12deg) scale(.72); } 60% { opacity: 1; transform: translateY(-5px) rotate(7deg) scale(1.08); } 100% { transform: translateY(0) rotate(0) scale(1); } }
@keyframes confetti { 0% { opacity: 0; transform: translateY(-8px) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(42px) rotate(220deg); } }

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

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .time-hero-card { min-height: 300px; }
  .game-panel { grid-template-columns: 1fr; }
  .challenge-panel { min-height: 0; }
  .target-time-row { grid-template-columns: auto 1fr; align-items: center; }
  .challenge-actions { margin-top: 18px; }
  .message { max-width: 720px; }
  .clock-card { padding-top: 10px; }
}

@media (max-width: 760px) {
  main { width: min(100% - 20px, var(--max-width)); }
  .hero { gap: 16px; padding: 20px 0 12px; }
  .hero-copy, .hero-card, .info-section, .game-shell { border-radius: 22px; }
  .hero h1 { font-size: clamp(46px,14vw,62px); white-space: normal; }
  .subtitle { font-size: 17px; }
  .hero-note { font-size: 14px; }
  .hero-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .hero-actions .button { min-width: 0; padding-inline: 10px; }
  .time-hero-card { min-height: 0; grid-template-columns: minmax(150px,.95fr) minmax(130px,1.05fr); padding: 20px 16px; }
  .hero-clock-svg { width: min(100%, 225px); }
  .hero-number.n12 { top: 13px; }
  .hero-number.n6 { bottom: 13px; }
  .hero-number.n3 { right: 15px; }
  .hero-number.n9 { left: 15px; }
  .hero-time-copy h2 { font-size: 29px; }
  .hero-digital { border-width: 3px; font-size: 30px; }
  .info-section { margin-top: 14px; padding: 22px 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps article { min-height: 0; padding: 18px; }
  .game-shell { margin-top: 14px; padding: 20px 12px; }
  .game-heading { align-items: center; }
  .game-heading h2 { font-size: 39px; }
  .score-card { min-width: 102px; padding: 9px 10px; }
  .score-label { font-size: 9px; }
  .score-value { font-size: 26px; }
  .mode-picker { grid-template-columns: 1fr; }
  .mode-option { min-height: 68px; grid-template-columns: 42px 1fr; }
  .mode-icon { width: 38px; height: 38px; font-size: 21px; }
  .level-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .level-option { min-height: 65px; }
  .game-panel { gap: 14px; margin-top: 16px; }
  .challenge-panel { padding: 20px 16px; }
  .challenge-panel h3 { font-size: 36px; }
  .target-time-row { grid-template-columns: auto 1fr; gap: 12px; }
  .digital-display { min-width: 124px; padding: 10px 12px; border-width: 4px; font-size: 38px; }
  .time-words { font-size: 27px; }
  .challenge-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .challenge-actions .button { padding-inline: 8px; }
  .clock-card { padding: 10px 8px 16px; }
  .clock-wrap { max-width: 390px; }
  .clock-number { font-size: 25px; }
  .hand-controls { grid-template-columns: 1fr; padding-inline: 6px; }
  .hand-control-group { padding: 9px 10px; }
  .hand-control-label { font-size: 11px; }
  .your-time { margin-inline: 6px; width: calc(100% - 12px); grid-template-columns: auto auto; }
  .your-time em { grid-column: 1 / -1; text-align: left; }
  .answer-choices { padding-inline: 6px; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .choice-button { min-height: 61px; padding: 8px 3px; }
  .clock-match-grid { padding-inline: 4px; gap: 6px; }
  .match-clock-button { min-height: 125px; padding: 4px; }
  .primary-game-actions { padding-inline: 6px; }
  .grownups { grid-template-columns: 1fr !important; }
}

@media (max-width: 470px) {
  .time-hero-card { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-clock-svg { width: 170px; }
  .hero-number { font-size: 15px; }
  .hero-minute { height: 48px; width: 6px; margin-left: -3px; }
  .hero-hour { height: 41px; width: 8px; margin-left: -4px; }
  .hero-pin { width: 16px; height: 16px; border-width: 4px; }
  .hero-digital { padding: 8px 9px; font-size: 25px; }
  .hero-time-copy h2 { font-size: 24px; }
  .hero-time-copy p:last-child { font-size: 10px; }
  .game-heading h2 { font-size: 34px; }
  .score-card { min-width: 88px; }
  .level-options { gap: 7px; }
  .level-option span { font-size: 12px; }
  .level-option small { font-size: 9px; }
  .challenge-panel h3 { font-size: 33px; }
  .target-time-row { grid-template-columns: 1fr; justify-items: start; }
  .digital-display { min-width: 143px; }
  .clock-wrap { width: 100%; }
  .clock-number { font-size: 26px; }
  .hour-hand { stroke-width: 16; }
  .minute-hand { stroke-width: 11; }
  .answer-choices { grid-template-columns: 1fr; }
  .choice-button { min-height: 55px; }
  .clock-match-grid { grid-template-columns: 1fr; }
  .match-clock-button { min-height: 0; display: grid; place-items: center; }
  .mini-clock { max-width: 150px; }
  .primary-game-actions { display: grid; grid-template-columns: 1fr; }
  .primary-game-actions .button { width: 100%; }
  .celebration-actions { display: grid; grid-template-columns: 1fr; }
}

/* ===== v4: extra audio support beside the child-facing time readout ===== */
.your-time {
  grid-template-columns: auto auto auto minmax(0, 1fr);
}

.your-time-hear,
.read-hear-button {
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid rgba(240, 60, 112, 0.72);
  border-radius: 10px;
  background: #fff;
  color: var(--dls-coral);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(240, 60, 112, 0.08);
}

.your-time-hear:hover,
.your-time-hear:focus-visible,
.read-hear-button:hover,
.read-hear-button:focus-visible {
  border-color: var(--dls-coral);
  background: #fff7fa;
  outline: none;
}

.your-time-hear:focus-visible,
.read-hear-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(240, 60, 112, 0.18);
}

.your-time-hear .sound-icon,
.read-hear-button .sound-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.read-hear-helper {
  width: 100%;
  max-width: 590px;
  margin-top: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(240, 60, 112, 0.16);
  border-radius: 13px;
  background: var(--dls-coral-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .your-time {
    grid-template-columns: auto auto auto;
    row-gap: 10px;
  }

  .your-time em {
    grid-column: 1 / -1;
    text-align: left;
    justify-self: start;
  }

  .your-time-hear {
    min-width: 0;
    padding-inline: 10px;
  }

  .read-hear-helper {
    margin-inline: 6px;
    width: calc(100% - 12px);
  }
}

@media (max-width: 760px) {
  .clock-steps article {
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 14px;
  }
  .clock-steps h3 { font-size: 24px; }
}


.clock-steps article::after { display: none !important; }

/* v14: fixed raster clock icon for Connect the time */
.connect-clock-image-wrap {
  grid-area: visual;
  width: 62px;
  height: 62px;
  display: block;
  align-self: center;
  justify-self: start;
  flex: 0 0 62px;
}
.connect-clock-image {
  width: 62px;
  display: block;
  object-fit: contain;
}


/* v26: compact mobile target reminder for Set the Time and Clock Match */
.mobile-target-reminder { display: none; }
@media (max-width: 760px) {
  .mobile-target-reminder {
    position: sticky;
    top: 8px;
    z-index: 25;
    width: calc(100% - 12px);
    margin: 0 6px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: auto auto minmax(0,1fr) 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(240,60,112,.24);
    border-radius: 14px;
    background: rgba(255,250,247,.96);
    box-shadow: 0 10px 24px rgba(24,48,31,.14);
    backdrop-filter: blur(8px);
  }
  .mobile-target-reminder.hidden { display: none !important; }
  .mobile-target-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .mobile-target-digital {
    color: var(--dls-coral-dark);
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
  }
  .mobile-target-words {
    min-width: 0;
    overflow: hidden;
    color: var(--dls-green-dark);
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-target-hear {
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 2px solid rgba(240,60,112,.55);
    border-radius: 10px;
    background: #fff;
    color: var(--dls-coral);
    cursor: pointer;
  }
  .mobile-target-hear .sound-icon { width: 18px; height: 18px; }
}
@media (max-width: 470px) {
  .mobile-target-reminder {
    grid-template-columns: auto auto 36px;
  }
  .mobile-target-label { display: none; }
  .mobile-target-words { font-size: 16px; }
}
