/* One dock, with the page continuing behind the iOS home indicator. */
html body.classora-dock-enabled.classora-authenticated #platformLobby .lobby-top-actions{display:none!important}
html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav{
 box-shadow:0 3px 14px #17282c24,inset 0 1px #ffffff52!important;
}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="embroidery"] #classoraMobilePageNav{
 background:rgba(255,250,244,.82)!important;border-color:#d8bfb2!important;
}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="morning"] #classoraMobilePageNav{
 background:rgba(248,253,251,.82)!important;border-color:#c7dfd8!important;
}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="embroidery"] #classoraMobilePageNav button{
 color:#67565c!important;
}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="morning"] #classoraMobilePageNav button{
 color:#496575!important;
}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="embroidery"] #classoraMobilePageNav button.is-active{
 color:#872d43!important;background:#f3e0dd!important;border-color:#d9b8ad!important;
}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="morning"] #classoraMobilePageNav button.is-active{
 color:#146f5a!important;background:#dff5eb!important;border-color:#b4ded0!important;
}
html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav button :is(span,svg){color:inherit!important;opacity:1!important}
html:has(body[data-classora-theme="embroidery"]),html body[data-classora-theme="embroidery"]{
 background-image:var(--cl-embroidered-pattern)!important;
}
@media(max-width:760px){
 html body.classora-dock-enabled{
  --classora-dock-height:64px;
  --classora-mobile-nav-height:64px;
  --classora-dock-clearance:calc(76px + env(safe-area-inset-bottom,0px));
 }
 html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav{
  position:fixed!important;
  inset:auto 0 max(6px,calc(env(safe-area-inset-bottom,0px) - 18px)) 0!important;
  inset-block:auto max(6px,calc(env(safe-area-inset-bottom,0px) - 18px))!important;
  inset-inline:0!important;
  transform:none!important;translate:none!important;
  margin:0 auto!important;width:min(480px,calc(100% - 12px))!important;
  max-width:calc(100% - 12px)!important;
  height:64px!important;min-height:64px!important;max-height:64px!important;
  padding:5px!important;box-sizing:border-box!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  grid-template-rows:52px!important;gap:2px!important;
  border-radius:20px!important;
 }
 html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav button,
 html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav #classoraMobileLobbyBtn{
  min-width:0!important;min-height:52px!important;max-height:52px!important;
  padding:4px 2px!important;gap:3px!important;font-size:11px!important;line-height:1.2!important;
 }
 html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav svg{width:22px!important;height:22px!important}
 html body.classora-dock-enabled #platformLobby.platform-lobby:not(.hidden){
  inset:0!important;height:100%!important;min-height:100%!important;max-height:none!important;
  box-sizing:border-box!important;overflow-y:auto!important;
  padding-bottom:var(--classora-dock-clearance)!important;
  scroll-padding-bottom:var(--classora-dock-clearance)!important;
 }
 html body.classora-dock-enabled #platformLobby :is(.hub-card,.hub-topic-card,.classora-welcome,.cp-slide){min-width:0;overflow-wrap:anywhere}
 html body.classora-dock-enabled #platformLobby .lobby-ai-input input{min-width:0!important;font-size:16px!important}
 html body.classora-dock-enabled #platformLobby .cp-dots button{min-height:12px!important;height:12px!important;width:12px!important;padding:0!important;border-radius:50%!important}
 html body.classora-dock-enabled.classora-mobile-typing #classoraMobilePageNav{display:none!important}
}

/* V209: standalone iOS must not create a second, empty document scroll area.
   The lobby owns scrolling; the document fills the installed-app viewport. */
@media(max-width:760px) and (display-mode:standalone){
 html:has(body.classora-authenticated){
  height:100%!important;min-height:0!important;overflow:hidden!important;
 }
 html body.classora-authenticated{
  position:fixed!important;inset:0!important;
  height:100%!important;min-height:0!important;max-height:100%!important;
  padding-bottom:0!important;overflow:hidden!important;
 }
 html body.classora-dock-enabled.classora-authenticated #platformLobby.platform-lobby:not(.hidden){
  position:fixed!important;inset:0!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;-webkit-overflow-scrolling:touch;
 }
}

/* V210: explicitly size the app, avoiding percentage-height resolution on iOS. */
@media(max-width:760px){
 html:has(body.classora-authenticated){height:var(--classora-viewport-height,100dvh)!important;min-height:0!important;overflow:hidden!important}
 html body.classora-authenticated{height:var(--classora-viewport-height,100dvh)!important;min-height:0!important;overflow:hidden!important;overscroll-behavior:none!important}
 html body.classora-dock-enabled.classora-authenticated #platformLobby.platform-lobby:not(.hidden){
  height:var(--classora-viewport-height,100dvh)!important;min-height:0!important;max-height:none!important;
 }
 html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav{
  inset-block:auto 6px!important;bottom:6px!important;
 }
}
/* The old Lobby rule has TWO IDs, so ordinary button theme rules cannot win. */
html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav #classoraMobileLobbyBtn,
html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav #classoraMobileLobbyBtn :is(span,svg){color:var(--classora-dock-label,#b9d2df)!important}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="embroidery"] #classoraMobilePageNav{--classora-dock-label:#67565c}
html body.classora-dock-enabled.classora-authenticated[data-classora-theme="morning"] #classoraMobilePageNav{--classora-dock-label:#496575}

/* V211: installed iPhones use the full screen (including the translucent
   status-bar inset), not the smaller innerHeight measurement. Extend the
   existing themed lobby to the bottom; dock stops just above the home bar. */
@media (max-width:760px) {
 html:has(body.classora-authenticated),
 html body.classora-authenticated,
 html body.classora-dock-enabled.classora-authenticated #platformLobby.platform-lobby:not(.hidden) {
  height:var(--classora-viewport-height,100dvh)!important;
 }
 html body.classora-dock-enabled.classora-authenticated #classoraMobilePageNav {
  bottom:calc(max(14px,calc(env(safe-area-inset-bottom,0px) - 10px)) - var(--classora-viewport-extra,0px))!important;
  inset-block-end:calc(max(14px,calc(env(safe-area-inset-bottom,0px) - 10px)) - var(--classora-viewport-extra,0px))!important;
 }
}
