/* A little farm: shared backgrounds and adult controls remain in the game shell. */
.animals-scene { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; max-width: 900px; margin: auto; }
.animals-listen { grid-row: 1; display: flex; justify-content: center; }
.animals-replay { width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--tf-control-border); background: var(--tf-surface); color: var(--tf-link); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; touch-action: manipulation; }
.animals-replay svg { width: 42px; height: 42px; }
.animals-replay-label { font-size: 11px; font-weight: 600; }
.animals-replay.is-playing { border-color: var(--tf-link); box-shadow: 0 0 0 6px var(--play-orbit); }
.animals-ground { grid-row: 2; min-width: 0; display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 3vw, 40px); min-height: 0; width: 100%; }
.animals-animal { position: relative; flex: 0 1 220px; width: 220px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border: 0; padding: 6px 4px; border-radius: 28px; background: transparent; color: var(--tf-text); touch-action: manipulation; }
.animals-figure { display: block; width: 100%; aspect-ratio: 1; max-height: 30vh; }
.animals-figure svg { width: 100%; height: 100%; }
.animals-greeting { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 0 10px; border-radius: 16px; background: var(--tf-surface); border: 1px solid var(--tf-control-border); color: var(--tf-text); font-size: clamp(14px, 1.8vw, 22px); font-weight: 600; line-height: 1.5; white-space: nowrap; pointer-events: none; }
.animals-greeting::after { content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -4px; border: 4px solid transparent; border-bottom-color: var(--tf-control-border); }
.animals-animal.is-greeting .animals-name, .animals-animal.is-speaking .animals-name, .animals-animal.is-found .animals-name { visibility: hidden; }
.animals-animal.is-speaking .animals-figure { filter: drop-shadow(0 0 4px var(--play-orbit)); }
.animals-family-help { margin: -4px 0 0; color: var(--tf-muted); font-size: 12px; line-height: 1.5; }
.animals-name { font-size: clamp(14px, 1.8vw, 22px); font-weight: 600; line-height: 1.5; }
.animals-key { display: block; color: var(--tf-subtle); font-size: 12px; line-height: 1.5; }
.animals-animal.is-greeting, .animals-animal.is-speaking, .animals-animal.is-found { background: var(--play-hover); }
.animals-animal.is-found::after { content: '✓'; position: absolute; top: 0; right: 7%; display: grid; place-items: center; border-radius: 50%; width: 30px; height: 30px; background: var(--play-success-badge); color: var(--play-on-success); font-size: 18px; }
.animals-hint { outline: 3px dashed var(--tf-link); outline-offset: 4px; }
.animals-footer { grid-row: 3; min-width: 0; min-height: 92px; text-align: center; }
.animals-status { min-height: 1.5em; margin: 0; color: var(--tf-muted); font-size: .86rem; line-height: 1.5; }
.animals-collection { display: flex; justify-content: center; align-items: center; gap: 12px; height: 62px; margin-top: 5px; }
.animals-keepsake { display: block; width: 52px; height: 52px; opacity: .2; filter: grayscale(1); }
.animals-keepsake.is-discovered { opacity: 1; filter: none; }
.animals-silent { grid-row: 4; text-align: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; max-width: 650px; justify-self: center; }
.animals-silent p { color: var(--tf-muted); font-size: 12px; line-height: 1.4; margin: 0; }
.animals-silent .tf-button { font-size: 12px; min-height: 44px; }
.animals-scene [hidden] { display: none !important; }
@media (hover: hover) { .animals-animal:hover { background: var(--play-hover); } .animals-replay:hover { border-color: var(--tf-link); } }
@media (max-width: 600px) {
  .animals-scene { gap: 10px; }
  .animals-ground { gap: 4px; }
  .animals-greeting { bottom: 23px; }
  .animals-animal { padding: 5px 1px; border-radius: 16px; }
  .animals-replay { width: 78px; height: 78px; }
  .animals-replay svg { width: 35px; height: 35px; }
  .animals-status { font-size: 12px; }
  .animals-footer { grid-row: 3; min-width: 0; min-height: 76px; }
  .animals-collection { height: 48px; margin-top: 3px; }
  .animals-keepsake { width: 42px; height: 42px; }
}
@media (max-height: 620px) and (orientation: portrait) {
  body[data-game=animals] .play-heading { padding-bottom: 8px; }
  .animals-scene { gap: 4px; }
  .animals-replay { width: 62px; height: 62px; }
  .animals-replay svg { width: 28px; height: 28px; }
  .animals-replay-label { font-size: 9px; }
  .animals-figure { max-height: 19vh; }
  .animals-footer { grid-row: 3; min-width: 0; min-height: 61px; }
  .animals-collection { height: 37px; }
  .animals-keepsake { width: 34px; height: 34px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .animals-scene { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 24px; gap: 4px 18px; }
  .animals-listen { grid-column: 1; grid-row: 1; }
  .animals-ground { grid-column: 2; grid-row: 1; height: 100%; align-items: center; gap: 8px; }
  .animals-figure { max-height: 21vh; }
  .animals-animal { width: 130px; flex-basis: 130px; padding: 0; }
  .animals-name { font-size: 12px; }
  .animals-key { font-size: 10px; }
  .animals-replay { width: 64px; height: 64px; }
  .animals-replay svg { width: 28px; height: 28px; }
  .animals-replay-label { font-size: 9px; }
  .animals-footer { grid-column: 1 / -1; grid-row: 2; min-height: 0; }
  .animals-collection { display: none; }
  .animals-status { font-size: 11px; }
  .animals-scene[data-mode=explore] .animals-ground { grid-column: 1 / -1; }
  .animals-scene.is-muted { grid-template-columns: minmax(0, 1fr) 170px; }
  .animals-scene.is-muted .animals-ground { grid-column: 1; }
  .animals-scene.is-muted .animals-silent { grid-column: 2; grid-row: 1 / -1; gap: 5px; }
  .animals-scene.is-muted .animals-status { font-size: 10px; }
  .animals-silent p { font-size: 11px; }
}

@media (max-height: 520px) and (orientation: landscape) { .animals-greeting { bottom: 15px; padding: 0 8px; font-size: 12px; } }
