* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #140a24;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif; color: #f2ecff; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#top-left { position: absolute; top: 12px; left: 14px; text-shadow: 0 2px 6px #000; }
.heart { display: inline-block; width: 20px; height: 20px; margin-right: 6px;
  background: #43325e; clip-path: polygon(50% 100%, 0 55%, 0 28%, 22% 0, 50% 20%, 78% 0, 100% 28%, 100% 55%); }
.heart.full { background: #ff6a3d; box-shadow: 0 0 8px #ff6a3d; }
#wave { margin-top: 6px; font-size: 13px; letter-spacing: 2px; color: #9df7e0; }
#score-wrap { margin-top: 2px; font-size: 14px; letter-spacing: 1px; }
#score { color: #ffd166; font-weight: 700; }
#boss-box { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(60vw, 420px); display: none; }
#boss-name { text-align: center; font-size: 13px; letter-spacing: 4px; color: #ffb0a0; text-shadow: 0 2px 6px #000; }
#boss-track { margin-top: 4px; height: 12px; border: 2px solid #6a4b8f; border-radius: 6px;
  background: rgba(20,10,36,0.7); overflow: hidden; }
#boss-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff4d2e, #ff9a4a); transition: width 0.15s; }
#msg { position: absolute; top: 22%; width: 100%; text-align: center; font-size: clamp(15px, 3vw, 24px);
  letter-spacing: 3px; color: #9df7e0; text-shadow: 0 2px 8px #000; opacity: 0; transition: opacity 0.4s; }
#touch { position: fixed; inset: 0; pointer-events: none; }
#stick { position: absolute; left: 18px; bottom: 18px; width: 116px; height: 116px; border-radius: 50%;
  background: rgba(60,40,90,0.35); border: 2px solid rgba(157,247,224,0.4); pointer-events: auto;
  touch-action: none; display: flex; align-items: center; justify-content: center; }
#knob { width: 48px; height: 48px; border-radius: 50%; background: rgba(157,247,224,0.55);
  border: 2px solid #9df7e0; pointer-events: none; }
#btns { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 14px; pointer-events: auto; }
#btns button { width: 84px; height: 84px; border-radius: 50%; border: 2px solid rgba(255,138,61,0.7);
  background: rgba(255,106,61,0.28); color: #ffd9b8; font-size: 13px; letter-spacing: 1px; font-weight: 700;
  touch-action: none; font-family: inherit; }
#btns button#btn-dodge { border-color: rgba(157,247,224,0.6); background: rgba(63,214,194,0.22); color: #9df7e0; }
#btns button.pressed { background: rgba(255,209,102,0.6); }
#overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(10,5,20,0.72); backdrop-filter: blur(3px); }
#overlay.show { display: flex; }
.panel { max-width: min(92vw, 560px); padding: 28px 30px; text-align: center;
  border: 1px solid rgba(255,138,61,0.5); border-radius: 14px; background: rgba(30,18,52,0.92);
  box-shadow: 0 0 40px rgba(255,106,61,0.25); }
.panel h1 { font-size: clamp(24px, 5vw, 40px); letter-spacing: 6px; color: #ffd166; margin-bottom: 12px; }
.panel p { font-size: 14px; line-height: 1.6; color: #cdc3e6; margin-bottom: 18px; }
.panel .hint { font-size: 12px; color: #8f82b8; margin-bottom: 0; }
.panel button { font-size: 17px; letter-spacing: 2px; padding: 12px 30px; border-radius: 999px;
  border: none; cursor: pointer; background: linear-gradient(90deg, #ff6a3d, #ffb03d); color: #24110a;
  font-weight: 800; font-family: inherit; }
@media (pointer: fine) { #stick, #btns { opacity: 0.55; } }
