:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --surface-3: #e6e6e6;
  --tile: #ffffff;
  --line: rgba(0, 0, 0, .08);
  --text: #111111;
  --text-2: #555555;
  --text-3: #8a8a8a;
  --border: #e3e3e3;
  --accent: #111111;
  --accent-2: #3a3a3a;
  --accent-soft: #ececec;
  --accent-text: #111111;
  --on-accent: #ffffff;
  --hero: linear-gradient(135deg, #151515, #3d3d3d);
  --c-red: #d6352b; --c-orange: #e07800; --c-purple: #8b3fd6; --c-blue: #2563d9; --c-green: #12894a;
  --c-teal: #0b8585; --c-brown: #7d5a26; --c-gray: #6e6e73; --c-pink: #d63c86;
  --warm: #e08a00;
  --ok: #17a364;
  --ok-soft: #e3f6ec;
  --warn: #d98a00;
  --warn-soft: #fff3dc;
  --bad: #e0443a;
  --bad-soft: #fde8e6;
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, .06);
  --shadow: 0 4px 16px rgba(20, 20, 40, .08), 0 1px 3px rgba(20, 20, 40, .06);
  --shadow-lg: 0 18px 50px rgba(20, 20, 40, .18), 0 2px 8px rgba(20, 20, 40, .08);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 264px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* Тёмная тема: по настройке системы (если не выбрана светлая вручную) или выбранная вручную */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e;
    --surface: #171717;
    --surface-2: #1f1f1f;
    --surface-3: #2b2b2b;
    --tile: #2b2b2b;
  --line: rgba(255, 255, 255, .08);
    --line: rgba(255, 255, 255, .08);
    --text: #f2f2f2;
    --text-2: #a3a3a3;
    --text-3: #737373;
    --border: #2a2a2a;
    --accent: #f2f2f2;
    --accent-2: #ffffff;
    --accent-soft: #2a2a2a;
    --accent-text: #fafafa;
    --on-accent: #111111;
    --c-red: #ec5248; --c-orange: #f5a623; --c-purple: #a875f0; --c-blue: #5a92f2; --c-green: #2bbd77;
    --c-teal: #22b5b5; --c-brown: #c09a63; --c-gray: #9a9ca8; --c-pink: #ee69a8;
    --warm: #ffb547;
    --hero: linear-gradient(135deg, #2c2c2c, #4a4a4a);
    --ok-soft: #133525;
    --warn-soft: #3a2c10;
    --bad-soft: #3d1a18;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 4px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0e0e0e;
    --surface: #171717;
    --surface-2: #1f1f1f;
    --surface-3: #2b2b2b;
  --tile: #2b2b2b;
    --text: #f2f2f2;
    --text-2: #a3a3a3;
    --text-3: #737373;
    --border: #2a2a2a;
    --accent: #f2f2f2;
    --accent-2: #ffffff;
    --accent-soft: #2a2a2a;
    --accent-text: #fafafa;
    --on-accent: #111111;
    --c-red: #ec5248; --c-orange: #f5a623; --c-purple: #a875f0; --c-blue: #5a92f2; --c-green: #2bbd77;
    --c-teal: #22b5b5; --c-brown: #c09a63; --c-gray: #9a9ca8; --c-pink: #ee69a8;
    --warm: #ffb547;
    --hero: linear-gradient(135deg, #2c2c2c, #4a4a4a);
    --ok-soft: #133525;
    --warn-soft: #3a2c10;
    --bad-soft: #3d1a18;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 4px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Safari на iPhone сам «раздувает» шрифты — из-за этого текст вылезал из кнопок */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem)/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boot { height: 100vh; display: grid; place-items: center; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; transform: scale(.96); } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 550; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.btn.lg { height: 48px; padding: 0 26px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--text-2); transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.active { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 1fr; height: 100vh; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; font-weight: 750; font-size: clamp(1.125rem, calc(1.0473rem + 0.3315vw), 1.47rem); letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; }
.brand small { display: block; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-top: -2px; }
.new-btn {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  height: 54px; padding: 0 22px 0 18px; margin: 0 0 12px 2px; border-radius: 18px; border: 0;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem);
  transition: box-shadow .2s, transform .1s;
}
.new-btn:hover { box-shadow: var(--shadow-lg); }
.new-btn:active { transform: scale(.97); }
.new-btn svg.i { width: 24px; height: 24px; color: var(--accent); stroke-width: 2.2; }
.nav a {
  display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 16px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 500; transition: background .15s;
}
.nav a:hover { background: var(--surface-3); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.nav a .badge { margin-left: auto; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 600; color: var(--bad); }
.nav a .badge.ok { color: var(--ok); }
.meter { margin: 14px 8px 0; padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.meter .bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 10px 0 8px; }
.meter .bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.meter .big { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.meter .big b { color: var(--text); font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.meter .sub { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); }
.sidebar .spacer { flex: 1; }
.phone-btn { margin: 10px 8px 4px; justify-content: flex-start; border-radius: var(--radius-sm); height: 44px; }

.main { display: flex; flex-direction: column; min-width: 0; background: var(--surface); margin: 8px; border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; }
.search { flex: 1; max-width: 720px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); transition: background .15s, box-shadow .15s; }
.search:focus-within { background: var(--surface); box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.search svg.i { color: var(--text-3); }
.top-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; white-space: nowrap; border: 0; }
.pill svg.i { width: 17px; height: 17px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.work { background: var(--accent-soft); color: var(--accent-text); }
.pill.work svg.i { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-btn { display: none; }

.content { flex: 1; overflow-y: auto; padding: 4px 22px 120px; position: relative; }
.head { display: flex; align-items: center; gap: 8px; min-height: 56px; position: sticky; top: 0; background: var(--surface); z-index: 5; padding: 4px 0; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); font-weight: 500; min-width: 0; }
.crumbs a { color: var(--text-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.crumbs a:hover { background: var(--surface-2); color: var(--text); }
.crumbs a:last-child { color: var(--text); }
.crumbs svg.i { color: var(--text-3); width: 18px; height: 18px; }
.head .tools { margin-left: auto; display: flex; gap: 2px; }
.section-title { font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); font-weight: 600; color: var(--text-2); margin: 18px 4px 10px; }

/* ---------- сетка файлов ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.grid.folders { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.folder-card {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 8px 0 16px; border-radius: 12px;
  background: var(--surface-2); user-select: none; cursor: default; transition: background .12s; position: relative;
}
.folder-card:hover { background: var(--surface-3); }
.folder-card .name { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-card svg.i.kind { color: var(--text-2); fill: var(--text-2); fill-opacity: .18; }
.file-card {
  display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface-2);
  padding: 6px 6px 0; user-select: none; cursor: default; transition: background .12s; min-width: 0; position: relative;
}
.file-card:hover { background: var(--surface-3); }
.file-card .row { display: flex; align-items: center; gap: 10px; padding: 6px 2px 8px 8px; min-width: 0; }
.file-card .name { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card .thumb {
  aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface); display: grid; place-items: center; overflow: hidden; position: relative;
}
.file-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-card .thumb svg.i { width: 56px; height: 56px; stroke-width: 1.3; }
.file-card .thumb .play { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; color: #fff; }
.file-card .thumb .play svg.i { width: 22px; height: 22px; fill: #fff; stroke: none; }
.file-card .meta { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); padding: 0 8px 10px; margin-top: -6px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.file-card .meta span { overflow: hidden; text-overflow: ellipsis; }
.selected, .selected:hover { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.item-more { width: 32px; height: 32px; opacity: .0; }
.folder-card:hover .item-more, .file-card:hover .item-more, .selected .item-more, tr:hover .item-more { opacity: 1; }
@media (hover: none) { .item-more { opacity: 1; } }
.drop-target { box-shadow: inset 0 0 0 2px var(--accent) !important; background: var(--accent-soft) !important; }

.kind-image { color: var(--c-red); } .kind-video { color: var(--c-red); } .kind-audio { color: var(--c-purple); }
.kind-pdf { color: var(--c-red); } .kind-doc { color: var(--c-blue); } .kind-sheet { color: var(--c-green); }
.kind-slides { color: var(--c-orange); } .kind-archive { color: var(--c-brown); } .kind-code { color: var(--c-teal); }
.kind-text { color: var(--c-gray); } .kind-file { color: var(--c-gray); } .kind-app { color: var(--c-purple); }

.shield { display: inline-flex; align-items: center; gap: 3px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.shield svg.i { width: 14px; height: 14px; }
.shield.ok { color: var(--ok); } .shield.warn { color: var(--warn); }

/* ---------- список ---------- */
.table-wrap { overflow-x: auto; }
table.files { width: 100%; border-collapse: collapse; }
table.files th { text-align: left; font-weight: 600; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.files th.sortable { cursor: pointer; user-select: none; }
table.files th.sortable:hover { color: var(--text); }
table.files td { padding: 0 12px; height: 48px; border-bottom: 1px solid var(--border); white-space: nowrap; color: var(--text-2); }
table.files td.name-cell { color: var(--text); font-weight: 550; max-width: 460px; overflow: hidden; text-overflow: ellipsis; }
table.files td.name-cell > span { display: inline-flex; align-items: center; gap: 14px; vertical-align: middle; }
table.files tr { user-select: none; cursor: default; }
table.files tbody tr:hover { background: var(--surface-2); }
table.files td:last-child { width: 48px; text-align: right; }
table.files .sub-path { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); font-weight: 400; }

/* ---------- пустые состояния ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--text-2); }
.empty .art { width: 180px; height: 140px; margin: 0 auto 18px; }
.empty h3 { color: var(--text); font-size: clamp(1.125rem, calc(1.0732rem + 0.2210vw), 1.4rem); margin: 0 0 6px; font-weight: 600; }
.empty p { margin: 0 auto 20px; max-width: 420px; }

/* ---------- загрузки ---------- */
.uploads {
  position: fixed; right: 20px; bottom: calc(20px + var(--safe-b)); width: 380px; max-width: calc(100vw - 24px);
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60;
  animation: rise .25s ease;
}
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.uploads header { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 18px; background: var(--surface-2); font-weight: 600; }
.uploads header span { flex: 1; }
.uploads ul { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto; }
.uploads li { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 18px; }
.uploads li .nm { flex: 1; min-width: 0; }
.uploads li .nm div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads li .nm small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.uploads li .nm small.err { color: var(--bad); }
.progress { height: 4px; border-radius: 99px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.ring { width: 26px; height: 26px; flex: none; }
.uploads .done { color: var(--ok); } .uploads .fail { color: var(--bad); }
.uploads.collapsed ul { display: none; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent); backdrop-filter: blur(2px);
  border: 3px dashed var(--accent); border-radius: 22px; margin: 8px;
}
.drop-overlay div { background: var(--accent); color: var(--on-accent); padding: 16px 26px; border-radius: 16px; font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); font-weight: 600; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; }

/* ---------- меню и модальные окна ---------- */
.ctx {
  position: fixed; z-index: 90; min-width: 230px; padding: 6px 0; background: var(--surface); border-radius: 12px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .12s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.ctx button { display: flex; align-items: center; gap: 14px; width: 100%; height: 38px; padding: 0 18px; border: 0; background: none; text-align: left; }
.ctx button:hover { background: var(--surface-2); }
.ctx button.danger { color: var(--bad); }
.ctx hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 20, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 420px; background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg); animation: pop .18s ease; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal.wide { max-width: 560px; }
.modal h2 { margin: 0 0 6px; font-size: clamp(1.125rem, calc(1.0473rem + 0.3315vw), 1.47rem); font-weight: 650; letter-spacing: -.01em; }
.modal p { color: var(--text-2); margin: 0 0 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.field { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); outline: 0; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); transition: border-color .15s, box-shadow .15s; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.folder-pick { border: 1px solid var(--border); border-radius: 12px; max-height: 300px; overflow-y: auto; margin-top: 4px; }
.folder-pick button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 14px; border: 0; background: none; text-align: left; border-bottom: 1px solid var(--border); }
.folder-pick button:last-child { border-bottom: 0; }
.folder-pick button:hover { background: var(--surface-2); }
.folder-pick .up { color: var(--text-2); }
.pick-path { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); margin-bottom: 8px; }

/* ---------- просмотр файлов ---------- */
.viewer { position: fixed; inset: 0; z-index: 95; background: #08080c; display: flex; flex-direction: column; color: #fff; animation: fade .15s; }
.viewer header { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; }
.viewer header .t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer header .t small { display: block; font-weight: 400; color: #aaa; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.viewer .icon-btn { color: #ddd; } .viewer .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.viewer .stage { flex: 1; display: grid; place-items: center; min-height: 0; padding: 0 64px 24px; position: relative; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.5); }
.viewer .stage iframe { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; }
.viewer .stage pre { width: min(1000px, 100%); max-height: 100%; overflow: auto; margin: 0; padding: 20px; border-radius: 10px; background: #1b1c23; color: #e6e6ea; font: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem)/1.55 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.viewer .stage audio { width: min(520px, 100%); }
.viewer .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: rgba(255,255,255,.1); }
.viewer .nav-arrow.l { left: 10px; } .viewer .nav-arrow.r { right: 10px; }
.viewer .nofmt { text-align: center; color: #bbb; }
.viewer .nofmt svg.i { width: 80px; height: 80px; stroke-width: 1.2; margin-bottom: 10px; }

/* ---------- тосты ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: #23242d; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); animation: rise .2s ease; max-width: calc(100vw - 32px); }
.toast.err { background: #b3261e; }
.toast button { background: none; border: 0; color: #b4abff; font-weight: 650; padding: 0; }

/* ---------- экран настройки ---------- */
.setup { min-height: 100vh; padding: 40px 20px 60px; display: flex; flex-direction: column; align-items: center; }
.setup .hero { text-align: center; max-width: 640px; margin-bottom: 28px; }
.setup .hero img { width: 84px; height: 84px; margin-bottom: 10px; filter: drop-shadow(0 10px 24px rgba(91, 75, 230, .35)); }
.setup .hero h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 8px; letter-spacing: -.03em; font-weight: 750; }
.setup .hero h1 span { background: linear-gradient(90deg, var(--accent), #e6589b, var(--warm)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.setup .hero p { color: var(--text-2); font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); margin: 0; }
.setup-card { width: 100%; max-width: 980px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; }
.step-title { display: flex; align-items: center; gap: 12px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); font-weight: 650; margin: 0 0 4px; }
.step-title .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); flex: none; }
.step-sub { color: var(--text-2); margin: 0 0 18px 40px; }
.volumes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vol {
  position: relative; border: 2px solid var(--border); border-radius: 18px; padding: 16px; cursor: pointer; background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .15s; user-select: none; animation: rise .3s ease;
}
.vol:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.vol.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.vol.disabled { opacity: .55; cursor: not-allowed; }
.vol .top { display: flex; align-items: center; gap: 12px; }
.vol .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.vol .ico svg.i { width: 26px; height: 26px; }
.vol .nm { flex: 1; min-width: 0; }
.vol .nm b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol .nm small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; flex: none; transition: all .15s; }
.check svg.i { width: 16px; height: 16px; color: var(--on-accent); stroke-width: 3; opacity: 0; }
.vol.on .check { background: var(--accent); border-color: var(--accent); }
.vol.on .check svg.i { opacity: 1; }
.cap { margin: 14px 0 10px; }
.cap .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cap .bar span { display: block; height: 100%; background: var(--text-3); border-radius: inherit; }
.cap .txt { display: flex; justify-content: space-between; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-2); margin-top: 6px; }
.vol .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.tag svg.i { width: 14px; height: 14px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.vol .foot .btn { margin-left: auto; }
.no-vols { border: 2px dashed var(--border); border-radius: 18px; padding: 40px 20px; text-align: center; color: var(--text-2); }
.no-vols svg.i { width: 48px; height: 48px; color: var(--text-3); margin-bottom: 8px; }
.watching { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); margin-top: 14px; }
.watching .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s infinite; }
.setup hr.sep { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.mode { border: 2px solid var(--border); border-radius: 16px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.mode.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mode b { display: flex; align-items: center; gap: 8px; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); margin-bottom: 4px; }
.mode b .rec { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); background: var(--ok-soft); color: var(--ok); padding: 2px 8px; border-radius: 99px; }
.mode p { margin: 0; color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.summary { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 18px 20px; border-radius: 18px; background: var(--surface-2); }
.summary .num { font-size: clamp(1.375rem, calc(1.2196rem + 0.6630vw), 1.96rem); font-weight: 750; letter-spacing: -.02em; }
.summary .lbl { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-2); }
.summary .go { margin-left: auto; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); margin-top: 14px; }
.note svg.i { width: 18px; height: 18px; color: var(--ok); margin-top: 1px; }
.found-pool { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft); margin-bottom: 20px; flex-wrap: wrap; }
.found-pool .t { flex: 1; min-width: 200px; }
.found-pool b { display: block; }

