:root {
  color-scheme: light;
  --bg: #0c1b3a;
  --panel: #f6f2df;
  --ink: #1c2140;
  --accent: #e94f37;
  --p1: #ff5ea8;
  --p2: #37b7ff;
  --brick: #d67c45;
  --pipe: #3ea251;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: radial-gradient(circle at top, #2f4d92 0%, var(--bg) 65%);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 24px;
}

.game-shell {
  width: min(1020px, 100%);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2.3vw, 1.8rem);
}

.hud {
  background: color-mix(in srgb, var(--panel), transparent 6%);
  color: var(--ink);
  border: 3px solid #ffffff50;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hud-item {
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  min-width: 130px;
  display: grid;
  gap: 2px;
}

.hud-item span {
  font-size: 0.75rem;
  color: #656565;
}

.hud-item strong {
  font-size: 1.06rem;
}

#startBtn {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.controls {
  margin-top: 10px;
  font-size: 0.93rem;
  opacity: 0.92;
}

.controls p {
  margin: 4px 0;
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  text-align: center;
  border: 1px solid #ffffff70;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 4px;
  background: #00000040;
  margin-right: 2px;
}

.canvas-wrap {
  position: relative;
  margin-top: 10px;
  border: 3px solid #fff6;
  border-radius: 14px;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: linear-gradient(to bottom, #8fd6ff 0%, #8fd6ff 68%, #efcf7f 68%, #efcf7f 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  background: #00000073;
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  padding: 20px;
}

.overlay.is-visible {
  opacity: 1;
}
