/* ultraspace — desktop shell styles */

:root {
  --accent: #7c6cf2;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-text: #fff;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* Dark is the default theme. */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --text: #f1f1f5;
  --text-2: #b4b4c2;
  --muted: #8b8b9c;
  --win-bg: #17171d;
  --win-bg-2: #1d1d25;
  --win-bar: #1f1f28;
  --side-bg: #1a1a21;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --hover: rgba(255, 255, 255, .06);
  --active: rgba(255, 255, 255, .1);
  --field: rgba(255, 255, 255, .06);
  --glass: rgba(22, 22, 30, .55);
  --glass-strong: rgba(24, 24, 32, .82);
  --glass-border: rgba(255, 255, 255, .12);
  --shadow-win: 0 30px 80px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .5);
  --chart-grid: rgba(255, 255, 255, .07);
}

[data-theme="light"] {
  color-scheme: light;
  --text: #17171c;
  --text-2: #3f3f4a;
  --muted: #6e6e7c;
  --win-bg: #ffffff;
  --win-bg-2: #f7f7fa;
  --win-bar: #f3f3f7;
  --side-bg: #f5f5f8;
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .14);
  --hover: rgba(0, 0, 0, .045);
  --active: rgba(0, 0, 0, .075);
  --field: rgba(0, 0, 0, .045);
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(250, 250, 253, .86);
  --glass-border: rgba(255, 255, 255, .6);
  --shadow-win: 0 30px 80px rgba(20, 20, 40, .25), 0 8px 24px rgba(20, 20, 40, .12);
  --shadow-pop: 0 18px 50px rgba(20, 20, 40, .2);
  --chart-grid: rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #0b1026; color: var(--text); line-height: 1.4; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.i { flex: none; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--active); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.boot { display: grid; place-items: center; height: 100vh; }

/* Logo: a rounded tile with an orbit. */
.logo-mark {
  position: relative; display: inline-block; width: 18px; height: 18px; border-radius: 6px; flex: none;
  background: linear-gradient(135deg, #a78bfa, var(--accent) 55%, #22d3ee);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.logo-mark::before {
  content: ""; position: absolute; inset: 25%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .95);
}
.logo-mark::after {
  content: ""; position: absolute; width: 22%; height: 22%; right: 14%; top: 14%; border-radius: 50%; background: #fff;
}
.logo-mark.big { width: 64px; height: 64px; border-radius: 18px; }
.logo-mark.big::before { border-width: 5px; }

/* ---------- glass ---------- */

.glass {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
}
[data-glass="on"] .glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

/* ---------- wallpapers ---------- */

