:root {
  color-scheme: light;
  --sky: oklch(0.91 0.06 196);
  --sky-deep: oklch(0.79 0.1 201);
  --meadow: oklch(0.82 0.12 137);
  --meadow-deep: oklch(0.61 0.13 139);
  --paper: oklch(0.985 0.018 91);
  --ink: oklch(0.3 0.055 151);
  --leaf: oklch(0.61 0.13 143);
  --leaf-dark: oklch(0.43 0.1 148);
  --sun: oklch(0.88 0.15 88);
  --coral: oklch(0.73 0.16 32);
  --water: oklch(0.72 0.12 213);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 18rem;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  background: var(--sky);
  font-family: "Avenir Next Rounded", "Trebuchet MS", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 0.25rem solid oklch(0.52 0.18 252);
  outline-offset: 0.2rem;
}

.game {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(var(--space-xs), 1vh, var(--space-md));
  width: 100%;
  height: 100vh;
  height: 100svh;
  padding:
    max(var(--space-sm), env(safe-area-inset-top))
    max(var(--space-sm), env(safe-area-inset-right))
    max(var(--space-sm), env(safe-area-inset-bottom))
    max(var(--space-sm), env(safe-area-inset-left));
  overflow: hidden;
  background:
    radial-gradient(circle at 9% 8%, oklch(0.98 0.03 88 / 0.72) 0 3.2rem, transparent 3.3rem),
    linear-gradient(to bottom, var(--sky) 0 59%, var(--meadow) 59% 100%);
}

.game::before,
.game::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.game::before {
  top: 16%;
  left: -8%;
  width: 66%;
  height: 55%;
  border-radius: 48% 52% 0 0;
  background: oklch(0.88 0.09 145 / 0.7);
  transform: rotate(4deg);
}

.game::after {
  right: -13%;
  bottom: -22%;
  width: 75%;
  height: 62%;
  border-radius: 52% 48% 0 0;
  background: oklch(0.72 0.13 140 / 0.66);
  transform: rotate(-4deg);
}

.game-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 2.6rem;
  padding-inline: 3.5rem;
  color: var(--leaf-dark);
}

