* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #07111b; color: #edf7ff; font-family: system-ui, "Yu Gothic", sans-serif; }
button { font: inherit; color: inherit; }
#app { position: fixed; inset: 0; touch-action: none; background: #07111b; }
#game { width: 100%; height: 100%; display: block; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; background: linear-gradient(90deg, rgba(4,8,13,.82), rgba(4,8,13,.34)); z-index: 10; }
.overlay.hidden { display: none; }
.panel { width: min(520px, 94vw); padding: 24px; border: 1px solid rgba(150,220,255,.28); border-radius: 8px; background: rgba(7,17,27,.82); box-shadow: 0 20px 70px rgba(0,0,0,.38); backdrop-filter: blur(10px); }
.eyebrow { margin: 0 0 8px; color: #75e5ff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
h1, h2 { margin: 0; font-size: clamp(34px, 7vw, 64px); line-height: 1.02; letter-spacing: 0; }
.lead { margin: 12px 0 18px; color: #d8eef7; font-size: 18px; }
.help { margin: 14px 0 0; color: #aac1cc; line-height: 1.7; font-size: 13px; }
.difficulty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.chip, .primary { min-height: 44px; border: 1px solid rgba(154,226,255,.35); border-radius: 8px; background: rgba(12,36,54,.72); cursor: pointer; }
.chip.active { background: #e36d32; border-color: #ffb17f; }
.primary { width: 100%; background: linear-gradient(135deg, #e36d32, #29b8d6); border: 0; font-weight: 800; }
#hud { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; pointer-events: none; }
#hud div { min-height: 42px; padding: 7px 9px; border: 1px solid rgba(163,229,255,.22); border-radius: 8px; background: rgba(3,12,19,.58); }
#hud span { display: block; color: #90b6c5; font-size: 10px; }
#hud b { font-size: 18px; }
#bossBar { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(520px, 76vw); height: 12px; padding: 2px; border: 1px solid rgba(255,159,95,.44); border-radius: 8px; background: rgba(0,0,0,.42); z-index: 5; }
#bossBar i { display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, #ff3d35, #ffc247); }
#touchControls { position: absolute; inset: auto 0 max(16px, env(safe-area-inset-bottom)) 0; z-index: 6; display: none; justify-content: space-between; align-items: end; padding: 0 18px; pointer-events: none; }
#stick { width: 96px; height: 96px; border-radius: 50%; border: 1px solid rgba(175,233,255,.26); background: rgba(2,15,24,.38); pointer-events: auto; position: relative; }
#stick i { position: absolute; left: 31px; top: 31px; width: 34px; height: 34px; border-radius: 50%; background: rgba(117,229,255,.88); }
#slashBtn { width: 82px; height: 82px; border-radius: 50%; border: 1px solid rgba(255,214,173,.45); background: rgba(227,109,50,.76); font-size: 24px; font-weight: 900; pointer-events: auto; }
@media (pointer: coarse), (max-width: 760px) {
  #touchControls { display: flex; }
  #hud { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; right: 8px; }
  #hud div { min-height: 36px; padding: 5px 6px; }
  #hud b { font-size: 15px; }
  .panel { width: min(94vw, 420px); padding: 18px; }
  h1, h2 { font-size: 38px; }
  .lead { font-size: 16px; }
  .difficulty { gap: 6px; }
  .chip { min-height: 40px; padding: 0 6px; font-size: 14px; }
  .help { font-size: 12px; line-height: 1.55; }
}
