:root {
  color-scheme: dark;
  --page: #101613;
  --edge: #25332c;
  --glow: rgba(128, 220, 188, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 15%, rgba(84, 132, 112, 0.25), transparent 32rem),
    linear-gradient(135deg, #101613 0%, #17231c 48%, #101823 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.game-shell {
  position: relative;
  width: min(100vw, 1180px);
  height: min(100vh, 720px);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(179, 209, 191, 0.22);
  background: #17251d;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--glow);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: crosshair;
}

.zoom-panel {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(239, 231, 197, 0.28);
  background: rgba(20, 25, 21, 0.74);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
}

.zoom-panel button,
.zoom-panel output {
  min-width: 38px;
  height: 32px;
  border: 1px solid rgba(239, 231, 197, 0.24);
  color: #f1ead5;
  background: rgba(76, 91, 72, 0.72);
  font: 700 0.86rem/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.zoom-panel button {
  cursor: pointer;
}

.zoom-panel button:hover {
  background: rgba(111, 128, 93, 0.84);
}

.zoom-panel button:focus-visible {
  outline: 2px solid #9be5d1;
  outline-offset: 2px;
}

.zoom-panel output {
  display: grid;
  min-width: 58px;
  place-items: center;
  font-weight: 650;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f1ead5;
  background: linear-gradient(135deg, rgba(17, 25, 20, 0.88), rgba(20, 31, 41, 0.88));
  font-size: 1rem;
  letter-spacing: 0;
  transition: opacity 180ms ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .game-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
  }
}
