/* Compact Win95 layout: readable files, direct taps, and a two-row taskbar. */
@media (max-width:680px), (max-width:1000px) and (max-height:500px) {
  :root { --desktop-scale:1; --mobile-top:calc(110px + env(safe-area-inset-top)); --taskbar-height:calc(98px + env(safe-area-inset-bottom)); }
  html { -webkit-text-size-adjust:100%; }
  button,a,input,select { touch-action:manipulation; }
  #desktop.icons-ready .desktop-icon { height:94px; gap:6px; }
  #desktop.icons-ready .desktop-icon[data-open="player"],
  #desktop.icons-ready .desktop-icon[data-open="files"] { display:none; }
  .desktop-icon span { font-size:12px!important; }
  .titlebar { height:42px; min-height:42px; font-size:13px; }
  .window-controls button[data-win] { width:36px; min-width:36px; height:36px; }
  .window-controls [data-win=minimize]::after { left:10px; bottom:9px; }
  .window-controls [data-win=maximize]::after { left:9px; top:9px; }
  .window-controls [data-win=close]::after { inset:8px; }
  .hub-window .menubar,.video-player-window .menubar,.system-window .menubar { height:40px; min-height:40px; }
  .menubar button,.hub-window .menubar button,.video-player-window .menubar button { min-height:40px; padding:7px 12px; font-size:13px; }
  .explorer-toolbar { padding:4px; font-size:12px; }
  .explorer-toolbar .bevel { min-height:40px; }
  .explorer-toolbar label { max-width:100%; }
  .explorer-toolbar select { min-height:40px; max-width:145px; }
  .explorer-item { font-size:13px; min-height:44px; }
  .explorer-pane.thumbnail-view { grid-auto-rows:max-content; }
  .thumbnail-view:not(.details-view) .file-thumbnail { height:clamp(72px,23vw,100px); aspect-ratio:auto; }
  .shop-hub .thumbnail-view:not(.details-view) .file-thumbnail { height:clamp(110px,32vw,160px); }
  .explorer-pane.icon-view { grid-template-columns:repeat(auto-fill,minmax(86px,1fr)); }
  .icon-view .file-thumbnail { width:36px; height:36px; }
  .explorer-pane { -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
  .details-view .explorer-item { min-height:48px; }
  .explorer-status { font-size:11px; }
  #taskbar { display:grid; grid-template-columns:68px minmax(132px,1fr) auto; grid-template-rows:42px 44px; gap:4px; padding:3px 3px calc(3px + env(safe-area-inset-bottom)); }
  #task-buttons { grid-row:1; grid-column:1/-1; width:100%; min-width:0; height:42px; }
  .task-button { flex:0 0 auto; width:auto; min-width:100px; max-width:190px; height:42px; justify-content:flex-start; gap:6px; font-size:12px; }
  .task-button span { display:block; }
  #start-button { grid-row:2; grid-column:1; height:44px; }
  .taskbar-music { grid-row:2; grid-column:2; justify-content:center; border-left:0; padding:0; gap:2px; }
  .taskbar-music .bevel { width:44px; min-width:44px; height:44px; min-height:44px; }
  .taskbar-music svg { width:17px; height:17px; }
  .tray { grid-row:2; grid-column:3; height:44px; padding:0 3px; gap:4px; }
  #tray-sound { width:44px; min-width:44px; height:40px; }
  #music-volume-popup { width:300px; max-width:calc(100% - 10px); font-size:13px; }
  .sound-volume-row input[type=range],.video-controls input[type=range] { height:44px; }
  .sound-option { min-height:44px; font-size:13px; }
  .sound-option input[type=checkbox] { width:22px; height:22px; }
  .music-popup-actions .bevel { min-height:44px; font-size:12px; }
  #start-menu { width:250px; }
  #start-menu button { height:44px; min-height:44px; font-size:13px; }
  #start-menu .submenu-back { height:44px; min-height:44px; }
  .play-controls>.bevel,.video-transport .bevel { min-width:44px; height:44px; min-height:44px; }
  .play-controls .volume-label { width:100%; justify-content:flex-end; }
  .play-controls .volume-label input { flex:1; max-width:170px; height:44px; }
  .video-volume-label { min-height:44px; }
  .property-sheet select { font-size:16px; }
  .property-actions .bevel,.tour-toolbar .bevel { min-height:44px; }
  #boot-power { min-height:44px; }
}
@media(max-width:360px) { .tray #clock { display:none; } }
/* Landscape keeps its scarce vertical space for the active app. */
@media(max-width:1000px) and (max-height:500px) {
  :root { --mobile-top:6px; --taskbar-height:calc(48px + env(safe-area-inset-bottom)); }
  #taskbar { display:flex; gap:4px; }
  #task-buttons { flex:1; width:auto; height:40px; }
  .task-button { height:40px; min-width:44px; max-width:150px; flex:0 1 150px; }
  #start-button,.tray { height:40px; }
  .taskbar-music .bevel { height:40px; min-height:40px; width:40px; min-width:40px; }
  .video-player-window .menubar { display:none; }
  .video-player-window .aux-content { display:grid; grid-template-columns:minmax(200px,1fr) 180px; grid-template-rows:minmax(200px,1fr) auto; }
  .video-screen { grid-column:1; grid-row:1; margin:0; }
  .video-controls { grid-column:2; grid-row:1; padding:4px; }
  .video-timeline { flex-direction:column; gap:0; }
  .video-seek { width:100%; flex:none; }
  .video-transport { justify-content:center; }
  .video-external { margin-left:0!important; }
  .video-volume-label { flex:1; justify-content:center; }
  .video-player-window .explorer-status { grid-column:1/-1; grid-row:2; }
  .boot-content { grid-template-columns:minmax(100px,160px) minmax(0,1fr); gap:4px 12px; }
  .boot-art { width:100%; max-width:160px; }
  .boot-title { font-size:clamp(27px,5vw,36px); }
}
