.milo-games {
  position: relative;
  isolation: isolate;
  width: min(1180px, calc(100% - 40px));
  margin: clamp(40px, 7vw, 92px) auto;
  padding: clamp(26px, 4.4vw, 62px);
  color: #173e5b;
  background: radial-gradient(ellipse at 85% 0%, #ffdba3, transparent 55%),
              linear-gradient(135deg, #fffbeb, #fff1ca 60%, #ffefc9);
  border-radius: 60px 82px 58px 84px / 62px 56px 80px 52px;
  scroll-margin-top: 84px;
}
.milo-game-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.milo-games-layout {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  grid-template-areas: "heading covers" "actions covers";
  grid-template-rows: 1fr auto;
  align-items: start;
  gap: 20px clamp(22px, 3.5vw, 54px);
}
.milo-games-heading { grid-area: heading; align-self: end; }
.milo-games-heading > p:first-child {
  margin: 0 0 8px;
  font: 900 .85rem/1.4 Nunito, ui-rounded, system-ui, sans-serif;
  letter-spacing: .07em;
  color: #21658b;
}
.milo-games-heading h2 {
  margin: 0 0 14px;
  max-width: 10.5ch;
  font: 900 clamp(2.6rem, 4.4vw, 4.1rem)/.99 Nunito, ui-rounded, system-ui, sans-serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.milo-games-heading > p:last-child, .milo-game-help p {
  margin: 0; max-width: 38ch; font: 500 1rem/1.55 Inter, system-ui, sans-serif; color: #354f60;
}
.milo-game-covers {
  grid-area: covers;
  display: grid;
  grid-template: repeat(2, minmax(0, 1fr)) / minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(9px, 1.1vw, 15px);
  width: 100%;
  align-self: center;
}
.milo-game-cover {
  --card: #ffe18a;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 5px;
  text-decoration: none;
  border: 2px solid #fffaf0;
  border-radius: 26px;
  background: var(--card);
  color: #16364d;
  box-shadow: 0 4px 0 #78501d28, 0 5px 14px #916e2d24;
  transition: transform .18s ease, box-shadow .18s ease;
}
.milo-game-blocks { grid-row: 1 / 3; transform: rotate(-1.6deg); }
.milo-game-trail { --card: #ffd3be; transform: rotate(1.3deg); }
.milo-game-park { --card: #c7ead7; transform: rotate(-.7deg); }
.milo-game-scene {
  position: relative; isolation: isolate; overflow: hidden; flex: 1;
  border-radius: 19px; min-width: 0; min-height: 0;
}
.milo-game-scene img { display: block; }
.milo-game-blocks .milo-game-scene { background: #142b4e; }
.milo-game-blocks .milo-game-scene img { width: 100%; height: 100%; object-fit: contain; }
.milo-game-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.milo-game-trail .milo-game-backdrop { object-position: 36% center; }
.milo-game-park .milo-game-backdrop { object-position: center 54%; }
.milo-running, .romeo-waving, .milo-cuddle { position: absolute; object-fit: contain; bottom: 2%; filter: drop-shadow(0 2px 1px #20394b66); }
.milo-running { height: 77%; width: 52%; left: 5%; }
.romeo-waving { height: 44%; width: 26%; right: 10%; }
.milo-cuddle { height: 94%; width: 78%; left: 11%; }
.milo-game-caption {
  display: flex; justify-content: space-between; align-items: center;
  gap: 5px; padding: 8px 6px 4px;
  font: 900 clamp(.92rem, 1.26vw, 1.15rem)/1.15 Nunito, ui-rounded, system-ui, sans-serif;
}
.milo-game-caption::after {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fffaf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 9 6-9 6z' fill='%231a4c65'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.milo-games-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: flex-start; align-self: start; gap: 12px 9px; }
.milo-game-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 49px;
  padding: 10px 17px; border-radius: 999px; border: 2px solid #4aa4d2;
  background: #87d6ff; color: #103c59; box-shadow: 0 3px 0 #398cb7;
  text-decoration: none; font: 900 1rem/1.2 Nunito, ui-rounded, system-ui, sans-serif;
}
.milo-game-install { background: #c5ebff; }
.milo-game-button svg { width: 22px; height: 22px; flex: none; fill: currentColor; transform: rotate(-12deg); }
.milo-game-install svg { transform: rotate(12deg); }
.milo-game-button:hover { background-color: #aee4ff; }
.milo-game-cover:focus-visible, .milo-game-button:focus-visible, .milo-game-help summary:focus-visible {
  outline: 3px solid #075684; outline-offset: 4px;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .milo-game-cover:hover { transform: translateY(-4px); box-shadow: 0 7px 14px #916e2d38; }
}
.milo-game-help { flex-basis: 100%; margin-top: 6px; color: #31566c; }
.milo-game-help summary { width: fit-content; cursor: pointer; font: 700 .9rem/1.6 Nunito, ui-rounded, system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.milo-game-help p { font-size: .9rem; margin: 8px 0 0; }
@media (max-width: 780px) {
  .milo-games { width: min(620px, calc(100% - 24px)); padding: clamp(20px, 4.5vw, 32px); border-radius: 38px 48px 38px 42px; }
  .milo-games-layout { grid-template: "heading" auto "covers" auto "actions" auto / minmax(0, 1fr); gap: 18px; }
  .milo-games-heading h2 { max-width: none; font-size: clamp(2.1rem, 7vw, 3.2rem); }
  .milo-games-heading > p:last-child { max-width: 51ch; }
  .milo-games-actions { margin-top: 4px; }
}
@media (max-width: 460px) {
  .milo-games { padding: 24px 16px; }
  .milo-game-covers { gap: 8px; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); }
  .milo-game-cover { border-radius: 18px; padding: 3px; }
  .milo-game-scene { border-radius: 13px; }
  .milo-game-caption { padding: 5px 2px 3px; gap: 3px; font-size: .84rem; }
  .milo-game-caption::after { width: 18px; height: 18px; background-size: 14px; }
  .milo-game-button { padding-inline: 12px; font-size: .91rem; }
  .milo-game-button svg { width: 18px; height: 18px; }
}
