/* Mobile fit without disabling pinch zoom. Scoped rules preserve desktop controls. */
#g550MobileNav,#g550CalendarMode{display:none}.g550SrOnly{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.calendarMonth .g533CalDate{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.calendarMonth .g533CalDayTotal{margin-left:auto;text-align:right;font-weight:500}
.g550Legend{border:1px solid #e2e8f0;border-radius:10px;background:white;padding:11px 14px;margin:10px 0 18px;font-size:13px}.g550Legend summary{cursor:pointer;font-weight:650;display:flex;gap:14px;justify-content:space-between}.g550Legend summary span{font-weight:400;color:#727b86}.g550Legend dl{display:grid;grid-template-columns:135px 1fr;gap:10px;margin:16px 0}.g550Legend dt{font-weight:700}.g550Legend dd{margin:0;line-height:1.5}
#tasks .g550CompactTask{display:grid!important;grid-template-columns:20px minmax(0,1fr) auto!important;align-items:center;gap:10px!important;min-height:0!important;padding:9px 10px!important;margin:0!important;border:0!important;border-bottom:1px solid #e2e8f0!important;border-radius:0!important;background:white}#tasks .g550CompactTask>div{min-width:0}#tasks .g550CompactTask .taskMeta{margin-top:3px;font-size:11px;line-height:1.3;color:#727b86}#tasks .g550CompactTask .taskTitle{font-size:13px;margin:0}#tasks .g550TaskTitle{border:0;background:none;color:#30343b;text-align:left;padding:0;font:inherit;font-weight:650;line-height:1.3;cursor:pointer}#tasks .g550CompactTask .btn{min-height:34px;padding:6px 10px}#tasks .g550CompactTask .taskCheck{margin:0}#tasks .g528TaskGroup>summary{min-height:46px;padding:9px 10px}#tasks .g528TaskGroup>summary small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}#tasks .g528TaskGroup[open]>summary small{display:block}#tasks .taskDayBody{padding:8px 12px}
.g550TaskDetail{box-sizing:border-box;max-width:650px;width:calc(100vw - 32px);max-height:88dvh;overflow:auto;border:1px solid #cbd5e1;background:white;color:#30343b;border-radius:13px;padding:22px;font:inherit}.g550TaskDetail::backdrop{background:#17203388}.g550TaskDetail header{display:flex;justify-content:space-between;gap:14px;align-items:start}.g550TaskDetail h2{font-size:21px;line-height:1.35;margin:0 0 15px}.g550TaskDetail p{line-height:1.55;white-space:pre-wrap}.g550TaskDetail .checkrow{margin:18px 0;display:flex;gap:10px;align-items:start}
.g550AgendaToolbar{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:0 0 14px}.g550AgendaToolbar label{display:grid;gap:5px;font-size:12px}.g550AgendaDay{border:1px solid #dce4ef;border-radius:10px;margin:12px 0;background:white;padding:12px}.g550AgendaDay>header{display:flex;justify-content:space-between;gap:12px;margin:0 0 9px;font-size:14px}.g550AgendaDay>header>span{color:#62718b;font-size:12px;white-space:nowrap}.g550AgendaEvent{display:grid;gap:5px;text-align:left;width:100%;border:0;border-top:1px solid #e2e8f0;background:white;color:#30343b;padding:14px 2px;font:inherit;font-size:13px;cursor:pointer}.g550AgendaEvent small{font-size:10px;color:#727b86;font-weight:400}.g550AgendaEvent em{font-style:normal;color:#3e6ed8;font-size:12px;margin-top:3px}
@media(max-width:760px){
 html{width:100%;min-width:0;-webkit-text-size-adjust:100%}body{width:100%;min-width:0;margin:0}body.mobileNavOpen{touch-action:auto!important}.sidebar{touch-action:pan-y pinch-zoom}.app,.app.sidebarCollapsed{display:block!important;grid-template-columns:1fr!important;width:100%!important;min-width:0!important}.main,main,.content{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box}.content{padding:12px 10px calc(env(safe-area-inset-bottom,0px) + 78px)!important}.screen{min-width:0;width:100%;box-sizing:border-box}.card,.cardbody,.hero,.topActions,.topbar>div{min-width:0;max-width:100%;box-sizing:border-box}.topbar{display:flex;flex-wrap:wrap!important}.topActions{flex:1 1 100%;justify-content:flex-start!important}#cloudWorkspaceSelector{width:100%!important;max-width:none!important;font-size:16px!important}#cloudSession{flex-wrap:wrap;gap:5px;max-width:100%}.hero{flex-wrap:wrap;gap:12px}.hero h1{font-size:27px}.hero .inlineActions{display:flex;flex-wrap:wrap;width:100%;gap:7px}.inlineActions>*{max-width:100%}.grid2,.grid3,.twoCols,.settingsGrid,.dashboardGrid,.g545SettingsGrid{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}.control,input:not([type=checkbox]):not([type=radio]),select,textarea,[contenteditable=true]{font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}.field{min-width:0;max-width:100%}input[type=date]{min-width:0!important;max-width:100%}.tableWrap,.table-wrap,.localTableWrap,.calendarScroll,.g538TableScroll,.g540TableScroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}.drawer,.modal,.modalcard,.g551-dialog,dialog{max-width:100vw!important;box-sizing:border-box}.modal .modalcard{width:calc(100vw - 16px)!important}.drawer{width:100%!important;max-width:100%!important}.drawerbody,.modalbody{min-width:0;max-width:100%;overflow-x:auto}.testModeBar{font-size:11px;word-break:normal;overflow-wrap:anywhere}.testModeBar>*{min-width:0}.testModeBar>span:last-child{display:none}
 #g550MobileNav{position:fixed;display:flex;justify-content:space-around;gap:8px;z-index:1150;bottom:0;left:0;right:0;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));background:rgba(255,255,255,.98);border-top:1px solid #dce4ef;box-shadow:0 -3px 15px #30343b0a}#g550MobileNav button{border:1px solid #d4deec;border-radius:9px;background:#f7f9fc;color:#30343b;font:inherit;font-size:14px;min-height:42px;min-width:80px;padding:8px 13px}#g550CalendarMode{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0}#g550CalendarMode>span{font-size:12px;color:#727b86}#g550CalendarMode [aria-pressed=true]{background:#eaf0ff;color:#3e6ed8;border-color:#4f7fea}#calendar.g550AgendaMode>.calendarToolbar{display:none!important}#calendar.g550AgendaMode .calendarScroll{overflow:visible;max-width:100%}#calendar.g550AgendaMode .calLegend{display:none!important}#calendar:not(.g550AgendaMode) .calendarMonth{min-width:680px}#calendar.g550AgendaMode .cardbody{padding:10px}.calendarToolbar .toolbar,.taskPageToolbar{flex-wrap:wrap;gap:8px}.g550Legend dl{grid-template-columns:1fr;gap:4px}.g550Legend dd{margin-bottom:9px}.g550Legend summary span{display:none}#tasks .g550CompactTask{grid-template-columns:20px minmax(0,1fr)!important}#tasks .g550CompactTask>.btn{grid-column:2;justify-self:start;min-height:40px}#tasks .g550TaskTitle{font-size:14px}#tasks .g528TaskGroup>summary{padding:10px 7px}#tasks .g528TaskGroup>summary b{font-size:14px}.g550TaskDetail .inlineActions{flex-wrap:wrap}#g548SwitchButton{display:block!important;width:100%;min-height:44px}.sidebar #cloudSidebarAccount{display:block!important;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.sidebar,.mobileMenuBackdrop{transition:none!important}}

/* Phone viewport: keep dialogs scrollable above the fixed bottom navigation. */
@media(max-width:760px){
  dialog[open],.g551-modal .g551-dialog{
    box-sizing:border-box;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));
  }
  dialog[open]{
    max-width:calc(100vw - 20px);
  }
  .g551-modal{
    overflow-y:auto;
    align-items:flex-start;
    padding-top:max(12px,env(safe-area-inset-top,0px));
    padding-bottom:max(12px,env(safe-area-inset-bottom,0px));
  }
}

@media(max-width:760px){
  .modalBackdrop{
    overflow-y:auto;
    align-items:flex-start;
    padding-top:max(12px,env(safe-area-inset-top,0px));
    padding-bottom:max(12px,env(safe-area-inset-bottom,0px));
  }
  .modalBackdrop .modal{
    box-sizing:border-box;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    margin-top:auto;
    margin-bottom:auto;
  }
}
