/* AetherOS — Module Layouts, Companion Sidebar, Radio Deck, Finder & Menus */
/* ===== AETHEROS PREMIUM CINEMATIC UPGRADE ===== */
#aether-particles{
 position:fixed;
 inset:0;
 pointer-events:none;
 z-index:2;
 opacity:.38;
 mix-blend-mode:screen;
}
.os-window{
 transition:
 box-shadow .25s ease,
 border-color .25s ease;
}
.os-window:hover{
 box-shadow:
 0 0 0 1px rgba(255,255,255,.09),
 0 4px 8px rgba(0,0,0,.35),
 0 24px 64px rgba(0,0,0,.60),
 0 40px 90px rgba(0,0,0,.38);
}
.tactical-glow{
 position:absolute;
 inset:0;
 background:
 radial-gradient(circle at top left,
 rgba(255,255,255,.05),
 transparent 35%);
 pointer-events:none;
}
#global-signal-overlay{
 position:fixed;
 inset:0;
 pointer-events:none;
 z-index:3;
 opacity:.025;
 background-image:
 linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px);
 background-size:100% 3px;
 animation:signalDrift 16s linear infinite;
}
@keyframes signalDrift{
 from{transform:translateY(0)}
 to{transform:translateY(120px)}
}
.reactive-dock .dock-item.active{
 box-shadow:
 0 0 0 1px rgba(255,255,255,.09),
 0 4px 12px rgba(0,0,0,.5),
 inset 0 1px 0 rgba(255,255,255,.12);
}