/* ---------- страница дисков ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.stat { padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); }
.stat .v { font-size: clamp(1.1875rem, calc(1.058rem + 0.5525vw), 1.68rem); font-weight: 700; letter-spacing: -.02em; }
.stat .l { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-2); }
.repair-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 22px; flex-wrap: wrap; }
.repair-card.ok { background: var(--ok-soft); } .repair-card.work { background: var(--accent-soft); } .repair-card.warn { background: var(--warn-soft); }
.repair-card .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none; }
.repair-card.ok .ic { color: var(--ok); } .repair-card.work .ic { color: var(--accent-text); } .repair-card.warn .ic { color: var(--warn); }
.repair-card.work .ic svg.i { animation: spin 1.2s linear infinite; }
.repair-card .t { flex: 1; min-width: 200px; }
.repair-card .t b { display: block; }
.repair-card .t small { color: var(--text-2); }
.drives { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.drive { border-radius: 18px; padding: 18px; background: var(--surface-2); position: relative; }
.drive.off { opacity: .75; background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 10px, var(--surface-3) 10px, var(--surface-3) 20px); }
.drive .top { display: flex; align-items: center; gap: 12px; }
.drive .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; color: var(--accent-text); flex: none; }
.drive .ico svg.i { width: 26px; height: 26px; }
.drive .nm { flex: 1; min-width: 0; }
.drive .nm b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive .nm small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.drive .cap .bar span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.drive .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.led { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.led.off { background: var(--text-3); box-shadow: 0 0 0 4px var(--surface-3); }

/* ---------- вход и телефон ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: 100%; max-width: 380px; text-align: center; background: var(--surface); border-radius: 26px; padding: 34px 28px; box-shadow: var(--shadow); }
.login img { width: 72px; height: 72px; }
.login h1 { margin: 10px 0 4px; font-size: clamp(1.25rem, calc(1.0946rem + 0.6630vw), 1.82rem); letter-spacing: -.02em; }
.login p { color: var(--text-2); margin: 0 0 22px; }
.pin-input { width: 100%; height: 64px; text-align: center; font-size: clamp(1.5625rem, calc(1.3812rem + 0.7735vw), 2.24rem); letter-spacing: .4em; font-weight: 700; border-radius: 16px; padding-left: .4em; }
.qr-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qr { width: 200px; height: 200px; border-radius: 16px; background: #fff; padding: 8px; flex: none; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-info { flex: 1; min-width: 200px; }
.qr-info ol { padding-left: 20px; margin: 0 0 14px; color: var(--text-2); }
.qr-info ol li { margin-bottom: 6px; }
.big-pin { font-size: clamp(1.4375rem, calc(1.2562rem + 0.7735vw), 2.1rem); font-weight: 750; letter-spacing: .18em; color: var(--accent-text); }
.url-chip { display: inline-block; font: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem) ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; margin: 2px 0; user-select: all; word-break: break-all; }

/* ---------- мобильная версия ---------- */
.fab {
  display: grid; place-items: center; position: fixed; right: 28px; bottom: calc(56px + var(--safe-b)); z-index: 50; cursor: pointer;
  width: 60px; height: 60px; border-radius: 20px; border: 0; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent);
}
.fab svg.i { width: 28px; height: 28px; stroke-width: 2.4; }
@media (max-width: 860px) { .fab { right: 18px; bottom: calc(22px + var(--safe-b)); } }
.scrim { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); background: var(--bg); z-index: 80;
    transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); padding-top: max(14px, env(safe-area-inset-top));
  }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 79; }
  .main { margin: 0; border-radius: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .search { height: 44px; }
  .content { padding: 0 12px 140px; }
  .crumbs { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
  .pill .lbl { display: none; }
  .pill { padding: 0 10px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .folder-card { padding-left: 12px; gap: 8px; }
  .uploads { right: 12px; left: 12px; width: auto; bottom: calc(96px + var(--safe-b)); }
  .viewer .stage { padding: 0 8px 16px; }
  .viewer .nav-arrow { display: none; }
  table.files .hide-m { display: none; }
  .setup-card { padding: 20px 16px; }
  .step-sub { margin-left: 0; }
  .mode-cards { grid-template-columns: 1fr; }
  .summary .go { width: 100%; margin: 0; }
  .summary .go .btn { width: 100%; }
}

/* ================= v0.2: устройства, вход, режим хранения ================= */
.login .box.wide-box { max-width: 440px; }
.device-strip { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -6px 0 22px; color: var(--accent-text); font-weight: 700; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.device-strip svg.i { width: 30px; height: 30px; }
.device-strip span { color: var(--text-3); }
.gbtn { display: flex; justify-content: center; min-height: 44px; }
.dev-login { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border); text-align: left; }
.dev-label { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); margin-bottom: 8px; }
.err-note { color: var(--warn) !important; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.link-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); margin-bottom: 16px; }
.link-card svg.i { width: 34px; height: 34px; color: var(--accent-text); }
.link-card b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.link-card small { color: var(--text-3); }

.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px; border-top: 1px solid var(--border); margin-top: 10px; }
.user-row img, .user-row .ava { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.user-row .ava { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.user-row .u { flex: 1; min-width: 0; }
.user-row .u b, .user-row .u small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .u b { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.user-row .u small { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); color: var(--text-3); }

.hero-space { display: flex; gap: 34px; flex-wrap: wrap; align-items: flex-end; padding: 22px 24px; border-radius: 20px; margin: 4px 0 18px;
  background: var(--hero); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hs-v { font-size: clamp(1.9375rem, calc(1.7044rem + 0.9945vw), 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.hs-v.sm { font-size: clamp(1.1875rem, calc(1.058rem + 0.5525vw), 1.68rem); }
.hs-l { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); opacity: .85; }
.this-node { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; margin-bottom: 18px; background: var(--surface-2); }
.this-node.online { background: var(--ok-soft); } .this-node.online svg.i { color: var(--ok); }
.this-node svg.i { width: 28px; height: 28px; }
.this-node b { display: block; } .this-node small { color: var(--text-2); }

.device { border-radius: 18px; padding: 18px; background: var(--surface-2); }
/* выключенное устройство — видно сразу: пунктир без заливки, всё серое, метка «Не в сети» */
.device.off { background: transparent; border: 1.5px dashed var(--border); padding: 16.5px; }
.device.off .ico, .device.off .stack-bar, .device.off .legend, .device.off .tier-btn, .device.off .dev-foot .v { filter: grayscale(1); opacity: .5; }
.device.off .nm b { color: var(--text-2); }
.device .top { display: flex; align-items: center; gap: 12px; }
.device .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; color: var(--accent-text); flex: none; }
.device .ico svg.i { width: 26px; height: 26px; }
.device .nm { flex: 1; min-width: 0; }
.device .nm b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device .nm small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.stack-bar { display: flex; height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 22%, var(--surface-3)); overflow: hidden; margin: 16px 0 10px; }
.stack-bar .seg { height: 100%; transition: width .4s; }
.stack-bar .seg.other { background: var(--text-3); opacity: .55; }
.stack-bar .seg.cloud { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-2); }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dot.other { background: var(--text-3); opacity: .55; } .dot.cloud { background: var(--accent); } .dot.free { background: color-mix(in srgb, var(--ok) 45%, var(--surface-3)); }
.dev-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; }
.dev-foot > div:first-child { flex: 1 1 140px; min-width: 0; }
.dev-foot .v { font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); font-weight: 750; letter-spacing: -.02em; }
.dev-foot .l { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-2); }
.dev-foot .acts { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 2px; max-width: 100%; }

.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.add-grid.one { grid-template-columns: 1fr; }
.add-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 18px; border-radius: 18px;
  border: 2px dashed var(--border); background: transparent; transition: border-color .15s, background .15s; }
.add-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.add-card svg.i { width: 30px; height: 30px; color: var(--accent-text); margin-bottom: 6px; }
.add-card b { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.add-card span { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }

.steps { padding-left: 20px; color: var(--text-2); margin: 0 0 12px; }
.steps li { margin-bottom: 10px; }
.cmd { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--surface-2); }
.cmd code { flex: 1; font: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem) ui-monospace, Menlo, Consolas, monospace; color: var(--text); word-break: break-all; }
.code-row { display: flex; gap: 8px; }
.code-row .field { flex: 1; }

.file-card.off .thumb, tr.off td { opacity: .5; }
.file-card .off-badge { position: absolute; bottom: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 600;
  padding: 3px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); }
.file-card .off-badge svg.i { width: 12px; height: 12px; }
.dev-chip { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.dev-chip .led { width: 8px; height: 8px; box-shadow: none; }

.night { position: fixed; inset: 0; z-index: 200; background: #000; color: #555; display: grid; place-items: center; text-align: center; cursor: pointer; }
.night-in { padding: 20px; }
.night-in img { opacity: .35; }
.night-t { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); font-weight: 600; color: #777; margin-top: 10px; }
.night-s { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: #4a7; margin: 6px 0 22px; }
.night-h { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); line-height: 1.6; color: #444; }

/* ================= v0.3: галерея, избранное, хранилище ================= */
.star-mark { color: var(--warm); display: inline-flex; }
.star-mark svg.i { width: 16px; height: 16px; fill: currentColor; }
.viewer .icon-btn.starred { color: var(--warm); }
.viewer .icon-btn.starred svg.i { fill: currentColor; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 550; }
.chip svg.i { width: 16px; height: 16px; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.tools.seg { background: var(--surface-2); padding: 3px; border-radius: 12px; gap: 2px; }
.seg-btn { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.gal-day { margin-bottom: 18px; }
.gal-title { display: flex; align-items: baseline; gap: 8px; font-weight: 650; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); margin: 14px 2px 10px; }
.gal-title span { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 500; color: var(--text-3); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.g-tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; overflow: hidden; border-radius: 4px; background: var(--surface-2); cursor: pointer; }
.g-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.g-tile:hover img { transform: scale(1.04); }
.g-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.g-tile.off img { opacity: .55; }
.g-ic { display: grid; place-items: center; height: 100%; }
.g-ic svg.i { width: 40px; height: 40px; }
.g-dur { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px 2px 5px; border-radius: 99px; }
.g-dur svg.i { width: 11px; height: 11px; fill: #fff; stroke: none; }
.g-star { position: absolute; left: 6px; bottom: 6px; color: #ffcf5a; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.g-star svg.i { width: 16px; height: 16px; fill: currentColor; }
.g-off { position: absolute; right: 6px; top: 6px; color: #fff; background: rgba(0,0,0,.55); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; }
.g-off svg.i { width: 14px; height: 14px; }
.gal-more { text-align: center; color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); padding: 20px 0 40px; }

.store-top { padding: 20px 22px; border-radius: 20px; background: var(--surface-2); margin: 4px 0 16px; }
.store-num { font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); color: var(--text-2); }
.store-num b { font-size: clamp(1.4375rem, calc(1.2562rem + 0.7735vw), 2.1rem); font-weight: 800; letter-spacing: -.02em; color: var(--text); margin-right: 4px; }
.store-bar { display: flex; height: 14px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 14px 0 10px; gap: 2px; }
.store-bar span { height: 100%; min-width: 0; }
.store-sub { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; transition: background .15s; }
.cat-card:hover { background: var(--surface-3); }
.cat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.cat-card b { display: block; }
.cat-card small { color: var(--text-2); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
@media (max-width: 860px) {
  .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; }
  .g-tile { border-radius: 0; }
  .gal-title { margin-left: 4px; }
}

/* флэшки и папки внутри компьютера */
.parts { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.part { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.part > svg.i { width: 18px; height: 18px; color: var(--accent-text); }
.part.off { opacity: .55; }
.part.off > svg.i { color: var(--text-3); }
.part .pn { flex: 1; min-width: 0; }
.part .pn b { display: block; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part .pn small { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); color: var(--text-3); }
.part .pbar { width: 70px; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: none; }
.part .pbar span { display: block; height: 100%; background: var(--accent); }

/* кнопка «Приложение для компьютера» и окно скачивания */
.get-app { display: flex; align-items: center; gap: 12px; margin: 10px 8px 2px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--border);
  background: transparent; text-align: left; color: var(--text); transition: background .15s, border-color .15s; }
.get-app:hover { background: var(--accent-soft); border-color: var(--accent); }
.get-app > svg.i { width: 18px; height: 18px; color: var(--accent-text); padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--accent-soft); }
.get-app b { display: block; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; }
.get-app small { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); color: var(--text-3); }
.dl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dl-head h2 { margin: 0; }
.dl-head p { margin: 0 !important; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.dl-points { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.dl-points li { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.dl-points svg.i { width: 18px; height: 18px; color: var(--accent-text); }
.dl-main { width: 100%; text-decoration: none; }
.dl-note { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem) !important; color: var(--text-3) !important; margin: 10px 2px 0 !important; }
.dl-more { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.dl-more summary { cursor: pointer; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; color: var(--text-2); padding: 4px 0; }
.dl-more a { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.dl-more a:hover { background: var(--surface-2); }
.dl-more a svg.i:first-child { width: 18px; height: 18px; color: var(--text-3); }
.dl-more a svg.i:last-child { margin-left: auto; width: 16px; height: 16px; color: var(--accent-text); }

.help-standalone { min-height: 100vh; background: var(--surface); }
.help-standalone .hs-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.help-standalone .brand { padding: 0; text-decoration: none; color: var(--text); font-size: clamp(1.1875rem, calc(1.0654rem + 0.1357vw), 1.2825rem); }
.help-standalone .brand img { width: 30px; height: 30px; }
.help-standalone .content { overflow: visible; padding-bottom: 60px; }

/* надёжность устройств */
.tdots { display: inline-flex; gap: 3px; }
.tdots i { width: 7px; height: 14px; border-radius: 3px; background: var(--surface-3); }
.tier-1 .tdots i.on { background: var(--c-gray); }
.tier-2 .tdots i.on { background: var(--c-blue); }
.tier-3 .tdots i.on { background: var(--ok); }
.tier-4 .tdots i.on { background: var(--c-purple); }
.tier-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 650; color: var(--text); }
.tier-btn:hover { border-color: var(--accent); }
.tier-btn svg.i { width: 14px; height: 14px; color: var(--text-3); }
.tier-pick { display: grid; gap: 8px; }
.tier-opt { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); background: transparent; text-align: left; color: var(--text); }
.tier-opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.tier-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.tier-opt .tdots i { width: 8px; height: 18px; }
.tier-opt span:not(.tdots) { flex: 1; }
.tier-opt b { display: block; }
.tier-opt small { display: block; color: var(--text-2); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.tier-opt small.ex { color: var(--text-3); }
.tier-opt > svg.i { color: var(--accent-text); }

/* ================= справка v2 ================= */
.help { max-width: 920px; margin: 0 auto; padding: 8px 0 50px; }
.h-hero { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; padding: 28px 30px; border-radius: 24px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.25), transparent 40%), var(--hero); }
.h-hero-t { flex: 1; min-width: 260px; }
.h-kicker { display: inline-block; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.2); padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.h-hero h1 { margin: 0 0 8px; font-size: clamp(1.4375rem, calc(1.2562rem + 0.7735vw), 2.1rem); letter-spacing: -.02em; }
.h-hero p { color: rgba(255,255,255,.9); margin: 0; line-height: 1.55; }
.h-scheme { display: flex; align-items: center; gap: 10px; }
.h-scheme span { width: 50px; height: 50px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; animation: float 3s ease-in-out infinite; }
.h-scheme span:nth-child(3) { animation-delay: .3s; } .h-scheme span:nth-child(5) { animation-delay: .6s; }
.h-scheme span.big { width: 62px; height: 62px; background: #fff; color: var(--accent); animation-delay: .9s; }
.h-scheme span svg.i { width: 26px; height: 26px; }
.h-scheme span.big svg.i { width: 32px; height: 32px; }
.h-scheme i { font-style: normal; font-weight: 800; opacity: .75; }
@keyframes float { 50% { transform: translateY(-5px); } }

.h-progress { display: flex; align-items: center; gap: 20px; margin-top: 16px; padding: 18px 20px; border-radius: 20px; background: var(--surface-2); flex-wrap: wrap; }
.h-ring { --p: 0; width: 72px; height: 72px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.h-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface-2); }
.h-ring b { position: relative; font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); }
.h-pt { flex: 1; min-width: 240px; }
.h-pt > b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); margin-bottom: 8px; }
.h-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.h-check { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 6px 12px; text-align: left; line-height: 1.3; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 550; color: var(--text); }
.h-check i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--text-3); }
.h-check svg.i { width: 15px; height: 15px; }
.h-check.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.h-check:not(.ok):not(:disabled):hover { border-color: var(--accent); color: var(--accent-text); }
.h-check:disabled { cursor: default; }

.h-sec { font-size: clamp(1.125rem, calc(1.0732rem + 0.2210vw), 1.4rem); letter-spacing: -.01em; margin: 34px 2px 14px; }
.h-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.h-guide { --c: var(--accent); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; border-radius: 20px; border: 0; text-align: left; color: var(--text);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--surface-2)), var(--surface-2) 60%); transition: transform .15s, box-shadow .15s; }
.h-guide:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.h-gi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; margin-bottom: 8px; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 40%, transparent); flex: none; }
.h-gi svg.i { width: 23px; height: 23px; }
.h-guide b { font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.h-guide small { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.h-time { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 600; color: var(--text-3); }
.h-time svg.i { width: 13px; height: 13px; }

.h-explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.h-ex { padding: 16px; border-radius: 18px; background: var(--surface-2); }
.h-ex-i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 10px; }
.h-ex.warn .h-ex-i { background: var(--warn-soft); color: var(--warn); }
.h-ex b { display: block; margin-bottom: 4px; }
.h-ex p { margin: 0; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); line-height: 1.55; }

.h-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.h-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); min-width: 0; }
.h-search svg.i { color: var(--text-3); }
.h-qa { border-radius: 14px; background: var(--surface-2); margin-bottom: 8px; }
.h-qa summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h-qa summary::-webkit-details-marker { display: none; }
.h-qa summary::after { content: '+'; font-size: clamp(1.125rem, calc(1.0732rem + 0.2210vw), 1.4rem); color: var(--text-3); font-weight: 400; }
.h-qa[open] summary::after { content: '−'; }
.h-qa div { padding: 0 16px 14px; color: var(--text-2); line-height: 1.6; }
.h-none { color: var(--text-3); text-align: center; }
.h-foot { display: flex; gap: 14px; align-items: center; margin-top: 30px; padding: 16px 18px; border-radius: 16px; border: 1px dashed var(--border); }
.h-foot svg.i { width: 26px; height: 26px; color: var(--accent-text); }
.h-foot b { display: block; }
.h-foot p { margin: 0; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.help-link { color: var(--accent-text); font-weight: 600; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }

/* одна инструкция */
.guide { max-width: 760px; }
.h-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-2); font-weight: 600; padding: 6px 0; }
.h-back:hover { color: var(--text); }
.g-head { display: flex; align-items: center; gap: 14px; margin: 12px 0 16px; }
.g-head h1 { margin: 0; font-size: clamp(1.25rem, calc(1.0946rem + 0.6630vw), 1.82rem); letter-spacing: -.02em; }
.g-head small { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.g-head small svg.i { width: 14px; height: 14px; }
.g-tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.g-tabs button { height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; font-weight: 650; color: var(--text-2); }
.g-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.g-card { border-radius: 24px; overflow: hidden; background: var(--surface-2); animation: rise .25s ease; }
.g-art { display: grid; place-items: center; padding: 26px 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, var(--surface-2)), var(--surface-2)); color: var(--text); }
.h-art { width: min(100%, 360px); height: auto; display: block; }
.g-body { padding: 22px 26px 26px; }
.g-num { display: inline-block; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.g-body h2 { margin: 0 0 8px; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); letter-spacing: -.01em; }
.g-body p { margin: 0; color: var(--text-2); font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); line-height: 1.65; }
.g-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.g-dots { display: flex; gap: 6px; }
.g-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: var(--surface-3); transition: width .2s; }
.g-dots button.past { background: color-mix(in srgb, var(--c) 45%, var(--surface-3)); }
.g-dots button.on { width: 26px; background: var(--c); }
@media (max-width: 860px) {
  .h-hero { padding: 22px; } .h-hero h1 { font-size: clamp(1.1875rem, calc(1.058rem + 0.5525vw), 1.68rem); } .h-scheme span { width: 40px; height: 40px; } .h-scheme span.big { width: 48px; height: 48px; }
  .g-body { padding: 18px; } .g-nav .btn { padding: 0 12px; }
}
.hint-sm { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem) !important; color: var(--text-3) !important; margin: 10px 0 0 !important; }
.this-node small { display: block; }

