:root {
  --sky: #aedceb;
  --sky-deep: #7cc3de;
  --rapeseed: #f2c230;
  --falu: #8f2d24;
  --cream: #fbf6e9;
  --slate: #22333b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, var(--sky-deep) 0%, var(--sky) 55%, #d8ecf4 100%);
  color: var(--slate);
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.masthead {
  text-align: center;
  padding: 1.4rem 1rem 0.6rem;
}

.masthead h1 {
  margin: 0;
  font-family: "Titan One", "Nunito", sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow:
    0 3px 0 var(--falu),
    0 6px 14px rgba(34, 51, 59, 0.35);
}

.masthead .accent {
  color: var(--rapeseed);
}

.tagline {
  margin: 0.35rem 0 0;
  font-weight: 800;
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  color: var(--slate);
  opacity: 0.85;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem 1rem;
  width: 100%;
}

.frame {
  position: relative;
  width: min(92vw, calc(72svh * 420 / 640), 460px);
  aspect-ratio: 420 / 640;
  border: 6px solid var(--falu);
  border-radius: 18px;
  background: var(--sky);
  box-shadow:
    0 0 0 4px var(--cream),
    0 18px 40px rgba(34, 51, 59, 0.35);
  overflow: hidden;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  cursor: pointer;
}

.mute {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 3px solid var(--falu);
  border-radius: 12px;
  background: var(--cream);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: transform 120ms ease;
}

.mute:hover {
  transform: scale(1.08);
}

.mute:focus-visible {
  outline: 3px solid var(--slate);
  outline-offset: 2px;
}

.hint {
  margin: 0.8rem 0 0;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.8;
}

kbd {
  background: var(--cream);
  border: 1.5px solid var(--slate);
  border-bottom-width: 3px;
  border-radius: 5px;
  padding: 0.05em 0.45em;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85em;
}

.colophon {
  padding: 0.6rem 1rem 1.2rem;
  text-align: center;
}

.colophon p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.65;
}

.colophon code {
  background: rgba(251, 246, 233, 0.7);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

@media (prefers-reduced-motion: reduce) {
  .mute {
    transition: none;
  }
}
