
@font-face{font-family:Departure;src:url('departure-mono.woff2') format('woff2');font-display:swap}
:root{--desktop:#0c6974;--navy:#071a84;--silver:#c7c7c7;--light:#fff;--shadow:#333;--terminal:#020a06;--term:#7dff9d;--term-soft:#d7ffe0;--term-accent:#35f2ff;--font-size:15px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;overflow:hidden;background:#111;font-family:Departure,"Courier New",monospace}button,a,input{font:inherit}.retro-os{position:fixed;inset:62px 0 0;display:grid;grid-template-rows:minmax(0,1fr) 42px;background:var(--desktop);color:#111;image-rendering:pixelated}.desktop{position:relative;min-height:0;overflow:hidden;background:radial-gradient(circle at 58% 36%,rgba(53,242,255,.24),transparent 27%),linear-gradient(135deg,#0c6974,#064c66 62%,#08344e);background-image:linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px),radial-gradient(circle at 58% 36%,rgba(53,242,255,.24),transparent 27%),linear-gradient(135deg,#0c6974,#064c66 62%,#08344e);background-size:32px 32px,32px 32px,auto,auto}.desktop-brand{position:absolute;right:5vw;bottom:7vh;text-align:right;color:rgba(255,255,255,.15);text-shadow:4px 4px 0 rgba(0,0,0,.12)}.desktop-brand b{display:block;font-size:clamp(4rem,12vw,11rem);line-height:.72}.desktop-brand span{font-size:clamp(1rem,2vw,2rem);letter-spacing:.24em}.desktop-icon{position:relative;width:92px;min-height:92px;margin:13px 0 0 13px;padding:4px;border:1px solid transparent;background:transparent;color:#fff;display:flex;flex-direction:column;align-items:center;gap:5px;text-shadow:1px 1px #111;cursor:pointer}.desktop-icon:nth-of-type(2){position:absolute;left:0;top:112px}.desktop-icon:nth-of-type(3){position:absolute;left:0;top:224px}.desktop-icon:nth-of-type(4){position:absolute;left:0;top:336px}.desktop-icon:hover,.desktop-icon:focus-visible{border:1px dotted #fff;background:rgba(3,41,76,.55);outline:none}.desktop-icon b{font-size:10px;line-height:1.35;text-align:center}.pixel-icon{width:48px;height:43px;display:grid;place-items:center;background:#c7c7c7;color:#06130d;border:3px outset #eee;box-shadow:3px 3px 0 rgba(0,0,0,.35);font-size:14px}.pixel-icon.folder{background:#ffcf4a}.pixel-icon.document{background:#fff}.pixel-icon.user{background:#ff4fd8}.os-window{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);min-width:320px;min-height:220px;display:none;flex-direction:column;padding:4px;background:var(--silver);border:2px outset #fff;box-shadow:10px 12px 0 rgba(0,0,0,.35);z-index:20}.os-window.is-open{display:flex}.os-window.is-active .window-bar{background:var(--navy)}.os-window.is-maximized{inset:4px!important;width:calc(100% - 8px)!important;height:calc(100% - 8px)!important}.window-bar{height:30px;flex:0 0 30px;display:flex;align-items:center;justify-content:space-between;padding:3px 4px;background:#5b5b5b;color:#fff;cursor:grab;user-select:none}.window-bar:active{cursor:grabbing}.window-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;font-weight:700}.window-title i{display:inline-grid;place-items:center;width:22px;height:20px;margin-right:5px;background:#c7c7c7;color:#111;font-style:normal;border:1px outset #fff}.window-buttons{display:flex;gap:3px}.window-buttons button{width:25px;height:23px;padding:0;border:2px outset #fff;background:var(--silver);color:#111;line-height:1;cursor:pointer}.window-buttons button:active{border-style:inset}.resize-handle{position:absolute;right:2px;bottom:2px;width:16px;height:16px;cursor:nwse-resize;background:repeating-linear-gradient(135deg,transparent 0 3px,#555 3px 5px)}.terminal-screen{min-height:0;flex:1;overflow:auto;background:var(--terminal);color:var(--term);padding:14px 15px;font:400 var(--font-size)/1.55 Departure,"Courier New",monospace;outline:none;scrollbar-color:var(--silver) #111}.terminal-output{white-space:pre-wrap;overflow-wrap:anywhere}.terminal-output .muted{color:#8aa69a}.terminal-output .accent{color:var(--term-accent)}.terminal-output .warn{color:#ffcf4a}.terminal-output .error{color:#ff6b7a}.terminal-output a{color:#35f2ff}.terminal-form{display:flex;align-items:flex-start;gap:7px}.prompt{flex:none;color:#6cff8f}.prompt span{color:#35f2ff}.terminal-form input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:var(--term-soft);caret-color:#fff;padding:0}.window-content{flex:1;min-height:0;overflow:auto;background:#f5f5f5;padding:18px;border:2px inset #fff;user-select:text}.window-content h1{margin:0 0 14px;color:#071a84;font-size:18px}.window-content p{max-width:72ch;line-height:1.7}.window-content .lead{font-weight:700;color:#0c6974}.window-content a{color:#071a84}.command-guide>p{font-size:12px}.command-category{margin:18px 0;border:2px solid #aaa;background:#fff}.command-category h2{margin:0;padding:8px 10px;background:#071a84;color:#fff;font-size:12px}.command-table{width:100%;border-collapse:collapse;font-size:11px}.command-table th,.command-table td{padding:8px;border:1px solid #bbb;text-align:left;vertical-align:top}.command-table th{background:#ddd}.command-table code{color:#8b0057;font-family:inherit}.project-files{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.project-files a{display:flex;align-items:center;gap:12px;padding:12px;border:2px outset #fff;background:#ddd;text-decoration:none;color:#111}.project-files a:hover{background:#071a84;color:#fff}.project-files b{display:grid;place-items:center;width:42px;height:42px;background:#ffcf4a;border:2px outset #fff}.start-menu{position:absolute;z-index:9999;left:4px;bottom:4px;width:min(360px,94vw);display:none;grid-template-columns:58px 1fr;background:var(--silver);border:3px outset #fff;box-shadow:8px -8px 0 rgba(0,0,0,.35)}.start-menu.is-open{display:grid}.start-brand{background:#071a84;color:#fff;writing-mode:vertical-rl;transform:rotate(180deg);padding:12px 14px;letter-spacing:.13em}.start-brand b{font-size:26px}.start-items{padding:4px}.start-items button,.start-items a{width:100%;display:flex;align-items:center;gap:9px;border:0;background:transparent;color:#111;text-decoration:none;padding:9px;text-align:left;cursor:pointer}.start-items button:hover,.start-items a:hover{background:#071a84;color:#fff}.start-items span{display:grid;place-items:center;width:29px;height:29px;border:2px outset #fff;background:#ddd;color:#111}.start-items hr{border:0;border-top:2px groove #fff}.taskbar{display:flex;align-items:center;gap:5px;padding:4px;background:var(--silver);border-top:2px outset #fff;z-index:10000}.start-button{height:33px;display:flex;align-items:center;gap:6px;border:3px outset #fff;background:var(--silver);padding:2px 9px;cursor:pointer}.start-button[aria-expanded=true]{border-style:inset}.start-logo{display:grid;place-items:center;width:22px;height:22px;background:#071a84;color:#fff;font-size:10px}.task-buttons{min-width:0;flex:1;display:flex;gap:4px;overflow:auto}.task-buttons button{min-width:130px;max-width:220px;height:31px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:2px outset #fff;background:#ccc;text-align:left;font-size:9px}.task-buttons button.is-active{border-style:inset;background:#ddd}.tray{height:33px;display:flex;align-items:center;gap:7px;padding:4px 8px;border:2px inset #fff;font-size:10px}.tray button{border:0;background:transparent}.online-led{width:7px;height:7px;border-radius:50%;background:#2dbe55;box-shadow:0 0 5px #2dbe55}.crt-lines{position:fixed;z-index:2147483401;inset:62px 0 0;pointer-events:none;background:repeating-linear-gradient(transparent 0 3px,rgba(0,0,0,.12) 3px 4px);mix-blend-mode:multiply;opacity:.45}.terminal-window.theme-amber{--term:#ffcf4a;--term-soft:#fff0bd;--term-accent:#ff8a3d}.terminal-window.theme-cyan{--term:#35f2ff;--term-soft:#d6fbff;--term-accent:#ff4fd8}.terminal-window.theme-violet{--term:#b8a4ff;--term-soft:#eee9ff;--term-accent:#c8ff4d}.terminal-window.font-small{--font-size:12px}.terminal-window.font-large{--font-size:18px}
@media(max-width:700px){.retro-os{inset:62px 0 0}.desktop-icon{width:76px;min-height:84px}.desktop-icon:nth-of-type(2){top:96px}.desktop-icon:nth-of-type(3){top:190px}.desktop-icon:nth-of-type(4){top:284px}.os-window{left:5px!important;top:5px!important;width:calc(100% - 10px)!important;height:calc(100% - 10px)!important;min-width:0;min-height:0}.resize-handle{display:none}.project-files{grid-template-columns:1fr}.window-title{font-size:9px}.terminal-screen{padding:10px;font-size:13px}.task-buttons{display:none}.desktop-brand{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.crt-lines{display:none}}


/* V16 exact-laptop + mobile terminal patch
   Desktop remains visually unchanged. Mobile keeps the same Retro OS identity
   while making the terminal usable without horizontal scrolling. */
@media(max-width:900px){
  html,body{width:100%;max-width:100%;overflow:hidden;touch-action:manipulation}
  .retro-os{inset:62px 0 0;grid-template-rows:minmax(0,1fr) 44px;min-height:calc(100svh - 62px)}
  @supports(height:100dvh){.retro-os{min-height:calc(100dvh - 62px)}}
  .desktop{overflow:hidden;background-size:24px 24px,24px 24px,auto,auto}
  .desktop-icon{width:64px;min-height:72px;margin:9px 0 0 8px;z-index:8}
  .desktop-icon:nth-of-type(2){top:82px}.desktop-icon:nth-of-type(3){top:164px}.desktop-icon:nth-of-type(4){top:246px}
  .desktop-icon b{font-size:8px;line-height:1.25;text-shadow:2px 2px #111}.pixel-icon{width:40px;height:36px;font-size:12px;border-width:2px}
  .os-window{left:76px!important;top:10px!important;width:calc(100% - 86px)!important;height:calc(100% - 20px)!important;min-width:0;min-height:0;max-width:none;max-height:none;box-shadow:6px 7px 0 rgba(0,0,0,.36);padding:3px}
  .terminal-window{z-index:40}.window-bar{height:28px;flex-basis:28px}.window-title{font-size:9px}.window-title i{width:20px;height:18px}.window-buttons button{width:24px;height:22px}
  .terminal-screen{padding:12px 12px 74px;font-size:clamp(12px,3.4vw,15px);line-height:1.55;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .terminal-output{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.terminal-output pre{white-space:pre-wrap;overflow-wrap:anywhere}.terminal-form{min-width:0}.terminal-form input{font-size:16px;min-height:26px}
  .window-content{padding:14px;font-size:12px;line-height:1.55}.project-files{grid-template-columns:1fr}.command-table{font-size:10px}.command-table th,.command-table td{padding:7px}
  .desktop-brand{right:4vw;bottom:8vh;max-width:74vw;opacity:.78}.desktop-brand b{font-size:clamp(3.4rem,22vw,8rem)}.desktop-brand span{font-size:clamp(.8rem,4vw,1.5rem)}
  .start-menu{left:4px;bottom:4px;width:min(360px,calc(100vw - 8px));max-height:calc(100svh - 96px);overflow:auto;-webkit-overflow-scrolling:touch}.taskbar{height:44px;min-height:44px;padding:4px;gap:4px}.start-button{height:34px;min-width:76px}.task-buttons{display:none}.tray{height:34px;margin-left:auto}.crt-lines{inset:62px 0 0}.resize-handle{display:none}
}
@media(max-width:560px){
  .retro-os{inset:62px 0 0;grid-template-rows:minmax(0,1fr) 46px}
  .desktop-icon{left:auto!important;top:auto!important;position:relative!important;display:inline-flex;margin:8px 4px 0 8px;width:54px;min-height:64px;vertical-align:top}
  .desktop-icon b{font-size:7px}.pixel-icon{width:34px;height:31px;font-size:11px}
  .os-window{left:6px!important;top:82px!important;width:calc(100% - 12px)!important;height:calc(100% - 92px)!important;box-shadow:5px 6px 0 rgba(0,0,0,.36)}
  .window-title{font-size:8px}.window-buttons button{width:22px;height:20px}.terminal-screen{font-size:clamp(11px,3.2vw,13px);padding:10px 10px 74px}.desktop-brand{display:block;right:3vw;bottom:56px;opacity:.28}.desktop-brand b{font-size:22vw}.desktop-brand span{font-size:4vw}.start-menu{bottom:48px}
}
@media(max-width:390px){
  .os-window{top:76px!important;height:calc(100% - 86px)!important}.desktop-icon{width:50px;min-height:58px;margin-left:5px}.terminal-screen{font-size:11px;line-height:1.5}.window-title{max-width:calc(100vw - 128px)}.tray{font-size:8px;padding-inline:5px}.start-button{min-width:66px;padding-inline:5px}.start-logo{width:19px;height:19px}.desktop-brand{display:none}
}
@media(orientation:landscape) and (max-height:520px) and (max-width:900px){
  .desktop-icon{display:none}.os-window{left:5px!important;top:5px!important;width:calc(100% - 10px)!important;height:calc(100% - 10px)!important}.terminal-screen{padding-bottom:52px}.desktop-brand{display:none}
}


/* V18 no-reload restore patch: closed/minimized windows remain recoverable from the taskbar. */
.os-window.is-minimized,.os-window.is-closed{display:none!important}
.task-buttons{scrollbar-color:#071a84 #c7c7c7;scrollbar-width:thin}
.task-buttons button{position:relative;padding-left:8px;flex:0 0 auto;cursor:pointer}
.task-buttons button[data-state="closed"]{background:#bfc6cf;color:#16202a;border-style:outset;opacity:.92}
.task-buttons button[data-state="minimized"]{background:#e5e5e5;color:#111;border-style:outset}
.task-buttons button[data-state="open"].is-active{background:#fff;color:#071a84;box-shadow:inset 0 0 0 1px #071a84}
.task-buttons button:hover,.task-buttons button:focus-visible{background:#071a84;color:#fff;outline:2px solid #ffcf4a;outline-offset:1px}
@media(max-width:900px){.task-buttons{display:flex!important;overflow-x:auto;max-width:calc(100vw - 150px);padding-bottom:1px}.task-buttons button{min-width:118px;max-width:168px;font-size:8px}}
@media(max-width:560px){.task-buttons{max-width:calc(100vw - 138px)}.task-buttons button{min-width:96px;max-width:132px;height:30px;font-size:7px}.tray{display:none}}
@media(orientation:landscape) and (max-height:520px) and (max-width:900px){.task-buttons{display:flex!important;max-width:calc(100vw - 150px)}}


/* V30 — Retro page focuses on one terminal while retaining Home and Retro menus. */
.retro-focus-mode .desktop-icon{position:absolute!important;left:10px!important;top:8px!important;margin:0!important}
.retro-focus-mode .desktop-brand{opacity:.12;pointer-events:none}
.retro-focus-mode .terminal-window{box-shadow:12px 14px 0 rgba(0,0,0,.38)}
.retro-focus-mode .start-items{display:flex;flex-direction:column;justify-content:center;min-height:116px}
.retro-focus-mode .start-items a,.retro-focus-mode .start-items button{min-height:48px;font-size:11px}
@media(max-width:700px){.retro-focus-mode .desktop-icon{display:none!important}.retro-focus-mode .terminal-window{box-shadow:none}}


/* V31 — Restore My Projects, Command Guide, and About Roberto launchers
   while keeping the terminal as the primary workspace. */
.retro-focus-mode .desktop-icon{position:absolute!important;left:8px!important;margin:0!important;display:flex!important;z-index:55}
.retro-focus-mode .desktop-icon:nth-of-type(1){top:8px!important}
.retro-focus-mode .desktop-icon:nth-of-type(2){top:104px!important}
.retro-focus-mode .desktop-icon:nth-of-type(3){top:200px!important}
.retro-focus-mode .desktop-icon:nth-of-type(4){top:296px!important}
.retro-focus-mode .terminal-window{left:112px!important;top:14px!important;width:calc(100% - 132px)!important;height:calc(100% - 28px)!important;box-shadow:12px 14px 0 rgba(0,0,0,.38)}
.retro-focus-mode #projectsWindow,.retro-focus-mode #commandsWindow,.retro-focus-mode #aboutWindow{z-index:70}
.retro-focus-mode .window-content{scrollbar-width:thin;scrollbar-color:#35f2ff #d8d8d8}
.retro-focus-mode .window-content::-webkit-scrollbar{width:12px;height:12px}
.retro-focus-mode .window-content::-webkit-scrollbar-track{background:#d8d8d8;border-left:2px solid #071a84}
.retro-focus-mode .window-content::-webkit-scrollbar-thumb{background:linear-gradient(#c8ff4d,#35f2ff);border:2px solid #071a84;box-shadow:inset 0 0 0 1px #fff}
.retro-focus-mode .window-content::-webkit-scrollbar-thumb:hover{background:linear-gradient(#ff4fd8,#35f2ff)}
.retro-focus-mode .project-files a:focus-visible{outline:3px solid #ff4fd8;outline-offset:2px}
@media(max-width:900px) and (min-width:561px){
  .retro-focus-mode .desktop-icon{width:64px;min-height:72px;left:6px!important}
  .retro-focus-mode .desktop-icon:nth-of-type(1){top:8px!important}.retro-focus-mode .desktop-icon:nth-of-type(2){top:84px!important}.retro-focus-mode .desktop-icon:nth-of-type(3){top:160px!important}.retro-focus-mode .desktop-icon:nth-of-type(4){top:236px!important}
  .retro-focus-mode .terminal-window{left:76px!important;top:10px!important;width:calc(100% - 86px)!important;height:calc(100% - 20px)!important}
}
@media(max-width:560px){
  .retro-focus-mode .desktop{padding-top:72px}
  .retro-focus-mode .desktop-icon{position:relative!important;left:auto!important;top:auto!important;display:inline-flex!important;width:50px;min-height:60px;margin:6px 2px 0 5px!important;vertical-align:top}
  .retro-focus-mode .desktop-icon b{font-size:7px}.retro-focus-mode .pixel-icon{width:34px;height:31px;font-size:11px}
  .retro-focus-mode .terminal-window,.retro-focus-mode #projectsWindow,.retro-focus-mode #commandsWindow,.retro-focus-mode #aboutWindow{left:6px!important;top:76px!important;width:calc(100% - 12px)!important;height:calc(100% - 86px)!important;box-shadow:5px 6px 0 rgba(0,0,0,.36)}
  .retro-focus-mode .window-content{padding:12px}.retro-focus-mode .project-files{grid-template-columns:1fr}
}
@media(max-width:390px){
  .retro-focus-mode .desktop-icon{width:47px;min-height:57px;margin-left:3px!important}.retro-focus-mode .desktop-icon b{font-size:6.5px}
  .retro-focus-mode .terminal-window,.retro-focus-mode #projectsWindow,.retro-focus-mode #commandsWindow,.retro-focus-mode #aboutWindow{top:72px!important;height:calc(100% - 82px)!important}
}
@media(orientation:landscape) and (max-height:520px) and (max-width:900px){
  .retro-focus-mode .desktop{padding-top:0}.retro-focus-mode .desktop-icon{display:none!important}
  .retro-focus-mode .terminal-window,.retro-focus-mode #projectsWindow,.retro-focus-mode #commandsWindow,.retro-focus-mode #aboutWindow{left:5px!important;top:5px!important;width:calc(100% - 10px)!important;height:calc(100% - 10px)!important}
}


/* Standalone Terminal Studio integration */
html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#0c6974}
.retro-os{inset:0!important;min-height:100svh!important}
.crt-lines{inset:0!important}
@supports(height:100dvh){.retro-os{min-height:100dvh!important}}
@media(max-width:560px){
  .retro-focus-mode .desktop{padding-top:70px}
  .retro-focus-mode .terminal-window,.retro-focus-mode #projectsWindow,.retro-focus-mode #commandsWindow,.retro-focus-mode #aboutWindow{top:72px!important;height:calc(100% - 82px)!important}
}

/* V14 embedded/mobile Retro Terminal layout repair */
html.is-embedded, html.is-embedded body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
html.is-embedded .retro-os { position: absolute; inset: 0 !important; width: 100%; height: 100%; min-height: 0 !important; }
html.is-embedded .crt-lines { inset: 0 !important; }

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html.is-embedded .retro-os { grid-template-rows: minmax(0, 1fr) 40px !important; }
  html.is-embedded .retro-focus-mode .desktop {
    padding: 66px 0 0 !important;
    overflow: hidden !important;
  }
  html.is-embedded .retro-focus-mode .desktop-brand { display: none !important; }

  /* Four launchers form a clear top dock and never sit above open windows. */
  html.is-embedded .retro-focus-mode .desktop-icon {
    position: absolute !important;
    top: 4px !important;
    width: 52px !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 2px !important;
    gap: 2px !important;
    z-index: 8 !important;
    border-radius: 3px !important;
  }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(1) { left: 6px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(2) { left: 62px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(3) { left: 118px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(4) { left: 174px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon b { font-size: 7px !important; line-height: 1.12 !important; }
  html.is-embedded .retro-focus-mode .pixel-icon { width: 34px !important; height: 30px !important; font-size: 10px !important; border-width: 2px !important; box-shadow: 2px 2px 0 rgba(0,0,0,.3) !important; }

  html.is-embedded .retro-focus-mode .os-window,
  html.is-embedded .retro-focus-mode #projectsWindow,
  html.is-embedded .retro-focus-mode #commandsWindow,
  html.is-embedded .retro-focus-mode #aboutWindow {
    left: 4px !important;
    top: 66px !important;
    width: calc(100% - 8px) !important;
    height: calc(100% - 70px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    padding: 3px !important;
    box-shadow: none !important;
    z-index: 100 !important;
  }
  html.is-embedded .retro-focus-mode .os-window.is-active { z-index: 160 !important; }
  html.is-embedded .window-bar { height: 38px !important; flex: 0 0 38px !important; padding: 2px 3px 2px 6px !important; }
  html.is-embedded .window-title { min-width: 0 !important; max-width: calc(100% - 124px) !important; font-size: 8px !important; }
  html.is-embedded .window-title i { width: 24px !important; height: 24px !important; margin-right: 4px !important; }
  html.is-embedded .window-buttons { gap: 2px !important; }
  html.is-embedded .window-buttons button { width: 38px !important; height: 34px !important; font-size: 17px !important; touch-action: manipulation !important; }
  html.is-embedded .terminal-screen { padding: 10px 10px 18px !important; font-size: clamp(11px, 2.9vw, 14px) !important; line-height: 1.5 !important; }
  html.is-embedded .window-content { padding: 12px !important; font-size: 12px !important; line-height: 1.5 !important; overflow: auto !important; }
  html.is-embedded .window-content h1 { font-size: 17px !important; margin-bottom: 10px !important; }
  html.is-embedded .project-files { grid-template-columns: 1fr !important; gap: 8px !important; }
  html.is-embedded .project-files a { min-height: 60px !important; padding: 8px !important; }
  html.is-embedded .command-table { min-width: 520px; }
  html.is-embedded .command-guide { overflow-x: auto !important; }

  /* Inner retro taskbar remains useful but no longer duplicates the Windows tray. */
  html.is-embedded .taskbar { height: 40px !important; min-height: 40px !important; padding: 3px !important; gap: 3px !important; }
  html.is-embedded .start-button { height: 34px !important; min-width: 72px !important; padding: 2px 6px !important; }
  html.is-embedded .task-buttons { display: flex !important; flex: 1 1 auto !important; max-width: none !important; min-width: 0 !important; overflow-x: auto !important; overflow-y: hidden !important; }
  html.is-embedded .task-buttons button { min-width: 104px !important; max-width: 150px !important; height: 32px !important; font-size: 7px !important; }
  html.is-embedded .tray { display: none !important; }
  html.is-embedded .start-menu { bottom: 42px !important; max-height: calc(100% - 46px) !important; overflow: auto !important; }
}

@media (max-width: 420px) {
  html.is-embedded .retro-focus-mode .desktop { padding-top: 60px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon { width: 48px !important; min-height: 54px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(1) { left: 4px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(2) { left: 54px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(3) { left: 104px !important; }
  html.is-embedded .retro-focus-mode .desktop-icon:nth-of-type(4) { left: 154px !important; }
  html.is-embedded .retro-focus-mode .os-window,
  html.is-embedded .retro-focus-mode #projectsWindow,
  html.is-embedded .retro-focus-mode #commandsWindow,
  html.is-embedded .retro-focus-mode #aboutWindow { top: 60px !important; height: calc(100% - 64px) !important; }
  html.is-embedded .window-buttons button { width: 36px !important; }
  html.is-embedded .window-title { max-width: calc(100% - 116px) !important; font-size: 7px !important; }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 950px) {
  html.is-embedded .retro-focus-mode .desktop { padding-top: 0 !important; }
  html.is-embedded .retro-focus-mode .desktop-icon { display: none !important; }
  html.is-embedded .retro-focus-mode .os-window,
  html.is-embedded .retro-focus-mode #projectsWindow,
  html.is-embedded .retro-focus-mode #commandsWindow,
  html.is-embedded .retro-focus-mode #aboutWindow { left: 3px !important; top: 3px !important; width: calc(100% - 6px) !important; height: calc(100% - 6px) !important; }
}


/* V15 — four-app mobile dock + terminal-size parity inside Win11React */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html.is-embedded.is-mobile-pane .retro-os {
    grid-template-rows: minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop {
    position: relative !important;
    display: block !important;
    padding: 58px 0 0 !important;
    overflow: hidden !important;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop::before {
    content: "";
    position: absolute;
    z-index: 7;
    inset: 56px 0 auto;
    height: 2px;
    background: linear-gradient(90deg, #35f2ff, #c8ff4d 50%, #ff4fd8);
    box-shadow: 0 1px 0 rgba(0,0,0,.55);
    pointer-events: none;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon {
    position: absolute !important;
    top: 2px !important;
    width: calc(25% - 5px) !important;
    min-width: 0 !important;
    min-height: 53px !important;
    height: 53px !important;
    margin: 0 !important;
    padding: 2px 1px !important;
    gap: 1px !important;
    display: flex !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    z-index: 20 !important;
    border-radius: 3px !important;
    background: rgba(3,41,76,.22) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon[data-open="terminalWindow"] { left: 3px !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon[data-open="projectsWindow"] { left: calc(25% + 1px) !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon[data-open="commandsWindow"] { left: calc(50% + 1px) !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon[data-open="aboutWindow"] { left: calc(75% + 1px) !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon.is-selected,
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon:focus-visible {
    border-color: #c8ff4d !important;
    background: rgba(7,26,132,.78) !important;
    box-shadow: inset 0 -3px 0 #ff4fd8 !important;
    outline: none !important;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon b {
    width: 100% !important;
    font-size: clamp(6px, 1.9vw, 8px) !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .pixel-icon {
    width: 30px !important;
    height: 27px !important;
    min-height: 27px !important;
    font-size: 9px !important;
    border-width: 2px !important;
    box-shadow: 1px 1px 0 rgba(0,0,0,.38) !important;
  }

  /* The outer Win11React title bar is already present. Flatten the inner retro
     window so the command area is the same usable size as the other terminals. */
  html.is-embedded.is-mobile-pane .retro-focus-mode .os-window,
  html.is-embedded.is-mobile-pane .retro-focus-mode #terminalWindow,
  html.is-embedded.is-mobile-pane .retro-focus-mode #projectsWindow,
  html.is-embedded.is-mobile-pane .retro-focus-mode #commandsWindow,
  html.is-embedded.is-mobile-pane .retro-focus-mode #aboutWindow {
    left: 0 !important;
    top: 58px !important;
    width: 100% !important;
    height: calc(100% - 58px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #020a06 !important;
    z-index: 100 !important;
  }
  html.is-embedded.is-mobile-pane .retro-focus-mode .os-window.is-active { z-index: 180 !important; }
  html.is-embedded.is-mobile-pane .window-bar,
  html.is-embedded.is-mobile-pane .resize-handle { display: none !important; }
  html.is-embedded.is-mobile-pane .terminal-screen {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 12px 10px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    border: 0 !important;
    font-size: clamp(11px, 3vw, 14px) !important;
    line-height: 1.45 !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }
  html.is-embedded.is-mobile-pane .window-content {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 14px 12px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    border: 0 !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }
  html.is-embedded.is-mobile-pane .window-content h1 { font-size: clamp(18px, 5vw, 24px) !important; }
  html.is-embedded.is-mobile-pane .project-files { grid-template-columns: 1fr !important; gap: 8px !important; }
  html.is-embedded.is-mobile-pane .project-files a { min-height: 56px !important; padding: 8px 10px !important; }
  html.is-embedded.is-mobile-pane .command-guide { overflow-x: auto !important; }
  html.is-embedded.is-mobile-pane .command-table { min-width: 500px !important; }
  html.is-embedded.is-mobile-pane .taskbar,
  html.is-embedded.is-mobile-pane .start-menu { display: none !important; }
  html.is-embedded.is-mobile-pane .crt-lines { inset: 58px 0 0 !important; z-index: 190 !important; opacity: .28 !important; }
}

@media (max-width: 360px) {
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop { padding-top: 54px !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop::before { top: 52px !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .desktop-icon { height: 49px !important; min-height: 49px !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .pixel-icon { width: 27px !important; height: 24px !important; min-height: 24px !important; }
  html.is-embedded.is-mobile-pane .retro-focus-mode .os-window,
  html.is-embedded.is-mobile-pane .retro-focus-mode #terminalWindow,
  html.is-embedded.is-mobile-pane .retro-focus-mode #projectsWindow,
  html.is-embedded.is-mobile-pane .retro-focus-mode #commandsWindow,
  html.is-embedded.is-mobile-pane .retro-focus-mode #aboutWindow { top: 54px !important; height: calc(100% - 54px) !important; }
  html.is-embedded.is-mobile-pane .crt-lines { inset: 54px 0 0 !important; }
}