/* ================= просмотр файлов ================= */
.viewer .stage:has(.vw-host) { padding: 0 0 12px; display: flex; }
.vw-host { flex: 1; min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; color: #e8e8ee; }
.vw-center { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 56px; }
.vw-img { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.5); }
.vw-checker { background: repeating-conic-gradient(#2a2a33 0 25%, #1f1f27 0 50%) 0 0 / 22px 22px; border-radius: 12px; margin: 0 56px; }
.vw-audio { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.vw-audio svg.i { width: 72px; height: 72px; stroke-width: 1.2; color: #b4abff; }
.vw-audio audio { width: min(520px, 90vw); }
.vw-loading { display: flex; align-items: center; gap: 12px; color: #aaa; }
.vw-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: #b4abff; animation: spin .8s linear infinite; }
.vw-cut { margin: 0 auto 10px; padding: 8px 14px; border-radius: 10px; background: rgba(255,171,74,.14); color: #ffcf8a; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); width: fit-content; }
.vw-note { color: #9a9aa8; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); text-align: center; margin: 16px 0 0; }
.vw-empty { color: #9a9aa8; text-align: center; padding: 40px; }

/* код */
.vw-code-bar { display: flex; align-items: center; gap: 8px; width: min(1100px, 100%); margin: 0 auto 8px; padding: 0 12px; color: #9a9aa8; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.vw-code-bar span { margin-right: auto; }
.vw-mini { height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #ddd; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.vw-mini:hover { background: rgba(255,255,255,.08); }
.vw-code { flex: 1; min-height: 0; display: flex; width: min(1100px, calc(100% - 24px)); margin: 0 auto; overflow: auto; border-radius: 12px; background: #0d1117; border: 1px solid #22262e; }
.vw-code pre { margin: 0; padding: 14px 16px; font: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem)/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.vw-gutter { color: #4b5263; text-align: right; user-select: none; border-right: 1px solid #22262e; position: sticky; left: 0; background: #0d1117; }
.vw-src { flex: 1; background: transparent !important; white-space: pre; }
.vw-code.wrap .vw-src { white-space: pre-wrap; word-break: break-word; }
.vw-code.wrap .vw-gutter { display: none; }

/* документы */
.vw-doc-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 12px 20px; }
.vw-doc { width: min(860px, 100%); margin: 0 auto; padding: 44px 52px; border-radius: 8px; background: #fff; color: #1f2328; line-height: 1.65; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.vw-doc img { max-width: 100%; height: auto; }
.vw-doc table { border-collapse: collapse; margin: 12px 0; }
.vw-doc td, .vw-doc th { border: 1px solid #d0d7de; padding: 6px 10px; }
.vw-doc a { color: #0969da; }
.vw-md h1, .vw-md h2 { border-bottom: 1px solid #d8dee4; padding-bottom: .3em; }
.vw-md pre { background: #f6f8fa; padding: 14px; border-radius: 8px; overflow: auto; }
.vw-md code { background: #f0f2f5; padding: 2px 5px; border-radius: 5px; font-size: 90%; }
.vw-md pre code { background: none; padding: 0; }
.vw-md blockquote { margin: 0; padding: 0 1em; color: #57606a; border-left: 4px solid #d0d7de; }
.vw-font p { margin: 0 0 18px; word-break: break-word; }

/* таблицы */
.vw-tabs { display: flex; gap: 4px; width: min(1100px, calc(100% - 24px)); margin: 0 auto 8px; overflow-x: auto; flex: none; }
.vw-tabs button { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: rgba(255,255,255,.07); color: #ccc; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; white-space: nowrap; }
.vw-tabs button.on { background: #f2f2f2; color: #111; }
.vw-sheet-wrap { flex: 1; min-height: 0; overflow: auto; margin: 0 12px; border-radius: 10px; background: #fff; }
.vw-table { border-collapse: collapse; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: #1f2328; background: #fff; }
.vw-table td, .vw-table th { border: 1px solid #e1e4e8; padding: 5px 10px; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.vw-table thead th { position: sticky; top: 0; background: #f3f4f6; z-index: 1; font-weight: 600; color: #57606a; }
.vw-table tbody th { position: sticky; left: 0; background: #f3f4f6; color: #57606a; font-weight: 500; text-align: right; }
.vw-table tbody tr:first-child td { font-weight: 600; }
.vw-frame { flex: 1; width: min(1100px, calc(100% - 24px)); margin: 0 auto; border: 0; border-radius: 10px; background: #fff; min-height: 60vh; }
.vw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* PDF */
.vw-pages { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0 8px 20px; }
.vw-page { background: #fff; border-radius: 4px; box-shadow: 0 6px 30px rgba(0,0,0,.45); flex: none; max-width: 100%; }
.vw-page canvas { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.vw-pageinfo { text-align: center; color: #9a9aa8; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); padding-top: 6px; }

/* презентации */
.vw-slides { flex: 1; min-height: 0; overflow: auto; padding: 0 12px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.vw-slide { position: relative; width: min(860px, 100%); aspect-ratio: 16 / 9; flex: none; padding: 34px 44px; border-radius: 10px; background: #fff; color: #1f2328; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.4); display: flex; flex-direction: column; }
.vw-slide h3 { margin: 0 0 12px; font-size: clamp(18px, 3vw, 30px); letter-spacing: -.01em; }
.vw-slide ul { margin: 0; padding-left: 1.2em; font-size: clamp(12px, 1.8vw, 18px); line-height: 1.5; overflow: hidden; }
.vw-slide-img { display: flex; gap: 10px; margin-top: auto; padding-top: 10px; min-height: 0; flex: 1; align-items: flex-end; justify-content: center; }
.vw-slide-img img { max-height: 100%; max-width: 48%; object-fit: contain; border-radius: 6px; }
.vw-slide-n { position: absolute; right: 14px; bottom: 10px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: #8b8e9c; }

/* архивы, ссылки, 3D */
.vw-zip { width: min(760px, 100%); margin: 0 auto; background: #1b1c23; border-radius: 14px; padding: 18px; }
.vw-zip-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.vw-zip-h svg.i { width: 34px; height: 34px; color: #c9a36b; }
.vw-zip-h b { display: block; } .vw-zip-h small { color: #9a9aa8; }
.vw-zip ul { list-style: none; margin: 0; padding: 0; font: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem) ui-monospace, Menlo, monospace; }
.vw-zip li { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; }
.vw-zip li:nth-child(odd) { background: rgba(255,255,255,.03); }
.vw-zip li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-zip li small { color: #9a9aa8; white-space: nowrap; }
.vw-linkcard { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 30px; max-width: 420px; }
.vw-linkcard > svg.i { width: 64px; height: 64px; stroke-width: 1.2; color: #b4abff; }
.vw-linkcard b { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); word-break: break-word; }
.vw-linkcard small { color: #9a9aa8; word-break: break-all; margin-bottom: 10px; }
.vw-linkcard .btn { text-decoration: none; }
.vw-3d { flex: 1; width: 100%; min-height: 60vh; background: radial-gradient(circle at 50% 40%, #2a2a38, #0d0d12); --poster-color: transparent; }
@media (max-width: 860px) {
  .vw-center { padding: 0 8px; } .vw-checker { margin: 0 8px; }
  .vw-doc { padding: 24px 20px; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); } .vw-slide { padding: 18px 20px; }
}
/* в просмотре кода — свои правила для <pre> (перебиваем общий стиль окна просмотра) */
.viewer .stage .vw-code pre { width: auto; max-height: none; border-radius: 0; background: transparent; padding: 14px 16px; white-space: pre; word-break: normal; }
.viewer .stage .vw-code .vw-gutter { flex: none; background: #0d1117; }
.viewer .stage .vw-code.wrap .vw-src { white-space: pre-wrap; word-break: break-word; }
.vw-slide-img img { min-height: 40px; image-rendering: auto; }

.done-check { width: 72px; height: 72px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.done-check svg.i { width: 38px; height: 38px; stroke-width: 2.6; }
.rec-tag { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.add-grid .note { display: flex; gap: 10px; align-items: flex-start; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); padding: 12px 14px; border-radius: 14px; background: var(--ok-soft); }
.add-grid .note svg.i { color: var(--ok); }

/* плашка устройства */
.dev-plate { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; border-radius: 20px; margin: 2px 0 14px; background: var(--surface-2); }
.dev-plate.on { background: var(--surface-2); }
.dp-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--accent-text); flex: none; }
.dp-ico svg.i { width: 30px; height: 30px; }
.dp-main { flex: 1; min-width: 0; }
.dp-main > b { display: block; font-size: clamp(1.125rem, calc(1.0732rem + 0.2210vw), 1.4rem); letter-spacing: -.01em; }
.dp-main > small { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.dp-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.dp-stats b { color: var(--text); font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.dp-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dp-parts span { display: inline-flex; align-items: center; gap: 6px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); padding: 4px 10px; border-radius: 99px; background: var(--surface); }
.dp-parts span.off { opacity: .5; }
.dp-parts svg.i { width: 14px; height: 14px; color: var(--accent-text); }
.chip-n { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); color: var(--text-3); margin-left: 2px; }
.chip.on .chip-n { color: inherit; opacity: .8; }
button.chip { cursor: pointer; background: transparent; font: inherit; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 550; }

/* вкладки на странице устройства: «Файлы компьютера» / «В облаке» */
.dev-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 99px; background: var(--surface-2); width: fit-content; max-width: 100%; overflow-x: auto; }
.dev-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 99px; color: var(--text-2); font-weight: 600; text-decoration: none; white-space: nowrap; }
.dev-tabs a svg.i { width: 17px; height: 17px; }
.dev-tabs a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dev-tabs a:not(.on):hover { color: var(--text); }

.dev-note { display: flex; gap: 8px; align-items: flex-start; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); color: var(--text-2); background: var(--surface); border-radius: 12px; padding: 10px 12px; margin: 10px 0 0; }
.dev-note svg.i { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--warn, #d98a00); }

/* ---------- экскурсия по Облаку ---------- */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour.center { background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.55), 0 0 0 3px var(--accent); transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; background: var(--surface); color: var(--text); border-radius: 18px; padding: 18px 18px 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); max-width: calc(100vw - 32px); transition: left .25s ease, top .25s ease; }
.tour.center .tour-card { position: relative; width: min(380px, 100%); }
.tour-card h3 { margin: 4px 0 6px; font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); letter-spacing: -.01em; }
.tour-card p { margin: 0 0 14px; color: var(--text-2); line-height: 1.5; }
.tour-n { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; color: var(--accent-text, var(--accent)); }
.tour-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.tour-x:hover { background: var(--surface-2); color: var(--text); }
.tour-nav { display: flex; justify-content: space-between; gap: 8px; }
.tour-offer { position: fixed; z-index: 900; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); color: var(--text); border-radius: 18px; padding: 12px 14px; box-shadow: 0 14px 40px rgba(0,0,0,.3); width: max-content; max-width: calc(100vw - 32px); animation: tourIn .3s ease; }
.tour-offer > div { display: flex; flex-direction: column; margin-right: 6px; }
.tour-offer small { color: var(--text-2); }
@keyframes tourIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.h-tour-btn { margin-top: 14px; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; }
.h-tour-btn:hover { background: rgba(255,255,255,.28); }

/* ---------- работа с файлами как в Finder / Проводнике ---------- */
.content { user-select: none; -webkit-user-select: none; }
.content input, .content textarea, .content .vw-code, .content .help p { user-select: text; -webkit-user-select: text; }
body.lassoing, body.lassoing * { cursor: default !important; }
.lasso { position: fixed; z-index: 50; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 4px; pointer-events: none; }
.cut { opacity: .45; }
.inline-rename { font: inherit; font-weight: 600; color: var(--text); background: var(--surface); border: 2px solid var(--accent); border-radius: 6px; padding: 1px 6px; min-width: 0; width: 100%; outline: none; }
.ctx-l { flex: 1; }
.ctx-k { font: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem)/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text-3); background: none; border: 0; padding: 0; }
.statusbar { display: flex; align-items: center; gap: 14px; padding: 6px 22px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); border-top: 1px solid var(--border); background: var(--surface); flex: none; }
.statusbar .sb-clip { color: var(--accent-text, var(--accent)); }
.statusbar .sb-keys { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--text-3); font-weight: 700; cursor: pointer; }
.statusbar .sb-keys:hover { color: var(--text); background: var(--surface-2); }
@media (hover: none) { .statusbar .sb-keys { display: none; } }
.info-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-head h2 { margin: 0; word-break: break-word; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.info-head svg.i { width: 34px; height: 34px; flex: none; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.info-list dt { color: var(--text-3); }
.info-list dd { margin: 0; word-break: break-word; }
.info-list.keys dd { color: var(--text-2); }
kbd { display: inline-block; font: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem)/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); margin-right: 2px; white-space: nowrap; }
.nav a.drop-target { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }

/* ---------- «Этот компьютер» (в приложении для компьютера) ---------- */
.pc-status { display: inline-flex; align-items: center; gap: 7px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 650; padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.pc-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pc-status.ok { background: var(--ok-soft, #e3f6ec); color: var(--ok, #17a364); }
.pc-status.bad { background: var(--bad-soft, #fde8e6); color: var(--bad, #e0443a); }
.pc-status.wait { background: var(--warn-soft, #fff3dc); color: var(--warn, #d98a00); }
.pc-sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 4px 10px; }
.pc-sec h2 { margin: 0; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.pc-sec-b { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-card { background: var(--surface-2); border-radius: 18px; padding: 6px 14px; }
.pc-card .hint { margin: 8px 2px 10px; }
.pc-new { border: 2px solid var(--accent); margin-top: 14px; }
.pc-new h3 { display: flex; align-items: center; gap: 8px; margin: 10px 2px 2px; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.pc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pc-row + .pc-row, .pc-opt + .pc-row, .pc-opt + .pc-opt { border-top: 1px solid var(--border); }
.pc-row.off .pc-ico, .pc-row.off .pc-main { opacity: .55; }
.pc-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); display: grid; place-items: center; flex: none; }
.pc-main { flex: 1; min-width: 0; }
.pc-main b { margin-right: 6px; }
.pc-main .tag { margin-right: 4px; }
.pc-main small { display: block; color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.pc-main .pbar { height: 5px; border-radius: 99px; background: var(--surface-3, var(--border)); overflow: hidden; margin-top: 6px; max-width: 360px; }
.pc-main .pbar span { display: block; height: 100%; background: var(--accent); }
.pc-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.pc-opt { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.pc-opt > div { flex: 1; }
.pc-opt b { display: block; font-weight: 600; }
.pc-opt small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.pc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; cursor: pointer; margin-left: 6px; }
.pc-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.pc-switch span { position: absolute; inset: 0; background: var(--surface-3, var(--border)); border-radius: 99px; transition: background .15s; }
.pc-switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pc-switch input:checked + span { background: var(--accent); }
.pc-switch input:checked + span::before { transform: translateX(18px); }
.pc-hint { margin: 8px 6px 0; }
.pc-link { margin: 4px 0 10px; }
.pc-foot { text-align: center; margin: 26px 0 10px; }
.link-btn { border: 0; background: none; color: var(--text-3); font: inherit; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); cursor: pointer; text-decoration: underline; }
.vd-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0; }
.vd-sizes .btn { height: 46px; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); justify-content: center; }
.pc-hint, .pc-card .hint, .vd-msg { color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); line-height: 1.5; }

/* редактирование файла в просмотре */
.viewer .ed-btns { display: flex; gap: 6px; align-items: center; margin-right: 4px; }
.viewer .vw-edit { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.18); }
.viewer .vw-edit:hover { background: rgba(255,255,255,.2); }
.vw-editor { width: min(1100px, 100%); height: 100%; min-height: 60vh; resize: none; border: 0; outline: none; border-radius: 12px; padding: 18px 20px; background: #fff; color: #1b1c22; font: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem)/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
@media (max-width: 700px) { .viewer .vw-edit span, .viewer .ed-btns .btn { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); } .vw-editor { padding: 12px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); } }
.vw-editor { align-self: stretch; justify-self: center; }

/* ---------- «Устройства»: флэшки рядом сверху, панель устройства справа ---------- */
.dev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 18px; }
.dev-main { min-width: 0; }
.drive-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.drive-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.drive-card:hover { border-color: var(--accent); }
.drive-card b { font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-card small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.drive-card .pbar { width: 100%; height: 5px; border-radius: 99px; background: var(--surface-3, var(--border)); overflow: hidden; margin: 6px 0 2px; }
.drive-card .pbar span { display: block; height: 100%; background: var(--accent); }
.drive-card.off { opacity: .6; }
.drive-card.add { border-style: dashed; background: transparent; justify-content: center; }
.drive-card.add svg.i { color: var(--accent); width: 22px; height: 22px; }
.dc-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); display: grid; place-items: center; margin-bottom: 4px; }
.device[data-pick] { cursor: pointer; }
.device.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.dev-side { position: sticky; top: 10px; background: var(--surface-2); border-radius: 18px; padding: 16px; }
.ds-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ds-head b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.ds-head small { color: var(--text-3); }
.ds-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--accent-text, var(--accent)); }
.ds-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.ds-stats > div { background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.ds-stats b { display: block; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); letter-spacing: -.01em; }
.ds-stats small { color: var(--text-3); font-size: clamp(0.7188rem, calc(0.6448rem + 0.0821vw), 0.7763rem); line-height: 1.3; display: block; }
.ds-title { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin: 4px 2px 8px; }
.ds-act { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; margin-bottom: 8px; }
.ds-act:hover { border-color: var(--accent); }
.ds-act > svg.i:first-child { width: 22px; height: 22px; color: var(--accent-text, var(--accent)); flex: none; }
.ds-act span { flex: 1; min-width: 0; }
.ds-act b { display: block; }
.ds-act small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.ds-hint { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); margin: 10px 2px 0; }
.steps-list { padding-left: 20px; color: var(--text-2); line-height: 1.55; }
.steps-list li { margin-bottom: 8px; }
@media (max-width: 1000px) { .dev-layout { grid-template-columns: 1fr; } .dev-side { position: static; } }

/* ---------- умный поиск ---------- */
.topbar { position: relative; }
.search-pop { position: absolute; top: calc(100% + 6px); z-index: 60; max-width: calc(100vw - 24px); max-height: min(70vh, 640px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.28); padding: 10px; }
.sp-filters { display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.sf-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sf-l { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; min-width: 54px; }
.sf-row .chip, .sf-smart .chip { height: 28px; padding: 0 10px; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); }
.sf-smart { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); }
.sf-smart svg.i { width: 16px; height: 16px; }
.sf-smart span { color: var(--text-2); }
.sf-x { cursor: pointer; }
.sp-list { display: flex; flex-direction: column; }
.sp-item { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 9px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.sp-item:hover, .sp-item.on { background: var(--surface-2); }
.sp-item > svg.i { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.sp-item span { min-width: 0; flex: 1; }
.sp-item b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item small { display: block; color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-snip { display: flex !important; align-items: center; gap: 4px; color: var(--text-2) !important; }
.sp-snip svg.i { width: 13px; height: 13px; flex: none; }
.search-pop mark { background: color-mix(in srgb, var(--warm, #f2b544) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sp-hint { color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); padding: 12px 10px; line-height: 1.5; }
.sp-all { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 10px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--accent-text, var(--accent)); font: inherit; font-weight: 600; cursor: pointer; border-radius: 0 0 10px 10px; }
.sp-all kbd { margin-left: auto; }
.search-filters { display: flex; flex-direction: column; gap: 6px; margin: 0 4px 14px; }
.search-filters:empty { display: none; }

/* справка: «пройти заново» и подробное руководство со снимками экрана */
.g-shot { width: 100%; height: auto; border-radius: 12px; display: block; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.g-art .g-shot { max-height: 320px; object-fit: cover; object-position: top left; }
.h-again { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 30px 0 6px; padding: 18px 20px; border-radius: 20px; background: var(--accent-soft); }
.h-again > div { flex: 1 1 260px; }
.h-again b { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.h-again p { margin: 4px 0 0; color: var(--text-2); }
.h-manual-sub { color: var(--text-2); margin: -4px 4px 16px; }
.h-manual { display: flex; flex-direction: column; gap: 22px; }
.hm-item { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: center; background: var(--surface-2); border-radius: 20px; padding: 18px; }
.hm-item.rev .hm-pic { order: 2; }
.hm-pic { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; }
.hm-text h3 { margin: 6px 0 10px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.hm-text ul { margin: 0; padding-left: 18px; color: var(--text-2); line-height: 1.55; }
.hm-text li { margin-bottom: 8px; }
.hm-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.h-zoom { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.h-zoom img { max-width: 100%; max-height: 100%; border-radius: 12px; }
@media (max-width: 800px) { .hm-item { grid-template-columns: 1fr; } .hm-item.rev .hm-pic { order: 0; } }
.pc-status-line { display: flex; align-items: center; gap: 10px; margin: 0 4px 4px; }
.pc-status-line small { color: var(--text-3); }
.chip-n.new, .badge.new { background: var(--accent); color: var(--on-accent); }
.badge.new:empty { display: none; }

/* чёрно-белый интерфейс: переключатель на белом фоне в тёмной теме — с тёмной кнопкой */
.pc-switch input:checked + span::before { background: var(--on-accent); }
.stale { opacity: .55; }
/* в тёмной теме логотип — белый квадрат с чёрным облаком, иначе он теряется на тёмном фоне */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img[src="/logo.svg"] { filter: invert(1); } }
:root[data-theme="dark"] img[src="/logo.svg"] { filter: invert(1); }
/* понятые умным поиском условия — обведённые, чтобы не спорить с выбранными фильтрами */
.sf-smart .chip.on.sf-x { background: var(--surface); color: var(--text); border: 1px solid var(--text-3); }
.sf-smart .chip.on.sf-x:hover { border-color: var(--text); }

.off-pill { display: inline-flex; align-items: center; gap: 5px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 650; padding: 4px 10px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; flex: none; }
.off-pill svg.i { width: 14px; height: 14px; }
.drive-card.off { background: transparent; border-style: dashed; }
.drive-card.off .dc-ico, .drive-card.off .pbar { filter: grayscale(1); }
.ds-head.off .ds-ico { filter: grayscale(1); opacity: .5; }
.ds-head .off-pill { margin-left: auto; }
.on-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.sp-group { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin: 8px 10px 2px; }
.sp-sec { align-items: center; }
.sp-sec > svg.i { color: var(--text-2); }
.sp-go { display: inline-flex !important; align-items: center; gap: 2px; color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); white-space: nowrap; }
.sp-go svg.i { width: 14px; height: 14px; }
.sp-item.on .sp-go, .sp-item:hover .sp-go { color: var(--text); }

/* ---------- почта ---------- */
.mail-acc { height: 34px; padding: 0 10px; width: auto; }
.mail-err { display: flex; gap: 8px; align-items: center; margin: 0 4px 12px; padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); }
.mail-layout { display: grid; grid-template-columns: 220px minmax(280px, 380px) minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 420px; }
.mail-folders { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.mf-acc { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: var(--surface-2); }
.mf-acc span { min-width: 0; display: flex; flex-direction: column; }
.mf-acc b { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-acc small { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); }
.mail-folders a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 550; }
.mail-folders a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders a svg.i { width: 18px; height: 18px; flex: none; opacity: .8; }
.mail-folders a em { font-style: normal; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--text); }
.mail-folders a:hover { background: var(--surface-2); color: var(--text); }
.mail-folders a.on { background: var(--accent); color: var(--on-accent); }
.mail-folders a.on em { background: var(--on-accent); color: var(--accent); }
.mail-list { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: var(--surface-2); overflow: hidden; }
.ml-head { padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--border); }
.ml-head h3 { margin: 0 4px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); letter-spacing: -.01em; }
.ml-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.ml-search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.ml-search svg.i { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.ml-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; color: var(--text); }
.ml-search input::-webkit-search-cancel-button { display: none; }
.ml-x { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--text-3); display: grid; }
.ml-items { flex: 1; overflow-y: auto; padding: 4px 6px 6px; }
.mail-day { position: sticky; top: -4px; z-index: 1; padding: 10px 10px 4px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.mail-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; color: var(--text); text-decoration: none; position: relative; }
.mail-item:hover { background: var(--surface-3); }
.mail-item.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.mi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-top { display: flex; gap: 8px; align-items: baseline; }
.mi-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mi-top small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); white-space: nowrap; }
.mi-sub { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); margin-top: 2px; display: flex; align-items: center; gap: 4px; min-width: 0; }
.mi-sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-sub svg.i { width: 14px; height: 14px; flex: none; }
.mail-item.unseen .mi-top b { font-weight: 750; }
.mail-item.unseen::after { content: ''; position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--c-blue); }
.mail-item.unseen .mi-sub { color: var(--text); }
.mail-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); color: #fff; background: var(--av, var(--text-3)); }
.mail-av.big { width: 44px; height: 44px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.mail-more { margin: 8px auto; display: flex; }
.mail-empty { display: grid; place-items: center; align-content: center; gap: 8px; height: 100%; min-height: 160px; color: var(--text-3); text-align: center; padding: 20px; }
.mail-empty svg.i { width: 36px; height: 36px; }
.mail-empty p { margin: 0; max-width: 300px; line-height: 1.5; }
.mail-hello b { color: var(--text); font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.mail-hello svg.i { width: 56px; height: 56px; opacity: .5; }
.mail-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--text-2); animation: spin .8s linear infinite; }
.mail-read { overflow-y: auto; min-width: 0; }
.mr-card { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); margin-bottom: 12px; }
.mr-head { display: flex; align-items: flex-start; gap: 8px; }
.mr-head h2 { margin: 0 0 12px; font-size: clamp(1.125rem, calc(1.0473rem + 0.3315vw), 1.47rem); line-height: 1.3; letter-spacing: -.015em; overflow-wrap: anywhere; }
.mr-back { display: none; }
.mr-meta { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.mr-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mr-who b { color: var(--text); }
.mr-who span { color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.mr-meta > small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); white-space: nowrap; align-self: flex-start; margin-top: 3px; }
.mr-to { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-3); margin-top: 2px; }
.mr-atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-top: 14px; }
.mr-att { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.mr-att > svg.i { width: 22px; height: 22px; flex: none; }
.mr-att span { flex: 1; min-width: 0; }
.mr-att b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-att small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.mr-images { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 14px; border-radius: 12px; background: var(--surface); color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.mr-images span { flex: 1; }
.mr-images svg.i { width: 18px; height: 18px; flex: none; }
.mr-always { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-3); cursor: pointer; }
.mail-frame { width: 100%; min-height: 120px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--border); display: block; }
.mr-remove { display: block; margin: 18px auto 6px; }
.mb-kinds { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.mb-kind { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); cursor: pointer; }
.mb-kind:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mb-kind input { margin-top: 3px; }
.mb-kind span { display: flex; flex-direction: column; gap: 3px; }
.mb-kind small { color: var(--text-2); line-height: 1.45; }
.mb-progress { margin-bottom: 12px; }
.mb-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.mb-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.mb-text { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mb-text svg.i { width: 16px; height: 16px; }
.mb-text .bad { color: var(--bad); }
.mail-setup { max-width: 720px; }
.ms-hero { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 20px; background: var(--surface-2); margin-bottom: 16px; }
.ms-hero > svg.i { width: 40px; height: 40px; flex: none; }
.ms-hero h2 { margin: 0 0 6px; }
.ms-hero p { margin: 0; color: var(--text-2); line-height: 1.55; }
.ms-provs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ms-prov { height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 650; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); cursor: pointer; }
.ms-prov:hover { border-color: var(--text-3); }
.ms-prov.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ms-form { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.ms-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.ms-form .actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1000px) {
  .mail-layout { grid-template-columns: 1fr; height: auto; }
  .mail-folders { flex-direction: row; overflow-x: auto; }
  .mail-folders a { flex: none; }
  .mail-layout.reading .mail-folders, .mail-layout.reading .mail-list { display: none; }
  .mail-layout:not(.reading) .mail-read { display: none; }
  .mr-back { display: grid; }
  .mail-list { max-height: none; overflow: visible; }
  .ml-items { overflow: visible; }
  .mf-acc { display: none; }
  .mail-head { flex-wrap: nowrap; gap: 8px; }
  .mail-head .crumbs { min-width: 0; overflow: hidden; }
  .mail-head .crumbs a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mail-head .mh-root, .mail-head .mh-lbl { display: none; }
  .mail-head .tools { flex: none; }
  .mail-head .mail-acc { max-width: 140px; }
  .mr-card { padding: 14px; }
  .mr-head h2 { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
  .mr-meta { flex-wrap: wrap; }
  .mr-meta > small { order: 3; width: 100%; margin: 0 0 0 56px; }
  .mr-att .btn { padding: 0 10px; }
}
.pc-update { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px; border-radius: 14px; background: var(--surface-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text); }
.pc-update span { flex: 1; min-width: 200px; }
.pc-update svg.i { width: 18px; height: 18px; flex: none; }
.pc-update.muted { color: var(--text-3); background: none; padding: 0 4px; }
@media (max-width: 600px) {
  .h-progress { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .h-ring { width: 60px; height: 60px; }
  .h-pt { min-width: 0; width: 100%; }
}

/* ---------- меню по группам ---------- */
.nav-sec { margin: 14px 16px 4px; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.nav-sep { height: 1px; margin: 10px 16px; background: var(--border); }

/* ---------- Главная ---------- */
.home { max-width: 820px; margin: 0 auto; padding: 18px 4px 60px; display: flex; flex-direction: column; gap: 22px; }
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 4px 0; }
.hh-text { min-width: 0; }
.home-hero h1 { margin: 0; font-size: clamp(1.6875rem, calc(1.5062rem + 0.7735vw), 2.38rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 750; }
.home-hero p { margin: 6px 0 0; color: var(--text-2); font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.hh-ava { width: 64px; height: 64px; border-radius: 50%; border: 0; padding: 0; flex: none; overflow: hidden; cursor: pointer; background: var(--accent); color: var(--on-accent); font-size: clamp(1.25rem, calc(1.0946rem + 0.6630vw), 1.82rem); font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }
.hh-ava img { width: 100%; height: 100%; object-fit: cover; }

.home-banner { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 20px; border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-blue) 16%, var(--surface-2)), var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-blue) 25%, transparent); }
.home-banner:hover { filter: brightness(1.04); }
.hb-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--c-blue); color: #fff; }
.hb-ico svg.i { width: 21px; height: 21px; }
.hb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hb-main b { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); font-weight: 650; }
.hb-main small { color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.hb-more { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; color: var(--text-2); padding: 4px 10px; border-radius: 99px; background: var(--surface-3); white-space: nowrap; }
.home-banner > svg.i:last-child { width: 18px; height: 18px; color: var(--text-3); flex: none; transition: transform .2s; }
.home-banner.open > svg.i:last-child { transform: rotate(90deg); }
.home-tiplist { margin-top: -14px; }

.home-storage { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 22px; background: var(--surface-2); color: var(--text); text-decoration: none; transition: background .15s; }
.home-storage:hover { background: var(--surface-3); }
.hs-top { display: flex; align-items: center; gap: 10px; }
.hs-top b { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); font-weight: 650; flex: 1; }
.hs-top span { color: var(--text-2); font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.hs-top svg.i { width: 18px; height: 18px; color: var(--text-3); }
.hs-bar { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.home-storage:hover .hs-bar { background: var(--surface); }
.hs-bar i { display: block; height: 100%; }
.hs-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.hs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hs-legend i { width: 9px; height: 9px; border-radius: 50%; }
.hs-legend i.free { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }

.home-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 16px; border-radius: 22px; background: var(--surface-2); color: var(--text); text-decoration: none; min-width: 0; transition: transform .12s, background .15s; }
.home-tile:hover { background: var(--surface-3); }
.home-tile:active { transform: scale(.97); }
.htl-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 12px; background: var(--tc); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px -6px var(--tc); }
.htl-ico svg.i { width: 23px; height: 23px; stroke-width: 2; }
.home-tile b { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); font-weight: 650; }
.home-tile small { color: var(--text-2); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-sec { display: flex; flex-direction: column; gap: 10px; }
.home-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.home-h h3 { margin: 0; font-size: clamp(1.125rem, calc(1.0732rem + 0.2210vw), 1.4rem); font-weight: 700; letter-spacing: -.01em; }
.home-h a { color: var(--c-blue); text-decoration: none; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); font-weight: 500; }
.home-recent { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 12px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.home-recent::-webkit-scrollbar { display: none; }
.hr-item { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; min-width: 0; }
.hr-pic { position: relative; width: 132px; height: 100px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; transition: transform .12s; }
.hr-item:hover .hr-pic { background: var(--surface-3); }
.hr-item:active .hr-pic { transform: scale(.97); }
.hr-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hr-pic svg.i { width: 34px; height: 34px; }
.hr-item b { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.hr-item small { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); padding: 0 2px; }
.hr-item.off { opacity: .5; }

.home-group { display: flex; flex-direction: column; border-radius: 22px; background: var(--surface-2); overflow: hidden; }
.hg-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; border: 0; background: none; color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.hg-row:hover { background: var(--surface-3); }
.hg-row + .hg-row::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--border); }
.hg-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--tc, var(--c-gray)); color: #fff; }
.hg-ico svg.i { width: 20px; height: 20px; }
.hg-ico.dev { background: var(--surface-3); color: var(--text); }
.hg-ico.dev.off { color: var(--text-3); }
.hg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hg-main b { font-weight: 600; font-size: clamp(0.9688rem, calc(0.8691rem + 0.1107vw), 1.0463rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-main small { color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); display: flex; align-items: center; gap: 6px; }
.hg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hg-val { color: var(--text-2); font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); white-space: nowrap; }
.hg-row > svg.i:last-child { width: 16px; height: 16px; color: var(--text-3); flex: none; }

.home-skel { height: 72px; border-radius: 22px; background: var(--surface-2); animation: homePulse 1.2s ease-in-out infinite alternate; }
.home-skel.tall { height: 280px; }
@keyframes homePulse { from { opacity: .5; } to { opacity: 1; } }
@media (max-width: 600px) {
  .home { gap: 18px; padding-top: 6px; }
  .home-hero h1 { font-size: clamp(1.3125rem, calc(1.1571rem + 0.6630vw), 1.89rem); }
  .home-hero p { font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); }
  .hh-ava { width: 52px; height: 52px; font-size: clamp(1.125rem, calc(1.0473rem + 0.3315vw), 1.47rem); }
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-tile { padding: 14px; border-radius: 20px; }
  .hg-val { display: none; }
  .home-recent { grid-auto-columns: 112px; }
  .hr-pic { width: 112px; height: 88px; }
}

/* ---------- верхняя строка без бокового меню ---------- */
.home-btn { display: flex; align-items: center; gap: 10px; flex: none; padding: 4px 12px 4px 4px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 750; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); letter-spacing: -.01em; }
.home-btn:hover { background: var(--surface-2); }
.home-btn img { width: 36px; height: 36px; border-radius: 10px; }
.user-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; flex: none; overflow: hidden; display: grid; place-items: center; }
.user-btn img { width: 100%; height: 100%; object-fit: cover; }
.user-btn .ava { width: 100%; height: 100%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.user-btn:hover { box-shadow: 0 0 0 3px var(--surface-3); }
.ctx .ctx-title { pointer-events: none; font-weight: 650; }
.ctx .ctx-title svg.i { opacity: .5; }
@media (max-width: 860px) {
  .home-btn span { display: none; }
  .home-btn { padding: 2px; }
  .home-btn img { width: 34px; height: 34px; }
}
.at-home #userBtn { display: none; }

/* ---------- Пароли ---------- */
.pw-intro { max-width: 560px; margin: 10px auto 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.pw-hero { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(145deg, #3a3a3c, #1c1c1e); color: #ffd60a; box-shadow: 0 12px 30px -12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.pw-hero svg.i { width: 42px; height: 42px; }
.pw-intro h2 { margin: 8px 0 0; font-size: clamp(1.25rem, calc(1.0946rem + 0.6630vw), 1.82rem); letter-spacing: -.02em; }
.pw-intro > p { margin: 0; color: var(--text-2); line-height: 1.55; }
.pw-points { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.pw-points li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.45; color: var(--text-2); }
.pw-points li b { color: var(--text); }
.pw-points svg.i { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.pw-form { display: flex; flex-direction: column; gap: 12px; width: 100%; text-align: left; }
.pw-form label { display: flex; flex-direction: column; gap: 6px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; color: var(--text-2); }
.pw-form .pw-check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.4; }
.pw-form .pw-check input { margin-top: 2px; }
.pw-locked .pw-form { flex-direction: row; max-width: 420px; }
.pw-locked .pw-form .field { flex: 1; }
.pw-meter { position: relative; height: 6px; border-radius: 99px; background: var(--surface-3); margin: -4px 0 18px; }
.pw-meter i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0); border-radius: 99px; background: var(--c, var(--bad)); transition: width .25s, background .25s; }
.pw-meter span { position: absolute; right: 0; top: 9px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--c, var(--text-3)); font-weight: 600; }
.pw-form .pw-meter { margin-bottom: 22px; }
.pw-inline { display: flex; gap: 6px; align-items: center; }
.pw-inline .field { flex: 1; min-width: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; }
.pw-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; height: calc(100vh - 170px); min-height: 420px; }
.pw-list { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: var(--surface-2); overflow: hidden; }
.pw-lh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pw-lh h3 { margin: 0 4px; font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); }
.pw-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pw-item:hover { background: var(--surface-3); }
.pw-item.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.pw-item .mi-body b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-item .mi-body small { color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-read { overflow-y: auto; min-width: 0; }
.pw-card { padding: 22px; border-radius: 20px; background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; max-width: 620px; }
.pw-card h2 { margin: 0; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); letter-spacing: -.01em; }
.pw-top { display: flex; align-items: center; gap: 14px; }
.pw-top a { color: var(--c-blue); text-decoration: none; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.pw-fields { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); overflow: hidden; }
.pw-f { padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.pw-f + .pw-f { border-top: 1px solid var(--border); }
.pw-f small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 600; }
.pw-v { display: flex; align-items: center; gap: 4px; min-height: 34px; }
.pw-v span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: clamp(0.9688rem, calc(0.8691rem + 0.1107vw), 1.0463rem); }
.pw-note { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.pw-card .actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1000px) {
  .pw-layout { grid-template-columns: 1fr; height: auto; }
  .pw-layout.reading .pw-list { display: none; }
  .pw-layout:not(.reading) .pw-read { display: none; }
  .pw-list { overflow: visible; }
  .pw-locked .pw-form { flex-direction: column; }
}
textarea.field { font: inherit; resize: vertical; }
.pw-big { height: 52px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); border-radius: 14px; }
.pw-form .field.pw-big { padding: 0 16px; }
.pw-locked .pw-form.pw-open { flex-direction: column; max-width: 400px; gap: 10px; }
.pw-locked .pw-form.pw-open .btn { justify-content: center; }
.pw-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.pw-badges span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; }
.pw-badges span:last-child { background: var(--surface-2); color: var(--text-2); }
.pw-badges svg.i { width: 15px; height: 15px; }
.pw-locked .pw-form.pw-open .field, .pw-locked .pw-form.pw-open .btn { flex: none; width: 100%; }

/* ---------- тонкие рамки у блоков, как у Apple ---------- */
.home-storage, .home-tile, .home-group, .hr-pic, .summary, .stat, .drive, .link-card, .this-node, .device, .g-tile, .store-top, .cat-card,
.h-progress, .h-ex, .h-qa, .g-card, .dev-plate, .pc-card, .drive-card, .dev-side, .hm-item, .mf-acc, .mail-list, .mr-card, .ms-hero,
.pw-points li, .pw-list, .pw-card, .pw-fields, .mr-att, .pc-update:not(.muted) { box-shadow: inset 0 0 0 1px var(--line); }
.home-tile:hover, .home-storage:hover, .device:hover, .drive-card:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); }
.bio-btn { width: 100%; max-width: 300px; justify-content: center; gap: 8px; margin: 4px auto 10px; height: 44px; border-radius: 999px; font-weight: 600; }
.pw-open .bio-btn { max-width: none; margin: 0; }
.bio-btn svg.i { width: 20px; height: 20px; }
.pw-bio-tip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--c-green) 14%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-green) 30%, transparent); }
.pw-bio-tip > svg.i:first-child { width: 22px; height: 22px; color: var(--c-green); flex: none; }
.pw-bio-tip span { flex: 1; display: flex; flex-direction: column; }
.pw-bio-tip small { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.pw-bio-tip > svg.i:last-child { width: 16px; height: 16px; color: var(--text-3); }
.pk-list { margin: 12px 0; }
.device.picked, .drive-card.picked, .drive-card.on { box-shadow: inset 0 0 0 2px var(--accent); }
.pk-lock { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 4px 0 12px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.pk-lock.off { opacity: .5; cursor: default; }
.pk-t { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pk-t small { color: var(--text-3); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); line-height: 1.4; }
.lockscreen .box { max-width: 380px; }
.ls-ava { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; margin: 0 auto 6px; background: var(--accent); color: var(--on-accent); font-size: clamp(1.6875rem, calc(1.5062rem + 0.7735vw), 2.38rem); font-weight: 700; }
.home-sec-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 22px; color: var(--text);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--hc) 22%, var(--surface-2)), var(--surface-2) 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hc) 30%, transparent); }
.home-sec-card.bio { --hc: var(--c-green); }
.home-sec-card.lock { --hc: var(--c-blue); }
.hsc-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--hc); color: #fff; box-shadow: 0 8px 20px -8px var(--hc); }
.hsc-ico svg.i { width: 28px; height: 28px; }
.hsc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hsc-main b { font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); font-weight: 700; }
.hsc-main small { color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); line-height: 1.45; }
.home-sec-card .btn { flex: none; }
@media (max-width: 600px) { .home-sec-card { flex-wrap: wrap; } .home-sec-card .btn { width: 100%; justify-content: center; } }
.htl-ico.app { width: 52px; height: 52px; border-radius: 13px; background: none; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .55); overflow: hidden; }
.htl-ico.app svg { width: 100%; height: 100%; display: block; }
@media (max-width: 600px) { .htl-ico.app { width: 48px; height: 48px; } }

