/* Windows 12 Web — приложения */
.windows { pointer-events: none; }
.windows > * { pointer-events: auto; }
.windows > .snap-preview { pointer-events: none; }

/* ---------- вкладки в заголовке окна ---------- */
.win-tabs { display: flex; align-items: flex-end; min-width: 0; flex: 1; gap: 2px; height: 100%; }
.win-titlebar > .win-tabs { padding-top: 6px; }
.win-tabs > .win-tabs { flex: 0 1 auto; padding-top: 0; overflow: hidden; }
.tab {
  height: 34px; min-width: 60px; max-width: 220px; flex: 0 1 220px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px;
  border-radius: 8px 8px 0 0; font-size: 12.5px; color: var(--text-2); position: relative; transition: background .12s;
}
.tab:hover { background: var(--hover); }
.tab.active { background: var(--layer-solid); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.tab .ellipsis { flex: 1; }
.tab.dirty .ellipsis::after { content: " ●"; color: var(--accent); }
.tab-x { width: 22px; height: 22px; border: 0; background: transparent; border-radius: 4px; display: grid; place-items: center; flex: none; opacity: .7; }
.tab-x:hover { background: var(--hover); opacity: 1; }
.tab-x svg { width: 12px; height: 12px; }
.tab-ic svg { width: 14px; height: 14px; }
.tab-spin { width: 13px; height: 13px; border-width: 2px; color: var(--accent); }
.tab-add { width: 32px; height: 30px; border: 0; background: transparent; border-radius: 6px; display: grid; place-items: center; margin: 0 2px 2px; flex: none; }
.tab-add:hover { background: var(--hover); }

/* ---------- Проводник ---------- */
.ex { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ex-toolbar { display: flex; align-items: center; gap: 4px; padding: 4px 10px 6px; }
.ex-toolbar .btn.icon { width: 34px; }
.ex-address {
  flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 2px; padding: 0 8px; margin-left: 6px; overflow: hidden;
  background: var(--layer); border: 1px solid var(--border-strong); border-radius: 6px; cursor: text;
}
.ex-addr-icon svg { width: 18px; height: 18px; margin-right: 4px; }
.ex-crumb { padding: 3px 6px; border-radius: 4px; white-space: nowrap; font-size: 13px; cursor: default; }
.ex-crumb:hover { background: var(--hover); }
.ex-crumb.drop { background: var(--selected); }
.ex-crumb-sep { color: var(--text-3); display: grid; }
.ex-crumb-sep svg { width: 12px; height: 12px; }
.ex-addr-input { flex: 1; border: 0; outline: none; background: transparent; font-family: var(--mono); font-size: 13px; }
.ex-search { width: 240px; height: 32px; position: relative; flex: none; }
.ex-search span { position: absolute; right: 10px; top: 8px; color: var(--text-2); }
.ex-search-input { width: 100%; height: 100%; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--layer); padding: 0 32px 0 10px; outline: none; }
.ex-search-input:focus { border-bottom: 2px solid var(--accent); }
.ex-cmdbar { display: flex; align-items: center; gap: 2px; padding: 4px 10px; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); background: var(--layer); overflow-x: auto; overflow-y: hidden; }
.ex-cmd { padding: 4px 10px; gap: 6px; min-height: 34px; font-size: 13px; }
.ex-sep { width: 1px; height: 22px; background: var(--divider); margin: 0 4px; flex: none; }
.ex-main { flex: 1; min-height: 0; display: flex; }
.ex-nav { width: 220px; flex: none; overflow-y: auto; padding: 8px 6px; border-right: 1px solid var(--divider); }
.ex-nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 5px; font-size: 13px; }
.ex-nav-item:hover { background: var(--hover); }
.ex-nav-item.sel { background: var(--selected); }
.ex-nav-item.drop { background: var(--accent-soft); outline: 1px solid var(--accent); }
.ex-nav-item svg.appicon { width: 18px; height: 18px; }
.ex-nav-group { font-size: 11.5px; font-weight: 600; color: var(--text-2); padding: 12px 10px 4px; text-transform: uppercase; letter-spacing: .4px; }
.ex-content { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; background: var(--layer-solid); }
.ex-list { flex: 1; overflow: auto; position: relative; outline: none; padding: 4px 6px 24px; }
.ex-list.loading { opacity: .6; }
.ex-row { display: grid; grid-template-columns: minmax(180px, 3fr) minmax(130px, 1.3fr) minmax(110px, 1.2fr) 90px; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 4px; font-size: 13px; }
.ex-head { position: sticky; top: 0; z-index: 2; background: var(--layer-solid); color: var(--text-2); font-size: 12.5px; height: 30px; border-bottom: 1px solid var(--divider); border-radius: 0; margin-bottom: 2px; }
.ex-head span { display: flex; align-items: center; gap: 4px; padding: 4px 0; }
.ex-head span:hover { color: var(--text); }
.sort-ar svg { width: 10px; height: 10px; }
.ex-item { border: 1px solid transparent; }
.ex-item:hover { background: var(--hover); }
.ex-item.sel { background: var(--selected); border-color: color-mix(in srgb, var(--accent-base) 35%, transparent); }
.ex-item.dim { opacity: .55; }
.ex-item.drop { background: var(--accent-soft); outline: 2px solid var(--accent); }
.c-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.c-name svg.appicon, .c-name .ex-thumb { width: 20px; height: 20px; flex: none; }
.c-date, .c-type, .c-orig, .c-size { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-size { text-align: right; }
.ex-head .c-size { justify-content: flex-end; }
.ex-link svg { width: 12px; height: 12px; color: var(--text-3); }
.ex-list:not(.view-details) { display: grid; align-content: start; gap: 4px; }
.ex-list.view-medium { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.ex-list.view-large { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.ex-list.view-xl { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.ex-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 6px; text-align: center; font-size: 12.5px; min-width: 0; }
.ex-tile svg.appicon, .ex-tile .ex-thumb { width: 56px; height: 56px; }
.view-large .ex-tile svg.appicon, .view-large .ex-tile .ex-thumb { width: 90px; height: 90px; }
.view-xl .ex-tile svg.appicon, .view-xl .ex-tile .ex-thumb { width: 170px; height: 150px; }
.ex-thumb { object-fit: contain; border-radius: 3px; background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.ex-tile-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; max-width: 100%; line-height: 1.3; }
.ex-tile.sel .ex-tile-name { -webkit-line-clamp: 5; }
.ex-empty { padding: 50px 20px; text-align: center; grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ex-empty svg.appicon { width: 48px; height: 48px; }
.ex-status { height: 28px; flex: none; display: flex; align-items: center; padding: 0 14px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--divider); white-space: pre; overflow: hidden; }
.ex-pc { padding: 10px 14px; }
.ex-pc-head { font-weight: 600; margin: 12px 4px 8px; }
.ex-pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.ex-pc-tile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; border: 1px solid transparent; }
.ex-pc-tile:hover { background: var(--hover); }
.ex-pc-tile.sel { background: var(--selected); border-color: color-mix(in srgb, var(--accent-base) 35%, transparent); }
.ex-pc-tile svg.appicon { width: 42px; height: 42px; }
.ex-pc-tile.drive svg.appicon { width: 54px; height: 54px; }
.ex-pc-tile b { font-weight: 400; }
@media (max-width: 760px) {
  .ex-nav { display: none; }
  .ex-search { width: 120px; }
  .ex-cmd-label { display: none; }
  .ex-row { grid-template-columns: minmax(140px, 1fr) 80px; }
  .ex-row .c-date, .ex-row .c-type, .ex-row .c-orig { display: none; }
}

/* ---------- диалог файлов ---------- */
.fd { display: flex; flex-direction: column; height: 100%; background: var(--layer-solid); }
.fd-top { padding: 8px 12px; }
.fd-main { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.fd-side { width: 190px; overflow-y: auto; padding: 6px; border-right: 1px solid var(--divider); }
.fd-list { flex: 1; overflow: auto; padding: 4px 6px; outline: none; }
.fd-list .ex-row { grid-template-columns: minmax(160px, 1fr) 140px 90px; }
.fd-bottom { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--mica-solid); }
.fd-label { width: 90px; flex: none; font-size: 13px; }
.fd-bottom .btn { min-width: 110px; }
@media (max-width: 700px) { .fd-side { display: none; } .fd-list .ex-row { grid-template-columns: 1fr 80px; } .fd-list .c-date { display: none; } }

/* ---------- Блокнот ---------- */
.np { display: flex; flex-direction: column; height: 100%; background: var(--layer-solid); }
.np-menubar { display: flex; align-items: center; gap: 2px; padding: 3px 8px; border-bottom: 1px solid var(--divider); background: var(--mica); }
.np-menu { border: 0; background: transparent; padding: 5px 11px; border-radius: 5px; font-size: 13px; }
.np-menu:hover { background: var(--hover); }
.np-find { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--divider); background: var(--mica); }
.np-find .input { width: 260px; height: 30px; }
.np-edit { flex: 1; min-height: 0; display: flex; }
.np-text {
  flex: 1; border: 0; outline: none; resize: none; padding: 12px 16px; background: transparent; color: var(--text);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; line-height: 1.5; tab-size: 4; white-space: pre-wrap;
}
.np-status { height: 28px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 14px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--divider); background: var(--mica); white-space: nowrap; overflow: hidden; }
.np-status i { width: 1px; height: 14px; background: var(--divider); }