/* ===== LIVE API MODULES ===== */
.api-panel{
 position:fixed;
 top:80px;
 right:40px;
 width:420px;
 height:520px;
 z-index:999;
 overflow:auto;
 border-radius:16px;
 background:rgba(5,5,8,.88);
 border:1px solid rgba(255,255,255,.08);
 backdrop-filter:blur(18px);
 box-shadow:0 20px 60px rgba(0,0,0,.65);
 color:white;
}
.api-header{
 padding:14px;
 border-bottom:1px solid rgba(255,255,255,.08);
 font-family:monospace;
 text-transform:uppercase;
 letter-spacing:2px;
 display:flex;
 justify-content:space-between;
 align-items:center;
}
.api-content{
 padding:14px;
}
.api-close{
 cursor:pointer;
 opacity:.6;
}
.api-close:hover{
 opacity:1;
}
.api-card{
 background:rgba(255,255,255,.04);
 border:1px solid rgba(255,255,255,.06);
 border-radius:12px;
 padding:12px;
 margin-bottom:12px;
}
.api-card img{
 width:100%;
 border-radius:10px;
 margin-top:10px;
}



        /* ===== Aether Chat Sidebar Block ===== */
        .aether-chat-shell {
            background: radial-gradient(circle at 15% 0%, rgba(34,197,94,.10), transparent 40%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.30));
            border: 1px solid rgba(255,255,255,.08);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 30px rgba(0,0,0,.32);
        }
        .aether-chat-log {
            height: 14rem !important;
            background: rgba(0,0,0,.24);
            background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
            background-size: 100% 4px;
        }
        #companion-chat-block { flex: 0 0 auto; }
        @media (max-height: 840px) {
            #companion-chat-block .aether-chat-log { height: 6.25rem !important; }
            #companion-chat-block .aether-chat-chip:nth-child(n+5) { display: none; }
            #companion-chat-block .px-3.py-2 { padding-top: .35rem !important; padding-bottom: .35rem !important; }
        }
        .aether-chat-chip {
            border: 1px solid rgba(255,255,255,.10);
            background: rgba(255,255,255,.05);
            color: rgba(255,255,255,.65);
            border-radius: 999px;
            padding: 4px 10px;
            font-size: 10px;
            transition: all .14s ease;
            cursor: none;
        }
        .aether-chat-chip:hover { color:#fff; background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.18); }
        #right-utility-panel { scrollbar-width:none; }
        #right-utility-panel::-webkit-scrollbar { display:none; }
        #right-utility-panel > .bg-os-900\/50 { padding:.65rem !important; }
        #right-utility-panel > .text-\[10px\] { margin-bottom:.15rem !important; }
        #right-utility-panel #companion-chat-block { position:sticky; bottom:0; z-index:5; }
        .aether-voice-bars { display:flex; gap:3px; height:20px; align-items:end; }
        .aether-voice-bars span { width:3px; height:3px; border-radius:2px; background:rgba(34,197,94,.35); box-shadow:0 0 0 rgba(34,197,94,0); transform-origin:bottom; transition:height .075s linear, opacity .075s linear, background .12s ease; opacity:.45; }
        .aether-voice-bars.active span { background:rgba(74,222,128,.95); box-shadow:0 0 8px rgba(34,197,94,.35); opacity:1; }
        .aether-voice-bars.thinking span { background:rgba(250,204,21,.82); box-shadow:0 0 8px rgba(250,204,21,.22); }
        .aether-chat-media { margin-top:4px; border:1px solid rgba(255,255,255,.10); border-radius:10px; overflow:hidden; background:rgba(0,0,0,.35); }
        .aether-chat-media img { width:100%; max-height:118px; object-fit:cover; display:block; }
        .aether-chat-media .cap { padding:4px 6px; font:8px JetBrains Mono, monospace; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:.08em; }
        .aether-chat-pill { display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.05); color:rgba(255,255,255,.72); line-height:1.2; font-size:10px; }
        #companion-chat-block { flex:0 1 auto; display:flex; flex-direction:column; max-height:520px; min-height:340px; }
        #aether-chat-status-wrap { display:flex; flex-direction:column; gap:5px; padding:6px 8px; }
        #aether-ai-meta-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:4px; }
        .aether-chat-stat { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 8px; border-radius:8px; border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:rgba(255,255,255,.65); min-width:0; font-size:10px; }
        .aether-chat-stat span:first-child { color:rgba(255,255,255,.45); }
        .aether-chat-stat span:last-child { color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .aether-chat-progress { position:relative; height:6px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); }
        #aether-ai-progress-bar { width:2%; height:100%; border-radius:999px; background:linear-gradient(90deg, rgba(34,197,94,.58), rgba(59,130,246,.92)); box-shadow:0 0 10px rgba(59,130,246,.35); transition:width .16s ease, opacity .16s ease; }
        .aether-chat-inline-status { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:8px; border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.04); color:rgba(255,255,255,.72); white-space:nowrap; font-size:10px; }
        .aether-chat-inline-status.active { color:#fff; border-color:rgba(74,222,128,.35); box-shadow:0 0 12px rgba(34,197,94,.12); }
        .aether-chat-icon-btn { width:34px; height:34px; display:flex; align-items:center; justify-content:center; border-radius:10px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.06); color:rgba(255,255,255,.80); transition:all .14s ease; }
        .aether-chat-icon-btn:hover { color:#fff; background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.22); }
        .aether-chat-icon-btn.active { color:#fff; background:rgba(34,197,94,.16); border-color:rgba(34,197,94,.38); box-shadow:0 0 12px rgba(34,197,94,.12); }
        .aether-chat-stream-text { white-space:pre-wrap; }
        .aether-chat-caret { display:inline-block; margin-left:1px; color:var(--os-accent-custom); animation:aetherChatBlink 1s steps(1) infinite; }
        @keyframes aetherChatBlink { 50% { opacity:0; } }
        .aether-mic-meter { display:flex; align-items:end; gap:3px; height:16px; flex-shrink:0; }
        .aether-mic-meter span { width:4px; height:4px; border-radius:999px; background:rgba(255,255,255,.22); opacity:.38; transition:height .08s ease, opacity .08s ease, background .08s ease; }
        .aether-mic-meter span.active { height:14px; opacity:1; background:rgba(74,222,128,.92); box-shadow:0 0 8px rgba(34,197,94,.26); }
        #companion-chat-log { flex:1 1 auto; min-height:8rem; height:auto !important; }
        #companion-chat-block.compact-ui { max-height:420px; min-height:280px; }
        #companion-chat-block.compact-ui #aether-ai-meta-grid { display:none; }
        #companion-chat-block.compact-ui #aether-chat-chip-row { display:flex; }
        #companion-chat-block.compact-ui #aether-chat-status-wrap { gap:4px; padding:6px 8px; border-bottom:none; }
        #companion-chat-block.compact-ui #companion-chat-log { min-height:7rem; }
        #companion-chat-block.compact-ui #aether-ai-status-text { -webkit-line-clamp:1; line-clamp:1; display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; }
        #companion-chat-block.compact-ui .aether-chat-pill { padding:2px 5px; font-size:8px; }
        #companion-chat-block.compact-ui #aether-ai-mic-meter { display:none; }
        #companion-chat-block.compact-ui #aether-chat-status-wrap > .flex.flex-wrap { display:none; }
        #companion-chat-block.compact-ui .aether-chat-progress { display:none; }
        #companion-chat-block.compact-ui .aether-chat-inline-status { padding:3px 6px; font-size:8px; }
        #companion-chat-block.compact-ui #companion-chat-input { font-size:12px; padding-top:8px; padding-bottom:8px; }
        #companion-chat-block.compact-ui .aether-chat-icon-btn { width:32px; height:32px; }
        #companion-chat-block.compact-ui .aether-chat-select-wrap { display:none; }
        @media (max-height: 920px) {
            #companion-chat-block { max-height:420px; }
        }
        @media (max-height: 840px) {
            #aether-ai-meta-grid .aether-chat-stat:nth-child(n+3) { display:none; }
            #aether-ai-status-text { max-width: 16rem; }
            #aether-ai-mic-meter { display:none; }
            #companion-chat-block { max-height:320px; min-height:240px; }
        }


        /* ===== Global Radio Browser v3 Split Deck ===== */
        .rb-deck-shell { background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.08), transparent 42%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.32)); }
        .rb-gif-stage { position:relative; overflow:hidden; border-radius:18px; background:#050505; border:1px solid rgba(255,255,255,.10); min-height:190px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 20px 50px rgba(0,0,0,.36); }
        .rb-gif-stage #rb-gif-bg { position:absolute; inset:0; z-index:0; background-size:cover; background-position:center; opacity:.72; filter:saturate(1.25) contrast(1.08); transform:scale(1.01); mix-blend-mode:normal; }
        .rb-gif-stage #rb-gif-bg::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.55)), linear-gradient(transparent 50%, rgba(0,0,0,.20) 50%); background-size:auto,100% 4px; }
        .rb-vinyl { position:relative; width:154px; height:154px; border-radius:999px; background:repeating-radial-gradient(circle, #0a0a0b 0 5px, #151519 6px 8px, #070708 9px 13px), radial-gradient(circle at 38% 28%, rgba(255,255,255,.18), transparent 22%); border:1px solid rgba(255,255,255,.14); box-shadow:0 26px 55px rgba(0,0,0,.55), inset 0 0 0 10px rgba(255,255,255,.015); }
        .rb-vinyl.playing { animation: rbVinylSpin 3.4s linear infinite; }
        .rb-vinyl::before { content:''; position:absolute; inset:16px; border-radius:999px; border:1px solid rgba(255,255,255,.055); box-shadow: inset 0 0 0 18px rgba(0,0,0,.16); }
        .rb-vinyl-label { position:absolute; inset:49px; border-radius:999px; background:radial-gradient(circle, rgba(255,255,255,.18), rgba(34,197,94,.14), rgba(0,0,0,.65)); border:1px solid rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; overflow:hidden; }
        @keyframes rbVinylSpin { to { transform: rotate(360deg); } }
        .rb-tonearm { position:absolute; width:88px; height:7px; border-radius:999px; background:linear-gradient(90deg, rgba(255,255,255,.62), rgba(255,255,255,.16)); right:-24px; top:22px; transform:rotate(32deg); transform-origin:86px 50%; box-shadow:0 0 12px rgba(255,255,255,.08); }
        .rb-tonearm::after { content:''; position:absolute; left:-7px; top:-4px; width:14px; height:14px; border-radius:3px; background:rgba(255,255,255,.35); transform:rotate(20deg); }
        #rb-visualizer-canvas { width:100%; height:74px; display:block; background:rgba(0,0,0,.32); border-radius:12px; border:1px solid rgba(255,255,255,.08); }
        .rb-tab-btn.active { color:#fff; border-color:rgba(255,255,255,.75); background:rgba(255,255,255,.08); }
        .rb-turntable { position:relative; width:196px; height:178px; border-radius:22px; overflow:hidden; background:radial-gradient(circle at 38% 45%, rgba(255,255,255,.045), transparent 50%), linear-gradient(145deg, rgba(255,255,255,.055), rgba(0,0,0,.40)); border:1px solid rgba(255,255,255,.08); box-shadow:inset 0 1px 0 rgba(255,255,255,.05), 0 18px 45px rgba(0,0,0,.42); }
        .rb-turntable .rb-vinyl { position:absolute; left:10px; top:12px; }
        .rb-vinyl { width:156px; height:156px; background:repeating-radial-gradient(circle, #050506 0 3px, #111115 4px 5px, #070708 6px 9px), radial-gradient(circle at 32% 24%, rgba(255,255,255,.20), transparent 18%), conic-gradient(from 25deg, rgba(255,255,255,.10), transparent 15%, rgba(255,255,255,.04) 21%, transparent 42%, rgba(255,255,255,.08) 54%, transparent 69%, rgba(255,255,255,.10)); }
        .rb-vinyl::after { content:''; position:absolute; inset:4px; border-radius:999px; background:linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.10) 48%, transparent 54%); pointer-events:none; }
        .rb-vinyl-label { inset:47px; z-index:2; box-shadow:inset 0 0 18px rgba(255,255,255,.05); }
        .rb-vinyl-label img { width:100%; height:100%; object-fit:cover; }
        .rb-spindle { position:absolute; left:83px; top:85px; width:8px; height:8px; border-radius:999px; background:#fff; box-shadow:0 0 10px rgba(255,255,255,.75); z-index:4; }
        .rb-tonearm-base { position:absolute; right:13px; top:15px; width:34px; height:34px; border-radius:999px; background:radial-gradient(circle, rgba(255,255,255,.42), rgba(255,255,255,.10) 45%, rgba(0,0,0,.58)); border:1px solid rgba(255,255,255,.18); box-shadow:0 0 18px rgba(255,255,255,.08); z-index:7; }
        .rb-tonearm { position:absolute; width:112px; height:7px; border-radius:999px; background:linear-gradient(90deg, rgba(255,255,255,.78), rgba(255,255,255,.34) 70%, rgba(255,255,255,.12)); right:26px; top:30px; transform:rotate(-36deg); transform-origin:100px 50%; z-index:6; box-shadow:0 0 12px rgba(255,255,255,.10); transition:transform .45s cubic-bezier(.2,.8,.2,1); }
        .rb-tonearm.playing { transform:rotate(-28deg); }
        .rb-tonearm::before { content:''; position:absolute; right:-11px; top:-8px; width:24px; height:24px; border-radius:999px; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.14); }
        .rb-tonearm::after { content:''; position:absolute; left:-9px; top:-2px; width:17px; height:13px; border-radius:2px; background:linear-gradient(135deg, rgba(255,255,255,.68), rgba(255,255,255,.20)); transform:rotate(-18deg); box-shadow:0 3px 10px rgba(0,0,0,.45); }
        .rb-viz-mode-btn { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.04); color:rgba(255,255,255,.45); border-radius:999px; padding:1px 6px; font-size:8px; transition:.14s; }

        .rb-tonearm-base::after { content:''; position:absolute; left:50%; top:50%; width:8px; height:8px; transform:translate(-50%,-50%); border-radius:999px; background:rgba(255,255,255,.78); box-shadow:0 0 8px rgba(255,255,255,.45); }
        .rb-turntable::after { content:'33⅓'; position:absolute; right:13px; bottom:11px; color:rgba(255,255,255,.28); font:8px JetBrains Mono, monospace; letter-spacing:.12em; }
        .rb-viz-mode-btn:hover { color:#fff; background:rgba(255,255,255,.10); }
        .rb-viz-mode-btn.active { color:#fff; background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.32); box-shadow:0 0 16px rgba(255,255,255,.06); }


        /* Global Radio Deck Settings + Correctly Grouped Tonearm */
        .rb-turntable { overflow:hidden; }
        .rb-tonearm, .rb-tonearm-base { display:none !important; }
        .rb-tonearm-assembly { --arm-x:0px; --arm-y:0px; --arm-rot:0deg; position:absolute; inset:0; z-index:8; pointer-events:none; cursor:none; transition: filter .18s ease, opacity .18s ease; transform-origin:160px 34px; transform:translate(var(--arm-x), var(--arm-y)) rotate(var(--arm-rot)); }
        .rb-tonearm-assembly.playing { transform:translate(var(--arm-x), var(--arm-y)) rotate(calc(var(--arm-rot) + 5deg)); }
        .rb-tonearm-assembly.tonearm-edit { pointer-events:auto; cursor:grab; filter:drop-shadow(0 0 10px rgba(34,197,94,.20)); }
        .rb-tonearm-assembly.tonearm-edit.dragging { cursor:grabbing; filter:drop-shadow(0 0 14px rgba(34,197,94,.38)); }
        .rb-tonearm-assembly.tonearm-edit:hover .rb-tonearm-pivot { border-color:rgba(34,197,94,.58); }
        .rb-tonearm-assembly:not(.tonearm-edit) { opacity:.96; }
        .rb-tonearm-pivot { position:absolute; right:13px; top:15px; width:36px; height:36px; border-radius:999px; background:radial-gradient(circle, rgba(255,255,255,.50), rgba(255,255,255,.12) 45%, rgba(0,0,0,.62)); border:1px solid rgba(255,255,255,.20); box-shadow:0 0 18px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.12); }
        .rb-tonearm-pivot::after { content:''; position:absolute; left:50%; top:50%; width:8px; height:8px; transform:translate(-50%,-50%); border-radius:999px; background:#fff; box-shadow:0 0 8px rgba(255,255,255,.6); }
        .rb-tonearm-svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
        .rb-tonearm-svg .arm-shadow { stroke:rgba(0,0,0,.55); stroke-width:9; fill:none; stroke-linecap:round; }
        .rb-tonearm-svg .arm-main { stroke:url(#rbArmGrad); stroke-width:5.5; fill:none; stroke-linecap:round; }
        .rb-tonearm-svg .headshell { fill:rgba(230,230,235,.72); stroke:rgba(255,255,255,.28); stroke-width:.8; }
        .rb-tonearm-svg .stylus { stroke:rgba(255,255,255,.82); stroke-width:1.2; stroke-linecap:round; }
        .rb-settings-pop { position:absolute; right:12px; top:58px; z-index:40; width:238px; border:1px solid rgba(255,255,255,.12); border-radius:14px; background:rgba(5,5,7,.94); backdrop-filter:blur(18px); box-shadow:0 22px 55px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.06); padding:10px; }
        .rb-settings-title { font: 8px JetBrains Mono, monospace; color:var(--os-accent-custom); text-transform:uppercase; letter-spacing:.18em; margin:2px 0 6px; }
        .rb-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
        .rb-setting-btn { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.045); color:rgba(255,255,255,.58); border-radius:8px; padding:6px 7px; font:9px JetBrains Mono, monospace; text-transform:uppercase; cursor:none; transition:.14s; }
        .rb-setting-btn:hover { color:#fff; background:rgba(255,255,255,.10); }
        .rb-setting-btn.active { color:#fff; border-color:rgba(255,255,255,.30); background:rgba(255,255,255,.15); box-shadow:0 0 14px rgba(255,255,255,.055); }
        #rb-settings-menu-portal { position:fixed !important; z-index:10050 !important; width:min(360px, calc(100vw - 18px)) !important; max-height:calc(100vh - 18px) !important; overflow-y:auto !important; overflow-x:hidden !important; overscroll-behavior:contain; }
        #rb-settings-menu-portal .rb-settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
        #rb-settings-menu-portal .rb-setting-btn { min-height:30px; line-height:1.15; white-space:normal; }


        /* ===== Global Radio GIF Ambient Layer ===== */
        #rb-gif-bg {
            position: absolute;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            background-size: cover;
            background-position: center;
            opacity: .13;
            filter: blur(14px) saturate(1.35) contrast(1.08);
            transform: scale(1.08);
            mix-blend-mode: screen;
            transition: opacity .45s ease, background-image .45s ease;
        }
        #rb-gif-bg::after {
            content:'';
            position:absolute;
            inset:0;
            background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.78)), linear-gradient(transparent 50%, rgba(0,0,0,.18) 50%);
            background-size: auto, 100% 4px;
        }
        #rb-gif-badge {
            max-width: 108px;
        }


        /* ===== NoSleep / Screen Wake Lock Integration ===== */
        #topbar-awake-widget.awake-on {
            color: #86efac;
            text-shadow: 0 0 10px rgba(34,197,94,0.45);
        }
        #topbar-awake-widget.awake-on i { color: #22c55e; }
        .nosleep-btn {
            border: 1px solid rgba(255,255,255,0.10);
            background: rgba(255,255,255,0.055);
            border-radius: 0.55rem;
            padding: 0.65rem 0.85rem;
            color: rgba(229,231,235,0.9);
            transition: all .16s ease;
            cursor: none;
        }
        .nosleep-btn:hover { background: rgba(255,255,255,0.13); color: #fff; border-color: rgba(255,255,255,0.24); }
        .nosleep-btn.primary { background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.32); color: #bbf7d0; }
        .nosleep-btn.danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.26); color: #fca5a5; }
        .nosleep-btn.external { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.26); color: #bfdbfe; }
        .nosleep-orb {
            position: relative;
            width: 132px;
            height: 132px;
            border-radius: 999px;
            background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.18), rgba(34,197,94,.06) 45%, rgba(0,0,0,.55));
            border: 1px solid rgba(255,255,255,.12);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 55px rgba(34,197,94,.08);
        }
        .nosleep-orb::before, .nosleep-orb::after {
            content:'';
            position:absolute;
            inset: 13px;
            border-radius: 999px;
            border: 1px dashed rgba(255,255,255,.18);
            animation: fm-spin 14s linear infinite;
        }
        .nosleep-orb::after { inset: 30px; animation-duration: 8s; animation-direction: reverse; opacity: .55; }
        .nosleep-orb.active { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 70px rgba(34,197,94,.24); border-color: rgba(34,197,94,.35); }
        .nosleep-status-dot { width: 8px; height: 8px; border-radius: 999px; background: #4b5563; box-shadow: none; display:inline-block; }
        .nosleep-status-dot.active { background:#22c55e; box-shadow:0 0 12px rgba(34,197,94,.85); }


        /* ===== Dock Pin Context Menu ===== */
        #dock-context-menu {
            position: fixed !important;
            z-index: 9998;
            display: none;
            min-width: 196px;
            background: rgba(12, 12, 16, 0.98);
            backdrop-filter: blur(40px) saturate(160%);
            -webkit-backdrop-filter: blur(40px) saturate(160%);
            border: 1px solid rgba(255,255,255,0.09);
            border-radius: 13px;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px rgba(0,0,0,0.75), 0 4px 12px rgba(0,0,0,0.4);
            padding: 5px;
            font-family: 'Inter', sans-serif;
            font-size: 13px;
            overflow: hidden;
        }
        #dock-context-menu::before {
            content: '';
            position: absolute;
            top: 0; left: 12px; right: 12px; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
            pointer-events: none;
        }
        .dock-ctx-item {
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 8px 12px;
            border-radius: 8px;
            color: rgba(255,255,255,0.80);
            cursor: none;
            transition: background 0.1s ease, color 0.1s ease;
            white-space: nowrap;
            font-weight: 400;
            letter-spacing: -0.01em;
        }
        .dock-ctx-item:hover {
            background: rgba(255,255,255,0.09);
            color: rgba(255,255,255,0.96);
        }
        .dock-ctx-item:active { background: rgba(255,255,255,0.14); }
        .dock-ctx-item.ctx-danger { color: rgba(248,113,113,0.85); }
        .dock-ctx-item.ctx-danger:hover { background: rgba(239,68,68,0.14); color: #fca5a5; }
        .dock-ctx-sep {
            height: 1px;
            background: rgba(255,255,255,0.07);
            margin: 4px 8px;
        }
        /* Pinned dock item subtle difference */
        .dock-item.dock-pinned {
            border: 1px solid rgba(255,255,255,0.06);
        }
        .dock-item.dock-pinned .pin-dot {
            position: absolute;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            width: 3px;
            height: 3px;
            background: rgba(100,140,255,0.5);
            border-radius: 50%;
        }
        /* Finder pin button */
        .finder-pin-btn {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 18px;
            height: 18px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            color: rgba(255,255,255,0.2);
            font-size: 10px;
            transition: all 0.15s;
            border: none;
            cursor: none;
            z-index: 5;
        }
        .finder-pin-btn:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
        .finder-pin-btn.pinned { color: rgba(100,140,255,0.9); }
        .finder-app-item { position: relative; }

        /* ===== Premium Finder Overlay ===== */
        #finder-overlay {
            position: fixed !important;
            bottom: 90px;
            left: 50%;
            transform: translateX(-50%) scale(0.92);
            width: 740px;
            max-height: 580px;
            z-index: 99;
            border-radius: 20px;
            background: rgba(10, 10, 14, 0.97);
            backdrop-filter: blur(48px) saturate(170%);
            -webkit-backdrop-filter: blur(48px) saturate(170%);
            border: 1px solid rgba(255,255,255,0.10);
            box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 48px 120px rgba(0,0,0,0.85), 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
            display: none;
            opacity: 0;
            flex-direction: column;
            overflow: hidden;
            transition: none;
        }
        #finder-overlay::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; height: 1px;
            background: linear-gradient(90deg, transparent 5%, rgba(255,255,255,0.10) 30%, rgba(255,255,255,0.10) 70%, transparent 95%);
            pointer-events: none;
        }
        #finder-overlay.finder-open { display: flex; }
        #finder-search-bar {
            width: 100%;
            background: transparent;
            border: none;
            border-bottom: 1px solid rgba(255,255,255,0.07);
            padding: 18px 22px 15px 52px;
            color: rgba(255,255,255,0.92);
            font-size: 16px;
            font-family: 'Inter', sans-serif;
            font-weight: 400;
            outline: none;
            letter-spacing: -0.02em;
        }
        #finder-search-bar::placeholder { color: rgba(255,255,255,0.22); }
        #finder-search-icon {
            position: absolute;
            left: 20px;
            top: 20px;
            color: rgba(255,255,255,0.28);
            pointer-events: none;
        }
        #finder-grid {
            flex: 1;
            overflow-y: auto;
            padding: 14px 16px 18px;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 5px;
            align-content: start;
        }
        .finder-app-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            padding: 11px 4px 9px;
            border-radius: 14px;
            cursor: none;
            transition: background 0.12s ease, transform 0.15s cubic-bezier(0.34,1.56,0.64,1), border-color 0.12s ease;
            border: 1px solid transparent;
            text-align: center;
            min-height: 84px;
            justify-content: flex-start;
        }
        .finder-app-item:hover {
            background: rgba(255,255,255,0.08);
            border-color: rgba(255,255,255,0.11);
            transform: scale(1.06) translateY(-1px);
        }
        .finder-app-item:active {
            transform: scale(0.94);
            background: rgba(255,255,255,0.12);
        }
        .finder-app-icon {
            width: 40px;
            height: 40px;
            border-radius: 11px;
            background: linear-gradient(155deg, rgba(255,255,255,0.12), rgba(0,0,0,0.35));
            border: 1px solid rgba(255,255,255,0.09);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.09);
            flex-shrink: 0;
            transition: box-shadow 0.15s ease;
        }
        .finder-app-label {
            font-size: 10px;
            font-weight: 400;
            color: rgba(255,255,255,0.68);
            font-family: 'Inter', sans-serif;
            white-space: normal;
            overflow: visible;
            max-width: 100%;
            line-height: 1.3;
            text-align: center;
            word-break: break-word;
            padding: 0 3px;
            letter-spacing: -0.01em;
        }
        .finder-app-item.finder-running .finder-app-icon {
            box-shadow: 0 0 0 2px var(--os-accent-custom), 0 4px 12px rgba(0,0,0,0.45);
        }
        .finder-app-item.finder-running::after {
            content: '';
            width: 4px;
            height: 4px;
            background: var(--os-accent-custom);
            border-radius: 50%;
            box-shadow: 0 0 6px rgba(255,255,255,0.6);
            margin-top: -2px;
        }
        .finder-separator {
            grid-column: 1 / -1;
            height: 1px;
            background: rgba(255,255,255,0.05);
            margin: 2px 0;
        }
        .finder-section-label {
            grid-column: 1 / -1;
            font-size: 9px;
            font-family: 'JetBrains Mono', monospace;
            color: rgba(255,255,255,0.22);
            text-transform: uppercase;
            letter-spacing: 2.5px;
            padding: 6px 4px 2px;
        }
        /* Premium Dock Finder Button */
        .dock-finder-btn {
            background: linear-gradient(155deg, rgba(60,80,180,0.45), rgba(30,40,120,0.60)) !important;
            border: 1px solid rgba(100,130,255,0.18) !important;
            position: relative;
        }
        .dock-finder-btn::before {
            content: '' !important;
            position: absolute !important;
            inset: 1px !important;
            border-radius: 13px !important;
            background: linear-gradient(180deg, rgba(120,150,255,0.12) 0%, transparent 60%) !important;
            pointer-events: none !important;
        }
        .dock-finder-btn:hover {
            background: linear-gradient(155deg, rgba(80,100,220,0.55), rgba(50,60,160,0.70)) !important;
        }
        .dock-separator {
            width: 1px;
            height: 30px;
            background: rgba(255,255,255,0.10);
            align-self: center;
            flex-shrink: 0;
            border-radius: 1px;
            opacity: 0.7;
        }

    
        /* ═══════════════════════════════════════
           PREMIUM TOP BAR — System Control Layer
           ═══════════════════════════════════════ */
        #os-layer > header {
            height: 36px !important;
            font-family: 'Inter', sans-serif !important;
            background: rgba(6, 6, 9, 0.96) !important;
            backdrop-filter: blur(32px) saturate(160%) !important;
            -webkit-backdrop-filter: blur(32px) saturate(160%) !important;
            box-shadow: 0 1px 0 rgba(255,255,255,0.055), 0 2px 10px rgba(0,0,0,0.35) !important;
            border-bottom: 1px solid rgba(255,255,255,0.06) !important;
            position: relative;
            z-index: 200;
        }
        #os-layer > header::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; height: 1px;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent 100%);
            pointer-events: none;
        }
        .topbar-item {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 0 7px;
            height: 100%;
            transition: background 0.13s ease, color 0.13s ease;
            border-radius: 5px;
            cursor: none;
            font-size: 12px;
            font-weight: 400;
            color: rgba(255,255,255,0.70);
            letter-spacing: -0.01em;
        }
        .topbar-item:hover {
            background: rgba(255,255,255,0.07);
            color: rgba(255,255,255,0.95);
        }
        .topbar-item:active { background: rgba(255,255,255,0.11); }
        .topbar-sep {
            width: 1px;
            height: 12px;
            background: rgba(255,255,255,0.08);
            margin: 0 2px;
            flex-shrink: 0;
        }
        
        .aether-logo-white {
            filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255,255,255,0.25));
            animation: logo-glow 5s infinite alternate ease-in-out;
        }
        @keyframes logo-glow {
            from { filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255,255,255,0.12)); }
            to { filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(255,255,255,0.45)); }
        }

        #companion-chat-block { flex-grow: 1; min-height: 340px; display: flex; flex-direction: column; overflow: hidden; }
        .aether-chat-msg pre { background: rgba(0,0,0,0.75); border: 1px solid rgba(255,255,255,0.1); padding: 12px; border-radius: 8px; overflow: auto; margin: 10px 0; max-width: 100%; }
        .aether-chat-msg code { color: #22d3ee; font-family: 'JetBrains Mono', monospace; font-size: 10px; }
        
        .sidebar-section { border-bottom: 1px solid rgba(255,255,255,0.03); }
        .sidebar-section-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px; cursor: pointer; transition: background 0.2s; }
        .sidebar-section-header:hover { background: rgba(255,255,255,0.03); }
        .sidebar-section-content { padding: 0 8px 12px 8px; display: none; }
        .sidebar-section.expanded .sidebar-section-content { display: block; }
        .sidebar-section.expanded .chevron-icon { transform: rotate(90deg); }
        .chevron-icon { transition: transform 0.3s; width: 10px; height: 10px; opacity: 0.5; }

        .topbar-graph-mini {
            width: 56px;
            height: 22px;
            display: block;
            position: relative;
            border-radius: 3px;
            overflow: hidden;
            background: rgba(0,0,0,0.25);
            border: 1px solid rgba(255,255,255,0.06);
        }
        .topbar-graph-mini canvas {
            width: 100%;
            height: 100%;
            display: block;
        }
        .topbar-graph-label {
            position: absolute;
            bottom: 1px;
            right: 2px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 7px;
            line-height: 1;
            color: rgba(255,255,255,0.75);
            text-shadow: 0 0 3px rgba(0,0,0,0.8);
            pointer-events: none;
            z-index: 2;
        }

        #aether-menu-dropdown, #control-center-panel, #notification-center {
            position: fixed !important;
            top: 40px;
            background: rgba(10, 10, 13, 0.98);
            border: 1px solid rgba(255,255,255,0.09);
            border-radius: 14px;
            backdrop-filter: blur(44px) saturate(160%);
            -webkit-backdrop-filter: blur(44px) saturate(160%);
            z-index: 10001;
            display: none;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 24px 64px rgba(0,0,0,0.75), 0 8px 20px rgba(0,0,0,0.4);
            overflow: hidden;
        }
        #aether-menu-dropdown { left: 8px; width: 248px; max-width: calc(100vw - 16px); }
        #control-center-panel { right: 8px; width: 296px; max-width: calc(100vw - 16px); padding: 16px; }
        #notification-center { right: 8px; width: 320px; max-width: calc(100vw - 16px); max-height: min(460px, calc(100vh - 64px)); }

        /* Desktop Sidebar Clean-Default Gate (>=1024px) */
        @media (min-width: 1024px) {
            html:not(.desktop-sidebar-enabled) #right-utility-panel {
                display: none !important;
            }
        }

        /* =========================================================
           Redesigned System Settings — Clean Grouped UI & Switches
           ========================================================= */
        .settings-shell {
            display: flex;
            height: 100%;
            min-height: 0;
            background: rgba(8, 9, 13, 0.55);
            color: rgba(255, 255, 255, 0.92);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        }
        .settings-sidebar {
            width: 212px;
            flex-shrink: 0;
            background: rgba(0, 0, 0, 0.34);
            border-right: 1px solid rgba(255, 255, 255, 0.065);
            padding: 12px 10px;
            display: flex;
            flex-direction: column;
            gap: 2px;
            overflow-y: auto;
        }
        .settings-search-box {
            position: relative;
            margin-bottom: 8px;
        }
        .settings-search-box input {
            width: 100%;
            background: rgba(255, 255, 255, 0.055);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 8px;
            padding: 7px 26px 7px 28px;
            font-size: 11.5px;
            color: #fff;
            outline: none;
            transition: border-color 0.16s ease, background 0.16s ease;
        }
        .settings-search-box input:focus {
            background: rgba(255, 255, 255, 0.085);
            border-color: rgba(255, 255, 255, 0.24);
        }
        .settings-nav-section {
            font-size: 9.5px;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.34);
            padding: 10px 10px 4px;
        }
        .settings-nav-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 7px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.62);
            background: transparent;
            border: 1px solid transparent;
            text-align: left;
            transition: all 0.14s ease;
        }
        .settings-nav-btn:hover {
            color: rgba(255, 255, 255, 0.92);
            background: rgba(255, 255, 255, 0.05);
        }
        .settings-nav-btn.active {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.11);
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }
        .settings-nav-badge {
            font-family: 'JetBrains Mono', monospace;
            font-size: 9.5px;
            padding: 1px 6px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.72);
        }
        .settings-pane {
            flex: 1;
            min-width: 0;
            overflow-y: auto;
            padding: 20px 24px 28px;
        }
        .settings-pane-header {
            margin-bottom: 16px;
        }
        .settings-pane-title {
            font-size: 16px;
            font-weight: 600;
            letter-spacing: -0.015em;
            color: #ffffff;
        }
        .settings-pane-subtitle {
            font-size: 11.5px;
            color: rgba(255, 255, 255, 0.48);
            margin-top: 2px;
        }
        .settings-section-label {
            font-size: 10.5px;
            font-weight: 600;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.42);
            margin: 16px 2px 7px;
        }
        .settings-section-label:first-child {
            margin-top: 0;
        }
        .settings-card {
            background: rgba(255, 255, 255, 0.028);
            border: 1px solid rgba(255, 255, 255, 0.075);
            border-radius: 12px;
            overflow: hidden;
        }
        .settings-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 11px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.055);
        }
        .settings-row:last-child {
            border-bottom: none;
        }
        .settings-row-main {
            display: flex;
            align-items: center;
            gap: 11px;
            min-width: 0;
            flex: 1;
        }
        .settings-row-icon {
            width: 28px;
            height: 28px;
            border-radius: 7px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: rgba(255, 255, 255, 0.8);
        }
        .settings-row-title {
            font-size: 12.5px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.94);
            line-height: 1.3;
        }
        .settings-row-desc {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.45);
            line-height: 1.35;
            margin-top: 1px;
        }
        .settings-subpanel {
            background: rgba(0, 0, 0, 0.24);
            border-bottom: 1px solid rgba(255, 255, 255, 0.055);
            padding: 10px 14px 12px 52px;
        }
        .settings-subpanel:last-child {
            border-bottom: none;
        }
        .settings-subpanel.is-collapsed {
            display: none !important;
        }

        /* Crisp Pill Switch */
        .os-switch {
            position: relative;
            width: 38px;
            height: 22px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.13);
            border: 1px solid rgba(255, 255, 255, 0.14);
            padding: 0;
            flex-shrink: 0;
            transition: background 0.18s ease, border-color 0.18s ease;
        }
        .os-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.78);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
            transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease;
        }
        .os-switch[data-on="true"] {
            background: #22c55e;
            border-color: rgba(74, 222, 128, 0.65);
        }
        .os-switch[data-on="true"]::after {
            transform: translateX(16px);
            background: #ffffff;
        }
        .os-switch:disabled {
            opacity: 0.48;
            pointer-events: none;
        }

        /* Compact Segmented Control */
        .os-segmented {
            display: inline-flex;
            align-items: center;
            background: rgba(0, 0, 0, 0.36);
            border: 1px solid rgba(255, 255, 255, 0.085);
            border-radius: 8px;
            padding: 2px;
            gap: 2px;
            flex-shrink: 0;
        }
        .os-seg-btn {
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.56);
            background: transparent;
            transition: all 0.14s ease;
            white-space: nowrap;
        }
        .os-seg-btn:hover {
            color: rgba(255, 255, 255, 0.88);
        }
        .os-seg-btn.active {
            background: rgba(255, 255, 255, 0.16);
            color: #ffffff;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
        }

        @media (max-width: 680px) {
            .settings-shell {
                flex-direction: column;
            }
            .settings-sidebar {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid rgba(255, 255, 255, 0.07);
                flex-direction: row;
                flex-wrap: nowrap;
                overflow-x: auto;
                padding: 8px 10px;
                align-items: center;
            }
            .settings-nav-section,
            .settings-sidebar-footer {
                display: none !important;
            }
            .settings-search-box {
                min-width: 150px;
                margin-bottom: 0;
                margin-right: 6px;
            }
            .settings-nav-btn {
                width: auto;
                white-space: nowrap;
                padding: 6px 10px;
            }
            .settings-pane {
                padding: 14px 14px 22px;
            }
            .settings-subpanel {
                padding-left: 14px;
            }
        }

        /* ════════════════════════════════════════════════════════════════
           OS UPGRADES: VIRTUAL SPACES, SNAP ZONES, MISSION CONTROL, LOCK & VFS
           ════════════════════════════════════════════════════════════════ */
        .space-pill-btn {
            position: relative;
            min-width: 20px;
            height: 20px;
            padding: 0 5px;
            border-radius: 5px;
            font-size: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.42);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.16s ease, color 0.16s ease;
        }
        .space-pill-btn:hover {
            color: rgba(255, 255, 255, 0.88);
            background: rgba(255, 255, 255, 0.08);
        }
        .space-pill-btn.active {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.16);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
        }
        .space-pill-btn.has-windows::after,
        .space-pill-btn[data-has-wins="true"]::after {
            content: '';
            position: absolute;
            bottom: 1.5px;
            left: 50%;
            transform: translateX(-50%);
            width: 3px;
            height: 3px;
            border-radius: 999px;
            background: rgba(56, 189, 248, 0.85);
        }

        #window-snap-preview {
            display: none;
            position: fixed;
            z-index: 9400;
            pointer-events: none;
            border-radius: 18px;
            background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.14));
            border: 1.5px solid rgba(125, 211, 252, 0.48);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
            transition: left 0.14s cubic-bezier(0.2, 0.9, 0.3, 1),
                        top 0.14s cubic-bezier(0.2, 0.9, 0.3, 1),
                        width 0.14s cubic-bezier(0.2, 0.9, 0.3, 1),
                        height 0.14s cubic-bezier(0.2, 0.9, 0.3, 1),
                        opacity 0.14s ease;
        }

        #mission-control-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9600;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding: 56px 24px 32px;
            background: rgba(5, 7, 14, 0.78);
            backdrop-filter: blur(26px) saturate(140%);
            -webkit-backdrop-filter: blur(26px) saturate(140%);
            overflow-y: auto;
        }
        .mc-space-btn {
            padding: 8px 18px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.65);
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            display: inline-flex;
            align-items: center;
            transition: all 0.16s ease;
        }
        .mc-space-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }
        .mc-space-btn.active {
            background: rgba(255, 255, 255, 0.18);
            border-color: rgba(255, 255, 255, 0.35);
            color: #ffffff;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        }
        .mc-card {
            padding: 16px;
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.045);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
            transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
        }
        .mc-card:hover {
            transform: translateY(-3px);
            background: rgba(255, 255, 255, 0.075);
            border-color: rgba(255, 255, 255, 0.24);
        }

        #lock-screen-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9850;
            align-items: center;
            justify-content: center;
            background: radial-gradient(ellipse 75% 60% at 50% 35%, rgba(56, 189, 248, 0.14), rgba(4, 6, 14, 0.88) 70%);
            backdrop-filter: blur(32px) saturate(150%);
            -webkit-backdrop-filter: blur(32px) saturate(150%);
        }
        @keyframes lockShake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-8px); }
            50% { transform: translateX(8px); }
            75% { transform: translateX(-5px); }
        }
        .lock-shake {
            animation: lockShake 0.34s ease;
        }

        #vfs-drop-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9750;
            align-items: center;
            justify-content: center;
            background: rgba(4, 8, 16, 0.68);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            pointer-events: none;
        }
        #vfs-drop-overlay.active {
            display: flex;
        }
        .vfs-drop-card {
            padding: 28px 36px;
            border-radius: 22px;
            text-align: center;
            background: rgba(16, 185, 129, 0.1);
            border: 1.5px dashed rgba(52, 211, 153, 0.55);
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
        }

        #calendar-popover {
            display: none;
            position: fixed;
            top: 44px;
            right: 10px;
            width: 310px;
            max-width: calc(100vw - 20px);
            padding: 14px;
            border-radius: 18px;
            z-index: 9500;
            background: rgba(10, 12, 20, 0.86);
            border: 1px solid rgba(255, 255, 255, 0.13);
            backdrop-filter: blur(28px) saturate(160%);
            -webkit-backdrop-filter: blur(28px) saturate(160%);
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
        }

        #desktop-context-menu {
            display: none;
            position: fixed;
            width: 238px;
            padding: 6px;
            border-radius: 15px;
            z-index: 9550;
            background: rgba(10, 12, 20, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.14);
            backdrop-filter: blur(26px) saturate(155%);
            -webkit-backdrop-filter: blur(26px) saturate(155%);
            box-shadow: 0 20px 52px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
        }

        /* Window Header Quick Snap & Pin Controls + Multi-Edge Resizing */
        .win-hdr-action {
            width: 22px;
            height: 22px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: rgba(255, 255, 255, 0.42);
            background: transparent;
            border: 1px solid transparent;
            transition: all 0.15s ease;
        }
        .win-hdr-action:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.16);
        }
        .win-btn-pin.pinned {
            color: #38bdf8;
            background: rgba(56, 189, 248, 0.16);
            border-color: rgba(56, 189, 248, 0.35);
        }
        .window-pinned {
            box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(56, 189, 248, 0.42) !important;
        }
        .win-resize-edge {
            position: absolute;
            z-index: 25;
        }
        .win-resize-e { top: 36px; right: 0; width: 6px; bottom: 14px; cursor: ew-resize; }
        .win-resize-w { top: 36px; left: 0; width: 6px; bottom: 14px; cursor: ew-resize; }
        .win-resize-s { left: 14px; right: 14px; bottom: 0; height: 6px; cursor: ns-resize; }
        .win-resize-sw { left: 0; bottom: 0; width: 14px; height: 14px; cursor: nesw-resize; }

        #app-switcher-hud {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9850;
            align-items: center;
            justify-content: center;
            background: rgba(4, 6, 12, 0.45);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }
        #app-switcher-hud.active {
            display: flex;
        }
        .app-switcher-strip {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 18px;
            max-width: 90vw;
            overflow-x: auto;
            border-radius: 22px;
            background: rgba(12, 15, 24, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.16);
            box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
        }
        .app-switcher-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            min-width: 92px;
            padding: 12px 10px;
            border-radius: 16px;
            color: rgba(255, 255, 255, 0.65);
            border: 1px solid transparent;
            transition: all 0.14s ease;
        }
        .app-switcher-item.selected,
        .app-switcher-item:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.11);
            border-color: rgba(255, 255, 255, 0.24);
            transform: translateY(-2px);
        }
        .app-switcher-icon {
            width: 42px;
            height: 42px;
            border-radius: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.14);
        }
        .app-switcher-lbl {
            font-size: 10.5px;
            font-weight: 500;
            max-width: 84px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Native macOS Calculator Keypad & Apple Boot Splash */
        .calc-btn {
            height: 54px;
            border-radius: 9999px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 21px;
            font-weight: 500;
            transition: filter 0.12s ease, transform 0.08s ease;
        }
        .calc-btn:active { transform: scale(0.94); filter: brightness(1.28); }
        .calc-btn-fn { background: #a5a5a5; color: #000000; font-size: 18px; }
        .calc-btn-num { background: #333336; color: #ffffff; }
        .calc-btn-op { background: #ff9f0a; color: #ffffff; font-size: 24px; }
        .calc-btn-op.armed { background: #ffffff; color: #ff9f0a; }
        .calc-btn-sci {
            border-radius: 9999px;
            background: #242428;
            color: #e5e7eb;
            font-size: 13px;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.12s ease;
        }
        .calc-btn-sci:hover { background: #34343a; }

        #apple-boot-splash {
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: #000000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 34px;
            transition: opacity 0.45s ease;
        }
        .apple-boot-bar-track {
            width: 176px;
            height: 5px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.18);
            overflow: hidden;
        }
        .apple-boot-bar-fill {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: #ffffff;
            animation: apple-boot-load 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }
        @keyframes apple-boot-load {
            0% { width: 8%; }
            100% { width: 100%; }
        }