/* =========================================================================
   Единый стиль (как у Apple): одна ширина страниц, крупные заголовки,
   одинаковые подзаголовки, спокойные карточки без градиентов и пунктиров
   ========================================================================= */
/* страницы — по центру, а не на весь широкий монитор */
.content { padding-left: max(22px, calc((100% - 1240px) / 2)); padding-right: max(22px, calc((100% - 1240px) / 2)); }
.home { max-width: 880px; }

/* заголовок страницы — крупно и жирно; путь (папки) — серым */
.head { min-height: 64px; margin-bottom: 4px; }
.crumbs { font-size: clamp(1.375rem, calc(1.2196rem + 0.6630vw), 1.96rem); font-weight: 750; letter-spacing: -.025em; gap: 0; }
.crumbs a { padding: 2px 8px; color: var(--text-3); font-weight: 650; }
.crumbs a:last-child { color: var(--text); font-weight: 750; }
.crumbs a:first-child { padding-left: 2px; }
.crumbs svg.i { width: 20px; height: 20px; margin: 0 2px; }

/* подзаголовки разделов — одинаковые везде */
.section-title, .home-h h3, .ds-title, .h-sec-title { font-size: clamp(1.1875rem, calc(1.0654rem + 0.1357vw), 1.2825rem) !important; font-weight: 700 !important; color: var(--text) !important; letter-spacing: -.01em; text-transform: none !important; }
.section-title { margin: 26px 2px 12px; }

