/* Windows 12 Web — оболочка: темы, экран входа, рабочий стол, панель задач, меню, окна */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "DejaVu Sans Mono", "Ubuntu Mono", "Liberation Mono", monospace;
  --accent-base: #0067c0;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-win: 10px;
  --taskbar-h: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --scale: 1;
  font-size: calc(14px * var(--scale));
}

:root, :root[data-theme="light"] {
  color-scheme: light;
  --accent: var(--accent-base);
  --accent-hover: color-mix(in srgb, var(--accent-base) 88%, white);
  --accent-pressed: color-mix(in srgb, var(--accent-base) 80%, white);
  --accent-text: #fff;
  --accent-soft: color-mix(in srgb, var(--accent-base) 14%, transparent);
  --accent-ink: color-mix(in srgb, var(--accent-base) 85%, black);
  --desktop: #9fc3ec;
  --text: #1a1a1a;
  --text-2: #5d5d5d;
  --text-3: #8b8b8b;
  --mica: rgba(243, 243, 243, .84);
  --mica-solid: #f3f3f3;
  --acrylic: rgba(249, 249, 249, .76);
  --acrylic-solid: #f9f9f9;
  --layer: rgba(255, 255, 255, .62);
  --layer-solid: #fdfdfd;
  --card: #ffffff;
  --border: rgba(0, 0, 0, .075);
  --border-strong: rgba(0, 0, 0, .15);
  --divider: rgba(0, 0, 0, .08);
  --hover: rgba(0, 0, 0, .045);
  --pressed: rgba(0, 0, 0, .075);
  --selected: color-mix(in srgb, var(--accent-base) 13%, transparent);
  --input: rgba(255, 255, 255, .9);
  --input-border: rgba(0, 0, 0, .14);
  --shadow-win: 0 0 0 1px rgba(0, 0, 0, .06), 0 16px 48px rgba(0, 0, 0, .2), 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-win-inactive: 0 0 0 1px rgba(0, 0, 0, .05), 0 6px 20px rgba(0, 0, 0, .12);
  --shadow-flyout: 0 0 0 1px rgba(0, 0, 0, .06), 0 24px 64px rgba(0, 0, 0, .22);
  --taskbar: rgba(238, 242, 249, .74);
  --scroll: rgba(0, 0, 0, .25);
  --danger: #c42b1c;
  --success: #0f7b0f;
  --warning: #9d5d00;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: color-mix(in srgb, var(--accent-base) 55%, white);
  --accent-hover: color-mix(in srgb, var(--accent-base) 45%, white);
  --accent-pressed: color-mix(in srgb, var(--accent-base) 62%, white);
  --accent-text: #000;
  --accent-soft: color-mix(in srgb, var(--accent-base) 30%, transparent);
  --accent-ink: color-mix(in srgb, var(--accent-base) 45%, white);
  --desktop: #0b1a33;
  --text: #ffffff;
  --text-2: #c8c8c8;
  --text-3: #919191;
  --mica: rgba(32, 32, 32, .84);
  --mica-solid: #202020;
  --acrylic: rgba(38, 38, 38, .78);
  --acrylic-solid: #262626;
  --layer: rgba(58, 58, 58, .32);
  --layer-solid: #2b2b2b;
  --card: #2b2b2b;
  --border: rgba(255, 255, 255, .075);
  --border-strong: rgba(255, 255, 255, .14);
  --divider: rgba(255, 255, 255, .08);
  --hover: rgba(255, 255, 255, .06);
  --pressed: rgba(255, 255, 255, .035);
  --selected: color-mix(in srgb, var(--accent-base) 30%, transparent);
  --input: rgba(30, 30, 30, .85);
  --input-border: rgba(255, 255, 255, .12);
  --shadow-win: 0 0 0 1px rgba(255, 255, 255, .08), 0 16px 48px rgba(0, 0, 0, .55), 0 4px 12px rgba(0, 0, 0, .3);
  --shadow-win-inactive: 0 0 0 1px rgba(255, 255, 255, .06), 0 6px 20px rgba(0, 0, 0, .4);
  --shadow-flyout: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 64px rgba(0, 0, 0, .6);
  --taskbar: rgba(28, 30, 36, .72);
  --scroll: rgba(255, 255, 255, .28);
  --danger: #ff99a4;
  --success: #6ccb5f;
  --warning: #fce100;
}