.game-header h1 {
  margin: 0;
  font-family: "Cooper Black", "Rockwell Extra Bold", Georgia, serif;
  font-size: clamp(1.3rem, 4.8vw, 2.3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

.title-leaf {
  width: clamp(1.8rem, 6vw, 3rem);
  height: auto;
  overflow: visible;
}

.title-leaf path:first-child {
  fill: var(--leaf);
}

.title-leaf path:last-child {
  fill: none;
  stroke: var(--leaf-dark);
  stroke-width: 4;
  stroke-linecap: round;
}

.level-indicator {
  display: flex;
  gap: 0.18rem;
  align-items: flex-end;
  height: 1.7rem;
}

.level-indicator i {
  display: block;
  width: 0.48rem;
  height: 0.7rem;
  border-radius: 50%;
  background: color-mix(in oklch, var(--leaf) 75%, var(--paper));
  transform: rotate(24deg);
}

.level-indicator i:nth-child(2) {
  align-self: flex-start;
}

.level-indicator i:nth-child(3) {
  transform: rotate(-24deg);
}

.game[data-level="1"] .level-indicator i:nth-child(1),
.game[data-level="2"] .level-indicator i:nth-child(2),
.game[data-level="3"] .level-indicator i:nth-child(3) {
  width: 0.68rem;
  height: 0.96rem;
  background: var(--coral);
  box-shadow: 0 0 0 0.12rem var(--paper);
}

.play-space {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(5.8rem, 0.42fr) minmax(10rem, 1fr);
  gap: clamp(var(--space-sm), 2vh, var(--space-xl));
  min-height: 0;
  width: min(100%, 68rem);
  margin-inline: auto;
}

.animals,
.homes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: clamp(var(--space-sm), 2.5vw, var(--space-2xl));
  min-height: 0;
}

.animal-card,
.home-card {
  position: relative;
  min-inline-size: 5.5rem;
  min-block-size: 5.5rem;
  margin: 0;
  border: 0;
  cursor: pointer;
}

.animal-card {
  --float-delay: 0s;
  display: grid;
  place-items: center;
  width: clamp(5.5rem, 24vw, 9.25rem);
  aspect-ratio: 1;
  padding: clamp(0.35rem, 1.4vw, 0.75rem);
  border-radius: 49% 51% 47% 53% / 52% 45% 55% 48%;
  background:
    radial-gradient(circle at 36% 28%, oklch(0.995 0.01 90 / 0.95) 0 10%, transparent 11%),
    var(--paper);
  box-shadow:
    0 0.42rem 0 oklch(0.55 0.1 142 / 0.2),
    inset 0 0 0 0.16rem oklch(0.92 0.035 92);
  touch-action: none;
  user-select: none;
  transform: translate3d(0, 0, 0);
  animation: animal-float 3.4s ease-in-out var(--float-delay) infinite;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.animal-card:nth-child(2) {
  --float-delay: -1.1s;
  border-radius: 54% 46% 51% 49% / 46% 54% 45% 55%;
}

.animal-card:nth-child(3) {
  --float-delay: -2.2s;
  border-radius: 46% 54% 48% 52% / 55% 47% 53% 45%;
}

.animal-card:hover {
  box-shadow:
    0 0.55rem 0 oklch(0.55 0.1 142 / 0.24),
    inset 0 0 0 0.18rem oklch(0.9 0.05 91);
}

.animal-card.is-selected {
  box-shadow:
    0 0.55rem 0 oklch(0.49 0.13 143 / 0.28),
    0 0 0 0.38rem var(--sun),
    inset 0 0 0 0.16rem var(--paper);
  transform: translateY(-0.5rem) rotate(-2deg) scale(1.06);
  animation: none;
}

.animal-card.is-dragging {
  z-index: 20;
  pointer-events: none;
  transform:
    translate3d(var(--drag-x), var(--drag-y), 0)
    rotate(3deg)
    scale(1.08);
  opacity: 0.92;
  animation: none;
}

.animal-card.is-wiggling {
  animation: soft-wiggle 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.animal-card.is-home {
  opacity: 0.17;
  transform: scale(0.76);
  filter: saturate(0.6);
  animation: none;
}

.animal-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0.18rem 0 oklch(0.35 0.06 150 / 0.16));
}

.animal-eye {
  fill: var(--ink);
}

.animal-eye-shine {
  fill: var(--paper);
}

.animal-smile,
.fish-scale,
.bunny-whisker {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
}

.fish-body {
  fill: oklch(0.73 0.16 32);
}

.fish-tail,
.fish-fin {
  fill: oklch(0.84 0.13 61);
  stroke: oklch(0.61 0.13 33);
  stroke-width: 2;
}

.fish-fin-back {
  fill: oklch(0.8 0.12 48);
}

.fish-cheek,
.bird-cheek,
.bunny-cheek {
  fill: oklch(0.82 0.11 29 / 0.72);
}

.bird-body {
  fill: oklch(0.84 0.15 88);
}

.bird-wing {
  fill: oklch(0.67 0.13 164);
}

.bird-tail {
  fill: oklch(0.56 0.12 166);
}

.bird-beak {
  fill: var(--coral);
}

.bird-tuft {
  fill: none;
  stroke: oklch(0.56 0.12 166);
  stroke-width: 7;
  stroke-linecap: round;
}

.bunny-body,
.bunny-head,
.bunny-ear,
.bunny-tail {
  fill: oklch(0.92 0.04 63);
  stroke: oklch(0.73 0.07 60);
  stroke-width: 2;
}

.bunny-ear-inner {
  fill: oklch(0.83 0.09 28);
}

.bunny-nose {
  fill: oklch(0.58 0.13 23);
}

.frog-body,
.frog-eye {
  fill: oklch(0.71 0.15 145);
  stroke: oklch(0.43 0.12 148);
  stroke-width: 2;
}

.frog-cheek {
  fill: oklch(0.82 0.1 86 / 0.72);
}

.frog-leg,
.bee-stripe,
.bee-antenna,
.crab-stalk,
.crab-leg,
.turtle-shell-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bee-body {
  fill: oklch(0.87 0.17 91);
}

.bee-wing {
  fill: oklch(0.94 0.04 203 / 0.76);
  stroke: oklch(0.61 0.08 201);
  stroke-width: 2;
}

.squirrel-body,
.squirrel-head,
.squirrel-tail,
.squirrel-ear {
  fill: oklch(0.61 0.13 58);
}

.squirrel-nose,
.acorn {
  fill: oklch(0.35 0.09 56);
}

.crab-body,
.crab-claw {
  fill: oklch(0.7 0.17 32);
  stroke: oklch(0.49 0.14 31);
  stroke-width: 2;
}

.turtle-shell {
  fill: oklch(0.55 0.13 139);
}

.turtle-head,
.turtle-foot {
  fill: oklch(0.72 0.11 133);
}

.duck-body,
.duck-head {
  fill: oklch(0.88 0.16 89);
}

.duck-bill {
  fill: var(--coral);
}

.duck-wing {
  fill: oklch(0.78 0.13 82);
}

.homes {
  align-items: stretch;
}

.home-card {
  display: grid;
  place-items: end center;
  width: 100%;
  height: 100%;
  max-width: 20rem;
  padding: clamp(var(--space-sm), 1.5vw, var(--space-lg));
  overflow: hidden;
  border: 0.18rem solid oklch(0.97 0.03 93 / 0.7);
  border-radius: 42% 58% 14% 14% / 24% 28% 12% 12%;
  background: oklch(0.91 0.07 136 / 0.82);
  box-shadow:
    inset 0 -0.5rem 0 oklch(0.55 0.12 140 / 0.12),
    0 0.42rem 0 oklch(0.42 0.09 142 / 0.18);
  touch-action: manipulation;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 180ms ease,
    box-shadow 180ms ease;
}

.home-card:nth-child(1) {
  background: oklch(0.85 0.08 201 / 0.88);
  border-radius: 50% 50% 15% 15% / 27% 25% 11% 12%;
}

.home-card:nth-child(2) {
  background: oklch(0.9 0.07 113 / 0.88);
  border-radius: 46% 54% 13% 17% / 30% 24% 12% 14%;
}

.home-card:nth-child(3) {
  background: oklch(0.87 0.09 78 / 0.9);
  border-radius: 56% 44% 16% 12% / 24% 31% 14% 12%;
}

.home-card:not(:disabled):hover {
  transform: translateY(-0.24rem);
  filter: saturate(1.06);
}

.home-card.try-again {
  animation: home-glow 420ms ease-out;
}

.home-card.is-matched {
  box-shadow:
    inset 0 -0.5rem 0 oklch(0.55 0.12 140 / 0.08),
    0 0 0 0.38rem oklch(0.89 0.16 89),
    0 0.46rem 0 oklch(0.42 0.09 142 / 0.17);
  animation: welcome-home 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-art {
  display: block;
  width: min(100%, 15rem);
  height: 100%;
  min-height: 7rem;
  overflow: visible;
  filter: drop-shadow(0 0.2rem 0 oklch(0.38 0.07 142 / 0.18));
}

.home-card .animal-art[data-home-copy] {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 7%;
  width: clamp(4.2rem, 17vw, 7rem);
  height: auto;
  transform: translateX(-50%);
  animation: animal-arrives 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pond-bank {
  fill: oklch(0.58 0.12 144);
}

.pond-water {
  fill: var(--water);
  stroke: oklch(0.58 0.12 218);
  stroke-width: 4;
}

.pond-ripple {
  fill: none;
  stroke: oklch(0.91 0.06 202);
  stroke-width: 5;
  stroke-linecap: round;
}

.reed,
.grass {
  fill: none;
  stroke: var(--leaf-dark);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.water-bubble {
  fill: oklch(0.95 0.04 203 / 0.78);
}

.branch-main,
.branch-tip {
  fill: none;
  stroke: oklch(0.46 0.1 63);
  stroke-width: 11;
  stroke-linecap: round;
}

.branch-tip {
  stroke-width: 7;
}

.leaf {
  fill: var(--leaf);
}

.nest-back {
  fill: oklch(0.65 0.13 69);
}

.nest-bowl {
  fill: oklch(0.56 0.13 61);
}

.nest-weave {
  fill: none;
  stroke: oklch(0.78 0.1 76);
  stroke-width: 6;
  stroke-linecap: round;
}

.burrow-hill {
  fill: oklch(0.63 0.12 78);
}

.burrow-door {
  fill: oklch(0.4 0.07 58);
}

.burrow-inner {
  fill: oklch(0.26 0.05 53);
}

.hill-flower {
  fill: var(--sun);
}

.flower-petal {
  fill: oklch(0.82 0.13 28);
  transform-origin: 60px 93px;
}

.lily-pad {
  fill: oklch(0.57 0.14 146);
}

.lily-cut {
  fill: none;
  stroke: oklch(0.37 0.1 146);
  stroke-width: 5;
  stroke-linecap: round;
}

.lily-flower {
  fill: oklch(0.88 0.14 341);
}

.hive {
  fill: oklch(0.84 0.16 84);
  stroke: oklch(0.55 0.12 67);
  stroke-width: 4;
}

.hive-line {
  fill: none;
  stroke: oklch(0.66 0.13 73);
  stroke-width: 6;
  stroke-linecap: round;
}

.hive-door,
.tree-hole {
  fill: oklch(0.31 0.07 59);
}

.tree-trunk {
  fill: oklch(0.5 0.11 63);
}

.tree-leaf {
  fill: oklch(0.58 0.14 143);
}

.sand {
  fill: none;
  stroke: oklch(0.83 0.09 84);
  stroke-width: 14;
  stroke-linecap: round;
}

.shell {
  fill: oklch(0.91 0.09 54);
  stroke: oklch(0.66 0.1 43);
  stroke-width: 4;
}

.shell-line,
.log-ring {
  fill: none;
  stroke: oklch(0.66 0.1 43);
  stroke-width: 5;
  stroke-linecap: round;
}

.log {
  fill: oklch(0.55 0.11 58);
}

.log-end {
  fill: oklch(0.74 0.11 65);
}

.reed-top {
  fill: oklch(0.54 0.1 65);
}

.meadow-dots {
  position: absolute;
  z-index: -1;
  inset: auto 0 3% 0;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}

.meadow-dots i {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50% 45% 50% 40%;
  background: var(--sun);
}

.meadow-dots i:nth-child(2) {
  background: oklch(0.76 0.14 28);
  transform: translateY(-0.8rem);
}

.meadow-dots i:nth-child(3) {
  width: 0.44rem;
  height: 0.44rem;
  background: var(--paper);
}

.meadow-dots i:nth-child(4) {
  transform: translateY(-1.2rem);
}

.feedback-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  min-height: 1.55rem;
  color: var(--leaf-dark);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.feedback-arrow {
  width: 1.5rem;
  height: 1rem;
  overflow: visible;
  transform: translateY(-0.05rem);
}

.feedback-arrow path {
  fill: none;
  stroke: oklch(0.5 0.1 144);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feedback-heart {
  width: 1.2rem;
  height: 1.1rem;
  overflow: visible;
}

.feedback-heart path {
  fill: var(--coral);
}

.feedback-hand {
  width: 1.45rem;
  height: 1.45rem;
  overflow: visible;
}

.feedback-hand path {
  fill: oklch(0.84 0.09 66);
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.parent-lock {
  position: fixed;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  padding: 0.65rem;
  border: 0;
  border-radius: 50%;
  color: color-mix(in oklch, var(--leaf-dark) 65%, var(--sky));
  background: transparent;
  touch-action: none;
  opacity: 0.58;
}

.parent-lock svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.parent-lock path:first-child {
  fill: currentColor;
}

.parent-lock path:last-child {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.parent-lock-top {
  top: max(var(--space-xs), env(safe-area-inset-top));
  right: max(var(--space-xs), env(safe-area-inset-right));
}

.parent-lock-bottom {
  bottom: max(var(--space-xs), env(safe-area-inset-bottom));
  left: max(var(--space-xs), env(safe-area-inset-left));
  transform: rotate(180deg);
}

.parent-lock.is-held {
  color: var(--paper);
  background: var(--leaf-dark);
  opacity: 1;
  box-shadow: 0 0 0 0.35rem oklch(0.86 0.11 141 / 0.64);
}

.parent-dialog {
  width: min(calc(100% - 1.5rem), 34rem);
  max-height: min(90vh, 44rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 2rem 1.35rem 2.2rem 1.5rem;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 1.3rem 0 oklch(0.24 0.06 151 / 0.18);
}

.parent-dialog::backdrop {
  background: oklch(0.25 0.06 151 / 0.62);
}

.parent-sheet {
  display: grid;
  gap: var(--space-xl);
  padding: clamp(var(--space-xl), 6vw, 2.5rem);
}

.parent-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
}

.parent-kicker {
  margin: 0 0 var(--space-sm);
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.parent-heading h1 {
  margin: 0;
  font-family: "Cooper Black", "Rockwell Extra Bold", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.close-parent {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0.14rem solid oklch(0.84 0.06 145);
  border-radius: 50%;
  background: oklch(0.94 0.04 144);
  font-size: 1.8rem;
  line-height: 1;
}

.parent-playland-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: fit-content;
  color: var(--leaf-dark);
  font-weight: 800;
  text-decoration-thickness: 0.13rem;
  text-underline-offset: 0.25rem;
}

.parent-note {
  max-width: 38ch;
  margin: 0;
  line-height: 1.55;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-lg);
  border: 0.14rem solid oklch(0.85 0.055 143);
  border-radius: 1.2rem 1.6rem 1.15rem 1.5rem;
  background: oklch(0.95 0.035 142);
}

.setting-row span {
  display: grid;
  gap: var(--space-xs);
}

.setting-row small {
  color: oklch(0.43 0.055 151);
}

.setting-row input {
  width: 2rem;
  height: 2rem;
  accent-color: var(--leaf-dark);
}

.play-again {
  min-height: 3.3rem;
  border: 0;
  border-radius: 1.4rem 1.1rem 1.5rem 1.2rem;
  color: var(--paper);
  background: var(--leaf-dark);
  box-shadow: 0 0.32rem 0 oklch(0.3 0.08 149);
  font-weight: 900;
}

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

@keyframes animal-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-0.28rem) rotate(1deg);
  }
}

@keyframes soft-wiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-0.35rem) rotate(-2deg);
  }
  70% {
    transform: translateX(0.24rem) rotate(1deg);
  }
}

@keyframes home-glow {
  50% {
    filter: brightness(1.06);
    box-shadow:
      inset 0 -0.5rem 0 oklch(0.55 0.12 140 / 0.08),
      0 0 0 0.34rem oklch(0.95 0.08 88 / 0.85);
  }
}

@keyframes welcome-home {
  0% {
    transform: scale(0.96);
  }
  70% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes animal-arrives {
  from {
    opacity: 0;
    transform: translate(-50%, -2rem) scale(0.76);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@media (max-width: 25rem) {
  .game {
    gap: var(--space-xs);
    padding-inline:
      max(var(--space-xs), env(safe-area-inset-left))
      max(var(--space-xs), env(safe-area-inset-right));
  }

  .game-header {
    min-height: 2.2rem;
  }

  .game-header h1 {
    font-size: 1.28rem;
  }

  .play-space {
    gap: var(--space-sm);
  }

  .animals,
  .homes {
    gap: var(--space-xs);
  }

  .animal-card {
    width: clamp(5.5rem, 28vw, 7rem);
    padding: 0.3rem;
  }

  .home-card {
    padding: var(--space-xs);
  }
}

@media (orientation: landscape) {
  .game {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .play-space {
    grid-template-columns: minmax(6rem, 0.3fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: clamp(var(--space-md), 2.5vw, var(--space-2xl));
    width: min(100%, 76rem);
  }

  .animals {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
  }

  .animal-card {
    width: clamp(5.5rem, 18vh, 7.5rem);
    max-height: 100%;
  }

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

  .feedback-wrap {
    position: absolute;
    left: 2rem;
    bottom: 1rem;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .feedback-arrow {
    transform: rotate(-32deg);
  }

  .home-card .animal-art[data-home-copy] {
    width: clamp(4rem, 15vh, 6.5rem);
  }
}

@media (orientation: landscape) and (max-height: 31rem) {
  .game {
    padding-block:
      max(var(--space-xs), env(safe-area-inset-top))
      max(var(--space-xs), env(safe-area-inset-bottom));
  }

  .game-header {
    position: absolute;
    top: max(var(--space-xs), env(safe-area-inset-top));
    left: 50%;
    min-height: 0;
    transform: translateX(-50%);
    opacity: 0.76;
  }

  .game-header h1 {
    font-size: 1.05rem;
  }

  .title-leaf,
  .level-indicator {
    display: none;
  }

  .play-space {
    padding-top: 0.4rem;
  }

  .home-art {
    min-height: 5.5rem;
  }

  .parent-dialog {
    max-height: calc(100vh - 1rem);
  }

  .parent-sheet {
    gap: 0.65rem;
    padding: 1rem 1.5rem;
  }

  .parent-kicker {
    margin-bottom: var(--space-xs);
  }

  .parent-heading h1 {
    font-size: 1.6rem;
  }

  .parent-note {
    line-height: 1.35;
  }

  .setting-row {
    padding: 0.65rem 0.9rem;
  }

  .play-again {
    min-height: 2.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
