/* Nerddi OS Run 51 · BotzWar Fullscreen Hardware Pass
   Loaded after Run 50. Layout/presentation only; transport authority remains unchanged. */

.controller-fullscreen-toggle{
  min-width:40px;height:28px;padding:0 7px;border:1px solid #294858;border-radius:8px;
  background:linear-gradient(180deg,#0b1922,#050b10);color:#9fd6e3;
  font:950 5px/1 system-ui;letter-spacing:.09em;touch-action:manipulation;
}
.controller-fullscreen-toggle[aria-pressed="true"]{border-color:var(--accent);color:#fff;box-shadow:0 0 16px color-mix(in srgb,var(--accent) 18%,transparent)}

/* Molded left/right wells: controls should feel mounted into hardware, not floating in blank space. */
.controller-app[data-game-skin="botzwar"] .deck-left-body,
.controller-app[data-game-skin="botzwar"] .deck-right-body{
  isolation:isolate;position:relative;border:1px solid #19384a;border-radius:34px 18px 36px 18px;
  background:radial-gradient(ellipse at 50% 46%,#102432 0,#07121b 44%,#02070b 78%);
  box-shadow:inset 0 0 42px #000,inset 0 0 0 7px #071019,0 1px 0 #ffffff0c;
  overflow:hidden;
}
.controller-app[data-game-skin="botzwar"] .deck-left-body:before,
.controller-app[data-game-skin="botzwar"] .deck-right-body:before{
  content:"";position:absolute;z-index:-1;inset:8px;border:1px solid #23495a;border-radius:28px 14px 30px 14px;
  background:radial-gradient(circle at 50% 48%,color-mix(in srgb,var(--accent) 9%,transparent),transparent 60%);
  box-shadow:inset 0 0 42px #000b,0 0 18px color-mix(in srgb,var(--accent) 7%,transparent);
  pointer-events:none;
}
.controller-app[data-game-skin="botzwar"] .deck-left-controls{position:relative;z-index:2;width:100%;height:100%;min-height:0;display:grid!important;grid-template-columns:1fr!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-module{padding:5px!important;gap:3px!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector{justify-content:center!important;gap:3px!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector>small{display:none!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector>div{width:100%;justify-content:center;gap:3px!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector button{flex:1 1 0;min-width:0;min-height:22px!important;padding:0 4px!important;border-radius:999px!important;font-size:4px!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector button[data-direction-mode="stick"]:before{content:"◉ ";color:var(--accent)}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector button[data-direction-mode="dpad"]:before{content:"✚ ";color:var(--accent)}
.controller-app[data-game-skin="botzwar"] .deck-direction-selector button[data-direction-mode="both"]:before{content:"◉+ ";color:var(--accent)}
.controller-app[data-game-skin="botzwar"] .deck-direction-stack{width:100%;min-width:0;min-height:0}
.controller-app[data-game-skin="botzwar"] .deck-direction-module[data-direction-mode="both"] .deck-direction-stack{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  align-items:center;justify-items:center;gap:3px!important;
}
.controller-app[data-game-skin="botzwar"] .deck-direction-module[data-direction-mode="both"] .virtual-stick,
.controller-app[data-game-skin="botzwar"] .deck-direction-module[data-direction-mode="both"] .master-direction-control{width:100%;height:100%;min-width:0;min-height:0}
.controller-app[data-game-skin="botzwar"] .deck-direction-module[data-direction-mode="both"] .virtual-stick .stick-rings{width:min(12vh,76px)!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-module[data-direction-mode="both"] .virtual-stick .stick-knob{width:min(5.2vh,38px)!important;height:min(5.2vh,38px)!important}
.controller-app[data-game-skin="botzwar"] .deck-direction-module[data-direction-mode="both"] .master-direction-pad{width:min(12vh,76px)!important}

/* Fifth BotzWar face control. The four canonical face buttons remain untouched. */
.controller-app[data-game-skin="botzwar"] .deck-face-z{
  width:31%!important;min-width:42px!important;min-height:42px!important;right:-3%!important;top:-10%!important;left:auto!important;bottom:auto!important;
  border-color:#4d6572!important;background:radial-gradient(circle at 35% 25%,#253743,#0a131a 58%,#020609 100%)!important;
  z-index:6;
}
.controller-app[data-game-skin="botzwar"] .deck-face-z strong{color:#f4b942!important;font-size:clamp(13px,3.5vh,20px)!important}
.controller-app[data-game-skin="botzwar"] .deck-face-z span{font-size:4.5px!important}

/* Fullscreen phone controller: Nerddi Link takes the old header rail; the controller owns everything else. */
@media(orientation:landscape){
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode){
    width:100vw;height:100dvh;min-height:100dvh;max-height:100dvh;
    grid-template-areas:"link" "profile"!important;
    grid-template-rows:32px minmax(0,1fr)!important;
    gap:2px!important;
    padding:max(env(safe-area-inset-top),2px) max(env(safe-area-inset-right),3px) max(env(safe-area-inset-bottom),2px) max(env(safe-area-inset-left),3px)!important;
    overflow:hidden!important;
  }
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode)>header{display:none!important}
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode)>.controller-hud{display:none!important}
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode)>footer{display:none!important}
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode)>.nerddi-link-panel{grid-area:link!important}
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode)>.profile-shell{grid-area:profile!important}

  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel{
    z-index:40;width:100%;height:30px;min-height:30px;max-height:30px;margin:0!important;padding:2px 5px!important;
    grid-template-columns:minmax(105px,.62fr) minmax(110px,1.8fr) 48px auto auto!important;
    grid-template-rows:26px!important;gap:3px!important;border-radius:10px!important;
    background:linear-gradient(90deg,#06131be8,#041019e8 55%,#06131be8)!important;
    backdrop-filter:blur(12px);
  }
  .controller-app[data-game-skin="botzwar"] .nerddi-link-summary{grid-column:1!important;grid-row:1!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-summary small{font-size:3.8px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-summary b{font-size:7px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-summary>span{display:none!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-graph{grid-column:2!important;grid-row:1!important;height:22px!important;border-radius:5px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-metrics{grid-column:3!important;grid-row:1!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-metrics span:first-child small{font-size:3.4px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-metrics span:first-child b{font-size:6px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-toggle{grid-column:4!important;grid-row:1!important;height:24px!important;min-width:36px!important;padding:0 5px!important;font-size:4.5px!important}
  .controller-app[data-game-skin="botzwar"] .controller-fullscreen-toggle{grid-column:5!important;grid-row:1!important;height:24px;min-width:36px;padding:0 5px;font-size:4.5px}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel[data-expanded="true"]{
    position:fixed!important;z-index:70;top:max(env(safe-area-inset-top),2px);left:max(env(safe-area-inset-left),3px);right:max(env(safe-area-inset-right),3px);
    width:auto!important;height:94px!important;max-height:94px!important;padding:7px 8px!important;
    grid-template-columns:minmax(135px,.8fr) minmax(180px,1.55fr) auto auto!important;
    grid-template-rows:32px 42px!important;box-shadow:0 18px 55px #000d,0 0 0 1px color-mix(in srgb,var(--accent) 22%,transparent);
  }
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel[data-expanded="true"] .nerddi-link-summary{grid-column:1!important;grid-row:1!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel[data-expanded="true"] .nerddi-link-graph{grid-column:2!important;grid-row:1/3!important;height:66px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel[data-expanded="true"] .nerddi-link-metrics{grid-column:1!important;grid-row:2!important;display:flex!important;gap:6px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel[data-expanded="true"] .nerddi-link-toggle{grid-column:3!important;grid-row:1!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel[data-expanded="true"] .controller-fullscreen-toggle{grid-column:4!important;grid-row:1!important}

  .controller-app[data-game-skin="botzwar"] .profile-shell{
    width:100%;height:100%;min-height:0;margin:0!important;border-radius:20px!important;
    grid-template-rows:minmax(0,1fr)!important;overflow:hidden!important;
  }
  .controller-app[data-game-skin="botzwar"] .profile-top{display:none!important}
  .controller-app[data-game-skin="botzwar"] .private-game-screen-home:empty{display:none!important}
  .controller-app[data-game-skin="botzwar"] .controller-stage{height:100%!important;min-height:0!important;padding:2px!important;gap:0!important}
  .controller-app[data-game-skin="botzwar"] .layout-banner{display:none!important}
  .controller-app[data-game-skin="botzwar"] .controller-stage[data-controldeck-chassis="gamepad"]{grid-template-rows:minmax(0,1fr)!important;padding:0!important}
  .controller-app[data-game-skin="botzwar"] .controller-stage[data-controldeck-chassis="gamepad"] .controldeck-gamepad{
    width:100%;height:100%;min-height:0!important;
    grid-template-columns:clamp(118px,18vw,158px) minmax(0,1fr) clamp(112px,17vw,150px)!important;
    gap:4px!important;padding:4px!important;border-radius:22px!important;
  }
  .controller-app[data-game-skin="botzwar"] .deck-wing{grid-template-rows:28px minmax(0,1fr)!important;gap:3px!important;padding:0!important}
  .controller-app[data-game-skin="botzwar"] .deck-shoulders{gap:3px!important}
  .controller-app[data-game-skin="botzwar"] .deck-shoulder{min-width:0!important;min-height:28px!important;height:28px!important;padding:2px!important;border-radius:9px 9px 12px 12px!important}
  .controller-app[data-game-skin="botzwar"] .deck-shoulder b{font-size:6px!important}
  .controller-app[data-game-skin="botzwar"] .deck-shoulder small{font-size:3.5px!important}
  .controller-app[data-game-skin="botzwar"] .deck-center{height:100%!important;min-height:0!important;padding:0 1px!important;grid-template-rows:minmax(0,1fr) auto!important;gap:2px!important}
  .controller-app[data-game-skin="botzwar"] .deck-center-head{display:none!important}
  .controller-app[data-game-skin="botzwar"] .deck-screen{height:100%!important;min-height:0!important;border-radius:16px!important}
  .controller-app[data-game-skin="botzwar"] .deck-computer-dock{height:20px!important;gap:2px!important}
  .controller-app[data-game-skin="botzwar"] .deck-computer-dock>button{height:19px!important;padding:0 3px!important;font-size:3.3px!important}
  .controller-app[data-game-skin="botzwar"] .deck-computer-dock>.deck-system-button{width:31px!important;flex-basis:31px!important}
  .controller-app[data-game-skin="botzwar"] .deck-face-cluster{width:min(24vh,126px)!important;max-width:100%!important}
  .controller-app[data-game-skin="botzwar"] .deck-left-body .stick-rings{width:min(25vh,132px)!important}
  .controller-app[data-game-skin="botzwar"] .deck-left-body .stick-knob{width:min(10vh,60px)!important;height:min(10vh,60px)!important}
}

/* Extremely short phone landscape: keep touch targets usable and give the center computer every remaining pixel. */
@media(orientation:landscape) and (max-height:430px){
  .controller-app[data-game-skin="botzwar"]:not(.controller-studio-mode){grid-template-rows:28px minmax(0,1fr)!important;gap:1px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-panel{height:27px;min-height:27px;max-height:27px;grid-template-rows:23px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-graph{height:19px!important}
  .controller-app[data-game-skin="botzwar"] .nerddi-link-toggle,.controller-app[data-game-skin="botzwar"] .controller-fullscreen-toggle{height:21px!important}
  .controller-app[data-game-skin="botzwar"] .controller-stage[data-controldeck-chassis="gamepad"] .controldeck-gamepad{grid-template-columns:clamp(108px,17vw,138px) minmax(0,1fr) clamp(104px,16vw,132px)!important;gap:3px!important;padding:3px!important}
  .controller-app[data-game-skin="botzwar"] .deck-wing{grid-template-rows:25px minmax(0,1fr)!important}
  .controller-app[data-game-skin="botzwar"] .deck-shoulder{height:25px!important;min-height:25px!important}
  .controller-app[data-game-skin="botzwar"] .deck-direction-selector button{min-height:19px!important;font-size:3.5px!important}
  .controller-app[data-game-skin="botzwar"] .deck-direction-module{padding:3px!important}
  .controller-app[data-game-skin="botzwar"] .deck-face-cluster{width:min(22vh,108px)!important}
  .controller-app[data-game-skin="botzwar"] .deck-face-z{min-width:38px!important;min-height:38px!important}
  .controller-app[data-game-skin="botzwar"] .deck-left-body .stick-rings{width:min(22vh,112px)!important}
  .controller-app[data-game-skin="botzwar"] .gamescreen-tool-arcade{padding:3px!important;gap:2px!important;grid-template-rows:auto minmax(58px,1fr) minmax(0,.52fr) auto!important}
  .controller-app[data-game-skin="botzwar"] .deck-computer-dock{height:18px!important}
  .controller-app[data-game-skin="botzwar"] .deck-computer-dock>button{height:17px!important;font-size:3px!important}
}

@media(orientation:portrait){
  .controller-app[data-game-skin="botzwar"] .controller-fullscreen-toggle{display:none}
  .controller-app[data-game-skin="botzwar"] .deck-left-body,.controller-app[data-game-skin="botzwar"] .deck-right-body{border-radius:24px 14px}
}

@media(prefers-reduced-motion:reduce){.controller-fullscreen-toggle{transition:none}}
