/* ===== Стили приложений ===== */
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- Проводник ---------- */
.ex-nav { display: flex; align-items: center; gap: 4px; padding: 2px 10px 6px; }
.ex-addr { flex: 1; display: flex; align-items: center; position: relative; overflow: hidden; padding: 0 6px; cursor: text; }
.ex-crumbs { display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 4px; font-size: .9rem; cursor: default; }
.crumb:hover { background: var(--hover); }
.crumb-sep { color: var(--fg-3); }
.ex-addr-in { position: absolute; inset: 0; border: 0; background: var(--surface-2); padding: 0 10px; outline: none; display: none; }
.ex-addr.editing .ex-addr-in { display: block; }
.ex-search { width: 220px; display: flex; align-items: center; gap: 8px; }
.ex-search input, .st-search input, .wx-search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }
.ex-cmd { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.ex-main { flex: 1; display: flex; min-height: 0; background: var(--surface); }
.ex-side { width: 210px; flex-shrink: 0; overflow: auto; padding: 8px 6px; border-right: 1px solid var(--line); }
.ex-side-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; font-size: .9rem; position: relative; }
.ex-side-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-side-item:hover { background: var(--hover); }
.ex-side-item.on { background: var(--press); }
.ex-side-item.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--accent); }
.ex-side-item.indent { padding-left: 26px; }
.ex-side-item.drop { background: rgba(var(--accent-rgb), .25); }
.ex-side-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.ex-content { flex: 1; overflow: auto; outline: none; padding: 6px 10px; position: relative; }
.ex-items { display: flex; flex-direction: column; }
.ex-item { border-radius: 6px; border: 1px solid transparent; }
.ex-item:hover { background: var(--hover); }
.ex-item.sel { background: rgba(var(--accent-rgb), .2); border-color: rgba(var(--accent-rgb), .4); }
.ex-item.cut > svg, .ex-item.cut .c-name svg { opacity: .45; }
.ex-item.drop { background: rgba(var(--accent-rgb), .3); }
.v-grid .ex-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.v-grid .ex-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; text-align: center; }
.v-grid .ex-label { font-size: .85rem; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-thumb { object-fit: cover; border-radius: 4px; box-shadow: var(--shadow-sm); background: var(--surface-3); }
.v-list .ex-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px; }
.v-list .ex-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: .9rem; }
.v-list .ex-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-dhead, .ex-row { display: grid; grid-template-columns: minmax(200px, 2fr) 1.2fr 1.2fr 90px; gap: 12px; align-items: center; }
.ex-dhead { padding: 6px 10px; font-size: .82rem; color: var(--fg-2); border-bottom: 1px solid var(--line); margin-bottom: 4px; position: sticky; top: -6px; background: var(--surface); z-index: 1; }
.ex-dhead div { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 4px; }
.ex-dhead div:hover { background: var(--hover); }
.ex-row { padding: 5px 10px; font-size: .88rem; }
.ex-row > div:not(.c-name) { color: var(--fg-2); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-row .r { text-align: right; }
.c-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.c-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-rename-in { width: 100%; font-size: .85rem; border: 1px solid var(--accent); border-radius: 3px; background: var(--surface-2); color: var(--fg); outline: none; padding: 1px 4px; text-align: inherit; }
.ex-home { padding: 14px 20px; }
.ex-sec-title { font-weight: 600; margin: 4px 4px 10px; }
.ex-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 22px; }
.ex-qcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); transition: background .12s, transform .12s; }
.ex-qcard:hover { background: var(--card-hover); transform: translateY(-1px); }
.ex-qcard.drop { background: rgba(var(--accent-rgb), .25); }
.ex-qcard b { display: block; font-weight: 600; font-size: .92rem; }
.ex-qcard span { font-size: .8rem; color: var(--fg-2); }
.ex-recrow { grid-template-columns: minmax(200px, 2fr) 1fr 2fr; }
.ex-drives { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ex-drive { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.ex-drive:hover { background: var(--card-hover); }
.dinfo { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dinfo span { font-size: .8rem; color: var(--fg-2); }
.dbar, .st-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; width: 100%; }
.dbar i, .st-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ex-preview { width: 260px; flex-shrink: 0; border-left: 1px solid var(--line); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.ex-pv-img { width: 100%; border-radius: 8px; box-shadow: var(--shadow-sm); }
.ex-pv-text { font-family: var(--mono); font-size: .78rem; white-space: pre-wrap; margin: 0; padding: 10px; background: var(--surface-2); border-radius: 8px; max-height: 300px; overflow: auto; user-select: text; }
.ex-pv-meta { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; color: var(--fg-2); }
.ex-pv-meta b { color: var(--fg); word-break: break-word; }
.ex-pv-empty { padding: 30px 6px; text-align: center; }
@media (max-width: 700px) { .ex-side { display: none; } .ex-search { width: 130px; } }

/* ---------- Параметры ---------- */
.st { flex-direction: row !important; }
.st-nav { width: 290px; flex-shrink: 0; padding: 6px 12px 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.st-me { display: flex; align-items: center; gap: 14px; padding: 10px 8px 14px; border-radius: 10px; }
.st-me:hover { background: var(--hover); }
.st-me b { display: block; font-weight: 600; }
.st-me span { font-size: .84rem; color: var(--fg-2); }
.st-search { display: flex; align-items: center; gap: 8px; }
.st-search-res { border-radius: 8px; background: var(--surface-2); box-shadow: var(--shadow-sm); padding: 4px; }
.st-navitem { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 6px; font-size: .92rem; position: relative; }
.st-navitem:hover { background: var(--hover); }
.st-navitem.on { background: var(--press); }
.st-navitem.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.st-main { flex: 1; overflow: auto; padding: 0 32px 30px 20px; }
.st-page { max-width: 900px; }
.st-anim { animation: st-in .3s var(--ease-out); }
@keyframes st-in { from { opacity: 0; transform: translateY(12px); } }
.st-h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; margin: 10px 0 20px; display: flex; align-items: center; gap: 10px; }
.st-crumb { color: var(--fg-2); }
.st-sec { margin-bottom: 22px; display: flex; flex-direction: column; gap: 3px; }
.st-sec-title { font-weight: 600; margin: 0 2px 8px; display: flex; align-items: center; justify-content: space-between; }
.st-sec-title:empty { display: none; }
.st-row { display: flex; align-items: center; gap: 16px; min-height: 66px; padding: 12px 18px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.st-row.click:hover { background: var(--card-hover); }
.st-ic { color: var(--fg); display: grid; place-items: center; width: 22px; }
.st-t { flex: 1; min-width: 0; }
.st-t span { display: block; font-size: .82rem; color: var(--fg-2); margin-top: 2px; }
.st-c { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.st-chev { color: var(--fg-2); }
.st-card { padding: 16px 18px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.st-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 20px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); margin-bottom: 22px; }
.st-hero-pc { width: 150px; height: 96px; border-radius: 8px; padding: 5px; background: #111; box-shadow: var(--shadow-sm); }
.st-mini-desk { width: 100%; height: 100%; border-radius: 4px; }
.st-hero-tiles { display: flex; gap: 10px; }
.st-tile { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); min-width: 170px; }
.st-tile:hover { background: var(--hover); }
.st-tile b { display: block; font-size: .88rem; font-weight: 600; }
.st-tile span { font-size: .78rem; color: var(--fg-2); }
.st-swatch { width: 28px; height: 28px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.st-bar { width: 200px; }
.st-spec { width: 100%; border-collapse: collapse; font-size: .92rem; }
.st-spec td { padding: 7px 0; user-select: text; }
.st-spec td:first-child { color: var(--fg-2); width: 42%; }
.st-preview { display: flex; gap: 20px; margin-bottom: 22px; }
.st-prev-desk { width: 300px; height: 180px; border-radius: 10px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.st-prev-win { position: absolute; left: 22%; top: 18%; width: 56%; height: 52%; border-radius: 6px; background: var(--win-bg); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.st-prev-win i { height: 6px; border-radius: 3px; background: var(--line-2); }
.st-prev-win i:first-child { width: 40%; background: var(--accent); }
.st-prev-tb { position: absolute; left: 6%; right: 6%; bottom: 6px; height: 16px; border-radius: 5px; background: var(--glass); display: flex; justify-content: center; align-items: center; gap: 4px; }
.st-prev-tb i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); opacity: .8; }
.st-wps { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.st-wp { aspect-ratio: 16/10; border-radius: 8px; position: relative; overflow: hidden; outline: 3px solid transparent; outline-offset: 2px; transition: outline-color .12s, transform .12s; }
.st-wp:hover { transform: scale(1.03); }
.st-wp.on { outline-color: var(--accent); }
.st-wp span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.st-colors { display: grid; grid-template-columns: repeat(auto-fill, 36px); gap: 6px; }
.st-color { width: 36px; height: 36px; border-radius: 6px; border: 0; outline: 2px solid transparent; outline-offset: 2px; transition: transform .1s; }
.st-color:hover { transform: scale(1.08); }
.st-color.on { outline-color: var(--fg); }
.st-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.st-theme { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.st-theme-img { aspect-ratio: 16/10; border-radius: 10px; position: relative; box-shadow: var(--shadow-sm); transition: transform .15s; }
.st-theme:hover .st-theme-img { transform: translateY(-3px); box-shadow: var(--shadow); }
.st-theme-win { position: absolute; left: 25%; top: 25%; width: 50%; height: 45%; border-radius: 6px; padding: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.st-theme-win i { display: block; width: 50%; height: 6px; border-radius: 3px; }
.st-applist { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.st-app { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 6px; }
.st-app:hover { background: var(--hover); }
@media (max-width: 760px) { .st-nav { width: 64px; padding: 6px; } .st-nav .st-me div, .st-nav .st-navitem span:last-child, .st-search, .st-search-res { display: none; } .st-hero { grid-template-columns: 1fr; } .st-hero-tiles { flex-wrap: wrap; } }

/* ---------- Браузер ---------- */
.br-tabs { display: flex; gap: 4px; align-items: center; overflow: hidden; padding-left: 10px; min-width: 0; height: 100%; }
.br-tab { display: flex; align-items: center; gap: 8px; height: 32px; width: 220px; min-width: 60px; flex-shrink: 1; padding: 0 6px 0 10px; border-radius: 8px; font-size: .84rem; transition: background .12s; }
.br-tab:hover { background: var(--hover); }
.br-tab.on { background: var(--surface-2); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .br-tab.on { background: var(--surface-3); }
.br-fav { width: 16px; display: grid; place-items: center; flex-shrink: 0; }
.br-tt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-tx { width: 22px; height: 22px; border: 0; background: transparent; border-radius: 4px; display: grid; place-items: center; opacity: .7; flex-shrink: 0; }
.br-tx:hover { background: var(--press); opacity: 1; }
.br-newtab { margin: 0 6px; }
.br-bar { display: flex; align-items: center; gap: 4px; padding: 4px 10px; }
.br-addr { flex: 1; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 12px; border-radius: 17px; background: var(--input); border: 1px solid var(--input-border); }
.br-addr:focus-within { background: var(--surface-2); border-color: var(--accent); }
.br-addr input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }
.br-lock { color: var(--fg-2); display: grid; }
.br-bookmarks { display: flex; gap: 2px; padding: 0 10px 4px; overflow: hidden; border-bottom: 1px solid var(--line); }
.br-bm { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; background: transparent; border-radius: 6px; font-size: .82rem; white-space: nowrap; }
.br-bm:hover { background: var(--hover); }
.br-progress { height: 2px; position: relative; overflow: hidden; }
.br-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.br-progress.on i { animation: br-load 6s cubic-bezier(.1,.6,.3,1) forwards; }
.br-progress.done i { width: 100% !important; opacity: 0; transition: opacity .3s .1s; animation: none; }
@keyframes br-load { to { width: 85%; } }
.br-views { flex: 1; position: relative; background: #fff; }
html[data-theme="dark"] .br-views { background: var(--surface); }
.br-view { position: absolute; inset: 0; display: none; flex-direction: column; overflow: auto; }
.br-view.on { display: flex; }
.br-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.br-info { display: flex; align-items: center; gap: 10px; padding: 6px 12px; font-size: .84rem; background: rgba(var(--accent-rgb), .12); color: var(--fg); }
.br-info span { flex: 1; }
.br-blocked { margin: auto; max-width: 520px; text-align: center; padding: 40px 20px; color: var(--fg-2); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.br-blocked h2 { color: var(--fg); margin: 6px 0 0; font-weight: 600; }
.br-blocked p { margin: 0 0 8px; line-height: 1.5; }
.br-newtab { flex: 1; display: grid; place-items: center; position: relative; }
.br-newtab::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.br-nt-inner { position: relative; width: min(640px, 92%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; }
.br-nt-time { font-family: var(--font-display); font-size: 4.2rem; font-weight: 600; text-shadow: 0 2px 20px rgba(0,0,0,.3); line-height: 1; }
.br-nt-greet { font-size: 1.15rem; margin-bottom: 18px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.br-nt-search { width: 100%; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 18px; border-radius: 25px; background: rgba(255,255,255,.92); color: #333; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.br-nt-search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 1.05rem; color: #222; }
.br-nt-search .icon-btn { color: #333; }
.br-dial { display: grid; grid-template-columns: repeat(auto-fill, 96px); justify-content: center; gap: 12px; width: 100%; margin-top: 26px; }
.br-dial-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 12px; font-size: .82rem; text-shadow: 0 1px 4px rgba(0,0,0,.5); transition: background .12s; }
.br-dial-item:hover { background: rgba(255,255,255,.15); }
.br-dial-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.9); color: #333; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.br-page { padding: 30px 40px; max-width: 900px; width: 100%; margin: 0 auto; }
.br-page-head { display: flex; align-items: center; justify-content: space-between; }
.br-page h1 { font-family: var(--font-display); font-weight: 600; }
.br-list { display: flex; flex-direction: column; gap: 2px; }
.br-list-day { font-weight: 600; margin: 14px 0 6px; }
.br-list-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px; }
.br-list-item:hover { background: var(--hover); }
.br-list-item b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.br-about { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.br-about p { max-width: 560px; line-height: 1.6; }
.br-about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; width: 100%; max-width: 620px; }
.br-about-grid div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.br-about-grid span { font-size: .84rem; color: var(--fg-2); }
.br-imgview { flex: 1; display: grid; place-items: center; background: #1a1a1a; }
.br-imgview img, .br-imgview video { max-width: 100%; max-height: 100%; }
.br-text { margin: 0; padding: 16px; font-family: var(--mono); white-space: pre-wrap; user-select: text; }

/* ---------- Блокнот ---------- */
.np-find { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.np-find .input { height: 28px; width: 170px; }
.np-text { flex: 1; resize: none; border: 0; outline: none; padding: 12px 16px; background: var(--surface); color: var(--fg); line-height: 1.5; tab-size: 4; border-top: 1px solid var(--line); }

/* ---------- Калькулятор ---------- */
.calc { background: var(--surface); }
.calc-top { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.calc-wrap { flex: 1; display: flex; min-height: 0; }
.calc-main { flex: 1; display: flex; flex-direction: column; padding: 0 4px 4px; min-width: 0; }
.calc-display { padding: 10px 12px 4px; text-align: right; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; }
.calc-expr { color: var(--fg-2); font-size: .95rem; min-height: 22px; word-break: break-all; }
.calc-entry { font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 1.2; word-break: break-all; user-select: text; }
.calc-mem { display: flex; justify-content: space-between; padding: 2px 4px; }
.calc-mem button { border: 0; background: transparent; padding: 4px 8px; border-radius: 4px; font-size: .8rem; }
.calc-mem button:hover:not(:disabled) { background: var(--hover); }
.calc-mem button:disabled { opacity: .35; }
.calc-keys { flex: 1; display: grid; gap: 3px; }
.calc-keys.std { grid-template-columns: repeat(4, 1fr); }
.calc-keys.sci { grid-template-columns: repeat(5, 1fr); }
.ck { border: 0; border-radius: 6px; font-size: 1.05rem; background: var(--surface-3); box-shadow: inset 0 -1px 0 var(--line); transition: background .08s, transform .08s; min-height: 40px; }
.ck:hover { background: var(--surface-4); }
.ck:active, .ck.press { transform: scale(.96); filter: brightness(.95); }
.ck.num { background: var(--surface-2); font-weight: 600; }
html[data-theme="dark"] .ck.num { background: #3a3d48; }
html[data-theme="dark"] .ck.num:hover { background: #444855; }
.ck.fn { font-size: .95rem; }
.ck.eq { background: var(--accent); color: var(--accent-fg); font-size: 1.3rem; }
.ck.eq:hover { filter: brightness(1.1); background: var(--accent); }
.calc-side { width: 240px; border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 4px; position: relative; }
.calc-list { flex: 1; overflow: auto; }
.calc-li { padding: 8px 10px; border-radius: 6px; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.calc-li:hover { background: var(--hover); }
.calc-li b { font-size: 1.2rem; }
.calc-clear-list { align-self: flex-end; }
.calc-conv { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.cv-eq { text-align: center; font-size: 1.4rem; color: var(--fg-2); }
.cv-b { font-family: var(--font-display); font-size: 2rem; font-weight: 600; word-break: break-all; }

/* ---------- Paint ---------- */
.pt-bar { display: flex; align-items: center; gap: 6px; padding: 4px 10px 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.pt-group { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-right: 1px solid var(--line); }
.pt-group:last-child { border: 0; }
.pt-size { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.pt-size .slider { width: 100px; }
.pt-cur { position: relative; width: 38px; height: 38px; margin-right: 6px; }
.pt-c1, .pt-c2 { position: absolute; width: 24px; height: 24px; border-radius: 6px; box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 3px var(--line-2); }
.pt-c1 { left: 0; top: 0; z-index: 1; }
.pt-c2 { right: 0; bottom: 0; }
.pt-pal { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.pt-sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); padding: 0; transition: transform .1s; }
.pt-sw:hover { transform: scale(1.2); }
.pt-custom { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; margin-left: 4px; }
.pt-custom:hover { background: var(--hover); }
.pt-custom input { position: absolute; inset: 0; opacity: 0; }
.pt-stage { flex: 1; overflow: auto; background: var(--surface-3); padding: 20px; display: flex; }
.pt-canvas-wrap { position: relative; margin: auto; box-shadow: var(--shadow); flex-shrink: 0; }
.pt-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.pt-overlay { pointer-events: none; }
.pt-stage[data-tool] canvas { cursor: crosshair; }
.pt-stage[data-tool="picker"] canvas, .pt-stage[data-tool="bucket"] canvas { cursor: copy; }
.pt-stage[data-tool="text"] canvas { cursor: text; }

/* ---------- Терминал ---------- */
.term { background: #0c0c0c; color: #cccccc; font-family: var(--mono); font-size: 14px; overflow: auto !important; padding: 8px 12px; display: block !important; cursor: text; }
.term[data-scheme="matrix"] { background: #020a02; color: #3cff7a; }
.term[data-scheme="ocean"] { background: #0b1d33; color: #cfe6ff; }
.term[data-scheme="light"] { background: #fafafa; color: #222; }
.term[data-scheme="retro"] { background: #1d1405; color: #ffb000; }
.term-out .tl { white-space: pre-wrap; word-break: break-word; line-height: 1.45; user-select: text; }
.term .err { color: #f14c4c; }
.term .dim { opacity: .65; }
.term .hl, .term .c-hl { color: #3b8eea; }
.c-y { color: #e5e510; } .c-b { color: #3b8eea; } .c-g { color: #23d18b; } .c-r { color: #f14c4c; } .c-p { color: inherit; }
.term[data-scheme="light"] .c-y { color: #a07800; }
.term-line { display: flex; white-space: pre; line-height: 1.45; }
.term-in { flex: 1; border: 0; outline: none; background: transparent; color: inherit; font: inherit; padding: 0; caret-color: currentColor; }
.term-matrix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }

/* ---------- Диспетчер задач ---------- */
.tm-head { display: flex; align-items: center; padding: 0 12px 8px; border-bottom: 1px solid var(--line); }
.tm-body { flex: 1; overflow: auto; background: var(--surface); padding: 6px 10px; }
.tm-row { display: grid; grid-template-columns: 1fr 90px 110px; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 6px; font-size: .9rem; }
.tm-row:not(.tm-th):hover { background: var(--hover); }
.tm-row.sel { background: rgba(var(--accent-rgb), .2); }
.tm-row > span:not(:first-child) { text-align: right; color: var(--fg-2); }
.tm-th { font-size: .8rem; color: var(--fg-2); border-bottom: 1px solid var(--line); border-radius: 0; }
.tm-perf { display: grid; gap: 14px; padding: 8px; }
.tm-card { padding: 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.tm-big { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.tm-graph { width: 100%; height: 140px; border: 1px solid var(--line); border-radius: 6px; background: repeating-linear-gradient(0deg, transparent 0 27px, var(--line) 27px 28px); }

/* ---------- Фотографии ---------- */
.ph { background: var(--surface); }
.ph-top { display: flex; align-items: center; gap: 6px; padding: 4px 12px 10px; }
.ph-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: 130px; gap: 8px; padding: 0 12px 12px; }
.ph-tile { border-radius: 8px; background-size: cover; background-position: center; position: relative; overflow: hidden; transition: transform .15s; }
.ph-tile:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.ph-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-stage { flex: 1; position: relative; overflow: hidden; display: grid; place-items: center; background: #101114; }
.ph-stage img { max-width: 100%; max-height: 100%; transition: transform .2s; }
.ph-nav { position: absolute; top: 50%; width: 40px; height: 64px; margin-top: -32px; border: 0; border-radius: 8px; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.ph-stage:hover .ph-nav { opacity: 1; }
.ph-nav.prev { left: 10px; } .ph-nav.next { right: 10px; }
.ph-count { text-align: center; padding: 6px; }

/* ---------- Медиаплеер ---------- */
.mu-main { flex: 1; display: flex; min-height: 0; }
.mu-list { width: 280px; overflow: auto; padding: 6px; border-right: 1px solid var(--line); }
.mu-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.mu-row:hover { background: var(--hover); }
.mu-row.on { background: rgba(var(--accent-rgb), .18); }
.mu-row b { display: block; font-weight: 500; font-size: .9rem; }
.mu-dot { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.mu-now { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; overflow: hidden; }
.mu-vis { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 45%; opacity: .7; }
.mu-cover { width: 160px; height: 160px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), #a35cff); box-shadow: var(--shadow-lg); margin-bottom: 14px; position: relative; }
.mu-title { font-size: 1.3rem; font-weight: 600; position: relative; }
.mu-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.mu-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; transition: transform .1s; }
.mu-play:hover { transform: scale(1.06); }

/* ---------- Часы ---------- */
.ck-head { padding: 0 14px 8px; border-bottom: 1px solid var(--line); }
.ck-body { flex: 1; overflow: auto; padding: 20px; background: var(--surface); }
.ck-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.ck-timers { display: grid; grid-template-columns: repeat(auto-fill, 190px); gap: 14px; }
.ck-timer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ck-timer svg { width: 130px; height: 130px; transform: rotate(-90deg); }
.ck-timer .trk { fill: none; stroke: var(--line-2); stroke-width: 6; }
.ck-timer .prg { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ck-tt { position: absolute; top: 66px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.ck-alarms { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ck-alarm { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.ck-alarm.off { opacity: .6; }
.ck-at { font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.ck-sw { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 20px; }
.ck-swt { font-family: var(--font-display); font-size: 3.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ck-laps { width: 100%; max-width: 380px; }
.ck-laps div { display: flex; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ck-world { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ck-city { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ck-city b { font-family: var(--font-display); font-size: 2rem; font-weight: 600; }

/* ---------- Календарь ---------- */
.cl { flex-direction: row !important; background: var(--surface); }
.cl-main { flex: 1; display: flex; flex-direction: column; padding: 0 14px 14px; min-width: 0; }
.cl-head { display: flex; align-items: center; gap: 6px; padding: 4px 0 10px; }
.cl-m { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.cl-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto repeat(6, 1fr); gap: 3px; }
.cl-wd { font-size: .8rem; color: var(--fg-2); padding: 4px 8px; }
.cl-cell { border-radius: 8px; padding: 6px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow: hidden; min-height: 0; }
.cl-cell:hover { background: var(--card-hover); }
.cl-cell.other { opacity: .45; }
.cl-cell.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cl-n { font-size: .86rem; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cl-cell.today .cl-n { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.cl-chip { font-size: .72rem; color: #fff; padding: 1px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-side { width: 270px; border-left: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cl-side-head { display: flex; align-items: center; gap: 14px; }
.cl-big { font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: var(--accent-text); }
.cl-events { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.cl-ev { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; background: var(--card); }
.cl-ev i { width: 4px; align-self: stretch; border-radius: 2px; }
.cl-ev > div { flex: 1; }

/* ---------- Погода ---------- */
.wx { overflow: auto !important; display: block !important; background: linear-gradient(160deg, rgba(79,140,255,.25), rgba(163,92,255,.12) 50%, transparent), var(--surface); padding: 0 22px 22px; }
.wx-top { display: flex; align-items: center; gap: 8px; padding: 4px 0 12px; position: relative; }
.wx-search { width: 260px; display: flex; align-items: center; gap: 8px; }
.wx-sugg { position: absolute; top: 40px; left: 0; width: 320px; z-index: 5; border-radius: 8px; background: var(--surface-2); box-shadow: var(--shadow); overflow: hidden; }
.wx-sugg div { padding: 8px 12px; }
.wx-sugg div:hover { background: var(--hover); }
.wx-hero { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 10px 0 20px; }
.wx-city { font-size: 1.1rem; display: flex; align-items: center; gap: 6px; }
.wx-now { display: flex; align-items: center; gap: 10px; }
.wx-temp { font-family: var(--font-display); font-size: 5rem; font-weight: 600; line-height: 1; }
.wx-desc { font-size: 1.2rem; font-weight: 600; }
.wx-details { display: grid; grid-template-columns: repeat(3, 120px); gap: 10px; align-self: center; }
.wx-details div { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: .84rem; }
.wx-details span { color: var(--fg-2); }
.wx-details b { font-size: 1.1rem; }
.wx-sec { font-weight: 600; margin: 8px 0 10px; }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.wx-hours div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 10px 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.wx-days { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 6px; overflow-x: auto; }
.wx-days div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }

/* ---------- Сапёр ---------- */
.ms { align-items: center; background: var(--surface); overflow: auto !important; }
.ms-top { display: flex; align-items: center; gap: 12px; padding: 6px 12px 12px; }
.ms-cnt, .ms-time { font-family: var(--mono); font-weight: 600; min-width: 60px; }
.ms-face { font-size: 1.5rem; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); }
.ms-face:hover { background: var(--hover); }
.ms-board { display: grid; gap: 2px; padding: 8px; border-radius: 10px; background: var(--surface-3); }
.ms-c { border: 0; border-radius: 4px; background: linear-gradient(145deg, #6ca6ff, #3d7bf0); color: #fff; font-weight: 700; font-size: .95rem; padding: 0; display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.ms-c:hover:not(.open) { filter: brightness(1.12); }
.ms-c.open { background: var(--surface-2); box-shadow: none; }
.ms-c.boom { background: #ff5b5b !important; }
.ms-c[data-n="1"] { color: #2f6bff; } .ms-c[data-n="2"] { color: #18a058; } .ms-c[data-n="3"] { color: #e5484d; } .ms-c[data-n="4"] { color: #6d4bff; } .ms-c[data-n="5"] { color: #b45309; } .ms-c[data-n="6"] { color: #0e9fb0; } .ms-c[data-n="7"] { color: #333; } .ms-c[data-n="8"] { color: #777; }
.ms-best { padding: 10px; }

/* ---------- 2048 ---------- */
.g2 { background: var(--surface); }
.g2-top { display: flex; align-items: center; gap: 8px; padding: 6px 18px 12px; }
.g2-logo { font-family: var(--font-display); font-size: 2.4rem; color: #ff7a2f; }
.g2-score { display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border-radius: 8px; background: var(--surface-3); min-width: 70px; }
.g2-score span { font-size: .7rem; color: var(--fg-2); font-weight: 600; }
.g2-board { margin: 14px auto; width: min(360px, calc(100% - 36px)); aspect-ratio: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface-4); touch-action: none; }
.g2-cell { border-radius: 8px; background: var(--line-2); position: relative; }
.g2-tile { position: absolute; inset: 0; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 1.7rem; color: #fff; }
.g2-tile:empty { display: none; }
.g2-tile.new { animation: g2-pop .2s var(--ease-out); }
@keyframes g2-pop { from { transform: scale(.4); } }
.t2 { background: #eee4da; color: #776e65 !important; } .t4 { background: #ede0c8; color: #776e65 !important; }
.t8 { background: #f2b179; } .t16 { background: #f59563; } .t32 { background: #f67c5f; } .t64 { background: #f65e3b; }
.t128 { background: #edcf72; font-size: 1.4rem !important; } .t256 { background: #edcc61; font-size: 1.4rem !important; } .t512 { background: #edc850; font-size: 1.4rem !important; }
.t1024 { background: #6d4bff; font-size: 1.15rem !important; } .t2048 { background: linear-gradient(135deg, #4f8cff, #a35cff); font-size: 1.15rem !important; } .t4096 { background: #222; font-size: 1.15rem !important; }

/* ---------- Ассистент ---------- */
.as { background: linear-gradient(180deg, rgba(var(--accent-rgb), .12), transparent 40%), var(--surface); }
.as-log { flex: 1; overflow: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 12px; }
.as-msg { display: flex; gap: 8px; align-items: flex-start; animation: st-in .25s var(--ease-out); }
.as-msg.me { justify-content: flex-end; }
.as-av { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.as-bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); box-shadow: var(--shadow-sm); line-height: 1.5; font-size: .93rem; user-select: text; }
html[data-theme="dark"] .as-bubble { background: var(--surface-3); }
.as-msg.me .as-bubble { background: var(--accent); color: var(--accent-fg); border-radius: 14px 14px 4px 14px; }
.as-bubble ul { margin: 6px 0 0; padding-left: 18px; }
.as-bubble .btn { margin-top: 8px; }
.as-files { display: flex; flex-wrap: wrap; gap: 6px; }
.as-typing { display: inline-flex; gap: 4px; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-2); animation: typing 1s infinite; }
.as-typing i:nth-child(2) { animation-delay: .15s; } .as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { transform: translateY(-4px); opacity: .4; } }
.as-chips { display: flex; gap: 6px; padding: 6px 14px; overflow-x: auto; }
.as-chip { flex-shrink: 0; border: 1px solid var(--line-2); background: var(--card); border-radius: 16px; padding: 5px 12px; font-size: .82rem; }
.as-chip:hover { background: var(--hover); border-color: var(--accent); }
.as-form { display: flex; gap: 6px; padding: 8px 14px 14px; }
.as-form .input { flex: 1; height: 40px; border-radius: 20px; padding: 0 16px; }
.as-send { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); }
.as-send:hover { background: var(--accent); filter: brightness(1.1); }

/* ---------- Камера ---------- */
.cam { background: #000; color: #fff; }
.cam-stage { flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; }
.cam-stage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-msg { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: flash .4s; }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.cam-bar { display: flex; align-items: center; justify-content: center; gap: 30px; padding: 14px; position: relative; }
.cam-shot { width: 60px; height: 60px; border-radius: 50%; border: 4px solid #fff; background: #fff; box-shadow: inset 0 0 0 3px #000; transition: transform .1s; }
.cam-shot:active { transform: scale(.9); }
.cam-last { position: absolute; left: 20px; width: 54px; height: 54px; border-radius: 8px; background: #222 center/cover; border: 2px solid #fff3; }
.cam-hint { position: absolute; right: 20px; color: #aaa !important; }
