:root{--rb-edge-threshold:22px}
:is(.rb-layer-open,.rb-context-help-open) :is(#rb-global-language-access,.rb-account-button,.rb-productivity-launcher,.rb-pwa-install-chip,.class-chat-launcher){display:none!important}
html,body,#root{min-height:100vh;min-height:100dvh}
:is(.app-shell,.class-app,.class-admin-app){min-height:100vh;min-height:100dvh}
:is(.sidebar,.class-sidebar,.class-admin-sidebar){height:100vh;height:100dvh;max-height:100dvh}
body{padding-left:env(safe-area-inset-left,0);padding-right:env(safe-area-inset-right,0)}
:is(.hw-topbar,.participant-topbar,.rbp-public-topbar){padding-top:max(10px,env(safe-area-inset-top,0px))}
:is(.modal-header,.class-modal-header,.rb-sheet-head,.class-chat-page-head,.rb176-chat-conversation-head){padding-top:max(10px,env(safe-area-inset-top,0))}
:is(.modal-actions,.class-modal-actions,.rb-sheet-actions,.class-chat-composer,.rb176-chat-compose){padding-bottom:max(10px,env(safe-area-inset-bottom,0))}
:is(.modal-close,.class-modal-close,[data-modal-close],[data-action="close"],[data-chat-close]){min-width:44px;min-height:44px;margin-right:env(safe-area-inset-right,0);pointer-events:auto}
@supports(height:100dvh){:is(.modal-shell,.class-modal-shell,.class-chat-overlay,.rb176-research-chat-shell,.rb-auth-shell,.class-auth){min-height:100dvh;max-height:100dvh}}
html.rb-layout-tablet :is(.app-shell,.class-app,.class-admin-app){--rb-tablet-gutter:16px}
html.rb-layout-tablet :is(.sidebar,.class-sidebar,.class-admin-sidebar){max-width:min(310px,36vw);overflow-y:auto;-webkit-overflow-scrolling:touch}
html.rb-layout-tablet :is(.dashboard-grid,.class-layout){min-width:0}
html.rb-layout-tablet :is(.primary-column,.schedule-card,.calendar-scroll){min-width:0;max-width:100%}
html.rb-layout-tablet .calendar-scroll{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
html.rb-layout-tablet :is(table,.responsive-table){max-width:100%}
html.rb-layout-tablet .rb-account-button{z-index:2147483100!important;pointer-events:auto!important}
@media(pointer:coarse){button,a,[role="button"],input,select{min-height:44px}}
@media(max-width:700px){
  body{max-width:100%;overflow-x:hidden}
  :is(.workspace,.class-main,.class-admin-main,.content-panel){min-width:0;max-width:100%}
  :is(.modal-shell,.class-modal-shell,.rb15-enhance-modal,.rb157-calendar-shell){align-items:end;padding:0}
  :is(.modal-card,.class-modal,.rb15-enhance-dialog,.rb157-calendar-modal){width:100%;max-width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0));border-radius:16px 16px 0 0;overflow-y:auto;-webkit-overflow-scrolling:touch}
  :is(.sidebar,.class-admin-sidebar){height:calc(66px + env(safe-area-inset-bottom,0px));padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
  /* Teacher and Student keep a real left rail on phones.  The previous
     shared rule accidentally reduced it to the Researcher bottom-nav height,
     which hid half of the task menu. */
  html.rb-layout-mobile .class-sidebar:not(.class-admin-sidebar){height:100dvh!important;max-height:100dvh!important;min-height:0!important;padding-bottom:max(10px,env(safe-area-inset-bottom,0px))!important;overflow-y:auto!important;overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch!important}
  html.rb-layout-mobile .class-sidebar:not(.class-admin-sidebar) .class-nav{min-height:0!important;flex:1 1 auto!important;overflow-y:auto!important;overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch!important;padding-bottom:12px!important}
  /* On phones the persistent chat launcher is the single Messages entry.
     Desktop keeps its explicit Inbox navigation. */
  html.rb-layout-mobile .class-sidebar:not(.class-admin-sidebar) .class-nav>[data-nav="inbox"]{display:none!important}
}
@media(prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
