:root {
  color-scheme: dark;
  --bg: #111315;
  --fg: #f2eee6;
  --muted: #b8b0a3;
  --line: rgba(242, 238, 230, 0.18);
  --kanade: #f0b7c9;
  --suzuna: #8fd7cf;
  --keiji: #d6c5f0;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(143, 215, 207, 0.18), transparent 34%),
    linear-gradient(135deg, #111315 0%, #1b1c1a 50%, #181b20 100%);
  color: var(--fg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  width: 100vw;
  height: 100vh;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#komagi-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.hud h1,
.hud p {
  margin: 0;
}

.hud h1 {
  font-size: 20px;
  font-weight: 720;
}

.hud p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.bgm-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  pointer-events: auto;
}

.bgm-panel span,
.bgm-panel button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(17, 19, 21, 0.58);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.bgm-panel span {
  padding: 7px 10px;
}

.bgm-panel button {
  cursor: pointer;
  padding: 7px 11px;
}

.bgm-panel button:hover {
  border-color: rgba(242, 238, 230, 0.4);
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.metrics span {
  min-height: 28px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(17, 19, 21, 0.58);
  color: var(--fg);
  font-size: 12px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

@media (max-width: 720px) {
  .hud {
    top: 12px;
    left: 12px;
    right: 12px;
    flex-direction: column;
  }

  .hud h1 {
    font-size: 17px;
  }

  .metrics {
    justify-content: flex-start;
  }

  .bgm-panel {
    flex-wrap: wrap;
  }
}
