/* TraumAstur V5.0.6 — iPhone scroll/layout corrections and task inbox */
html { width:100%; max-width:100%; overflow-x:clip; overscroll-behavior-x:none; }
body { width:100%; max-width:100%; overflow-x:clip; overscroll-behavior-x:none; }
#app, .page, .layout, .intro, .stats, .toolbar, .viewbar,
#mainLayout, #tasks, #calendar, .team-widget, .team-list,
.task, .taskbody, .taskfoot, .taskhead, .modalback, .modal {
 min-width:0; max-width:100%; box-sizing:border-box;
}
#mainLayout > div, .taskhead h3, .taskhead > *, .modalheader > * {min-width:0;}
#app, .page { width:100%; }
.modalback {overflow-x:hidden; overscroll-behavior-x:none;}
.modalback > .modal {width:min(100%,1000px); max-height:min(95dvh,95vh); overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
.modal .formgrid, .modal .prefs-list, .modal .admin-flags {grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0;}
.modal .formgrid > *, .modal .field, .modal input, .modal textarea, .modal select {min-width:0; max-width:100%;}
.modal .modalheader {flex-wrap:wrap;}
.modal .modalheader h2, .notice, .inbox-notices p {overflow-wrap:anywhere;}
/* Only scroll the table itself horizontally, never the whole page or modal. */
.modal .tablewrap {display:block; width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain;}
.modal .data-table {width:max-content; min-width:100%;}
#taskViewAnchor {scroll-margin-top:14px;}
.inbox-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 9px;}
.inbox-tools button{min-height:40px;flex:1 1 180px;white-space:normal;text-align:center;font-size:13px;font-weight:700;}
.inbox-tools .inbox-clear{color:#922d43;border-color:#e6bfc9;background:#fff9fa;}
.inbox-tools button:disabled{opacity:.45;cursor:not-allowed;}
.inbox-note{font-size:12px;line-height:1.45;color:#786681;margin:0 0 14px;}
.inbox-notices{display:grid;gap:9px;min-width:0;}
.inbox-notices .notice {min-width:0;max-width:100%;margin:0;}
.inbox-notices .notice button{max-width:100%;white-space:normal;}
@media(max-width:790px){
 .page {padding-inline:12px;}
 .modalback{padding:8px;}
 .modalback > .modal {width:100%;max-height:calc(100dvh - 16px);padding:15px;border-radius:14px;}
 .modal .formgrid,.modal .prefs-list,.modal .admin-flags{grid-template-columns:minmax(0,1fr);}
 .modal .field.full{grid-column:auto;}
 .team-widget .team-list,.team-widget .team-user{min-width:0;}
 .team-widget .team-user-main,.team-widget .team-user-names{min-width:0;}
 .taskhead,.taskline,.taskfoot,.viewbar{min-width:0;}
 .taskhead h3,.taskline span{overflow-wrap:anywhere;}
 .inbox-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
 .inbox-tools button{min-width:0;width:100%;min-height:44px;padding:9px 7px;font-size:12px;}
}
@media(max-width:350px){.inbox-tools{grid-template-columns:1fr}}