/* ---------- Терминал ---------- */
.term-win { --mica: #0c0c0c; }
:root[data-theme="light"] .term-win .win-titlebar { background: #202020; color: #fff; }
:root[data-theme="light"] .term-win .win-controls button { color: #fff; }
:root[data-theme="light"] .term-win .tab { color: #bbb; }
:root[data-theme="light"] .term-win .tab.active { background: #0c0c0c; color: #fff; }
.term-win .tab.active { background: #0c0c0c; box-shadow: none; }
.term { flex: 1; min-height: 0; display: flex; }
.term-stage { flex: 1; min-width: 0; position: relative; padding: 6px 2px 2px 10px; }
.term-pane { position: absolute; inset: 6px 2px 2px 10px; }
.term .xterm { height: 100%; }
.term .xterm-viewport { scrollbar-width: thin; }

/* ---------- Браузер ---------- */
.br { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.br-tabs .tab { max-width: 240px; }
.br-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 8px 6px; position: relative; background: var(--layer-solid); border-top: 1px solid var(--divider); }
.br-address { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 12px; margin: 0 6px; border-radius: 16px; background: var(--mica-solid); border: 1px solid var(--border); }
.br-address:focus-within { border-color: var(--accent); background: var(--input); }
.br-lock { color: var(--text-2); display: grid; }
.br-url { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13.5px; }
.br-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); opacity: 0; }
.br-progress.on { opacity: 1; animation: brprog 2.4s var(--ease) infinite; }
@keyframes brprog { 0% { width: 0; left: 0; } 60% { width: 70%; left: 10%; } 100% { width: 10%; left: 100%; } }
.br-view { flex: 1; min-height: 0; position: relative; background: #fff; overflow: hidden; }
.br-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; image-rendering: auto; }
.br-kbd { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; pointer-events: none; }
.br-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: var(--layer-solid); z-index: 3; }
.br-ov-box { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--text-2); text-align: center; padding: 20px; }
.br-ov-box svg.appicon { width: 56px; height: 56px; }
.br-ov-box .spinner { color: var(--accent); }
.br-newtab { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 9vh 20px 20px; gap: 28px; overflow: auto;
  background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent-base) 22%, transparent), transparent), var(--layer-solid); }
