/* A pocket desktop: the same windows, icons and souvenirs share one stage. */
@media(max-width:620px){
 html[data-theme] #world #home .portal-collage{padding:0;overflow:visible}
 html[data-theme] #world #home .portal-collage #web-desktop.mobile-desktop{
  display:block;position:relative;width:100%;height:max(600px,100svh);min-height:0;padding:0!important;margin:0;
  overflow:hidden;box-sizing:border-box;--mobile-icons-top:146px;--mobile-window-height:360px;
 }
 html[data-theme] #world #home .mobile-desktop .portal-brand{top:12px;left:8px;right:8px;width:auto;padding:0;z-index:40;pointer-events:none}
 html[data-theme] #world #home .mobile-desktop .portal-brand :is(button,#home-uturns){pointer-events:auto}
 html[data-theme] #world #home .mobile-desktop .portal-brand h1{font-size:clamp(25px,7vw,36px);line-height:1.1}
 html[data-theme] #world #home .mobile-desktop .portal-brand>span:first-child{font-size:10px;letter-spacing:2px}
 html[data-theme] #world #home .mobile-desktop #home-uturns{margin-top:8px}
 html[data-theme] #world #home .mobile-desktop #home-uturns .uturn-odometer{padding:5px 7px;gap:7px}
 html[data-theme] #world #home .mobile-desktop #home-uturns .uturn-stat{min-width:35px}
 html[data-theme] #world #home .mobile-desktop .desktop-icons{
  position:absolute;left:5px;right:5px;top:var(--mobile-icons-top)!important;bottom:auto;width:auto;height:var(--mobile-icons-height,224px);
  display:grid;grid-template-columns:repeat(var(--mobile-icon-columns,5),minmax(0,1fr));grid-auto-rows:68px;
  align-items:start;align-content:start;justify-items:center;gap:8px 6px;padding:0 3px 4px;z-index:80;
  overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d4cbd8 #27212e50;
  overscroll-behavior-y:contain;touch-action:pan-y;box-sizing:border-box;
 }
 html[data-theme] #world #home .mobile-desktop .desktop-icons>button{display:flex;width:100%;max-width:82px;height:68px;min-height:68px;gap:4px;justify-content:flex-start;translate:none}
 html[data-theme] #world #home .mobile-desktop .desktop-icons>button>:is(img,svg,span){width:34px;height:34px;min-height:34px;object-fit:contain;flex:none}
 html[data-theme] #world #home .mobile-desktop .desktop-icons>button>b{font:10px/12px var(--desktop-label-font);max-width:100%;padding:1px 3px;min-height:24px;box-sizing:border-box;text-wrap:balance}
 html[data-theme] #world #home .mobile-desktop .desktop-window{
  position:absolute;left:0;top:0;right:auto;bottom:auto;width:min(292px,calc(100% - 30px));max-width:calc(100% - 12px);
  max-height:var(--mobile-window-height);height:auto;min-height:0;margin:0;box-sizing:border-box;
  transform:translate(var(--wx,6px),var(--wy,232px))!important;rotate:0deg;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-y;
 }
 html[data-theme] #world #home .mobile-desktop #desk-entry{width:min(332px,calc(100% - 26px))}
 html[data-theme] #world #home .mobile-desktop #desk-view{width:min(232px,calc(100% - 58px))}
 html[data-theme] #world #home .mobile-desktop #desk-stickers{width:min(320px,calc(100% - 20px))}
 html[data-theme] #world #home .mobile-desktop .desktop-titlebar{position:sticky;top:0;z-index:5;min-height:38px;height:38px;box-sizing:border-box}
 html[data-theme] #world #home .mobile-desktop .window-grab{touch-action:none;cursor:grab;padding-inline:70px 12px;font-size:12px;min-height:36px}
 html[data-theme] #world #home .mobile-desktop .desktop-titlebar>div{left:5px;gap:3px;height:30px}
 html[data-theme] #world #home .mobile-desktop .desktop-titlebar>div>button{width:28px;height:28px;min-height:28px;font-size:16px!important}
 html[data-theme] #world #home .mobile-desktop #desk-entry .visual-entry{min-height:0;grid-template-columns:88px minmax(0,1fr);gap:6px;padding:8px 6px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .memory-mode-switch{grid-column:1/-1;justify-self:center;margin:0 0 5px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .shuffle-art{width:65px;height:65px;flex-basis:65px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .shuffle-art svg{width:65px;height:65px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .shuffle-object{gap:9px;padding:0 3px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .area-terminal{padding:3px 5px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .area-terminal>label{padding:0 0 6px;gap:4px}
 html[data-theme] #world #home .mobile-desktop .visual-entry .area-terminal>label svg{width:27px;height:25px}
 html[data-theme] #world #home .mobile-desktop #quick-area-results{max-height:100px}
 html[data-theme] #world #home .mobile-desktop .desktop-menu{gap:5px;padding:6px}
 html[data-theme] #world #home .mobile-desktop .desktop-menu button{min-width:0;min-height:32px;flex:1;padding:3px;font-size:10px}
 html[data-theme] #world #home .mobile-desktop .desk-recordings{padding:7px;gap:7px}
 html[data-theme] #world #home .mobile-desktop .desk-recordings img{height:90px}
 html[data-theme] #world #home .mobile-desktop .desktop-sky img{height:130px}
 html[data-theme] #world #home .mobile-desktop .desktop-contact-strip{padding:5px;gap:4px}
 html[data-theme] #world #home .mobile-desktop .desktop-contact-strip button{height:33px}
 html[data-theme] #world #home .mobile-desktop #desk-stickers .sticker-play{max-height:none}
 html[data-theme] #world #home .mobile-desktop .desktop-taskbar{
  position:absolute;left:6px;right:6px;bottom:calc(6px + env(safe-area-inset-bottom,0px));top:auto;
  width:auto;max-width:none;height:56px;min-height:56px;translate:none;transform:none;display:flex;gap:3px;padding:3px;box-sizing:border-box;z-index:120;
 }
 html[data-theme] #world #home .mobile-desktop .desktop-tasks{display:flex;flex:1;min-width:0;max-width:none;flex-wrap:nowrap;justify-content:flex-start;gap:2px;overflow-x:auto;overflow-y:hidden;height:48px;scrollbar-width:none;touch-action:pan-x}
 html[data-theme] #world #home .mobile-desktop .desktop-taskbar button{flex:0 0 40px;width:40px;min-width:40px;height:44px;padding:3px;margin:0;box-sizing:border-box}
 html[data-theme] #world #home .mobile-desktop .desktop-taskbar :is(svg,img){width:32px;height:32px;object-fit:contain}
 html[data-theme] #world #home .mobile-desktop .desktop-taskbar .folder-art{width:30px;height:24px;margin-top:8px}
 html[data-theme] #world #home .mobile-desktop .desktop-taskbar :is(.dock-label,.dock-group-start:before){display:none}
 html[data-theme] #world #home .mobile-desktop .desktop-taskbar .desk-reset{flex-basis:30px;width:30px;min-width:30px;font-size:22px!important}
 html[data-theme] #world #home .mobile-desktop #desktop-personalise-open{flex-basis:34px;width:34px;min-width:34px;padding:2px}
 html[data-theme] #world #home .mobile-desktop>.hyd-cat-slot-home{left:auto;right:7px;bottom:83px;width:82px;height:82px;z-index:3}
 html[data-theme] #world #home .mobile-desktop .wallpaper-switch{top:4px;right:3px;width:25px;height:25px;z-index:45}
 html[data-theme] #world #home .mobile-desktop .desktop-sticker.illustrated-sticker:has(img[src*="hyd-"]){width:76px;height:76px}
}
@media(max-width:620px){
 /* Only the dock stays horizontal; desktop shortcuts form a compact grid. */
 html[data-theme] #world #home .mobile-desktop .desktop-icons:after{content:none}
 html[data-theme] #world #home .mobile-desktop .desktop-tasks{scrollbar-width:thin;scrollbar-color:#777b88 #d6d5da}
}
