/* An open desktop. Initial placement is shuffled; positions remain
   throughout the session; resizing the viewport only brings folders into reach. */
:root{--canvas-art-paper:#f4f0ec;--noah-studio-periwinkle:#b9bde9}
:root[data-theme=light]:not([data-atmosphere]){--canvas-art-paper:#ffffff}
body[data-desktop]{height:100dvh;overflow:hidden;overscroll-behavior:none}
body[data-desktop] #paths-stage{position:fixed;inset:0;display:block;height:100dvh;min-height:0;padding:0;overflow:hidden}
.desktop-folders,.desktop-layout-bounds,.desktop-about{position:absolute;inset:max(76px,calc(env(safe-area-inset-top) + 64px)) 24px max(100px,calc(env(safe-area-inset-bottom) + 88px));width:auto;height:auto}
.desktop-folders button{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:90px;height:90px;min-width:0;min-height:0;font-size:14px;touch-action:none;user-select:none;-webkit-user-select:none}
.desktop-folders svg{width:44px;height:38px;stroke-width:1;pointer-events:none}
.desktop-folders button[data-dragging]{cursor:grabbing;opacity:.75}
body[data-desktop] #paths-dock{max-width:100%;gap:0}
@media(max-width:600px){.paths-tool-full{font-size:10px}.desktop-folders button{width:82px;height:88px;font-size:13px}}
.desktop-folders button[data-window-state=visible]::after,.desktop-folders button[data-window-state=minimized]::after{content:'';position:absolute;bottom:0;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:currentColor}
.desktop-folders button[data-window-state=minimized]::after{width:5px;height:5px;background:none;border:1px solid currentColor}
.desktop-folders button:is([data-window-state=visible],[data-window-state=minimized])::after{width:3px;height:3px;box-sizing:border-box;left:calc(50% - 1.5px)}

@media(max-height:420px){.desktop-folders button{width:64px;height:64px;font-size:11px;gap:6px}.desktop-folders svg{width:32px;height:28px}}

.desktop-folders button{width:var(--folder-size,90px);height:var(--folder-size,90px);overflow-wrap:anywhere}
.desktop-folders[data-dense] button{gap:5px;font-size:10px}
.desktop-folders[data-dense] svg{width:28px;height:24px}

/* Leave breathing room below the running marker inside the hover surface. */
.desktop-folders button{padding-bottom:12px;box-sizing:border-box}
.desktop-folders button:is([data-window-state=visible],[data-window-state=minimized])::after{bottom:7px}
.desktop-folders[data-dense] button{padding-bottom:10px}

.desktop-layout-bounds{visibility:hidden;pointer-events:none;contain:strict}

/* Reuse the destination symbol inside the same restrained folder outline. */
.desktop-folders svg.desktop-folder-symbol{width:12px;height:12px;stroke-width:1.4;pointer-events:none}

/* Dock labels share one inset, with room reserved for a pinned timer. */
body[data-desktop] #paths-dock{--dock-label-inset:10px}
body[data-desktop] #paths-dock button>span{padding-inline:var(--dock-label-inset)}
@media(max-width:600px){body[data-desktop] #paths-dock{--dock-label-inset:clamp(4px,calc(8vw - 21.6px),12px)}body[data-desktop] #paths-dock:has([data-tool=timer]){--dock-label-inset:clamp(2px,calc(10vw - 30px),10px)}}

/* Hidden standalone links leave no empty toolbar section. */
body[data-desktop] .workspace-navigation-controls:not(:has(>:not([hidden]))){display:none!important}

/* About appears directly on the current desktop surface, without a window. */
body[data-desktop] .desktop-about{position:absolute;z-index:0;width:auto;height:auto;padding:16px 0;background:transparent;color:var(--ink);pointer-events:none}
.desktop-about .about-work,.desktop-about .about-layout-control{pointer-events:auto}
.desktop-folders{z-index:1;pointer-events:none}
.desktop-folders button{pointer-events:auto}
#desktop-about-open{display:block;min-height:44px;width:100%;font:inherit;text-align:center}
.desktop-about-feedback{position:fixed;left:24px;right:24px;top:45%;text-align:center;font-size:12px;pointer-events:none}

body[data-desktop-about] #paths-stage,body[data-desktop-about] .desktop-about .about-work{-webkit-user-select:none;user-select:none}
body[data-desktop-about] #paths-stage{touch-action:manipulation}

/* About borrows the phone desktop; folder placement remains intact underneath. */
.desktop-folders{transition:opacity 200ms ease}
@media(max-width:600px){body[data-desktop-about] .desktop-folders{opacity:0;pointer-events:none}body[data-desktop-about] .desktop-folders button{pointer-events:none}}
@media(prefers-reduced-motion:reduce){.desktop-folders{transition:none}}
/* Keep side lanes free even when About samples its widest composition. */
@media(min-width:601px){body[data-desktop] .desktop-about{padding-inline:106px}}

/* A single interpolated mix keeps fullscreen paper chrome and its ink in step.
   Capture site colors at the root, before the host-only overrides below. */
@property --sketch-chrome-paper { syntax:'<percentage>'; inherits:true; initial-value:0%; }
:root[data-workspace]{--desktop-site-background:var(--workspace-background);--desktop-site-ink:var(--ink);--desktop-site-chrome:var(--workspace-chrome)}
body[data-desktop]{
 --sketch-chrome-paper:0%;
 --workspace-background:color-mix(in srgb,var(--desktop-site-background),#f8f8f5 var(--sketch-chrome-paper));
 --workspace-chrome:color-mix(in srgb,var(--desktop-site-chrome),color-mix(in srgb,#f8f8f5 94%,#111111) var(--sketch-chrome-paper));
 --ink:color-mix(in srgb,var(--desktop-site-ink),#111111 var(--sketch-chrome-paper));
 --workspace-line:color-mix(in srgb,var(--ink) 16%,transparent);
 --workspace-rule:color-mix(in srgb,var(--ink) 16%,var(--workspace-chrome));
 color:var(--ink);
 /* The outer document and body share the actual live background. */
 background-color:inherit!important;
 transition:--sketch-chrome-paper 320ms cubic-bezier(.2,.8,.2,1);
}
body[data-desktop][data-sketch-paper-chrome]{--sketch-chrome-paper:100%}
:root:has(body[data-sketch-paper-chrome]){background-color:#f8f8f5!important;color-scheme:light}
@media(prefers-reduced-motion:reduce){body[data-desktop]{transition:none}}
/* Keep the full About readable in the shallow gap of a landscape viewport. */
@media(max-height:420px){body[data-desktop] .desktop-about{padding-block:8px}}
/* The independent home workspace owns its scoped controls and world camera. */

/* Fullscreen phone tools reserve one touch row, without an empty dock row. */
body[data-desktop][data-workspace-phone][data-workspace-expanded]:not([data-sketch-focus])>.paths-footer{min-height:44px;bottom:max(6px,env(safe-area-inset-bottom))}
