:root {
  --bg: #f5efe4;
  --ink: #1e2128;
  --muted: #5b6372;
  --card: #fff9ef;
  --stroke: #2a2d36;
  --accent-1: #ff8552;
  --accent-2: #0f8b8d;
  --radius-xl: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Nunito", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, #fff5dd 0, #fff5dd 28%, transparent 29%),
    radial-gradient(circle at 85% 82%, #f7c8a8 0, #f7c8a8 18%, transparent 19%),
    linear-gradient(140deg, #f3e7d5, #efd7be);
  color: var(--ink);
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
}

.app-shell {
  margin: 0 auto;
  max-width: 860px;
}

.hero {
  background: #fff8ea;
  border: 2px solid var(--stroke);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: 0 10px 0 #dfcfb7;
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.9rem, 8vw, 3rem);
  line-height: 1;
}

.subtitle {
  margin: 0;
  color: #3e4655;
}

.game-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--stroke);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 18px;
  box-shadow: 0 8px 0 #d7c6ac;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.game-card:active {
  transform: translateY(3px);
  box-shadow: 0 5px 0 #d7c6ac;
}

.card-head {
  display: grid;
  align-items: start;
  justify-items: start;
  gap: 6px;
}

.card-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: flex-start;
}

h2 {
  margin: 0;
  font-size: 1.6rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  background: #fff;
}

.best-score {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  white-space: nowrap;
}

.game-card p {
  margin: 0;
  color: #394150;
  line-height: 1.45;
}

.cta {
  margin-top: auto;
  font-weight: 700;
  color: #121620;
}

.card-2048 {
  background: linear-gradient(145deg, #fff8e4, #ffebb9);
}

.card-tetris {
  background: linear-gradient(145deg, #defaf8, #baf2ec);
}

.card-snake {
  background: linear-gradient(145deg, #e6f7d8, #c3ef9b);
}

.card-minesweeper {
  background: linear-gradient(145deg, #f7e9dd, #f5c8a7);
}

@media (min-width: 720px) {
  body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding: 28px;
  }

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

  .game-card {
    min-height: 230px;
  }
}
