:root {
  --brass: #d8b25c;
  --dim: #8a93ad;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  overflow: hidden;
  background: #0d1220;
  font-family: ui-monospace, Menlo, monospace;
  color: var(--brass);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#gl, #gl canvas { position: fixed; inset: 0; display: block; }
#touch { position: fixed; inset: 0; touch-action: none; z-index: 1; }

#hud { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
#hud-top {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 10px; right: 10px;
  display: flex; justify-content: space-between;
}
.chip {
  border: 1px solid #3a4358;
  border-radius: 4px;
  background: rgba(13, 18, 32, 0.72);
  padding: 5px 10px;
  font-size: 15px; font-weight: 700;
  letter-spacing: 1px;
}
.chip.dim, .dim { color: var(--dim); font-size: 12px; font-weight: 400; }
.chip.bump { animation: bump 0.25s; }
@keyframes bump { 40% { transform: scale(1.18); } }

#h-status {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 100%;
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
}
#h-status.pulse { animation: pulse 1.5s infinite; color: var(--brass); }
@keyframes pulse { 50% { opacity: 0.45; } }

#h-flash {
  position: absolute;
  top: 26%;
  width: 100%;
  text-align: center;
  font-size: 28px; font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(216, 178, 92, 0.35);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s, transform 0.15s;
}
#h-flash.on { opacity: 1; transform: scale(1); }
#h-flash.good { color: #9fe6a8; }
#h-flash.bad { color: #e08a8a; }
#h-flash.gold { color: #ffd76a; font-size: 34px; }
#h-flash.dim { font-size: 16px; }

#hint {
  position: fixed;
  bottom: max(46px, env(safe-area-inset-bottom));
  width: 100%;
  z-index: 2;
  text-align: center;
  font-size: 11px;
  color: #5a6478;
  pointer-events: none;
  animation: fadeout 1s 6s forwards;
}
@keyframes fadeout { to { opacity: 0; } }

#fatal {
  position: fixed; z-index: 4;
  bottom: 20px; left: 12px; right: 12px;
  display: none;
  background: #3a1d1d; border: 1px solid #b04040;
  border-radius: 6px; padding: 10px;
  font-size: 12px; color: #f0c8c8;
}
