:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #16213a;
  background: #f2f5f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f2f5f9;
}

.wrap {
  width: min(100% - 24px, 860px);
  margin: 0 auto;
  padding: 18px 0 28px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 6vw, 44px);
  line-height: 1.08;
}

.intro,
.kecil {
  color: #44506a;
  line-height: 1.55;
}

.intro {
  margin: 0 0 14px;
}

.kecil {
  font-size: 14px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 10px;
}

.hud div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #fff;
}

.hud span {
  display: block;
  font-size: 12px;
  color: #5a6883;
}

.hud strong {
  font-size: 22px;
}

.stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #17233c;
  box-shadow: 0 18px 50px rgb(22 33 58 / .16);
  touch-action: none;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(9 15 30 / .68);
}

.overlay[hidden] {
  display: none;
}

.panel {
  width: min(100%, 520px);
  padding: 22px;
  border-radius: 16px;
  background: #fff;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.panel p {
  line-height: 1.55;
}

button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 11px;
  background: #087e4b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: #066b3f;
  outline: 3px solid #a7e8c7;
  outline-offset: 2px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.controls button {
  background: #24395f;
}

.controls button:hover,
.controls button:focus-visible {
  background: #16294b;
  outline-color: #c6d9ff;
}

@media (max-width: 560px) {
  .hud {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrap {
    width: min(100% - 16px, 860px);
    padding-top: 12px;
  }
}
