/* PR166 Safe Harbor mobile textarea focus: defeat iOS tap-zoom without inflating the chambers. */
@media (max-width: 720px) {
  html.safe-harbor-pr147,
  html.safe-harbor-pr147 body,
  html.safe-harbor-pr153,
  html.safe-harbor-pr153 body,
  html.safe-harbor-pr166,
  html.safe-harbor-pr166 body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  html.safe-harbor-pr147 input,
  html.safe-harbor-pr147 textarea,
  html.safe-harbor-pr147 select,
  html.safe-harbor-pr147 .ingress-textarea,
  html.safe-harbor-pr147 .code-area,
  html.safe-harbor-pr147 .safe-field,
  html.safe-harbor-pr153 input,
  html.safe-harbor-pr153 textarea,
  html.safe-harbor-pr153 select,
  html.safe-harbor-pr153 .ingress-textarea,
  html.safe-harbor-pr153 .code-area,
  html.safe-harbor-pr153 .safe-field,
  html.safe-harbor-pr166 input,
  html.safe-harbor-pr166 textarea,
  html.safe-harbor-pr166 select,
  html.safe-harbor-pr166 .ingress-textarea,
  html.safe-harbor-pr166 .code-area,
  html.safe-harbor-pr166 .safe-field {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
    padding: 9px 10px !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    touch-action: manipulation !important;
    transform: none !important;
    -webkit-transform: none !important;
    zoom: 1 !important;
  }

  html.safe-harbor-pr147 input:focus,
  html.safe-harbor-pr147 textarea:focus,
  html.safe-harbor-pr147 select:focus,
  html.safe-harbor-pr147 .ingress-textarea:focus,
  html.safe-harbor-pr147 .code-area:focus,
  html.safe-harbor-pr147 .safe-field:focus,
  html.safe-harbor-pr153 input:focus,
  html.safe-harbor-pr153 textarea:focus,
  html.safe-harbor-pr153 select:focus,
  html.safe-harbor-pr153 .ingress-textarea:focus,
  html.safe-harbor-pr153 .code-area:focus,
  html.safe-harbor-pr153 .safe-field:focus,
  html.safe-harbor-pr166 input:focus,
  html.safe-harbor-pr166 textarea:focus,
  html.safe-harbor-pr166 select:focus,
  html.safe-harbor-pr166 .ingress-textarea:focus,
  html.safe-harbor-pr166 .code-area:focus,
  html.safe-harbor-pr166 .safe-field:focus {
    font-size: 16px !important;
    line-height: 1.22 !important;
    transform: none !important;
    -webkit-transform: none !important;
    zoom: 1 !important;
  }

  html.safe-harbor-pr147 .ingress-textarea,
  html.safe-harbor-pr153 .ingress-textarea,
  html.safe-harbor-pr166 .ingress-textarea {
    min-height: 164px !important;
    height: clamp(164px, 32dvh, 224px) !important;
  }

  html.safe-harbor-pr147 .code-area,
  html.safe-harbor-pr153 .code-area,
  html.safe-harbor-pr166 .code-area {
    min-height: 152px !important;
    height: clamp(152px, 30dvh, 216px) !important;
  }

  html.safe-harbor-pr147 .safe-field,
  html.safe-harbor-pr147 textarea:not(.ingress-textarea):not(.code-area),
  html.safe-harbor-pr153 .safe-field,
  html.safe-harbor-pr153 textarea:not(.ingress-textarea):not(.code-area),
  html.safe-harbor-pr166 .safe-field,
  html.safe-harbor-pr166 textarea:not(.ingress-textarea):not(.code-area) {
    min-height: 112px !important;
    max-height: 34dvh !important;
  }

  /* PR168 iOS Safari width lock.
     Preserve the chamber art while preventing an old or partially cached
     header/action layout from widening the visual viewport. */
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  .ingress-membrane:not(.is-hidden),
  .ingress-shell,
  .ingress-head,
  .ingress-head-actions,
  .status-strip.ingress-status,
  .ingress-stage-rail,
  .ingress-handshake-grid,
  .ingress-step-panel,
  .ingress-console-panel,
  .ingress-step-entry,
  .ingress-step-nav {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ingress-membrane:not(.is-hidden) {
    width: 100% !important;
    padding-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px)) !important;
    overflow-x: clip !important;
  }

  .ingress-shell {
    width: 100% !important;
    margin-inline: 0 !important;
    overflow-x: clip !important;
  }

  .ingress-head,
  .ingress-handshake-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .ingress-head-actions {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
  }

  .ingress-stage-rail {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
  }

  .ingress-step-nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .ingress-step-nav > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
