:root {
  color: #263b3b;
  background: #fff8e8;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button {
  min-height: 3rem;
  border: 0;
  border-radius: 1rem;
  padding: 0.75rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:focus-visible {
  outline: 3px solid #d56a3d;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.app {
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.eyebrow {
  margin: 0;
  color: #d56a3d;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}
h2 {
  margin-top: 0;
}
.intro {
  max-width: 42rem;
  font-size: 1.1rem;
}
.notice,
.panel {
  margin-top: 1rem;
  border: 2px solid #ead9b7;
  border-radius: 1.5rem;
  background: #fffdf6;
  padding: 1.25rem;
  box-shadow: 0 0.5rem 1.5rem #52341a12;
}
.notice {
  display: grid;
  gap: 0.35rem;
  border-color: #f0b65d;
  background: #fff1ce;
}
.status {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 700;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.primary {
  color: #fff;
  background: #315d5d;
}
.secondary {
  color: #315d5d;
  background: #d9eee8;
}
.child-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  min-height: 48px;
  padding: 12px;
  border-radius: 1rem;
}
.child-icon-button svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: currentColor;
}
.start-icon {
  width: 88px;
  height: 88px;
  border-radius: 1.5rem;
  background: #397d59;
}
.start-icon svg {
  width: 40px;
  height: 40px;
}
.retry-icon {
  margin-inline-start: 0.5rem;
}
.help-icon,
.pause-icon {
  color: #315d5d;
  background: #d9eee8;
}
.stop-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: 0.75rem;
  color: #994340;
  background: #f6dfdc;
  box-shadow: none;
}
.continue-icon {
  width: 120px;
  height: 64px;
  border-radius: 1rem;
  background: #397d59;
}
.continue-icon svg {
  width: 34px;
  height: 34px;
}
.pause-icon[data-action='resume'] {
  color: #fff;
  background: #397d59;
}
.pause-icon[data-action='resume'] .icon-pause {
  display: none;
}
.pause-icon:not([data-action='resume']) .icon-play {
  display: none;
}
.word-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  width: min(100%, 54rem);
  min-height: min(400px, 52dvh);
  margin: 0 auto;
  padding: 2rem;
  border-radius: 1.5rem;
  background: #d9eee8;
  text-align: center;
}
.word-card .language {
  margin: 0;
  color: #536262;
  font-size: 0.875rem;
}
.word {
  margin: 0;
  color: #315d5d;
  font-size: clamp(3rem, 16vw, 8rem);
  font-weight: 850;
  line-height: 1.05;
  overflow-wrap: normal;
  word-break: normal;
}
.mic-indicator {
  --mic-level: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #315d5d;
  border-radius: 50%;
  font-size: 1.75rem;
}
.mic-indicator [data-reading-icon] {
  display: none;
}
.mic-indicator [data-reading-icon]:not([hidden]) {
  display: block;
}
.mic-indicator[data-state='sound'] {
  color: #397d59;
  box-shadow: 0 0 0 calc(5px + var(--mic-level) * 5px) rgb(57 125 89 / 16%);
  transform: scale(calc(1 + var(--mic-level) * 0.08));
}
.mic-indicator[data-state='sound'] [data-reading-icon='listening'] {
  animation: mic-pulse 350ms ease-in-out infinite alternate;
}
@keyframes mic-pulse {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 1;
  }
}
.controls {
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0.5rem 0;
}
.progress {
  margin-bottom: 0;
  color: #536262;
  text-align: center;
}
.progress-rail {
  display: grid;
  grid-template-columns: repeat(var(--rail-columns, 1), minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  min-height: 8px;
  margin: 0 auto 0.75rem;
}
.progress-step {
  position: relative;
  min-width: 0;
  height: 8px;
  border: 1px solid #ead9b7;
  border-radius: 999px;
  background: #eef1ed;
}
.progress-step.current {
  border: 2px solid #315d5d;
  background: #fffdf6;
  transform: scaleY(1.35);
}
.progress-step.accepted {
  border-color: #397d59;
  background: #397d59;
}
.progress-step.other {
  border-color: #b68a4d;
  background: #f3d9a9;
}
.stop-confirmation {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: rgb(32 60 59 / 48%);
}
.stop-confirmation-card {
  display: grid;
  justify-items: center;
  gap: 1rem;
  width: min(360px, calc(100% - 1rem));
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: #fffdf6;
  box-shadow: 0 0.5rem 1.5rem #52341a35;
  text-align: center;
}
.stop-dialog-symbol {
  color: #315d5d;
  font-size: 2rem;
}
.stop-confirmation-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
body.browser-session-active .welcome-copy,
body.browser-session-active .notice,
body.browser-session-active .setup {
  display: none !important;
}
body.browser-session-active .practice {
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.browser-reading-active .practice {
  display: block;
}
body.browser-reading-active .practice > #status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
body[data-session-pause-reason='playback-failure'] .practice > #status,
body[data-session-phase='storage-error'] .practice > #status,
body[data-session-phase='speech-error'] .practice > #status {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 1rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: #994340;
}
.reward-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem;
}
.reward-choice-tile {
  display: grid;
  gap: 0.5rem;
  min-height: 10rem;
  place-items: center;
  color: #315d5d;
  background: #f3e5c6;
}
.reward-choice-tile img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}
.reward {
  text-align: center;
}
.reward .actions {
  justify-content: center;
}
.reward-experience {
  display: grid;
  gap: 1rem;
}
.reward-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.reward-status {
  margin: 0;
  color: #536262;
  text-align: center;
}
.reward-status.error {
  color: #994340;
}
.reward-picture-area {
  text-align: center;
}
.reward-picture-image {
  display: block;
  width: min(100%, 48rem);
  max-height: 55vh;
  margin: 0 auto;
  border-radius: 1rem;
  object-fit: contain;
}
.reward-jigsaw-area,
.reward-memory-area,
.reward-sorting-area,
.reward-toy-area,
.reward-hidden-object-area,
.reward-anticipation-area {
  width: min(100%, 58rem);
  margin: 0 auto;
}
.jigsaw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  gap: 1rem;
  align-items: center;
}
.jigsaw-board {
  --jigsaw-columns: 3;
  --jigsaw-rows: 2;
  display: grid;
  grid-template-columns: repeat(var(--jigsaw-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--jigsaw-rows), minmax(0, 1fr));
  width: min(100%, 46rem);
  aspect-ratio: var(--jigsaw-columns) / var(--jigsaw-rows);
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid #ead9b7;
  border-radius: 1rem;
  background: #fffdf6;
}
.jigsaw-slot,
.jigsaw-piece {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  touch-action: none;
}
.jigsaw-slot svg,
.jigsaw-piece svg {
  position: absolute;
  top: -36%;
  left: -36%;
  width: 172%;
  height: 172%;
  max-width: none;
  pointer-events: none;
}
.jigsaw-tray {
  display: grid;
  place-items: center;
  min-height: 8rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #d9eee8;
}
.jigsaw-piece {
  width: 100%;
  aspect-ratio: 1;
  cursor: grab;
  filter: drop-shadow(0 0 2px #28635d) drop-shadow(0 4px 5px rgb(32 60 59 / 14%));
}
.jigsaw-piece.dragging {
  position: relative;
  z-index: 2;
  cursor: grabbing;
  opacity: 0.82;
}
.jigsaw-piece.selected,
.jigsaw-piece:focus-visible {
  filter: drop-shadow(0 0 4px #28635d) drop-shadow(0 6px 8px rgb(32 60 59 / 16%));
}
.memory-match-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(4rem, 1fr));
  gap: 0.75rem;
  max-width: 42rem;
  margin: 0 auto;
}
.memory-match-card {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0.3rem;
  border: 2px solid #ead9b7;
  border-radius: 0.75rem;
  background: #fffdf6;
  overflow: hidden;
  touch-action: manipulation;
}
.memory-match-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.memory-match-card.hidden img {
  object-fit: cover;
}
.memory-match-card.matched {
  border-color: #397d59;
  box-shadow: inset 0 0 0 3px #cfe8d6;
}
.memory-match-card.revealed {
  border-color: #b68a4d;
  box-shadow: inset 0 0 0 3px #f6e3bc;
}
.memory-match-card:disabled,
.sorting-target:disabled,
.toy-target:disabled,
.toy-toy:disabled {
  opacity: 1;
}
.sorting-board,
.toy-board {
  padding: 1rem;
  border: 2px solid #ead9b7;
  border-radius: 1rem;
  background: #fffdf6;
}
.sorting-targets,
.sorting-crayons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.sorting-crayons {
  margin-top: 1rem;
}
.sorting-target,
.sorting-crayon,
.toy-toy,
.toy-target {
  min-width: 0;
  min-height: 0;
  padding: 0.35rem;
  border: 2px solid #ead9b7;
  border-radius: 0.75rem;
  background: #fffdf6;
  overflow: hidden;
  touch-action: none;
}
.sorting-target,
.sorting-crayon {
  aspect-ratio: 1;
}
.sorting-target img,
.sorting-crayon img,
.toy-target img,
.toy-toy img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.sorting-crayon {
  cursor: grab;
}
.sorting-target.placed,
.toy-target.placed {
  border-color: #397d59;
  box-shadow: inset 0 0 0 3px #cfe8d6;
}
.sorting-crayon.selected,
.toy-toy.selected {
  border-color: #b68a4d;
  box-shadow: 0 0 0 3px #f6e3bc;
}
.sorting-crayon.dragging,
.toy-toy.dragging {
  opacity: 0.8;
}
.toy-scene {
  position: relative;
  width: min(100%, 34rem);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 1rem;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}
