* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #0b1622; font-family: 'Segoe UI', system-ui, sans-serif; color: #dcebe6; }
#scene { position: fixed; inset: 0; display: block; touch-action: none; }
#hud { position: fixed; top: 10px; left: 12px; right: 12px; display: flex; gap: 14px; align-items: center; pointer-events: none; flex-wrap: wrap; text-shadow: 0 1px 4px #000; }
#hud .chip { background: rgba(10,22,30,.72); border: 1px solid #2c4a44; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
#det-bar { width: 150px; height: 10px; background: #16262e; border-radius: 6px; overflow: hidden; border: 1px solid #2c4a44; }
#det-fill { height: 100%; width: 0%; background: #59e6c0; transition: width .15s linear; }
#hud-hint { position: fixed; bottom: 118px; left: 50%; transform: translateX(-50%); background: rgba(10,22,30,.85); border: 1px solid #2c4a44; padding: 8px 16px; border-radius: 10px; opacity: 0; transition: opacity .5s; pointer-events: none; text-align: center; max-width: 92vw; }
#alarm-vignette { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(255,60,40,.55) 100%); }
.overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 18px; background: rgba(6,12,18,.82); text-align: center; padding: 20px; z-index: 20; }
.overlay h2 { font-size: 34px; letter-spacing: 3px; color: #ffb347; text-shadow: 0 0 18px rgba(255,179,71,.6); }
.overlay p { max-width: 520px; line-height: 1.6; color: #b9cfd0; }
.big-btn { background: linear-gradient(135deg, #ffb347, #f2884b); color: #1d1205; font-weight: 700; font-size: 18px; border: none; border-radius: 12px; padding: 14px 34px; cursor: pointer; letter-spacing: 1px; }
.big-btn:hover { filter: brightness(1.12); }
#touch-controls { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 14px; z-index: 15; pointer-events: none; }
#joy-zone { width: 120px; height: 120px; border-radius: 50%; background: rgba(30,60,55,.4); border: 2px solid rgba(89,230,192,.45); pointer-events: auto; touch-action: none; display: flex; align-items: center; justify-content: center; }
#joy-knob { width: 46px; height: 46px; border-radius: 50%; background: rgba(89,230,192,.55); pointer-events: none; }
#btn-crouch { pointer-events: auto; touch-action: none; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,179,71,.28); border: 2px solid rgba(255,179,71,.55); color: #ffd9a0; font-size: 12px; font-weight: 700; }
#btn-crouch.on { background: rgba(255,179,71,.65); color: #1d1205; }
@media (pointer: fine) { #touch-controls { display: none; } }
