/* ClokIt USA Phase 3 — mobile field workflow speed and navigation polish */
@media (max-width:760px){
  /* One navigation system only while the guided project workflow is active. */
  html.clokit-mobile-workboard-active .clokit-field-shell,
  html.clokit-mobile-card-index-active .clokit-field-shell,
  html.clokit-mobile-card-active .clokit-field-shell,
  html.clokit-mobile-workboard-active .clokit-field-status,
  html.clokit-mobile-card-index-active .clokit-field-status,
  html.clokit-mobile-card-active .clokit-field-status,
  html.clokit-mobile-workboard-active #clokitGuideHead,
  html.clokit-mobile-card-index-active #clokitGuideHead,
  html.clokit-mobile-card-active #clokitGuideHead,
  html.clokit-mobile-workboard-active #clokitGuideFooter,
  html.clokit-mobile-card-index-active #clokitGuideFooter,
  html.clokit-mobile-card-active #clokitGuideFooter{display:none!important;visibility:hidden!important;pointer-events:none!important;}

  html.clokit-mobile-card-active .v22121-module-body,
  html.clokit-mobile-card-index-active .v22121-module-body{padding-bottom:calc(104px + env(safe-area-inset-bottom))!important;}

  /* Make the guided dock sturdy, reachable, and clear of iPhone safe areas. */
  html.clokit-mobile-workboard-active .mobile-field-dock,
  html.clokit-mobile-card-index-active .mobile-field-dock,
  html.clokit-mobile-card-active .mobile-field-dock{
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    min-height:62px!important;
    border-radius:18px!important;
    padding:6px!important;
    gap:4px!important;
    box-shadow:0 15px 38px rgba(7,24,39,.28)!important;
    transform:translateZ(0)!important;
  }
  html.clokit-mobile-workboard-active .mobile-field-dock button,
  html.clokit-mobile-card-index-active .mobile-field-dock button,
  html.clokit-mobile-card-active .mobile-field-dock button{
    min-height:48px!important;
    min-width:0!important;
    padding:5px 3px!important;
    border-radius:12px!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  /* When the software keyboard is open, get navigation out of the typing area. */
  html.clokit-keyboard-open .mobile-field-dock{opacity:0!important;transform:translateY(120%)!important;pointer-events:none!important;transition:opacity .14s ease,transform .18s ease!important;}
  html:not(.clokit-keyboard-open) .mobile-field-dock{transition:opacity .14s ease,transform .18s ease!important;}

  /* Compact, sticky field context. */
  html.clokit-mobile-card-active .clokit-mobile-card-nav{
    position:sticky!important;
    top:0!important;
    z-index:120!important;
    margin:0!important;
    min-height:46px!important;
    background:rgba(247,250,252,.98)!important;
    border-bottom:1px solid #d9e5eb!important;
    box-shadow:0 5px 14px rgba(15,36,55,.045)!important;
  }
  html.clokit-mobile-card-active .clokit-mobile-card-nav>button{min-height:36px!important;min-width:64px!important;font-size:9px!important;}
  html.clokit-mobile-card-active .clokit-card-context small{font-size:6.5px!important;line-height:1.15!important;}
  html.clokit-mobile-card-active .clokit-card-context b{font-size:9.5px!important;line-height:1.15!important;}

  /* Cards remain compact but become easier to hit in the field. */
  .clokit-card-index-row{min-height:68px!important;padding:10px 11px!important;}
  .clokit-card-index-num{width:34px!important;height:34px!important;}
  .clokit-card-index-row>strong{width:26px!important;min-width:26px!important;}
  .clokit-card-index-next{min-height:50px!important;padding:9px 11px!important;}

  /* Keep editable controls easy to hit and readable on phones. */
  html.clokit-mobile-card-active .form-panel input:not([type="checkbox"]):not([type="radio"]),
  html.clokit-mobile-card-active .form-panel select,
  html.clokit-mobile-card-active .form-panel textarea{
    min-height:46px!important;
    font-size:16px!important;
    scroll-margin-top:88px!important;
    scroll-margin-bottom:140px!important;
  }
  html.clokit-mobile-card-active .form-panel textarea{min-height:96px!important;}
  html.clokit-mobile-card-active .form-panel button{min-height:42px;}

  /* Bottom completion controls must never hide under the dock. */
  html.clokit-mobile-card-active .clokit-card-finish,
  html.clokit-mobile-card-active [data-clokit-finish-card],
  html.clokit-mobile-card-active [data-clokit-save-continue]{margin-bottom:18px!important;min-height:48px!important;}

  @media(prefers-reduced-motion:reduce){
    html.clokit-keyboard-open .mobile-field-dock,
    html:not(.clokit-keyboard-open) .mobile-field-dock{transition:none!important;}
  }
}
