/* FinnVibe Fix58: mobile viewport and safe-area corrections */
html{min-height:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-height:100%;min-height:100dvh;max-width:100%;overflow-x:hidden;padding-top:env(safe-area-inset-top,0px);padding-right:env(safe-area-inset-right,0px);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px)}
img,svg,video,canvas{max-width:100%}
input,select,textarea,button{max-width:100%}
@media(max-width:768px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body{min-height:100svh;min-height:100dvh}
  main,.wrap,.container,.content{max-width:100%}
  input,select,textarea{font-size:16px!important}
  textarea{min-height:132px}
  .panel,.card,.box{max-width:100%;overflow-wrap:anywhere}
  .wrap{padding-top:calc(16px + env(safe-area-inset-top,0px))!important;padding-bottom:calc(80px + env(safe-area-inset-bottom,0px))!important}
  .top,.topbar,.site-header,.header{scroll-margin-top:calc(12px + env(safe-area-inset-top,0px))}
  .actions,.dialog-actions,.fv-pwa-dialog-actions{padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
}

/* Fix93: user/account page headings and explanatory text centered on mobile only. */
@media(max-width:768px){
  body.fv-user-page .topbar,
  body.fv-user-page header.top,
  body.fv-user-page .toolbar,
  body.fv-user-page .page-header,
  body.fv-user-page .page-heading,
  body.fv-user-page .section-heading{
    text-align:center!important;
  }
  body.fv-user-page .topbar,
  body.fv-user-page header.top,
  body.fv-user-page .toolbar{
    align-items:center!important;
    justify-content:center!important;
  }
  body.fv-user-page .topbar>div:first-child,
  body.fv-user-page header.top>div:first-child,
  body.fv-user-page .toolbar>div:first-child{
    width:100%;
    text-align:center!important;
  }
  body.fv-user-page .topbar h1,
  body.fv-user-page .topbar p,
  body.fv-user-page header.top h1,
  body.fv-user-page header.top .meta,
  body.fv-user-page .toolbar strong,
  body.fv-user-page .toolbar small,
  body.fv-user-page .page-header h1,
  body.fv-user-page .page-header p,
  body.fv-user-page .page-heading h1,
  body.fv-user-page .page-heading h2,
  body.fv-user-page .page-heading p,
  body.fv-user-page .section-heading h1,
  body.fv-user-page .section-heading h2,
  body.fv-user-page .section-heading p,
  body.fv-user-page .auth-card h1,
  body.fv-user-page .auth-card>.lead,
  body.fv-user-page main.wrap>.panel:first-of-type>h1,
  body.fv-user-page main.wrap>.panel:first-of-type>.lead,
  body.fv-user-page main.wrap>.panel:first-of-type>.intro,
  body.fv-user-page .empty{
    text-align:center!important;
    margin-left:auto;
    margin-right:auto;
  }
  body.fv-user-page form,
  body.fv-user-page form label,
  body.fv-user-page form .hint,
  body.fv-user-page form .meta,
  body.fv-user-page input,
  body.fv-user-page select,
  body.fv-user-page textarea,
  body.fv-user-page table,
  body.fv-user-page .hours-row,
  body.fv-user-page .details-grid{
    text-align:left!important;
  }
}
