* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1a1226;
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; color: #f2e4c8; }
#c { position: fixed; inset: 0; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
.panel { position: absolute; top: 12px; }
#p-left { left: 12px; width: 190px; }
#p-right { right: 12px; text-align: right; }
.label { font-size: 11px; letter-spacing: 2px; color: #c9a46a; margin-bottom: 3px; }
.bar { height: 14px; background: #2a1f36; border: 1px solid #57406b; margin-bottom: 8px; }
.bar.thin { height: 8px; }
#hp-fill { height: 100%; width: 100%; background: #7fe3d0; }
#reload-fill { height: 100%; width: 100%; background: #ffd166; }
.stat { font-size: 13px; letter-spacing: 1px; background: rgba(26,18,38,.6);
  padding: 4px 8px; margin-bottom: 4px; border: 1px solid #57406b; }
.stat b { color: #7fe3d0; }
#msg { position: absolute; top: 16%; width: 100%; text-align: center;
  font-size: 20px; letter-spacing: 3px; color: #ffd166; opacity: 0;
  transition: opacity .5s; text-shadow: 0 2px 8px #000; }
#paused { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  font-size: 28px; letter-spacing: 6px; background: rgba(20,12,30,.55); }
.card { background: rgba(24,15,34,.92); border: 1px solid #6b4f83; padding: 28px 34px;
  max-width: 520px; border-radius: 10px; text-align: center; }
#start, #over { position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(16,10,26,.55); }
#over { display: none; }
.card h1 { font-size: 30px; letter-spacing: 8px; color: #ffd166; margin-bottom: 8px; }
.card .tag { color: #9fd8c9; margin-bottom: 14px; }
.howto { list-style: none; text-align: left; font-size: 13.5px; line-height: 1.7;
  margin-bottom: 16px; }
.howto b { color: #7fe3d0; }
.bigbtn { display: inline-block; padding: 12px 34px; font: inherit; font-size: 16px;
  letter-spacing: 3px; color: #1a1226; background: #ffd166; border: 0; border-radius: 6px;
  cursor: pointer; text-decoration: none; font-weight: bold; }
.bigbtn:hover { background: #7fe3d0; }
.small { font-size: 11px; color: #a08fb5; margin-top: 12px; }
#touch { position: fixed; inset: auto 0 0 0; display: none;
  justify-content: space-between; padding: 14px; pointer-events: none; }
.tgroup { display: grid; gap: 6px; pointer-events: auto; }
#t-drive { grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(2, 54px);
  justify-items: center; align-items: center; }
#t-drive .tbtn:nth-child(1) { grid-column: 2; grid-row: 1; }
#t-drive .tbtn:nth-child(2) { grid-column: 1; grid-row: 2; }
#t-drive .tbtn:nth-child(3) { grid-column: 2; grid-row: 2; }
#t-drive .tbtn:nth-child(4) { grid-column: 3; grid-row: 2; }
#t-aim { grid-auto-flow: column; gap: 10px; align-items: center; }
.tbtn { width: 54px; height: 54px; border-radius: 12px; font-size: 20px;
  background: rgba(40,28,56,.75); color: #f2e4c8; border: 1px solid #6b4f83;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.tbtn:active { background: #ffd166; color: #1a1226; }
.tbtn.fire { width: 84px; height: 84px; border-radius: 50%; font-size: 16px;
  letter-spacing: 2px; background: rgba(120,45,30,.8); border-color: #ff7b5a; }
.tbtn.small { width: 54px; height: 54px; }
.t-note { position: absolute; bottom: 108px; right: 20px; font-size: 11px;
  color: #c9a46a; pointer-events: none; }
@media (pointer: coarse) { #touch { display: flex; } }
