.site-shell {
  width: min(100%, 90rem);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.site-header {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--line);
}

.site-name {
  font-size: .875rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-decoration: none;
}

.heart-accent {
  color: var(--pink);
  font-size: 1.125rem;
  line-height: 1;
}

.intro {
  padding: clamp(1.5rem, 5vw, 3.75rem) 0 clamp(1.25rem, 3vw, 2rem);
}

.intro h1 {
  max-width: 8ch;
  margin: 0;
  font-family: "Arial Black", ui-rounded, system-ui, sans-serif;
  font-size: clamp(3.4rem, 15vw, 8.5rem);
  font-weight: 950;
  letter-spacing: -.075em;
  line-height: .78;
}

.intro p {
  margin: 1.25rem 0 0;
  font-size: clamp(.78rem, 2.4vw, 1rem);
  font-weight: 900;
  letter-spacing: .08em;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.game-card {
  min-width: 0;
  padding: clamp(1rem, 3.5vw, 1.5rem);
  border: 2px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
}

.card-top {
  display: grid;
  min-width: 0;
  grid-template-columns: clamp(5.5rem, 28vw, 8rem) minmax(0, 1fr);
  gap: clamp(.875rem, 3vw, 1.5rem);
  align-items: center;
}

.game-icon {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.game-copy {
  min-width: 0;
}

.game-copy h2 {
  margin: 0;
  font-family: "Arial Black", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.75rem, 8vw, 3.25rem);
  font-weight: 950;
  letter-spacing: -.055em;
  line-height: .92;
  overflow-wrap: anywhere;
}

.game-copy > p {
  max-width: 28ch;
  margin: .65rem 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
}

.game-tags {
  display: flex;
  margin: 0;
  padding: 0;
  gap: .9rem;
  list-style: none;
}

.game-tags li {
  position: relative;
  color: var(--ink);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .06em;
}

.game-tags li + li::before {
  position: absolute;
  left: -.55rem;
  color: var(--pink);
  content: "/";
}

.play-link {
  display: flex;
  min-height: 48px;
  margin-top: 1rem;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: .45rem;
  background: var(--lemon);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease;
}

.play-link:hover {
  background: #ead221;
}

.play-link:active {
  transform: translateY(2px);
}

details {
  margin-top: .75rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
}

summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  color: var(--pink);
  content: "+";
  font-size: 1.25rem;
}

details[open] summary::after {
  content: "−";
}

details p {
  max-width: 40ch;
  margin: 0 0 .85rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.45;
}

footer {
  padding: 1.5rem 0 .25rem;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.not-found {
  display: grid;
  min-height: calc(100dvh - max(2rem, env(safe-area-inset-top)) - max(2rem, env(safe-area-inset-bottom)));
  place-content: center;
  text-align: center;
}

.not-found h1 {
  margin: 0;
  font-family: "Arial Black", ui-rounded, system-ui, sans-serif;
  font-size: clamp(6rem, 35vw, 15rem);
  letter-spacing: -.08em;
  line-height: .8;
}

.not-found p {
  margin: 1.5rem 0;
  font-weight: 900;
}

.not-found .play-link {
  min-width: min(16rem, 100%);
}

@media (min-width: 48rem) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card {
    display: flex;
    flex-direction: column;
  }

  .game-card .play-link {
    margin-top: auto;
  }

  .card-top {
    grid-template-columns: minmax(5rem, 6.5rem) minmax(0, 1fr);
    margin-bottom: 1rem;
  }

  .game-copy h2 {
    font-size: clamp(1.65rem, 3.8vw, 2.7rem);
  }
}

@media (min-width: 64rem) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-card {
    padding: 1rem;
  }

  .card-top {
    grid-template-columns: 1fr;
    gap: .65rem;
    align-items: start;
  }

  .game-icon {
    width: 5rem;
  }

  .game-copy h2 {
    font-size: clamp(1.25rem, 1.7vw, 1.7rem);
    white-space: normal;
  }

  .play-link {
    white-space: nowrap;
  }
}

@media (min-width: 80rem) {
  .game-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 22rem) {
  .site-shell {
    padding-right: max(.75rem, env(safe-area-inset-right));
    padding-left: max(.75rem, env(safe-area-inset-left));
  }

  .card-top {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: .75rem;
  }

  .game-copy h2 {
    font-size: 1.65rem;
  }
}
