@font-face{font-family:Barlow;src:url(assets/fonts/barlow-condensed-extrabold-italic.ttf);font-weight:800;font-style:italic;font-display:swap}
@font-face{font-family:Plex;src:url(assets/fonts/ibm-plex-mono-medium.ttf);font-weight:500;font-display:swap}
:root{color-scheme:dark;--orange:#ff7847;--paper:#efede8;--muted:#a3a0a0;--line:#373639;font-family:Plex,monospace;color:var(--paper);background:#151517;-webkit-tap-highlight-color:transparent}
*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:2px solid #ffab79;outline-offset:3px}button:hover{filter:brightness(1.18)}button:active{transform:translateY(1px)}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.symbols{position:absolute;width:0;height:0;overflow:hidden}
#console{height:100vh;height:100svh;min-height:410px;display:grid;grid-template-rows:64px minmax(0,1fr) 110px 34px;user-select:none;-webkit-user-select:none}
header{display:flex;align-items:center;gap:20px;padding:0 max(3.2vw,env(safe-area-inset-right)) 0 max(3.2vw,env(safe-area-inset-left));background:linear-gradient(110deg,#1d1c20,#151518);border-bottom:1px solid #49404a;z-index:3}.brand{display:flex;align-items:center;gap:10px;white-space:nowrap}.brand img{width:40px}.brand span{font:italic 800 32px/.9 Barlow,sans-serif;letter-spacing:.15px}.brand-detail{font-size:10px;letter-spacing:1.8px;color:#a09b9b;padding:6px 0 6px 20px;border-left:1px solid var(--line)}nav{margin-left:auto;display:flex;align-items:center;gap:9px}nav button,.actions button:not(.primary),#close{background:#232326;border:1px solid #454348;border-radius:5px}nav button{display:flex;align-items:center;justify-content:center;gap:9px;height:34px;padding:0 13px;font-size:11px}nav svg{width:15px;height:15px}nav .icon-only{width:35px;padding:0}
#stage{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(#27253a,#49384b 50%,#191821);touch-action:none}#world,#plate,.shade,#flash{position:absolute;inset:0;pointer-events:none}#world{background:#262837 url(assets/alpine-sky.webp) center center / cover}#world canvas{display:block;width:100%;height:100%}#plate{background:url(assets/midnight-pass.webp) center 53% / cover;opacity:1;transition:opacity .45s}body.live #plate{opacity:0}.shade{background:linear-gradient(180deg,#11101a3d,transparent 38%,transparent 67%,#0c0c1185),linear-gradient(90deg,#11101828,transparent 45%);z-index:1}
.stage-title,.minimap,.control,#notice,#anchor,#cal-panel{position:absolute;z-index:2}.stage-title{top:clamp(22px,4.4vh,50px);left:3.3vw;pointer-events:none;text-shadow:0 2px 18px #05051070}.tags,.place,.map-head,.map-foot,.control-caption,.label,footer{display:flex;align-items:center;font-size:10px;letter-spacing:1.4px}.tags{gap:10px;font-size:10px;text-shadow:none}.tags b,.tags span{display:inline-flex;align-items:center;height:22px;border-radius:3px;padding:0 8px}.tags b{color:#ff9b6e;background:#2b1d21df;border:1px solid #b26b50;gap:6px}.tags b i{width:6px;height:6px;background:var(--orange);transform:skew(-16deg)}.tags span{color:#ece8e7;background:#191924b5;border:1px solid #a59ba35c}
h1,h2{font:italic 800 clamp(50px,5.2vw,85px)/1.01 Barlow,Impact,sans-serif;letter-spacing:-1.2px;margin:9px 0 10px}h1{color:#f3eee9}.place{gap:8px;color:#e2dad9;font-size:10px;letter-spacing:1.8px}.place svg{width:14px;height:14px;color:#fa946a}.place em,.keys em{width:3px;height:3px;background:#b2a7a8;border-radius:50%;margin:0 3px}
.minimap{top:clamp(22px,4.4vh,50px);right:3.3vw;width:166px;padding:10px 12px 8px;border:1px solid #b5a6b244;border-radius:5px;background-color:#171720b8;background-image:linear-gradient(#9d919c0b 1px,transparent 1px),linear-gradient(90deg,#9d919c0b 1px,transparent 1px);background-size:14px 14px;box-shadow:0 4px 15px #11121a20;color:#e7dfdc}.map-head{font-size:9px;letter-spacing:1.3px;gap:5px}.map-head i{margin-left:auto;height:4px;width:4px;background:#9dcea9;border-radius:50%}.map-sign{color:var(--orange);font-size:17px;line-height:10px}#map{width:100%;height:66px;overflow:visible}.map-foot{justify-content:space-between;color:#ada7b0;font-size:7px;letter-spacing:1.3px}#position-ring{fill:#ff79442a;stroke:var(--orange)}#position{fill:#ffab83;stroke:none}
.control{bottom:clamp(18px,3.2vh,36px);display:flex;flex-direction:column;align-items:center;gap:10px}.steer{left:4.8vw}.pedals{right:4.8vw}.pad{--d:clamp(106px,12vw,162px);width:var(--d);height:var(--d);position:relative;border-radius:50%;border:1px solid #a7a0a277;box-shadow:0 3px 8px #07080d99,inset 0 1px 1px #aaa5a344,inset 0 0 0 4px #232327ba,inset 0 0 0 5px #a8a2a340;background:radial-gradient(ellipse at 45% 27%,#46444bb8,#1f1e24d1 56%,#18181ce8 82%);touch-action:none;cursor:grab}.pad:active{cursor:grabbing}.ticks{position:absolute;inset:7px;border-radius:50%;background:repeating-conic-gradient(from 0deg,#b2ada9aa 0deg 1deg,transparent 1deg 12deg);mask:radial-gradient(circle,transparent 66%,#000 67%);-webkit-mask:radial-gradient(circle,transparent 66%,#000 67%)}.knob{position:absolute;inset:25%;border-radius:50%;display:grid;place-items:center;background:radial-gradient(ellipse at 40% 12%,#515058,#35353c 55%,#28282d 86%);box-shadow:0 5px 8px #07070ac2,0 0 0 4px #15151a6e,inset 0 1px 2px #a7a4a588,inset 0 -2px 2px #101014;border:1px solid #5a585d;pointer-events:none}.knob:after{content:"";position:absolute;inset:5px;border:1px solid #98909823;border-radius:50%}.knob svg{width:43%;height:43%;color:#ddd8d8;filter:drop-shadow(0 2px 1px #18181b)}.dir{position:absolute;border:4px solid transparent;opacity:.9}.dir.left{left:10%;top:calc(50% - 4px);border-right-color:#bbb6b8}.dir.right{right:10%;top:calc(50% - 4px);border-left-color:#bbb6b8}.dir.up{top:9%;left:calc(50% - 4px);border-bottom-color:var(--orange)}.dir.down{bottom:9%;left:calc(50% - 4px);border-top-color:#bbb6b8}.control-caption{font-size:9px;color:#e3ddde;letter-spacing:2px;text-shadow:0 1px 4px #000;gap:7px}.control-caption i{height:1px;width:12px;background:#aaa4a778}
.dash{background:linear-gradient(180deg,#28272c,#1c1c1f);border-top:2px solid #4d484a;box-shadow:0 -3px 12px #09090e59;display:grid;grid-template-columns:1.1fr 1.15fr 1fr 1.15fr 1fr;align-items:center;padding:0 3.3vw;z-index:3;gap:2vw}.instrument{height:60px;border-right:1px solid #46444896;display:flex;flex-direction:column;justify-content:flex-start;padding-right:2vw}.label{font-size:9px;letter-spacing:1.7px;color:#b3afb1;gap:6px;margin-bottom:6px}.label svg{width:13px;height:13px;color:#a8a0a1}.speed-line{display:flex;align-items:baseline;gap:8px;color:var(--orange)}#speed-num{display:flex;gap:3px;padding:1px 2px}#speed-num svg{width:24px;height:38px;stroke:none}.speed-line small,.reading small{font:500 10px Plex,monospace;letter-spacing:.6px;color:#b3aba9}.speed-line small{color:#d59271}.reading{font-size:25px;line-height:1.15;letter-spacing:-1px;white-space:nowrap}.track{height:3px;background:#454449;max-width:140px;margin-top:5px}.track i{display:block;width:0;background:var(--orange);height:100%}#gates{display:flex;gap:4px;margin-top:5px}#gates i{width:16px;height:3px;background:#47464a;transform:skew(-18deg)}#gates i.done{background:var(--orange)}#time{letter-spacing:-1.5px}#time span{color:#aaa4a5;font-size:.77em}.primary{background:var(--orange);color:#241a17;border:1px solid #ff976a;border-radius:4px;box-shadow:inset 0 1px 0 #ffb68a66;font-weight:600}.drive{height:46px;display:flex;justify-content:center;align-items:center;gap:9px;text-transform:uppercase;white-space:nowrap;font-size:12px;letter-spacing:1px}.drive svg{width:15px;height:15px;stroke-width:2}.drive-arrow{margin-left:4px}
footer{background:#151517;border-top:1px solid #3a373b;padding:0 3.3vw;gap:16px;color:#949094;font-size:8px;letter-spacing:1.3px;justify-content:space-between}.status,.keys,.mode{display:flex;align-items:center;gap:7px}.status i,.mode i{width:6px;height:6px;border-radius:50%;background:#a4bf9c;box-shadow:0 0 5px #b2ff9d32}.mode i{border-radius:1px;background:#b8b3af;width:8px;height:5px}.keys{letter-spacing:1px;gap:4px}.keys em{margin:0 8px;background:#68646a}kbd{font:500 8px Plex,monospace;color:#b0aaac;border:1px solid #555157;padding:1px 4px;border-radius:2px}.keys kbd:last-of-type{font-size:7px}
#notice{left:50%;top:12%;transform:translate(-50%,-8px);opacity:0;transition:opacity .2s,transform .2s;background:#1e1b23e8;border:1px solid #a77559;color:#ffb38c;border-radius:3px;padding:8px 16px;font-size:11px;letter-spacing:.7px;text-align:center;pointer-events:none}#notice.show{opacity:1;transform:translate(-50%,0)}#flash{background:#ff6b43;opacity:0;z-index:4}#flash.hit{animation:hit .5s ease-out}@keyframes hit{0%{opacity:.4}100%{opacity:0}}
dialog,#cal-panel{color:var(--paper);border:1px solid #575157;border-radius:8px;background:linear-gradient(150deg,#2d2b31,#1a1a1e);box-shadow:0 14px 65px #08080db3}dialog{padding:0;width:min(440px,92vw);max-height:91svh}dialog::backdrop{background:#090910a9;backdrop-filter:blur(5px)}.modal-inner{position:relative;padding:28px}#close{position:absolute;right:12px;top:12px;width:28px;height:28px;font:20px Arial;color:#b9b3b4}h2{font-size:42px;margin:14px 0}#modal-body p,#cal-panel p{font:14px/1.55 system-ui,sans-serif;color:#c9c3c5}#modal-body strong{color:#f4dfd2}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:20px}.actions button{padding:9px 13px;min-height:36px;font-size:11px}.record{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #403c43;font-size:12px;color:#c6c1c1}.record b{color:var(--orange)}
#cal-panel{top:18px;left:50%;transform:translateX(-50%);width:min(405px,65%);padding:14px 17px;text-align:center;z-index:5}#cal-panel h2{font-size:28px;margin:0}#cal-panel p{margin:5px 0;font-size:12px}#cal-panel .actions{justify-content:center;margin:8px 0 0}#anchor{width:54px;height:86px;transform:translate(-50%,-50%);border:2px dashed #ffa47a;border-radius:14px;pointer-events:none}#anchor:before,#anchor:after{content:"";position:absolute;background:var(--orange);left:50%;top:50%;width:16px;height:2px;transform:translate(-50%,-50%)}#anchor:after{transform:translate(-50%,-50%) rotate(90deg)}#anchor span{position:absolute;left:calc(50% - 5px);top:-9px;border:5px solid transparent;border-bottom-color:var(--orange)}body[data-state=calibration] .stage-title,body[data-state=calibration] .minimap,body[data-state=calibration] .control{visibility:hidden}body[data-state=running] h1{font-size:clamp(32px,3.8vw,54px)}body[data-state=running] .drive{background:#313035;border-color:#5b565c;color:#ded8d7}body[data-state=running] .drive-arrow{display:none}
@media(min-width:1600px){#console{grid-template-rows:72px minmax(0,1fr) 125px 38px}}
@media(max-width:950px){#console{grid-template-rows:54px minmax(0,1fr) 89px 27px}.brand-detail{font-size:8px;letter-spacing:1.2px}.instrument{height:53px}.dash{gap:1.5vw}.minimap{width:139px}#map{height:52px}.drive{font-size:10px;gap:6px}.reading{font-size:22px}.label{font-size:8px;letter-spacing:1.2px}.speed-line small,.reading small{font-size:8px}#speed-num svg{width:20px;height:31px}.place{font-size:9px}.drive-arrow{display:none}}
@media(max-height:550px) and (orientation:landscape){#console{min-height:300px;grid-template-rows:42px minmax(0,1fr) 65px 21px}.brand span{font-size:24px}.brand img{width:30px}nav button{height:29px}.stage-title,.minimap{top:12px}h1{font-size:40px;margin:4px 0}.tags b,.tags span{height:17px;font-size:8px}.minimap{width:110px;padding:6px 8px}#map{height:38px}.pad{--d:80px}.control{gap:4px;bottom:9px}.instrument{height:46px}.label{margin-bottom:3px}.reading{font-size:19px}.dash .primary{height:36px}.control-caption{font-size:7px}.keys{font-size:7px}.place{font-size:8px}.map-foot{display:none}#cal-panel{top:4px;padding:6px}#cal-panel h2{font-size:21px}#cal-panel .actions button{padding:4px 8px;min-height:26px}}
@media(max-width:650px) and (orientation:portrait){#console{grid-template-rows:55px minmax(0,1fr) 118px 28px}.brand-detail,.keys{display:none}.brand span{font-size:24px}.brand img{width:29px}.brand{gap:4px}header,nav{gap:6px}nav button{padding:0 8px;font-size:10px}nav #audio span{display:none}.stage-title{top:20px}.minimap{top:20px;width:95px;padding:6px}#map{height:38px}.map-foot{display:none}.map-head{font-size:7px}h1{font-size:40px}.tags{gap:4px}.tags b,.tags span{font-size:7px;padding:0 5px}.dash{grid-template-columns:repeat(4,1fr);grid-template-rows:57px 38px;gap:4px;padding:8px 12px}.drive{grid-column:1/-1;height:34px}.reading{font-size:17px}.reading small{font-size:7px}.label{font-size:7px;letter-spacing:.4px}.label svg{width:10px}.speed-line{gap:2px}#speed-num{gap:1px}#speed-num svg{width:13px;height:27px}.stage-title .place{font-size:7px}.time{border:0}.control{bottom:16px}.pad{--d:96px}#cal-panel{width:90%}#notice{top:27%}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}#flash.hit{animation:none}}

.target{font-size:8px;color:#c49d7b;letter-spacing:1px;margin-top:4px;line-height:1}@media(max-height:550px) and (orientation:landscape){.target{font-size:7px;margin-top:1px}}@media(pointer:coarse) and (min-height:550px){nav button{min-height:40px}.icon-only{min-width:40px}}
