/* ============================================================
   macOS Web Desktop — styles
   ============================================================ */
:root{
  --accent:#0a84ff;
  --menubar-h:26px;
  --dock-h:60px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --mono:"SF Mono",ui-monospace,Menlo,Consolas,"PingFang SC",monospace;
  --radius:12px;
}
html,body{margin:0;padding:0;height:100%;overflow:hidden;font-family:var(--font);-webkit-font-smoothing:antialiased;background:#0b2a5b;}
*{box-sizing:border-box;}
[hidden]{display:none !important;}

/* ---------- wallpapers ---------- */
#wallpaper{position:absolute;inset:0;z-index:0;background-color:#0b2a5b;background-size:cover;background-position:center;transition:opacity .4s;}
.wp-0{background-image:url("../wallpapers/tahoe-1.svg");}
.wp-1{background-image:url("../wallpapers/tahoe-2.svg");}
.wp-2{background-image:url("../wallpapers/tahoe-3.svg");}
.wp-3{background-image:url("../wallpapers/tahoe-4.svg");}
.wp-4{background-image:url("../wallpapers/tahoe-5.svg");}
.wp-5{background-image:url("../wallpapers/tahoe-6.svg");}
.wp-6{background-image:url("../wallpapers/tahoe-7.svg");}
.wp-7{background-image:url("../wallpapers/tahoe-8.svg");}

/* ---------- boot & login ---------- */
#boot-screen{position:fixed;inset:0;z-index:9999;background:#000;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;transition:opacity .6s;}
#boot-screen .apple{width:96px;height:96px;margin-bottom:36px;fill:#fff;}
#boot-progress{width:200px;height:5px;background:rgba(255,255,255,.25);border-radius:3px;overflow:hidden;}
#boot-progress-bar{width:0%;height:100%;background:#fff;border-radius:3px;transition:width .3s;}

#login-screen{position:fixed;inset:0;z-index:9000;display:flex;flex-direction:column;align-items:center;justify-content:center;background:transparent;backdrop-filter:blur(40px) saturate(1.4);-webkit-backdrop-filter:blur(40px) saturate(1.4);}
#login-screen .avatar{width:96px;height:96px;border-radius:50%;box-shadow:0 8px 30px rgba(0,0,0,.35);margin-bottom:16px;display:flex;align-items:center;justify-content:center;font-size:44px;color:#fff;user-select:none;cursor:pointer;transition:transform .15s;}
#login-screen .uname{color:#fff;font-size:22px;font-weight:600;text-shadow:0 2px 12px rgba(0,0,0,.4);margin-bottom:22px;}
#login-screen .pass{width:220px;padding:10px 16px;border-radius:24px;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.18);color:#fff;font-size:15px;text-align:center;outline:none;backdrop-filter:blur(10px);}
#login-screen .avatar:hover{transform:scale(1.06);}
#login-screen .pass::placeholder{color:rgba(255,255,255,.65);}
#login-screen .hint{color:rgba(255,255,255,.75);font-size:12px;margin-top:12px;text-shadow:0 1px 6px rgba(0,0,0,.5);}
#login-power{position:absolute;right:26px;bottom:22px;width:34px;height:34px;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.85);cursor:pointer;border-radius:50%;}
#login-power:hover{background:rgba(255,255,255,.2);}

/* ---------- desktop ---------- */
#desktop-root{position:fixed;inset:0;overflow:hidden;z-index:1;}
#desktop-area{position:absolute;inset:26px 0 var(--dock-h) 0;z-index:2;}
#desktop-icons{position:absolute;inset:26px 0 var(--dock-h) 0;z-index:1;padding:18px;display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-start;gap:4px;}

.d-icon{width:92px;padding:8px 2px 4px;display:flex;flex-direction:column;align-items:center;gap:5px;border-radius:8px;cursor:default;user-select:none;}
.d-icon:hover{background:rgba(255,255,255,.12);}
.d-icon.sel{background:rgba(255,255,255,.22);}
.d-icon .ic{width:56px;height:56px;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 3px 6px rgba(0,0,0,.25));}
.d-icon .ic svg{width:100%;height:100%;}
.d-icon .lb{font-size:12px;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.7);text-align:center;line-height:1.25;word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.d-icon.app-icon .lb{color:#111;}
html[data-theme="dark"] .d-icon.app-icon .lb{color:#fff;}

/* selection marquee */
#marquee{position:absolute;border:1px solid rgba(10,132,255,.7);background:rgba(10,132,255,.12);border-radius:3px;z-index:1000;pointer-events:none;display:none;}

/* ---------- menu bar ---------- */
#menu-bar{position:absolute;top:0;left:0;right:0;height:26px;z-index:5000;display:flex;align-items:center;padding:0 10px;gap:2px;color:#fff;font-size:13px;user-select:none;
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05)),rgba(18,20,26,.45);border-bottom:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(24px) saturate(1.8);-webkit-backdrop-filter:blur(24px) saturate(1.8);}
html[data-theme="dark"] #menu-bar{background:rgba(12,14,20,.6);}
.mb-item{padding:2px 9px;border-radius:5px;height:20px;line-height:16px;white-space:nowrap;cursor:default;}
.mb-item:hover,.mb-item.open{background:rgba(255,255,255,.18);}
.mb-item.app-name{font-weight:700;}
.mb-right{margin-left:auto;display:flex;align-items:center;gap:2px;}
.mb-right .mb-item{display:flex;align-items:center;gap:6px;}
.mb-item svg{width:15px;height:15px;fill:currentColor;}
#mb-clock{font-variant-numeric:tabular-nums;}

