* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #0b0824;
  font-family: ui-rounded, "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #efeaff; -webkit-tap-highlight-color: transparent; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud-top { position: absolute; top: 10px; left: 12px; right: 12px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hud-chip { background: rgba(23, 18, 58, 0.72); border: 1px solid rgba(143, 107, 255, 0.5);
  border-radius: 10px; padding: 6px 12px; font-size: 13px; letter-spacing: 0.12em; }
.hud-chip b { font-size: 17px; margin-left: 6px; color: #ffd166;
  font-variant-numeric: tabular-nums; }
#healthbox { flex: 1; min-width: 120px; max-width: 340px; height: 16px; margin-left: auto;
  background: rgba(23, 18, 58, 0.72); border: 1px solid rgba(143, 107, 255, 0.5);
  border-radius: 8px; overflow: hidden; }
#healthfill { height: 100%; width: 100%;
  background: linear-gradient(90deg, #ff6b5e, #ffc14d, #4dd8ff);
  transition: width 0.18s ease-out; }
#progressbox { position: absolute; top: 52px; left: 12px; right: 12px; height: 4px;
  background: rgba(143, 107, 255, 0.25); border-radius: 2px; }
#progressfill { height: 100%; width: 0%; background: #c87bff; border-radius: 2px; }
#judge { position: absolute; top: 34%; left: 0; right: 0; text-align: center;
  font-size: 40px; font-weight: 800; letter-spacing: 0.18em; opacity: 0;
  text-shadow: 0 0 18px currentColor; }
#hud-btns { position: absolute; top: 74px; right: 12px; display: flex; gap: 8px;
  pointer-events: auto; }
#hud-btns button { width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: rgba(23, 18, 58, 0.8); color: #efeaff; border: 1px solid rgba(143, 107, 255, 0.5);
  font-size: 16px; }
.touch-row { position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  gap: 8px; padding: 8px; z-index: 5; }
.lane-btn { flex: 1; max-width: 150px; height: 74px; margin: 0 auto;
  border-radius: 14px; font-size: 22px; font-weight: 700; cursor: pointer;
  background: rgba(23, 18, 58, 0.55); border: 2px solid transparent; color: #efeaff;
  touch-action: manipulation; }
.lane-btn:nth-child(1) { border-color: #ff6b5e66; }
.lane-btn:nth-child(2) { border-color: #ffc14d66; }
.lane-btn:nth-child(3) { border-color: #4dd8ff66; }
.lane-btn:nth-child(4) { border-color: #c87bff66; }
.lane-btn:active, .lane-btn.flash { background: rgba(120, 90, 220, 0.55); }
@media (hover: hover) and (pointer: fine) {
  .touch-row { opacity: 0.45; }
  .touch-row:hover { opacity: 1; }
}
.overlay { position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(8, 5, 26, 0.78); z-index: 10;
  backdrop-filter: blur(4px); }
.overlay.hidden { display: none; }
.panel { max-width: 560px; width: calc(100% - 32px); padding: 28px 26px;
  border-radius: 18px; text-align: center;
  background: linear-gradient(160deg, rgba(38, 28, 92, 0.92), rgba(17, 11, 46, 0.94));
  border: 1px solid rgba(143, 107, 255, 0.45); box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6); }
.panel h1 { font-size: clamp(28px, 7vw, 44px); letter-spacing: 0.22em;
  background: linear-gradient(90deg, #ff6b5e, #ffc14d, #4dd8ff, #c87bff);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel .tag { margin: 10px 0 16px; color: #c9befc; line-height: 1.5; }
.keys { font-size: 14px; color: #b0a6e8; margin-bottom: 14px; line-height: 2; }
.k { display: inline-block; min-width: 30px; padding: 4px 8px; margin-right: 6px;
  border-radius: 7px; background: #241c52; border: 1px solid #4a3a8f;
  border-bottom-width: 3px; font-weight: 700; color: #ffd166; }
ul.mini { list-style: none; text-align: left; font-size: 14px; color: #cbbff8;
  margin-bottom: 20px; }
ul.mini li { padding: 5px 0 5px 22px; position: relative; line-height: 1.45; }
ul.mini li::before { content: "◆"; position: absolute; left: 4px; color: #ff6b5e; }
.big-btn { display: inline-block; padding: 15px 42px; font-size: 18px; font-weight: 800;
  letter-spacing: 0.12em; border: none; border-radius: 999px; cursor: pointer;
  color: #17113d; background: linear-gradient(90deg, #ffc14d, #ff6b5e);
  box-shadow: 0 8px 30px rgba(255, 107, 94, 0.45); }
.big-btn:active { transform: translateY(2px); }
