:root{color-scheme:dark;--bg:#202731;--fg:#e8e7dc;--accent:#b8cce2;--cursor-arrow:url("./assets/cursors/arrow.svg") 2 2,default;--cursor-link:url("./assets/cursors/hand.svg") 12 2,pointer;--cursor-grabbing:url("./assets/cursors/grabbing.svg") 16 16,grabbing;--cursor-busy:url("./assets/cursors/busy.svg") 16 16,wait}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}
body{background:var(--bg);color:var(--fg);font-family:Arial,Helvetica,sans-serif;cursor:var(--cursor-arrow)}
main{position:relative;width:100%;height:100dvh}
button{font:inherit;color:inherit;cursor:var(--cursor-link);-webkit-tap-highlight-color:transparent}
button:disabled{opacity:.35;cursor:var(--cursor-busy)}
button:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
.viewer{position:relative;width:100%;height:100dvh;min-width:0;background:radial-gradient(ellipse at 50% 45%,#3b485a 0%,#202731 70%)}
.stage{position:absolute;inset:0}
.stage canvas{display:block;width:100%;height:100%;cursor:var(--cursor-arrow);touch-action:none}
.stage canvas.is-grabbing{cursor:var(--cursor-grabbing)!important}
.drag-cursor{position:fixed;left:0;top:0;width:32px;height:32px;max-width:none;display:none;pointer-events:none;z-index:2147483647;image-rendering:pixelated;user-select:none}
html.is-grabbing,html.is-grabbing *,html.is-grabbing #stage canvas{cursor:none!important;user-select:none!important;-webkit-user-select:none!important}
html.is-grabbing .drag-cursor{display:block}
.intro-prompt{position:absolute;z-index:3;left:20px;right:20px;bottom:max(7vh,30px);display:flex;justify-content:center;pointer-events:none}
#enter-screen{pointer-events:auto;display:flex;align-items:center;gap:12px;padding:14px 20px;background:transparent;border:0;border-radius:6px;color:#c0cbd8;font-size:14px;line-height:1.5;letter-spacing:.15px;transition:color .2s}
#enter-screen:hover{color:#f0f4fa}
#enter-screen svg{width:19px;height:19px;flex:none;fill:none;stroke:var(--accent);stroke-width:1.5;stroke-linecap:round}
.screen-toolbar[hidden]{display:none!important}
.screen-toolbar{position:absolute;z-index:6;left:28px;top:max(24px,env(safe-area-inset-top));pointer-events:none}
.screen-toolbar button{pointer-events:auto;background:rgba(28,36,48,.88);border:1px solid #62758b;border-radius:5px;padding:11px 15px;color:#e8edf3;font-size:12px}
.screen-toolbar button:hover{background:#3c4d63}
.loading{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);pointer-events:none}
.load-line{display:block;width:70px;height:2px;background:var(--accent);animation:loading 1s ease-in-out infinite alternate}
.loading.hidden{display:none}
@keyframes loading{to{opacity:.3;transform:scaleX(.5)}}
.viewer-placeholder{visibility:hidden!important;pointer-events:none!important}
.screen-focused #viewer{position:fixed;inset:0;z-index:50;width:100%;height:100dvh;background:transparent}
.screen-focused #viewer::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 45%,#3b485a 0%,#202731 70%);pointer-events:none}
.screen-focused .screen-toolbar{opacity:var(--focus-ui,0)}
.screen-focused .intro-prompt{visibility:hidden}
.screen-focused #stage canvas{cursor:var(--cursor-arrow)}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){.intro-prompt{left:12px;right:12px;bottom:max(7vh,28px)}#enter-screen{font-size:12px;gap:9px;padding:12px 5px}.screen-toolbar{left:16px;top:max(16px,env(safe-area-inset-top))}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* The existing site lives in a readable, responsive Explorer window. */
#portfolio-window{padding:3px;margin:auto;width:calc(100vw - 80px);max-width:1120px;height:calc(100dvh - 120px);max-height:none;border:2px outset #eee;background:#d4d0c8;color:#111;box-shadow:8px 12px 0 #0005;overflow:hidden}
#portfolio-window[open]{display:flex;flex-direction:column}
#portfolio-window::backdrop{background:#18212da8}
.portfolio-titlebar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 6px 5px 10px;background:linear-gradient(90deg,#0a246a,#6a99cf);color:white;flex-shrink:0}
.portfolio-titlebar h1{margin:0;font:bold 13px Tahoma,Arial,sans-serif;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.portfolio-actions{display:flex;align-items:center;gap:3px;flex-shrink:0}
.portfolio-actions button{width:28px;height:26px;padding:0;background:#d4d0c8;color:#111;border:2px outset white;font:bold 22px/20px Arial,sans-serif}
#portfolio-content{flex:1;min-height:0;width:100%;border:2px inset #eee;background:#f8f5ed}
@media(max-width:600px){#portfolio-window{width:calc(100% - 16px);height:calc(100dvh - 96px);max-width:100%;margin:auto;}.portfolio-titlebar h1{font-size:11px}.portfolio-actions{gap:3px}}



/* The canvas is one large touch target: suppress the browser's full-screen
   tap highlight and native selection on the simulated desktop controls. */
.stage,.stage canvas,.screen-toolbar,.intro-prompt,.portfolio-titlebar{
  -webkit-tap-highlight-color:transparent;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.screen-toolbar button,.portfolio-actions button,.portfolio-actions a{touch-action:manipulation}

#portfolio-window.is-maximized{width:100%;max-width:none;height:100dvh;max-height:none;margin:0;border:0;box-shadow:none}
.portfolio-actions button:active{border-style:inset}
#minimize-portfolio span{position:relative;top:-4px}

/* Windows 2000's compact shutdown dialog. */
#shutdown-window{width:420px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);padding:3px;border:2px outset #eee;background:#d4d0c8;color:#111;box-shadow:4px 5px 0 #0005;font:13px Tahoma,Arial,sans-serif;color-scheme:light}
#shutdown-window::backdrop{background:rgba(15,19,24,.4)}
.shutdown-titlebar{display:flex;align-items:center;justify-content:space-between;padding:3px 4px 3px 7px;background:linear-gradient(90deg,#0a246a,#6a99cf);color:#fff}
.shutdown-titlebar h2{margin:0;font:bold 13px Tahoma,Arial,sans-serif}
#shutdown-close{width:23px;height:22px;padding:0;font:bold 19px/16px Arial,sans-serif}
#shutdown-window button{background:#d4d0c8;color:#111;border:2px outset #fff;border-radius:0;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#shutdown-window button:active{border-style:inset}
#shutdown-window button:focus-visible,#shutdown-action:focus-visible{outline:1px dotted #111;outline-offset:-5px}
.shutdown-banner{display:flex;justify-content:center;align-items:center;gap:20px;background:linear-gradient(110deg,#fff,#ebedf3);margin-top:3px;padding:16px;color:#222}
.shutdown-banner strong{display:block;font:28px Arial,sans-serif;letter-spacing:-1px}.shutdown-banner strong b{font-weight:400}.shutdown-banner small{display:block;font:12px Arial,sans-serif;letter-spacing:3px}
.shutdown-flag{display:grid;grid-template-columns:17px 17px;gap:3px;transform:skewY(-10deg)}.shutdown-flag i{height:17px;background:#df5541}.shutdown-flag i:nth-child(2){background:#6b9e45}.shutdown-flag i:nth-child(3){background:#3d67bd}.shutdown-flag i:nth-child(4){background:#f0ca4b}
#shutdown-form{padding:22px 20px 16px}#shutdown-action{display:block;width:100%;margin:12px 0 14px;padding:3px;background:#fff;color:#111;border:2px inset #eee;border-radius:0;font:13px Tahoma,Arial,sans-serif}
#shutdown-description,#shutdown-help,#shutdown-status{font-size:12px;line-height:1.5;margin:0 0 18px}#shutdown-description{min-height:36px}
.shutdown-actions{display:flex;justify-content:flex-end;gap:8px}.shutdown-actions button{min-width:74px;min-height:28px;font:12px Tahoma,Arial,sans-serif}
#shutdown-window[aria-busy="true"] #shutdown-status{margin-top:12px}
@media(pointer:coarse){.shutdown-actions button{min-height:38px}#shutdown-action{min-height:36px}}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
#touch-desktop[hidden],#touch-desktop [hidden]{display:none!important}
#touch-desktop{position:absolute;inset:68px 0 0;z-index:4;background:#3a6ea5;color:#111;font:14px Tahoma,Arial,sans-serif;overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.touch-desktop-active #stage{visibility:hidden}
#touch-desktop button{min-height:44px;touch-action:manipulation;border-radius:0;color:#111}
.touch-wallpaper{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;opacity:.8}
.touch-wallpaper canvas{max-width:90%;max-height:85%;width:auto;height:auto;object-fit:contain}
.touch-folder,.touch-file{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100px;min-height:96px;background:none;border:0;padding:12px}
.touch-folder{position:relative;margin:8px;color:white!important;text-shadow:1px 1px #000}
.touch-folder img{width:40px;height:40px;image-rendering:pixelated}
.touch-explorer{position:absolute;inset:112px 10px 70px;display:flex;flex-direction:column;border:2px outset white;background:#d4d0c8;box-shadow:3px 4px #0004;min-height:180px}
.touch-explorer.is-maximized{inset:0 0 52px;box-shadow:none}
.touch-explorer header{display:flex;align-items:center;justify-content:space-between;gap:4px;background:linear-gradient(90deg,#0a246a,#6a99cf);color:white;padding:3px 4px 3px 8px}
.touch-explorer header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.touch-explorer header div{display:flex;gap:3px}
.touch-explorer header button{width:44px;background:#d4d0c8;border:2px outset white;font:bold 22px Arial}
.touch-address{display:flex;gap:10px;align-items:center;padding:8px;font-size:12px}.touch-address span{flex:1;background:white;padding:6px;border:2px inset white}
.touch-files{flex:1;min-height:0;overflow:auto;background:white;margin:0 4px;border:2px inset white}.touch-file{margin:8px}.document-icon{font:40px Arial;color:#0a246a}
.touch-file:active,.touch-folder:active{background:#0a246a;color:white!important}
.touch-explorer footer{font-size:12px;padding:5px 8px}
.touch-taskbar{position:absolute;bottom:0;left:0;right:0;display:flex;gap:4px;padding:3px 4px max(3px,env(safe-area-inset-bottom));background:#d4d0c8;border-top:2px solid white;min-height:52px}
.touch-taskbar button{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 8px;background:#d4d0c8;border:2px outset white;font:bold 12px Tahoma,Arial}.touch-taskbar button:not(:first-child){flex:1}.touch-taskbar button[aria-pressed=true]{border-style:inset}
.touch-start-menu{position:absolute;bottom:52px;left:4px;z-index:2;width:250px;padding:4px;background:#d4d0c8;border:2px outset white;box-shadow:3px 3px #0005}
.touch-start-menu strong{display:block;background:#0a246a;color:white;padding:10px}.touch-start-menu button{display:block;text-align:left;width:100%;border:0;background:none;padding:10px}.touch-start-menu button:active{background:#0a246a;color:white!important}
@media(max-width:700px),(pointer:coarse){
  .portfolio-actions button{width:44px;height:44px}
  .portfolio-titlebar{gap:4px;padding:3px 4px 3px 8px;min-height:50px}
  .portfolio-titlebar h1{min-width:0;font-size:12px}
  #portfolio-window{width:calc(100% - 12px);height:calc(100% - 28px);max-width:none;max-height:100%;padding:2px}
  #portfolio-window.is-maximized{position:fixed;inset:0;width:100%;height:100%;max-height:100%;margin:0;padding:0}
  #portfolio-content{display:block;min-width:0;flex:1 1 0;height:0;-webkit-overflow-scrolling:touch}
  .screen-toolbar button{min-height:44px}
}
@media(max-height:500px){#touch-desktop{inset:58px 0 0}.touch-explorer{inset:12px 8px 60px}.touch-explorer.is-maximized{inset:0 0 52px}}

/* Actual image icons keep the mobile shell independent of font glyph support. */
.desktop-icon{width:20px;height:20px;object-fit:contain;flex:none;image-rendering:pixelated}
.touch-folder .desktop-icon,.touch-file .desktop-icon{width:40px;height:40px}
.touch-explorer header strong,.touch-address span,.touch-start-menu strong,.touch-start-menu button,.touch-taskbar button,.touch-tray{display:flex;align-items:center;gap:6px}
.touch-explorer header strong span,.touch-taskbar button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.touch-explorer header strong{min-width:0}
.touch-explorer header div{flex:none}
.touch-taskbar button{padding-inline:5px;font-weight:normal}
.touch-taskbar button:first-child{font-weight:bold;flex:none}
.touch-start-menu button .desktop-icon{width:28px;height:28px}
.touch-start-menu button[data-action=shutdown]{border-top:1px solid #999;box-shadow:inset 0 1px white}
.touch-tray{padding:0 5px;border:2px inset white;flex:none;font-size:11px;gap:3px}
.touch-tray .desktop-icon{width:16px;height:16px}
#portfolio-title{display:flex;align-items:center;gap:7px;min-width:0}
#portfolio-title span{overflow:hidden;text-overflow:ellipsis}
#touch-desktop.screen-off{background:#10151c}
#touch-desktop.screen-off>*{visibility:hidden}
#shutdown-form.is-progress>label,#shutdown-form.is-progress>select,#shutdown-form.is-progress>#shutdown-description,#shutdown-form.is-progress>#shutdown-help,#shutdown-form.is-progress>.shutdown-actions{display:none}
#shutdown-form.is-progress{min-height:135px;display:flex;align-items:center;justify-content:center}
#shutdown-form.is-progress #shutdown-status{margin:0;text-align:center}
@media(max-width:700px),(pointer:coarse){
  #shutdown-window{width:calc(100% - 32px);max-width:420px;max-height:calc(100% - 100px)}
  #shutdown-close{width:44px;height:44px}
  .shutdown-actions button{min-height:44px}
  #shutdown-action{min-height:44px;font-size:16px}
}
