/* ANSEM RUN V35 — mobile input reachability and safe-area refinements.
   The native Construct 2 canvas and gameplay inputs remain unchanged. */
@media (max-width: 540px) {
  #ansem-level-select-v30 {
    box-sizing: border-box;
    inset: 0 auto auto 0;
    width: 100vw;
    height: 100dvh;
    min-width: 0;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #ansem-level-select-v30 .panel {
    max-height: min(96dvh, 750px);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #ansem-level-select-v30 .level,
  #ansem-level-select-v30 .action {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  #ansem-level-select-v30 .level { min-height: 76px; }
  #ansem-level-select-v30 .action { min-height: 48px; }
  /* V33's SFX hit target was only 35px high under 440px. */
  #ansem-hud-v33 .hud-control .ansem-sfx-toggle-v31 { min-height: 44px !important; }
}
@media (max-width: 350px) {
  #ansem-level-select-v30 .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ansem-level-select-v30 .level { min-height: 68px; }
  #ansem-level-select-v30 .header { align-items: flex-start; }
  #ansem-level-select-v30 .total { font-size: 10px; }
}
@media (orientation: landscape) and (max-height: 460px) {
  #ansem-level-select-v30 { align-items: flex-start; }
  #ansem-level-select-v30 .panel { max-height: min(96dvh, 420px); }
}
