:root {
  --monkey-purple: #6b2fb8;
  --monkey-purple-dark: #472079;
  --monkey-pink: #f40c65;
  --monkey-lime: #a7e327;
  --monkey-cream: #fff7de;
}

.games-page {
  background: var(--paper);
}

.games-page .catalog-nav a[aria-current="page"] {
  color: var(--pink-text);
}

.games-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 64px;
  background:
    radial-gradient(circle at 8% 16%, rgba(167, 227, 39, 0.25), transparent 24rem),
    radial-gradient(circle at 90% 12%, rgba(244, 12, 101, 0.17), transparent 26rem),
    linear-gradient(155deg, #faf8ff 0%, #fffdf8 62%, #f4ffe2 100%);
}

.games-hero::before,
.games-hero::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.games-hero::before {
  width: 280px;
  height: 280px;
  top: 9%;
  right: -120px;
  border: 42px solid rgba(107, 47, 184, 0.08);
}

.games-hero::after {
  width: 150px;
  height: 150px;
  bottom: -80px;
  left: 8%;
  background: rgba(244, 12, 101, 0.07);
}

.games-hero .breadcrumbs,
.monkey-intro .breadcrumbs {
  position: relative;
  z-index: 2;
  margin-bottom: 26px;
}

.games-hero__grid {
  position: relative;
  z-index: 1;
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  align-items: center;
  gap: clamp(34px, 6vw, 84px);
}

.games-hero h1 {
  max-width: 760px;
  font-size: clamp(3.2rem, 7vw, 6rem);
}

.games-hero__lead {
  max-width: 690px;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.games-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.games-hero__facts {
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
}

.games-hero__facts li {
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--monkey-purple) 14%, var(--line));
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 750;
}

.games-hero__mascot {
  position: relative;
  height: 540px;
  display: grid;
  place-items: end center;
  border: 1px solid rgba(107, 47, 184, 0.12);
  border-radius: 45% 45% 34px 34px;
  background:
    radial-gradient(circle at 50% 39%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, rgba(107, 47, 184, 0.13), rgba(167, 227, 39, 0.19));
  box-shadow: 0 28px 70px rgba(71, 32, 121, 0.16);
  text-decoration: none;
}

.games-hero__mascot::after {
  position: absolute;
  width: 68%;
  height: 42px;
  bottom: 14px;
  border-radius: 50%;
  background: rgba(71, 32, 121, 0.15);
  filter: blur(6px);
  content: "";
}

.games-hero__mascot picture {
  position: relative;
  z-index: 1;
  height: 92%;
  display: grid;
  place-items: end center;
  transition: transform 220ms ease;
}

.games-hero__mascot:hover picture {
  transform: translateY(-8px) rotate(-1deg);
}

.games-hero__mascot img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.games-hero__bubble {
  position: absolute;
  z-index: 3;
  top: 34px;
  left: -28px;
  max-width: 190px;
  padding: 14px 18px;
  border-radius: 22px 22px 6px 22px;
  color: #fff;
  background: var(--monkey-purple);
  box-shadow: 0 10px 25px rgba(71, 32, 121, 0.25);
  font-weight: 850;
  line-height: 1.25;
  transform: rotate(-3deg);
}

.games-section {
  padding: 76px 0;
}

.games-section--soft {
  background:
    radial-gradient(circle at 95% 5%, rgba(167, 227, 39, 0.13), transparent 22rem),
    var(--paper-soft);
}

.games-section__heading {
  max-width: 760px;
  margin-bottom: 31px;
}

.games-section__heading h2 {
  margin-bottom: 13px;
}

.games-section__heading > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.game-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.game-card--featured {
  grid-column: 1 / -1;
}

.game-card__media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: grid;
  place-items: end center;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.92), transparent 38%),
    linear-gradient(160deg, rgba(107, 47, 184, 0.2), rgba(167, 227, 39, 0.28));
}

.game-card__media picture,
.game-card__media img {
  height: 95%;
  width: auto;
}

.game-card__media img {
  object-fit: contain;
  object-position: bottom;
  transition: transform 200ms ease;
}

.game-card__media:hover img {
  transform: scale(1.025) translateY(-4px);
}

.game-card__tag {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--monkey-pink);
  font-size: 0.82rem;
  font-weight: 850;
}

.game-card__body {
  align-self: center;
  padding: clamp(28px, 5vw, 58px);
}

.game-card__body h2 {
  margin-bottom: 15px;
}

.game-card__body h2 a {
  text-decoration: none;
}

.game-card__body > p:not(.eyebrow) {
  max-width: 580px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 21px 0 25px;
}

.game-card__meta span {
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--monkey-purple-dark);
  background: color-mix(in srgb, var(--monkey-purple) 10%, var(--paper));
  font-size: 0.82rem;
  font-weight: 750;
}

.games-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.games-info-grid article {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(31, 40, 69, 0.06);
}

