:root{
  --wallpaper-text:var(--brand-ink);
  --wallpaper-muted:var(--brand-muted);
  --desktop-focus:var(--brand-red);
  --nil-separation:#aaa79d;
}
:root[data-desktop-theme="dark"]{
  --desktop-bg:#242623;
  --desktop-watermark:#b6b5ab;
  --wallpaper-text:var(--brand-paper);
  --wallpaper-muted:#b6b5ab;
}
/* Desktop colors are independent of the original brand palette and document surfaces. */
.portfolio-layer .desktop-icon > span:not(.shortcut-arrow){color:var(--wallpaper-text);}
.portfolio-layer .desktop-hint{color:var(--wallpaper-muted);}
.portfolio-layer .desktop-icon:hover > span:not(.shortcut-arrow),.portfolio-layer .desktop-icon.selected > span:not(.shortcut-arrow),.portfolio-layer .desktop-icon:focus-visible > span:not(.shortcut-arrow){color:var(--selection-text);}
.portfolio-layer .desktop-icon:focus-visible,.desktop-icons.icons-free .desktop-icon:focus-visible,.nil-character:focus-visible{outline-color:var(--desktop-focus);}
:root[data-desktop-theme="dark"] .nil-sprite{filter:drop-shadow(2px 2px 0 var(--nil-separation));}
:root[data-desktop-theme="dark"] .desktop-icon img{filter:drop-shadow(1px 1px 0 #817e75);}
.theme-control{display:inline-flex;align-items:center;justify-content:flex-start;gap:9px;min-height:36px;padding:3px 7px 3px 3px;background:var(--brand-surface);color:var(--brand-ink);border:1px solid var(--brand-ink);box-shadow:inset 1px 1px var(--brand-paper),inset -1px -1px var(--brand-graphite);font:12px/1.2 var(--font-mono);text-align:left;white-space:nowrap;}
.theme-control:active{box-shadow:inset 1px 1px var(--brand-graphite),inset -1px -1px var(--brand-paper);}
.theme-control:focus-visible{outline:2px solid var(--brand-red);outline-offset:3px;}
.theme-sky{position:relative;display:block;flex:0 0 66px;width:66px;height:28px;overflow:hidden;background:#e5d6ad;border:1px solid var(--brand-graphite);}
.theme-sky img{position:absolute;top:4px;width:16px;height:16px;image-rendering:pixelated;image-rendering:crisp-edges;}
.theme-sun{left:7px;}.theme-moon{right:7px;opacity:.35;}
.theme-indicator{position:absolute;left:5px;bottom:1px;width:20px;height:2px;background:#7d5218;}
.theme-caption{min-width:5ch;}
.theme-stars{position:absolute;left:30px;top:5px;width:2px;height:2px;background:#c8c8ba;box-shadow:5px 8px #c8c8ba,25px -2px #c8c8ba;opacity:0;}
.theme-control[aria-checked="true"] .theme-sky{background:#2b3030;}
.theme-control[aria-checked="true"] .theme-sun{opacity:.28;}
.theme-control[aria-checked="true"] .theme-moon{opacity:1;}
.theme-control[aria-checked="true"] .theme-indicator{transform:translateX(34px);background:#f4f1da;}
.theme-control[aria-checked="true"] .theme-stars{opacity:1;}
.theme-dock{flex:0 0 auto;}
.start-options button.theme-menu{width:100%;padding:7px 10px;gap:12px;box-shadow:none;border-width:1px 0;}
.start-options button.theme-menu .theme-sky img{width:16px;height:16px;margin:0;}
.start-options button.theme-menu:hover{color:var(--brand-ink);background:var(--brand-surface);outline:1px dotted var(--brand-ink);outline-offset:-4px;}
.theme-settings p{max-width:32em;}
.theme-settings .theme-control{min-height:44px;}
.theme-changing .theme-sky,.theme-changing .theme-stars,.theme-changing .theme-sky img{transition:background-color .2s steps(4,end),opacity .2s steps(4,end);}
.theme-changing .theme-indicator{transition:transform .2s steps(4,end);}
.theme-changing .portfolio-layer .desktop{transition:background-color .2s steps(4,end);}
@media(max-width:900px),(pointer:coarse){.taskbar .theme-dock{display:none;}.theme-control{min-height:44px;}.theme-sky{height:32px;}.theme-sky img{top:6px;}}
@media(prefers-reduced-motion:reduce){.theme-changing .theme-sky,.theme-changing .theme-stars,.theme-changing .theme-sky img,.theme-changing .theme-indicator,.theme-changing .portfolio-layer .desktop{transition:none;}}
@media print{.theme-control{display:none!important;}}
#window-settings .system-form{min-height:0;overflow:auto;overscroll-behavior:contain;align-content:start;}
.theme-settings{min-width:0;}
.theme-settings .theme-control{justify-self:start;}

.theme-landing{position:absolute;z-index:4;top:28px;right:28px;pointer-events:auto;}
@media(max-width:600px){.theme-landing{top:18px;right:16px;}.theme-landing .theme-caption{display:none;}}

/* A tiny studio window, with a working pull cord instead of a sliding pill. */
.theme-control{position:relative;gap:10px;padding-right:20px;overflow:visible;}
.theme-sky{flex-basis:66px;height:28px;border:2px solid #302e27;box-shadow:0 -3px 0 #b8ae92,inset 0 0 0 1px #f3e9cc;isolation:isolate;}
.theme-sash{position:absolute;z-index:2;left:50%;top:0;bottom:0;width:2px;background:#a99e80;box-shadow:0 14px 0 #a99e80;opacity:.6;pointer-events:none;}
.theme-cloud{position:absolute;left:30px;top:6px;width:9px;height:3px;background:#f4f0df;box-shadow:3px -3px #f4f0df,8px 1px #f4f0df;opacity:.8;}
.theme-drape{position:absolute;z-index:3;top:0;bottom:0;width:5px;background:repeating-linear-gradient(90deg,#b8ae92 0 2px,#e9dec3 2px 4px);transition:width .75s steps(8,end);}
.theme-drape-left{left:0;}.theme-drape-right{right:0;}
.theme-pull{position:absolute;right:7px;top:5px;width:5px;height:24px;}
.theme-cord{position:absolute;left:2px;top:0;width:1px;height:17px;background:#817256;}
.theme-bob{position:absolute;left:0;top:16px;width:5px;height:6px;background:var(--brand-red);box-shadow:1px 1px #302e27;}
.theme-label{display:flex;flex-direction:column;gap:4px;}
.theme-action{display:none;}
.theme-indicator{display:none;}
.theme-control[aria-checked="true"] .theme-drape{width:11px;}
.theme-control[aria-checked="true"] .theme-cloud{opacity:0;}
.theme-control[aria-checked="true"] .theme-sun{transform:translateY(18px);opacity:0;}
.theme-control[aria-checked="true"] .theme-moon{transform:translateX(-6px);}
.theme-moon{transform:translateY(20px);opacity:0;}
.theme-changing .theme-sun,.theme-changing .theme-moon{transition:transform .75s steps(8,end),opacity .75s steps(8,end);}
.theme-changing .theme-pull{animation:pull-studio-cord .7s steps(5,end);}
@keyframes pull-studio-cord{0%,100%{transform:translateY(0);}35%,55%{transform:translateY(10px);}}
.theme-landing{position:absolute;border:0;box-shadow:none;background:transparent;color:var(--brand-paper);top:24px;right:24px;padding:8px 18px 8px 8px;gap:7px;flex-direction:column;align-items:center;}
.theme-landing:hover{background:#11131088;}
.theme-landing:active{box-shadow:none;}
.theme-landing .theme-sky{width:86px;height:50px;flex-basis:auto;box-shadow:0 -4px 0 #b8ae92,0 3px 0 #b8ae92,inset 0 0 0 2px #f3e9cc;}
.theme-landing .theme-sash{box-shadow:none;}
.theme-landing .theme-sash:after{content:"";position:absolute;left:-42px;top:24px;width:84px;height:2px;background:#a99e80;}
.theme-landing .theme-sky img{top:10px;width:22px;height:22px;}
.theme-landing .theme-sun{left:21px;}.theme-landing .theme-moon{right:17px;}
.theme-landing .theme-drape{width:9px;}
.theme-landing[aria-checked="true"] .theme-drape{width:21px;}
.theme-landing .theme-pull{right:2px;top:8px;height:52px;}
.theme-landing .theme-cord{height:43px;}.theme-landing .theme-bob{top:42px;width:6px;height:8px;}
.theme-landing .theme-label{text-align:center;align-items:center;}
.theme-landing .theme-caption{display:block;font-size:11px;text-transform:uppercase;letter-spacing:2px;text-shadow:1px 1px #111310;}
.theme-landing .theme-action{display:block;padding:3px 4px;background:#111310b8;font-size:9px;line-height:1.2;text-transform:uppercase;letter-spacing:.5px;}
.theme-landing .theme-stars{left:20px;top:9px;box-shadow:7px 24px #c8c8ba,44px 5px #c8c8ba,32px 32px #c8c8ba;}
.theme-landing .theme-cloud{left:49px;top:32px;}
.theme-landing[aria-checked="true"] .theme-sun{transform:translateY(35px);}
@media(max-width:600px){.theme-landing{top:12px;right:12px;}.theme-landing .theme-sky{width:70px;height:44px;}.theme-landing .theme-sky img{width:18px;height:18px;}.theme-landing .theme-sun{left:17px;}.theme-landing .theme-moon{right:13px;}.theme-landing .theme-caption{display:block;}.theme-landing[aria-checked="true"] .theme-drape{width:16px;}.theme-landing .theme-sash:after{width:68px;left:-34px;top:21px;}}
@media(prefers-reduced-motion:reduce){.theme-drape,.theme-changing .theme-sun,.theme-changing .theme-moon{transition:none;}.theme-changing .theme-pull{animation:none;}}