.toy-targets {
  position: absolute;
  inset: 0;
}
.toy-target {
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  border-color: transparent;
  background: transparent;
}
.toy-target[data-target-id='sun'] {
  top: 4%;
  left: 65%;
  width: 22%;
}
.toy-target[data-target-id='currants'] {
  top: 19%;
  left: 5%;
  width: 28%;
}
.toy-target[data-target-id='blobs'] {
  top: 27%;
  left: 65%;
  width: 22%;
}
.toy-target[data-target-id='mouse'] {
  top: 48%;
  left: 12%;
  width: 29%;
}
.toy-target[data-target-id='radish'] {
  top: 51%;
  left: 60%;
  width: 30%;
}
.toy-tray {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.toy-toy {
  aspect-ratio: 1;
  cursor: grab;
}
.toy-tray.locked {
  opacity: 0.72;
}
.toy-tray.locked .toy-toy {
  cursor: default;
}
.toy-continue-ready .reward-actions .primary {
  box-shadow: 0 0 0 4px rgb(57 125 89 / 22%);
  transform: scale(1.04);
}
.hidden-object-layout {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}
.hidden-object-reference {
  display: grid;
  place-items: center;
  width: 6rem;
  aspect-ratio: 1;
}
.hidden-object-reference-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hidden-object-board {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  background: #dfe9dc;
  cursor: crosshair;
  isolation: isolate;
  overflow: hidden;
  touch-action: manipulation;
}
.hidden-object-background {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hidden-object-target {
  position: absolute;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  box-shadow: none;
}
.hidden-object-target img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.anticipation-scene {
  position: relative;
  width: min(100%, 48rem);
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  border-radius: 1rem;
  background: #e4f1ee;
  overflow: hidden;
}
.anticipation-scene > img:first-child,
.anticipation-stage-image,
.anticipation-payoff-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.anticipation-stage-image {
  z-index: 1;
}
.anticipation-payoff-image {
  z-index: 2;
}
.anticipation-status {
  min-height: 0;
  font-size: 0.875rem;
}
.anticipation-controls {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
.anticipation-action {
  min-width: 9rem;
  min-height: 4rem;
}
.anticipation-action img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  vertical-align: middle;
}
@media (min-width: 700px) {
  .app {
    padding-top: 4rem;
  }
  .practice {
    padding: 2rem;
  }
}
@media (max-width: 699px) {
  .jigsaw-layout,
  .hidden-object-layout {
    grid-template-columns: 1fr;
  }
  .jigsaw-tray,
  .hidden-object-reference {
    width: min(100%, 10rem);
    margin: 0 auto;
  }
  .memory-match-board {
    grid-template-columns: repeat(2, minmax(4rem, 1fr));
    max-width: 18rem;
  }
  .sorting-targets,
  .sorting-crayons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .toy-tray {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