.desktop, .lock { position: fixed; inset: 0; overflow: hidden; background-color: #0b1026; background-size: cover; background-position: center; }
.wp-aurora {
  background-image:
    radial-gradient(55% 45% at 12% 18%, rgba(139, 92, 246, .75), transparent 70%),
    radial-gradient(45% 40% at 88% 12%, rgba(14, 165, 233, .6), transparent 70%),
    radial-gradient(60% 55% at 72% 92%, rgba(16, 185, 129, .45), transparent 70%),
    radial-gradient(45% 45% at 28% 82%, rgba(236, 72, 153, .35), transparent 70%),
    linear-gradient(160deg, #0d1230, #060816);
}
.wp-dusk {
  background-image:
    radial-gradient(60% 50% at 18% 85%, rgba(249, 115, 22, .65), transparent 70%),
    radial-gradient(55% 50% at 85% 18%, rgba(139, 92, 246, .7), transparent 70%),
    radial-gradient(40% 40% at 55% 50%, rgba(236, 72, 153, .3), transparent 70%),
    linear-gradient(170deg, #1e1b4b, #0f0a1f);
}
.wp-ocean {
  background-image:
    radial-gradient(60% 50% at 80% 80%, rgba(6, 182, 212, .6), transparent 70%),
    radial-gradient(55% 50% at 15% 20%, rgba(59, 130, 246, .65), transparent 70%),
    radial-gradient(35% 35% at 50% 55%, rgba(99, 102, 241, .35), transparent 70%),
    linear-gradient(170deg, #071a3a, #020617);
}
.wp-forest {
  background-image:
    radial-gradient(60% 50% at 20% 25%, rgba(34, 197, 94, .5), transparent 70%),
    radial-gradient(50% 50% at 85% 75%, rgba(20, 184, 166, .5), transparent 70%),
    radial-gradient(40% 40% at 60% 20%, rgba(132, 204, 22, .25), transparent 70%),
    linear-gradient(170deg, #0b2218, #03100b);
}
.wp-sunset {
  background-image:
    radial-gradient(55% 50% at 20% 20%, rgba(251, 113, 133, .75), transparent 70%),
    radial-gradient(55% 50% at 85% 30%, rgba(245, 158, 11, .6), transparent 70%),
    radial-gradient(60% 55% at 50% 100%, rgba(168, 85, 247, .65), transparent 70%),
    linear-gradient(170deg, #3b1036, #140818);
}
.wp-graphite {
  background-image:
    radial-gradient(60% 50% at 25% 20%, rgba(148, 163, 184, .28), transparent 70%),
    radial-gradient(50% 50% at 80% 80%, rgba(100, 116, 139, .25), transparent 70%),
    linear-gradient(170deg, #1c1c22, #09090b);
}
.wp-dawn {
  background-image:
    radial-gradient(55% 50% at 15% 20%, rgba(251, 207, 232, .95), transparent 70%),
    radial-gradient(55% 50% at 85% 25%, rgba(191, 219, 254, .95), transparent 70%),
    radial-gradient(60% 55% at 55% 95%, rgba(221, 214, 254, .95), transparent 70%),
    linear-gradient(170deg, #f8fafc, #eef2ff);
}
.wp-mist {
  background-image:
    radial-gradient(55% 50% at 20% 80%, rgba(167, 243, 208, .9), transparent 70%),
    radial-gradient(55% 50% at 80% 20%, rgba(186, 230, 253, .95), transparent 70%),
    radial-gradient(40% 40% at 60% 60%, rgba(254, 240, 138, .5), transparent 70%),
    linear-gradient(170deg, #f0fdf4, #ecfeff);
}

/* ---------- menu bar ---------- */

.menubar {
  position: absolute; top: 0; left: 0; right: 0; height: 32px; z-index: 9000;
  display: flex; align-items: center; gap: 2px; padding: 0 8px;
  border-width: 0 0 1px; border-radius: 0; font-size: 13px; color: var(--text);
}
.mb-item {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px;
  color: var(--text); white-space: nowrap;
}
.mb-item:hover { background: var(--hover); }
.mb-logo { padding: 0 8px; }
.mb-app { font-weight: 650; padding: 0 8px; }
.mb-spacer { flex: 1; }
.mb-stats { display: flex; gap: 0; }
.mb-stat { font-variant-numeric: tabular-nums; color: var(--text-2); }
.mb-stat .mb-val { min-width: 30px; }
.mb-clock { padding: 0 8px; font-variant-numeric: tabular-nums; font-weight: 500; }
.mb-music { max-width: 220px; color: var(--accent); }
.mb-music span { overflow: hidden; text-overflow: ellipsis; }
.mb-user { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dock ---------- */

.dock-wrap { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; z-index: 9000; pointer-events: none; }
.dock {
  pointer-events: auto; display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px 10px; border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }
.dock-item { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 2px; }
.dock-tile {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 6px rgba(0, 0, 0, .15), 0 4px 12px rgba(0, 0, 0, .3);
  transition: transform .22s var(--ease);
}
.dock-tile .i { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.dock-item:hover .dock-tile { transform: translateY(-8px) scale(1.12); }
.dock-item:active .dock-tile { transform: translateY(-4px) scale(1.04); filter: brightness(.9); }
.dock-dot { width: 4px; height: 4px; border-radius: 50%; margin-top: 4px; background: transparent; }
.dock-item.running .dock-dot { background: var(--text); }
.dock-label {
  position: absolute; bottom: calc(100% + 16px); padding: 4px 9px; border-radius: 7px; font-size: 12px; white-space: nowrap;
  background: var(--glass-strong); border: 1px solid var(--glass-border); color: var(--text);
  opacity: 0; transform: translateY(4px); transition: .15s; pointer-events: none;
}
.dock-item:hover .dock-label { opacity: 1; transform: none; }

/* ---------- widgets ---------- */

.widgets {
  position: absolute; top: 52px; right: 20px; width: 300px; display: flex; flex-direction: column; gap: 14px; z-index: 1;
}
.widget { border-radius: 22px; padding: 16px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); color: var(--text); }
.w-sys, .w-net { cursor: pointer; }
.w-clock { padding: 18px 20px; }
.w-time { font-size: 54px; font-weight: 250; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.w-date { margin-top: 8px; font-size: 15px; font-weight: 550; }
.w-greet { margin-top: 2px; color: var(--text-2); font-size: 13px; }
.w-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); text-transform: uppercase; }
.w-sub { margin-top: 10px; font-size: 12px; color: var(--text-2); text-align: center; }
.rings { display: flex; justify-content: space-between; margin-top: 12px; }
.ring-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ring-wrap { position: relative; width: 70px; height: 70px; }
.ring { width: 70px; height: 70px; }
.ring-bg { stroke: var(--active); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.ring-fg.warn { stroke: var(--warn); }
.ring-fg.crit { stroke: var(--danger); }
.ring-value { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 650; font-size: 15px; font-variant-numeric: tabular-nums; }
.ring-label { font-size: 12px; color: var(--text-2); }
.w-net-vals { margin-left: auto; display: flex; gap: 10px; text-transform: none; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.w-net-vals span { display: inline-flex; align-items: center; gap: 2px; }
.w-net-vals .rx { color: #38bdf8; }
.w-net-vals .tx { color: #f472b6; }
.w-chart { display: block; width: 100%; height: 64px; margin-top: 10px; }

/* ---------- windows ---------- */

.windows { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.windows > * { pointer-events: auto; }
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: var(--win-bg); color: var(--text); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
  transition: box-shadow .2s, opacity .16s var(--ease), transform .16s var(--ease);
}
.win.focused { box-shadow: var(--shadow-win); }
.win.opening { opacity: 0; transform: scale(.96) translateY(8px); }
.win.closing { opacity: 0; transform: scale(.96); }
.win.minimized { opacity: 0; transform: scale(.6) translateY(50vh); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.win.dragging { transition: none; user-select: none; }
.win.maximized { left: 0 !important; top: 32px !important; width: 100% !important; height: calc(100% - 32px - 86px) !important; border-radius: 0; border-width: 0 0 1px; }
.win.snap-left, .win.snap-right { top: 32px !important; width: 50% !important; height: calc(100% - 32px - 86px) !important; border-radius: 0; }
.win.snap-left { left: 0 !important; }
.win.snap-right { left: 50% !important; }
.snap-preview { position: absolute; top: 36px; bottom: 90px; border-radius: 14px; background: var(--accent-soft); border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); z-index: 99999; transition: .15s; pointer-events: none; }
.snap-preview.max { left: 4px; right: 4px; }
.snap-preview.left { left: 4px; right: 50%; }
.snap-preview.right { left: 50%; right: 4px; }

.win-bar {
  flex: none; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--win-bar); border-bottom: 1px solid var(--border); user-select: none; cursor: default; touch-action: none;
}
.win-title { flex: 1; text-align: center; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 40px; color: var(--text-2); }
.win.focused .win-title { color: var(--text); }
.win-actions { display: flex; align-items: center; gap: 4px; margin-left: -40px; }
.win-actions .viewer-count { font-size: 12px; color: var(--muted); padding: 0 6px; font-variant-numeric: tabular-nums; }
.lights { display: flex; gap: 8px; }
.light { width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; color: transparent; background: var(--active); }
.win.focused .light.close { background: #ff5f57; }
.win.focused .light.min { background: #febc2e; }
.win.focused .light.max { background: #28c840; }
.lights:hover .light { color: rgba(0, 0, 0, .6); }
.lights:hover .light.close { background: #ff5f57; }
.lights:hover .light.min { background: #febc2e; }
.lights:hover .light.max { background: #28c840; }
.light .i { stroke-width: 3; }
.win-body { flex: 1; min-height: 0; display: flex; outline: none; }
.rz { position: absolute; z-index: 5; touch-action: none; }
.rz-n, .rz-s { left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.rz-n { top: -3px; } .rz-s { bottom: -3px; }
.rz-e, .rz-w { top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rz-e { right: -3px; } .rz-w { left: -3px; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 14px; height: 14px; }
.rz-ne { top: -4px; right: -4px; cursor: nesw-resize; }
.rz-sw { bottom: -4px; left: -4px; cursor: nesw-resize; }
.rz-nw { top: -4px; left: -4px; cursor: nwse-resize; }
.rz-se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.win.maximized .rz, .win.snap-left .rz, .win.snap-right .rz { display: none; }

/* ---------- common controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: var(--r-sm); background: var(--field); border: 1px solid var(--border); color: var(--text);
  font-weight: 550; white-space: nowrap; transition: background .12s, filter .12s;
}
.btn:hover:not(:disabled) { background: var(--active); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-text); }
.btn.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
.btn.danger-solid { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger-solid:hover { background: var(--danger); filter: brightness(1.1); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.icon-btn.on { color: var(--accent); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; }
.link-btn.danger { color: var(--danger); }
.input {
  height: 32px; padding: 0 11px; border-radius: var(--r-sm); width: 100%;
  background: var(--field); border: 1px solid var(--border); outline: none; transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input { width: 220px; flex: 0 1 220px; min-width: 110px; padding-left: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%238b8b9c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; }
.field-label { display: block; font-size: 12px; font-weight: 550; color: var(--text-2); margin: 12px 0 5px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--field); border: 1px solid var(--border); gap: 2px; }
.seg-btn { height: 26px; min-width: 30px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 7px; color: var(--text-2); font-size: 13px; font-weight: 550; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--win-bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.seg.big .seg-btn { height: 34px; padding: 0 16px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.meter { height: 7px; border-radius: 9px; background: var(--active); overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--accent); border-radius: 9px; transition: width .5s var(--ease); }
.meter.thin { height: 5px; }
.meter.warn > div { background: var(--warn); }
.meter.crit > div { background: var(--danger); }
.range { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--fill, 0%), var(--active) var(--fill, 0%)); outline: none; cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); opacity: 0; transition: opacity .12s; }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover { background: linear-gradient(to right, var(--accent) var(--fill, 0%), var(--active) var(--fill, 0%)); }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.switch { -webkit-appearance: none; appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--active); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.active { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.failed { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.dot.activating, .dot.deactivating, .dot.reloading { background: var(--warn); }
.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--active); color: var(--text-2); white-space: nowrap; }
.pill.active { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.failed { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- app layout ---------- */

.app { flex: 1; display: flex; min-width: 0; min-height: 0; position: relative; }
.side {
  width: 200px; flex: none; display: flex; flex-direction: column; padding: 12px 10px; gap: 2px;
  background: var(--side-bg); border-right: 1px solid var(--border); overflow-y: auto;
}
.side-title { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 6px; }
.side-title:first-child { padding-top: 2px; }
.side-list { display: flex; flex-direction: column; gap: 1px; }
.side-item {
  display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; text-align: left; min-width: 0;
}
.side-item span:not(.cover):not(.side-count) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side-item .i { color: var(--muted); }
.side-item:hover { background: var(--hover); color: var(--text); }
.side-item.active { background: var(--accent-soft); color: var(--text); }
.side-item.active .i { color: var(--accent); }
.side-item.drop-hover { background: var(--accent); color: #fff; }
.side-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-fill { flex: 1; }
.side-storage { padding: 10px; font-size: 12px; }
.side-storage-head { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.side-storage-sub { color: var(--muted); margin-top: 6px; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--win-bg); }
.toolbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); min-height: 48px; }
.tb-group { display: flex; gap: 2px; }
.tb-spacer { flex: 1; }
.statusbar { flex: none; display: flex; align-items: center; gap: 12px; height: 30px; padding: 0 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); background: var(--win-bg-2); }
.status-sel { color: var(--text-2); font-weight: 550; }
.scroll { overflow: auto; flex: 1; min-height: 0; }
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; color: var(--muted); text-align: center; height: 100%; }
.empty-state .i { opacity: .5; }
.empty-state.small { padding: 24px; font-size: 13px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.empty-sub { max-width: 360px; font-size: 13px; line-height: 1.5; }
.pad { padding: 16px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 12px; background: var(--win-bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover td { background: var(--hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover, .table th.sorted { color: var(--text); }

/* ---------- Files ---------- */

.crumbs { display: flex; align-items: center; gap: 1px; min-width: 0; overflow: hidden; flex: 1 1 auto; }
.crumb { display: inline-flex; align-items: center; height: 28px; padding: 0 7px; border-radius: 6px; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.crumb:last-child { color: var(--text); }
button.crumb:hover { background: var(--hover); color: var(--text); }
.crumb.drop-hover { background: var(--accent); color: #fff; }
.crumb-sep { color: var(--muted); }
.files-content { flex: 1; overflow: auto; outline: none; position: relative; }
.files-content.dragover::after { content: "Drop to upload"; position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: var(--r-md); background: var(--accent-soft); display: grid; place-items: center; font-weight: 600; color: var(--text); pointer-events: none; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; padding: 14px; align-content: start; }
.file-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: var(--r-md);
  text-align: center; user-select: none; cursor: default; border: 1px solid transparent;
}
.file-tile:hover { background: var(--hover); }
.file-tile.selected { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.file-tile.drop-hover { background: var(--accent); color: #fff; }
.thumb { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; flex: none; }
.thumb.img { overflow: hidden; background: var(--active); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.thumb.img img { width: 100%; height: 100%; object-fit: cover; }
.file-name { font-size: 12.5px; font-weight: 500; line-height: 1.3; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.file-meta { font-size: 11px; color: var(--muted); min-height: 13px; }
.k-folder { color: #60a5fa; }
.thumb.k-folder .i { fill: color-mix(in srgb, #60a5fa 30%, transparent); }
.k-image { color: #fbbf24; }
.k-video { color: #f472b6; }
.k-audio { color: #fb7185; }
.k-archive { color: #a78bfa; }
.k-code { color: #34d399; }
.k-text, .k-pdf { color: #94a3b8; }
.k-file { color: var(--muted); }
.file-table tr { cursor: default; user-select: none; }
.file-table tr.selected td { background: var(--accent-soft) !important; }
.file-table tr.drop-hover td { background: var(--accent) !important; color: #fff; }
.row-name { display: flex; align-items: center; gap: 10px; font-weight: 500; overflow-wrap: anywhere; }
.row-icon { display: inline-flex; }

/* Upload tray */
.uploads { position: fixed; right: 16px; bottom: 100px; width: min(330px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; z-index: 9500; }
.upload { border-radius: var(--r-md); padding: 10px 12px; font-size: 12px; color: var(--text); box-shadow: var(--shadow-pop); }
.up-head { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 7px; min-width: 0; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-status { display: block; margin-top: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.upload.done .meter > div { background: var(--ok); }
.upload.failed .meter > div { background: var(--danger); }

/* ---------- System ---------- */

.pane { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.pane-flush { padding: 0; gap: 0; overflow: hidden; }
.cards { display: grid; gap: 14px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--win-bg-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.card-big { margin-left: auto; font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.card-sub { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.chart { display: block; width: 100%; height: 110px; }
.legend.rx { color: #38bdf8; }
.legend.tx { color: #f472b6; }
.disk-list { display: flex; flex-direction: column; gap: 14px; }
.disk-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; gap: 8px; }
.proc-table { table-layout: fixed; }
.proc-table th:nth-child(2) { width: 96px; }
.proc-table th:nth-child(3) { width: 84px; }
.proc-table th:nth-child(4) { width: 76px; }
.proc-table th:nth-child(5) { width: 128px; }
.proc-table th:nth-child(6) { width: 82px; }
.proc-table td { padding-top: 6px; padding-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-name { display: flex; flex-direction: column; min-width: 0; }
.proc-name > span:first-child { font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.proc-cmd { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.hot { color: var(--warn); font-weight: 650; }
.split { flex: 1; display: grid; grid-template-columns: minmax(260px, 38%) 1fr; min-height: 0; }
.svc-list { border-right: 1px solid var(--border); padding: 6px; }
.svc { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); text-align: left; }
.svc:hover { background: var(--hover); }
.svc.active { background: var(--accent-soft); }
.svc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.svc-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-desc { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.svc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.svc-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.logbox { flex: 1; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.55; padding: 8px 0; background: var(--win-bg-2); }
.log { display: flex; gap: 12px; padding: 1px 14px; }
.log:hover { background: var(--hover); }
.log-time { color: var(--muted); white-space: nowrap; flex: none; }
.log-src { color: var(--accent); white-space: nowrap; flex: none; width: 130px; overflow: hidden; text-overflow: ellipsis; }
.log-msg { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.log.p0 .log-msg, .log.p1 .log-msg, .log.p2 .log-msg, .log.p3 .log-msg { color: var(--danger); }
.log.p4 .log-msg { color: var(--warn); }
.log.p7 .log-msg { color: var(--muted); }
.log-note { display: flex; align-items: center; gap: 8px; margin: 6px 14px 10px; padding: 8px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); font-family: var(--font); }

/* ---------- Music ---------- */

.app-music { display: grid; grid-template-columns: 210px 1fr; grid-template-rows: 1fr auto; }
.app-music .side { grid-row: 1; }
.app-music .main { grid-row: 1; }
.app-music .player { grid-column: 1 / -1; }
.side-albums .side-item { height: 38px; }
.music-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 6px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; padding: 14px 22px 26px; }
.album-card { cursor: pointer; min-width: 0; }
.album-art { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); transition: transform .2s var(--ease); }
.album-card:hover .album-art { transform: translateY(-3px); }
.album-play {
  position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(6px); transition: .18s var(--ease);
}
.album-card:hover .album-play { opacity: 1; transform: none; }
.album-name { margin-top: 10px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover { display: grid; place-items: center; overflow: hidden; flex: none; color: rgba(255, 255, 255, .85); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.fill { width: 100%; height: 100%; }
.cover.lg { width: 180px; height: 180px; border-radius: var(--r-md); box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.cover.md { width: 64px; height: 64px; border-radius: 10px; }
.cover.sm { width: 48px; height: 48px; border-radius: 8px; }
.cover.xs { width: 28px; height: 28px; border-radius: 6px; }
.hero { display: flex; align-items: flex-end; gap: 24px; padding: 26px 24px 20px; background: linear-gradient(180deg, var(--accent-soft), transparent); }
.hero-kicker { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.hero-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0; overflow-wrap: anywhere; }
.hero-sub { color: var(--text-2); font-size: 13px; }
.hero-actions { display: flex; gap: 8px; margin-top: 16px; }
.song-table { margin-bottom: 18px; }
.song-table td { padding-top: 8px; padding-bottom: 8px; }
.song-table tr { cursor: default; }
.w-num { width: 46px; position: relative; color: var(--muted); }
.row-play { position: absolute; inset: 0; display: none; place-items: center; color: var(--text); }
.song-table tr:hover .row-play { display: grid; }
.song-table tr:hover .n, .song-table tr:hover .eq { visibility: hidden; }
.song { display: flex; align-items: center; gap: 12px; min-width: 0; }
.song-title { font-weight: 550; }
.song-artist { font-size: 12px; color: var(--muted); }
.song-table tr.playing .song-title { color: var(--accent); }
.eq { display: none; gap: 2px; align-items: flex-end; justify-content: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.song-table tr.playing .n { display: none; }
.song-table tr.playing .eq { display: flex; }
.music-content.paused .eq i { animation-play-state: paused; }

.player {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1.4fr) minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 10px 16px; border-top: 1px solid var(--border); background: var(--win-bar);
}
.p-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.p-cover:empty { width: 48px; height: 48px; border-radius: 8px; background: var(--active); flex: none; }
.p-meta { min-width: 0; }
.p-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-controls { display: flex; align-items: center; gap: 10px; }
.p-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--win-bg); transition: transform .12s; }
.p-play:hover { transform: scale(1.06); }
.p-seek { display: flex; align-items: center; gap: 10px; width: 100%; }
.p-seek .range { flex: 1; }
.p-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.p-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.range.vol { width: 100px; }
#repeat-one, .icon-btn[data-mode="one"] { position: relative; }
.icon-btn[data-mode="one"]::after { content: "1"; position: absolute; font-size: 8px; font-weight: 800; right: 4px; top: 4px; }

/* ---------- Editor & viewer ---------- */

.app-editor { flex-direction: column; background: var(--win-bg); }
.ed-path { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.ed-path b { color: var(--text); font-weight: 600; }
.ed-state { font-size: 12px; color: var(--warn); }
.editor-area {
  flex: 1; width: 100%; resize: none; border: 0; outline: none; padding: 14px 18px; tab-size: 4;
  background: var(--win-bg); color: var(--text); font-family: var(--mono); font-size: 13px; line-height: 1.6;
}
.editor-area.nowrap { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.app-viewer { background: #09090b; }
.viewer-stage { flex: 1; display: grid; place-items: center; min-height: 0; padding: 12px; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .15s; }
.app-viewer:hover .viewer-nav { opacity: 1; }
.viewer-nav:hover { background: rgba(0, 0, 0, .65); }
.viewer-nav.prev { left: 14px; }
.viewer-nav.next { right: 14px; }

/* ---------- Settings ---------- */

.settings-main { padding: 0; }
.settings-page { padding: 22px 26px 30px; max-width: 640px; display: flex; flex-direction: column; gap: 26px; }
.set-group h3 { margin: 0 0 4px; font-size: 14px; }
.set-group > .seg, .set-group > .swatches, .set-group > .wall-grid, .set-group > .btn { margin-top: 10px; }
.set-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); display: block; font-weight: 400; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); transition: transform .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { box-shadow: 0 0 0 2px var(--win-bg), 0 0 0 4px var(--text); }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.wall { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.wall-prev { display: block; aspect-ratio: 16 / 10; border-radius: 10px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px var(--border); transition: transform .15s; }
.wall:hover .wall-prev { transform: scale(1.03); }
.wall.active .wall-prev { box-shadow: 0 0 0 2px var(--win-bg), 0 0 0 4px var(--accent); }
.wall-name { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--win-bg-2); border: 1px solid var(--border); cursor: pointer; }
.set-form { max-width: 360px; }
.set-form .btn { margin-top: 8px; }
.account-card { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 14px; border-radius: var(--r-md); background: var(--win-bg-2); border: 1px solid var(--border); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 18px; color: #fff; background: linear-gradient(135deg, #a78bfa, var(--accent)); flex: none; }
.account-name { font-weight: 650; font-size: 15px; }
.about-hero { display: flex; align-items: center; gap: 18px; }
.about-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- menus, dialogs, toasts, launcher ---------- */

.menu {
  position: fixed; z-index: 100000; min-width: 210px; padding: 5px; border-radius: 11px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-pop); color: var(--text);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  animation: pop .12s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; text-align: left; }
.menu-item .i { color: var(--text-2); width: 16px; }
.menu-item:hover:not(:disabled) { background: var(--accent); color: #fff; }
.menu-item:hover:not(:disabled) .i, .menu-item:hover:not(:disabled) .menu-hint { color: #fff; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .i { color: var(--danger); }
.menu-item.danger:hover:not(:disabled) { background: var(--danger); }
.menu-label { flex: 1; }
.menu-hint { font-size: 11px; color: var(--muted); }
.menu-sep { height: 1px; margin: 5px 8px; background: var(--border); }

.dialog-back { position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .35); animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.dialog {
  width: 100%; max-width: 400px; padding: 20px; border-radius: 16px; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-pop);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  animation: pop .15s var(--ease);
}
.dialog h3 { margin: 0 0 4px; font-size: 16px; }
.dialog-text { margin: 6px 0 0; color: var(--text-2); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

#toasts { position: fixed; top: 44px; right: 16px; z-index: 100002; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 13px; pointer-events: auto;
  background: var(--glass-strong); border: 1px solid var(--glass-border); color: var(--text); box-shadow: var(--shadow-pop);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: slide .2s var(--ease); transition: .3s;
}
.toast .i { color: var(--ok); }
.toast.error .i { color: var(--danger); }
.toast.out { opacity: 0; transform: translateX(20px); }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }

.launcher-back { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(0, 0, 0, .25); animation: fade .1s; }
.launcher { width: 100%; max-width: 620px; max-height: 60vh; display: flex; flex-direction: column; border-radius: 18px; box-shadow: var(--shadow-pop); overflow: hidden; animation: pop .14s var(--ease); color: var(--text); }
[data-glass="off"] .launcher, .launcher { background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); }
.launcher-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--muted); }
.launcher-input { flex: 1; border: 0; outline: none; background: transparent; font-size: 19px; color: var(--text); }
kbd { font-family: var(--font); font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--muted); }
.launcher-results { overflow-y: auto; padding: 6px; }
.launcher-group { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px 4px; }
.launcher-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; text-align: left; }
.launcher-item.active { background: var(--accent); color: #fff; }
.launcher-item.active .li-sub { color: rgba(255, 255, 255, .8); }
.li-tile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.li-tile.file { background: var(--active); }
.launcher-item.active .li-tile.file { background: rgba(255, 255, 255, .2); color: #fff; }
.li-text { display: flex; flex-direction: column; min-width: 0; }
.li-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launcher-empty { padding: 22px; text-align: center; color: var(--muted); }

/* ---------- lock screen ---------- */

.lock { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 24px; color: #fff; transition: opacity .28s, transform .28s; }
.lock.unlocking { opacity: 0; transform: scale(1.04); }
.lock-clock { text-align: center; text-shadow: 0 2px 20px rgba(0, 0, 0, .25); }
.lock-time { font-size: clamp(64px, 12vw, 108px); font-weight: 200; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.lock-date { font-size: 19px; font-weight: 500; margin-top: 10px; opacity: .9; }
.lock-card { width: 100%; max-width: 360px; padding: 28px 26px 22px; border-radius: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); color: var(--text); }
.lock-form { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.lock-avatar { display: flex; justify-content: center; margin-bottom: 4px; }
.lock-title { text-align: center; font-size: 19px; font-weight: 700; }
.lock-sub { text-align: center; font-size: 13px; color: var(--text-2); margin-top: -4px; margin-bottom: 4px; }
.lock-input { height: 40px; border-radius: 12px; padding: 0 14px; background: rgba(127, 127, 127, .14); }
.lock-row { display: flex; gap: 8px; }
.lock-submit { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; transition: filter .12s; }
.lock-submit:hover { filter: brightness(1.1); }
.lock-hint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: -4px; overflow-wrap: anywhere; }
.lock-form .form-error { text-align: center; margin: 0; }
.lock-form .form-error:empty { display: none; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- small screens ---------- */

@media (max-width: 1100px) and (min-width: 761px) {
  .widgets { display: none; }
}

@media (max-width: 760px) {
  .mb-stats, .mb-user { display: none; }
  .widgets { left: 16px; right: 16px; width: auto; top: 46px; }
  .toolbar { flex-wrap: wrap; }
  .win { left: 0 !important; top: 32px !important; width: 100% !important; height: calc(100% - 32px - 76px) !important; border-radius: 0; border-width: 0; }
  .win .rz, .lights .light.max { display: none; }
  .dock-wrap { bottom: 6px; }
  .dock-tile { width: 44px; height: 44px; border-radius: 12px; }
  .dock-item:hover .dock-tile { transform: none; }
  .dock-label { display: none; }
  .side { display: none; }
  .app-music { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; gap: 8px; }
  .p-right { display: none; }
  .search-input { width: 100%; flex: 1 1 140px; }
  .split { grid-template-columns: 1fr; }
  .svc-detail { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .cover.lg { width: 130px; height: 130px; }
}
