/* ============================================================================
   J.W. AIRRADAR v2.2.0 – VIEWPORT FIT + HANDSET EXPERIENCE
   ----------------------------------------------------------------------------
   Presentation-only responsive layer.
   - keeps the complete physical device inside the available viewport
   - respects browser safe-area insets
   - shows a dedicated AIRRADAR handset notice instead of a cropped cockpit
   ============================================================================ */

html,
body,
body.cockpit-integrated{
  width:100% !important;
  height:100% !important;
  min-height:100dvh !important;
  overflow:hidden !important;
}

#cockpitViewport{
  box-sizing:border-box !important;
  padding-top:max(6px, env(safe-area-inset-top)) !important;
  padding-right:max(8px, env(safe-area-inset-right)) !important;
  padding-bottom:max(8px, env(safe-area-inset-bottom)) !important;
  padding-left:max(8px, env(safe-area-inset-left)) !important;
}

#cockpitScaleWrap{
  flex:none !important;
  transform-origin:top center !important;
}

/* --------------------------------------------------------------------------
   Handset notice
   The full cockpit intentionally does not get squeezed into a phone display.
   -------------------------------------------------------------------------- */
.mobile-screen-notice{
  display:none;
  position:fixed;
  inset:0;
  z-index:2147483000;
  box-sizing:border-box;
  overflow:auto;
  padding:
    max(22px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 4%,rgba(20,102,88,.15),transparent 36%),
    linear-gradient(180deg,#071012 0%,#020607 55%,#010304 100%);
  color:#eef8f8;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  text-align:center;
}

.mobile-screen-notice__card{
  width:min(100%,500px);
  margin:auto;
  padding:28px 24px 26px;
  box-sizing:border-box;
  border:1px solid rgba(255,66,66,.58);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(28,43,46,.94),rgba(7,15,17,.97));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 0 1px rgba(0,0,0,.85),
    0 18px 50px rgba(0,0,0,.52);
}

.mobile-screen-notice__logo{
  display:block;
  width:min(100%,390px);
  height:auto;
  margin:0 auto 28px;
  filter:drop-shadow(0 5px 12px rgba(0,0,0,.48));
}

.mobile-screen-notice__warning{
  margin:0 auto 14px;
  color:#ff5252;
  font-size:clamp(18px,5.2vw,25px);
  font-weight:800;
  line-height:1.16;
  letter-spacing:.035em;
  text-transform:uppercase;
  text-shadow:0 0 12px rgba(255,42,42,.13);
}

.mobile-screen-notice__text{
  margin:0 auto;
  max-width:410px;
  color:#dceaea;
  font-size:clamp(14px,4vw,17px);
  line-height:1.55;
}

.mobile-screen-notice__text strong{
  color:#ffffff;
  font-weight:700;
}


/* Portrait phones and narrow handset-class touch screens. */
@media (hover:none) and (pointer:coarse) and (max-width:680px){
  body:not(.intro-page) .mobile-screen-notice{display:flex !important;}
  body:not(.intro-page) > .intro,
  body:not(.intro-page) > #cockpitViewport,
  body:not(.intro-page) > #legacyCompat{
    visibility:hidden !important;
    pointer-events:none !important;
  }
}

/* Landscape phones: width can be large, but the short touch viewport still
   cannot present the complete cockpit at a useful scale. */
@media (hover:none) and (pointer:coarse) and (max-height:540px) and (max-width:980px){
  body:not(.intro-page) .mobile-screen-notice{display:flex !important;}
  body:not(.intro-page) > .intro,
  body:not(.intro-page) > #cockpitViewport,
  body:not(.intro-page) > #legacyCompat{
    visibility:hidden !important;
    pointer-events:none !important;
  }
}