/* dropdown menus */
.menu-panel{position:fixed;z-index:9000;min-width:220px;background:rgba(246,246,246,.82);backdrop-filter:blur(30px) saturate(1.8);-webkit-backdrop-filter:blur(30px) saturate(1.8);border:1px solid rgba(0,0,0,.12);border-radius:9px;padding:5px;box-shadow:0 12px 40px rgba(0,0,0,.25);color:#1d1d1f;}
html[data-theme="dark"] .menu-panel{background:rgba(40,42,50,.82);color:#f5f5f7;border-color:rgba(255,255,255,.12);}
.menu-item{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:4px 12px;border-radius:5px;font-size:13px;white-space:nowrap;cursor:default;}
.menu-item:hover{background:var(--accent);color:#fff;}
.menu-item.disabled{opacity:.4;pointer-events:none;}
.menu-item .shortcut{font-size:12px;opacity:.6;margin-left:auto;padding-left:20px;}
.menu-item.danger:hover{background:#ff3b30;color:#fff;}
.menu-sep{height:1px;background:rgba(0,0,0,.12);margin:5px 10px;}
html[data-theme="dark"] .menu-sep{background:rgba(255,255,255,.15);}

/* ---------- windows ---------- */
.window{position:absolute;min-width:320px;min-height:200px;background:var(--win-bg,#f5f5f7);border-radius:var(--radius);box-shadow:0 24px 70px rgba(0,0,0,.4),0 2px 10px rgba(0,0,0,.2);border:1px solid rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden;z-index:100;}
html[data-theme="dark"] .window{background:#2a2c36;border-color:rgba(255,255,255,.1);}
.window.focused{box-shadow:0 34px 90px rgba(0,0,0,.55),0 2px 12px rgba(0,0,0,.25);}
.window.dragging{transition:none;}
.window.resizing{transition:none;}
.win-titlebar{height:46px;flex:0 0 46px;display:flex;align-items:center;padding:0 12px;position:relative;cursor:default;user-select:none;touch-action:none;border-bottom:1px solid rgba(0,0,0,.06);}
html[data-theme="dark"] .win-titlebar{border-bottom-color:rgba(255,255,255,.08);}
.win-titlebar .traffic{display:flex;gap:8px;align-items:center;z-index:5;}
.tl{width:12px;height:12px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:9px;color:transparent;cursor:default;}
.tl.close{background:#ff5f57;}.tl.min{background:#febc2e;}.tl.max{background:#28c840;}
.window.focused .tl{color:rgba(0,0,0,.5);}
.tl.close:hover{color:#8a0000;}.tl.min:hover{color:#7a5a00;}.tl.max:hover{color:#005c00;}
.win-title{position:absolute;left:0;right:0;text-align:center;font-size:13px;font-weight:600;color:#3a3a3c;pointer-events:none;}
html[data-theme="dark"] .win-title{color:#e5e5ea;}
.win-body{flex:1;position:relative;overflow:hidden;background:transparent;}
.win-body > *{width:100%;height:100%;}

/* resize handles */
.rs{position:absolute;z-index:50;touch-action:none;}
.rs.n{top:-4px;left:8px;right:8px;height:8px;cursor:ns-resize;}
.rs.s{bottom:-4px;left:8px;right:8px;height:8px;cursor:ns-resize;}
.rs.e{right:-4px;top:8px;bottom:8px;width:8px;cursor:ew-resize;}
.rs.w{left:-4px;top:8px;bottom:8px;width:8px;cursor:ew-resize;}
.rs.ne{top:-5px;right:-5px;width:12px;height:12px;cursor:nesw-resize;}
.rs.nw{top:-5px;left:-5px;width:12px;height:12px;cursor:nwse-resize;}
.rs.se{bottom:-5px;right:-5px;width:12px;height:12px;cursor:nwse-resize;}
.rs.sw{bottom:-5px;left:-5px;width:12px;height:12px;cursor:nesw-resize;}

/* ---------- dock ---------- */
#dock{position:absolute;left:50%;transform:translateX(-50%);bottom:8px;z-index:6000;display:flex;align-items:flex-end;padding:6px 8px;border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.45),rgba(255,255,255,.2)),rgba(255,255,255,.16);backdrop-filter:blur(30px) saturate(2);-webkit-backdrop-filter:blur(30px) saturate(2);box-shadow:0 8px 32px rgba(124,58,237,.28),0 2px 10px rgba(0,0,0,.18),inset 0 0 0 .5px rgba(255,255,255,.5);}
html[data-theme="dark"] #dock{background:rgba(30,32,42,.55);}
.dock-item{position:relative;width:50px;height:50px;display:flex;align-items:flex-end;justify-content:center;margin:0 4px;transition:transform .18s cubic-bezier(.2,0,0,1);transform-origin:bottom center;cursor:pointer;}
.dock-item .ic{width:100%;height:100%;display:flex;align-items:center;justify-content:center;}
.dock-item .ic svg{width:100%;height:100%;filter:drop-shadow(0 4px 8px rgba(0,0,0,.3));}
.dock-item .dot{position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);width:4px;height:4px;border-radius:50%;background:rgba(0,0,0,.55);}
html[data-theme="dark"] .dock-item .dot{background:#fff;}
.dock-item .tip{position:absolute;bottom:calc(100% + 12px);left:50%;transform:translateX(-50%);background:rgba(40,42,50,.9);color:#fff;font-size:12px;padding:4px 10px;border-radius:6px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;}
.dock-item:hover .tip{opacity:1;}
.dock-sep{width:1px;height:44px;background:rgba(0,0,0,.25);margin:0 6px;align-self:center;}
html[data-theme="dark"] .dock-sep{background:rgba(255,255,255,.25);}
.dock-mini{width:46px;height:46px;border-radius:8px;overflow:hidden;background:rgba(255,255,255,.5);border:1px solid rgba(0,0,0,.1);display:flex;align-items:center;justify-content:center;font-size:20px;}

/* ---------- generic app chrome ---------- */
.app-toolbar{height:44px;flex:0 0 44px;display:flex;align-items:center;gap:8px;padding:0 12px;background:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.07);}
html[data-theme="dark"] .app-toolbar{background:rgba(255,255,255,.04);border-bottom-color:rgba(255,255,255,.08);}
.tb-btn{width:30px;height:30px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--accent);cursor:default;}
.tb-btn:hover{background:rgba(0,0,0,.07);}
html[data-theme="dark"] .tb-btn:hover{background:rgba(255,255,255,.1);}
.tb-btn.disabled{opacity:.35;pointer-events:none;}
.tb-btn svg{width:17px;height:17px;fill:currentColor;}
.tb-input{flex:1;height:28px;border:1px solid rgba(0,0,0,.12);border-radius:7px;background:rgba(255,255,255,.75);padding:0 10px;font-size:13px;color:inherit;outline:none;min-width:0;}
html[data-theme="dark"] .tb-input{background:rgba(0,0,0,.25);border-color:rgba(255,255,255,.15);}

/* ---------- finder ---------- */
.finder{display:flex;height:100%;}
.finder-side{width:180px;flex:0 0 180px;padding:10px 8px;overflow-y:auto;border-right:1px solid rgba(0,0,0,.07);font-size:13px;background:rgba(255,255,255,.25);}
html[data-theme="dark"] .finder-side{background:rgba(255,255,255,.04);border-right-color:rgba(255,255,255,.08);}
.finder-side .sec{color:#8e8e93;font-size:11px;font-weight:600;padding:6px 8px 3px;}
.finder-side .side-item{display:flex;align-items:center;gap:7px;padding:4px 8px;border-radius:6px;cursor:default;color:var(--fg,#1d1d1f);}
.finder-side .side-item:hover{background:rgba(0,0,0,.06);}
html[data-theme="dark"] .finder-side .side-item{color:#f5f5f7;}
html[data-theme="dark"] .finder-side .side-item:hover{background:rgba(255,255,255,.1);}
.finder-side .side-item.sel{background:var(--accent);color:#fff;}
.finder-side .side-item svg{width:16px;height:16px;flex:0 0 16px;}
.finder-main{flex:1;display:flex;flex-direction:column;min-width:0;}
.finder-path{height:30px;display:flex;align-items:center;padding:0 14px;font-size:12px;color:#8e8e93;border-bottom:1px solid rgba(0,0,0,.06);white-space:nowrap;overflow:hidden;}
.finder-grid{flex:1;overflow:auto;padding:14px;display:flex;flex-wrap:wrap;align-content:flex-start;gap:6px;}
.finder-item{width:96px;padding:8px 2px;border-radius:8px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:default;user-select:none;}
.finder-item:hover{background:rgba(0,0,0,.05);}
html[data-theme="dark"] .finder-item:hover{background:rgba(255,255,255,.08);}
.finder-item.sel{background:var(--accent);}
.finder-item.sel .lb{color:#fff;}
.finder-item .ic{width:52px;height:52px;display:flex;align-items:center;justify-content:center;}
.finder-item .ic svg{width:100%;height:100%;}
.finder-item .lb{font-size:12px;text-align:center;line-height:1.25;word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.finder-status{height:26px;border-top:1px solid rgba(0,0,0,.06);display:flex;align-items:center;padding:0 12px;font-size:12px;color:#8e8e93;}
.finder-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8e8e93;font-size:13px;gap:8px;}

/* list view */
.finder-list{flex:1;overflow:auto;}
.finder-list table{width:100%;border-collapse:collapse;font-size:12px;}
.finder-list th{text-align:left;font-weight:600;color:#8e8e93;padding:4px 12px;border-bottom:1px solid rgba(0,0,0,.08);position:sticky;top:0;background:var(--win-bg,#f5f5f7);}
html[data-theme="dark"] .finder-list th{background:#2a2c36;}
.finder-list td{padding:4px 12px;}
.finder-list tr:hover{background:rgba(0,0,0,.05);}
html[data-theme="dark"] .finder-list tr:hover{background:rgba(255,255,255,.07);}
.finder-list .name-cell{display:flex;align-items:center;gap:8px;}
.finder-list .name-cell svg{width:16px;height:16px;}

/* ---------- notes ---------- */
.notes{display:flex;height:100%;}
.notes-side{width:220px;flex:0 0 220px;border-right:1px solid rgba(0,0,0,.07);display:flex;flex-direction:column;background:rgba(255,255,255,.25);}
html[data-theme="dark"] .notes-side{background:rgba(255,255,255,.04);}
.notes-side .ns-title{padding:12px 14px 6px;font-weight:700;}
.notes-list{flex:1;overflow-y:auto;padding:4px 6px;}
.notes-item{padding:8px 10px;border-radius:7px;cursor:default;}
.notes-item.sel{background:var(--accent);color:#fff;}
.notes-item .t{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.notes-item .p{font-size:11px;opacity:.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;}
.notes-main{flex:1;display:flex;flex-direction:column;min-width:0;}
.notes-editor{flex:1;border:none;outline:none;resize:none;padding:18px 22px;font-size:15px;line-height:1.6;background:transparent;color:inherit;font-family:var(--font);}
.notes-count{font-size:11px;color:#8e8e93;padding:4px 14px;}

/* ---------- calculator ---------- */
.calc{display:flex;flex-direction:column;height:100%;background:#1c1c1e;color:#fff;padding:14px;gap:10px;}
.calc-display{flex:1;display:flex;align-items:flex-end;justify-content:flex-end;font-size:52px;font-weight:300;padding:0 8px;overflow:hidden;white-space:nowrap;font-variant-numeric:tabular-nums;}
.calc-btns{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
.cbtn{height:58px;border:none;border-radius:50%;font-size:22px;color:#fff;background:#333;cursor:pointer;font-family:var(--font);}
.cbtn:hover{filter:brightness(1.2);}
.cbtn:active{filter:brightness(.9);}
.cbtn.fn{background:#a5a5a5;color:#000;}
.cbtn.op{background:#ff9f0a;}
.cbtn.op.act{background:#fff;color:#ff9f0a;}
.cbtn.zero{grid-column:span 2;border-radius:32px;}

/* ---------- terminal ---------- */
.term{height:100%;background:rgba(18,20,26,.96);color:#e8e8ea;font-family:var(--mono);font-size:13px;line-height:1.55;padding:12px 14px;overflow-y:auto;white-space:pre-wrap;word-break:break-all;}
.term .tline{min-height:1.55em;}
.term .prompt{color:#5dd8a5;font-weight:600;}
.term .cmd{color:#e8e8ea;}
.term .out{color:#b9c0c8;}
.term .err{color:#ff6b6b;}
.term .ok{color:#5dd8a5;}
.term input{display:none;}
.term-cursor{display:inline-block;width:8px;height:15px;background:#e8e8ea;vertical-align:-2px;animation:blink 1s steps(1) infinite;}
@keyframes blink{50%{opacity:0;}}
.neofetch{color:#0ad1ff;white-space:pre;}

/* ---------- textedit ---------- */
.te-toolbar{display:flex;gap:8px;padding:6px 12px;border-bottom:1px solid rgba(0,0,0,.08);align-items:center;font-size:13px;}
.te-toolbar select,.te-toolbar button{font-family:var(--font);font-size:12px;border:1px solid rgba(0,0,0,.15);border-radius:6px;background:rgba(255,255,255,.6);padding:4px 8px;color:inherit;cursor:pointer;}
html[data-theme="dark"] .te-toolbar select,html[data-theme="dark"] .te-toolbar button{background:rgba(255,255,255,.12);}
.te-area{flex:1;border:none;outline:none;resize:none;padding:16px 20px;font-size:14px;line-height:1.6;background:transparent;color:inherit;font-family:var(--mono);}
html[data-theme="dark"] .te-area{color:#e5e5ea;}

/* ---------- settings ---------- */
.settings{display:flex;height:100%;}
.settings-side{width:200px;flex:0 0 200px;padding:10px 8px;overflow-y:auto;border-right:1px solid rgba(0,0,0,.07);font-size:13px;background:rgba(255,255,255,.25);}
html[data-theme="dark"] .settings-side{background:rgba(255,255,255,.04);}
.settings-side .side-item{display:flex;align-items:center;gap:8px;padding:5px 9px;border-radius:7px;cursor:default;color:var(--fg,#1d1d1f);}
.settings-side .side-item:hover{background:rgba(0,0,0,.06);}
html[data-theme="dark"] .settings-side .side-item{color:#f5f5f7;}
html[data-theme="dark"] .settings-side .side-item:hover{background:rgba(255,255,255,.1);}
.settings-side .side-item.sel{background:var(--accent);color:#fff;}
.settings-side .side-item svg{width:18px;height:18px;}
.settings-main{flex:1;overflow-y:auto;padding:22px 26px;}
.set-title{font-size:20px;font-weight:700;margin-bottom:16px;}
.set-card{background:rgba(255,255,255,.55);border:1px solid rgba(0,0,0,.07);border-radius:10px;padding:14px 16px;margin-bottom:12px;display:flex;align-items:center;gap:14px;}
html[data-theme="dark"] .set-card{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.08);}
.set-card .info{flex:1;}
.set-card .info .t{font-size:14px;font-weight:500;}
.set-card .info .d{font-size:12px;color:#8e8e93;margin-top:2px;}
.set-card .ic{width:32px;height:32px;display:flex;align-items:center;justify-content:center;}
.set-card .ic svg{width:100%;height:100%;}
.switch{width:44px;height:26px;border-radius:13px;background:rgba(120,120,128,.3);position:relative;cursor:pointer;flex:0 0 44px;transition:background .2s;}
.switch::after{content:"";position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);transition:left .2s;}
.switch.on{background:#34c759;}
.switch.on::after{left:20px;}
.slider{flex:1;height:4px;border-radius:2px;background:rgba(120,120,128,.35);position:relative;cursor:pointer;max-width:220px;}
.slider .fill{position:absolute;left:0;top:0;bottom:0;background:var(--accent);border-radius:2px;}
.slider .knob{position:absolute;top:50%;transform:translate(-50%,-50%);width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);}
.wall-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px;}
.wall-cell{aspect-ratio:16/10;border-radius:8px;cursor:pointer;border:2px solid transparent;background-size:cover;background-position:center;}
.wall-cell.sel{border-color:var(--accent);}
.seg{display:inline-flex;background:rgba(120,120,128,.2);border-radius:7px;padding:2px;gap:2px;}
.seg button{border:none;background:transparent;padding:4px 12px;border-radius:5px;font-size:12px;color:inherit;cursor:pointer;}
.seg button.sel{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);color:#000;font-weight:600;}

/* ---------- about ---------- */
.about{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:linear-gradient(180deg,var(--win-bg,#f5f5f7),rgba(120,120,128,.12));padding:20px;gap:4px;}
.about .mac{width:120px;height:120px;filter:drop-shadow(0 10px 30px rgba(0,0,0,.25));margin-bottom:8px;}
.about .name{font-size:24px;font-weight:700;}
.about .chip{font-size:14px;color:#48484a;margin-top:2px;}
html[data-theme="dark"] .about .chip{color:#aeaeb2;}
.about .btn{display:inline-flex;align-items:center;gap:6px;margin-top:18px;padding:7px 16px;border-radius:20px;background:var(--accent);color:#fff;font-size:13px;cursor:pointer;}
.about .foot{position:absolute;bottom:16px;font-size:11px;color:#8e8e93;}

/* ---------- photos ---------- */
.photos{height:100%;display:flex;flex-direction:column;}
.photos-grid{flex:1;overflow-y:auto;padding:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;align-content:start;}
.photo{aspect-ratio:1/1;border-radius:8px;overflow:hidden;cursor:pointer;position:relative;background-size:cover;background-position:center;}
.photo:hover{transform:scale(1.02);}
.photo .t{position:absolute;left:8px;bottom:6px;font-size:11px;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.6);}
.photo-viewer{position:absolute;inset:0;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;}
.photo-viewer .pv-img{max-width:90%;max-height:90%;border-radius:8px;box-shadow:0 10px 40px rgba(0,0,0,.5);}
.photo-viewer .pv-caption{position:absolute;bottom:18px;color:#fff;font-size:13px;}

/* ---------- safari ---------- */
.safari{height:100%;display:flex;flex-direction:column;background:#fff;}
html[data-theme="dark"] .safari{background:#1e1f24;}
.safari-tabs{height:36px;display:flex;align-items:flex-end;gap:6px;padding:0 10px;background:rgba(0,0,0,.04);}
html[data-theme="dark"] .safari-tabs{background:rgba(255,255,255,.05);}
.safari-tab{display:flex;align-items:center;gap:6px;padding:5px 12px;border-radius:7px 7px 0 0;font-size:12px;max-width:180px;white-space:nowrap;overflow:hidden;cursor:default;background:rgba(255,255,255,.5);}
html[data-theme="dark"] .safari-tab{background:rgba(255,255,255,.08);}
.safari-tab.act{background:var(--win-bg,#fff);font-weight:600;}
html[data-theme="dark"] .safari-tab.act{background:#1e1f24;}
.safari-frame{flex:1;border:none;background:#fff;width:100%;}
.safari-home{height:100%;overflow-y:auto;padding:40px;display:flex;flex-direction:column;align-items:center;background:linear-gradient(180deg,rgba(10,132,255,.08),transparent 40%);}
.safari-home h2{font-size:26px;margin:20px 0 24px;font-weight:700;}
.fav-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:16px;width:100%;max-width:560px;}
.fav{display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;padding:10px;border-radius:10px;}
.fav:hover{background:rgba(0,0,0,.05);}
.fav .fw{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px;color:#fff;}
.fav .fn{font-size:12px;color:#48484a;}
html[data-theme="dark"] .fav .fn{color:#aeaeb2;}
.block-msg{padding:60px;text-align:center;color:#8e8e93;font-size:14px;}
.block-msg a{color:var(--accent);}

/* ---------- launchpad ---------- */
#launchpad{position:absolute;inset:0;z-index:7000;background:rgba(20,22,32,.35);backdrop-filter:blur(50px) saturate(1.6);-webkit-backdrop-filter:blur(50px) saturate(1.6);display:flex;flex-direction:column;align-items:center;padding-top:90px;opacity:0;pointer-events:none;transition:opacity .25s;}
#launchpad.show{opacity:1;pointer-events:auto;}
#lp-search{width:260px;height:34px;border-radius:17px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.2);color:#fff;text-align:center;font-size:14px;outline:none;backdrop-filter:blur(10px);margin-bottom:40px;}
#lp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:26px 18px;width:min(820px,90vw);overflow-y:auto;padding-bottom:40px;}
.lp-item{display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;padding:8px;border-radius:12px;}
.lp-item:hover{background:rgba(255,255,255,.18);}
.lp-item .ic{width:64px;height:64px;}
.lp-item .ic svg{width:100%;height:100%;filter:drop-shadow(0 5px 12px rgba(0,0,0,.3));}
.lp-item .lb{color:#fff;font-size:12px;text-shadow:0 1px 5px rgba(0,0,0,.6);}

/* ---------- spotlight ---------- */
#spotlight{position:absolute;top:120px;left:50%;transform:translateX(-50%);width:600px;max-width:90vw;z-index:8000;}
#sp-box{background:rgba(246,246,246,.85);backdrop-filter:blur(40px) saturate(1.6);-webkit-backdrop-filter:blur(40px) saturate(1.6);border-radius:14px;box-shadow:0 24px 80px rgba(0,0,0,.45);overflow:hidden;}
html[data-theme="dark"] #sp-box{background:rgba(45,47,56,.85);}
#sp-input{width:100%;border:none;outline:none;background:transparent;padding:16px 18px;font-size:18px;color:inherit;font-family:var(--font);}
#sp-results{max-height:360px;overflow-y:auto;padding:6px;border-top:1px solid rgba(0,0,0,.08);}
html[data-theme="dark"] #sp-results{border-top-color:rgba(255,255,255,.1);}
.sp-item{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:8px;cursor:pointer;font-size:14px;}
.sp-item.sel{background:var(--accent);color:#fff;}
.sp-item .ic{width:26px;height:26px;}
.sp-item .ic svg{width:100%;height:100%;}
.sp-item .k{margin-left:auto;font-size:11px;opacity:.5;}
#sp-hint{text-align:center;font-size:11px;color:#8e8e93;padding:6px;}

/* ---------- control center ---------- */
#cc-panel{position:absolute;top:30px;right:10px;width:340px;z-index:8200;background:rgba(246,246,246,.8);backdrop-filter:blur(40px) saturate(1.7);-webkit-backdrop-filter:blur(40px) saturate(1.7);border-radius:18px;padding:14px;box-shadow:0 20px 70px rgba(0,0,0,.35);color:#1d1d1f;}
html[data-theme="dark"] #cc-panel{background:rgba(45,47,56,.85);color:#f5f5f7;}
.cc-top{display:flex;gap:10px;margin-bottom:10px;}
.cc-connect{flex:1;background:rgba(120,120,128,.18);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:10px;}
.cc-connect .row{display:flex;align-items:center;justify-content:space-between;font-size:13px;}
.cc-connect .row .left{display:flex;align-items:center;gap:8px;}
.cc-connect .row .left svg{width:16px;height:16px;}
.cc-square{width:44px;height:44px;border-radius:12px;background:rgba(120,120,128,.18);display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer;}
.cc-square.on{background:var(--accent);}
.cc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.cc-sect{background:rgba(120,120,128,.18);border-radius:14px;padding:12px;margin-top:10px;}
.cc-sect .lab{font-size:12px;color:#8e8e93;margin-bottom:8px;}

/* ---------- notification center ---------- */
#nc-panel{position:absolute;top:26px;right:0;bottom:0;width:340px;z-index:8100;background:rgba(230,230,235,.62);backdrop-filter:blur(50px) saturate(1.6);-webkit-backdrop-filter:blur(50px) saturate(1.6);box-shadow:-8px 0 40px rgba(0,0,0,.2);padding:18px 16px;overflow-y:auto;color:#1d1d1f;transform:translateX(100%);transition:transform .3s;}
html[data-theme="dark"] #nc-panel{background:rgba(38,40,48,.72);color:#f5f5f7;}
#nc-panel.show{transform:translateX(0);}
.nc-date{font-size:30px;font-weight:700;}
.nc-today{font-size:14px;color:#48484a;margin-bottom:14px;}
html[data-theme="dark"] .nc-today{color:#aeaeb2;}
.nc-widget{background:rgba(255,255,255,.55);border-radius:14px;padding:14px;margin-bottom:10px;}
html[data-theme="dark"] .nc-widget{background:rgba(255,255,255,.08);}
.nc-widget .w-title{font-size:12px;color:#8e8e93;font-weight:600;margin-bottom:8px;}
.nc-widget .cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;font-size:11px;text-align:center;}
.nc-widget .cal-grid .dow{color:#8e8e93;padding:3px 0;}
.nc-widget .cal-grid .day{padding:3px 0;border-radius:5px;}
.nc-widget .cal-grid .day.today{background:var(--accent);color:#fff;font-weight:700;}
.nc-widget .day.sel{background:rgba(10,132,255,.18);}
.nc-noti{background:rgba(255,255,255,.55);border-radius:14px;padding:12px 14px;margin-bottom:10px;display:flex;gap:10px;align-items:flex-start;}
html[data-theme="dark"] .nc-noti{background:rgba(255,255,255,.08);}
.nc-noti .n-ic{width:30px;height:30px;flex:0 0 30px;}
.nc-noti .n-t{font-size:13px;font-weight:600;}
.nc-noti .n-b{font-size:12px;color:#48484a;margin-top:2px;}
html[data-theme="dark"] .nc-noti .n-b{color:#aeaeb2;}

/* ---------- cmd-tab ---------- */
#cmd-tab{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%);z-index:8800;background:rgba(40,42,50,.55);backdrop-filter:blur(40px) saturate(1.5);-webkit-backdrop-filter:blur(40px) saturate(1.5);border-radius:18px;padding:14px 18px;display:flex;gap:14px;align-items:center;box-shadow:0 20px 70px rgba(0,0,0,.5);}
.ct-item{width:64px;display:flex;flex-direction:column;align-items:center;gap:6px;opacity:.5;}
.ct-item .ic{width:52px;height:52px;}
.ct-item .ic svg{width:100%;height:100%;}
.ct-item.sel{opacity:1;transform:scale(1.12);}
.ct-item .lb{color:#fff;font-size:11px;}

/* ---------- context menu ---------- */
#ctx-menu{position:fixed;z-index:9500;min-width:200px;background:rgba(246,246,246,.82);backdrop-filter:blur(30px) saturate(1.8);-webkit-backdrop-filter:blur(30px) saturate(1.8);border:1px solid rgba(0,0,0,.12);border-radius:9px;padding:5px;box-shadow:0 12px 40px rgba(0,0,0,.25);color:#1d1d1f;font-size:13px;}
html[data-theme="dark"] #ctx-menu{background:rgba(40,42,50,.82);color:#f5f5f7;border-color:rgba(255,255,255,.12);}
#ctx-menu .menu-item{justify-content:flex-start;gap:10px;}
#ctx-menu .menu-item .ic{width:16px;height:16px;flex:0 0 16px;}
#ctx-menu .menu-item .ic svg{width:100%;height:100%;}

/* ---------- toast ---------- */
#toast{position:absolute;left:50%;bottom:90px;transform:translateX(-50%);z-index:9600;background:rgba(40,42,50,.92);color:#fff;font-size:13px;padding:9px 18px;border-radius:20px;box-shadow:0 8px 30px rgba(0,0,0,.3);opacity:0;transition:opacity .3s;pointer-events:none;white-space:nowrap;}
#toast.show{opacity:1;}

/* ---------- scrollbars ---------- */
::-webkit-scrollbar{width:9px;height:9px;}
::-webkit-scrollbar-thumb{background:rgba(120,120,128,.4);border-radius:6px;border:2px solid transparent;background-clip:content-box;}
::-webkit-scrollbar-thumb:hover{background:rgba(120,120,128,.6);background-clip:content-box;border:2px solid transparent;}
::-webkit-scrollbar-corner{background:transparent;}

/* ---------- responsive ---------- */
@media (max-width:640px){
  #menu-bar{font-size:12px;}
  .mb-item{padding:2px 6px;}
  .d-icon{width:78px;}
  .d-icon .ic{width:48px;height:48px;}
  #dock{transform:translateX(-50%) scale(.85);bottom:2px;}
  .window{min-width:260px;}
}