.games-info-grid article > span {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: color-mix(in srgb, var(--monkey-lime) 24%, var(--paper));
  font-size: 1.65rem;
}

.games-info-grid h3 {
  margin-bottom: 9px;
}

.games-info-grid p,
.games-copy p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.games-copy {
  max-width: 880px;
}

.games-copy p + p {
  margin-top: 16px;
}

.talking-monkey-promo {
  padding: 66px 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(244, 12, 101, 0.14), transparent 22rem),
    linear-gradient(145deg, color-mix(in srgb, var(--monkey-purple) 8%, var(--paper)), color-mix(in srgb, var(--monkey-lime) 13%, var(--paper)));
}

.talking-monkey-promo__inner {
  min-height: 350px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.55fr);
  align-items: center;
  gap: 30px;
  padding: clamp(30px, 6vw, 64px);
  border: 1px solid rgba(107, 47, 184, 0.14);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.talking-monkey-promo__copy > p:not(.eyebrow) {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.talking-monkey-promo__picture {
  height: 330px;
  display: grid;
  place-items: end center;
}

.talking-monkey-promo__picture img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.monkey-intro {
  position: relative;
  overflow: hidden;
  padding: 32px 0 72px;
  background:
    radial-gradient(circle at 5% 8%, rgba(167, 227, 39, 0.18), transparent 24rem),
    radial-gradient(circle at 98% 20%, rgba(244, 12, 101, 0.14), transparent 26rem),
    linear-gradient(180deg, #faf8ff, var(--paper));
}

.monkey-intro__heading {
  margin-bottom: 27px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.monkey-intro__heading h1 {
  margin-bottom: 12px;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
}

.monkey-intro__heading p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.13rem;
}

.monkey-intro__age {
  flex: 0 0 auto;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--monkey-purple-dark);
  background: color-mix(in srgb, var(--monkey-lime) 36%, #fff);
  font-weight: 850;
}

.monkey-game {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  border: 1px solid rgba(107, 47, 184, 0.15);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(71, 32, 121, 0.17);
}

.monkey-game__stage-wrap {
  min-width: 0;
  padding: 18px;
  background: #e9dcff;
}

.monkey-game__topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 12px;
}

.monkey-game__friendship {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--monkey-purple-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.monkey-game__friendship strong {
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--monkey-purple);
  text-align: center;
}

.monkey-game__sound {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(71, 32, 121, 0.12);
  font-size: 1.16rem;
}

.monkey-stage {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.94), transparent 37%),
    linear-gradient(180deg, #dac7ff 0%, #f4eaff 58%, #d7f397 58%, #a8db54 100%);
  isolation: isolate;
}

.monkey-stage::before,
.monkey-stage::after {
  position: absolute;
  bottom: 13%;
  width: 190px;
  height: 270px;
  border-radius: 75% 10% 65% 20%;
  background: rgba(67, 138, 48, 0.16);
  content: "";
}

.monkey-stage::before {
  left: -90px;
  transform: rotate(24deg);
}

.monkey-stage::after {
  right: -96px;
  transform: rotate(-30deg) scaleX(-1);
}

.monkey-stage__sun {
  position: absolute;
  width: 114px;
  height: 114px;
  top: 54px;
  right: 8%;
  border-radius: 50%;
  background: rgba(255, 238, 126, 0.82);
  box-shadow: 0 0 0 22px rgba(255, 238, 126, 0.17);
}

.monkey-stage__leaf {
  position: absolute;
  z-index: 0;
  color: #73b536;
  font-size: 14rem;
  line-height: 1;
  opacity: 0.27;
  transform: scaleX(0.45) rotate(24deg);
}

.monkey-stage__leaf--one {
  bottom: 4%;
  left: -5%;
}

.monkey-stage__leaf--two {
  right: -7%;
  bottom: 9%;
  transform: scaleX(0.4) rotate(-21deg);
}

