.titlebar strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Native text documents need dark text against the window's white backing. */
.window iframe.library-document{color-scheme:light}
@media(min-width:741px){.window.twitch-window{min-width:402px;min-height:341px}}
.window.twitch-window iframe{background:#0e0e10}
.titlebar button{flex-shrink:0}
.titlebar .new-window{font-size:19px}
.titlebar button[aria-busy="true"]{opacity:.55;cursor:wait}
.app-transfer-notice{position:fixed;right:14px;bottom:60px;display:flex;align-items:flex-start;gap:12px;max-width:min(440px,calc(100vw - 28px));padding:14px;border:1px solid #b5977d;border-radius:7px;background:#243730;color:#e8eddf;box-shadow:0 6px 22px #0006;font:12px/1.5 'Segoe UI',Arial,sans-serif}
.app-transfer-notice button{padding:0 3px;font-size:20px;line-height:20px}
.titlebar .maximize-between{display:inline-flex;align-items:center;justify-content:center}
.titlebar .maximize-between[hidden]{display:none}
.titlebar .maximize-between[aria-pressed="true"]{background:#ffffff20}
/* Fit all window controls when a compact app is resized on any screen. */
.window{container-name:desktop-app;container-type:inline-size}
@container desktop-app (max-width:480px){
  .window:not(.sticky-window):not(.desktop-widget)>.titlebar{gap:2px;padding-left:8px}
  .window:not(.sticky-window):not(.desktop-widget)>.titlebar>button{width:30px;padding:0}
}
@container desktop-app (max-width:340px){
  .window:not(.sticky-window):not(.desktop-widget)>.titlebar{gap:1px;padding-left:6px}
  .window:not(.sticky-window):not(.desktop-widget)>.titlebar>button{width:26px}
}
.between-icon{position:relative;display:block;width:18px;height:16px;border-left:1px solid currentColor;border-right:1px solid currentColor}
.between-icon::before{content:"";position:absolute;inset:0 4px;border:1.5px solid currentColor}
#workspace .window.between-icons{inset:auto!important;left:var(--between-left)!important;top:0!important;width:var(--between-width)!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;border-radius:0!important;padding-bottom:0!important;resize:none!important}
.window.sticky-window{min-width:230px;min-height:190px;border-color:#b7a76b;border-radius:5px;background:#fff3b0;padding-bottom:8px}
.sticky-window .titlebar{min-height:30px;gap:0;padding-left:9px;background:#e9d88b;color:#4c452c;font-size:11px}
.sticky-window .titlebar button{width:29px;height:30px;flex:0 0 29px;font-size:16px}
.sticky-window .titlebar button:hover{background:#0000000c}
.sticky-window .titlebar .close:hover{background:#bd664a;color:white}
.sticky-window iframe{background:#fff3b0}
.window.minesweeper-window{min-width:280px;min-height:180px;background:#f5f3ec}
@media(max-width:700px){.window.minesweeper-window:not(.maximized){min-width:0;max-width:calc(100% - 16px);max-height:calc(100% - 16px)}}
@media(max-width:700px){.window.sticky-window:not(.maximized){max-width:calc(100% - 16px);max-height:calc(100% - 16px);resize:both}}

/* Apps opt into widget mode; the original iframe stays in place. */
.titlebar .make-widget{display:inline-flex;align-items:center;justify-content:center}
.widget-icon{display:block;width:16px;height:14px;border:1px solid currentColor;border-radius:2px;box-shadow:inset 3px 3px 0 #ffffff28}
.widget-icon::after{content:"";display:block;width:5px;height:5px;margin:4px 0 0 7px;border:1px solid currentColor;border-radius:1px}
.window.calendar-window:not(.maximized):not(.between-icons){min-width:min(260px,calc(100% - 16px));min-height:min(330px,calc(100% - 16px));max-width:calc(100% - 16px);max-height:calc(100% - 16px);resize:both}
.window.world-clock-window:not(.maximized):not(.between-icons){min-width:min(280px,calc(100% - 16px));min-height:min(280px,calc(100% - 16px));max-width:calc(100% - 16px);max-height:calc(100% - 16px);resize:both}
#workspace .window.desktop-widget{
  min-width:min(260px,calc(100% - 16px));min-height:min(280px,calc(100% - 16px));
  max-width:calc(100% - 16px);max-height:calc(100% - 16px);resize:none;
  padding:0 0 3px;border:1px solid #b7d2c32a;border-radius:7px;
  background:#0b211b55;color:#dfebd8;
  box-shadow:inset 0 2px 8px #0005,inset 0 -1px 0 #ffffff08;
}
.window.desktop-widget iframe{order:0;background:transparent;color-scheme:dark}
.window.desktop-widget .titlebar{order:1;min-height:23px;height:23px;justify-content:flex-end;gap:0;padding:0 6px;background:transparent;color:#c4d6c5;opacity:0;cursor:grab;font-size:10px;transition:opacity .15s}
.window.desktop-widget .titlebar:active{cursor:grabbing}
.window.desktop-widget:is(:hover,:focus-within) .titlebar{opacity:1}
.window.desktop-widget .titlebar button{width:26px;height:23px;font-size:15px}
.window.desktop-widget .titlebar strong,.window.desktop-widget .titlebar button:not(.make-widget){display:none}
.window.desktop-widget .widget-icon{width:13px;height:11px}
.window.desktop-widget .widget-icon::after{width:4px;height:4px;margin:3px 0 0 6px}
.window.desktop-widget .titlebar .close:hover{background:#9e514566}
@media(max-width:740px){#workspace .window.desktop-widget{background:#0b211be8;backdrop-filter:blur(8px)}}
@media(hover:none),(pointer:coarse){.window.desktop-widget .titlebar{opacity:1}}
@media(prefers-reduced-motion:reduce){.window.desktop-widget .titlebar{transition:none}}
