:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #07111c;
  color: #f6f9ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 47%, #1b3a51 0, #0c2232 26%, #07111c 64%);
}
header, main { width: min(100% - 2.5rem, 66rem); margin: auto; }
header { padding: 1rem 0; }
a, button { color: inherit; font: inherit; }
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #b8dffa;
  text-underline-offset: .25em;
}
:focus-visible { outline: 3px solid #83ceff; outline-offset: 4px; }
main { text-align: center; padding: clamp(.75rem, 4vh, 3rem) 0 2rem; }
h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 5.5rem); letter-spacing: -.065em; line-height: 1; }
.intro p, #controls-help, .status { color: #c2d0de; line-height: 1.55; }
.intro p { max-width: 44ch; margin: 1rem auto; font-size: clamp(1rem, 2vw, 1.125rem); }
.stage {
  width: min(100%, 55rem);
  height: clamp(18rem, 52vh, 38rem);
  margin: .5rem auto;
  display: grid;
  place-items: center;
}
.stage canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; border-radius: 1rem; }
.stage canvas:active { cursor: grabbing; }
.stage img { object-fit: contain; width: 100%; height: 100%; max-height: clamp(18rem, 52vh, 38rem); }
.stage noscript { height: 100%; }
.tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
button {
  min-height: 44px;
  padding: .65rem 1rem;
  border-radius: 99px;
  border: 1px solid #617789;
  background: #122737;
  cursor: pointer;
}
button:hover { background: #1e3b50; }
#controls-help, .status { max-width: 50ch; margin: 1rem auto 0; font-size: .9375rem; }
[hidden] { display: none !important; }
@media (max-width: 430px) {
  header, main { width: min(100% - 1.75rem, 66rem); }
  .tools { gap: .375rem; }
  button { padding-inline: .625rem; font-size: .875rem; }
}