/* большие цифры места — спокойная карточка вместо серого градиента */
.hero-space { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); align-items: center; }
.hs-l { color: var(--text-2); opacity: 1; }

/* шапка справки — тоже без мутного градиента */
.h-hero { color: var(--text); background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--c-blue) 16%, transparent), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.h-hero p { color: var(--text-2); }
.h-kicker { background: var(--surface-3); color: var(--text-2); }
.h-scheme span { background: var(--surface-3); color: var(--text); }
.h-scheme span.big { background: var(--accent); color: var(--on-accent); }
.h-hero .btn { background: var(--surface-3); color: var(--text); border-color: transparent; }

/* выключенное — просто бледнее, без пунктира */
.device.off, .drive-card.off { border: 0; background: var(--surface-2); padding: 18px; opacity: .62; box-shadow: inset 0 0 0 1px var(--line); }
.device.off:hover, .drive-card.off:hover { opacity: .85; }
.drive-card.add, .h-foot, .get-app { border: 1px solid var(--line); }
.drive-card.add { background: transparent; }

/* карточки файлов: превью с мягким цветом типа файла, а не чёрная дыра */
.file-card { padding: 6px 6px 0; box-shadow: inset 0 0 0 1px var(--line); }
.file-card .thumb { aspect-ratio: 16 / 10; background: var(--surface-3); }
.file-card .thumb svg.i { width: 44px; height: 44px; stroke-width: 1.5; }
.file-card .thumb:has(.kind-sheet) { background: color-mix(in srgb, var(--c-green) 13%, var(--surface)); }
.file-card .thumb:has(.kind-doc) { background: color-mix(in srgb, var(--c-blue) 13%, var(--surface)); }
.file-card .thumb:has(.kind-pdf) { background: color-mix(in srgb, var(--c-red) 13%, var(--surface)); }
.file-card .thumb:has(.kind-audio) { background: color-mix(in srgb, var(--c-purple) 13%, var(--surface)); }
.file-card .thumb:has(.kind-slides) { background: color-mix(in srgb, var(--c-orange) 13%, var(--surface)); }
.file-card .thumb:has(.kind-video) { background: color-mix(in srgb, var(--c-red) 10%, var(--surface)); }
.file-card .thumb:has(.kind-code) { background: color-mix(in srgb, var(--c-teal) 13%, var(--surface)); }
.file-card .thumb:has(.kind-archive) { background: color-mix(in srgb, var(--c-brown) 13%, var(--surface)); }
.folder-card { box-shadow: inset 0 0 0 1px var(--line); }
.folder-card svg.i.kind { color: var(--c-blue); fill: var(--c-blue); fill-opacity: .22; }

/* кнопки в шапке страниц — одной высоты */
.head .tools .btn { height: 38px; }
@media (max-width: 860px) {
  .crumbs { font-size: clamp(1.1875rem, calc(1.058rem + 0.5525vw), 1.68rem); }
  .section-title, .home-h h3, .ds-title { font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem) !important; }
}
.file-card .thumb .off-badge svg.i { width: 14px; height: 14px; stroke-width: 2; }
.hr-pic:has(.kind-sheet) { background: color-mix(in srgb, var(--c-green) 13%, var(--surface)); }
.hr-pic:has(.kind-doc) { background: color-mix(in srgb, var(--c-blue) 13%, var(--surface)); }
.hr-pic:has(.kind-pdf) { background: color-mix(in srgb, var(--c-red) 13%, var(--surface)); }
.hr-pic:has(.kind-audio) { background: color-mix(in srgb, var(--c-purple) 13%, var(--surface)); }
.hr-pic:has(.kind-slides) { background: color-mix(in srgb, var(--c-orange) 13%, var(--surface)); }
.hr-pic:has(.kind-code) { background: color-mix(in srgb, var(--c-teal) 13%, var(--surface)); }
.hr-pic:has(.kind-archive) { background: color-mix(in srgb, var(--c-brown) 13%, var(--surface)); }
/* ---------- Резервные копии ---------- */
.bk-lead { max-width: 720px; margin: 0 2px 18px; color: var(--text-2); line-height: 1.55; }
.bk-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.bk-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 20px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.bk-card.soon { opacity: .55; }
.bk-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; box-shadow: 0 8px 18px -8px rgba(0,0,0,.5); }
.bk-ico svg.i { width: 26px; height: 26px; }
.bk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bk-main b { font-size: clamp(1.0312rem, calc(0.9252rem + 0.1179vw), 1.1138rem); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bk-main small { color: var(--text-2); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); }
.bk-main small:empty { display: none; }
.bk-main .mb-bar { margin-top: 6px; max-width: 360px; }
.bk-note { display: flex; align-items: center; gap: 6px; color: var(--text-3) !important; }
.bk-note svg.i { width: 14px; height: 14px; }
.bk-warn { color: var(--c-orange) !important; }
.bk-act { display: flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 600px) { .bk-card { flex-wrap: wrap; } .bk-act { width: 100%; } .bk-act .btn.primary { width: 100%; justify-content: center; } }
.legal-links { margin-top: 14px; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); color: var(--text-3); } .legal-links a { color: var(--text-3); }
.rec-tag { white-space: nowrap; }
.add-card { border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: inherit; cursor: pointer; width: 100%; }
.add-card:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); }
.add-card b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; line-height: 1.3; }
.add-card b .rec-tag { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 2px 8px; border-radius: 99px; line-height: 1.5; }
.add-card > span { line-height: 1.45; }

/* просмотр фото и видео: целиком вписываются в свободное место (как в «Фото»), ничего не обрезается */
.vw-center { position: relative; overflow: hidden; }
.viewer .vw-center > .vw-img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: calc(100% - 112px); max-height: calc(100% - 8px); object-fit: contain; }
video.vw-img { background: #000; }
@media (max-width: 860px) { .viewer .vw-center > .vw-img { max-width: calc(100% - 16px); } }
.dev-tabs .chip-n.new { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); line-height: 1.5; text-decoration: none; border: 0; }
.vw-offnote { align-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 10px auto 0; padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.08); color: #c8c8d0; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); } .vw-offnote svg.i { width: 15px; height: 15px; }
/* ---------- выбор накопителя ---------- */
.tg-list { display: flex; flex-direction: column; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin: 12px 0; max-height: 55vh; overflow-y: auto; }
.tg-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tg-row + .tg-row { border-top: 1px solid var(--line); }
.tg-row:hover:not(:disabled) { background: var(--surface-3); }
.tg-row:disabled { opacity: .45; cursor: default; }
.tg-row.sub { padding-left: 42px; }
.tg-row.on { background: color-mix(in srgb, var(--c-blue) 12%, transparent); }
.tg-row > svg.i:last-child { width: 18px; height: 18px; color: var(--c-blue); }
.tg-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.tg-ico svg.i { width: 18px; height: 18px; }
.tg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tg-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-main small { color: var(--text-3); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); }
/* ---------- Полное руководство ---------- */
.hf-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.hf-toc button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; border: 0; background: var(--surface-2); color: var(--text); font: inherit; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.hf-toc button:hover { background: var(--surface-3); }
.hf-toc svg.i { width: 16px; height: 16px; color: var(--text-2); }
.hf-ch { margin-top: 26px; scroll-margin-top: 16px; }
.hf-ch h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: clamp(1.125rem, calc(1.0473rem + 0.3315vw), 1.47rem); letter-spacing: -.01em; }
.hf-ci { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }
.hf-ci svg.i { width: 20px; height: 20px; }
.hf-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.hf-step { display: flex; gap: 14px; padding: 14px 18px; }
.hf-step + .hf-step { border-top: 1px solid var(--line); }
.hf-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 700; margin-top: 1px; }
.hf-step b { display: block; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); margin-bottom: 3px; }
.hf-step p { margin: 0; color: var(--text-2); line-height: 1.55; }
/* ---------- Галерея: выделение ---------- */
.gal-sel-btn { margin-left: auto; margin-right: 8px; }
.g-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 2px rgba(255,255,255,.9); color: transparent; }
.g-check svg.i { width: 14px; height: 14px; stroke-width: 3; }
#gal.selecting .g-check, .g-tile.selected .g-check { display: grid; }
.g-tile.selected .g-check { background: var(--c-blue); box-shadow: 0 0 0 2px #fff; color: #fff; }
.g-tile.selected { box-shadow: inset 0 0 0 3px var(--c-blue) !important; background: transparent !important; }
.g-tile.selected img { transform: scale(.92); border-radius: 8px; }
.gal-day-sel { margin-left: auto; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); color: var(--c-blue); font-weight: 600; }
.gal-title { display: flex; align-items: baseline; gap: 8px; }
.sel-bar { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--surface); box-shadow: 0 12px 40px rgba(0,0,0,.35), inset 0 0 0 1px var(--line); max-width: calc(100vw - 24px); }
.sel-bar b { font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); margin-right: 8px; white-space: nowrap; }
.sel-bar .icon-btn.danger { color: var(--bad); }
@media (max-width: 600px) { .sel-bar { padding-left: 14px; gap: 2px; } .sel-bar b { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); margin-right: 2px; } }
body:has(#selBar) .fab { display: none; }
/* загрузка — тот же логотип, что при входе на сайт */
.rk-loader { display: grid; place-items: center; min-height: 46vh; }
.rk-loader img { width: 44px; height: 44px; border-radius: 12px; animation: pulse 1.2s ease-in-out infinite; }
/* просмотр файла: анимацию делает скрипт (вырастает из плитки), CSS-«мигание» не нужно */
.viewer { animation: none; transform-origin: center; will-change: transform; }
.pk-when { margin: -4px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.pk-when small { color: var(--text-3); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); padding-left: 4px; }
.pk-when.off { opacity: .45; pointer-events: none; }
.pk-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pk-seg .seg-btn { flex: 1; min-width: 120px; border-radius: 10px; padding: 8px 10px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); white-space: normal; }
.pk-own { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); color: var(--text-2); padding-left: 4px; }
.pk-own .field { width: 80px; height: 34px; padding: 0 10px; text-align: center; }
.pk-own small { color: var(--text-3); }
.ml-items.busy { opacity: .45; transition: opacity .15s; pointer-events: none; }

