.howto-section{scroll-margin-top:100px}.howto-section .section-heading{max-width:900px}.howto-section .section-heading h2{font-size:clamp(34px,5vw,66px);line-height:1.06;max-width:900px;text-wrap:balance}.howto-layout{display:grid;grid-template-columns:minmax(240px,.75fr) minmax(0,1.25fr);gap:36px;align-items:start}.howto-section .guide-lessons{min-width:0}.howto-section .guide-step{border-top:1px solid #b8d1b32a;border-bottom:0;background:none;border-radius:0;padding:0}.howto-section summary{min-height:64px;display:flex;align-items:center;gap:15px;padding:14px 4px;cursor:pointer;list-style:none;font-size:17px;line-height:1.3}.howto-section summary::-webkit-details-marker{display:none}.howto-section .guide-step[open] summary{color:#dcf78e}.howto-section .guide-step p{margin:0;padding:0 4px 22px 40px;line-height:1.65;color:#bac7b9;font-size:15px}.howto-section .lesson-num{font:12px monospace;color:#9eae99;flex:none}.howto-section .lesson-expand{margin-left:auto}.howto-panel{position:sticky;top:100px;min-width:0;border:1px solid #b8d1b32a;border-radius:22px;overflow:hidden;background:#101d17;padding:25px;box-shadow:0 22px 60px #0003}.howto-panel-heading{display:flex;justify-content:space-between;gap:14px;color:#d9f78c;font:11px/1.5 monospace;letter-spacing:1.5px}.howto-panel h3{font-size:clamp(22px,3vw,32px);margin:12px 0 22px;line-height:1.15}.howto-scene{position:relative;aspect-ratio:360/148;background:#142630;border-radius:12px;isolation:isolate;overflow:hidden}.howto-scene canvas{display:block;width:100%;height:100%;object-fit:contain}.howto-finger{position:absolute;width:clamp(27px,6%,43px);height:auto;z-index:2;pointer-events:none;filter:drop-shadow(0 2px 2px #0009);transform-origin:20% 5%;opacity:.95}.howto-finger.is-pressing{filter:drop-shadow(0 0 7px #d9f78c)}.howto-scene[data-state="loading"] .howto-finger{display:none}.howto-progress{height:3px;background:#334738;margin:13px 0 20px;overflow:hidden}.howto-progress span{display:block;height:100%;width:0;background:#d9f78c}.howto-description{font-size:16px;line-height:1.6;color:#d6dfd1;min-height:3.2em}.howto-control-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:18px 0;border-top:1px solid #b8d1b32a}.howto-control-grid span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:1px;color:#a4b99f}.howto-control-grid p{font-size:14px;line-height:1.5;margin:7px 0 0;color:#f1f5e9;overflow-wrap:anywhere}.howto-actions{display:flex;flex-wrap:wrap;gap:8px}.howto-actions button{min-height:44px;min-width:44px;padding:11px 14px;border:1px solid #668357;border-radius:9px;background:#263c29;color:#f0f4df;font:600 13px/1.3 inherit;cursor:pointer}.howto-actions button:first-child{background:#d9f78c;color:#15251b;border-color:#d9f78c}.howto-actions button:disabled{opacity:.45;cursor:default}.howto-section :is(button,summary,a):focus-visible{outline:3px solid #efffb5;outline-offset:4px}.howto-note,#howto-status{font-size:12px;line-height:1.5;color:#9cb099}.howto-note{margin:16px 0 0}#howto-status:empty{display:none}.howto-play{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #b8d1b32a;margin-top:22px;padding-top:20px}.howto-play>span{font-size:14px;color:#d8e6ca}.howto-play .cta{font-size:14px;min-height:46px;padding:12px 17px;white-space:normal}.howto-section [hidden]{display:none!important}#howto-fallback{position:absolute;inset:0;display:grid;place-content:center;padding:25px;text-align:center;font-size:14px;color:#fff3d6;background:#142630}.howto-scene[data-state="error"] canvas{opacity:0}.howto-section .guide-step p:empty{display:none}
@media(max-width:900px){.howto-layout{grid-template-columns:1fr;gap:20px}.howto-panel{position:static;order:-1}.howto-section summary{min-height:54px}.howto-section .guide-step p{padding-left:34px}.howto-section .section-heading{margin-bottom:28px}}
@media(max-width:480px){.howto-panel{padding:16px;border-radius:16px}.howto-control-grid{grid-template-columns:1fr;gap:13px}.howto-panel-heading{font-size:10px;letter-spacing:1px}.howto-play{align-items:stretch;flex-direction:column}.howto-play .cta{justify-content:space-between}.howto-actions{display:grid;grid-template-columns:1fr 1fr}.howto-actions button:first-child{grid-column:1/-1}.howto-section summary{font-size:16px}.howto-description{font-size:14px}.howto-panel h3{margin-bottom:16px}.howto-finger{width:28px}}
@media(prefers-reduced-motion:reduce){.howto-section *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

#howto-panel{scroll-margin-top:145px}@media(max-width:900px){#howto-panel{scroll-margin-top:90px}}

@media(min-width:701px) and (max-width:1100px){header #section-navigation{flex-wrap:wrap;justify-content:center;max-width:100%;gap:4px 16px}header{height:auto;min-height:92px}}

.howto-scene{aspect-ratio:4/5;max-height:650px;background:#142630;overflow:hidden}.howto-scene iframe{display:block;border:0;width:100%;height:100%;min-height:480px}.howto-panel{position:static}#howto-panel{position:static}.howto-layout{align-items:start}@media(max-width:600px){.howto-scene{aspect-ratio:3/5;max-height:none}.howto-scene iframe{min-height:470px}}

.howto-actions{margin:0 0 18px}.howto-scene{margin-inline:auto}.howto-control-grid{margin-top:20px}#howto-fallback{position:absolute;inset:0;z-index:2;background:#142630;padding:24px}.howto-scene{position:relative}

/* Original combat panel needs its own space below the battlefield. */
#howto-original{aspect-ratio:3/4;max-height:760px;min-height:600px} @media(max-width:600px){#howto-original{aspect-ratio:1/2;min-height:620px;max-height:760px}}
.howto-scene{height:700px;aspect-ratio:auto}.howto-scene #howto-original{display:block;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;align-self:stretch}@media(max-width:600px){.howto-scene{height:620px}}

body.guide-demo-visible .mobile-dock{display:none}

.howto-scene iframe[hidden]{display:none!important}.howto-scene #howto-shop{display:block;width:100%;height:100%;border:0;min-height:0;aspect-ratio:auto}.trade-card{display:grid;grid-template-columns:1fr 1.2fr;gap:36px;align-items:center;padding:36px;border:1px solid #41524a;border-radius:24px;background:#18251f}.trade-art img{width:100%;height:auto;object-fit:contain}.trade-labels{display:flex;gap:10px;flex-wrap:wrap}.trade-labels span{padding:8px 14px;border:1px solid #66795c;border-radius:30px;color:#d2e9a0}.trade-card p{line-height:1.65;color:#c6d0c7}.trade-card a{display:inline-flex;padding:14px 22px;border-radius:12px;background:#d2e9a0;color:#162617;font-weight:700;text-decoration:none}@media(max-width:700px){.trade-card{grid-template-columns:1fr;gap:12px;padding:22px}.trade-art img{max-height:150px}}

/* Match the 4:3 game film plus the compact 156px control dock. */
.howto-panel{container-type:inline-size}.howto-scene:has(#howto-original:not([hidden])){height:calc(75cqw + 156px);max-height:none}

/* Compact lesson navigation: one row, still 44px touch targets. */
.howto-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:12px}
.howto-actions button,.howto-actions button:first-child{grid-column:auto;min-width:0;min-height:44px;height:44px;padding:6px 5px;font-family:inherit;font-size:13px;font-weight:600;line-height:1.15;overflow-wrap:normal}
.howto-actions:has(#howto-pause[hidden]){grid-template-columns:repeat(2,minmax(0,1fr))}

/* Stable mobile viewer: browser chrome cannot resize the lesson during playback. */
#guide{overflow-anchor:none}.howto-panel{overflow-anchor:none}
@media(max-width:900px){
 .howto-panel{padding:12px}
 .howto-panel-heading{line-height:16px;min-height:16px}
 .howto-panel h3{font-size:20px;line-height:24px;min-height:48px;margin:6px 0 8px}
 .howto-actions{margin-bottom:8px}
 .howto-scene:has(#howto-original:not([hidden])){height:min(calc(75cqw + 156px),calc(100svh - 280px));min-height:200px}
 .howto-scene:has(#howto-shop:not([hidden])){height:calc(100svh - 280px);min-height:240px;max-height:620px}
 .howto-progress{margin:8px 0 12px}
 #howto-status{min-height:36px}
 #howto-status:empty{display:block}
}

/* Cropped original recordings: the box follows the film, never a letterboxed viewport. */
#guide{--lesson-chrome:260px}
.howto-scene{--lesson-ratio:.9090909091}
.howto-scene[data-lesson="weapons"]{--lesson-ratio:.7894736842}
.howto-scene:is([data-lesson="pulse"],[data-lesson="grenade"]){--lesson-ratio:.7407407407}
.howto-scene[data-lesson="bomber"]{--lesson-ratio:.7929515419}
#guide .howto-scene:has(#howto-original:not([hidden])){width:min(100%,calc(max(160px,100svh - var(--lesson-chrome))*var(--lesson-ratio)));height:auto;min-height:0;max-height:none;aspect-ratio:var(--lesson-ratio);background:transparent}
#guide .howto-scene:has(#howto-shop:not([hidden])){width:100%;height:max(200px,calc(100svh - var(--lesson-chrome)));min-height:0;max-height:680px;aspect-ratio:auto}
@media(max-width:600px){
 #guide{padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right))}
 #guide .howto-panel{padding:0;border:0}
 #guide .howto-panel>:not(.howto-scene){margin-inline:12px}
 #guide .howto-panel h3{min-height:0}
}

.howto-scene[data-lesson="dodge"]{--lesson-ratio:.7708779443}
/* Short landscape screens: lesson controls beside the clip, not above it. */
@media(orientation:landscape) and (max-height:500px){
 #guide .howto-panel{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,1fr);column-gap:16px;align-items:start}
 #guide .howto-panel-heading{grid-column:1;grid-row:1}
 #guide .howto-panel h3{grid-column:1;grid-row:2;min-height:0;margin:4px 0 8px}
 #guide .howto-actions{grid-column:1;grid-row:3}
 #guide .howto-description{grid-column:1;grid-row:4;margin-top:4px}
 #guide .howto-scene{grid-column:2;grid-row:1/span 4}
 #guide .howto-progress{grid-column:2;grid-row:5}
 #guide .howto-panel>:is(.howto-control-grid,.howto-note,.howto-play,#howto-status){grid-column:1/-1}
 #guide .howto-scene:has(#howto-shop:not([hidden])){height:max(160px,calc(100svh - var(--lesson-chrome)))}
}

.howto-options{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:0 0 8px;min-height:44px}.howto-options label{display:flex;align-items:center;gap:8px;font-size:12px;color:#c8d4c1}.howto-options :is(select,button){min-height:44px;border:1px solid #67815d;border-radius:8px;background:#182d23;color:#edf6dd;font:600 13px system-ui;padding:6px 10px}.howto-options button[aria-pressed="true"]{border-color:#d9f78c;color:#d9f78c}.howto-options [hidden]{display:none!important}
@media(orientation:landscape) and (max-height:500px){#guide .howto-options{grid-column:1;grid-row:4}#guide .howto-description{grid-row:5}#guide .howto-scene{grid-row:1/span 5}#guide .howto-progress{grid-row:6}}

body.lesson-overlay-open{overflow:hidden}#guide .howto-panel.howto-expanded{position:fixed!important;inset:0;z-index:2000;width:auto;height:100svh;max-height:none;max-width:none;padding:12px!important;border:0;border-radius:0;background:#101d17;overflow:auto}#guide .howto-panel.howto-expanded>:not(.howto-scene){margin-inline:0}

/* Action-first lessons: secondary playback controls stay available on demand. */
.howto-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px 44px}
.howto-actions:has(#howto-pause[hidden]){grid-template-columns:minmax(0,1fr) 44px 44px}
#howto-settings,#howto-next{font-size:22px;line-height:1}
.howto-description .lesson-goal{display:block;margin:0 0 14px}
.lesson-goal strong{display:block;font-size:12px;letter-spacing:.03em;color:#d9f78c;margin-bottom:4px}
.lesson-goal>span{display:block;font-size:15px;line-height:1.5;color:#e2e9df}
.howto-options[hidden]{display:none!important}

/* Keep the introduction and the complete first example in the initial viewport. */
#guide{padding-top:18px;padding-bottom:40px;scroll-margin-top:0}
#guide>.section-heading{margin-bottom:16px;max-width:none}
#guide>.section-heading .eyebrow{margin:0 0 6px;font-size:10px}
#guide>.section-heading h2{font-size:clamp(25px,3vw,36px);line-height:1.1;margin:0 0 8px;text-wrap:initial}
#guide>.section-heading p:not(.eyebrow){font-size:14px;line-height:1.4;margin:0;max-width:70ch}
@media(max-width:600px){#guide>.section-heading{margin-inline:12px;margin-bottom:12px}#guide .howto-panel h3{margin:6px 0 10px}}

#howto-practice{display:block;width:100%;min-height:44px;padding:10px 14px;margin:8px 0 20px;border:1px solid #bfdc86;border-radius:9px;background:#d9f78c;color:#17251c;font:600 14px/1.4 system-ui;cursor:pointer}#howto-practice[hidden]{display:none!important}
@media(max-width:600px){#guide #howto-practice{width:calc(100% - 24px)}}

/* Direct lesson selection stays beside the scene on phones as well as desktops. */
#guide #howto-title{position:absolute;width:1px;height:1px!important;min-height:0!important;padding:0;margin:0!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#howto-lesson-picker{display:block;width:100%;min-width:0;height:48px;margin:8px 0 12px;padding:8px 32px 8px 10px;border:1px solid #59734f;border-radius:9px;background:#1c3024;color:#f0f5e4;font:650 17px/1.3 system-ui;cursor:pointer}
#howto-lesson-picker:focus-visible{outline:3px solid #efffb5;outline-offset:3px}
#guide .howto-progress span{width:100%;transform:scaleX(0);transform-origin:left center;transition:transform 260ms linear}
#guide .howto-scene[data-state=paused]+.howto-progress span{transition:none}
#howto-retry{position:absolute;z-index:3;bottom:18px;left:50%;transform:translateX(-50%);min-height:44px;max-width:calc(100% - 32px);padding:10px 18px;border:1px solid #d9f78c;border-radius:9px;background:#d9f78c;color:#14251a;font:600 14px system-ui;cursor:pointer}
#guide #howto-fallback{margin:0;padding-bottom:80px}
@media(max-width:600px){#guide #howto-lesson-picker{width:calc(100% - 24px);font-size:16px}}
@media(orientation:landscape) and (max-height:500px){#guide #howto-lesson-picker{grid-column:1;grid-row:2;margin:4px 0 8px}}
@media(prefers-reduced-motion:reduce){#guide .howto-progress span{transition:none}}
html.reduced-motion #guide .howto-progress span{transition:none}
@media(max-width:600px) and (max-height:650px){#guide{padding-top:10px}#guide>.section-heading{margin-bottom:4px}#guide>.section-heading .eyebrow{display:none}#guide>.section-heading h2{margin-bottom:4px}}

/* Explicit next action; controls grow when translated or enlarged. */
#guide .howto-actions{grid-template-columns:repeat(3,minmax(0,1fr)) 44px}
#guide .howto-actions:has(#howto-pause[hidden]){grid-template-columns:repeat(2,minmax(0,1fr)) 44px}
#guide .howto-actions button{height:auto;min-height:44px;overflow-wrap:anywhere}
#guide #howto-next{font-size:13px;line-height:1.3}

#guide .howto-options{flex-wrap:wrap}
@media(max-width:360px){#guide .howto-actions button:not(#howto-settings){font-size:12px;hyphens:none}}

@media(max-width:360px){#guide .howto-options{gap:4px}#guide .howto-options label{gap:4px}#guide .howto-options :is(select,button){padding-inline:6px;font-size:12px}}

.lesson-bootstrap{margin:0 0 12px;padding:12px;border:1px solid #b4c787;border-radius:9px;background:#1c3024;color:#f0f5e4;font:14px/1.5 system-ui}.lesson-bootstrap p{margin:0 0 8px}.lesson-bootstrap button{min-height:44px;max-width:100%;padding:8px 12px;background:#d9f78c;color:#17251c;border:0;border-radius:6px;font:600 14px/1.4 system-ui;white-space:normal}

/* Uninitialized controls must not look playable or expose placeholder copy. */
#guide:is([data-lesson-bootstrap="loading"],[data-lesson-bootstrap="error"]) .guide-lessons,
#guide:is([data-lesson-bootstrap="loading"],[data-lesson-bootstrap="error"]) #guide-economy-links button,
#guide:is([data-lesson-bootstrap="loading"],[data-lesson-bootstrap="error"]) #howto-panel>:not(.lesson-bootstrap){display:none!important}
#guide:is([data-lesson-bootstrap="loading"],[data-lesson-bootstrap="error"]) #howto-panel{display:block;min-height:160px}
