/* Narrow screens keep the desktop artwork, but windows open only on request. */
@media (max-width: 600px) {
  html { overflow-x: clip; }
  body { margin:0; padding-bottom:100px; overflow-x:clip; }
  body .desktop { display:grid; width:auto; max-width:none; margin:4px; padding:0; gap:4px; grid-template-columns:clamp(28px,9vw,54px) minmax(0,1fr) clamp(28px,9vw,54px); }
  body .desktop>main { grid-column:2; grid-row:1; width:100%; min-width:0; }
  body .desktop>.sidebar { display:flex; min-width:0; width:auto; gap:5px; overflow:hidden; }
  body .desktop>.left { grid-column:1; grid-row:1; }
  body .desktop>.right { grid-column:3; grid-row:1; }
  body .desktop>.sidebar>* { max-width:100%; box-sizing:border-box; }
  body .sidebar .art-piece { width:100%; padding:0; box-sizing:border-box; }
  body .sidebar .little-strip { display:flex; flex-direction:column; gap:4px; }
  body .sidebar .wat-album-extension { gap:5px; }
  body .sidebar :is(.wat-mini,.wat-mutter,.wat-note-inset,.wat-note-button) { padding:2px; font-size:8px; overflow-wrap:anywhere; }
  body .sidebar .titlebar { padding:1px; font-size:8px; }
  body .sidebar .wat-window-controls { display:none; }
  body .desktop>main>.window { width:100%; box-sizing:border-box; }
  body .sidebar img { max-width:100%; height:auto; }
  body #welcome .window-content { padding:10px; display:grid; grid-template-columns:minmax(0,1fr) 70px; gap:10px; }
  body #welcome .welcome-grid { display:grid; grid-column:1; grid-row:1; grid-template-columns:65px minmax(0,1fr); gap:10px; align-items:center; }
  body #welcome .welcome-grid>div { padding-right:0; min-width:0; }
  body #welcome .hero-face { width:65px; height:95px; margin:8px 0; object-fit:cover; }
  body #welcome h1 { font-size:34px; margin:0 0 8px; }
  body #welcome .contract { font-size:10px; overflow-wrap:anywhere; }
  body #welcome .wat-pika-stamp { position:relative; inset:auto; grid-column:2; grid-row:1; align-self:center; float:none; width:60px; margin:0; transform:rotate(5deg); }
  body #welcome .window-content>p,body #welcome .statusline { grid-column:1/-1; }
  body #welcome .loud-link { font-size:12px; overflow-wrap:anywhere; }
  body #welcome p.multiverse-welcome { font-size:19px; line-height:1.35; filter:none; overflow-wrap:anywhere; }
  body .window>.titlebar { height:auto; min-height:30px; touch-action:pan-y; cursor:default; gap:4px; }
  body .window>.titlebar>span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
  body .wat-window-controls button { width:28px!important; height:28px!important; min-width:28px!important; }
  body #archive .video-shelf { grid-template-columns:repeat(3,minmax(0,1fr)); }
  body .media-controls { flex-wrap:wrap; }
  body .media-controls button { min-height:32px; min-width:32px; }
  body .taskbar { height:44px; box-sizing:border-box; padding-bottom:env(safe-area-inset-bottom); }
  body .taskbar button { min-height:32px; font-size:11px; padding:3px 5px; }
  body #clock { font-size:10px; padding:4px; }
  body #background-mute,body #pokemon-background-mute,body #keep-music-playing { bottom:calc(48px + env(safe-area-inset-bottom))!important; min-height:30px; font-size:11px!important; }
  body #keep-music-playing { right:7px!important; left:auto!important; }
  body #chat,body #chat.chat-large { position:fixed!important; left:8px!important; right:8px!important; top:auto!important; bottom:84px!important; width:auto!important; max-width:none!important; height:min(510px,calc(100dvh - 100px))!important; translate:none!important; box-sizing:border-box; z-index:10003!important; display:flex; flex-direction:column; background:#bfc0ccd9; }
  body #chat[hidden] { display:none!important; }
  body #chat .chat-body { flex:1; min-height:0; height:auto!important; }
  body #chat input,body #chat #chat-login input,body #chat #chat-form input { font-size:16px; height:34px; }
  body #chat #chat-form button,body #chat #chat-login button { height:34px; }
  body #chat .rooms button { min-height:32px; }
  body #chat .chat-menu { height:30px; flex-shrink:0; }
  body #chat .chat-menu button { min-height:28px; }
  body #chat.wat-minimized,body #chat.collapsed { height:auto!important; }
  body #player-anchor { height:0; margin:0; }
  body:not(.mobile-player-open) #webamp { display:none!important; }
  body #webamp { position:fixed!important; top:auto!important; bottom:84px!important; left:50%!important; right:auto!important; transform:translateX(-50%)!important; width:275px!important; height:min(450px,calc(100dvh - 100px))!important; overflow-x:hidden!important; overflow-y:auto!important; z-index:10003!important; }
  body #webamp div:has(> #main-window) { transform:translate(0,0)!important; }
  body #webamp div:has(> #equalizer-window) { transform:translate(0,116px)!important; }
  body #webamp div:has(> div > #playlist-window) { transform:translate(0,232px)!important; }
  body .pokemon-page { width:calc(100% - 16px); margin:8px; }
  body .pokemon-page .intro { display:flex; gap:12px; padding:12px; flex-wrap:wrap; }
  body .pokemon-page #welcome .wat-pika-stamp { float:none; flex:0 0 85px; width:85px; margin:6px; }
  body .pokemon-page .intro h1 { font-size:28px!important; }
  body .pokemon-page .intro .pokemon-eel-button { flex-basis:110px; width:110px; }
  body .cartridge p { line-height:1.4; }
  body .desktop #welcome .window-content { padding:7px; grid-template-columns:minmax(0,1fr) 44px; gap:6px; }
  body .desktop #welcome .welcome-grid { grid-template-columns:42px minmax(0,1fr); gap:6px; }
  body .desktop #welcome .hero-face { width:42px; height:65px; }
  body .desktop #welcome h1 { font-size:28px; }
  body .desktop #welcome .wat-pika-stamp { width:40px; }
  body .desktop #welcome .loud-link { font-size:11px; }
  body .desktop #welcome p.multiverse-welcome { font-size:16px; line-height:1.4; }
}