/* ---------- Заметки ---------- */
.nt-layout { display: grid; grid-template-columns: 210px minmax(240px, 320px) minmax(0, 1fr); gap: 14px; height: calc(100vh - 110px); min-height: 440px; padding-top: 6px; }
.nt-folders { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nt-folders a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 550; }
.nt-folders a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-folders a svg.i { width: 18px; height: 18px; flex: none; color: #e8a500; }
.nt-folders a em { font-style: normal; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); }
.nt-folders a:hover { background: var(--surface-2); color: var(--text); }
.nt-folders a.on { background: color-mix(in srgb, #ffcc00 22%, var(--surface-2)); color: var(--text); }
.nt-sec { margin: 12px 12px 4px; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.nt-addf { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; color: var(--text-3); font: inherit; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); cursor: pointer; border-radius: 10px; text-align: left; margin-bottom: 8px; }
.nt-addf:hover { color: var(--text); background: var(--surface-2); }
.nt-addf svg.i { width: 18px; height: 18px; }
.nt-list { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.nt-lh { display: flex; align-items: center; justify-content: space-between; }
.nt-lh h3 { margin: 0 4px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.nt-new svg.i { color: #e8a500; width: 22px; height: 22px; }
.nt-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; }
.nt-item + .nt-item { margin-top: 1px; }
.nt-item:hover { background: var(--surface-3); }
.nt-item.on { background: color-mix(in srgb, #ffcc00 28%, var(--surface)); }
.nt-item b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-meta { display: flex; gap: 8px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-3); min-width: 0; }
.nt-meta time { color: var(--text-2); flex: none; }
.nt-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.nt-meta svg.i { width: 13px; height: 13px; flex: none; }
.nt-edit { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.nt-bar { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.nt-bar .icon-btn { width: 34px; height: 34px; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.nt-bar .icon-btn svg.i { width: 18px; height: 18px; }
.nt-aa { height: 32px; padding: 0 12px; margin-right: 4px; }
.nt-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.nt-status { margin-left: auto; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); color: var(--text-3); padding: 0 8px; white-space: nowrap; }
.nt-date { text-align: center; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); color: var(--text-3); padding: 12px 0 0; }
.nt-body { flex: 1; padding: 10px 26px 60px; outline: none; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); line-height: 1.6; color: var(--text); overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.nt-body:empty::before { content: attr(data-ph); color: var(--text-3); }
.nt-body > :first-child { font-size: 1.65em; font-weight: 750; line-height: 1.25; letter-spacing: -.015em; margin-top: .3em; }
.nt-body h1 { font-size: 1.5em; margin: .6em 0 .2em; } .nt-body h2 { font-size: 1.2em; margin: .6em 0 .2em; }
.nt-body p, .nt-body div { margin: 0; }
.nt-body ul, .nt-body ol { margin: .2em 0; padding-left: 1.4em; }
.nt-body pre { font: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem)/1.5 ui-monospace, Menlo, monospace; background: var(--surface-3); padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; }
.nt-body img { max-width: 100%; border-radius: 12px; margin: 6px 0; display: block; }
.nt-body a { color: var(--c-blue); }
.nt-body ul.checklist { list-style: none; padding-left: .2em; }
.nt-body ul.checklist > li { position: relative; padding-left: 30px; }
.nt-body ul.checklist > li::before { content: ''; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--text-3); cursor: pointer; }
.nt-body ul.checklist > li[data-checked] { color: var(--text-3); text-decoration: line-through; }
.nt-body ul.checklist > li[data-checked]::before { background: #e8a500; box-shadow: none; }
.nt-body ul.checklist > li[data-checked]::after { content: ''; position: absolute; left: 6px; top: calc(.2em + 3px); width: 5px; height: 9px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.nt-del { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bad-soft); color: var(--text); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.nt-del span { flex: 1; } .nt-del svg.i { width: 18px; height: 18px; color: var(--bad); }
@media (max-width: 1000px) {
  .nt-layout { grid-template-columns: 1fr; height: auto; }
  .nt-folders { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
  .nt-folders a, .nt-addf { flex: none; }
  .nt-sec { display: none; }
  .nt-layout.reading .nt-folders, .nt-layout.reading .nt-list { display: none; }
  .nt-layout:not(.reading) .nt-edit { display: none; }
  .nt-edit { min-height: 70vh; }
  .nt-list { overflow: visible; }
  .nt-body { padding: 8px 16px 40px; }
}
/* заметки: включённые кнопки, таблицы, цитаты, маркер */
.nt-bar .icon-btn.on, .nt-bar .nt-aa.on { background: color-mix(in srgb, #ffcc00 30%, var(--surface-3)); color: var(--text); }
.nt-tbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, #ffcc00 8%, transparent); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-2); }
.nt-tbar > span { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.nt-tbar svg.i { width: 15px; height: 15px; }
.nt-tbar .btn { height: 28px; padding: 0 10px; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); }
.nt-tbar .btn.danger { color: var(--bad); }
.nt-body table { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: .95em; }
.nt-body td, .nt-body th { padding: 7px 10px; vertical-align: top; text-align: left; min-width: 60px; }
.nt-body table.t-plain td, .nt-body table.t-plain th { border-bottom: 1px solid var(--line); }
.nt-body table.t-grid td, .nt-body table.t-grid th { border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); }
.nt-body table.t-head th { background: color-mix(in srgb, #ffcc00 22%, var(--surface-3)); font-weight: 700; border: 1px solid var(--line); }
.nt-body table.t-head td { border: 1px solid var(--line); }
.nt-body table.t-zebra tbody tr:nth-child(odd) td { background: var(--surface-3); }
.nt-body table.t-zebra td { border: 0; }
.nt-body table.t-zebra tr td:first-child { border-radius: 8px 0 0 8px; } .nt-body table.t-zebra tr td:last-child { border-radius: 0 8px 8px 0; }
.nt-body table.t-cards { border-collapse: separate; border-spacing: 0 6px; }
.nt-body table.t-cards th { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
.nt-body table.t-cards td { background: var(--surface); box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.nt-body table.t-cards td:first-child { border-radius: 10px 0 0 10px; box-shadow: inset 1px 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.nt-body table.t-cards td:last-child { border-radius: 0 10px 10px 0; box-shadow: inset -1px 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.nt-body blockquote { margin: 8px 0; padding: 4px 0 4px 14px; border-left: 3px solid #e8a500; color: var(--text-2); }
.nt-body mark { background: color-mix(in srgb, #ffcc00 55%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.nt-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.nt-body > table:first-child { font-size: .95em; font-weight: 400; }
.nt-where svg.i { width: 12px; height: 12px; vertical-align: -1px; color: var(--ok); }
/* ---------- рисование ---------- */
.sk { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: #1c1c1e; color: #fff; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; }
.sk-top .btn.ghost { color: #ffcc00; }
.sk-mid { display: flex; align-items: center; gap: 4px; }
.sk-mid .icon-btn { color: #fff; }
.sk-mid .btn.ghost { color: #c8c8cc; }
.sk-stage { flex: 1; min-height: 0; display: grid; place-items: center; touch-action: none; }
.sk-stage canvas { background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); touch-action: none; cursor: crosshair; }
.sk-tools { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 10px 14px 14px; }
.sk-group { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 16px; background: rgba(255,255,255,.08); }
.sk-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; padding: 4px 0 2px; border: 0; background: none; color: #c8c8cc; font: inherit; cursor: pointer; border-radius: 10px; }
.sk-tool small { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); }
.sk-tool.on { color: #fff; background: rgba(255,255,255,.12); }
.sk-tip { display: block; width: 14px; height: 30px; border-radius: 7px 7px 3px 3px; background: linear-gradient(#f2f2f7 0 62%, #8e8e93 62%); transition: transform .15s; transform: translateY(6px); }
.sk-tool.on .sk-tip { transform: translateY(0); }
.sk-marker { width: 18px; background: linear-gradient(#ffd60a 0 30%, #f2f2f7 30% 70%, #8e8e93 70%); }
.sk-pencil { background: linear-gradient(#636366 0 18%, #ffcc00 18% 66%, #8e8e93 66%); }
.sk-eraser { background: linear-gradient(#ff8fa3 0 34%, #f2f2f7 34%); border-radius: 4px; }
.sk-color { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); position: relative; padding: 0; }
.sk-color.on { box-shadow: 0 0 0 2px #1c1c1e, 0 0 0 4px #fff; }
.sk-custom { --c: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); background: var(--c); overflow: hidden; display: inline-block; }
.sk-custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.sk-size { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.sk-size i { display: block; border-radius: 50%; background: #c8c8cc; }
.sk-size.on { background: rgba(255,255,255,.12); } .sk-size.on i { background: #fff; }
.nt-body img[alt="Рисунок"] { background: #fff; }
.nt-body img { cursor: pointer; }
@media (max-width: 600px) { .sk-tools { gap: 8px; } .sk-tool { width: 52px; } .sk-group { padding: 4px 6px; gap: 4px; } .sk-color { width: 24px; height: 24px; } }

/* рисование прямо на странице заметки */
.nt-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.nt-paper { position: relative; min-height: 100%; display: flex; flex-direction: column; }
.nt-ink { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; }
.nt-paper.drawing .nt-ink:not(.nt-ink-live) { pointer-events: auto; touch-action: none; cursor: crosshair; }
.nt-paper.drawing.pen-seen .nt-ink { touch-action: pan-y; }
.nt-paper.drawing .nt-body { user-select: none; -webkit-user-select: none; }
.nt-ink-live { z-index: 2; }
.nt-inkbar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 22px; background: rgba(28,28,30,.88); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 10px 40px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.1); color: #fff; width: max-content; max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; animation: inkbar-in .22s cubic-bezier(.2,.8,.2,1); }
.nt-inkbar .icon-btn { color: #fff; }
.nt-inkbar .sk-group { flex-shrink: 0; }
.nt-inkbar .sk-tool { width: 54px; }
.nt-inkbar .btn { flex-shrink: 0; }
.sk-color.sk-auto { background: linear-gradient(135deg, #f2f2f7 50%, #1c1c1e 50%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.sk-color.sk-auto.on { box-shadow: 0 0 0 2px #1c1c1e, 0 0 0 4px #fff; }
@keyframes inkbar-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (max-width: 1100px) { .nt-inkbar { gap: 6px; padding: 6px; border-radius: 18px; } .nt-inkbar .sk-tool { width: 40px; } .nt-inkbar .sk-tool small { display: none; } .nt-inkbar .sk-group { padding: 4px 6px; gap: 4px; } .nt-inkbar .sk-color { width: 24px; height: 24px; } .nt-inkbar .sk-size { width: 28px; height: 28px; } }
@media (max-width: 600px) { .nt-inkbar { position: fixed; left: 8px !important; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); transform: none; width: auto; max-width: none; animation: none; z-index: 60; } }
.nt-inkbar .icon-btn.ik-flip svg { transform: scaleX(-1); }
.nt-inkbar .icon-btn:active { background: rgba(255,255,255,.14); }
.ik-set { gap: 12px; padding: 6px 12px; }
.ik-dot { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; }
.ik-dot i { display: block; transition: width .12s, height .12s; }
.ik-range { display: flex; flex-direction: column; gap: 2px; min-width: 110px; cursor: pointer; }
.ik-range small { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); color: #c8c8cc; display: flex; justify-content: space-between; gap: 8px; }
.ik-range small b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.ik-range input { width: 100%; margin: 0; accent-color: #ffcc00; height: 18px; }
.ik-range[hidden], .ik-seg[hidden] { display: none !important; }
.ik-seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.08); }
.ik-seg button { border: 0; background: none; color: #c8c8cc; font: inherit; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.ik-seg button.on { background: rgba(255,255,255,.18); color: #fff; }
@media (max-width: 600px) { .ik-range { min-width: 90px; } .ik-set { gap: 8px; } }
/* размер текста */
.nt-size { width: auto; padding: 0 8px; gap: 1px; align-items: baseline; font-weight: 700; }
.nt-size span { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); } .nt-size b { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
/* фото в заметке: рамка, уголок и кнопки размера */
.nt-imgtool { position: absolute; z-index: 3; pointer-events: none; border-radius: 12px; box-shadow: 0 0 0 2px #ffcc00; margin-top: 0; }
.nt-paper.drawing .nt-imgtool { display: none; }
.nt-imgbar { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(28,28,30,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 20px rgba(0,0,0,.35); pointer-events: auto; white-space: nowrap; }
.nt-imgbar button { border: 0; background: none; color: #d1d1d6; font: inherit; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); font-weight: 600; padding: 6px 8px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.nt-imgbar button:hover { background: rgba(255,255,255,.1); color: #fff; }
.nt-imgbar button.on { background: #ffcc00; color: #1c1c1e; }
.nt-imgbar button svg.i { width: 16px; height: 16px; }
.nt-imgbar span { width: 1px; height: 18px; background: rgba(255,255,255,.18); margin: 0 3px; }
.nt-imgh { position: absolute; right: -7px; bottom: -7px; width: 18px; height: 18px; border-radius: 50%; background: #ffcc00; box-shadow: 0 0 0 3px var(--surface-2), 0 2px 8px rgba(0,0,0,.3); cursor: nwse-resize; pointer-events: auto; touch-action: none; }
.nt-bar .nt-size { display: inline-flex; flex-direction: row; justify-content: center; }
/* пароли: синхронизация, проверка, 2FA, перенос */
.pw-lh { gap: 6px; }
.pw-lh h3 { margin-right: auto; }
.pw-sync { display: flex; align-items: center; gap: 6px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); color: var(--text-3); margin: 2px 2px 8px; }
.pw-sync svg.i { width: 13px; height: 13px; color: var(--ok); flex-shrink: 0; }
.pw-check { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.pw-chip { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); font-weight: 600; background: var(--surface-3); color: var(--text-2); cursor: pointer; }
.pw-chip svg.i { width: 13px; height: 13px; }
.pw-chip.warn { color: var(--c-orange); }
.pw-chip.bad { color: var(--bad); }
.pw-chip.on { background: var(--text); color: var(--surface); }
.pw-item { position: relative; }
.pw-badge { margin-left: auto; font-size: clamp(0.625rem, calc(0.5607rem + 0.0714vw), 0.675rem); font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c-blue) 18%, transparent); color: var(--c-blue); flex-shrink: 0; }
.pw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-orange); flex-shrink: 0; margin-left: 6px; }
.pw-dot.bad { background: var(--bad); }
.pw-otp { font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); font-weight: 700; letter-spacing: .08em; color: var(--text); }
.pw-otp.soon { color: var(--bad); }
.pw-ring { --p: 1; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--c-blue) calc(var(--p) * 360deg), var(--surface-3) 0); margin-left: 8px; flex-shrink: 0; transition: background .3s; }
.pw-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c-orange) 12%, transparent); color: var(--text); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); }
.pw-warn.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pw-warn > svg.i { color: var(--c-orange); flex-shrink: 0; margin-top: 2px; } .pw-warn.bad > svg.i { color: var(--bad); }
.pw-warn p { margin: 0 0 6px; }
.pw-src { display: grid; gap: 8px; margin: 12px 0 4px; }
.pw-src div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.pw-src span { color: var(--text-2); }
/* PIN-код от паролей */
.pin-screen { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 340px; margin: 4vh auto 40px; padding: 0 16px; }
.pin-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, #3a3a3c, #1c1c1e); color: #ffcc00; box-shadow: 0 8px 24px rgba(0,0,0,.25); margin-bottom: 14px; }
.pin-ico svg.i { width: 30px; height: 30px; }
.pin-screen h2 { margin: 0 0 6px; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); }
.pin-sub { margin: 0 0 22px; color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); min-height: 2.6em; }
.pin-dots { display: flex; gap: 16px; margin-bottom: 10px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-2); transition: background .12s, transform .12s; }
.pin-dots i.on { background: var(--text); box-shadow: none; transform: scale(1.08); }
.pin-dots.shake { animation: pin-shake .42s; }
@keyframes pin-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-7px); } 80% { transform: translateX(4px); } }
.pin-err { min-height: 1.4em; margin: 4px 0 14px; color: var(--bad); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; margin-bottom: 18px; }
.pin-pad button { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--text); font: inherit; font-size: clamp(1.375rem, calc(1.2196rem + 0.6630vw), 1.96rem); font-weight: 500; cursor: pointer; display: grid; place-items: center; transition: background .1s, transform .08s; -webkit-tap-highlight-color: transparent; }
.pin-pad button:hover { background: color-mix(in srgb, var(--text) 14%, var(--surface-3)); }
.pin-pad button:active { transform: scale(.94); background: color-mix(in srgb, var(--text) 24%, var(--surface-3)); }
.pin-pad .pin-alt { background: none; font-size: clamp(1.1875rem, calc(1.058rem + 0.5525vw), 1.68rem); color: var(--text-2); }
.pin-pad .pin-alt svg.i { width: 30px; height: 30px; }
.pin-pad.off { opacity: .35; pointer-events: none; }
.pin-help { text-align: left; margin: 0 0 8px; padding-left: 20px; color: var(--text-2); }
.pin-help li { margin: 4px 0; }
@media (max-width: 400px) { .pin-pad { grid-template-columns: repeat(3, 64px); gap: 12px 18px; } .pin-pad button { width: 64px; height: 64px; } }
/* центр обновлений */
.upd-new { color: var(--c-blue); font-weight: 600; }
.upd-pill { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px; background: rgba(28,28,30,.92); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 10px 34px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.1); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); white-space: nowrap; animation: inkbar-in .25s cubic-bezier(.2,.8,.2,1); }
.upd-pill > svg.i { width: 17px; height: 17px; color: #64d2ff; }
.upd-wrap { max-width: 720px; display: grid; gap: 14px; }
.upd-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.upd-card.ready { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c-blue) 60%, transparent); }
.upd-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); flex-shrink: 0; }
.upd-card.ready .upd-ico { background: color-mix(in srgb, var(--c-blue) 16%, transparent); color: var(--c-blue); }
.upd-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.upd-main b { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); } .upd-main small { color: var(--text-2); }
.upd-auto { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.upd-auto > span { display: grid; gap: 3px; } .upd-auto small { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.upd-h { margin: 14px 0 0; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.upd-rel { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.upd-date { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.upd-rel h4 { margin: 4px 0 8px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.upd-rel ul { margin: 0; padding-left: 20px; display: grid; gap: 5px; color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
@media (max-width: 600px) { .upd-card { flex-wrap: wrap; } .upd-card .btn { width: 100%; justify-content: center; } }
/* расширение для браузера */
.ext-wrap { max-width: 760px; display: grid; gap: 14px; }
.ext-hero { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 20px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ext-hero img { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; }
.ext-hero h2 { margin: 0 0 4px; font-size: clamp(1.1875rem, calc(1.0654rem + 0.1357vw), 1.2825rem); } .ext-hero p { margin: 0; color: var(--text-2); }
.ext-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 640px) { .ext-feats { grid-template-columns: 1fr; } }
.ext-feats > div { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ext-feats svg.i { color: #e8a500; } .ext-feats small { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.ext-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.ext-steps li { padding-left: 4px; } .ext-steps li > * { display: block; } .ext-steps li .btn { display: inline-flex; margin-bottom: 4px; }
.ext-steps small { color: var(--text-2); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); margin-top: 2px; }
.ext-code { font: 600 clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem) ui-monospace, Menlo, monospace; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
.ext-list { display: grid; gap: 8px; }
.ext-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ext-item > span { flex: 1; display: grid; } .ext-item small { color: var(--text-2); }
.bk-h { margin: 6px 2px 6px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); } .bk-h ~ .bk-h { margin-top: 30px; }
.ext-br { align-items: flex-start; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #ffcc00 45%, transparent); }
.ext-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.ext-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c-green, #30d158); }
.ext-ok svg { width: 18px; height: 18px; }

/* ---------- Календарь ---------- */
.cal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; height: calc(100vh - 110px); min-height: 480px; padding-top: 6px; }
.cal-side { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding-right: 2px; }
.cal-new { width: 100%; justify-content: center; }
.cal-h { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 0 6px 6px; }
.cal-mini { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); padding: 10px; }
.cal-mini-h { margin: 2px 6px 8px; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.cal-mini-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-mini-g i { font-style: normal; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); color: var(--text-3); padding: 2px 0; }
.cal-mini-g button { border: 0; background: none; color: var(--text); font: inherit; font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); height: 28px; border-radius: 50%; cursor: pointer; position: relative; }
.cal-mini-g button:hover { background: var(--surface-2); }
.cal-mini-g button.out { color: var(--text-3); }
.cal-mini-g button.busy::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--text-3); }
.cal-mini-g button.sel { box-shadow: inset 0 0 0 1.5px var(--text); }
.cal-mini-g button.today { background: #ff3b30; color: #fff; font-weight: 700; }
.cal-cals { display: flex; flex-direction: column; gap: 2px; }
.cal-k { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.cal-k:hover { background: var(--surface-2); }
.cal-k input { appearance: none; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--k); margin: 0; flex: none; cursor: pointer; }
.cal-k input:checked { background: var(--k); }
.cal-k span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.cal-more { border: 0; background: none; color: var(--text-3); cursor: pointer; border-radius: 6px; padding: 0 6px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); opacity: 0; }
.cal-k:hover .cal-more { opacity: 1; }
.cal-link { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); padding: 6px 8px; border-radius: 10px; cursor: pointer; text-decoration: none; text-align: left; }
.cal-link:hover { background: var(--surface-2); color: var(--text); }
.cal-link svg { width: 16px; height: 16px; flex: none; }
.cal-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cal-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-arrows { display: flex; gap: 4px; }
.cal-title { flex: 1; margin: 0; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-views { display: flex; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.cal-views button { border: 0; background: none; color: var(--text-2); font: inherit; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.cal-views button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.cal-new-m { display: none; }
.cal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* месяц */
.cal-month { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
.cal-mh { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-mh div { padding: 8px 10px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; color: var(--text-3); text-align: right; }
.cal-mg { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, minmax(0, 1fr)); }
.cal-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: hidden; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: var(--surface-2); }
.cal-cell.out .cal-dn { color: var(--text-3); }
.cal-dn { align-self: flex-end; border: 0; background: none; color: var(--text); font: inherit; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; flex: none; }
.cal-dn:hover { background: var(--surface-3); }
.cal-cell.today .cal-dn { background: #ff3b30; color: #fff; }
.cal-chip { display: block; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); text-align: left; padding: 2px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; padding-left: 12px; flex: none; }
.cal-chip::before { content: ''; position: absolute; left: 4px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--k); }
.cal-chip b { font-weight: 600; color: var(--text-2); }
.cal-chip.ad { background: color-mix(in srgb, var(--k) 22%, transparent); padding-left: 6px; font-weight: 600; }
.cal-chip.ad::before { display: none; }
.cal-chip:hover { background: var(--surface-3); }
.cal-moreev { border: 0; background: none; color: var(--text-3); font: inherit; font-size: clamp(0.7188rem, calc(0.6448rem + 0.0821vw), 0.7763rem); text-align: left; padding: 0 6px; cursor: pointer; }
/* неделя и день */
.cal-tv { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
.cal-tvh, .cal-allday { display: grid; grid-template-columns: 56px repeat(var(--n), 1fr); border-bottom: 1px solid var(--line); }
.cal-tvh button { border: 0; background: none; color: var(--text); font: inherit; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.cal-tvh small { color: var(--text-3); font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); font-weight: 700; }
.cal-tvh b { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.cal-tvh button.today b { background: #ff3b30; color: #fff; }
.cal-allday > div { padding: 3px; min-height: 26px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.cal-allday > div:first-child { border-left: 0; font-size: clamp(0.6562rem, calc(0.5887rem + 0.0750vw), 0.7087rem); color: var(--text-3); align-items: flex-end; justify-content: center; padding-right: 6px; }
.cal-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 56px repeat(var(--n), 1fr); position: relative; }
.cal-hours div { height: 48px; position: relative; }
.cal-hours span { position: absolute; right: 6px; top: -7px; font-size: clamp(0.6562rem, calc(0.5887rem + 0.0750vw), 0.7087rem); color: var(--text-3); }
.cal-day { position: relative; border-left: 1px solid var(--line); }
.cal-day.today { background: color-mix(in srgb, #ff3b30 4%, transparent); }
.cal-slot { height: 48px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cal-slot:hover { background: var(--surface-2); }
.cal-ev { position: absolute; border: 0; border-radius: 7px; padding: 3px 6px; text-align: left; font: inherit; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); cursor: pointer; overflow: hidden; background: color-mix(in srgb, var(--k) 20%, var(--surface)); color: var(--text); box-shadow: inset 3px 0 0 var(--k); display: flex; flex-direction: column; gap: 1px; }
.cal-ev:hover { background: color-mix(in srgb, var(--k) 30%, var(--surface)); }
.cal-ev b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev small { color: var(--text-2); font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-now { position: absolute; left: -4px; right: 0; height: 2px; background: #ff3b30; pointer-events: none; z-index: 2; }
.cal-now::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; }
/* список */
.cal-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.cal-lday { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.cal-ld { display: flex; flex-direction: column; padding-top: 8px; }
.cal-ld small { color: var(--text-3); }
.cal-lday > div:last-child { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
.cal-li { display: flex; align-items: baseline; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; padding: 11px 14px; cursor: pointer; }
.cal-li:first-child { border-top: 0; }
.cal-li:hover { background: var(--surface-2); }
.cal-lt { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); min-width: 96px; font-variant-numeric: tabular-nums; }
.cal-li b { font-weight: 600; }
.cal-li small { color: var(--text-3); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--k); flex: none; align-self: center; }
/* окно события */
.cal-card h2 { display: flex; align-items: center; gap: 10px; }
.cal-when { font-weight: 600; margin: 0 0 10px; }
.cal-meta { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin: 6px 0; }
.cal-meta svg { width: 16px; height: 16px; flex: none; }
.cal-notes { white-space: normal; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
.cal-form { display: flex; flex-direction: column; gap: 10px; }
.cal-ttl { font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); font-weight: 600; }
.cal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-row > span:first-child { width: 90px; color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.cal-row .field { flex: 1; min-width: 120px; }
.cal-row [hidden], .cal-row[hidden] { display: none !important; }
.cal-sw { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.cal-hint { color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); }
.cal-unit { color: var(--text-2); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.cal-wd { display: flex; gap: 4px; flex-wrap: wrap; }
.cal-wd label input { display: none; }
.cal-wd label span { display: grid; place-items: center; width: 34px; height: 30px; border-radius: 8px; background: var(--surface-2); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 600; cursor: pointer; }
.cal-wd label input:checked + span { background: var(--accent); color: var(--on-accent); }
.cal-colors { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.cal-colors input { display: none; }
.cal-colors span { display: block; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.cal-colors input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
@media (max-width: 900px) {
  .cal { grid-template-columns: 1fr; height: auto; }
  .cal-side { display: none; }
  .cal-new-m { display: inline-flex; }
  .cal-title { font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); order: -1; flex-basis: 100%; }
  .cal-month { min-height: 520px; }
  .cal-tv { min-height: 70vh; }
  .cal-lday { grid-template-columns: 1fr; gap: 4px; }
  .cal-ld { flex-direction: row; gap: 8px; align-items: baseline; padding: 0 4px; }
}
/* ---------- боковая панель Браузера Relikt (?panel=1) ---------- */
body.panel .panel-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
body.panel .panel-seg { flex: 1; display: flex; padding: 3px; border-radius: 11px; background: var(--surface-2); }
body.panel .panel-seg a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); text-decoration: none; }
body.panel .panel-seg a svg { width: 15px; height: 15px; }
body.panel .panel-seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
body.panel .content { padding: 4px 10px 16px; }
body.panel .cal-title { font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); }
.cal-where { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); margin: -6px 6px 0; }
.cal-where:empty { display: none; }
.cal-where svg { width: 14px; height: 14px; flex: none; }

/* ---------- витрина для новых людей (до входа) ---------- */
.land { max-width: 1140px; margin: 0 auto; padding: 0 20px 40px; }
.land-nav { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 16px; padding: 12px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); }
.land-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: clamp(1.1875rem, calc(1.0654rem + 0.1357vw), 1.2825rem); color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.land-nav nav { flex: 1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.land-nav nav a { padding: 6px 11px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); font-weight: 550; white-space: nowrap; }
.land-nav nav a:hover { background: var(--surface); color: var(--text); }
.land-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 50px 0 40px; }
.land-hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.04em; margin: 0 0 18px; }
.land-lead { font-size: clamp(17px, 1.9vw, 20px); color: var(--text-2); line-height: 1.55; margin: 0 0 20px; max-width: 32em; }
.land-pts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.land-pts li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.land-pts svg { width: 20px; height: 20px; color: var(--ok); flex: none; }
.land-hero .device-strip { justify-content: flex-start; margin: 0; }
.land-login { min-height: 0; padding: 0; background: none; display: block; }
.land-login .box { margin: 0; max-width: none; transition: box-shadow .3s; }
.land-login .box h2 { margin: 6px 0 4px; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem); }
.land-login.pulse .box { box-shadow: 0 0 0 4px #ffcc00, var(--shadow-lg); }
.land h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; margin: 0 0 18px; }
.land-steps, .land-feat, .land-safe, .land-faq { padding: 40px 0; }
.land-steps-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.land-steps-g > div { background: var(--surface); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.land-steps-g b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ffcc00; color: #111; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); margin-bottom: 12px; }
.land-steps-g svg { width: 28px; height: 28px; color: var(--text); margin-bottom: 10px; }
.land-steps-g h3 { margin: 0 0 6px; font-size: clamp(1.125rem, calc(1.0093rem + 0.1286vw), 1.215rem); }
.land-steps-g p { margin: 0; color: var(--text-2); font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); line-height: 1.55; }
.land-feat-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.land-feat-g a { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 20px; padding: 20px; color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); transition: transform .15s; }
.land-feat-g a:hover { transform: translateY(-2px); }
.land-feat-g a.land-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
.land-feat-g a.land-wide .land-ico { grid-row: span 2; }
.land-ico { width: 52px; height: 52px; display: block; margin-bottom: 6px; }
.land-ico svg, .land-ico img { width: 52px; height: 52px; display: block; border-radius: 12px; }
.land-feat-g b { font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); }
.land-feat-g p { margin: 0; color: var(--text-2); font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); line-height: 1.5; }
.land-shot img { width: 100%; border-radius: 22px; box-shadow: var(--shadow-lg); display: block; }
.land-faq details { background: var(--surface); border-radius: 16px; padding: 2px 20px; margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--line); max-width: 780px; }
.land-faq summary { cursor: pointer; font-weight: 650; padding: 14px 0; }
.land-faq details p { margin: 0 0 16px; color: var(--text-2); }
.land-end { text-align: center; padding: 56px 20px; margin: 20px 0; background: var(--surface); border-radius: 28px; box-shadow: inset 0 0 0 1px var(--line); }
.land-end p { color: var(--text-2); margin: -6px 0 22px; }
.land-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 20px 0; color: var(--text-3); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.land-foot a { color: inherit; text-decoration: none; }
.land-foot a:hover { color: var(--text); }
@media (max-width: 860px) {
  .land-nav nav { display: none; }
  .land-nav { justify-content: space-between; }
  .land-hero { grid-template-columns: 1fr; padding-top: 24px; gap: 26px; }
  .land-steps-g, .land-feat-g { grid-template-columns: 1fr; }
}
/* раздел «Браузер и расширение»: браузер — крупно, как страница Chrome */
.brx { text-align: center; background: radial-gradient(closest-side at 50% 0%, rgba(255,204,0,.12), transparent 75%), var(--surface); border-radius: 26px; padding: 40px 28px 28px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); margin-bottom: 26px; }
.brx-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px 5px 6px; border-radius: 999px; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); font-weight: 600; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.brx-pill img { width: 20px; height: 20px; border-radius: 6px; }
.brx h2 em { font-style: normal; background: linear-gradient(100deg, #ffd23f, #ffb300 45%, #ff9f0a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brx-dl { background: #ffcc00; color: #111; border-color: transparent; box-shadow: 0 10px 30px rgba(255,204,0,.3); }
.brx-dl:hover { background: #ffd633; }
.brx h2 { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -.045em; line-height: 1.04; margin: 0 auto 10px; max-width: 16em; }
.brx > p { color: var(--text-2); max-width: 36em; margin: 0 auto 20px; line-height: 1.55; }
.brx-acts { display: flex; justify-content: center; margin-bottom: 10px; }
.brx-links { display: flex; justify-content: center; gap: 18px; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); margin-bottom: 24px; }
.brx-links a { color: var(--text-2); }
.brx-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: left; }
.brx-feats div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.brx-feats svg { grid-row: span 2; width: 22px; height: 22px; color: #e8a500; }
.brx-feats b { font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); }
.brx-feats span { color: var(--text-3); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); }
.brx-eds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 4px 0 30px; }
.brx-ed { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: radial-gradient(closest-side at 20% 0%, color-mix(in srgb, var(--ec) 16%, transparent), transparent 80%), var(--surface); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.brx-ed img { border-radius: 12px; margin-bottom: 4px; }
.brx-tag { font-size: clamp(0.7188rem, calc(0.6448rem + 0.0821vw), 0.7763rem); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ec); }
.brx-ed h4 { margin: 0; font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); letter-spacing: -.01em; }
.brx-ed p { margin: 0 0 8px; color: var(--text-2); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); line-height: 1.45; flex: 1; }
.brx-edl { margin-top: auto; }
/* по четыре карточки — всегда ровно: в ряд, если колонка широкая, иначе два на два (без одинокой последней) */
.ext-wrap { container-type: inline-size; }
@container (min-width: 1000px) { .brx-eds, .brx-feats { grid-template-columns: repeat(4, 1fr); } }
@container (max-width: 520px) { .brx-eds, .brx-feats { grid-template-columns: 1fr; } }

/* запасной режим: главный сервер дома недоступен — плашка сверху */
.reserve-bar { position: sticky; top: 0; z-index: 1000; padding: 9px 16px; background: #ffcc00; color: #1c1c1e; font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); font-weight: 600; text-align: center; line-height: 1.35; }

/* ---------- Ассистент (свой ИИ через OpenRouter) ---------- */
.ai { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100dvh - 140px); padding: 8px 4px 0; }
.ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-head h1 { display: flex; align-items: center; gap: 10px; font-size: clamp(1.1875rem, calc(1.058rem + 0.5525vw), 1.68rem); margin: 0; flex: 1; }
.ai-head h1 svg { width: 24px; height: 24px; color: var(--c-purple); }
.ai-model { max-width: 46%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 6px; }
.ai-free { font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); padding: 2px 7px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.ai-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 2px 16px; }
.ai-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); animation: aiIn .18s ease-out; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin-bottom: 0; } .ai-msg ul { margin: 4px 0 6px; padding-left: 20px; } .ai-msg li { margin: 2px 0; }
.ai-msg code { font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); padding: 1px 5px; border-radius: 5px; background: var(--surface-3); }
.ai-msg a { color: var(--c-blue); text-decoration: none; font-weight: 500; } .ai-msg a:hover { text-decoration: underline; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
@keyframes aiIn { from { opacity: 0; transform: translateY(4px); } }
.ai-tool { color: var(--text-3); display: flex; align-items: center; gap: 6px; font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); } .ai-tool svg { width: 14px; height: 14px; }
.ai-err { color: var(--bad); }
.ai-dots { display: inline-flex; gap: 4px; padding: 4px 0; } .ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: aiDot 1s infinite ease-in-out; } .ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-empty { margin: auto; text-align: center; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ai-empty > svg { width: 38px; height: 38px; color: var(--c-purple); } .ai-empty b { font-size: clamp(1.125rem, calc(1.0732rem + 0.2210vw), 1.4rem); color: var(--text); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; margin-top: 6px; }
.ai-chips .chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); cursor: pointer; } .ai-chips .chip:hover { background: var(--surface-2); }
.ai-input { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ai-input textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); line-height: 1.45; padding: 7px 8px; max-height: 200px; }
.ai-send { width: 40px; height: 40px; border-radius: 12px; padding: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border: 0; flex-shrink: 0; }
.ai-note { font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); color: var(--text-3); text-align: center; margin: 8px 0 4px; }
.ai-connect { height: auto; align-items: center; text-align: center; padding-top: 30px; gap: 18px; }
.ai-hero > svg { width: 52px; height: 52px; color: var(--c-purple); } .ai-hero h1 { font-size: clamp(1.375rem, calc(1.2196rem + 0.6630vw), 1.96rem); margin: 10px 0 6px; } .ai-hero p { color: var(--text-2); max-width: 560px; margin: 0 auto; line-height: 1.55; }
.ai-big { height: 50px; padding: 0 24px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); display: inline-flex; align-items: center; gap: 8px; }
.ai-points { list-style: none; padding: 0; margin: 0; text-align: left; max-width: 560px; display: grid; gap: 10px; } .ai-points li { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); } .ai-points b { color: var(--text); }
.ai-opt { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 18px; cursor: pointer; } .ai-opt small { display: block; color: var(--text-3); margin-top: 2px; }
.ai-msearch { width: 100%; margin: 4px 0 10px; }
.ai-mlist { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ai-mh { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); margin: 10px 4px 4px; }
.ai-mrow { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--text); } .ai-mrow:hover { background: var(--surface-2); } .ai-mrow.on { background: var(--accent-soft); } .ai-mrow b { display: block; font-weight: 600; font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); } .ai-mrow small { color: var(--text-3); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); }
@media (max-width: 760px) { .ai { height: calc(100dvh - 120px); } .ai-msg { max-width: 94%; } .ai-head { flex-wrap: wrap; } .ai-head h1 { font-size: clamp(1.125rem, calc(1.0473rem + 0.3315vw), 1.47rem); } .ai-model { order: 3; max-width: 100%; width: 100%; justify-content: space-between; } .ai-top { display: none !important; } }