.monkey-speech {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: 24px;
  max-width: min(290px, calc(100% - 48px));
  padding: 13px 17px;
  border-radius: 20px 20px 20px 6px;
  color: var(--monkey-purple-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(71, 32, 121, 0.14);
  font-weight: 850;
  line-height: 1.32;
  transform-origin: bottom left;
  pointer-events: none;
}

.monkey-speech.is-pop {
  animation: monkey-bubble-pop 380ms cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

.monkey-character {
  position: absolute;
  z-index: 2;
  width: min(76%, 510px);
  height: 82%;
  left: 50%;
  bottom: 7%;
  user-select: none;
  transform: translateX(-50%);
  transform-origin: 50% 82%;
  will-change: transform;
}

.monkey-character picture,
.monkey-character img {
  width: 100%;
  height: 100%;
}

.monkey-character img {
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  filter: drop-shadow(0 18px 15px rgba(71, 32, 60, 0.2));
}

.monkey-character.is-happy {
  animation: monkey-happy 700ms ease;
}

.monkey-character.is-tickle {
  animation: monkey-tickle 700ms ease;
}

.monkey-character.is-jump {
  animation: monkey-jump 760ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.monkey-character.is-eating {
  animation: monkey-eat 900ms ease;
}

.monkey-character.is-listening {
  animation: monkey-listen 1s ease-in-out infinite;
}

.monkey-character.is-talking {
  animation: monkey-talk 260ms ease-in-out infinite alternate;
}

.monkey-zone {
  position: absolute;
  z-index: 4;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  touch-action: manipulation;
}

.monkey-zone--head {
  width: 72%;
  height: 42%;
  top: 1%;
  left: 14%;
}

.monkey-zone--belly {
  width: 49%;
  height: 34%;
  top: 41%;
  left: 25.5%;
}

.monkey-zone--feet {
  width: 86%;
  height: 24%;
  bottom: 0;
  left: 7%;
}

.monkey-zone:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: -5px;
}

.monkey-stage__ground {
  position: absolute;
  z-index: 1;
  width: 58%;
  height: 48px;
  left: 21%;
  bottom: 5%;
  border-radius: 50%;
  background: rgba(50, 90, 27, 0.23);
  filter: blur(4px);
}

.monkey-stage__hint {
  position: absolute;
  z-index: 6;
  right: 16px;
  bottom: 14px;
  margin: 0;
  padding: 7px 11px;
  border-radius: 999px;
  color: #31571e;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 750;
  pointer-events: none;
}

.monkey-stage__sparkles {
  position: absolute;
  z-index: 7;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.monkey-sparkle {
  position: absolute;
  left: var(--sparkle-x, 50%);
  top: var(--sparkle-y, 50%);
  color: var(--sparkle-color, #fff);
  font-size: var(--sparkle-size, 1.4rem);
  text-shadow: 0 3px 10px rgba(71, 32, 121, 0.22);
  animation: monkey-sparkle 900ms ease-out forwards;
}

.monkey-panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(167, 227, 39, 0.11), transparent 16rem),
    var(--paper);
}

.monkey-panel__section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--paper-soft) 58%, var(--paper));
}

.monkey-panel__section--small {
  padding-block: 18px;
}

.monkey-panel__heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.monkey-panel__heading h2 {
  margin: 0 0 3px;
  font-size: 1.4rem;
}

.monkey-panel__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.monkey-panel__icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--monkey-lime) 28%, var(--paper));
  font-size: 1.4rem;
}

.monkey-talk-button {
  position: relative;
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--monkey-pink), #c80d72);
  box-shadow: 0 12px 28px rgba(244, 12, 101, 0.24);
  cursor: pointer;
  font-size: 1.03rem;
  font-weight: 850;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.monkey-talk-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(244, 12, 101, 0.3);
}

.monkey-talk-button__icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #fff;
  font-size: 0;
}

.monkey-talk-button__time {
  min-width: 26px;
  font-variant-numeric: tabular-nums;
}

.monkey-talk-button.is-recording {
  background: linear-gradient(135deg, #9d134f, #68113b);
}

.monkey-talk-button.is-recording .monkey-talk-button__icon {
  border-radius: 5px;
  animation: monkey-record-pulse 850ms ease-in-out infinite;
}

.monkey-talk-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
}

.monkey-replay-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 2px solid color-mix(in srgb, var(--monkey-purple) 25%, var(--line));
  border-radius: 15px;
  color: var(--monkey-purple-dark);
  background: var(--paper);
  cursor: pointer;
  font-weight: 800;
}

.monkey-status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.87rem;
  font-weight: 700;
}

.monkey-status.is-error {
  color: #a30f3e;
}

.monkey-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.monkey-privacy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.42;
}

.monkey-snacks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.monkey-snacks button {
  min-width: 0;
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink-soft);
  background: var(--paper);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.monkey-snacks button:hover {
  border-color: var(--monkey-lime);
  background: color-mix(in srgb, var(--monkey-lime) 10%, var(--paper));
  transform: translateY(-3px);
}

.monkey-snacks button > span {
  font-size: 2rem;
}

.monkey-snacks strong {
  overflow: hidden;
  font-size: 0.79rem;
  text-overflow: ellipsis;
}

.monkey-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.monkey-more-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--monkey-purple-dark);
  background: color-mix(in srgb, var(--monkey-purple) 9%, var(--paper));
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.monkey-noscript {
  grid-column: 1 / -1;
  margin: 0;
  padding: 15px 20px;
  color: #6f3900;
  background: #fff2bf;
  text-align: center;
  font-weight: 750;
}

.games-parent-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.games-parent-note > div {
  max-width: 760px;
}

.games-parent-note h2 {
  margin-bottom: 12px;
}

.games-parent-note p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

