/* las capas con display propio deben ocultarse de verdad cuando tienen hidden (si no, tapan el botón) */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: #eee; font: 14px/1.4 system-ui, sans-serif; overflow: hidden; }

#start { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
#start h1 { margin: 0; font-size: 42px; letter-spacing: 1px; }
#start button { font-size: 18px; padding: 12px 26px; border-radius: 10px; border: 0; background: #4db8ff; color: #001; cursor: pointer; font-weight: 600; }
#start .file { cursor: pointer; text-decoration: underline; opacity: .8; }
#start .file input { display: none; }
#start .small { opacity: .5; font-size: 12px; }

#stageWrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stageWrap canvas { position: absolute; max-width: 100vw; max-height: 100vh; }
#overlay { pointer-events: none; }

#hud { position: fixed; left: 12px; bottom: 12px; right: 12px; pointer-events: none; text-shadow: 0 1px 3px #000; }
#status { font-weight: 600; margin-bottom: 6px; }
#status .rec { color: #ff4d4d; }
#status .warn { color: #ffcc4d; }
#gesture { width: 160px; height: 6px; background: #ffffff22; border-radius: 3px; margin-bottom: 6px; overflow: hidden; }
#gestureBar { height: 100%; width: 0; background: #4db8ff; }
.keys { opacity: .7; font-size: 12px; }

#countdown { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(32px, 7vw, 96px); font-weight: 800; text-align: center; padding: 0 24px; text-shadow: 0 0 30px #000; pointer-events: none; }

#gestureName { color: #4db8ff; font-weight: 700; min-height: 1.4em; }
#bgHint { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: #000c; border: 2px solid #ffcc4d; color: #fff; padding: 14px 22px; border-radius: 12px; font-size: 20px; text-align: center; pointer-events: none; }
#bgHint span { font-size: 14px; opacity: .75; }
kbd { background: #ffcc4d; color: #000; border-radius: 4px; padding: 0 7px; font-weight: 800; }
#start .step { font-size: 18px; max-width: 560px; }
#start .step small { opacity: .7; font-size: 14px; }
#start .err { color: #ff6b6b; max-width: 560px; }
#gestBtn { pointer-events: auto; position: fixed; top: 12px; right: 12px; background: #000a; color: #4db8ff; border: 1px solid #4db8ff; border-radius: 999px; padding: 6px 14px; font: 600 13px system-ui; cursor: pointer; }
#gestBtn.off { color: #ffcc4d; border-color: #ffcc4d; }
#fxBar { pointer-events: auto; position: fixed; top: 52px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
#fxBar button { background: #000a; color: #ddd; border: 1px solid #ffffff44; border-radius: 10px; padding: 6px 12px; font: 600 13px system-ui; cursor: pointer; text-align: left; }
#fxBar button.on { background: #4db8ff; color: #001; border-color: #4db8ff; }
#start .guide { color: #4db8ff; font-weight: 600; text-decoration: none; }