.ai-guide { max-width: 560px; width: 100%; text-align: left; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); line-height: 1.55; }
.ai-guide summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.ai-guide ol { margin: 12px 0 6px; padding-left: 20px; display: grid; gap: 10px; } .ai-guide ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; } .ai-guide b { color: var(--text); }
.ai-guide code { font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text); }
.ai-guide-n { margin: 10px 0 0; color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.ai-done { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 10px; } .ai-done h1 { margin: 10px 0 0; font-size: clamp(1.25rem, calc(1.0946rem + 0.6630vw), 1.82rem); } .ai-done p { color: var(--text-2); max-width: 420px; line-height: 1.55; }

.ai-card { max-width: 560px; width: 100%; text-align: left; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); line-height: 1.55; }
.ai-card.rec { border-color: color-mix(in srgb, var(--c-purple) 45%, var(--line)); }
.ai-card p { margin: 8px 0; } .ai-card summary { cursor: pointer; color: var(--text); } .ai-card .ai-big { margin: 8px 0; } .ai-card .ai-guide { margin: 8px 0; }
.ai-card-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; } .ai-card-h b { font-size: clamp(1.0625rem, calc(0.9532rem + 0.1214vw), 1.1475rem); color: var(--text); }
.ai-steps { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; } .ai-steps b { color: var(--text); } .ai-steps code, .ai-card code { font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text); }
.ai-keyrow { display: flex; gap: 8px; margin: 10px 0 4px; } .ai-keyrow input { flex: 1; min-width: 0; }
.ai-upbtn { margin-top: 8px; }