.no-transparency {
  --mica: var(--mica-solid);
  --acrylic: var(--acrylic-solid);
  --taskbar: var(--acrylic-solid);
}
.no-transparency * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.no-animations *, .no-animations *::before, .no-animations *::after { transition: none !important; animation: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--desktop);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, [contenteditable] { user-select: text; -webkit-user-select: text; }
button { cursor: default; }
svg { flex: none; }
::selection { background: color-mix(in srgb, var(--accent-base) 45%, transparent); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 8px; border: 4px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { border-width: 3px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }

.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
.appicon { width: 32px; height: 32px; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- элементы управления (Fluent) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 32px; padding: 4px 14px; border-radius: 5px;
  background: var(--layer-solid); border: 1px solid var(--border-strong); border-bottom-color: color-mix(in srgb, var(--border-strong) 100%, rgba(0,0,0,.12));
  color: var(--text); white-space: nowrap; transition: background .12s;
}
.btn:hover { background: color-mix(in srgb, var(--layer-solid) 92%, var(--text)); }
.btn:active { background: color-mix(in srgb, var(--layer-solid) 96%, var(--text)); color: var(--text-2); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:active { background: var(--accent-pressed); }
.btn.danger { color: var(--danger); }
.btn.subtle { background: transparent; border-color: transparent; }
.btn.subtle:hover { background: var(--hover); }
.btn.icon { padding: 0; width: 32px; min-width: 32px; }
.input {
  height: 32px; padding: 0 10px; border-radius: 5px; outline: none;
  background: var(--input); border: 1px solid var(--input-border); border-bottom: 1px solid color-mix(in srgb, var(--text) 45%, transparent);
  min-width: 0;
}
.input:focus { border-bottom: 2px solid var(--accent); padding-bottom: 0; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
select.input { padding-right: 4px; }
.toggle { position: relative; width: 40px; height: 20px; border-radius: 10px; border: 1px solid var(--text-2); background: transparent; flex: none; transition: .15s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-2); transition: .15s var(--ease); }
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on::after { left: 23px; background: var(--accent-text); }
.range { accent-color: var(--accent); width: 100%; }
.check { accent-color: var(--accent); width: 16px; height: 16px; }
.progress { height: 4px; border-radius: 2px; background: var(--border-strong); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .2s; }
.progress.warn > i { background: var(--danger); }
.progress.indeterminate > i { width: 30% !important; animation: indet 1.2s infinite var(--ease); }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; border-top-color: currentColor; border-right-color: currentColor; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kbd { font-family: var(--mono); font-size: .8rem; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-strong); }

/* ---------- экран блокировки и входа ---------- */
.lock {
  position: fixed; inset: 0; z-index: 100000; color: #fff; overflow: hidden;
  background: #0b1a33 center / cover no-repeat;
}
.lock .lock-bg { position: absolute; inset: -40px; background: inherit; background-size: cover; background-position: center; transition: filter .5s var(--ease), transform .5s var(--ease); }
.lock.auth .lock-bg { filter: blur(28px) brightness(.75); transform: scale(1.06); }
.lock .lock-clock { position: absolute; left: 0; right: 0; top: 13vh; text-align: center; transition: transform .45s var(--ease), opacity .35s; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.lock.auth .lock-clock { transform: translateY(-40px); opacity: 0; pointer-events: none; }
.lock .lock-time { font-family: var(--font-display); font-size: clamp(64px, 12vw, 128px); font-weight: 600; letter-spacing: -2px; line-height: 1; }
.lock .lock-date { font-size: clamp(18px, 2.4vw, 26px); margin-top: 10px; font-weight: 500; }
.lock .lock-hint { position: absolute; bottom: 7vh; left: 0; right: 0; text-align: center; opacity: .85; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.lock.auth .lock-hint { opacity: 0; }
.lock .lock-status { position: absolute; right: 28px; bottom: 26px; display: flex; gap: 18px; opacity: .9; align-items: center; font-size: 13px; }
.lock .login {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -38%); width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: 0; pointer-events: none; transition: .4s var(--ease);
}
.lock.auth .login { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.login .avatar { width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(20px); }
.login .avatar svg { width: 92px; height: 92px; }
.login .login-name { font-size: 28px; font-weight: 600; font-family: var(--font-display); text-align: center; min-height: 36px; }
.login .login-host { font-size: 13px; opacity: .8; margin-top: -10px; }
.login .field {
  width: 100%; height: 40px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); border-bottom: 2px solid rgba(255,255,255,.65);
  background: rgba(0,0,0,.35); backdrop-filter: blur(12px); color: #fff; padding: 0 44px 0 12px; outline: none; font-size: 15px;
}
.login .field::placeholder { color: rgba(255,255,255,.7); }
.login .field:focus { border-bottom-color: var(--accent-base); background: rgba(0,0,0,.5); }
.login .pw-wrap { position: relative; width: 100%; }
.login .go { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border-radius: 4px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.login .go:hover { background: rgba(255,255,255,.26); }
.login .error { min-height: 20px; font-size: 14px; color: #fff; text-align: center; background: rgba(196,43,28,.55); padding: 6px 12px; border-radius: 6px; }
.login .error:empty { background: none; padding: 0; }
.login .welcome { display: flex; flex-direction: column; align-items: center; gap: 18px; font-size: 22px; font-family: var(--font-display); }
.login .other { font-size: 13px; color: #fff; opacity: .85; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.boot { position: fixed; inset: 0; z-index: 100001; background: #000; display: grid; place-items: center; transition: opacity .6s; }
.boot .boot-logo { width: 96px; height: 96px; }
.boot .spinner { margin: 64px auto 0; color: #fff; width: 34px; height: 34px; }

/* ---------- рабочий стол ---------- */
.desktop { position: fixed; inset: 0; background: var(--desktop) center / cover no-repeat; overflow: hidden; }
.desktop .wallpaper { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity .6s; }
.night-light { position: fixed; inset: 0; pointer-events: none; z-index: 99990; background: rgba(255, 140, 30, .16); mix-blend-mode: multiply; }
.dim-layer { position: fixed; inset: 0; pointer-events: none; z-index: 99991; background: #000; opacity: 0; }
.desk-icons { position: absolute; inset: 0; pointer-events: none; }
.desk-icons > * { pointer-events: auto; }
.desk-icon {
  position: absolute; width: calc(var(--di-w, 88px) - 4px); max-height: calc(var(--di-h, 100px) - 2px);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 3px 4px; border-radius: 4px; border: 1px solid transparent;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 0 1px rgba(0,0,0,.6); font-size: 12.5px; text-align: center; overflow: hidden;
}
.desk-icon svg, .desk-icon img { width: var(--di-icon, 44px); height: var(--di-icon, 44px); object-fit: cover; border-radius: 3px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.desk-icon span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; line-height: 1.25; }
.desk-icon:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); }
.desk-icon.sel { background: rgba(255,255,255,.26); border-color: rgba(255,255,255,.4); }
.desk-icon.sel span { -webkit-line-clamp: 6; }
.desk-icon.sel { max-height: none; z-index: 2; }
.desk-icon.dragging { opacity: .7; pointer-events: none !important; z-index: 20; }
.desk-icon.cut { opacity: .55; }
.desk-icon.drop { background: color-mix(in srgb, var(--accent-base) 45%, transparent); }
.rubber { position: absolute; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent-base) 22%, transparent); pointer-events: none; z-index: 5; }
.drop-overlay { position: absolute; inset: 0; z-index: 20; border: 3px dashed var(--accent); background: color-mix(in srgb, var(--accent-base) 12%, transparent); display: grid; place-items: center; pointer-events: none; font-size: 1.15rem; font-weight: 600; color: var(--text); }
.desktop > .drop-overlay { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* ---------- панель задач ---------- */
.taskbar {
  position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 9000;
  height: var(--taskbar-h); width: min(calc(100vw - 16px), max(760px, 62vw));
  display: flex; align-items: center; padding: 0 6px; gap: 2px;
  background: var(--taskbar); backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  border-radius: 16px; border: 1px solid var(--border-strong); box-shadow: 0 10px 40px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.12) inset;
  transition: width .3s var(--ease), border-radius .3s, bottom .3s;
}
.taskbar.full { width: 100vw; bottom: 0; border-radius: 0; border-width: 1px 0 0; }
.taskbar .tb-left, .taskbar .tb-right { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.taskbar .tb-right { justify-content: flex-end; }
.taskbar .tb-center { display: flex; align-items: center; gap: 3px; justify-content: center; min-width: 0; }
.taskbar.left-align .tb-center { order: -1; justify-content: flex-start; }
.taskbar.left-align .tb-left { flex: 0; }
.tb-btn {
  position: relative; height: 44px; min-width: 44px; padding: 0 8px; border-radius: 8px; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .12s, transform .12s;
}
.tb-btn:hover { background: var(--hover); }
.tb-btn:active { background: var(--pressed); }
.tb-btn:active > svg.appicon { transform: scale(.86); }
.tb-btn > svg.appicon { width: 28px; height: 28px; transition: transform .15s var(--ease); }
.tb-btn.app::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; width: 0; height: 3px; border-radius: 2px; background: var(--text-3);
  transform: translateX(-50%); transition: width .2s var(--ease), background .2s;
}
.tb-btn.app.running::after { width: 6px; }
.tb-btn.app.active { background: var(--hover); }
.tb-btn.app.active::after { width: 16px; background: var(--accent); }
.tb-btn.app.attention { animation: attention 1s ease 3; }
@keyframes attention { 50% { background: color-mix(in srgb, #ffb900 45%, transparent); } }
.tb-btn .badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: var(--accent-text); font-size: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
.tb-start svg { width: 26px; height: 26px; }
.tb-search {
  height: 36px; width: 210px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--layer);
  display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--text-2); margin: 0 4px; font-size: 13.5px;
}
.tb-search:hover { background: var(--hover); }
.tb-widgets { gap: 8px; padding: 0 10px; font-size: 12.5px; }
.tb-widgets .w-ic { width: 26px; height: 26px; }
.tb-widgets .w-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.tb-tray { gap: 10px; padding: 0 10px; }
.tb-clock { flex-direction: column; gap: 0; align-items: flex-end; font-size: 12.5px; line-height: 1.35; padding: 0 10px; }
.tb-clock:has(.badge:not(.hidden)) { padding-right: 28px; }
.tb-clock .badge { top: 50%; right: 4px; transform: translateY(-50%); }
.tb-widgets .w-text span { white-space: nowrap; }
.tb-desk { width: 8px; min-width: 8px; padding: 0; height: 44px; border-left: 1px solid var(--divider); border-radius: 0 8px 8px 0; margin-left: 2px; }
.tb-preview {
  position: fixed; z-index: 9500; padding: 6px; border-radius: 10px; background: var(--acrylic); backdrop-filter: blur(40px) saturate(170%);
  box-shadow: var(--shadow-flyout); display: flex; flex-direction: column; gap: 2px; min-width: 220px; max-width: 320px;
}
.tb-preview .pv-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; }
.tb-preview .pv-item:hover { background: var(--hover); }
.tb-preview .pv-item svg { width: 18px; height: 18px; }
.tb-preview .pv-close { margin-left: auto; width: 24px; height: 24px; border: 0; background: transparent; border-radius: 4px; display: grid; place-items: center; opacity: 0; }
.tb-preview .pv-item:hover .pv-close { opacity: 1; }
.tb-preview .pv-close:hover { background: #c42b1c; color: #fff; }
.tooltip { position: fixed; z-index: 99999; padding: 5px 9px; border-radius: 6px; font-size: 12px; background: var(--acrylic-solid); border: 1px solid var(--border-strong); box-shadow: 0 4px 16px rgba(0,0,0,.18); pointer-events: none; white-space: nowrap; }

/* ---------- всплывающие панели ---------- */
.flyout {
  position: fixed; z-index: 9400; color: var(--text);
  background: var(--acrylic); backdrop-filter: blur(60px) saturate(180%); -webkit-backdrop-filter: blur(60px) saturate(180%);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-flyout);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .18s var(--ease), transform .25s var(--ease);
}
.flyout.open { opacity: 1; transform: none; pointer-events: auto; }

.start { left: 50%; bottom: calc(var(--taskbar-h) + 18px); width: min(660px, calc(100vw - 16px)); height: min(720px, calc(100vh - var(--taskbar-h) - 34px)); margin-left: max(-330px, calc(-50vw + 8px)); display: flex; flex-direction: column; }
.taskbar.left-align ~ .start { left: 8px; margin-left: 0; }
.start .st-search { margin: 24px 28px 6px; position: relative; }
.start .st-search input { width: 100%; height: 38px; border-radius: 19px; padding: 0 16px 0 40px; background: var(--input); border: 1px solid var(--input-border); border-bottom: 2px solid var(--accent); outline: none; }
.start .st-search svg { position: absolute; left: 14px; top: 11px; color: var(--text-2); }
.start .st-body { flex: 1; overflow-y: auto; padding: 8px 28px 12px; }
.start .st-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 8px 8px; font-weight: 600; }
.start .st-head .btn { min-height: 24px; height: 24px; font-size: 12px; padding: 0 8px; font-weight: 400; }
.start .st-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 2px 10px; border-radius: 6px; font-size: 12px; text-align: center; border: 0; background: transparent; }
.app-tile:hover { background: var(--hover); }
.app-tile svg { width: 34px; height: 34px; }
.app-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start .st-rec { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px; border: 0; background: transparent; text-align: left; min-width: 0; width: 100%; }
.list-item:hover { background: var(--hover); }
.list-item.sel { background: var(--selected); }
.list-item svg.appicon { width: 30px; height: 30px; }
.list-item .li-t { min-width: 0; flex: 1; }
.list-item .li-t b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-t small { display: block; color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start .st-foot { height: 64px; flex: none; border-top: 1px solid var(--divider); display: flex; align-items: center; justify-content: space-between; padding: 0 40px; background: var(--layer); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.start .st-user { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 6px; border: 0; background: transparent; }
.start .st-user:hover, .start .st-power:hover { background: var(--hover); }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-base) 50%, #7f3cff)); color: #fff; font-weight: 600; font-size: 14px; }
.start .st-power { width: 40px; height: 40px; border-radius: 6px; border: 0; background: transparent; display: grid; place-items: center; }
.start .st-power svg { width: 18px; height: 18px; }
.start .st-empty { padding: 30px; text-align: center; color: var(--text-2); }
.start .st-alpha { font-weight: 600; color: var(--accent-ink); padding: 10px 10px 4px; font-size: 13px; }

.widgets { left: 8px; top: 8px; bottom: calc(var(--taskbar-h) + 18px); width: min(560px, calc(100vw - 16px)); transform: translateX(-30px); display: flex; flex-direction: column; overflow: hidden; }
.widgets.open { transform: none; }
.widgets .wg-head { padding: 22px 26px 8px; display: flex; align-items: baseline; justify-content: space-between; }
.widgets .wg-head .wg-time { font-family: var(--font-display); font-size: 34px; font-weight: 600; }
.widgets .wg-body { flex: 1; overflow-y: auto; padding: 8px 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.widget { background: var(--layer); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.widget.wide { grid-column: span 2; }
.widget h4 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.widget .big { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.widget textarea { flex: 1; min-height: 110px; border: 0; background: color-mix(in srgb, #ffe58f 42%, transparent); color: var(--text); border-radius: 8px; padding: 10px; resize: none; outline: none; font-family: var(--font); }
.meter { display: grid; grid-template-columns: 64px 1fr 56px; align-items: center; gap: 10px; font-size: 12.5px; }
.meter .progress { height: 6px; border-radius: 3px; }

.quick { right: 8px; bottom: calc(var(--taskbar-h) + 18px); width: min(380px, calc(100vw - 16px)); }
.quick .q-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 22px 22px 8px; }
.q-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; text-align: center; }
.q-tile button { width: 100%; height: 52px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--layer); display: grid; place-items: center; }
.q-tile button:hover { background: var(--hover); }
.q-tile button.on { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.q-tile button svg { width: 18px; height: 18px; }
.quick .q-sliders { padding: 14px 24px; display: flex; flex-direction: column; gap: 14px; }
.quick .q-sliders .row svg { width: 18px; height: 18px; color: var(--text-2); }
.quick .q-foot { border-top: 1px solid var(--divider); padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; background: var(--layer); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.calendar-fly { right: 8px; bottom: calc(var(--taskbar-h) + 18px); width: min(360px, calc(100vw - 16px)); max-height: calc(100vh - var(--taskbar-h) - 34px); display: flex; flex-direction: column; background: transparent; box-shadow: none; backdrop-filter: none; gap: 12px; }
.calendar-fly > section { background: var(--acrylic); backdrop-filter: blur(60px) saturate(180%); -webkit-backdrop-filter: blur(60px) saturate(180%); border-radius: var(--radius-lg); box-shadow: var(--shadow-flyout); }
.notif-center { display: flex; flex-direction: column; min-height: 120px; max-height: 48vh; }
.notif-center header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; font-weight: 600; }
.notif-center .nc-list { overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.notif-center .nc-empty { color: var(--text-2); text-align: center; padding: 26px 0; font-size: 13px; }
.notif { background: var(--layer); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; gap: 10px; position: relative; font-size: 13px; }
.notif svg.appicon { width: 20px; height: 20px; }
.notif b { display: block; font-weight: 600; margin-bottom: 2px; }
.notif .n-x { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border: 0; background: transparent; border-radius: 4px; display: grid; place-items: center; opacity: .6; }
.notif .n-x:hover { background: var(--hover); opacity: 1; }
.notif .n-actions { display: flex; gap: 6px; margin-top: 8px; }
.notif .n-actions .btn { min-height: 26px; padding: 2px 10px; font-size: 12px; }
.cal { padding: 14px 16px 16px; }
.cal header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal header b { font-weight: 600; text-transform: capitalize; }
.cal .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal .cal-grid span { height: 38px; display: grid; place-items: center; border-radius: 50%; }
.cal .cal-grid .dow { color: var(--text-2); font-size: 12px; height: 28px; }
.cal .cal-grid .other { color: var(--text-3); }
.cal .cal-grid .today { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.cal .cal-grid .day:hover:not(.today) { background: var(--hover); }
.cal .cal-today { font-size: 15px; font-weight: 600; margin-bottom: 4px; text-transform: capitalize; }

.toasts { position: fixed; right: 12px; bottom: calc(var(--taskbar-h) + 22px); z-index: 9600; display: flex; flex-direction: column; gap: 10px; width: min(370px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; background: var(--acrylic); backdrop-filter: blur(50px) saturate(180%); -webkit-backdrop-filter: blur(50px) saturate(180%);
  border-radius: 10px; box-shadow: var(--shadow-flyout); padding: 14px 16px; font-size: 13px; display: flex; gap: 12px; position: relative;
  animation: toastIn .35s var(--ease);
}
.toast.out { animation: toastOut .25s ease forwards; }
.toast svg.appicon { width: 22px; height: 22px; }
.toast b { display: block; font-weight: 600; margin-bottom: 3px; }
.toast .t-x { position: absolute; right: 8px; top: 8px; border: 0; background: transparent; width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; }
.toast .t-x:hover { background: var(--hover); }
.toast .progress { margin-top: 8px; }
.toast .n-actions { display: flex; gap: 6px; margin-top: 10px; }
.toast .n-actions .btn { min-height: 28px; padding: 2px 12px; font-size: 12.5px; }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(110%); opacity: 0; } }

/* ---------- контекстное меню ---------- */
.menu {
  position: fixed; z-index: 99000; min-width: 220px; max-width: 340px; padding: 4px; border-radius: 8px;
  background: var(--acrylic); backdrop-filter: blur(50px) saturate(180%); -webkit-backdrop-filter: blur(50px) saturate(180%);
  box-shadow: var(--shadow-flyout); animation: menuIn .16s var(--ease); font-size: 13.5px;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.menu .m-item { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border-radius: 5px; white-space: nowrap; }
.menu .m-item:hover, .menu .m-item.hl { background: var(--hover); }
.menu .m-item.disabled { opacity: .4; pointer-events: none; }
.menu .m-item.danger { color: var(--danger); }
.menu .m-item .m-ic { width: 16px; display: grid; place-items: center; color: var(--text-2); }
.menu .m-item .m-ic svg.appicon { width: 16px; height: 16px; }
.menu .m-item .m-key { margin-left: auto; color: var(--text-3); font-size: 12px; padding-left: 20px; }
.menu .m-item .m-sub { margin-left: auto; color: var(--text-2); }
.menu .m-sep { height: 1px; background: var(--divider); margin: 4px 2px; }
.menu .m-bar { display: flex; gap: 2px; padding: 2px 2px 4px; border-bottom: 1px solid var(--divider); margin-bottom: 4px; }
.menu .m-bar button { flex: 1; height: 34px; border: 0; background: transparent; border-radius: 5px; display: grid; place-items: center; }
.menu .m-bar button:hover { background: var(--hover); }

/* ---------- окна ---------- */
.windows { position: absolute; inset: 0; }
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 240px; min-height: 140px;
  background: var(--mica); backdrop-filter: blur(60px) saturate(160%); -webkit-backdrop-filter: blur(60px) saturate(160%);
  border-radius: var(--radius-win); box-shadow: var(--shadow-win-inactive); overflow: hidden; color: var(--text);
  transition: box-shadow .2s, opacity .2s var(--ease), transform .25s var(--ease);
  will-change: transform;
}
.win.active { box-shadow: var(--shadow-win); }
.win.opening { animation: winOpen .22s var(--ease); }
@keyframes winOpen { from { opacity: 0; transform: scale(.94); } }
.win.closing { opacity: 0; transform: scale(.94); pointer-events: none; }
.win.minimized { visibility: hidden; pointer-events: none; }
.win.maximized { border-radius: 0; box-shadow: none; }
.win.animating { transition: left .22s var(--ease), top .22s var(--ease), width .22s var(--ease), height .22s var(--ease), border-radius .22s, opacity .2s, transform .25s var(--ease); }
.win.dragging, .win.resizing { transition: none; }
.win.dragging * , .win.resizing * { pointer-events: none !important; }
.win-titlebar { height: 40px; flex: none; display: flex; align-items: center; padding-left: 12px; gap: 10px; }
.win-titlebar .win-icon { width: 16px; height: 16px; }
.win-titlebar .win-title { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win:not(.active) .win-titlebar { color: var(--text-3); }
.win-titlebar .win-tabs { flex: 1; display: flex; align-items: flex-end; height: 100%; gap: 2px; min-width: 0; overflow: hidden; padding-top: 6px; }
.win-controls { display: flex; height: 100%; align-self: flex-start; }
.win-controls button { width: 46px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; color: var(--text); }
.win:not(.active) .win-controls button { color: var(--text-3); }
.win-controls button:hover { background: var(--hover); }
.win-controls button.close:hover { background: #c42b1c; color: #fff; }
.win-controls button svg { width: 10px; height: 10px; stroke-width: 1.1; }
.win-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.win-resize { position: absolute; z-index: 5; }
.win-resize.n { top: -3px; left: 8px; right: 8px; height: 7px; cursor: n-resize; }
.win-resize.s { bottom: -3px; left: 8px; right: 8px; height: 7px; cursor: s-resize; }
.win-resize.e { right: -3px; top: 8px; bottom: 8px; width: 7px; cursor: e-resize; }
.win-resize.w { left: -3px; top: 8px; bottom: 8px; width: 7px; cursor: w-resize; }
.win-resize.ne { right: -3px; top: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.win-resize.nw { left: -3px; top: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.win-resize.se { right: -3px; bottom: -3px; width: 14px; height: 14px; cursor: se-resize; }
.win-resize.sw { left: -3px; bottom: -3px; width: 12px; height: 12px; cursor: sw-resize; }
.win.maximized .win-resize { display: none; }
.win-modal-shade { position: absolute; inset: 0; z-index: 50; background: rgba(0,0,0,.18); }
.snap-preview {
  position: absolute; z-index: 8999; border-radius: 10px; pointer-events: none;
  background: color-mix(in srgb, var(--accent-base) 22%, rgba(255,255,255,.18)); border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(20px); box-shadow: 0 10px 40px rgba(0,0,0,.25); transition: all .18s var(--ease);
}
.snap-layouts {
  position: fixed; z-index: 99500; padding: 12px; border-radius: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  background: var(--acrylic); backdrop-filter: blur(50px) saturate(180%); box-shadow: var(--shadow-flyout); animation: menuIn .15s var(--ease);
}
.snap-layouts .sl { width: 94px; height: 58px; display: grid; gap: 3px; }
.snap-layouts .sl i { background: var(--layer-solid); border: 1px solid var(--border-strong); border-radius: 4px; }
.snap-layouts .sl i:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- диалоги ---------- */
.dlg { padding: 20px 24px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow: auto; background: var(--layer-solid); }
.dlg h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.dlg p { margin: 0; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 18px 24px; background: var(--mica-solid); border-top: 1px solid var(--divider); flex: none; }
.dlg-foot .btn { min-width: 110px; }
.dlg .dlg-icon { display: flex; gap: 14px; align-items: flex-start; }
.dlg .dlg-icon svg.appicon { width: 36px; height: 36px; }
.props-table { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13px; }
.props-table > :nth-child(odd) { color: var(--text-2); }
.props-table > :nth-child(even) { word-break: break-all; user-select: text; }

/* мобильные экраны */
@media (max-width: 700px) {
  :root { --taskbar-h: 52px; }
  .taskbar { width: 100vw; bottom: 0; border-radius: 0; border-width: 1px 0 0; }
  .tb-search, .tb-widgets .w-text, .tb-tray .hide-sm { display: none !important; }
  .start .st-grid { grid-template-columns: repeat(4, 1fr); }
  .start .st-rec { grid-template-columns: 1fr; }
  .start .st-foot { padding: 0 18px; }
  .widgets .wg-body { grid-template-columns: 1fr; }
  .widget.wide { grid-column: auto; }
  .win-controls button { width: 40px; }
}

/* ---------- панель задач «как в Windows»: на всю ширину, окна с подписями ---------- */
:root.tb-full { --taskbar-h: 48px; }
.taskbar.full { height: 48px; padding: 0 4px; background: var(--taskbar); box-shadow: none; border-color: var(--border-strong); }
.taskbar.full .tb-btn { height: 40px; min-width: 40px; border-radius: 4px; }
.taskbar.full .tb-btn > svg.appicon, .taskbar.full .tb-btn > span > svg.appicon { width: 24px; height: 24px; }
.taskbar.full .tb-search { height: 32px; border-radius: 16px; }
.taskbar .tb-center { flex: 0 1 auto; overflow: hidden; }
.taskbar .tb-center > .row { min-width: 0; overflow: hidden; }
.tb-btn.labeled { flex: 0 1 172px; width: 172px; min-width: 40px; justify-content: flex-start; padding: 0 10px; gap: 8px; }
.tb-btn.labeled > span:first-child { display: grid; flex: none; }
.tb-btn.labeled svg.appicon { width: 22px; height: 22px; }
.tb-btn.labeled .tb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text); }
.tb-btn.labeled.running:not(.active) { background: color-mix(in srgb, var(--hover) 60%, transparent); }
.tb-btn.labeled.active { background: var(--layer-solid); box-shadow: 0 0 0 1px var(--border); }
.tb-btn.labeled::after { left: 50%; }
.tb-btn.labeled.running::after { width: 8px; }
.tb-btn.labeled.active::after { width: 26px; }
.tb-btn.labeled.minimized .tb-label { color: var(--text-2); }
@media (max-width: 900px) { .tb-btn.labeled .tb-label { display: none; } .tb-btn.labeled { flex: 0 0 44px; width: 44px; justify-content: center; } }
.tb-hover {
  position: fixed; z-index: 9500; width: 240px; border-radius: 8px; padding: 8px; cursor: default;
  background: var(--acrylic); backdrop-filter: blur(40px) saturate(170%); box-shadow: var(--shadow-flyout); animation: menuIn .14s var(--ease);
}
.tb-hover-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 0 0 6px 4px; }
.tb-hover-head svg.appicon { width: 16px; height: 16px; }
.tb-hover-head .pv-close { opacity: .8; }
.tb-hover-head .pv-close:hover { background: #c42b1c; color: #fff; }
.tb-hover-body { height: 120px; border-radius: 6px; background: var(--layer-solid); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tb-hover-body svg.appicon { width: 44px; height: 44px; }
.tb-hover:hover .tb-hover-body { outline: 2px solid var(--accent); outline-offset: -2px; }
