:root {
  --bg-0: #f7f1d5;
  --bg-1: #d0e6ff;
  --ink: #1f1f1f;
  --panel: rgba(255, 255, 255, 0.88);
  --accent: #1d7ef2;
  --danger: #de3d3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px;
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.hud-left,
.hud-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
}

button:hover {
  filter: brightness(1.06);
}

.game-shell {
  position: relative;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.2);
  background: #b9daff;
}

#game {
  display: block;
  width: 100%;
  height: min(62vh, 640px);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 30, 0.74);
  color: #fff;
  display: grid;
  place-content: center;
  padding: 20px;
  text-align: center;
}

.overlay h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 46px);
}

.overlay ul {
  text-align: left;
  line-height: 1.45;
  margin: 14px auto;
  max-width: 340px;
}

.overlay.hidden {
  display: none;
}

.mobile-controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-controls button {
  min-height: 52px;
}

#disqus_thread {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 12px;
}

@media (max-width: 760px) {
  .app {
    padding: 8px;
  }

  .hud {
    padding: 8px;
  }

  #game {
    height: 56vh;
  }
}
