/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #000;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Canvas Layers ===== */
#c,
#bloom {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #000;
}

/* メインキャンバス */
#c {
  z-index: 1;
}

/* ブルーム用キャンバス（ぼかし＋加算） */
#bloom {
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;

  /* “輪郭が溶ける”強めブルーム */
  filter: blur(24px) brightness(1.45) saturate(1.55) contrast(1.03);
  opacity: 0.92;
}

/* ===== HUD ===== */
#hud {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 10;

  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  color: rgba(255,255,255,0.8);
  font-size: 12px;
  line-height: 1.4;

  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 6px 10px;

  user-select: none;
  pointer-events: none;

  transition: opacity 0.6s ease;
}

#hud.hidden {
  opacity: 0;
}

#hud .hud-item {
  white-space: nowrap;
}

#hud .hud-sep {
  opacity: 0.4;
}

/* kbd 表示 */
#hud kbd {
  font: inherit;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}

/* ===== Letterbox (optional visual aid if JS draws bars) ===== */
/* ここは JS 側で描く前提なので CSS では何もしない */

/* ===== Accessibility / Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  #bloom {
    filter: blur(16px) brightness(1.25) saturate(1.35);
    opacity: 0.75;
  }

  #hud {
    opacity: 1 !important;
  }
}
