:root {
  color-scheme: dark;
  --ink: #eff8ff;
  --deep: #061126;
  --water: #0875d7;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(6, 17, 38, 0.18), rgba(6, 17, 38, 0.74)),
    url("../../assets/game-puzzle.png") center / cover no-repeat,
    var(--water);
}

button,
canvas {
  touch-action: none;
}

.game-page {
  width: 100vw;
  height: 100svh;
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.game-shell {
  width: min(calc(100vw - 24px), calc(100svh - 24px), 900px);
  height: auto;
  aspect-ratio: 1;
  min-width: 300px;
  min-height: 300px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 26px 70px rgba(1, 19, 52, 0.48));
}

.game-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

noscript {
  position: fixed;
  inset: auto 20px 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(6, 17, 38, 0.84);
}

@media (max-width: 560px) {
  .game-page {
    min-height: 460px;
    place-items: start center;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .game-shell {
    width: min(calc(100vw - 16px), calc(100svh - 16px), 900px);
  }
}
