/* ============ Feather 3 — shell styles ============ */
:root {
  --accent: #4c8dff;
  --accent-2: #8b6cff;
  --accent-rgb: 76, 141, 255;
  --text: #f3f5f9;
  --text-2: rgba(235, 240, 250, .64);
  --text-3: rgba(235, 240, 250, .42);
  --glass: rgba(26, 28, 36, .52);
  --glass-strong: rgba(22, 24, 31, .70);
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .09);
  --surface-3: rgba(255, 255, 255, .14);
  --stroke: rgba(255, 255, 255, .10);
  --stroke-2: rgba(255, 255, 255, .18);
  --win-bg: rgba(24, 26, 33, .80);
  --blur: 30px;
  --radius: 16px;
  --ease: cubic-bezier(.2, .85, .25, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --font: "Segoe UI Variable Text", "Segoe UI Variable Display", "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "JetBrains Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; user-select: none; cursor: url('../assets/cursors/arrow.png') 3 2, default; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: url('../assets/cursors/arrow.png') 3 2, default; }
*, *::before, *::after { cursor: url('../assets/cursors/arrow.png') 3 2, default; }
input, textarea, [contenteditable], .term, .term *, .nt-area, .dlg-msg { cursor: url('../assets/cursors/text.png') 4 9, text; }
input[type=range], input[type=color], input[type=checkbox], select, select * { cursor: url('../assets/cursors/arrow.png') 3 2, default; }
button:disabled, button:disabled *, .disabled, .disabled *, [disabled], input:disabled, .f-btn:disabled { cursor: url('../assets/cursors/no.png') 11 11, not-allowed !important; }
input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .28); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::selection { background: rgba(var(--accent-rgb), .45); }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .11) 0%, rgba(255, 255, 255, .035) 38%, rgba(255, 255, 255, .02) 100%),
    var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .20),
    inset 0 -1px 0 rgba(255, 255, 255, .04),
    inset 1px 0 0 rgba(255, 255, 255, .05),
    0 20px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
}
/* specular rim (liquid glass highlight) */
.glass::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, .06) 30%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .10) 80%, rgba(255, 255, 255, .30));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .75;
}
body.liquid-on .liquid { backdrop-filter: url(#liquid) blur(18px) saturate(190%) brightness(1.05); }
body.liquid-on .liquid-strong { backdrop-filter: url(#liquid) blur(34px) saturate(190%); }
body.no-transparency { --glass: rgba(30, 32, 40, .98); --glass-strong: rgba(30, 32, 40, .99); --win-bg: rgba(28, 30, 37, 1); }
body.no-transparency .glass, body.no-transparency .window { backdrop-filter: none !important; }
body.no-anim *, body.no-anim *::before, body.no-anim *::after { transition: none !important; animation: none !important; }

/* ---------- Wallpaper ---------- */
#wallpaper, #wallpaper-next { position: fixed; inset: 0; background: #0b0d14 center/cover no-repeat; transition: opacity .8s ease, transform 1.2s var(--ease), filter .8s ease; }
#wallpaper-next { opacity: 0; }
body.locked #wallpaper { transform: scale(1.04); }
body.signing #wallpaper { filter: blur(26px) brightness(.7); transform: scale(1.08); }

/* ---------- Boot ---------- */
#boot { position: fixed; inset: 0; background: #000; z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .6s ease; }
#boot.fade { opacity: 0; pointer-events: none; }
.boot-logo { width: 120px; height: 120px; filter: drop-shadow(0 0 30px rgba(120, 160, 255, .35)); animation: bootIn 1.2s var(--ease) both; }
.boot-name { margin-top: 18px; font-size: 26px; font-weight: 300; letter-spacing: .5px; animation: bootIn 1.2s .15s var(--ease) both; }
.boot-name span { font-weight: 600; background: linear-gradient(90deg, #6fb6ff, #9b7bff); -webkit-background-clip: text; color: transparent; }
@keyframes bootIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.boot-spinner { position: relative; width: 46px; height: 46px; margin-top: 70px; }
.boot-spinner i { position: absolute; inset: 0; animation: orbit 2.2s infinite; }
.boot-spinner i::after { content: ""; position: absolute; left: 50%; top: 0; width: 5px; height: 5px; margin-left: -2.5px; background: #fff; border-radius: 50%; }
.boot-spinner i:nth-child(2) { animation-delay: .12s } .boot-spinner i:nth-child(3) { animation-delay: .24s } .boot-spinner i:nth-child(4) { animation-delay: .36s } .boot-spinner i:nth-child(5) { animation-delay: .48s }
@keyframes orbit { 0% { transform: rotate(0); opacity: 1; } 70% { transform: rotate(560deg); opacity: 1; } 75%, 100% { transform: rotate(720deg); opacity: 0; } }

/* ---------- Lock screen ---------- */
#lock { position: fixed; inset: 0; z-index: 8000; color: #fff; transition: opacity .5s ease; }
#lock.fade { opacity: 0; pointer-events: none; }
.lock-clock { position: absolute; top: 11vh; left: 0; right: 0; text-align: center; transition: transform .6s var(--ease), opacity .4s; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.lock-time { font-size: 120px; font-weight: 600; letter-spacing: -2px; line-height: 1; font-family: "Segoe UI Variable Display", var(--font); }
.lock-date { font-size: 24px; font-weight: 400; margin-top: 10px; opacity: .92; }
.lock-hint { position: absolute; bottom: 9vh; width: 100%; text-align: center; opacity: .7; font-size: 14px; animation: hint 3s ease-in-out infinite; }
@keyframes hint { 50% { opacity: .35; } }
.signin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); display: flex; flex-direction: column; align-items: center; opacity: 0; pointer-events: none; transition: all .5s var(--ease); }
body.signing .signin { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
body.signing .lock-clock { opacity: 0; transform: translateY(-60px); }
body.signing .lock-hint { opacity: 0; animation: none; }
.signin-name { font-size: 28px; font-weight: 600; margin: 16px 0 20px; }
.signin-row { display: flex; gap: 8px; align-items: center; }
.signin-row input { width: 290px; height: 40px; border-radius: 12px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .10); backdrop-filter: blur(20px); outline: none; color: #fff; border-bottom: 2px solid rgba(255, 255, 255, .4); }
.signin-row input:focus { border-bottom-color: var(--accent); background: rgba(255, 255, 255, .14); }
.signin-sub { margin-top: 18px; font-size: 12px; opacity: .55; }
.glass-btn { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); color: #fff; height: 40px; min-width: 40px; border-radius: 12px; backdrop-filter: blur(20px); transition: background .15s; }
.glass-btn:hover { background: rgba(255, 255, 255, .26); }
.glass-btn.round { border-radius: 50%; font-size: 16px; }
.lock-power { position: absolute; right: 24px; bottom: 22px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 8px rgba(0, 0, 0, .3); flex: none; }
.avatar.big { width: 150px; height: 150px; font-size: 60px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 10px 40px rgba(0, 0, 0, .4); }

/* ---------- Desktop ---------- */
#desktop { position: fixed; inset: 0; animation: deskIn .7s var(--ease); }
@keyframes deskIn { from { opacity: 0; transform: scale(1.02); } }
#desk-icons { position: absolute; inset: 8px 8px 80px 8px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 98px); grid-auto-columns: 86px; gap: 4px; align-content: start; }
.d-icon { width: 86px; height: 98px; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 10px; border: 1px solid transparent; text-align: center; }
.d-icon .ic { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.d-icon .ic img, .d-icon .ic svg { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.d-icon span { margin-top: 6px; font-size: 12px; line-height: 1.25; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 8px rgba(0, 0, 0, .4); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.d-icon:hover { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .08); }
.d-icon.sel { background: rgba(var(--accent-rgb), .28); border-color: rgba(var(--accent-rgb), .55); }
.d-icon.sel span { -webkit-line-clamp: unset; }
.d-icon.drop { background: rgba(var(--accent-rgb), .35); }
.d-icon.cut { opacity: .5; }
#select-rect { position: absolute; border: 1px solid rgba(var(--accent-rgb), .9); background: rgba(var(--accent-rgb), .18); display: none; pointer-events: none; border-radius: 3px; }
#windows { position: absolute; inset: 0; pointer-events: none; }
#windows > * { pointer-events: auto; }
#snap-preview { position: absolute; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(20px); opacity: 0; transform: scale(.96); transition: all .22s var(--ease); pointer-events: none; z-index: 99999; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
#snap-preview.show { opacity: 1; transform: scale(1); }
.drag-shield { position: fixed; inset: 0; z-index: 100000; }

/* ---------- Windows ---------- */
.window {
  position: absolute; display: flex; flex-direction: column; border-radius: var(--radius); overflow: visible;
  background: var(--win-bg);
  backdrop-filter: blur(40px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 30px 80px rgba(0, 0, 0, .55), 0 6px 20px rgba(0, 0, 0, .35);
  transition: opacity .2s ease, transform var(--spring-dur, .3s) var(--spring-ease, var(--ease)), box-shadow .3s ease, border-color .3s ease;
  transform-origin: center 70%;
}
.window:not(.active) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 40px rgba(0, 0, 0, .4); }
.window:not(.active) .titlebar { opacity: .82; }
.window.opening { opacity: 0; transform: scale(.9) translateY(18px); }
.window.closing { opacity: 0; transform: scale(.94); pointer-events: none; transition: opacity .16s ease, transform .18s ease; }
.window.minimized { opacity: 0; transform: var(--min-t); pointer-events: none; transition: opacity .3s ease .05s, transform var(--spring-soft-dur, .35s) var(--spring-soft, var(--ease)); }
.window.animating { transition: left .26s var(--ease), top .26s var(--ease), width .26s var(--ease), height .26s var(--ease), border-radius .26s; }
.window.maximized { border-radius: 0 0 14px 14px; border-top-color: transparent; }
.window.maximized .rz { display: none; }
.window.dragging { transition: none; will-change: transform; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 40px 100px rgba(0, 0, 0, .6); }
.window.resizing { transition: none; }
.w-body { flex: 1; min-height: 0; position: relative; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.titlebar { height: 42px; flex: none; display: flex; align-items: center; padding-left: 14px; gap: 10px; border-radius: var(--radius) var(--radius) 0 0; }
.w-icon { width: 18px; height: 18px; flex: none; }
.w-icon svg { width: 100%; height: 100%; }
.w-title { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.w-extra { flex: 1; display: flex; align-items: center; min-width: 0; height: 100%; }
.w-btns { display: flex; height: 100%; flex: none; }
.wb { width: 46px; height: 100%; display: grid; place-items: center; transition: background .12s; }
.wb svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.1; }
.wb:hover { background: rgba(255, 255, 255, .08); }
.wb.close { border-top-right-radius: var(--radius); }
.window.maximized .wb.close { border-top-right-radius: 0; }
.wb.close:hover { background: #e81123; }
.rz { position: absolute; z-index: 5; }
.rz-n { top: -4px; left: 8px; right: 8px; height: 8px; cursor: ns-resize; }
.rz-s { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: ns-resize; }
.rz-e { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: ew-resize; }
.rz-w { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: ew-resize; }
.rz-ne { right: -5px; top: -5px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-sw { left: -5px; bottom: -5px; width: 14px; height: 14px; cursor: nesw-resize; }
.rz-nw { left: -5px; top: -5px; width: 14px; height: 14px; cursor: nwse-resize; }
.rz-se { right: -5px; bottom: -5px; width: 14px; height: 14px; cursor: nwse-resize; }
.snap-fly { position: fixed; z-index: 100001; display: grid; grid-template-columns: repeat(4, 64px); gap: 10px; padding: 12px; border-radius: 14px; animation: pop .16s var(--ease); }
.sl { display: grid; gap: 3px; height: 44px; }
.sl i { background: rgba(255, 255, 255, .16); border-radius: 5px; border: 1px solid rgba(255, 255, 255, .12); transition: background .1s; }
.sl i:hover { background: var(--accent); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }

/* ---------- Taskbar ---------- */
#taskbar { position: fixed; left: 0; right: 0; bottom: 10px; height: 54px; z-index: 5000; display: flex; justify-content: center; pointer-events: none; animation: tbIn .7s .1s var(--ease) both; }
@keyframes tbIn { from { transform: translateY(80px); } }
#taskbar > * { pointer-events: auto; }
.tb-dock { height: 54px; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 19px; transition: all .3s var(--ease); }
body.tb-left #taskbar { justify-content: flex-start; padding-left: 10px; }
.tb-btn, .tb-app { position: relative; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; transition: background .2s ease, transform var(--spring-bouncy-dur, .3s) var(--spring-bouncy, var(--spring)); }
.tb-app:hover { transform: translateY(-3px) scale(1.06); }
.tb-btn:hover, .tb-app:hover { background: rgba(255, 255, 255, .10); }
.tb-btn:active, .tb-app:active { transform: scale(.88); }
.start-btn img { width: 26px; height: 26px; filter: drop-shadow(0 0 6px rgba(140, 170, 255, .45)); transition: transform .3s var(--spring); }
.start-btn.open img, .start-btn:hover img { transform: rotate(-12deg) scale(1.06); }
.tb-app .ic { width: 28px; height: 28px; }
.tb-app .ic svg { width: 100%; height: 100%; display: block; }
.tb-app::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 3px; background: rgba(255, 255, 255, .5); opacity: 0; transition: all .25s var(--ease); }
.tb-app.running::after { opacity: 1; }
.tb-app.active { background: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.tb-app.active::after { width: 16px; margin-left: -8px; background: var(--accent); }
.tb-app.bounce .ic { animation: bounce .5s var(--spring); }
@keyframes bounce { 40% { transform: translateY(-8px); } }
.tb-search { height: 38px; width: 200px; border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .07); color: var(--text-2); margin: 0 4px; transition: background .15s; }
.tb-search:hover { background: rgba(255, 255, 255, .12); }
.tb-search svg, .sm-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tb-sep { width: 1px; height: 26px; background: rgba(255, 255, 255, .12); margin: 0 4px; }
#tbApps { display: flex; gap: 4px; }
.tb-tray { position: absolute; right: 10px; height: 54px; display: flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 19px; }
.tray-group, .tray-clock, .tray-bell { height: 42px; border-radius: 11px; padding: 0 10px; display: flex; align-items: center; gap: 8px; transition: background .15s; }
.tray-group:hover, .tray-clock:hover, .tray-bell:hover, .tray-group.on, .tray-clock.on { background: rgba(255, 255, 255, .10); }
.ti { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tray-clock { flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; font-size: 12px; line-height: 1.35; }
.tray-bell { position: relative; padding: 0 9px; }
.tray-bell b { position: absolute; top: 9px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: none; }
.tray-bell b.on { display: block; }
.tray-btn { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; display: grid; place-items: center; transition: background .15s; color: #fff; }
.tray-btn:hover { background: rgba(255, 255, 255, .12); }
.tb-preview { position: fixed; z-index: 6000; padding: 8px; border-radius: 14px; display: flex; gap: 8px; animation: pop .15s var(--ease); }
.tb-preview .pv { width: 200px; padding: 6px 8px 8px; border-radius: 10px; transition: background .12s; }
.tb-preview .pv:hover { background: rgba(255, 255, 255, .08); }
.tb-preview .pv-t { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.tb-preview .pv-t span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tb-preview .pv-t button { width: 22px; height: 22px; border-radius: 6px; }
.tb-preview .pv-t button:hover { background: #e81123; }
.tb-preview .pv-b { height: 110px; border-radius: 8px; background: rgba(255, 255, 255, .06); display: grid; place-items: center; overflow: hidden; }
.tb-preview .pv-b svg { width: 46px; height: 46px; opacity: .9; }

/* ---------- Flyouts ---------- */
.flyout { position: fixed; z-index: 5500; border-radius: 24px; opacity: 0; pointer-events: none; transform: translateY(28px) scale(.96); transition: opacity .2s ease, transform var(--spring-dur, .3s) var(--spring-ease, var(--ease)); --glass: var(--glass-strong); }
.flyout.open { opacity: 1; pointer-events: auto; transform: none; }
#startmenu { left: 50%; bottom: 76px; width: 640px; height: 680px; max-height: calc(100vh - 100px); margin-left: -320px; display: flex; flex-direction: column; overflow: hidden; }
body.tb-left #startmenu { left: 10px; margin-left: 0; }
.sm-search { margin: 26px 30px 6px; height: 40px; border-radius: 20px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .10); border-bottom: 2px solid var(--accent); color: var(--text-2); }
.sm-search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); }
.sm-search input::placeholder { color: var(--text-3); }
.sm-body { flex: 1; overflow-y: auto; padding: 4px 30px 16px; }
.sm-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; font-weight: 600; font-size: 14px; }
.pill { height: 26px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 12px; border: 1px solid rgba(255, 255, 255, .06); transition: background .12s; }
.pill:hover { background: rgba(255, 255, 255, .15); }
.sm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sm-app { height: 84px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; transition: background .12s, transform .2s var(--spring); text-align: center; padding: 4px; }
.sm-app .ic { width: 36px; height: 36px; }
.sm-app .ic svg { width: 100%; height: 100%; }
.sm-app span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-app:hover { background: rgba(255, 255, 255, .08); }
.sm-app:active { transform: scale(.94); }
.sm-rec { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sm-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-align: left; transition: background .12s; min-width: 0; }
.sm-item:hover, .sm-item.kbd { background: rgba(255, 255, 255, .08); }
.sm-item .ic { width: 32px; height: 32px; flex: none; }
.sm-item .ic svg { width: 100%; height: 100%; }
.sm-item div { min-width: 0; }
.sm-item b { display: block; font-weight: 400; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-item small { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sm-letter { font-size: 12px; font-weight: 600; color: var(--accent); margin: 14px 12px 4px; }
.sm-foot { height: 66px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: rgba(0, 0, 0, .18); border-top: 1px solid rgba(255, 255, 255, .07); }
.sm-user { display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 8px; border-radius: 10px; }
.sm-user:hover { background: rgba(255, 255, 255, .08); }
.sm-power-wrap { position: relative; }
#powerMenu { position: absolute; right: 0; bottom: 48px; min-width: 170px; }

#quick { right: 10px; bottom: 76px; width: 380px; padding: 20px; }
.qs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qs-tile { height: 86px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 14px; gap: 2px; text-align: left; transition: all .15s; }
.qs-tile:hover { background: rgba(255, 255, 255, .12); }
.qs-tile .qs-ic { font-size: 17px; margin-bottom: 4px; }
.qs-tile span { font-size: 12.5px; }
.qs-tile small { font-size: 11px; color: var(--text-3); }
.qs-tile.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.qs-tile.on small { color: rgba(255, 255, 255, .8); }
.qs-slider { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 0 4px; }
.qs-slider span { width: 22px; text-align: center; }
.qs-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 12px; color: var(--text-2); }
input[type=range] { -webkit-appearance: none; flex: 1; height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p, 50%), rgba(255, 255, 255, .25) var(--p, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: border-width .12s; }
input[type=range]::-webkit-slider-thumb:hover { border-width: 4px; }

#calendar { right: 10px; bottom: 76px; width: 360px; padding: 18px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.nc-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 10px; }
#ncList { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.nc-empty { color: var(--text-3); text-align: center; padding: 24px 0; font-size: 13px; }
.nc-item { display: flex; gap: 12px; padding: 12px; background: rgba(255, 255, 255, .06); border-radius: 12px; font-size: 12.5px; animation: pop .2s var(--ease); }
.nc-item .ic { width: 22px; height: 22px; flex: none; }
.nc-item .ic img, .nc-item .ic svg { width: 100%; height: 100%; }
.nc-item b { display: block; margin-bottom: 2px; }
.nc-item span { color: var(--text-2); }
.nc-item time { color: var(--text-3); font-size: 11px; margin-left: auto; white-space: nowrap; }
.cal { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head button { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
.cal-head button:hover { background: rgba(255, 255, 255, .1); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; }
.cal-grid .dow { color: var(--text-3); font-size: 11.5px; padding: 6px 0; }
.cal-grid .d { height: 38px; display: grid; place-items: center; border-radius: 50%; }
.cal-grid .d:hover { background: rgba(255, 255, 255, .08); }
.cal-grid .d.mute { color: var(--text-3); }
.cal-grid .d.today { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 10px rgba(var(--accent-rgb), .5); }

/* ---------- Menus ---------- */
.menu { position: fixed; z-index: 100002; min-width: 220px; padding: 5px; border-radius: 12px; --glass: rgba(34, 36, 45, .78); }
.menu.pop { animation: pop .14s var(--ease); }
.menu button { width: 100%; height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 7px; text-align: left; font-size: 13px; position: relative; }
.menu button:hover { background: rgba(255, 255, 255, .09); }
.menu button.disabled { opacity: .4; pointer-events: none; }
.menu .mi-ic { width: 18px; display: grid; place-items: center; font-size: 14px; }
.menu .mi-ic svg { width: 16px; height: 16px; }
.menu .mi-l { flex: 1; }
.menu .mi-h { color: var(--text-3); font-size: 11.5px; }
.menu .sep { height: 1px; background: rgba(255, 255, 255, .09); margin: 4px 6px; }
.menu .submenu { display: none; position: absolute; left: 100%; top: -5px; margin-left: 4px; }
.menu button.has-sub:hover > .submenu { display: block; }

/* ---------- Toasts & dialogs ---------- */
#toasts { position: fixed; right: 14px; bottom: 80px; z-index: 7000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; width: 360px; padding: 14px 16px; border-radius: 16px; display: flex; gap: 14px; align-items: flex-start; transform: translateX(120%); transition: transform .45s var(--spring), opacity .3s; --glass: var(--glass-strong); }
.toast.in { transform: none; }
.toast-ic { width: 28px; height: 28px; flex: none; }
.toast-ic img, .toast-ic svg { width: 100%; height: 100%; }
.toast-tx b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.toast-tx span { font-size: 12.5px; color: var(--text-2); }
#dialog-layer { position: fixed; inset: 0; z-index: 90000; pointer-events: none; }
.dlg-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); display: grid; place-items: center; pointer-events: auto; animation: fadeIn .15s; }
.dlg-back.out { opacity: 0; transition: opacity .15s; }
@keyframes fadeIn { from { opacity: 0; } }
.dialog { width: 440px; border-radius: 18px; padding: 24px; animation: pop .2s var(--ease); --glass: var(--glass-strong); }
.dlg-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.dlg-ic { width: 26px; height: 26px; } .dlg-ic svg { width: 100%; height: 100%; }
.dlg-msg { color: var(--text-2); font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; white-space: pre-wrap; user-select: text; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.f-input { width: 100%; height: 36px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); border-bottom: 2px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); padding: 0 12px; outline: none; color: var(--text); }
.f-input:focus { border-bottom-color: var(--accent); background: rgba(0, 0, 0, .25); }
.f-btn { height: 34px; min-width: 96px; padding: 0 16px; border-radius: 8px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .1); transition: all .12s; font-size: 13px; }
.f-btn:hover { background: rgba(255, 255, 255, .15); }
.f-btn:active { transform: scale(.97); }
.f-btn.primary { background: var(--accent); border-color: rgba(255, 255, 255, .2); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.f-btn.primary:hover { filter: brightness(1.1); }
.f-btn:disabled { opacity: .45; pointer-events: none; }

#nightlight { position: fixed; inset: 0; z-index: 99990; pointer-events: none; background: rgba(255, 140, 40, .0); mix-blend-mode: multiply; transition: background .6s; }
#nightlight.on { background: rgba(255, 150, 60, .32); }
#dimmer { position: fixed; inset: 0; z-index: 99991; pointer-events: none; background: #000; opacity: 0; transition: opacity .2s; }
#shutdown { position: fixed; inset: 0; z-index: 99999; background: #050608; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; font-size: 22px; font-weight: 300; animation: fadeIn .5s; }
#shutdown .boot-spinner { margin: 0; }
.app-error { padding: 30px; color: #ff9a9a; }

.tray-btn .li, .glass-btn .li { width: 18px; height: 18px; }
#powerMenu .mi-ic .li { width: 16px; height: 16px; }
.qs-slider span .li { width: 18px; height: 18px; margin: 0 auto; }
.qs-batt, .qs-set { display: inline-flex; align-items: center; gap: 6px; }
.qs-batt .li, .qs-set .li { width: 15px; height: 15px; }
.menu .mi-ic .li { width: 16px; height: 16px; }
.x-cmd .li { width: 16px; height: 16px; }
.nt-tool .li, .pt-tool .li, .ph-btn .li, .bw-btn .li { width: 17px; height: 17px; margin: auto; }
.st-row-ic .li { width: 20px; height: 20px; margin: auto; }
.ck .li { width: 20px; height: 20px; margin: auto; }
.calc-mode { display: flex; align-items: center; gap: 10px; }
.calc-mode .li { width: 18px; height: 18px; }
.bw-tx .li { width: 12px; height: 12px; margin: auto; }
.mu-play .li { width: 18px; height: 18px; margin: auto; } .mu-ctl .ph-btn .li { width: 15px; height: 15px; }
.ms-c .li { width: 60%; height: 60%; margin: auto; display: block; }
.gm-hud .li { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.wx-ic { display: inline-grid; place-items: center; } .wx-ic svg { width: 100%; height: 100%; }
