/* v1.39 local surface repairs. Existing assets, selected states and game feedback stay authoritative. */

/* Reserve Andika's descenders inside each tile while moving picture and word up together. */
#screen-album .album-cell{padding:.6cqw 1.15cqw 1.2cqw;}
#screen-album .album-name{flex:none;height:auto;min-height:1.35em;line-height:1.35;overflow:visible;}
#screen-album .sb-theme-sticker{padding:1.2cqw 1cqw 2.3cqw;}
#screen-album .sb-sticker-name{line-height:1.35;padding-bottom:.15em;}

/* Restore the original brush, hidden by the shared header reset. The name remains editable DOM text. */
body #screen-my-buddy #buddy-name::after{display:block;content:"";}
#screen-my-buddy>.navigation-bar{bottom:max(12px,env(safe-area-inset-bottom));}
/* On short viewports fit the existing stage above the shared navigation instead of covering its last control. */
@media(max-height:620px){
 #screen-my-buddy .buddy-stage{height:min(calc(100% - 88px),var(--buddy-stage-height,177.68vw));margin-bottom:88px;}
 #screen-my-buddy>.navigation-bar{bottom:max(8px,env(safe-area-inset-bottom));}
}

/* Shared break content uses the same centering on every timed page. */
#daily-time-dialog,#daily-time-dialog h2,#daily-time-dialog p{text-align:center;}
#daily-time-dialog .settings-footer-actions{justify-content:center;align-items:center;}
#daily-time-dialog .settings-action{display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:6px;}
#daily-time-dialog .settings-action>svg,#daily-time-dialog .settings-action>img{flex:none;}
/* These modal buttons previously received an external double ring. Keep a visible keyboard
   focus cue inside the existing surface; do not remove selected/answer/tab borders. */
body #daily-time-dialog .settings-action:focus-visible,
body #theme-unlock-preview-dialog .theme-dialog-actions>button:focus-visible{
 outline:2px dashed transparent!important;outline-offset:-6px!important;
}

#screen-theme-editor .learning-world-tools .scene-lock-button{position:relative;inset:auto;flex:0 0 44px;margin:0;}
/* Horizontal browsing stays local. Page-level swipe must ignore these existing scrolling surfaces. */
/* Keep all three theme medallions visible as a centered row. */
html body #screen-themes #learning-theme-tabs {
  box-sizing:border-box;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  width:100%;
  max-width:650px;
  gap:clamp(8px,3vw,42px);
  margin-inline:auto;
  padding:4px 3px 8px;
  overflow:visible;
}
html[data-ui-platform="ipad"][data-ipad-orientation="landscape"] body #screen-themes #learning-theme-tabs {
  max-width:680px;
}
html body #screen-themes #learning-theme-tabs .learning-theme-tab img {
  max-width:100%;
  height:auto;
  aspect-ratio:1;
}
#screen-album .sb-theme-sticker-row{display:flex;gap:2cqw;overflow-x:auto;overflow-y:hidden;align-items:flex-start;padding-bottom:1cqw;touch-action:pan-x;overscroll-behavior-x:contain;scroll-snap-type:x proximity;}
#screen-album .sb-theme-sticker-row>.sb-theme-sticker{flex:0 0 calc((100% - 4cqw)/3 + 2cqw);scroll-snap-align:start;touch-action:pan-x;}
#screen-album .sb-theme-catalog{grid-template-columns:minmax(0,1fr);}
#screen-album .sb-theme-book-group{min-width:0;max-width:100%;}
#screen-album .sb-theme-sticker-row{box-sizing:border-box;width:100%;max-width:100%;}
#learning-world-tray{overscroll-behavior-x:contain;}
#learning-world-tray .worlds-tray-sticker{touch-action:pan-x;}
