:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", Arial, sans-serif;
  background: #142019;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 8%, rgba(131, 188, 79, 0.25), transparent 20rem),
    radial-gradient(circle at 84% 18%, rgba(89, 165, 168, 0.16), transparent 22rem),
    linear-gradient(135deg, #111916 0%, #253527 46%, #151817 100%);
}

.shell {
  width: min(100vw, 1120px);
  padding: 18px;
}

.game-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(246, 231, 191, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.14)),
    rgba(10, 16, 13, 0.35);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

.stage {
  position: relative;
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
}

canvas {
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  display: block;
  background: #d7c9aa;
  border: 4px solid #0c120f;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 20px 55px rgba(0, 0, 0, 0.42);
  image-rendering: auto;
}

.start-panel {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(450px, 86%);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 2px solid rgba(18, 32, 22, 0.85);
  border-radius: 10px;
  background: rgba(246, 224, 166, 0.96);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
  color: #17231b;
  z-index: 3;
}

.start-panel.is-hidden {
  display: none;
}

.start-panel p,
.start-panel h1 {
  margin: 0;
}

.start-panel p {
  color: #367821;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.start-panel h1 {
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1;
}

.start-panel button {
  min-height: 42px;
  border: 2px solid #17231b;
  border-radius: 8px;
  background: #92d951;
  color: #17231b;
  font: inherit;
  font-weight: 900;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.start-panel button:hover,
.start-panel button:focus-visible {
  background: #b7f36d;
}

.mobile-controls {
  display: none;
  gap: 7px;
  justify-items: center;
}

.mobile-controls div {
  display: flex;
  gap: 7px;
}

.mobile-controls button {
  width: 58px;
  height: 48px;
  border: 2px solid #0e1612;
  border-radius: 8px;
  background: #f6e7bf;
  color: #16241c;
  font-size: 20px;
  font-weight: 800;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.13);
}

@media (max-width: 760px) {
  body {
    align-items: start;
  }

  .shell {
    padding: 8px;
  }

  .mobile-controls {
    display: grid;
  }
}
