#guideBackdrop{display:none;position:fixed;inset:0;z-index:2;background:#0d1422 center/cover no-repeat;pointer-events:none}
body[data-screen="guide"] #guideBackdrop{display:block}
/* Compact teaching dialog: one demo, one instruction, one primary action. */
#guidePanel{--prep-bg:#101824;--prep-text:#f5f6f8;--prep-muted:#a8b0bd;--prep-accent:#ffab70;position:fixed;inset:0;width:min(920px,calc(100vw - 48px));max-width:none;height:fit-content;max-height:calc(100dvh - 48px);margin:auto;padding:0;box-sizing:border-box;overflow:auto;border:1px solid #ffffff17;border-radius:24px;background:#181e29;color:var(--prep-text);box-shadow:0 28px 120px #02050ab3;text-align:left;animation:prep-appear .2s ease-out}
#guidePanel[open]{display:grid;grid-template-rows:auto auto auto}
#guidePanel::backdrop{background:#080c14a6;backdrop-filter:blur(9px)}
#guidePanel button{text-decoration:none;font-family:Poppins,sans-serif;letter-spacing:0;box-shadow:none;transform:none}
#guidePanel button::before,#guidePanel button::after{content:none}
#guidePanel .guide-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:72px;padding:0 24px 0 28px;margin:0;border:0;letter-spacing:0}
.preparation-label{font:600 14px/1.4 Poppins,sans-serif;color:#e9edf3}
.preparation-header-actions{display:flex;align-items:center;gap:13px}
#guideInputLabel{padding:6px 10px;border:1px solid #ffffff0e;border-radius:7px;background:#ffffff05;color:#aab4c2;font:400 10px/1.5 Poppins,sans-serif}
#guidePanel #guideBack{display:grid;place-items:center;width:36px;height:36px;min-height:36px;margin:0;padding:9px;background:transparent;border:0;border-radius:9px;color:#8995a7}
#guideBack svg{display:block;width:18px;height:18px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
#guidePanel #guideBack:hover{background:#ffffff09;color:#f5f6f8}
#guidePanel .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.preparation-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:32px;padding:0 32px 27px 24px;align-items:center;min-width:0}
.preparation-demo{height:354px;min-width:0;position:relative;overflow:hidden;border-radius:16px;background:#0c1524;isolation:isolate}
.preparation-demo::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,#0c1524 0%,transparent 17%,transparent 86%,#0c152444);z-index:1}
.preparation-live{position:relative;height:100%;overflow:hidden;border:0;border-radius:0;background:#0c1524}
#guideLiveViewport{width:100%;height:100%}
#guidePanel #game{display:block;width:100%!important;height:100%!important;outline-offset:-8px}
.preparation-live-header{position:absolute;bottom:16px;left:18px;right:18px;display:flex;align-items:center;gap:7px;z-index:2;font:400 10px/1.4 Poppins,sans-serif;color:#d1dbdf}
.live-indicator{width:5px;height:5px;flex-shrink:0;background:#a9deb9;border-radius:50%;box-shadow:0 0 9px #a9deb940}
.live-demo-label{margin-left:auto;font-size:8px;letter-spacing:.1em;color:#7f91a5}
.preparation-instruction{min-width:0;padding:6px 0}
.preparation-eyebrow{margin:0 0 11px;font:500 9px/1.5 Poppins,sans-serif;letter-spacing:.12em;color:#ffac76}
#guidePanel .guide-copy h2{font:600 29px/1.22 Poppins,sans-serif;letter-spacing:-.035em;color:#f5f6f8;text-shadow:none;margin:0 0 13px;text-wrap:balance;max-width:340px}
#guidePanel .guide-copy p{font:400 13px/1.85 Poppins,sans-serif;max-width:340px;color:#a8b3c3;margin:0;text-wrap:pretty}
#guidePanel .guide-bindings{display:block;margin:21px 0 0;padding:12px 14px;border:1px solid #ffffff0b;border-radius:9px;background:#ffffff03;color:#d8e0e7;font:500 11px/1.8 Poppins,sans-serif;white-space:normal}
#guideControlKeys{display:flex;align-items:center;gap:8px;margin-top:22px;color:#8290a2;font:400 10px/1.5 Poppins,sans-serif}
#guideControlKeys kbd{display:grid;place-items:center;width:36px;height:34px;padding:0;background:#232d3c;border:1px solid #ffffff17;border-bottom:3px solid #ffffff1c;border-radius:7px;font:500 18px/1 Poppins,sans-serif;color:#e4eaf2;box-shadow:none}
#guideControlKeys>span{margin-left:6px}
#guideHandHint{display:flex;align-items:center;gap:12px;margin:19px 0 0;color:#a4b1c1;font:400 10px/1.7 Poppins,sans-serif}
#guideHandHint svg{width:100px;height:44px;border-radius:8px;background:#ffffff04;flex-shrink:0}
#guideHandHint path{fill:none;stroke:#c9d4e2;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
#guideHandHint .gesture-arrow{stroke:#71839c;stroke-width:1.4}
.gesture-hand{animation:prep-hand 2.8s ease-in-out infinite;transform-origin:55px 32px}
.preparation-practice-row{display:flex;align-items:center;gap:18px;margin-top:20px}
#guidePanel #guidePractice{flex:1;min-width:0;max-width:none;margin:0}
#guidePanel #guideSteering{display:none}
#guidePanel .practice-checks{display:flex;justify-content:flex-start;gap:8px;flex-wrap:wrap;margin:0;font:400 10px/1.5 Poppins,sans-serif;color:#8996a8}
#guidePanel .practice-checks span{border:1px solid #ffffff0d;padding:6px 9px;border-radius:7px;background:#ffffff03;white-space:nowrap}
#guidePanel .practice-checks .done{color:#c1dfc7;background:#9edcb20a;border-color:#a1d4af2b}
#guidePanel #guidePracticeStatus{margin:9px 0 0;color:#8090a3;font:400 10px/1.5 Poppins,sans-serif}
#guideCameraSlot{position:relative;width:105px;flex-shrink:0;border:1px solid #ffffff1c;border-radius:9px;overflow:hidden;background:#0d1623}
#guideCameraSlot::before{content:"TU CÁMARA";position:absolute;left:7px;top:7px;z-index:2;color:#fff;text-shadow:0 1px 6px #000;font:500 6px/1.3 Poppins,sans-serif;letter-spacing:.12em;pointer-events:none}
#guidePanel #camwrap{position:static;inset:auto;width:100%;margin:0;padding:0;opacity:1;visibility:visible;border:0;box-shadow:none;border-radius:0;background:#101a2b}
#guidePanel #camcanvas{display:block;width:100%;height:auto}
#guidePanel .camera-help,#guidePanel .camera-controls,#guidePanel .motion-feedback{display:none}
#guidePanel #guideRetryCamera{margin:13px 0 0;padding:5px 0;color:#ffb482;font-size:11px}
#guidePictures{height:100%}
#guidePictures figure{margin:0;position:relative;height:100%;overflow:hidden;background:#0c1524;border:0;border-radius:0}
#guidePictures img{display:block;width:100%;height:100%;object-fit:contain}
.rule-fallback{height:100%;display:flex;align-items:center;justify-content:center;color:#d6e8bd;font:400 30px/1.5 SlopeDisplay,sans-serif;text-align:center}
.rule-fallback svg{width:100%;height:100%}
#guidePanel .guide-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:85px;margin:0;padding:16px 28px;border-top:1px solid #ffffff0b;background:#12192599;box-sizing:border-box}
.preparation-footer-context{min-width:0}
.preparation-progress-row{display:flex;align-items:center;gap:12px}
.preparation-progress ol{display:flex;gap:5px;list-style:none;margin:0;padding:0}
.preparation-progress li{height:4px;width:23px;border-radius:2px;background:#364050}
.preparation-progress [aria-current="step"]{background:#ffad77}
.preparation-progress .is-complete{background:#a37459}
#guideStep{color:#a1adbd;font:400 10px/1.5 Poppins,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
#guideFooterNote{display:inline-block;margin-top:7px;color:#728196;font:400 9px/1.5 Poppins,sans-serif}
#guidePanel #guideKeyboard{display:inline-block;min-height:25px;margin:0 0 0 9px;padding:0;background:none;color:#aebacb;font:400 9px Poppins,sans-serif;text-decoration:underline;text-underline-offset:3px}
.preparation-actions{display:flex;align-items:center;justify-content:flex-end;gap:18px}
#guidePanel #guidePrevious{min-height:44px;padding:10px 3px;background:none;border:0;border-radius:5px;color:#9dabbc;font:500 11px Poppins,sans-serif}
#guidePanel #guidePrevious:hover{color:#f5f6f8}
#guidePanel #guideNext{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:46px;width:155px;margin:0;padding:13px 17px;background:#ffab70;color:#221d1b;border:1px solid #ffb482;border-radius:10px;box-shadow:none;font:600 12px/1.4 Poppins,sans-serif}
#guidePanel #guideNext::after{content:"→";font:400 19px/1 Poppins,sans-serif;transition:transform .16s}
#guidePanel #guideNext:hover:enabled{background:#ffc099}
#guidePanel #guideNext:hover:enabled::after{transform:translateX(3px)}
#guidePanel #guideNext:disabled{opacity:1;background:#2a3342;color:#708096;border-color:#ffffff07;cursor:default}
#guidePanel :focus-visible{outline:2px solid #ffbd90;outline-offset:4px}
/* The control picker belongs to the same dialog family. */
#setupPanel{width:min(440px,calc(100vw - 32px));padding:30px;border:1px solid #ffffff17;border-radius:24px;background:#181e29;box-shadow:0 28px 120px #02050ab3;text-align:left}
#setupPanel::backdrop{background:#080c1488;backdrop-filter:blur(8px)}
#setupPanel .panel-eyebrow{font:500 9px Poppins,sans-serif;letter-spacing:.12em;color:#ffad77;margin:0 0 13px}
#setupPanel h2{font:600 26px/1.25 Poppins,sans-serif;letter-spacing:-.035em;text-shadow:none;color:#f5f6f8;margin:0}
#setupPanel .input-picker{gap:10px;margin:24px 0 14px}
#setupPanel .input-picker legend{font:400 11px Poppins,sans-serif;color:#9fadc0}
#setupPanel .input-picker button{font:500 12px Poppins,sans-serif;min-height:58px;padding:15px 12px;border:1px solid #ffffff12;border-radius:10px;background:#222b39;color:#a9b6c7;box-shadow:none;transform:none;letter-spacing:0}
#setupPanel .input-picker button[aria-pressed="true"]{border-color:#ffad7780;background:#ffad7710;color:#ffd8ba}
#setupPanel .input-hint{font:400 11px/1.8 Poppins,sans-serif;color:#94a3b8;min-height:38px}
#setupPanel .flow-primary{min-height:46px;padding:13px 16px;font:600 12px/1.5 Poppins,sans-serif;border:1px solid #ffb482;border-radius:10px;background:#ffab70;color:#221d1b;box-shadow:none;transform:none}
#setupPanel .flow-primary:hover{background:#ffc099}
#setupPanel #setupBack{font:400 11px Poppins,sans-serif;color:#92a2b8;margin:16px auto 0;min-height:30px}
#setupPanel button::before,#setupPanel button::after{content:none}
/* Keep the in-game camera compact after the guide. */
#cameraDock #camwrap{width:178px;right:18px;bottom:18px;padding:0 0 5px;border-radius:8px;overflow:hidden;background:#132031dd}
#cameraDock #camcanvas{display:block;width:100%;height:auto}
#cameraDock .camera-help,#cameraDock .motion-feedback,#cameraDock #keyboardBtn,#cameraDock #cameraSelect{display:none!important}
#cameraDock .camera-controls{display:flex;gap:4px;margin:5px 6px 0;justify-content:center;flex-wrap:nowrap}
#cameraDock .camera-controls button{min-height:30px;flex:1;min-width:0;padding:5px 4px;font:400 9px Poppins,sans-serif;letter-spacing:0;border:0;border-radius:4px;box-shadow:none;transform:none;background:#25394a;color:#dce5d6}
@keyframes prep-appear{from{opacity:0;transform:translateY(7px) scale(.99)}to{opacity:1;transform:none}}
@keyframes prep-hand{0%,100%{transform:translateX(-6px) rotate(-5deg)}50%{transform:translateX(6px) rotate(5deg)}}
@media(pointer:coarse){#guidePanel #guideBack{width:44px;height:44px}#cameraDock .camera-controls button{min-height:44px}}
@media(min-width:701px) and (max-height:620px){
 #guidePanel{max-height:calc(100dvh - 24px);width:min(880px,calc(100vw - 40px))}
 #guidePanel .guide-header{min-height:58px}
 .preparation-demo{height:302px}
 .preparation-grid{padding-bottom:20px;gap:25px}
 #guidePanel .guide-copy h2{font-size:26px}
 #guidePanel .guide-copy p{font-size:12px}
 #guidePanel .guide-footer{min-height:76px;padding-top:12px;padding-bottom:12px}
 #guideControlKeys,#guideHandHint{margin-top:15px}
 .preparation-practice-row{margin-top:15px}
}
@media(max-width:700px){
 #guidePanel{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:20px}
 #guidePanel .guide-header{min-height:61px;padding:0 16px 0 20px}
 .preparation-label{font-size:12px}
 #guideInputLabel{font-size:9px}
 .preparation-header-actions{gap:5px}
 .preparation-grid{grid-template-columns:1fr;padding:0 20px 20px;gap:19px}
 .preparation-demo{height:clamp(155px,26dvh,240px);border-radius:12px}
 .preparation-live-header{bottom:12px;left:13px;right:13px;font-size:9px}
 .live-demo-label{font-size:7px}
 .preparation-instruction{padding:0}
 .preparation-eyebrow{font-size:8px;margin-bottom:9px}
 #guidePanel .guide-copy h2{font-size:25px;max-width:100%;margin-bottom:11px}
 #guidePanel .guide-copy p{font-size:12px;line-height:1.8;max-width:none}
 #guideControlKeys,#guideHandHint{margin-top:15px}
 .preparation-practice-row{margin-top:15px}
 #guideCameraSlot{width:94px}
 #guidePanel .guide-bindings{margin-top:16px;font-size:10px;padding:10px 12px}
 #guidePanel .guide-footer{padding:15px 20px;gap:13px;min-height:78px;flex-wrap:wrap}
 #guideFooterNote{display:none}
 #guidePanel #guideKeyboard{margin:7px 0 0;font-size:9px;min-height:24px}
 .preparation-progress-row{gap:9px}
 .preparation-progress li{width:16px;gap:4px}
 .preparation-actions{gap:13px;margin-left:auto}
 #guidePanel #guideNext{width:128px;gap:15px;padding:12px 14px;font-size:11px}
 #guidePanel #guidePrevious{font-size:10px}
 #guideStep{font-size:9px}
 #cameraDock #camwrap{width:min(150px,38vw);right:10px;bottom:10px}
 #cameraDock .camera-controls button{font-size:8px;min-height:30px}
}
@media(max-width:390px){
 #guidePanel .guide-footer{gap:12px}
 .preparation-progress li{width:12px}
 .preparation-actions{gap:9px}
 #guidePanel #guideNext{width:116px}
 #guidePanel #guidePrevious{padding-left:0;padding-right:0}
}
@media(prefers-reduced-motion:reduce){#guidePanel,#guidePanel *,#guidePanel *::after{animation:none!important;transition:none!important}}
