:root {
  --bg: #f7f1e1;
  --bg2: #f0e3b0;
  --ink: #1c1b1a;
  --accent: #e07a2f;
  --accent2: #2a9d8f;
  --panel: rgba(255, 255, 255, 0.85);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, var(--bg2), var(--bg));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.app {
  width: min(1100px, 100%);
  display: grid;
  gap: 12px;
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--panel);
  border-radius: 12px;
  border: 2px solid var(--ink);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hud__item {
  display: flex;
  gap: 6px;
  align-items: center;
}

.stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
}

canvas {
  display: block;
  width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 15, 15, 0.5);
  backdrop-filter: blur(2px);
}

.overlay.hidden {
  display: none;
}

.overlay__panel {
  background: var(--panel);
  padding: 24px 28px;
  border-radius: 16px;
  border: 2px solid var(--ink);
  text-align: center;
  min-width: min(320px, 90%);
}

.overlay__panel h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.overlay__panel button {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.help {
  text-align: center;
  font-size: 14px;
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--ink);
}

@media (max-width: 720px) {
  .hud {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .overlay__panel h1 {
    font-size: 26px;
  }
}
