.games-page {
  width: min(1100px, calc(100% - 36px));
  margin-inline: auto;
  padding-block: clamp(32px, 6vw, 72px);
}

.games-heading {
  max-width: 650px;
  margin-bottom: clamp(24px, 4vw, 42px);
}

.games-heading h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 6.25rem);
  line-height: .94;
}

.games-heading p:last-child {
  margin: 14px 0 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
}

.games-back {
  display: inline-block;
  margin-bottom: 20px;
  padding-block: 6px;
  color: var(--teal);
}

.stopwatch-page {
  max-width: 850px;
}

.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr));
  gap: 22px;
}

.game-card,
.stopwatch-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

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

.game-card:hover,
.game-card:focus-visible {
  border-color: var(--teal);
}

.game-card img {
  display: block;
  width: 100%;
  max-height: 320px;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: center 38%;
}

.game-card img[src*="/assets/explore/"] {
  clip-path: inset(8%);
  transform: scale(calc(1 / .84));
}

.game-card img[src*="/nitp-icons.svg#"] {
  object-fit: contain;
  background: #faf7ec;
}

.game-card:only-child:has(img) {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.game-card:only-child img {
  height: 100%;
}

.game-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(20px, 4vw, 44px);
}

.game-card-copy h2 {
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  line-height: 1;
  margin: 0;
}

.game-card-copy p:not(.eyebrow) {
  color: var(--muted);
  margin: 12px 0 20px;
}

.games-status {
  color: var(--muted);
}

.stopwatch-panel {
  padding: clamp(16px, 4vw, 38px);
}

.stopwatch-settings label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.stopwatch-settings select {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.stopwatch-target {
  margin: 18px 0 12px;
  color: #a7f5df;
  font: 700 clamp(1.65rem, 4.5vw, 3rem) / 1.1 "Smooch Sans", system-ui, sans-serif;
  text-align: center;
}

.stopwatch-clock {
  container-type: inline-size;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 140px;
  padding: 18px;
  border: 1px solid #729785;
  border-radius: 8px;
  background: #173f35;
  color: #fff7e2;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  touch-action: manipulation;
}

.stopwatch-clock:hover {
  background: #215245;
}

.stopwatch-time {
  font: 700 clamp(3.75rem, 21vw, 13rem) / .92 "Smooch Sans", system-ui, sans-serif;
  font-size: clamp(3.75rem, 34cqi, 13rem);
  font-variant-numeric: tabular-nums;
}

.stopwatch-feedback {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.stopwatch-margin {
  color: var(--muted);
  font-size: .88rem;
}

.stopwatch-artwork {
  flex: 1 1 200px;
  max-width: 310px;
  margin: 0;
}

.stopwatch-artwork img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.stopwatch-result {
  border-top: 1px solid var(--line);
  margin-top: clamp(20px, 4vw, 32px);
  padding-top: clamp(20px, 4vw, 32px);
}

.stopwatch-story {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.stopwatch-story > div {
  flex: 1 1 300px;
  min-width: 0;
}

.stopwatch-result h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.stopwatch-sources,
.stopwatch-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
}

.stopwatch-sources a {
  color: var(--teal);
}

@media (max-width: 640px) {
  .game-card:only-child:has(img) {
    grid-template-columns: minmax(0, 1fr);
  }

  .stopwatch-artwork img {
    aspect-ratio: 4 / 3;
  }
}