@keyframes monkey-happy {
  0%, 100% { transform: translateX(-50%) rotate(0); }
  25% { transform: translateX(-50%) rotate(-4deg) scale(1.025); }
  50% { transform: translateX(-50%) rotate(4deg) scale(1.04); }
  75% { transform: translateX(-50%) rotate(-2deg) scale(1.02); }
}

@keyframes monkey-tickle {
  0%, 100% { transform: translateX(-50%); }
  20% { transform: translateX(calc(-50% - 10px)) rotate(-2deg); }
  40% { transform: translateX(calc(-50% + 10px)) rotate(2deg); }
  60% { transform: translateX(calc(-50% - 8px)) rotate(-1.5deg); }
  80% { transform: translateX(calc(-50% + 7px)) rotate(1.5deg); }
}

@keyframes monkey-jump {
  0%, 100% { transform: translateX(-50%) translateY(0) scaleY(1); }
  18% { transform: translateX(-50%) translateY(8px) scaleY(0.96); }
  45% { transform: translateX(-50%) translateY(-55px) rotate(2deg); }
  70% { transform: translateX(-50%) translateY(0) scaleY(0.96); }
  84% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes monkey-eat {
  0%, 100% { transform: translateX(-50%); }
  25% { transform: translateX(-50%) rotate(-2deg) scale(1.02); }
  50% { transform: translateX(-50%) rotate(2deg) scale(0.985); }
  75% { transform: translateX(-50%) rotate(-1deg) scale(1.02); }
}

@keyframes monkey-listen {
  0%, 100% { transform: translateX(-50%) rotate(-1deg); }
  50% { transform: translateX(-50%) rotate(1deg) scale(1.01); }
}

@keyframes monkey-talk {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.018) translateY(-2px); }
}

@keyframes monkey-bubble-pop {
  0% { opacity: 0.4; transform: scale(0.8) rotate(-4deg); }
  70% { transform: scale(1.05) rotate(1deg); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes monkey-record-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.74); }
}

@keyframes monkey-sparkle {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.4) rotate(0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(1.25) rotate(120deg); }
}

@media (max-width: 980px) {
  .games-hero__grid,
  .monkey-game {
    grid-template-columns: 1fr;
  }

  .games-hero__grid {
    min-height: 0;
  }

  .games-hero__mascot {
    width: min(520px, 100%);
    justify-self: center;
  }

  .game-card {
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  }

  .monkey-game__stage-wrap {
    padding: 16px;
  }

  .monkey-stage {
    min-height: min(720px, 92svh);
  }

  .monkey-character {
    width: min(70%, 500px);
  }
}

