:root{color-scheme:dark;--gold:#f4d17f;--navy:#09182b;--screen-height:100dvh}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#09182b;color:#fdf3d4;font-family:'Trebuchet MS',Arial,sans-serif}body{background:linear-gradient(90deg,#071425b8,#0c23378a),url('/art/console-hq21.png') center/cover fixed}button,input,select{font:inherit}button{cursor:pointer;color:#f9e7b4;border:1px solid #bba56b;border-radius:10px;background:linear-gradient(#21485f,#0b2338);min-height:42px;padding:10px 17px;box-shadow:0 3px 0 #0008;touch-action:manipulation}button:active{transform:translateY(2px);filter:brightness(1.2)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7be6ff;outline-offset:3px}button:disabled{opacity:.55;cursor:wait}.gold{color:#412a10;font-weight:900;background:linear-gradient(#fff2b5,#efbc50 46%,#c38c22);border:2px solid #f6d284;box-shadow:inset 0 0 0 2px #80521f,0 5px 0 #35221b}.quiet{background:#0b2136c9;border-color:#597081}button.selected{background:linear-gradient(#428e68,#1a604d);color:white;border-color:#9aeab7}small{font-size:11px;letter-spacing:2.5px;color:#c3e8d6;font-weight:900}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(28px,4vw,56px);line-height:1.05;text-shadow:0 4px 12px #0008}h2{font-size:26px}p{line-height:1.6;color:#cedee7}header{position:fixed;z-index:50;top:0;left:0;right:0;min-height:56px;padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));background:#071525f0;border-bottom:1px solid #b8a06c70;display:flex;align-items:center;justify-content:space-between;gap:10px}header>div{display:flex;gap:7px}header button{font-size:13px;min-height:36px;padding:7px 11px}#connectionLabel{font-size:12px;color:#d5dabd}main{max-width:1400px;margin:auto;padding:100px 5vw 50px}.intro{max-width:700px;margin-bottom:20px}.intro h1{margin:12px 0}.setup{display:grid;grid-template-columns:.9fr 1.3fr;gap:40px;align-items:center}.showcase{text-align:center;min-width:0}.showcase canvas{width:100%;max-height:410px;object-fit:contain}.showcase h2{margin:0;color:var(--gold)}.showcase p{max-width:460px;margin:8px auto;font-size:14px}.team-panel{background:linear-gradient(135deg,#18384beb,#0a1b2eeb);border:1px solid #aa9260;border-radius:20px;padding:24px;box-shadow:0 20px 60px #0006}.mode-tabs{display:flex;gap:7px}.mode-tabs button{flex:1;font-size:13px;font-weight:bold;padding:10px 6px}.team-panel>p{font-size:13px;margin:15px 0}.count{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;font-size:15px}select,input{background:#071b2e;color:#fff2cc;border:1px solid #8e987e;border-radius:8px;min-height:40px;padding:8px;max-width:100%}.slot{padding:12px 0;border-top:1px solid #a5b9c030;display:grid;grid-template-columns:35px 1fr 1fr;gap:10px;align-items:center}.slot>strong{font-size:18px;color:var(--player)}.slot .pair{grid-column:2/4;display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px}.pair code{font-size:20px;letter-spacing:3px;color:#fff0b9}.pair button{font-size:12px;min-height:32px;padding:5px 10px}.note{font-size:12px!important;color:#adbdc8}.start-row{display:flex;gap:12px}.start-row .gold{flex:1}.join-panel{margin-top:60px;border-top:1px solid #bda064;padding:30px 0;display:grid;grid-template-columns:1fr 1fr;gap:35px}.join-panel p{font-size:14px;max-width:460px}.join-panel h2{margin:12px 0}form{display:flex;flex-direction:column;gap:12px;justify-content:center}#loading{position:fixed;inset:0;z-index:100;background:#092237}#loading>img{width:100%;height:100%;object-fit:cover;opacity:.6}.loading-panel{position:absolute;bottom:10%;left:10%;right:10%;text-align:center;padding:25px;background:linear-gradient(90deg,#091c30e8,#091c3090);border-radius:15px}.loading-panel h1{font-size:clamp(30px,5vw,60px);margin:15px 0}.loading-panel p{margin:10px}progress{width:min(600px,95%);height:17px;accent-color:#efbd5c}#stage{position:fixed;inset:56px 0 0;height:calc(var(--screen-height) - 56px);background:#09192b;overflow:hidden}#game{width:100%;height:100%;object-fit:contain}#touch{position:absolute;inset:0;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#touch button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;font-size:clamp(10px,1.5vw,16px);font-weight:900;border-radius:50%;padding:0;width:clamp(43px,6.3vw,76px);height:clamp(43px,6.3vw,76px);background:radial-gradient(at 35% 25%,#5ab4c7,#17526c 70%);border:3px solid #b4dfdd;box-shadow:inset 0 0 0 3px #24475b,0 4px 0 #041325cc}#touch button.pressed{background:#e9bd5d;color:#133147;transform:translateY(3px)}.dpad{position:absolute;bottom:18px;left:max(18px,env(safe-area-inset-left));display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:4px}.dpad [data-input=up]{grid-column:2}.dpad [data-input=left]{grid-column:1;grid-row:2}.dpad [data-input=down]{grid-column:2;grid-row:2}.dpad [data-input=right]{grid-column:3;grid-row:2}.actions{position:absolute;bottom:18px;right:max(18px,env(safe-area-inset-right));display:grid;grid-template-columns:repeat(3,1fr);gap:5px}#touch .jump{background:radial-gradient(at 35% 25%,#ffd975,#b96723 70%)}#remoteWaiting{position:absolute;top:20%;left:20%;right:20%;text-align:center;pointer-events:none}#remoteWaiting h1{font-size:30px}body.controller-only #game{visibility:hidden}body.controller-only #stage{background:radial-gradient(ellipse,#20465f,#08192e)}#modal{position:fixed;inset:0;background:#020a16db;z-index:80;display:flex;align-items:center;justify-content:center;padding:7vh 5vw;backdrop-filter:blur(8px)}#modal>div{max-height:85vh}.modal-art{width:30%;height:520px;background:url('/art/console-city21.png') 35% center/cover;border:2px solid #d1b26e;border-right:0;border-radius:24px 0 0 24px}.modal-content{width:60%;max-width:800px;overflow:auto;padding:32px;background:linear-gradient(145deg,#19384d,#0a1b2d);border:2px solid #d1b26e;border-radius:0 24px 24px 0;box-shadow:0 20px 80px #0008}.modal-content h2{font-size:clamp(24px,4vw,38px);margin:15px 0}.modal-content p,.modal-content li{font-size:15px;color:#cde0e9;line-height:1.6}#modalActions{display:flex;gap:12px;margin-top:25px;flex-wrap:wrap}table{width:100%;border-collapse:collapse;font-size:13px}td,th{padding:10px 6px;border-bottom:1px solid #ffffff28;text-align:left}#toast{position:fixed;top:68px;left:50%;transform:translateX(-50%);padding:12px 20px;background:#142e44;border:1px solid #dab565;border-radius:12px;max-width:85%;z-index:110;pointer-events:none}[hidden]{display:none!important}body,canvas,button{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}input,select{user-select:auto;-webkit-user-select:auto}@media(max-width:750px){main{padding:85px 20px 35px}.setup{grid-template-columns:1fr;gap:15px}.intro h1{font-size:36px}.showcase canvas{max-height:280px}.team-panel{padding:17px}.join-panel{grid-template-columns:1fr;gap:8px}.modal-art{display:none}.modal-content{width:100%;border-radius:18px;padding:22px}#connectionLabel{display:none}.slot{grid-template-columns:30px 1fr 1fr;gap:6px}.slot select{font-size:12px}.start-row{flex-wrap:wrap}}@media(orientation:landscape) and (max-height:550px){header{min-height:42px;padding-top:3px;padding-bottom:3px}header button{min-height:30px;font-size:11px}#stage{top:42px;height:calc(var(--screen-height) - 42px)}main{padding-top:65px}.intro{margin-bottom:8px}.intro h1{font-size:30px}.setup{grid-template-columns:.8fr 1.3fr;gap:20px}.showcase canvas{max-height:240px}.showcase p{font-size:12px}.team-panel{padding:14px}.modal-content{padding:18px}.modal-content p{font-size:13px}#touch button{width:clamp(38px,6vw,62px);height:clamp(38px,6vw,62px)}.actions,.dpad{bottom:10px}#remoteWaiting{top:8%}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Console 22: compact gameplay chrome, responsive input and illustrated actions. */
button{transition:filter .12s,transform .12s}button:hover{filter:brightness(1.12)}
.gold,.mode-tabs button{background:var(--button-art,linear-gradient(#f8d680,#bf8428)) center/100% 100% no-repeat;color:#30200f;border:0;box-shadow:none;border-radius:0;min-height:54px;padding:13px 24px;text-shadow:0 1px #fff1b5;font-weight:900}
.mode-tabs button.selected{filter:hue-rotate(38deg);color:#163c28}.mode-tabs button{font-size:12px;padding:14px 10px}.intro{margin-bottom:6px}.intro h1{font-size:clamp(26px,3vw,44px);margin:8px 0}.intro p{margin-bottom:0}.intro h1 br{display:none}
main{padding-top:78px}.team-panel{border:0;border-left:1px solid #e6c47688;border-radius:0;background:linear-gradient(90deg,#0a1b2eda,#0a1b2e55);box-shadow:none}.setup{gap:24px}.showcase canvas{max-height:350px}.join-panel{margin-top:28px}.modal-art{display:none}.modal-content{width:min(780px,92vw);border-radius:12px;min-height:0;padding:32px 40px;background:linear-gradient(90deg,#071b2ef2,#0a273de8),url('/art/console-city21.png') center/cover;border:2px solid #d6b46d;outline:1px solid #866c37;outline-offset:5px}.modal-content h2{color:#ffe6a5}.modal-content small{color:#dcbb75}#modalActions .gold{min-width:210px}
header .zoom-tools{display:flex;align-items:center;gap:3px}.zoom-tools span{font-size:11px;min-width:36px;text-align:center}.zoom-tools button{min-width:30px;padding:5px;font-size:18px}
body.playing header{left:auto;bottom:auto;width:auto;right:max(8px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));border:1px solid #c8b07888;border-radius:30px;min-height:36px;padding:4px 8px;background:#091d30ba;backdrop-filter:blur(6px)}body.playing header>span,body.playing #exit,body.playing #help{display:none}body.playing header button{border:0;box-shadow:none;background:transparent;padding:5px 8px;min-height:28px}body.playing #stage{inset:0;height:var(--screen-height)}
.actions{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:7px;bottom:max(18px,env(safe-area-inset-bottom))}.actions .defend{grid-column:1;grid-row:2}.actions .attack{grid-column:2;grid-row:2}.actions .jump{grid-column:3;grid-row:2}.actions [data-input=kick]{grid-column:3;grid-row:1}.actions #moreActions{grid-column:2;grid-row:1;transform:scale(.8)}
#touch button{background:radial-gradient(at 30% 22%,#72d1dc,#186883 60%,#0a334a);border:2px solid #efd6a4;box-shadow:inset 0 2px 2px #fff9,inset 0 -5px 8px #02122299,0 3px 0 #071729;opacity:.88;width:clamp(44px,5.6vw,72px);height:clamp(44px,5.6vw,72px)}#touch .attack{background:radial-gradient(at 30% 22%,#ffac84,#bd4b32 65%,#6e251b)}#touch button.pressed{opacity:1;filter:brightness(1.25)}
#extraActions{position:absolute;right:20px;bottom:calc(clamp(44px,5.6vw,72px)*2 + 44px);display:flex;gap:8px;padding:8px;background:#081b2ce8;border:1px solid #e7c580;border-radius:45px;pointer-events:auto}#touch #extraActions button{width:52px;height:52px;font-size:10px}#touch #contextHelp{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);width:100px;height:43px;min-height:0;border-radius:22px;background:linear-gradient(#a6d98d,#3f725b)}
@media(pointer:fine){body:not(.controller-only) #touch[hidden]{display:none!important}}
@media(max-width:750px){.team-panel{border-left:0;border-top:1px solid #e6c47688}.modal-content{padding:24px}.intro h1{font-size:30px}header{gap:4px}header button{padding:5px}.zoom-tools span{min-width:29px}.showcase canvas{max-height:250px}}
@media(orientation:landscape) and (max-height:550px){body.playing header{top:4px}.intro{display:none}main{padding-top:58px}.showcase canvas{max-height:230px}.showcase p{display:none}.setup{align-items:start}.mode-tabs button{min-height:42px;font-size:11px;padding:8px}.team-panel{padding:12px}.team-panel>p{margin:7px 0}.dpad,.actions{bottom:12px}#extraActions{bottom:135px}body.playing header button{font-size:10px}.modal-content{padding:22px;max-height:85dvh!important}}

.slot .outfit{grid-column:2/4}.showcase canvas{filter:drop-shadow(0 15px 14px #0006)}

.slot .outfit{grid-column:2/4}.slot select{min-width:0}.mode-tabs button{white-space:normal;line-height:1.15}.showcase canvas{max-height:370px}
body.playing header{max-width:42vw}.zoom-tools{flex-shrink:0}body.playing header>div{gap:2px}body.playing #fullscreen{white-space:nowrap}#modalBody{max-height:58dvh;overflow:auto}
@media(orientation:landscape) and (max-height:550px){.showcase canvas{max-height:240px}.slot{padding:6px 0;gap:5px}.slot select{min-height:32px;padding:5px}.slot .outfit{font-size:11px}body.playing header{max-width:48vw}body.playing header #fullscreen{font-size:9px}.zoom-tools span{font-size:9px;min-width:25px}#touch #contextHelp{bottom:15px;width:104px;font-size:10px}}

/* Revision 24: thumb-sized physical layout and persistent navigation. */
body.playing #exit,body.playing #help{display:block}body.playing header{max-width:none;gap:5px;z-index:70}body.playing #exit{font-weight:900;color:#ffd09b;border-right:1px solid #d5b66b66;border-radius:0}body.playing header button{min-height:36px;padding:7px 10px;font-size:12px}
#touch{--key:clamp(56px,8.4vmin,88px)}#touch button{width:var(--key);height:var(--key);min-height:0;font-size:clamp(11px,1.7vmin,15px);opacity:.96;border:3px solid #e5d3a8;box-shadow:inset 0 3px 4px #fff9,inset 0 -6px 8px #001629bb,0 5px 0 #031322,0 7px 12px #0007}
.dpad{grid-template-columns:repeat(3,var(--key));grid-template-rows:repeat(3,var(--key));gap:3px;bottom:18px;left:max(18px,env(safe-area-inset-left))}.dpad [data-input=up]{grid-row:1;grid-column:2}.dpad [data-input=left]{grid-row:2;grid-column:1}.dpad [data-input=right]{grid-row:2;grid-column:3}.dpad [data-input=down]{grid-row:3;grid-column:2}
.actions{grid-template-columns:repeat(3,var(--key));grid-template-rows:repeat(2,var(--key));gap:8px;bottom:20px;right:max(18px,env(safe-area-inset-right))}.actions .defend{grid-row:1;grid-column:1}.actions .attack{grid-row:2;grid-column:1}.actions [data-input=kick]{grid-row:2;grid-column:2}.actions .jump{grid-row:2;grid-column:3}.actions .shoot{grid-row:1;grid-column:2}.actions #moreActions{grid-row:1;grid-column:3;transform:none;font-size:11px}
#touch .shoot{background:radial-gradient(at 30% 22%,#ca9ae8,#694e9e 65%,#322750)}#touch .jump{background:radial-gradient(at 30% 22%,#ffe393,#ce8a29 65%,#75501d);color:#362308}#touch .defend{background:radial-gradient(at 30% 22%,#a8d2bd,#3f806e 65%,#174235)}
#extraActions{bottom:calc(var(--key)*2 + 53px);right:18px;gap:8px}#touch #extraActions button{width:var(--key);height:var(--key);font-size:11px}#touch #contextHelp{bottom:30px;width:120px;height:50px;font-size:12px}
body.controller-only header{left:8px;right:8px;justify-content:space-between;border-radius:16px;max-width:none}body.controller-only header>span{display:block}body.controller-only .zoom-tools{display:none}body.controller-only #touch{--key:clamp(60px,16vmin,94px)}body.controller-only #extraActions{display:flex!important;background:none;border:0;box-shadow:none;padding:0;bottom:calc(var(--key)*2 + 42px)}body.controller-only #moreActions{visibility:hidden}body.controller-only #remoteWaiting{top:76px;left:30%;right:30%}body.controller-only #remoteWaiting h1{font-size:20px;margin:0 0 4px}body.controller-only #remoteWaiting p{font-size:11px;line-height:1.3;margin:0}
@media(orientation:landscape) and (max-height:450px){#touch{--key:54px}body.controller-only #touch{--key:60px}.dpad{bottom:12px}.actions{bottom:14px}body.playing header{top:3px}body.playing header button{min-height:32px;padding:5px 8px;font-size:10px}body.controller-only #extraActions{bottom:144px}#extraActions{bottom:144px}#touch #contextHelp{bottom:16px}body.controller-only #remoteWaiting{top:64px}}
@media(orientation:portrait) and (max-width:600px){body.controller-only #touch{--key:54px}.dpad{left:8px}.actions{right:8px;gap:4px}body.controller-only header>span{display:none}body.controller-only #extraActions{bottom:140px;right:8px}body.controller-only #remoteWaiting{left:12%;right:12%;top:90px}}
/* Revision 26: bronze and enamel controls match the arena HUD. */
#duelOptions{border:1px solid #b99960;border-radius:12px;padding:12px 14px;margin:16px 0;display:flex;gap:16px;background:linear-gradient(135deg,#332f29b8,#131c2ee8)}#duelOptions legend{font-size:11px;letter-spacing:2px;color:#ead092;padding:0 8px}#duelOptions label{display:grid;gap:6px;flex:1;font-size:12px;color:#e6d7ba}#duelOptions select{width:100%}
body[data-mode=duel].playing header{background:#111b2cf2;border-color:#c6a365;top:auto;bottom:max(16px,env(safe-area-inset-bottom));right:50%;transform:translateX(50%);box-shadow:0 4px 15px #0008}body[data-mode=duel].controller-only header{top:8px;bottom:auto;left:8px;right:8px;transform:none}
#touch .actions button,#touch #extraActions button{border-radius:22%;border:2px solid #e9c98e;background:linear-gradient(145deg,#44627d 0%,#1c3551 38%,#0d2037 75%);box-shadow:inset 0 0 0 3px #181e2e,inset 0 0 0 4px #a68b5b,inset 0 6px 8px #ffffff42,0 5px 0 #030c19,0 9px 16px #0006;text-shadow:0 2px 2px #000c;color:#fff2ce;font-size:clamp(11px,1.9vmin,16px)}
#touch .actions .attack{background:linear-gradient(145deg,#edb09a,#a44132 45%,#502327)}#touch .actions .defend{background:linear-gradient(145deg,#b5d0a6,#477f68 45%,#1b3c38)}#touch .actions .jump{background:linear-gradient(145deg,#fff0bc,#b98631 50%,#70451a);color:#fff6d8}#touch .actions .shoot{background:linear-gradient(145deg,#d5c1ec,#725c9d 45%,#372f58)}
#touch button.pressed{filter:brightness(1.35);box-shadow:inset 0 0 0 3px #171c29,inset 0 3px 12px #000a,0 1px 0 #030c19;transform:translateY(4px)}
#touch .dpad button{border-radius:20%;color:#ffecc2;background:linear-gradient(145deg,#586b7a,#1f3449 50%,#0b1c32);border:2px solid #dab679;box-shadow:inset 0 0 0 3px #192538,inset 0 3px 6px #fff6,0 5px 0 #030c19;}
body.controller-only #stage:before{content:'';position:absolute;inset:9% 3% 5%;border:1px solid #d7ba7a44;border-radius:40px;pointer-events:none;background:radial-gradient(ellipse at center,#28465955,transparent 65%)}
@media(orientation:landscape) and (max-height:450px){body[data-mode=duel].playing:not(.controller-only) header{bottom:7px;max-width:42vw;padding:2px 4px}body[data-mode=duel].playing:not(.controller-only) header button{font-size:9px;padding:5px;min-height:30px}body[data-mode=duel].playing #help{display:none}}

/* Keep campaign actions readable without competing with fullscreen. */
.start-row{flex-wrap:wrap}.start-row>button{flex:1 1 180px;white-space:nowrap;min-width:0}#orbitStart{background:linear-gradient(#d6ecff,#82c6d9 46%,#337891);border-color:#b9e8ee;color:#123345}

#missionHint{position:fixed;z-index:16;bottom:14px;left:30%;right:30%;pointer-events:none;text-align:center;color:#fff3c5;font:700 clamp(12px,1.3vw,18px) Arial;text-shadow:0 2px 4px #001728;background:#09232bdd;border-radius:18px;padding:8px 12px}#missionHint:empty{display:none}.brake-ready{filter:drop-shadow(0 0 9px #80ffe4)!important}
