:root { --vl-bg: #0b141c; --vl-fg: #eaf4fb; --vl-accent: #ffcf4a; --vl-muted: #9db3c4; --vl-panel: rgba(9, 18, 26, 0.86); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--vl-bg); color: var(--vl-fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
canvas.vl-canvas { display: block; touch-action: none; }
.vl-hud { position: fixed; inset: 0; pointer-events: none; }
.vl-cross { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.4); display: none; }
body.vl-locked .vl-cross, body.vl-touch .vl-cross { display: block; }
.vl-hover { position: absolute; left: 50%; top: calc(50% + 18px); transform: translateX(-50%); background: var(--vl-panel); padding: 4px 10px; border-radius: 6px; font-size: 13px; display: none; white-space: nowrap; }
.vl-fuse { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; display: none;
  background: conic-gradient(var(--vl-accent) calc(var(--p, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px); }
.vl-pad { position: fixed; left: 24px; bottom: 28px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.3); touch-action: none; }
.vl-knob { position: absolute; left: 35px; top: 35px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.6); }
body.vl-xr .vl-pad, body.vl-xr .vl-ui { display: none !important; }
.vl-vrbtn { z-index: 20; }

.vl-ui { position: fixed; z-index: 10; }
.vl-top { top: 12px; left: 12px; right: 12px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.vl-top > * { pointer-events: auto; }
.vl-card { background: var(--vl-panel); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 14px; backdrop-filter: blur(6px); max-width: 420px; }
.vl-card h1 { font-size: 16px; margin: 0 0 4px; }
.vl-card p { margin: 0; color: var(--vl-muted); font-size: 13px; }
.vl-back { color: var(--vl-fg); text-decoration: none; font-size: 13px; opacity: .8; display: inline-flex; align-items: center; min-height: 24px; }   /* 24 px target: WCAG 2.5.8, lab/43 */
.vl-back:hover { opacity: 1; }
.vl-btn { appearance: none; border: 0; background: #2a6f97; color: #fff; padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.vl-btn:hover { background: #3584b2; }
.vl-btn.alt { background: rgba(255,255,255,.12); }
.vl-btn.gold { background: var(--vl-accent); color: #1b1300; }

.vl-start { position: fixed; inset: 0; z-index: 30; display: grid; place-items: safe center; overflow-y: auto; background: radial-gradient(ellipse at center, rgba(11,20,28,.75), rgba(11,20,28,.96)); padding: 16px; }
.vl-start .box { max-width: 520px; text-align: center; padding-bottom: 64px; } /* room for three.js Enter VR button (inline z-index 999, bottom centre): LESSONS E1 */
.vl-start h1 { font-size: 26px; margin: 0 0 6px; }
.vl-start .kicker { color: var(--vl-accent); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.vl-start p { color: var(--vl-muted); }
.vl-start .keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; text-align: left; margin: 14px auto; max-width: 360px; font-size: 13px; }
.vl-start kbd { background: rgba(255,255,255,.1); border-radius: 4px; padding: 1px 6px; font: 12px ui-monospace, monospace; }
.vl-start .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
body.vl-touch .desk-only { display: none; }
body:not(.vl-touch) .touch-only { display: none; }
.hidden { display: none !important; }
@media (max-width: 600px) { .vl-card { max-width: 70vw; } .vl-start h1 { font-size: 22px; } }

/* comfort: options menu, vignette, click-to-move fade (LESSONS D1) */
.vl-comfort-btn { position: fixed; right: 12px; bottom: 14px; z-index: 35; appearance: none; border: 1px solid rgba(255,255,255,.18); background: var(--vl-panel); color: var(--vl-fg); padding: 8px 12px; border-radius: 999px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.vl-comfort { position: fixed; right: 12px; bottom: 58px; z-index: 36; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow: auto; background: var(--vl-panel); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px 16px; backdrop-filter: blur(8px); }
.vl-comfort[hidden] { display: none; }
.vl-comfort h2 { font-size: 16px; margin: 0 0 4px; }
.vl-comfort .note { color: var(--vl-muted); font-size: 12px; margin: 0 0 10px; }
.vl-comfort label { display: grid; gap: 4px; margin: 0 0 10px; font-size: 13px; }
.vl-comfort label span { display: flex; justify-content: space-between; gap: 8px; }
.vl-comfort label.chk { display: flex; align-items: center; gap: 8px; }
.vl-comfort input[type=range] { width: 100%; accent-color: var(--vl-accent); }
.vl-comfort select { font: inherit; padding: 4px; border-radius: 6px; }
.vl-comfort .row { display: flex; gap: 8px; justify-content: flex-end; }
.vl-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.92) 100%); }
.vl-fade { position: fixed; inset: 0; pointer-events: none; z-index: 6; background: #000; opacity: 0; transition: opacity .15s; }
.vl-fade.on { opacity: 1; }
body.vl-xr .vl-comfort-btn, body.vl-xr .vl-comfort, body.vl-xr .vl-vignette { display: none !important; }
body.vl-touch .vl-comfort-btn { bottom: 150px; }