@media (max-width: 720px) {
  .games-hero,
  .monkey-intro {
    padding-top: 22px;
  }

  .games-hero {
    padding-bottom: 48px;
  }

  .games-hero__grid {
    gap: 34px;
  }

  .games-hero h1,
  .monkey-intro__heading h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .games-hero__mascot {
    height: 460px;
  }

  .games-hero__bubble {
    top: 22px;
    left: 14px;
  }

  .games-section {
    padding: 58px 0;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .game-card__media {
    min-height: 380px;
  }

  .games-info-grid {
    grid-template-columns: 1fr;
  }

  .talking-monkey-promo__inner {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .talking-monkey-promo__picture {
    height: 290px;
  }

  .monkey-intro__heading {
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }

  .monkey-game {
    border-radius: 25px;
  }

  .monkey-game__stage-wrap {
    padding: 10px;
  }

  .monkey-stage {
    min-height: clamp(500px, 118vw, 650px);
    border-radius: 21px;
  }

  .monkey-character {
    width: min(82%, 470px);
    height: 79%;
    bottom: 8%;
  }

  .monkey-speech {
    top: 15px;
    left: 15px;
    max-width: calc(100% - 30px);
    padding: 11px 14px;
    font-size: 0.88rem;
  }

  .monkey-stage__hint {
    right: 9px;
    bottom: 8px;
    font-size: 0.7rem;
  }

  .monkey-panel {
    padding: 18px 14px 24px;
  }

  .monkey-panel__section {
    padding: 18px;
  }

  .games-parent-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .games-page .main-nav {
    gap: 1px;
  }

  .games-page .main-nav a {
    padding-inline: 8px;
    font-size: 0.8rem;
  }

  .games-page .main-nav__search {
    display: none;
  }

  .games-hero__actions .button {
    width: 100%;
  }

  .games-hero__mascot {
    height: 400px;
  }

  .game-card__media {
    min-height: 340px;
  }

  .monkey-stage {
    min-height: max(480px, 125vw);
  }

  .monkey-stage__hint {
    max-width: calc(100% - 18px);
    left: 9px;
    right: auto;
    text-align: center;
  }

  .monkey-panel__heading {
    align-items: flex-start;
  }

  .monkey-snacks button {
    min-height: 86px;
  }

  .monkey-snacks strong {
    font-size: 0.7rem;
  }
}

@media print {
  .monkey-game,
  .games-hero__actions,
  .games-hero__facts {
    break-inside: avoid;
  }

  .monkey-zone,
  .monkey-panel,
  .monkey-game__sound {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .monkey-character,
  .monkey-speech,
  .monkey-sparkle,
  .games-hero__mascot picture {
    animation: none !important;
    transition: none !important;
  }
}

/* Monkey Park virtual pet — enhanced game layer (games-1.1.0). */
.monkey-quick-start {
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.monkey-quick-start li {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(107, 47, 184, 0.12);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 20px rgba(71, 32, 121, 0.06);
}

.monkey-quick-start li > span {
  width: 38px;
  height: 38px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--monkey-purple);
  font-weight: 900;
}

.monkey-quick-start strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.monkey-quick-start small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monkey-game__top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.monkey-game__friendship small {
  max-width: 116px;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monkey-game__sound,
.monkey-game__focus {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: var(--monkey-purple-dark);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 16px rgba(71, 32, 121, 0.12);
  cursor: pointer;
}

.monkey-game__sound:hover,
.monkey-game__focus:hover {
  background: #fff;
  transform: translateY(-1px);
}

.monkey-game__focus {
  min-width: 104px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 850;
}

.monkey-game__focus > span {
  font-size: 1.15rem;
}

.monkey-game__focus small {
  font-size: 0.74rem;
}

.monkey-needs {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.monkey-need {
  min-width: 0;
  padding: 9px 10px 10px;
  border: 1px solid rgba(71, 32, 121, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.monkey-need > div {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--monkey-purple-dark);
}

.monkey-need strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.69rem;
  text-overflow: ellipsis;
}

.monkey-need output {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.monkey-need__bar {
  height: 7px;
  overflow: hidden;
  display: block;
  border-radius: 999px;
  background: rgba(71, 32, 121, 0.1);
}

.monkey-need__bar i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--monkey-lime);
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1), background 200ms ease;
}

.monkey-need--mood .monkey-need__bar i {
  background: linear-gradient(90deg, #f40c65, #ff7ba6);
}

.monkey-need--fullness .monkey-need__bar i {
  background: linear-gradient(90deg, #e9a516, #ffd356);
}

.monkey-need--energy .monkey-need__bar i {
  background: linear-gradient(90deg, #6cbd31, #a7e327);
}

.monkey-game.is-hungry .monkey-need--fullness,
.monkey-game.is-tired .monkey-need--energy,
.monkey-game.is-low-mood .monkey-need--mood {
  outline: 2px solid rgba(244, 12, 101, 0.32);
  background: #fff8dc;
}

.monkey-stage {
  min-height: 720px;
}

.monkey-character {
  height: 76%;
  bottom: 13%;
}

.monkey-character picture {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 1;
  transition: opacity 140ms ease, filter 180ms ease;
}

.monkey-character picture img {
  animation: monkey-breathe 3.1s ease-in-out infinite;
}

.monkey-reaction-sprite {
  position: absolute;
  z-index: 1;
  width: auto;
  height: 100%;
  top: 0;
  right: auto;
  bottom: 0;
  left: 50%;
  aspect-ratio: 518 / 759;
  display: block;
  opacity: 0;
  background-image: url("/assets/images/games/monkey-park/monkey-reactions-v1.png");
  background-image: image-set(
    url("/assets/images/games/monkey-park/monkey-reactions-v1.webp") type("image/webp"),
    url("/assets/images/games/monkey-park/monkey-reactions-v1.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 200% 200%;
  filter: drop-shadow(0 18px 15px rgba(71, 32, 60, 0.2));
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 140ms ease;
}

.monkey-character:is(.is-petted, .is-eating, .is-listening, .is-talking, .is-tickle) picture {
  opacity: 0;
}

.monkey-character:is(.is-petted, .is-eating, .is-listening, .is-talking, .is-tickle) .monkey-reaction-sprite {
  opacity: 1;
}

.monkey-character.is-petted .monkey-reaction-sprite {
  background-position: left top;
}

.monkey-character.is-eating .monkey-reaction-sprite {
  background-position: right top;
}

.monkey-character.is-listening .monkey-reaction-sprite {
  background-position: left bottom;
}

.monkey-character:is(.is-talking, .is-tickle) .monkey-reaction-sprite {
  background-position: right bottom;
}

.monkey-character.is-sleeping picture {
  opacity: 0.82;
  filter: saturate(0.8);
}

.monkey-character.is-sleeping {
  animation: monkey-sleep 2.1s ease-in-out;
}

.monkey-character.is-highfive,
.monkey-character.is-idle-wave {
  animation: monkey-highfive 780ms cubic-bezier(0.25, 1.25, 0.5, 1);
}

.monkey-zone {
  color: var(--monkey-purple-dark);
  -webkit-tap-highlight-color: transparent;
}

.monkey-zone--head {
  touch-action: none;
}

.monkey-zone--hand {
  width: 31%;
  height: 31%;
  top: 43%;
  right: 1%;
}

.monkey-zone > span,
.monkey-zone > small {
  position: absolute;
  z-index: 2;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.monkey-zone > span {
  width: 32px;
  height: 32px;
  bottom: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 16px rgba(71, 32, 121, 0.18);
}

.monkey-zone > small {
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(71, 32, 121, 0.9);
  font-size: 0.63rem;
  font-weight: 850;
  white-space: nowrap;
}

.monkey-game.is-guided .monkey-zone > span,
.monkey-game.is-guided .monkey-zone > small,
.monkey-zone:hover > span,
.monkey-zone:hover > small,
.monkey-zone:focus-visible > span,
.monkey-zone:focus-visible > small {
  opacity: 1;
  transform: translate(-50%, 0);
}

.monkey-zone--head > span,
.monkey-zone--head > small {
  left: 24%;
}

.monkey-zone--belly > span,
.monkey-zone--belly > small {
  left: 34%;
}

.monkey-zone--feet > span,
.monkey-zone--feet > small {
  left: 72%;
}

.monkey-emote {
  position: absolute;
  z-index: 9;
  top: 21%;
  right: 12%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(71, 32, 121, 0.16);
  font-size: 2.2rem;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.45) rotate(-12deg);
}

.monkey-emote.is-visible {
  animation: monkey-emote-pop 1.3s ease forwards;
}

.monkey-pet-progress {
  --pet-progress: 0%;
  position: absolute;
  z-index: 10;
  width: min(260px, calc(100% - 32px));
  left: 50%;
  bottom: 105px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px;
  color: var(--monkey-purple-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(71, 32, 121, 0.16);
  transform: translateX(-50%);
}

.monkey-pet-progress[hidden],
.monkey-care-reward[hidden],
.monkey-replay-button[hidden] {
  display: none !important;
}

.monkey-pet-progress strong {
  font-size: 0.77rem;
}

.monkey-pet-progress i {
  height: 6px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 12, 101, 0.12);
}

.monkey-pet-progress i::after {
  width: var(--pet-progress);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--monkey-pink), #ff72a8);
  content: "";
  transition: width 100ms linear;
}

.monkey-pet-heart {
  position: absolute;
  z-index: 9;
  font-size: 1.35rem;
  pointer-events: none;
  animation: monkey-pet-heart 900ms ease-out forwards;
}

.monkey-action-dock {
  position: absolute;
  z-index: 12;
  right: 13px;
  bottom: 13px;
  left: 13px;
  min-height: 76px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(54px, 0.72fr)) minmax(132px, 1.65fr);
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 36px rgba(71, 32, 121, 0.18);
  backdrop-filter: blur(12px);
}

.monkey-action-dock > button {
  min-width: 0;
  min-height: 58px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 15px;
  color: var(--monkey-purple-dark);
  background: #fff;
  box-shadow: 0 3px 10px rgba(71, 32, 121, 0.08);
  cursor: pointer;
  font-weight: 850;
  -webkit-tap-highlight-color: transparent;
}

.monkey-action-dock > button:not(.monkey-talk-button):hover {
  background: #f8ffe9;
  transform: translateY(-2px);
}

.monkey-action-dock > button > span:first-child {
  font-size: 1.45rem;
}

.monkey-action-dock > button > small {
  font-size: 0.68rem;
}

.monkey-action-dock .monkey-talk-button {
  width: auto;
  min-height: 58px;
  color: #fff;
  background: linear-gradient(135deg, var(--monkey-pink), #c80d72);
  box-shadow: 0 8px 20px rgba(244, 12, 101, 0.24);
  font-size: 0.86rem;
}

.monkey-action-dock .monkey-talk-button__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-width: 2px;
}

.monkey-action-dock .monkey-talk-button.is-processing::after {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: monkey-spin 700ms linear infinite;
  content: "";
}

.monkey-stage__hint {
  right: 16px;
  bottom: 103px;
  left: 16px;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  text-align: center;
  transition: opacity 250ms ease, transform 250ms ease;
}

.monkey-game:not(.is-guided) .monkey-stage__hint {
  opacity: 0;
  transform: translateY(4px);
}

.monkey-flying-snack {
  position: absolute;
  z-index: 15;
  font-size: 2.7rem;
  line-height: 1;
  pointer-events: none;
  animation: monkey-snack-fly 720ms cubic-bezier(0.2, 0.75, 0.35, 1) forwards;
}

.monkey-care-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  list-style: none;
}

.monkey-care-list li {
  min-width: 0;
  padding: 10px 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-soft);
  background: var(--paper);
}

.monkey-care-list strong {
  overflow: hidden;
  font-size: 0.7rem;
  text-overflow: ellipsis;
}

.monkey-care-list i {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.monkey-care-list li.is-done {
  border-color: rgba(105, 176, 38, 0.38);
  color: #31571e;
  background: #f3ffdc;
}

.monkey-care-list li.is-done i {
  color: #579b21;
}

.monkey-care-reward {
  margin-top: 9px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  border-radius: 13px;
  color: #5d4200;
  background: linear-gradient(135deg, #fff3ad, #fff9d8);
}

.monkey-care-reward > span {
  grid-row: 1 / 3;
  font-size: 1.55rem;
}

.monkey-care-reward small {
  font-size: 0.68rem;
}

.monkey-rest-button {
  width: 100%;
  min-height: 44px;
  margin-top: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(107, 47, 184, 0.16);
  border-radius: 13px;
  color: var(--monkey-purple-dark);
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.monkey-voice-presets {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.monkey-voice-presets legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.monkey-voice-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.monkey-voice-presets legend {
  grid-column: 1 / -1;
}

.monkey-voice-presets label {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 8px 4px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.monkey-voice-presets input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.monkey-voice-presets label:has(input:checked) {
  border-color: var(--monkey-purple);
  outline: 2px solid rgba(107, 47, 184, 0.13);
  color: var(--monkey-purple-dark);
  background: #f4ecff;
}

.monkey-voice-presets label.is-selected {
  border-color: var(--monkey-purple);
  outline: 2px solid rgba(107, 47, 184, 0.13);
  color: var(--monkey-purple-dark);
  background: #f4ecff;
}

.monkey-voice-presets label:has(input:focus-visible) {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.monkey-voice-presets input:focus + span,
.monkey-voice-presets input:focus-visible + span {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 8px;
}

.monkey-voice-presets label > span {
  font-size: 1.25rem;
}

.monkey-voice-presets label > strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
}

.monkey-voice-wave {
  height: 38px;
  margin: 11px 0 4px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 13px;
  background: rgba(107, 47, 184, 0.07);
}

.monkey-voice-wave i {
  width: 5px;
  height: 10%;
  border-radius: 999px;
  background: var(--monkey-purple);
  transition: height 75ms linear;
}

.monkey-voice-wave.is-active {
  background: rgba(244, 12, 101, 0.08);
}

.monkey-voice-wave.is-active i {
  background: var(--monkey-pink);
}

.monkey-replay-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.monkey-game :is(button, a, input):focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.monkey-game.is-voice-busy .monkey-zone,
.monkey-game.is-voice-busy .monkey-action-dock > button:not(.monkey-talk-button),
.monkey-game.is-voice-busy .monkey-rest-button {
  opacity: 0.58;
}

body.has-monkey-focus {
  overflow: hidden;
}

.monkey-game.is-focus-mode,
.monkey-game:fullscreen {
  position: fixed;
  z-index: 10000;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, 0.7fr);
  border: 0;
  border-radius: 0;
  background: #e9dcff;
}

.monkey-game.is-focus-mode .monkey-game__stage-wrap,
.monkey-game:fullscreen .monkey-game__stage-wrap {
  box-sizing: border-box;
  height: 100dvh;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-right: max(18px, env(safe-area-inset-right));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  padding-left: max(18px, env(safe-area-inset-left));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.monkey-game.is-focus-mode .monkey-stage,
.monkey-game:fullscreen .monkey-stage {
  height: auto;
  min-height: 0;
}

.monkey-game.is-focus-mode .monkey-action-dock,
.monkey-game:fullscreen .monkey-action-dock {
  right: max(13px, env(safe-area-inset-right));
  bottom: max(13px, env(safe-area-inset-bottom));
  left: max(13px, env(safe-area-inset-left));
}

.monkey-game.is-focus-mode .monkey-panel,
.monkey-game:fullscreen .monkey-panel {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@keyframes monkey-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.006); }
}

@keyframes monkey-highfive {
  0%, 100% { transform: translateX(-50%) rotate(0) scale(1); }
  38% { transform: translateX(-50%) rotate(-3deg) scale(1.04) translateY(-12px); }
  68% { transform: translateX(-50%) rotate(2deg) scale(1.015); }
}

@keyframes monkey-sleep {
  0%, 100% { transform: translateX(-50%) rotate(0) scaleY(1); }
  38% { transform: translateX(-50%) rotate(-2deg) scaleY(0.975) translateY(7px); }
  68% { transform: translateX(-50%) rotate(1deg) scaleY(0.985) translateY(4px); }
}

@keyframes monkey-emote-pop {
  0% { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  18%, 70% { opacity: 1; transform: scale(1.05) rotate(3deg); }
  100% { opacity: 0; transform: scale(0.72) translateY(-18px); }
}

@keyframes monkey-pet-heart {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.4) rotate(-8deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1.25) rotate(12deg); }
}

@keyframes monkey-snack-fly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(-20deg); }
  15% { opacity: 1; }
  72% { opacity: 1; transform: translate(calc(-50% + var(--snack-x)), calc(-50% + var(--snack-y) - 46px)) scale(1.12) rotate(18deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--snack-x)), calc(-50% + var(--snack-y))) scale(0.35) rotate(30deg); }
}

@keyframes monkey-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  .monkey-care-list {
    grid-template-columns: 1fr;
  }

  .monkey-panel {
    padding: 24px;
  }
}

@media (max-width: 980px) {
  .monkey-game.is-focus-mode,
  .monkey-game:fullscreen {
    overflow-y: auto;
    grid-template-columns: 1fr;
  }

  .monkey-game.is-focus-mode .monkey-game__stage-wrap,
  .monkey-game:fullscreen .monkey-game__stage-wrap {
    height: 100dvh;
    min-height: 100dvh;
  }

  .monkey-game.is-focus-mode .monkey-stage,
  .monkey-game:fullscreen .monkey-stage {
    height: auto;
    min-height: 0;
  }

  .monkey-game.is-focus-mode .monkey-panel,
  .monkey-game:fullscreen .monkey-panel {
    height: auto;
    overflow: visible;
  }

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

@media (max-width: 720px) {
  .monkey-quick-start {
    grid-template-columns: 1fr;
  }

  .monkey-quick-start li {
    padding-block: 10px;
  }

  .monkey-stage {
    min-height: clamp(540px, 132vw, 690px);
  }

  .monkey-character {
    width: min(88%, 480px);
    height: 73%;
    bottom: 15%;
  }

  .monkey-game__focus {
    min-width: 44px;
    padding: 0;
  }

  .monkey-game__focus small {
    display: none;
  }

  .monkey-game__friendship > span:nth-child(2) {
    display: none;
  }

  .monkey-action-dock {
    min-height: 70px;
    grid-template-columns: repeat(3, minmax(48px, 0.72fr)) minmax(104px, 1.42fr);
  }

  .monkey-action-dock > button {
    min-height: 53px;
    flex-direction: column;
    gap: 1px;
  }

  .monkey-action-dock .monkey-talk-button {
    flex-direction: row;
  }

  .monkey-stage__hint,
  .monkey-pet-progress {
    bottom: 94px;
  }
}

@media (max-width: 520px) {
  .monkey-game__topbar {
    gap: 7px;
  }

  .monkey-game__friendship {
    gap: 4px;
    font-size: 0.8rem;
  }

  .monkey-game__friendship small {
    display: none;
  }

  .monkey-needs {
    gap: 5px;
  }

  .monkey-need {
    padding: 7px;
  }

  .monkey-need > div {
    justify-content: space-between;
  }

  .monkey-need strong {
    display: none;
  }

  .monkey-stage {
    min-height: max(525px, 145vw);
  }

  .monkey-speech {
    max-width: calc(100% - 92px);
  }

  .monkey-emote {
    width: 55px;
    height: 55px;
    top: 15%;
    right: 7%;
    font-size: 1.65rem;
  }

  .monkey-character {
    width: 98%;
    height: 70%;
    bottom: 16%;
  }

  .monkey-action-dock {
    right: 7px;
    bottom: 7px;
    left: 7px;
    padding: 6px;
    gap: 4px;
    grid-template-columns: repeat(3, minmax(42px, 0.66fr)) minmax(91px, 1.36fr);
    border-radius: 17px;
  }

  .monkey-action-dock > button {
    min-height: 51px;
    padding-inline: 2px;
    border-radius: 12px;
  }

  .monkey-action-dock > button > small {
    font-size: 0.58rem;
  }

  .monkey-action-dock .monkey-talk-button {
    font-size: 0.72rem;
  }

  .monkey-action-dock .monkey-talk-button__time {
    display: none;
  }

  .monkey-stage__hint,
  .monkey-pet-progress {
    bottom: 84px;
  }

  .monkey-stage__hint {
    font-size: 0.63rem;
  }

  .monkey-care-list {
    grid-template-columns: 1fr;
  }
}

@media print {
  .monkey-needs,
  .monkey-action-dock,
  .monkey-game__focus,
  .monkey-quick-start {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .monkey-character picture img,
  .monkey-reaction-sprite,
  .monkey-emote,
  .monkey-pet-heart,
  .monkey-flying-snack,
  .monkey-talk-button__icon,
  .monkey-talk-button::after,
  .monkey-need__bar i,
  .monkey-voice-wave i {
    animation: none !important;
    transition: none !important;
  }

  .monkey-emote.is-visible {
    opacity: 1;
    transform: none;
  }

  .monkey-flying-snack {
    opacity: 1;
    transform: translate(calc(-50% + var(--snack-x)), calc(-50% + var(--snack-y)));
  }
}
