/* iPhone / iPad polish. Loaded last on every page. Safe areas, touch targets, iOS text-size and tap behaviour. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
a,button,summary,label,select{-webkit-tap-highlight-color:transparent}
button,.btn,.pill,select,summary,input[type=range],input[type=checkbox],input[type=radio],.seg button,.tabs button{touch-action:manipulation}
body{overscroll-behavior-y:none}
.gres,.thumbs,.set-nav,.side{-webkit-overflow-scrolling:touch}

/* Notch, Dynamic Island, rounded corners and the home indicator (pages use viewport-fit=cover). env() is 0 where there is no inset. */
.work-top{padding-top:calc(10px + env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
.biz-top{padding-top:calc(14px + env(safe-area-inset-top));padding-right:max(16px,env(safe-area-inset-right))}
header.top{padding-top:calc(12px + env(safe-area-inset-top))}
.nav{padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.work-main{padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));padding-bottom:calc(110px + env(safe-area-inset-bottom))}
.biz-main main{padding-right:max(16px,env(safe-area-inset-right));padding-bottom:calc(60px + env(safe-area-inset-bottom))}
.tabbar{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
.side{padding-left:max(14px,env(safe-area-inset-left))}
footer.foot{padding-bottom:calc(60px + env(safe-area-inset-bottom))}
.wrap{padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right))}
#toast{bottom:calc(20px + env(safe-area-inset-bottom))}

/* Touch devices: 44 pt hit areas and 16 px form text (iOS zooms the page when a smaller field is focused). */
@media (pointer:coarse){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]),select,textarea{font-size:16px}
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]),select{min-height:44px}
  input[type=range]{min-height:44px}
  select{-webkit-appearance:none;appearance:none;padding:9px 38px 9px 12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238b94a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:12px 8px;line-height:1.3}
  button,.btn,.pill,.btn.small,button.small{min-height:44px}
  .logo,.brand{display:inline-flex;align-items:center;min-height:44px}
  .bell,.gear,.ibtn{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .side nav a,.wnav a,.set-nav a,.seg2 button,.seg button,.tabs button{min-height:44px;min-width:44px}
  .pname a{display:flex;align-items:center;min-height:44px}
  .nav .links a{display:inline-flex;align-items:center;min-height:44px;min-width:44px;justify-content:center}
  footer.foot nav a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
  .faq summary,details summary{padding-top:13px;padding-bottom:13px}
  .card>a.small,section>a.small{display:inline-flex;align-items:center;min-height:44px}
  .tabbar a{min-height:56px}
}

/* Keyboard open (class set by app.js while a text field has focus): the fixed tab bar would sit on top of the field */
body.kb .tabbar{display:none}

/* Icon-only navigation (narrow screens): centre the icons in their 44 pt boxes */
@media (pointer:coarse) and (max-width:900px){.side nav a{justify-content:center}}