.br-nt-logo svg { width: 76px; height: 76px; }
.br-nt-search { width: min(620px, 100%); height: 48px; border-radius: 24px; background: var(--input); border: 1px solid var(--border-strong); display: flex; align-items: center; gap: 12px; padding: 0 20px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.br-nt-search:focus-within { border-color: var(--accent); }
.br-nt-input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; }
.br-nt-tiles { display: grid; grid-template-columns: repeat(4, 112px); gap: 10px; }
.br-nt-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 10px; border: 0; background: var(--layer); font-size: 12.5px; min-width: 0; }
.br-nt-tile:hover { background: var(--hover); }
.br-nt-fav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-base) 40%, #8a5cf6)); }
.br-nt-note { max-width: 560px; text-align: center; }
@media (max-width: 600px) { .br-nt-tiles { grid-template-columns: repeat(4, 1fr); } .br-nt-tile { padding: 10px 2px; } }

/* ---------- Диспетчер задач ---------- */
.tm { display: flex; height: 100%; min-height: 0; }
.tm-nav { width: 220px; flex: none; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.tm-nav-item { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; background: transparent; border-radius: 6px; text-align: left; position: relative; }
.tm-nav-item:hover { background: var(--hover); }
.tm-nav-item.sel { background: var(--hover); }
.tm-nav-item.sel::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.tm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--layer-solid); border-top-left-radius: 8px; border: 1px solid var(--divider); border-width: 1px 0 0 1px; }
.tm-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; }
.tm-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.tm-summary { padding: 0 20px 8px; color: var(--text-2); font-size: 12.5px; }
.tm-table { flex: 1; overflow: auto; padding: 0 10px 12px; }
.tm-row { display: grid; grid-template-columns: minmax(150px, 2fr) 70px minmax(80px, 1fr) 90px 70px 90px; gap: 0; align-items: center; min-height: 30px; font-size: 13px; border-radius: 4px; }
.tm-row > span { padding: 4px 10px; height: 100%; display: flex; align-items: center; }
.tm-row:hover:not(.tm-th) { background: var(--hover); }
.tm-row.sel { background: var(--selected); }
.tm-th { position: sticky; top: 0; z-index: 1; background: var(--layer-solid); color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--divider); border-radius: 0; }
.tm-th span { gap: 4px; }
.tm-th span:hover { color: var(--text); }
.tm-th span.sorted { color: var(--text); font-weight: 600; }
.tm-th svg { width: 10px; height: 10px; }
.tm-c-cpu, .tm-c-mem, .tm-c-pid { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.tm-row.svc { grid-template-columns: minmax(160px, 1.2fr) minmax(160px, 2fr) 120px; }
.tm-state { color: var(--text-2); }
.tm-state.ok { color: var(--success); }
.tm-state.bad { color: var(--danger); }
.tm-empty { padding: 30px; text-align: center; }
.tm-perf { flex: 1; overflow: auto; padding: 0 20px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-content: start; }
.tm-card { background: var(--layer); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.tm-chart-wrap { position: relative; }
.tm-chart { width: 100%; height: 150px; display: block; border: 1px solid var(--border-strong); border-radius: 4px; }
.tm-tip { position: absolute; top: -6px; transform: translateY(-100%); background: var(--acrylic-solid); border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 8px; font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.tm-key { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.tm-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; padding: 6px 4px; }
.tm-val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tm-about { padding: 0 20px 20px; overflow: auto; }
@media (max-width: 760px) {
  .tm-nav { width: 52px; } .tm-nav-label { display: none; }
  .tm-row { grid-template-columns: minmax(110px, 1fr) 60px 64px 76px; }
  .tm-row .tm-c-user, .tm-row .tm-c-state { display: none; }
}

/* ---------- Параметры ---------- */
.stg { display: flex; height: 100%; min-height: 0; }
.st-nav { width: 280px; flex: none; padding: 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.st-profile { display: flex; align-items: center; gap: 14px; padding: 10px 10px 18px; }
.st-profile b { font-weight: 600; }
.st-nav-item { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; border: 0; background: transparent; border-radius: 6px; text-align: left; position: relative; }
.st-nav-item:hover { background: var(--hover); }
.st-nav-item.sel { background: var(--hover); }
.st-nav-item.sel::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.st-main { flex: 1; min-width: 0; overflow-y: auto; padding: 8px 32px 32px; display: flex; flex-direction: column; gap: 4px; }
.st-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 12px 0 16px; }
.st-sub { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.st-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; min-height: 66px; background: var(--layer); border: 1px solid var(--border); border-radius: 6px; }
.st-card-ic svg { width: 20px; height: 20px; }
.st-hero { display: flex; align-items: center; gap: 22px; padding: 6px 0 18px; }
.st-hero h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.st-hero-img svg { width: 120px; height: 90px; }
.st-preview { height: 200px; border-radius: 10px; background-size: cover; background-position: center; position: relative; overflow: hidden; margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--border); max-width: 420px; }
.st-preview-win { position: absolute; left: 22%; top: 18%; width: 56%; height: 52%; border-radius: 6px; background: var(--mica); backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.st-preview-win i { display: block; height: 6px; margin: 10px 12px 0; border-radius: 3px; background: var(--accent); width: 40%; }
.st-preview-win i + i { background: var(--border-strong); width: 70%; }
.st-preview-win i + i + i { width: 55%; }
.st-preview-bar { position: absolute; left: 25%; right: 25%; bottom: 8px; height: 16px; border-radius: 6px; background: var(--taskbar); }
.st-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.st-wall { height: 78px; border-radius: 8px; border: 2px solid transparent; background-size: cover; background-position: center; }
.st-wall:hover { border-color: var(--border-strong); }
.st-wall.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.st-accents { display: grid; grid-template-columns: repeat(auto-fill, 40px); gap: 8px; padding: 12px 18px; background: var(--layer); border: 1px solid var(--border); border-radius: 6px; }
.st-accent { width: 40px; height: 40px; border-radius: 6px; border: 0; }
.st-accent.sel { box-shadow: 0 0 0 2px var(--layer-solid), 0 0 0 4px var(--text); }
.st-color { width: 48px; height: 32px; border: 1px solid var(--border-strong); border-radius: 6px; background: transparent; padding: 2px; }
.st-pins { display: flex; flex-direction: column; gap: 4px; }
.st-clock { font-size: 20px; font-family: var(--font-display); margin-bottom: 12px; text-transform: capitalize; }
.st-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; padding: 14px 18px; background: var(--layer); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
@media (max-width: 760px) {
  .st-nav { width: 56px; padding: 8px 4px; } .st-nav-item span:last-child, .st-profile div { display: none; } .st-profile { padding: 6px 4px 12px; }
  .st-profile .avatar-sm { width: 40px !important; height: 40px !important; font-size: 16px !important; }
  .st-main { padding: 8px 14px 24px; } .st-card { flex-wrap: wrap; }
}

/* ---------- Калькулятор ---------- */
.calc { display: flex; height: 100%; outline: none; }
.calc-left { flex: 1; min-width: 280px; display: flex; flex-direction: column; padding: 4px 6px 6px; }
.calc-mode { font-family: var(--font-display); font-size: 20px; font-weight: 600; padding: 4px 8px; }
.calc-expr { min-height: 22px; text-align: right; color: var(--text-2); padding: 8px 12px 0; font-size: 14px; }
.calc-display { text-align: right; font-family: var(--font-display); font-size: 46px; font-weight: 600; padding: 0 12px 10px; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.calc-pad { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 2px; }
.calc-key { border: 1px solid var(--border); border-radius: 5px; font-size: 17px; background: var(--layer); min-height: 44px; }
.calc-key.num { background: var(--layer-solid); font-weight: 600; }
.calc-key:hover { background: var(--hover); }
.calc-key.eq { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.calc-key.eq:hover { background: var(--accent-hover); }
.calc-side { width: 220px; border-left: 1px solid var(--divider); padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.calc-hist { display: flex; flex-direction: column; gap: 2px; }
.calc-hist-item { border: 0; background: transparent; text-align: right; padding: 8px; border-radius: 6px; }
.calc-hist-item:hover { background: var(--hover); }
.calc-hist-res { font-size: 20px; font-weight: 600; }
.calc { container-type: inline-size; }
@container (max-width: 520px) { .calc-side { display: none; } }

/* ---------- Фотографии / медиа / просмотр ---------- */
.ph { display: flex; flex-direction: column; height: 100%; background: var(--mica); outline: none; }
.ph-bar { display: flex; align-items: center; gap: 6px; padding: 4px 12px 8px; font-size: 13px; }
.ph-view { flex: 1; min-height: 0; position: relative; }
.ph-stage { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; cursor: grab; touch-action: none; }
.ph-stage:active { cursor: grabbing; }
.ph-img { max-width: none; max-height: none; transform-origin: center; transition: transform .12s ease-out; user-select: none; box-shadow: 0 6px 30px rgba(0,0,0,.3); }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 64px; border: 0; border-radius: 8px; background: var(--acrylic); backdrop-filter: blur(20px); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.ph-view:hover .ph-nav { opacity: 1; }
.ph-nav.prev { left: 12px; } .ph-nav.next { right: 12px; }
.md { display: flex; flex-direction: column; height: 100%; background: #000; color: #fff; }
.md-main { flex: 1; min-height: 0; display: flex; }
.md-screen { flex: 1; min-width: 0; position: relative; display: grid; place-items: center; }
.md-video { width: 100%; height: 100%; background: #000; outline: none; }
.md-video.audio { height: 64px; align-self: end; position: absolute; bottom: 0; left: 0; }
.md-cover { position: absolute; inset: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 40%, #3b2a6b, #0b0b14 70%); }
.md-cover svg.appicon { width: 120px; height: 120px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.md-cover-title { font-size: 18px; font-weight: 600; text-align: center; padding: 0 20px; }
.md-list { width: 280px; overflow-y: auto; background: #151515; padding: 6px; border-left: 1px solid #2a2a2a; }
.md-list .list-item { color: #ddd; }
.md-list .list-item:hover { background: rgba(255,255,255,.08); }
.md-list .list-item.sel { background: rgba(255,255,255,.14); }
.md-list-head { font-weight: 600; padding: 8px 10px; }
.md-bar { display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: var(--mica-solid); color: var(--text); font-size: 12.5px; }
.vw { display: flex; flex-direction: column; height: 100%; }
.vw-frame { flex: 1; border: 0; background: #525659; width: 100%; }
@media (max-width: 700px) { .md-list { display: none; } }

/* ---------- О системе ---------- */
.wv { display: flex; flex-direction: column; gap: 16px; padding: 18px 26px 22px; height: 100%; background: var(--layer-solid); }
.wv-brand { display: flex; align-items: center; gap: 18px; }
.wv-brand svg { width: 64px; height: 64px; }
.wv-name { font-family: var(--font-display); font-size: 34px; font-weight: 300; letter-spacing: -.5px; }
.wv-line { height: 1px; background: var(--divider); }

/* ---------- Paint ---------- */
.pt { display: flex; flex-direction: column; height: 100%; outline: none; }
.pt-ribbon { display: flex; align-items: center; gap: 10px; padding: 6px 12px 8px; flex-wrap: wrap; background: var(--mica); border-bottom: 1px solid var(--divider); }
.pt-group { display: flex; align-items: center; gap: 2px; padding-right: 10px; border-right: 1px solid var(--divider); }
.pt-group:last-child { border-right: 0; }
.pt-tool.on { background: var(--selected); }
.pt-current { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-strong); margin-right: 6px; }
.pt-picker { width: 0; height: 0; opacity: 0; border: 0; padding: 0; position: absolute; }
.pt-swatches { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.pt-sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); padding: 0; }
.pt-sw:hover { transform: scale(1.2); }
.pt-wrap { flex: 1; min-height: 0; overflow: auto; background: color-mix(in srgb, var(--text) 8%, var(--mica-solid)); padding: 20px; }
.pt-paper { position: relative; box-shadow: 0 2px 12px rgba(0,0,0,.25); background: #fff; }
.pt-canvas, .pt-overlay { position: absolute; left: 0; top: 0; display: block; }
.pt-overlay { cursor: crosshair; touch-action: none; }
.pt-status { height: 28px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 14px; border-top: 1px solid var(--divider); background: var(--mica); }
.tab-app { width: 14px; height: 14px; }
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-bar { display: flex; align-items: center; gap: 4px; padding: 2px 10px 6px; }
.chat-frame { flex: 1; border: 0; width: 100%; background: #262624; }
