.game-page {
  min-height: 100svh;
  padding: clamp(1rem, 4vw, 3rem);
}

.game {
  width: min(100%, 34rem);
  margin: clamp(2rem, 7vh, 5rem) auto 0;
}

.game h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 7vw, 3.9rem);
  letter-spacing: -.06em;
  text-shadow: 0 2px 16px #151722;
}

.challenge {
  padding: clamp(1rem, 5vw, 2rem);
  border: 1px solid #836b82;
  border-radius: .65rem;
  background: #211b2b;
}

.challenge h2 { margin: .45rem 0 1rem; font-size: 1.35rem; }
.run-rule { margin: 0 0 1.15rem; color: #ebd5e2; line-height: 1.5; }
#progress { margin: 0; color: #ffd5a6; font: .875rem ui-monospace, monospace; }
#feedback { min-height: 1.5em; margin: .75rem 0; color: #ffd5a6; }

.challenge button, .challenge input { font: inherit; }
.challenge button { cursor: pointer; }
.action, .play {
  min-height: 44px;
  padding: .55rem 1rem;
  border: 0;
  border-radius: .3rem;
  background: #ffe0b3;
  color: #211b2b;
  font-weight: 700 !important;
}
.play { background: #e7d7ec; }

.confirm {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 60px;
  padding: .75rem;
  border: 1px solid #a28a9f;
  border-radius: .3rem;
  cursor: pointer;
}
.confirm input { width: 1.5rem; height: 1.5rem; accent-color: #ffd5a6; }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
}
.tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.25;
  border: 3px solid transparent;
  border-radius: .3rem;
  background: linear-gradient(155deg, var(--sky) 56%, var(--ground) 57%) border-box;
}
.tile span { font-size: clamp(1.5rem, 7vw, 2.65rem); transform: rotate(var(--tilt)); }
.tile[aria-pressed="true"] { border-color: #ffe0b3; }
.tile[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  inset: .15rem .25rem auto auto;
  width: 1.3rem;
  border-radius: .2rem;
  background: #211b2b;
  color: #fff7eb;
}

.code {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: .7rem;
  margin-bottom: .85rem;
  border-radius: .25rem;
  background: repeating-linear-gradient(-15deg, #eddccf 0 8px, #d8c1cf 8px 10px);
  color: #2e2434;
  font: 900 clamp(1.3rem, 6vw, 2.4rem) ui-monospace, monospace;
}
.code span { display: inline-block; transform: rotate(var(--tilt)); }
.answer { display: grid; gap: .4rem; margin-top: .75rem; }
.answer input {
  width: 100%;
  min-height: 44px;
  padding: .45rem .65rem;
  border: 1px solid #a28a9f;
  border-radius: .3rem;
  background: #17131e;
  color: inherit;
}
.answer input:focus-visible, .confirm input:focus-visible { outline: 2px solid #ffe1a7; outline-offset: 3px; }
.audio-submit { margin-top: .75rem; }
.audio-credits { font-size: .875rem; text-shadow: 0 1px 4px #151722; }
.audio-credits a { text-decoration: underline; }
