/* The slice shell serializes the default avatar's home wallpaper inline.
   Frozen index.html leaves this to Game.applyAvatarTheme(), which clears that
   inline dot pattern and paints its scene (base colour #f0c78a). Match that
   pre-boot canvas only; once the original theme runtime updates body.style,
   this narrow selector stops matching and the selected theme owns the page. */
body.qb-calm[style*="radial-gradient(circle at 3px 3px, #dcae74"] {
  background-image: none !important;
  background-size: auto !important;
  background-attachment: scroll !important;
  background-position: 0 0 !important;
  background-color: #f0c78a !important;
}
/* Diary owns its original full-page surface; the shared lesson host must not
   add a second title, ruled-paper frame or lesson controls around it. */
#screen-lesson:has(:is(#screen-todo,#screen-writing).active) {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
#screen-lesson:has(:is(#screen-todo,#screen-writing).active) .lesson-head,
#screen-lesson:has(:is(#screen-todo,#screen-writing).active) #lesson-codes,
#screen-lesson:has(:is(#screen-todo,#screen-writing).active) #lesson-controls { display: none !important; }
#screen-lesson:has(:is(#screen-todo,#screen-writing).active) > .lesson-shell {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* Worksheets has its own destination hero and full-page library inside the
   shared lesson mount. Remove only the wrapper presentation from that route. */
#screen-lesson:has(#worksheets-root) {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
#screen-lesson:has(#worksheets-root) .lesson-head,
#screen-lesson:has(#worksheets-root) #lesson-codes,
#screen-lesson:has(#worksheets-root) #lesson-controls { display: none !important; }
#screen-lesson:has(#worksheets-root) > .lesson-shell {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* Preserve the source's sticky Voice/Read rail while keeping focused/scrolled
   menu targets out from underneath those two 68px controls and their gaps. */
@media (max-width:700px) {
  body.qb-calm:not(:has(:is(#screen-teacher,#screen-recordkeeping).active)) #wl-tabbar {
    scroll-padding-inline-end: 148px;
  }
}
