/* Phase 20.2 — Hush Mobile Viewport Fix / No More Left-Rail Coffin */

body[data-page-kind="adversarial-bench"],
body[data-page-kind="adversarial-bench"] * ,
body[data-page-kind="adversarial-bench"] *::before,
body[data-page-kind="adversarial-bench"] *::after{
  box-sizing:border-box;
}

body[data-page-kind="adversarial-bench"]{
  max-width:100vw;
  overflow-x:hidden;
}

body[data-page-kind="adversarial-bench"] .hush-alien-console,
body[data-page-kind="adversarial-bench"] .hush-stage,
body[data-page-kind="adversarial-bench"] .hush-compose-card,
body[data-page-kind="adversarial-bench"] .hush-compose-grid,
body[data-page-kind="adversarial-bench"] .hush-message-chamber,
body[data-page-kind="adversarial-bench"] .hush-mask-chamber,
body[data-page-kind="adversarial-bench"] .hush-output-chamber,
body[data-page-kind="adversarial-bench"] .hush-transform-gate,
body[data-page-kind="adversarial-bench"] .hush-vault-stack,
body[data-page-kind="adversarial-bench"] .hush-drawer-console,
body[data-page-kind="adversarial-bench"] .hush-drawer-body,
body[data-page-kind="adversarial-bench"] .hush-lab-panel,
body[data-page-kind="adversarial-bench"] .hush-mask-panel,
body[data-page-kind="adversarial-bench"] .hush-profile-panel,
body[data-page-kind="adversarial-bench"] .hush-match-panel,
body[data-page-kind="adversarial-bench"] .hush-warning-panel{
  min-width:0!important;
  max-width:100%!important;
}

body[data-page-kind="adversarial-bench"] textarea,
body[data-page-kind="adversarial-bench"] input,
body[data-page-kind="adversarial-bench"] select,
body[data-page-kind="adversarial-bench"] button{
  max-width:100%!important;
}

@media(max-width:760px){
  html,
  body[data-page-kind="adversarial-bench"]{
    width:100%;
    max-width:100%;
    overflow-x:hidden!important;
  }

  body[data-page-kind="adversarial-bench"] .shell-station.hush-instrument,
  body[data-page-kind="adversarial-bench"] .shell.hush-instrument,
  body[data-page-kind="adversarial-bench"] .hush-alien-console{
    inline-size:100%!important;
    max-inline-size:100%!important;
    overflow-x:clip!important;
  }

  .hush-stage{
    inline-size:100%!important;
    max-inline-size:100%!important;
    overflow:visible!important;
  }

  .hush-mask-tabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:.44rem!important;
    inline-size:100%!important;
    max-inline-size:100%!important;
    overflow:hidden!important;
  }

  .hush-mask-tabs button{
    inline-size:auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    padding:.62rem .5rem!important;
    white-space:nowrap;
  }

  .hush-route-grid,
  .hush-pressure-ribbon,
  .hush-heat-grid{
    inline-size:100%!important;
    max-inline-size:100%!important;
    min-inline-size:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .hush-route-grid::-webkit-scrollbar,
  .hush-pressure-ribbon::-webkit-scrollbar,
  .hush-heat-grid::-webkit-scrollbar{display:none}

  .hush-route-card{
    flex:0 0 min(86%,24rem)!important;
    inline-size:min(86%,24rem)!important;
    min-inline-size:min(86%,24rem)!important;
    max-inline-size:min(86%,24rem)!important;
  }

  .hush-heat-tile{
    flex:0 0 min(48%,13rem)!important;
    inline-size:min(48%,13rem)!important;
    min-inline-size:min(48%,13rem)!important;
    max-inline-size:min(48%,13rem)!important;
  }

  .hush-action-row{
    inline-size:100%!important;
    max-inline-size:100%!important;
  }

  .hush-action-row > *{
    min-width:0!important;
    width:100%!important;
  }

  .hush-output-status-band,
  .recognition-field-controls,
  .escape-vector-grid{
    min-width:0!important;
    max-width:100%!important;
  }

  .hush-field-shell,
  .hush-status-chip,
  .metric,
  .persona-memory-summary,
  .bay-profile,
  .hush-mask-note{
    overflow-wrap:anywhere;
    word-break:normal;
  }

  .hush-transform-gate{
    padding:.46rem!important;
    margin:.04rem 0!important;
    border-radius:22px!important;
  }

  .hush-transform-gate::before{
    inset:5px!important;
    border-radius:17px!important;
  }

  .hush-action-row{
    gap:.32rem!important;
  }

  #generateMaskedOutputBtn{
    min-height:2.85rem!important;
    font-size:.82rem!important;
  }

  #copyHushOutputBtn{
    min-height:2.18rem!important;
    font-size:.72rem!important;
  }

  #analyzeOutputBtn,
  #acceptOutputBtn,
  #openHushReviewBtn,
  #resetBenchBtn{
    min-height:2.08rem!important;
    font-size:.72rem!important;
  }

  .hush-gate-strip{
    gap:.22rem!important;
    margin-top:.3rem!important;
  }

  .hush-gate-strip span{
    min-height:.88rem!important;
    padding:.1rem .16rem!important;
    font-size:.5rem!important;
    line-height:1!important;
    letter-spacing:.025em!important;
  }
}

@media(max-width:430px){
  .hush-route-card{
    flex-basis:88%!important;
    inline-size:88%!important;
    min-inline-size:88%!important;
    max-inline-size:88%!important;
  }

  .hush-heat-tile{
    flex-basis:66%!important;
    inline-size:66%!important;
    min-inline-size:66%!important;
    max-inline-size:66%!important;
  }

  .hush-transform-gate{
    padding:.42rem!important;
    border-radius:20px!important;
  }

  .hush-action-row{
    gap:.28rem!important;
  }

  #generateMaskedOutputBtn{
    min-height:2.72rem!important;
    font-size:.78rem!important;
  }

  #copyHushOutputBtn{
    min-height:2.05rem!important;
    font-size:.68rem!important;
  }

  #analyzeOutputBtn,
  #acceptOutputBtn,
  #openHushReviewBtn,
  #resetBenchBtn{
    min-height:1.95rem!important;
    font-size:.68rem!important;
  }

  .hush-gate-strip{
    gap:.18rem!important;
    margin-top:.24rem!important;
  }

  .hush-gate-strip span{
    min-height:.78rem!important;
    padding:.08rem .12rem!important;
    font-size:.46rem!important;
  }
}
