/* Thumb controls: directions on the left, four distinct actions on the right. */
.rotate-hint{display:none;font-size:14px;line-height:1.6;color:#dce9fc;text-align:center;padding:9px 14px;margin:0}
.screen-status{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:30;max-width:90vw;background:#0b203eef;border:1px solid #a6c3e6;border-radius:8px;padding:10px 16px;font-size:14px;pointer-events:none}
.screen-status:empty{display:none}
.control-deck{align-items:end;justify-content:space-between;gap:36px}
.movement-group{flex:0 0 auto}
.movement-buttons{display:grid;grid-template-columns:repeat(2,88px);gap:10px;touch-action:none}
.control.movement{display:flex;flex-direction:column;align-items:center;justify-content:center;width:88px;height:88px;min-height:0;padding:0;border:2px solid #84b3e3;border-radius:28px;background:linear-gradient(#315c8b,#183c66);box-shadow:0 5px 0 #05182e,inset 0 1px 0 #c5e0fb55;gap:2px}
.movement .move-symbol{font-size:32px;line-height:1}.control.movement>span:last-of-type{font-size:14px;font-weight:800}.control.movement kbd{font-size:11px}
.action-group{flex:0 0 auto}
.action-buttons{display:grid;grid-template-columns:repeat(4,84px);align-items:end;gap:12px}
.action-buttons .control{--key:#e4c768;display:flex;flex-direction:column;align-items:center;justify-content:center;width:84px;height:84px;min-height:0;padding:0;border:3px solid var(--key);border-radius:50%;background:linear-gradient(#294b76,#122d50);box-shadow:0 5px 0 #07182e,inset 0 2px 0 #fff2;gap:1px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.action-buttons .attack{--key:#ff9682;background:linear-gradient(#ffa891,#ef795f);color:#34170f}
.action-buttons .lunge{--key:#ffe29a;background:linear-gradient(#ffe397,#ffc64c);color:#342502}
.action-buttons .parry{--key:#7edfff}.action-buttons .disengage{--key:#c3a7ff}
.action-top{display:block;line-height:1}.action-top .action-icon{font-size:23px;line-height:1}.action-top kbd{display:none}
.attack .action-icon{color:#52261b}.lunge .action-icon{color:#604203}
.control strong{font-size:14px;white-space:nowrap;line-height:1.4}.control small{display:none}
.control.held,.control:active{transform:translateY(4px);filter:brightness(1.2);box-shadow:0 1px 0 #07182e,inset 0 3px 6px #0003}
.control.movement{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
html[data-phase='menu'] .control-deck{display:none}
@media(max-width:700px){
 .control-deck{display:flex;align-items:center;gap:16px;margin-top:20px;flex-wrap:wrap}
 .movement-group{margin-bottom:0}.movement-buttons{grid-template-columns:repeat(2,72px);gap:8px}
 .control.movement{width:72px;height:76px;gap:2px}.control.movement kbd{display:none}
 .action-buttons{grid-template-columns:repeat(2,72px);grid-template-rows:62px 72px;gap:8px}
 .action-buttons .control{width:72px;height:72px;padding:0}
 .action-buttons .parry{grid-area:1/1;width:62px;height:62px;justify-self:center}
 .action-buttons .disengage{grid-area:1/2;width:62px;height:62px;justify-self:center}
 .action-buttons .attack{grid-area:2/1}.action-buttons .lunge{grid-area:2/2}
 .action-buttons .parry strong,.action-buttons .disengage strong{font-size:13px}
 .rotate-hint{display:block}.group-label{font-size:12px}.group-label b{font-size:14px}
}
@media(max-width:370px){.action-buttons{grid-template-columns:repeat(2,66px)}.action-buttons .attack,.action-buttons .lunge{width:66px;height:66px}.movement-buttons{grid-template-columns:repeat(2,64px)}.control.movement{width:64px;height:72px}.control-deck{gap:12px}}
@media(max-width:370px){
 .brand{font-size:29px}.brand-mark{font-size:26px;width:16px;margin-right:9px}
 .utility{gap:5px}.icon-button{width:34px;height:36px}
 .control-deck{gap:8px}.movement-buttons{grid-template-columns:repeat(2,62px);gap:6px}.control.movement{width:62px}
 .action-buttons{grid-template-columns:repeat(2,64px);gap:6px}.action-buttons .attack,.action-buttons .lunge{width:64px;height:64px}
}

/* Immersive combat on landscape phones and in landscape fullscreen. */
html[data-layout='landscape']:not([data-phase='menu']){overflow:hidden;overscroll-behavior:none}
html[data-layout='landscape']:not([data-phase='menu']) body{overflow:hidden;overscroll-behavior:none;height:100dvh;min-width:0}
html[data-layout='landscape']:not([data-phase='menu']) .app{position:relative;height:100dvh;width:100%;max-width:none;padding:0;--edge-left:max(12px,env(safe-area-inset-left));--edge-right:max(12px,env(safe-area-inset-right));--edge-bottom:max(12px,env(safe-area-inset-bottom))}
html[data-layout='landscape']:not([data-phase='menu']) .arena{position:absolute;inset:0;height:100%;min-height:0;border:0;border-radius:0;box-shadow:none;touch-action:none}
html[data-layout='landscape']:not([data-phase='menu']) .topbar{position:absolute;top:max(4px,env(safe-area-inset-top));left:var(--edge-left);right:var(--edge-right);height:38px;z-index:10;padding:0;pointer-events:none}
html[data-layout='landscape']:not([data-phase='menu']) .topbar .brand{font-size:21px;pointer-events:auto;letter-spacing:0}
html[data-layout='landscape']:not([data-phase='menu']) .brand-mark{font-size:20px;width:11px;margin-right:7px;letter-spacing:-4px}
html[data-layout='landscape']:not([data-phase='menu']) .top-label{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .utility{gap:4px;pointer-events:auto}
html[data-layout='landscape']:not([data-phase='menu']) .icon-button{width:34px;height:34px;font-size:18px;border-width:1px;box-shadow:none;border-radius:8px;background:#102b49db}
html[data-layout='landscape']:not([data-phase='menu']) .icon-button svg{width:18px;height:18px}
html[data-layout='landscape']:not([data-phase='menu']) .scoreboard{top:max(7px,env(safe-area-inset-top));left:calc(var(--edge-left) + 79px);right:calc(var(--edge-right) + 153px);grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:8px}
html[data-layout='landscape']:not([data-phase='menu']) .contestant{display:flex;align-items:center;justify-content:space-between;gap:5px;height:43px;min-width:0;padding:3px 8px;border-width:1px;border-bottom-width:3px;border-radius:7px}
html[data-layout='landscape']:not([data-phase='menu']) .contestant.cpu{flex-direction:row-reverse}
html[data-layout='landscape']:not([data-phase='menu']) .competitor{min-width:0;gap:4px}
html[data-layout='landscape']:not([data-phase='menu']) .competitor strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:normal}
html[data-layout='landscape']:not([data-phase='menu']) .competitor-note,html[data-layout='landscape']:not([data-phase='menu']) .hud-portrait,html[data-layout='landscape']:not([data-phase='menu']) .lights,html[data-layout='landscape']:not([data-phase='menu']) .color-chip{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .score-line{gap:0;flex:0 0 auto}
html[data-layout='landscape']:not([data-phase='menu']) .score{font-size:29px;letter-spacing:0;line-height:1}
html[data-layout='landscape']:not([data-phase='menu']) .match-info{padding:0;gap:0}.timer{font-variant-numeric:tabular-nums}
html[data-layout='landscape']:not([data-phase='menu']) .round-label{font-size:12px;line-height:1.2}
html[data-layout='landscape']:not([data-phase='menu']) .timer{font-size:26px;line-height:1.15;letter-spacing:0}
html[data-layout='landscape']:not([data-phase='menu']) .match-mode{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .energy-row{top:calc(max(7px,env(safe-area-inset-top)) + 49px);bottom:auto;left:var(--edge-left);right:var(--edge-right);grid-template-columns:1fr 150px 1fr;gap:20px}
html[data-layout='landscape']:not([data-phase='menu']) .energy>div:first-child{font-size:12px;margin-bottom:3px;line-height:1.1}
html[data-layout='landscape']:not([data-phase='menu']) .energy-track{height:6px}
html[data-layout='landscape']:not([data-phase='menu']) .distance-info{font-size:14px;align-self:center}
html[data-layout='landscape']:not([data-phase='menu']) .arena-meta{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .bout-call{top:30%;font-size:30px;line-height:1.2}
html[data-layout='landscape']:not([data-phase='menu']) .bout-call small{font-size:14px;margin-top:4px}
html[data-layout='landscape']:not([data-phase='menu']) .control-deck{position:absolute;left:0;right:0;bottom:var(--edge-bottom);z-index:4;display:flex;flex-wrap:nowrap;align-items:end;justify-content:space-between;padding:0 var(--edge-right) 0 var(--edge-left);margin:0;gap:0;pointer-events:none}
html[data-layout='landscape']:not([data-phase='menu']) .control-deck .group-label{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .movement-group{margin:0;flex:0 0 auto}
html[data-layout='landscape']:not([data-phase='menu']) .movement-buttons{grid-template-columns:repeat(2,80px);gap:10px;pointer-events:auto}
html[data-layout='landscape']:not([data-phase='menu']) .control.movement{width:80px;height:82px;min-height:0;padding:0;gap:3px;background:linear-gradient(#315b88db,#173558ed)}
html[data-layout='landscape']:not([data-phase='menu']) .control.movement>span:last-of-type{font-size:14px}
html[data-layout='landscape']:not([data-phase='menu']) .move-symbol{font-size:30px}
html[data-layout='landscape']:not([data-phase='menu']) .control kbd{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .action-group{flex:0 0 auto;pointer-events:auto}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons{display:grid;grid-template-columns:repeat(2,74px);grid-template-rows:64px 74px;gap:8px 10px}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .control{min-height:0;width:74px;height:74px;padding:0;gap:0}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .attack{grid-area:2/1}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .lunge{grid-area:2/2}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .parry{grid-area:1/1;width:64px;height:64px;justify-self:center}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .disengage{grid-area:1/2;width:64px;height:64px;justify-self:center}
html[data-layout='landscape']:not([data-phase='menu']) .action-top .action-icon{font-size:22px}
html[data-layout='landscape']:not([data-phase='menu']) .control strong{font-size:14px}
html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .parry strong,html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .disengage strong{font-size:13px}
html[data-layout='landscape']:not([data-phase='menu']) .piste-overview{position:absolute;left:50%;transform:translateX(-50%);bottom:var(--edge-bottom);width:clamp(110px,calc(100vw - 390px),250px);z-index:3;margin:0;padding:8px;background:#071c37c9;border-color:#577ca577;pointer-events:none}
html[data-layout='landscape']:not([data-phase='menu']) .piste-caption,html[data-layout='landscape']:not([data-phase='menu']) .guard-span{display:none}
html[data-layout='landscape']:not([data-phase='menu']) .piste-map{height:8px;margin:0}
html[data-layout='landscape']:not([data-phase='menu']) .map-player{top:50%;bottom:auto;font-size:0;height:0}
html[data-layout='landscape']:not([data-phase='menu']) .map-player:after{top:0;transform:translate(-50%,-50%);width:8px;height:8px}
html[data-layout='landscape']:not([data-phase='menu']) .piste-measure{font-size:12px;margin-top:5px;line-height:1}
html[data-layout='landscape']:not([data-phase='menu']) footer,html[data-layout='landscape']:not([data-phase='menu']) .rotate-hint{display:none}
html[data-layout='landscape'][data-phase='paused'] .control-deck,html[data-layout='landscape'][data-phase='end'] .control-deck,html[data-layout='landscape'][data-phase='paused'] .piste-overview,html[data-layout='landscape'][data-phase='end'] .piste-overview{visibility:hidden;pointer-events:none}
html[data-layout='landscape']:not([data-phase='menu']) .small-card{max-height:calc(100dvh - 20px);overflow:auto;padding:14px 24px;width:480px}
html[data-layout='landscape']:not([data-phase='menu']) .small-card h2{font-size:21px;margin:4px 0 8px}
html[data-layout='landscape']:not([data-phase='menu']) .winner-portrait{width:48px;height:48px;margin:8px auto}
html[data-layout='landscape']:not([data-phase='menu']) .final-score{font-size:44px;margin:4px 0 8px}
html[data-layout='landscape']:not([data-phase='menu']) .small-card p{margin:4px 0 10px;font-size:13px}
html[data-layout='landscape']:not([data-phase='menu']) .small-card .start-button{min-height:44px;padding:9px 16px;font-size:16px}
html[data-layout='landscape']:not([data-phase='menu']) .small-card .text-button{margin-top:3px;padding:8px}
@media(max-height:360px){
 html[data-layout='landscape']:not([data-phase='menu']) .app{--edge-bottom:max(8px,env(safe-area-inset-bottom))}
 html[data-layout='landscape']:not([data-phase='menu']) .movement-buttons{grid-template-columns:repeat(2,66px);gap:8px}
 html[data-layout='landscape']:not([data-phase='menu']) .control.movement{width:66px;height:70px}
 html[data-layout='landscape']:not([data-phase='menu']) .action-buttons{grid-template-columns:repeat(2,64px);grid-template-rows:56px 64px;gap:6px 8px}
 html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .control{width:64px;height:64px}
 html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .parry,html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .disengage{width:56px;height:56px}
 html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .parry strong,html[data-layout='landscape']:not([data-phase='menu']) .action-buttons .disengage strong{font-size:12px}
 html[data-layout='landscape']:not([data-phase='menu']) .action-top .action-icon{font-size:18px}
 html[data-layout='landscape']:not([data-phase='menu']) .piste-overview{width:clamp(110px,calc(100vw - 330px),240px)}
}
@media(orientation:landscape) and (max-height:600px){
 html[data-phase='menu'] .topbar{height:52px}.rotate-hint{display:none}
 html[data-phase='menu'] .lobby-heading{padding:12px 20px 8px}html[data-phase='menu'] .lobby-heading h1{font-size:22px}
 html[data-phase='menu'] .character-matchup{margin:0 20px 12px}
 html[data-phase='menu'] .selected-character{min-height:105px}html[data-phase='menu'] .lobby-portrait{width:112px}
 html[data-phase='menu'] .selected-copy{margin-left:100px;padding:10px 8px 8px 0}
 html[data-phase='menu'] .cpu .selected-copy{margin-left:0;margin-right:100px;padding:10px 0 8px 8px}
 html[data-phase='menu'] .selected-copy strong{font-size:18px;margin:3px 0}html[data-phase='menu'] .selected-copy p{display:none}
 html[data-phase='menu'] .roster-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.roster-portrait{background-position:center top}
 html[data-phase='menu'] .roster-panel{padding:0 20px 12px}html[data-phase='menu'] .roster-portrait{aspect-ratio:1.25}
 html[data-phase='menu'] .roster-discipline{display:none}html[data-phase='menu'] .roster-character strong{font-size:14px}
 html[data-phase='menu'] .variant-note{margin:8px 0 0;font-size:12px}html[data-phase='menu'] .selection-toolbar{margin-bottom:9px}
 html[data-phase='menu'] .start-card{padding:12px 20px;gap:24px}.start-footnote{font-size:12px}
}
/* Aim height: hold 上段 / 下段 while pressing a blade button (nothing held = 中段). */
.movement-group{display:grid;grid-template-columns:auto auto;column-gap:10px;align-items:end}
.movement-group .group-label{grid-column:1/-1}
.aim-buttons{display:grid;grid-template-rows:1fr 1fr;gap:6px;align-self:stretch;touch-action:none}
.control.aim{display:flex;flex-direction:column;align-items:center;justify-content:center;width:58px;min-height:0;padding:0;border:2px solid #8fd9bd;border-radius:16px;background:linear-gradient(#2d6458,#163a33);box-shadow:0 4px 0 #05182e;color:#eafff6;font-size:14px;font-weight:800;gap:1px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.control.aim kbd{font-size:10px}
html[data-layout='landscape']:not([data-phase='menu']) .movement-group{display:grid}
html[data-layout='landscape']:not([data-phase='menu']) .aim-buttons{pointer-events:auto}
html[data-layout='landscape']:not([data-phase='menu']) .control.aim{width:54px;background:linear-gradient(#2d6458db,#163a33ed)}
.movement-group[data-fixed='true'] .control.aim{opacity:1}
