/* BeanBot TEST — restore the recovered Nov 12 Frozen Relay Level 2 traversal pad.
   Source: DEXUS square-Frozen Relay control pass and two-row primary/utility layout.
   CSS presentation only: existing data-key handlers, unlocks, gameplay and boss
   combat are untouched. Wrappers flatten outside Level 2 to preserve grids. */


/* Only the playable Level 2 map; never recolour PvP / DexRun boss controls. */
body[data-dexrun-level="2"] #controls {
  --dexus-button-size:clamp(50px,min(17vw,12dvh),74px);
  position:fixed!important;
  inset:auto 0 calc(max(8px,env(safe-area-inset-bottom)) + 42px)!important;
  padding:0 calc(clamp(6px,2.5vw,16px) + 14px + env(safe-area-inset-right)) 0 calc(clamp(6px,2.5vw,16px) + 14px + env(safe-area-inset-left))!important;
  display:flex!important;justify-content:space-between!important;
  align-items:flex-end!important;
  gap:clamp(6px,2vw,16px)!important;
  z-index:3;
}
body[data-dexrun-level="2"] #controls .pad {
  position:static!important;display:flex!important;flex:0 0 auto;
  align-items:center!important;gap:clamp(6px,1.8vw,12px)!important;
}
body[data-dexrun-level="2"] #controls .actions {
  position:static!important;display:flex!important;
  flex-direction:column!important;align-items:flex-end!important;
  justify-content:flex-end!important;flex:0 0 auto;
  gap:8px!important;
}
body[data-dexrun-level="2"] #controls .dexus-utility-buttons,
body[data-dexrun-level="2"] #controls .dexus-primary-buttons {
  display:grid!important;
  grid-template-columns:repeat(2,var(--dexus-button-size))!important;
  grid-auto-flow:row!important;
  grid-auto-rows:var(--dexus-button-size)!important;
  justify-content:end!important;align-items:center!important;
  gap:clamp(6px,1.8vw,10px)!important;
}
body[data-dexrun-level="2"] #controls .ctl {
  grid-column:auto!important;grid-row:auto!important;
  width:var(--dexus-button-size)!important;
  height:var(--dexus-button-size)!important;
  min-width:50px;min-height:50px;max-width:74px;max-height:74px;
  display:grid!important;place-items:center!important;padding:0!important;
  border:2px solid #b1ebff!important;border-radius:15px!important;
  background:linear-gradient(150deg,rgba(31,65,84,.96),rgba(7,19,38,.97))!important;
  color:#effcff!important;
  box-shadow:0 5px 20px #0009!important;
  font-size:clamp(24px,7vw,33px)!important;line-height:1!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  touch-action:none!important;cursor:pointer;
  -webkit-user-select:none;user-select:none;
}
body[data-dexrun-level="2"] #controls .actions .ctl.hidebtn {
  display:none!important;
}
body[data-dexrun-level="2"] #controls .dexus-primary-buttons .ctl {
  border-color:#9fe8ff!important;
  box-shadow:inset 0 0 20px #9fe8ff17,0 4px 20px #000b!important;
}
body[data-dexrun-level="2"] #controls #jumpBtn {
  border-color:#ffd54a!important;background:#16384f!important;color:#d5f6ff!important;
}
body[data-dexrun-level="2"] #controls .ctl.on,
body[data-dexrun-level="2"] #controls .ctl:active {
  border-color:#fff!important;
  box-shadow:0 0 15px #9fe8ff70,inset 0 0 20px #9fe8ff25!important;
  transform:scale(.96);
}
body[data-dexrun-level="2"] #controls .ctl:focus-visible {
  outline:3px solid #f2ffff!important;outline-offset:3px!important;
}
@media (max-height:520px) and (orientation:landscape) {
 body[data-dexrun-level="2"] #controls {--dexus-button-size:50px;gap:6px!important;}
 body[data-dexrun-level="2"] #controls .actions {gap:5px!important;}
}

/* Menu-only historical intro; independent from input handlers. */
.dexrun-level2-comic{margin:8px 0;color:#bbf2ff;border:1px solid rgba(111,223,255,.3);border-radius:10px;padding:8px;background:#071a28}
.dexrun-level2-comic summary{cursor:pointer;font-size:12px;font-weight:900}
.dexrun-level2-comic img{display:block;width:100%;max-height:66vh;object-fit:contain;margin-top:8px;border-radius:8px}

/* Level 2 only: crystal ice square controls, original input mapping preserved. */
body[data-dexrun-level="2"] #controls .ctl{
 position:relative!important;overflow:hidden!important;border-radius:12px!important;
 background:linear-gradient(146deg,rgba(75,139,169,.86),rgba(20,57,80,.94) 34%,rgba(5,20,39,.96))!important;
 border:2px solid #b2e8ff!important;color:#f0fdff!important;
 text-shadow:0 2px 6px #001827,0 0 10px #9edcff9c!important;
 box-shadow:inset 0 1px rgba(255,255,255,.55),inset 0 -10px 16px rgba(3,19,43,.45),0 4px 17px #000b!important;
}
body[data-dexrun-level="2"] #controls .ctl::before{
 content:"";position:absolute;inset:4px;pointer-events:none;border-radius:8px;
 border:1px solid rgba(210,248,255,.20);
 background:linear-gradient(145deg,rgba(228,250,255,.18),transparent 43%);
}
body[data-dexrun-level="2"] #controls #blastBtn{
 border-color:#9df3ff!important;background:linear-gradient(145deg,#276779,#0b2b56)!important;color:#fff!important
}
body[data-dexrun-level="2"] #controls #jumpBtn{
 border-color:#f5fcff!important;background:linear-gradient(145deg,#476b89,#153b58)!important;color:#fff!important
}
body[data-dexrun-level="2"] #controls .ctl.on,
body[data-dexrun-level="2"] #controls .ctl:active{
 box-shadow:0 0 16px #d8f9ff9c,inset 0 0 19px #93dbff48!important;transform:scale(.96)
}
