/* 777 Staff — phone-width fit (Nov 11 2026).
   Linked only from staff pages. Keeps 320–430px screens from growing sideways
   and keeps text-entry controls at 16px or larger so iOS will not zoom on focus.
   Viewport stays width=device-width, initial-scale=1 (pinch-zoom remains). */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:hidden;overflow-wrap:anywhere}
*,*::before,*::after{box-sizing:border-box}

header,header .row,header .top,header .top-right,header .top-brand,
#accountBtns,main,#view,.wrap,.card,.notice,#addBox,#mFixBox{
  max-width:100%;min-width:0
}
header{padding-left:max(12px, env(safe-area-inset-left, 0px));padding-right:max(12px, env(safe-area-inset-right, 0px))}
header .row,header.top,#accountBtns{flex-wrap:wrap;row-gap:8px;min-width:0}
#accountBtns{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;
  flex-wrap:wrap!important;max-width:100%!important;min-width:0!important
}
@media (max-width:430px){
  header .row #accountBtns,header #accountBtns{flex:1 1 100%!important;margin-left:0!important}
}
#accountBtns a,#accountBtns button{flex:0 1 auto;min-width:0;max-width:100%;box-sizing:border-box}

img,video,audio,iframe,canvas{max-width:100%}
video,audio{width:100%;min-width:0}
table{max-width:100%}

/* Text-entry fields fill the card and never go below 16px (iOS zoom-on-focus).
   No !important, so an inline or later 18px PIN rule can stay larger. */
textarea,select,
input:not([type]),
input[type="text"],input[type="email"],input[type="tel"],input[type="number"],
input[type="search"],input[type="url"],input[type="date"],input[type="time"],
input[type="datetime-local"],input[type="month"],input[type="week"],
input[type="password"]{
  max-width:100%;min-width:0;box-sizing:border-box
}
textarea,select,
input:not([type]),
input[type="text"],input[type="email"],input[type="tel"],input[type="number"],
input[type="search"],input[type="url"],input[type="date"],input[type="time"],
input[type="datetime-local"],input[type="month"],input[type="week"],
input[type="password"]{
  width:100%;font-size:16px
}
/* PIN screens already use 18px; keep that where the field lives in a .card. */
.card input[type="password"]{font-size:18px}
input[type="checkbox"],input[type="radio"],input[type="file"],input[type="hidden"],
input[type="button"],input[type="submit"],input[type="reset"],input[type="image"],
input[type="color"],input[type="range"]{width:auto;max-width:100%}

/* Add-maintenance photo/video row (and other .two pairs).
   iOS Safari treats 1fr as minmax(auto,1fr) and flex items as min-width:auto, so
   the "+ Add photos / + Add video" pair can grow wider than the phone and then
   widen the Property dropdown, textarea and Voice note card with it. */
.two{
  display:grid!important;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box
}
.two>*{min-width:0!important;max-width:100%;box-sizing:border-box}
label.up,label.up small{max-width:100%;min-width:0;overflow-wrap:anywhere;box-sizing:border-box}
@media (max-width:360px){
  .two{grid-template-columns:minmax(0, 1fr)}
}

form,#addBox,select,textarea,.card,.notice{max-width:100%;min-width:0;box-sizing:border-box}
#addBox,#addBox>*{max-width:100%;min-width:0;box-sizing:border-box}
/* Describe-the-issue and similar fields: stay 16px so iOS will not zoom on focus.
   scroll-margin keeps the sticky header in view when the keyboard opens. */
#aD,#mD,#mFixN,#mNotes,textarea{font-size:16px;width:100%;max-width:100%;scroll-margin-top:120px}
select{width:100%;max-width:100%}

/* 16px !important beats inline font:inherit / font-size and injected fitCss.
   iOS Safari zooms the visual viewport when a focused field is under 16px. */
html body textarea,
html body select,
html body input:not([type]),
html body input[type="text"],
html body input[type="email"],
html body input[type="tel"],
html body input[type="number"],
html body input[type="search"],
html body input[type="url"],
html body input[type="date"],
html body input[type="time"],
html body input[type="datetime-local"],
html body input[type="month"],
html body input[type="week"]{
  font-size:16px !important
}
/* PIN / password fields stay 18px (already used on sign-in and Change PIN). Still >=16px. */
html body input[type="password"]{font-size:18px !important}