.ai-sub { font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); font-weight: 600; color: var(--text-2); margin: 10px 0 -6px; text-transform: none; }

.nt-ai-out { max-height: 50vh; overflow-y: auto; white-space: pre-wrap; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.55; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); margin: 8px 0 4px; } .nt-ai-out .err { color: var(--bad); } .nt-ai { color: var(--c-purple); }

.ai-confirm { border-color: color-mix(in srgb, var(--c-purple) 45%, var(--line)) !important; } .ai-confirm p svg { width: 15px; height: 15px; color: var(--c-purple); vertical-align: -2px; } .ai-cbtn { display: flex; gap: 8px; margin-top: 8px; } .ai-cbtn small { color: var(--text-3); }

.ai-can { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; text-align: left; max-width: 560px; margin: 6px 0 4px; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); color: var(--text-2); } .ai-can div { display: flex; gap: 8px; align-items: flex-start; } .ai-can svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--c-purple); } .ai-can b { color: var(--text); font-weight: 600; } .ai-hint { color: var(--text-3); font-size: clamp(0.7812rem, calc(0.7009rem + 0.0893vw), 0.8438rem); margin-top: 4px; } .ai-hint a { color: var(--c-blue); }
@media (max-width: 760px) { .ai-can { grid-template-columns: 1fr; } }

/* ---- Ассистент: история разговоров и оформление как у Claude ---- */
.ai-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; height: calc(100dvh - 140px); max-width: 1180px; margin: 0 auto; }
.ai-wrap .ai { height: 100%; width: 100%; max-width: 800px; }
.ai-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 8px 0; }
.ai-new { justify-content: flex-start; gap: 8px; display: flex; align-items: center; width: 100%; } .ai-new svg { width: 16px; height: 16px; }
.ai-hist { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; padding: 0 4px; }
.ai-hist-h { font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); font-weight: 600; color: var(--text-3); margin: 12px 10px 4px; }
.ai-hist-i { display: flex; align-items: center; gap: 4px; padding: 7px 6px 7px 10px; border-radius: 9px; cursor: pointer; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); color: var(--text-2); }
.ai-hist-i span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ai-hist-i:hover { background: var(--surface-2); color: var(--text); } .ai-hist-i.on { background: var(--surface-2); color: var(--text); font-weight: 500; }
.ai-hist-x { border: 0; background: none; color: var(--text-3); padding: 3px; border-radius: 6px; cursor: pointer; opacity: 0; display: grid; place-items: center; } .ai-hist-x svg { width: 15px; height: 15px; }
.ai-hist-i:hover .ai-hist-x, .ai-hist-i.on .ai-hist-x { opacity: 1; } .ai-hist-x:hover { color: var(--bad); background: var(--surface-3); }
.ai-hist-empty { color: var(--text-3); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); padding: 8px 10px; }
.ai-sidebtn { display: none; }
.ai-scrim { display: none; }
.ai-head h1 span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.ai-head h1 { min-width: 0; font-size: clamp(1.1875rem, calc(1.0654rem + 0.1357vw), 1.2825rem); }
.ai-wrap .ai-msg.bot { background: none; border: 0; padding: 2px 0; max-width: 100%; align-self: stretch; font-size: clamp(0.9688rem, calc(0.8691rem + 0.1107vw), 1.0463rem); line-height: 1.65; }
.ai-wrap .ai-msg.user { background: var(--surface-2); color: var(--text); border-radius: 18px; padding: 10px 16px; max-width: 80%; }
.ai-msg h3, .ai-msg h4 { margin: 14px 0 6px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); } .ai-msg h3:first-child, .ai-msg h4:first-child { margin-top: 0; }
.ai-msg ol { margin: 4px 0 8px; padding-left: 22px; } .ai-msg hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.ai-msg blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid var(--border); color: var(--text-2); }
.ai-code { margin: 8px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); line-height: 1.5; } .ai-code code { background: none; padding: 0; white-space: pre; }
.ai-table { overflow-x: auto; margin: 8px 0; } .ai-table table { border-collapse: collapse; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); min-width: 60%; } .ai-table th, .ai-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; } .ai-table th { background: var(--surface-2); font-weight: 600; }
.ai-acts { display: flex; gap: 2px; margin: -6px 0 2px; } .ai-acts button { border: 0; background: none; color: var(--text-3); padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; } .ai-acts button:hover { background: var(--surface-2); color: var(--text); } .ai-acts svg { width: 16px; height: 16px; }
.ai-run { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: clamp(0.8438rem, calc(0.757rem + 0.0964vw), 0.9113rem); color: var(--text-3); width: fit-content; }
.ai-run div { display: flex; align-items: center; gap: 8px; } .ai-run div.done { color: var(--text-3); } .ai-run div:not(.done) { color: var(--text-2); } .ai-run svg { width: 14px; height: 14px; color: var(--ok); }
.ai-plus { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--text-2); font-size: 24px; line-height: 1; cursor: pointer; align-self: flex-end; }
.ai-plus:hover { background: var(--line); color: var(--text); }
.ai-lim { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; cursor: pointer; align-self: center; padding: 0; }
.ai-lim[hidden], .ai-att[hidden] { display: none; }
.ai-att { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.ai-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 6px 4px 8px; border-radius: 10px; background: var(--surface, rgba(255,255,255,.05)); border: 1px solid var(--line); font-size: .85rem; }
.ai-chip b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; } .ai-chip svg { width: 16px; height: 16px; flex: none; }
.ai-chip button { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 16px; padding: 0 2px; }
.ai-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .ai-files img { max-width: 180px; max-height: 140px; border-radius: 10px; object-fit: cover; }
.ai-files span { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; opacity: .85; } .ai-files svg { width: 14px; height: 14px; }
.ai-run em { font-style: normal; color: var(--text-3); }
.ai-wait { display: flex; align-items: center; gap: 8px; }
.ai-wait i { font-style: normal; color: var(--text-3); margin-left: 4px; }
/* переливающийся текст «Размышляю…», пока модель думает */
.ai-shim { background: linear-gradient(90deg, var(--text-3) 0%, var(--text-3) 35%, var(--c-purple) 50%, var(--text-3) 65%, var(--text-3) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: aiShim 2.2s linear infinite; }
.ai-shim i { -webkit-text-fill-color: var(--text-3); }
@keyframes aiShim { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-shim { animation: none; color: var(--text-2); background: none; } }
.ai-thought { margin: 0 0 4px; } .ai-thought summary { cursor: pointer; color: var(--text-3); }
.ai-thought div { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line); white-space: pre-wrap; color: var(--text-3); font-style: italic; max-height: 180px; overflow-y: auto; }
.ai-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--c-purple); animation: aiSpin .8s linear infinite; flex: none; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-wrap .ai-input { border-radius: 22px; padding: 10px 10px 10px 14px; }
.ai-wrap .ai-send { border-radius: 50%; width: 36px; height: 36px; }
.ai-note a { color: var(--text-3); text-decoration: underline; }
@media (max-width: 900px) {
  .ai-wrap { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 120px); }
  .ai-sidebtn { display: grid; }
  .ai-side { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: min(300px, 84vw); background: var(--bg); border-right: 1px solid var(--line); padding: 16px 12px; transform: translateX(-102%); transition: transform .22s ease; }
  .ai-wrap.side-open .ai-side { transform: none; box-shadow: var(--shadow-lg, 0 10px 40px rgba(0,0,0,.3)); }
  .ai-wrap.side-open .ai-scrim { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.35); }
  .ai-wrap .ai-msg.user { max-width: 90%; }
}

/* ---------- единая страница входа и регистрации (как у Google): /signin, /ext, /app-login, /link ---------- */
.acc { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.acc-card { width: 100%; max-width: 1000px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 40px 34px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); animation: acc-in .35s ease both; }
@keyframes acc-in { from { opacity: 0; transform: translateY(8px); } }
.acc-logo { width: 48px; height: 48px; border-radius: 12px; display: block; margin-bottom: 20px; }
.acc-l h1 { font-size: clamp(1.9375rem, calc(1.7044rem + 0.9945vw), 2.8rem); line-height: 1.12; font-weight: 500; letter-spacing: -.02em; margin: 0 0 14px; }
.acc-l p { color: var(--text-2); font-size: clamp(1.0312rem, calc(0.9252rem + 0.1179vw), 1.1138rem); margin: 0; }
.acc-l .done-check { margin: 0 0 18px; }
.acc-r { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-top: 8px; }
.acc-r .gbtn { justify-content: flex-start; }
.acc-r .bio-btn { margin: 0; max-width: 300px; }
.acc-r .big-pin { text-align: left; }
.acc-r .link-card { margin: 0; }
.acc-pts { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 10px; }
.acc-pts li { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.acc-pts svg.i { width: 18px; height: 18px; color: var(--ok); flex: none; }
.acc-note { color: var(--text-3); font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); margin: 4px 0 0; }
.acc-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.acc-chip { display: flex; align-items: center; gap: 12px; align-self: flex-start; padding: 6px 16px 6px 6px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--border, rgba(127,127,127,.25)); }
.acc-chip img, .acc-chip > span { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.acc-chip > span { display: grid; place-items: center; background: linear-gradient(145deg, #5AB0FF, #1F6BFF); color: #fff; font-weight: 700; }
.acc-chip b { display: block; font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); line-height: 1.2; } .acc-chip small { color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); }
.acc-foot { width: 100%; max-width: 1000px; display: flex; gap: 22px; padding: 14px 6px 0; font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); color: var(--text-3); }
.acc-foot span { margin-right: auto; }
.acc-foot a { color: inherit; text-decoration: none; } .acc-foot a:hover { color: var(--text); }
@media (max-width: 760px) {
  .acc { justify-content: flex-start; padding-top: 32px; }
  .acc-card { grid-template-columns: 1fr; gap: 26px; padding: 28px 22px 24px; }
  .acc-l h1 { font-size: clamp(1.5625rem, calc(1.3812rem + 0.7735vw), 2.24rem); }
  .acc-foot { flex-wrap: wrap; gap: 14px; }
}
.acc-form { display: flex; flex-direction: column; gap: 10px; }
.acc-form .field { height: 50px; font-size: clamp(1rem, calc(0.8971rem + 0.1143vw), 1.08rem); border-radius: 12px; }
.acc-form .btn.lg { width: 100%; }
.acc-show { display: flex; align-items: center; gap: 8px; font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); color: var(--text-2); cursor: pointer; margin: -2px 0 4px; }
.acc-code { text-align: center; font-size: clamp(1.125rem, calc(1.0214rem + 0.4420vw), 1.54rem) !important; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.acc-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: clamp(0.8125rem, calc(0.7289rem + 0.0929vw), 0.8775rem); margin: 6px 0 2px; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
/* окно «Пароль и 2FA» */
.sec-block { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 0; border-top: 1px solid var(--border); }
.sec-block p { margin: 0; color: var(--text-2); font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); }
.sec-block .acc-form { align-self: stretch; }
.sec-block .acc-form .field { height: 44px; font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); }
.sec-on { margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: clamp(0.75rem, calc(0.6729rem + 0.0857vw), 0.81rem); background: var(--ok-soft); color: var(--ok); }
#secTf { align-self: stretch; display: flex; flex-direction: column; gap: 10px; }
#secTf:empty { display: none; }
.sec-steps { margin: 0; padding-left: 20px; color: var(--text-2); font-size: clamp(0.9062rem, calc(0.813rem + 0.1036vw), 0.9788rem); }
.sec-key { font-size: clamp(0.875rem, calc(0.785rem + 0.1000vw), 0.945rem); letter-spacing: .05em; user-select: all; }
.sec-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.sec-codes code { font-size: clamp(0.9375rem, calc(0.8411rem + 0.1071vw), 1.0125rem); letter-spacing: .06em; }
/* нейросеть на этом компьютере */
.llm-row { align-items: flex-start; }
.llm-row .pc-main b { margin-right: 6px; }
.llm-row .pc-main .tag { margin: 0 4px 2px 0; padding: 2px 8px; font-size: clamp(0.6875rem, calc(0.6168rem + 0.0786vw), 0.7425rem); }
.llm-row .pc-main small { white-space: normal; }
.llm-fit { display: flex !important; align-items: flex-start; gap: 6px; margin-top: 6px !important; }
.llm-fit svg.i { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.llm-fit.ok { color: var(--ok) !important; }
.llm-fit.slow { color: var(--warn) !important; }
.llm-fit.weak { color: var(--bad) !important; }
.llm-row .pbar { margin-top: 6px; }
.llm-hw { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.llm-hw svg.i { width: 16px; height: 16px; flex: none; }
@media (max-width: 600px) { .llm-row { flex-wrap: wrap; } .llm-row .pc-acts { width: 100%; justify-content: flex-end; } }
.ai-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Телефоны и планшеты: в полях ввода текст не мельче 16 пикселей — иначе iPhone сам увеличивает страницу при нажатии на поле.
   Крупные поля (PIN-код) остаются крупными. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.pin-input), textarea, select { font-size: max(1rem, 16px) !important; }
}

/* Шифрование (#/e2) */
.e2-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2, inherit); }
.e2-key { font: 600 clamp(15px, 3.4vw, 19px)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); word-break: break-all; user-select: all; }
.e2-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.e2-check { display: flex; flex-wrap: wrap; gap: 10px; }
.e2-in { height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: inherit; font: 600 15px ui-monospace, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; width: 150px; }
.e2-in.wide { width: 100%; max-width: 420px; margin: 8px 0; display: block; }
.e2-in:focus { outline: 2px solid var(--accent, #4a90ff); }
.e2-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.e2-bar i { display: block; height: 100%; background: var(--ok, #34c759); border-radius: 99px; transition: width .25s; }
.e2-dev { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.e2-dev small { color: var(--text-3, #8a8a93); }
.e2-qr { width: 170px; margin: 10px 0; padding: 8px; background: #fff; border-radius: 12px; } .e2-qr svg { width: 100%; height: auto; display: block; }
.e2-note { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.e2-wrap .upd-card { align-items: flex-start; } .e2-wrap .upd-main { display: grid; gap: 4px; min-width: 0; flex: 1; }

/* ---------- «Деплои» ---------- */
.dp-wrap { display: grid; gap: 14px; max-width: 880px; padding: 4px 4px 40px; }
.dp-list { display: grid; gap: 8px; }
.dp-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; }
.dp-item:hover { background: var(--surface-3); }
.dp-item .dp-main { flex: 1; min-width: 0; }
.dp-item small, .dp-top small { display: block; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.dp-item > svg.i { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.dp-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78em; font-weight: 600; vertical-align: middle; background: var(--surface-3); color: var(--text-2); }
.dp-green { background: color-mix(in srgb, var(--c-green) 18%, transparent); color: var(--c-green); }
.dp-blue { background: color-mix(in srgb, var(--c-blue) 18%, transparent); color: var(--c-blue); }
.dp-orange { background: color-mix(in srgb, var(--c-orange) 18%, transparent); color: var(--c-orange); }
.dp-red { background: color-mix(in srgb, var(--c-red, #e5484d) 18%, transparent); color: var(--c-red, #e5484d); }
.dp-top h2 { margin: 0 0 4px; }
.dp-url { display: block; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.dp-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.dp-tab { border: 0; border-radius: 99px; padding: 8px 14px; background: var(--surface-2); color: var(--text-2); font: inherit; cursor: pointer; }
.dp-tab.on { background: var(--surface-3); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--accent); }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.dp-grid > div { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.dp-grid small { display: block; color: var(--text-3); } .dp-grid b { overflow-wrap: anywhere; } .dp-grid em { font-style: normal; color: var(--text-3); font-weight: 400; }
.dp-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dp-form { display: grid; gap: 12px; } .dp-form label { display: grid; gap: 6px; font-weight: 500; } .dp-form label small { font-weight: 400; color: var(--text-3); }
.dp-form .dp-chk { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.dp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 600px) { .dp-row { grid-template-columns: 1fr; } }
.dp-src { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; } .dp-src label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.dp-log { margin: 0; padding: 12px 14px; max-height: 420px; overflow: auto; border-radius: 14px; background: #101216; color: #d7dbe2; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
