:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #16231e;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 210, 97, 0.16), transparent 28%),
    linear-gradient(145deg, #13241f 0%, #253333 54%, #161a20 100%);
  color: #f7f3dd;
  overflow: hidden;
}

.game-shell {
  width: min(100vw, 1080px);
  height: min(100vh, 760px);
  display: grid;
  place-items: center;
  padding: 16px;
  position: relative;
}

canvas {
  width: min(100%, calc(100vh * 1.5));
  max-height: calc(100vh - 32px);
  aspect-ratio: 3 / 2;
  display: block;
  border: 3px solid #f6cb62;
  background: #77a78f;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.pause-button {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 54px;
  height: 54px;
  border: 3px solid #f6cb62;
  border-radius: 8px;
  background: rgba(12, 18, 22, 0.82);
  color: #fff2b8;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.pause-button:hover {
  background: rgba(37, 50, 45, 0.94);
}

.mobile-pad {
  position: fixed;
  inset: auto 16px 16px auto;
  display: none;
  gap: 8px;
  justify-items: center;
}

.mobile-pad div {
  display: flex;
  gap: 8px;
}

.mobile-pad button {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(12, 18, 22, 0.68);
  font-size: 20px;
  font-weight: 800;
  touch-action: none;
}

@media (pointer: coarse) {
  .mobile-pad {
    display: grid;
  }
}
