/* Mira — палитра «Графит и кобальт». Шрифт Inter (встроен, OFL). Светлая и тёмная темы. */
@font-face { font-family: "Inter"; src: url("../fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F7F6F3;
  --panel: #FBFAF8;
  --card: #FFFFFF;
  --sunk: #F1F0EC;
  --hover: rgba(22, 23, 26, .045);
  --press: rgba(22, 23, 26, .08);
  --line: #E6E4DE;
  --line-2: #D7D4CC;
  --text: #16171A;
  --text-2: #3A3B40;
  --muted: #6E6F75;
  --faint: #A2A3A8;
  --accent: #3355D1;
  --accent-2: #2945B3;
  --accent-bg: rgba(51, 85, 209, .08);
  --accent-line: rgba(51, 85, 209, .28);
  --on-accent: #FFFFFF;
  --ochre: #E9B949;
  --ochre-bg: rgba(233, 185, 73, .14);
  --ok: #2E8B57;
  --warn: #B7801A;
  --danger: #CF4237;
  --invert: #16171A;
  --on-invert: #F7F6F3;
  --code-bg: #15161A;
  --code-fg: #E3E4E8;
  --glass: rgba(255, 255, 255, .72);
  --glass-line: rgba(22, 23, 26, .08);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(22, 23, 26, .05);
  --shadow: 0 1px 2px rgba(22, 23, 26, .04), 0 4px 16px rgba(22, 23, 26, .05);
  --shadow-lg: 0 2px 6px rgba(22, 23, 26, .06), 0 24px 64px rgba(22, 23, 26, .14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tree-w: 236px;
  --chat-w: clamp(320px, 25vw, 440px);
  --top-h: 52px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0F1013;
  --panel: #131418;
  --card: #1A1C21;
  --sunk: #16181C;
  --hover: rgba(236, 236, 234, .05);
  --press: rgba(236, 236, 234, .09);
  --line: #25282E;
  --line-2: #32363D;
  --text: #ECECEA;
  --text-2: #C7C8CC;
  --muted: #8C8E95;
  --faint: #5E6168;
  --accent: #6D8BFF;
  --accent-2: #8AA2FF;
  --accent-bg: rgba(109, 139, 255, .12);
  --accent-line: rgba(109, 139, 255, .35);
  --on-accent: #0F1013;
  --ochre-bg: rgba(233, 185, 73, .12);
  --ok: #4CC38A;
  --warn: #E2A93B;
  --danger: #F0645A;
  --invert: #ECECEA;
  --on-invert: #0F1013;
  --code-bg: #0B0C0E;
  --glass: rgba(26, 28, 33, .72);
  --glass-line: rgba(236, 236, 234, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 64px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; overflow: hidden; font-feature-settings: "cv11", "ss01"; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
::-webkit-scrollbar-track { background: transparent; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
.ic { flex: none; display: block; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.hidden { display: none !important; }
.serif { font-weight: 600; letter-spacing: -.02em; }

/* Отклик на нажатие — у всех кнопок одинаковый: лёгкое «утапливание» */
.btn, .icon-btn, .chip, .pill, .dk, .send, .mic, .pw, .power-btn, .sub-card, .node-row, .fi, .trend, .ref, .pack, .plan-card, .auth-btn, .mm-item, .seg button, .cmp-model, .cmp-tog, .route-go, .hm-tile, .ctx button, .menu button, .tabs button, .mcard, .acat {
  transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .2s var(--ease), transform .12s var(--ease), opacity .16s;
}
.btn:active:not(:disabled), .icon-btn:active, .chip:active, .pill:active, .send:active:not(:disabled), .mic:active, .pw:active:not(:disabled),
.power-btn:active:not(:disabled), .auth-btn:active, .cmp-model:active, .cmp-tog:active, .route-go:active, .hm-tile:active, .pack:active, .tabs button:active, .dk:active { transform: scale(.96); }
.sub-card:active, .trend:active, .ref:active, .fi:active, .mcard:active, .acat:active { transform: scale(.985); }

/* ---------- Каркас ---------- */
#app { height: 100vh; display: grid; grid-template-rows: var(--top-h) minmax(0, 1fr); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 14px; background: var(--bg); position: relative; z-index: 30; -webkit-app-region: drag; user-select: none; }
html.electron .topbar { padding-right: 150px; }
.topbar button, .topbar a, .topbar input { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 8px 4px 4px; border-radius: 10px; }
.brand:hover { background: var(--hover); }
.logo { width: 24px; height: 24px; flex: none; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: -.03em; }
.top-crumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; min-width: 0; }
.top-crumb .sep { color: var(--faint); }
.top-crumb b { color: var(--text); font-weight: 550; }
.top-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; font-size: 13px; color: var(--text-2); }
.pill:hover { border-color: var(--line-2); color: var(--text); }
.pill b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pill .ic { color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--sunk); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; overflow: hidden; padding: 0; flex: none; color: var(--text-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar:hover { border-color: var(--line-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.online { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.sleep { background: var(--warn); } .dot.off { background: var(--danger); }
.dot.busy { background: var(--accent); animation: blink 1s infinite alternate; }
@keyframes blink { to { opacity: .3; } }

.main { display: grid; grid-template-columns: var(--tree-w) minmax(0, 1fr) var(--chat-w); min-height: 0; padding: 0 8px 8px; gap: 8px; }
.tree-col { overflow: auto; padding: 8px 4px 90px 4px; }
.center { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); }
.content { flex: 1; min-height: 0; overflow: auto; padding-bottom: 92px; }
.content.fill { overflow: hidden; padding-bottom: 0; display: flex; flex-direction: column; }
.content.fill > * { flex: 1; min-height: 0; }
.chat-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); }
.main.no-tree { grid-template-columns: 0 minmax(0, 1fr) var(--chat-w); }
.main.no-chat { grid-template-columns: var(--tree-w) minmax(0, 1fr) 0; }
.main.no-tree.no-chat { grid-template-columns: 0 minmax(0, 1fr) 0; }
.main.no-tree .tree-col, .main.no-chat .chat-col { visibility: hidden; overflow: hidden; padding: 0; border: 0; min-width: 0; }
.main.home, .main.home.no-tree, .main.home.no-chat, .main.home.no-tree.no-chat { grid-template-columns: minmax(0, 1fr); }
.main.home .tree-col, .main.home .chat-col { display: none; }
.main.home .center { background: transparent; border-color: transparent; box-shadow: none; overflow: visible; }
.rail { position: absolute; top: 50%; z-index: 24; width: 16px; height: 44px; margin-top: -22px; border: 1px solid var(--line); background: var(--card); color: var(--faint); display: grid; place-items: center; padding: 0; opacity: 0; transition: opacity .15s, color .15s; }
.center:hover .rail { opacity: 1; }
.rail:hover { color: var(--accent); }
.rail-l { left: -1px; border-radius: 0 9px 9px 0; }
.rail-l .ic { transform: rotate(180deg); }
.main.no-tree .rail-l .ic { transform: none; }
.rail-r { right: -1px; border-radius: 9px 0 0 9px; }
.main.no-chat .rail-r .ic { transform: rotate(180deg); }
.main.home .rail { display: none; }

/* ---------- Ветки ---------- */
.tree-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 12px 8px; }
.node-row { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: none; text-align: left; padding: 5px 8px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; min-height: 32px; position: relative; }
.node-row:hover { background: var(--hover); color: var(--text); }
.node-row.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-weight: 550; }
.node-row.active > .ic:not(.chev) { color: var(--accent); }
.node-row > .ic:not(.chev) { color: var(--muted); }
.node-row .chev { color: var(--faint); transition: transform .18s var(--ease); width: 14px; }
.node-row .chev.open { transform: rotate(90deg); }
.node-row .chev.none { visibility: hidden; }
.node-row .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-row .meta { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.node-row.add { color: var(--muted); font-size: 13px; }
.node-row.add:hover { color: var(--accent); }
.node-row .del { display: none; color: var(--faint); padding: 2px; border-radius: 5px; }
.node-row:hover .del { display: block; }
.node-row:hover .del + .meta { display: none; }
.node-row .del:hover { color: var(--danger); background: var(--hover); }
.node-row.drop { background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent-line); }
.node-kids { margin-left: 15px; padding-left: 6px; border-left: 1px solid var(--line); }
.tree-sep { height: 1px; background: var(--line); margin: 8px 10px; }
.tree-note { padding: 4px 12px; font-size: 12px; color: var(--faint); }

/* ---------- Нижняя панель разделов ---------- */
.dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 25; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg); }
.dk { position: relative; display: flex; align-items: center; height: 42px; padding: 0 13px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 13px; font-weight: 550; white-space: nowrap; }
.dk:hover { color: var(--text); background: var(--hover); }
.dk .dk-lbl { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .3s var(--ease), opacity .2s, margin .3s var(--ease); }
.dk.on { background: var(--invert); color: var(--on-invert); padding: 0 16px 0 14px; }
.dk.on .dk-lbl { max-width: 120px; opacity: 1; margin-left: 8px; }
.dk-tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); padding: 4px 9px; border-radius: 7px; background: var(--invert); color: var(--on-invert); font-size: 12px; font-weight: 500; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s var(--ease); }
.dk:not(.on):hover .dk-tip { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Чат справа ---------- */
.ch-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.ch-kicker { font-size: 11.5px; color: var(--muted); }
.ch-title { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.ch-model { position: relative; padding: 10px 12px 0; flex: none; }
.model-pick { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-align: left; }
.model-pick:hover { border-color: var(--line-2); }
.model-pick .mp-name { font-weight: 600; font-size: 13px; }
.model-pick .mp-vendor { font-size: 12px; color: var(--muted); }
.model-pick > .ic:first-child { color: var(--muted); }
.model-menu { position: absolute; left: 12px; right: 12px; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 40; max-height: 420px; overflow: auto; animation: popin .14s var(--ease); }
.mm-group { font-size: 11px; font-weight: 600; color: var(--faint); padding: 8px 10px 4px; }
.mm-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 9px; text-align: left; }
.mm-item:hover { background: var(--hover); }
.mm-item.on { background: var(--accent-bg); }
.mm-item .mm-name { font-weight: 600; font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mm-item .mm-note { font-size: 12px; color: var(--muted); display: block; }
.mm-item .mm-price { margin-left: auto; font-size: 12px; font-weight: 550; white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ch-set { margin: 8px 12px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); flex: none; }
.ch-set summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.ch-set summary::-webkit-details-marker { display: none; }
.ch-set summary .ic { color: var(--muted); }
.ch-set[open] summary .chev { transform: rotate(90deg); }
.ch-set .set-body { padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.set-row { display: flex; flex-direction: column; gap: 4px; }
.set-row > span { font-size: 11.5px; color: var(--muted); }
.ch-msgs { flex: 1; min-height: 0; overflow: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 14px; }
.cm { font-size: 13.5px; animation: msgin .22s var(--ease); }
@keyframes msgin { from { opacity: 0; transform: translateY(4px); } }
.cm.user { align-self: flex-end; max-width: 88%; background: var(--sunk); border: 1px solid var(--line); padding: 8px 12px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; word-wrap: break-word; }
.cm.ai { display: flex; gap: 10px; }
.cm.ai .av { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.cm.ai .body { flex: 1; min-width: 0; }
.cm .txt { white-space: pre-wrap; word-wrap: break-word; }
.cm .meta { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.cm-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-top: 8px; }
.cm-imgs img, .cm-imgs .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.cm-steps { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.cm-step { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); padding: 5px 8px; border-radius: 8px; background: var(--sunk); }
.cm-step .ic { margin-top: 2px; color: var(--muted); }
.cm-bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.cm-bar i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.cm-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.typing span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); margin-right: 3px; animation: blink .6s infinite alternate; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
.ch-welcome { color: var(--text-2); font-size: 13.5px; padding: 4px 2px; }
.ch-welcome h3 { font-size: 17px; margin-bottom: 4px; color: var(--text); }
.ch-sugg { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ch-sugg button { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--text-2); }
.ch-sugg button:hover { border-color: var(--accent-line); color: var(--text); background: var(--accent-bg); }
.ch-comp { margin: 8px 10px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); padding: 9px 9px 7px 12px; flex: none; transition: border-color .16s, box-shadow .2s; }
.ch-comp:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-bg); }
.ch-comp textarea { width: 100%; border: 0; outline: none; background: none; resize: none; min-height: 22px; max-height: 180px; line-height: 1.5; font-size: 14px; }
.ch-bar { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.price { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.price b { color: var(--text); font-weight: 600; }
.send { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--invert); color: var(--on-invert); display: grid; place-items: center; margin-left: auto; flex: none; }
.send:hover { background: var(--accent); color: #fff; }
.send:disabled { background: var(--line-2); color: var(--card); cursor: not-allowed; }
.send.stop { background: var(--danger); color: #fff; }
.mic { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border-radius: 999px; border: 0; background: none; color: var(--muted); flex: none; justify-content: center; }
.mic:hover { background: var(--hover); color: var(--text); }
.mic .mic-t { font-size: 12px; font-variant-numeric: tabular-nums; }
.mic .mic-t:empty { display: none; }
.mic.rec { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); box-shadow: 0 0 0 calc(var(--lvl, 0) * 6px) color-mix(in srgb, var(--danger) 18%, transparent); }
.mic.busy { color: var(--muted); }

/* План задачи в чате (оркестратор контента) */
.plan { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-top: 8px; overflow: hidden; }
.plan-h { display: flex; align-items: baseline; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.plan-h b { font-weight: 600; font-size: 14px; flex: 1; }
.plan-h span { font-weight: 600; font-variant-numeric: tabular-nums; }
.ps { padding: 7px 11px; border-bottom: 1px solid var(--line); position: relative; }
.ps:last-of-type { border-bottom: 0; }
.ps-top { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.ps-top .ic { color: var(--muted); }
.ps.done .ps-top .ic { color: var(--ok); }
.ps.run .ps-top .ic { color: var(--accent); }
.ps-top b { font-weight: 550; flex: 1; min-width: 0; }
.ps select { margin-top: 5px; width: 100%; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--sunk); font-size: 12px; padding: 0 6px; }
.ps .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); }
.plan-f { display: flex; align-items: center; gap: 8px; padding: 9px 11px; background: var(--sunk); font-size: 12px; flex-wrap: wrap; }

/* ---------- Разметка ответов (Markdown) ---------- */
.md { line-height: 1.65; word-wrap: break-word; }
.md p { margin: 0 0 10px; }
.md p:last-child { margin-bottom: 0; }
.md .md-h1, .md .md-h2 { font-size: 1.15em; font-weight: 650; margin: 16px 0 8px; letter-spacing: -.015em; }
.md .md-h3, .md .md-h4 { font-weight: 650; margin: 14px 0 6px; }
.md ul, .md ol { margin: 4px 0 10px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--faint); }
.md code { font: .88em var(--mono); background: var(--sunk); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md blockquote { margin: 8px 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2); color: var(--text-2); }
.md-code { margin: 10px 0; border-radius: 12px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line); }
.md-code-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font: 11.5px var(--mono); color: #8B8D95; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.md-copy { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: #A9ABB3; font: 500 11.5px var(--font); padding: 3px 8px; border-radius: 6px; }
.md-copy:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.md-code pre { margin: 0; padding: 12px 14px; overflow: auto; font: 12.5px/1.6 var(--mono); color: var(--code-fg); }
.md-code code { background: none; border: 0; padding: 0; font: inherit; }
.md-table { overflow: auto; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: .94em; }
.md-table th, .md-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.md-table th { background: var(--sunk); font-weight: 600; }
.md-table tr:last-child td { border-bottom: 0; }
.caret { display: inline-block; width: 7px; height: 1.05em; background: var(--accent); vertical-align: text-bottom; margin-left: 2px; border-radius: 1px; animation: blink .55s infinite alternate; }
.think { margin: 0 0 10px; border-left: 2px solid var(--line-2); padding: 2px 0 2px 12px; color: var(--muted); font-size: .92em; }
.think summary { cursor: pointer; list-style: none; font-weight: 550; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.think summary::-webkit-details-marker { display: none; }
.think[open] summary .ic { transform: rotate(90deg); }
.think div { white-space: pre-wrap; margin-top: 6px; max-height: 260px; overflow: auto; }

/* ---------- Базовые элементы ---------- */
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.on { color: var(--accent); background: var(--accent-bg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.btn:hover { background: var(--sunk); border-color: var(--faint); }
.btn.primary { background: var(--invert); color: var(--on-invert); border-color: transparent; }
.btn.primary:hover { background: var(--accent); color: #fff; }
.btn.accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn.accent:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 44px; padding: 0 22px; border-radius: 12px; font-size: 14.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
button.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { background: var(--invert); border-color: var(--invert); color: var(--on-invert); }
.chip .ic { color: var(--muted); }
.chip.on .ic { color: inherit; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 550; padding: 1px 7px; border-radius: 999px; background: var(--sunk); color: var(--text-2); white-space: nowrap; border: 1px solid var(--line); }
.badge.ru, .badge.live { color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent); border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.badge.foreign { color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge.local, .badge.accent { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-line); }
.badge.soon { color: var(--muted); }
.badge.ochre { color: #8A6512; background: var(--ochre-bg); border-color: color-mix(in srgb, var(--ochre) 40%, transparent); }
[data-theme="dark"] .badge.ochre { color: var(--ochre); }
.badge.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-2); background: var(--card); border-radius: 10px; padding: 7px 10px; outline: none; color: var(--text); transition: border-color .16s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-bg); }
.input.lg { height: 44px; border-radius: 12px; font-size: 15px; padding: 0 14px; }
.textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > label, .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--sunk); gap: 2px; flex-wrap: wrap; border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.switch { position: relative; width: 34px; height: 20px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: var(--line-2); transition: background .18s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.empty { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 56px 20px; gap: 10px; }
.empty .ic { color: var(--faint); }
.empty b { color: var(--text); font-weight: 600; font-size: 15px; }
.page { max-width: 1040px; margin: 0 auto; padding: 30px 36px 24px; }
.page.wide { max-width: 1320px; }
.page-head { margin-bottom: 22px; }
.kicker { font-size: 12px; font-weight: 550; color: var(--accent); margin-bottom: 6px; }
.page-head h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.028em; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 660px; }
.sec-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 24px 0 10px; display: flex; align-items: center; gap: 6px; }
.notice { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--r); background: var(--sunk); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.notice .ic { color: var(--accent); margin-top: 2px; }
.notice.warn .ic { color: var(--warn); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 550; color: var(--muted); font-size: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.tile-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--accent); background: var(--accent-bg); flex: none; }
.tile-ic.sm { width: 26px; height: 26px; border-radius: 7px; }
.st-ok { color: var(--ok); } .st-warn { color: var(--warn); } .st-err { color: var(--danger); }
.meter { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s var(--ease); }
.shimmer { background: linear-gradient(100deg, var(--sunk) 30%, var(--line) 50%, var(--sunk) 70%); background-size: 300% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { border: 0; background: none; color: var(--accent); padding: 0; }
.link:hover { text-decoration: underline; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sunk); border: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 5px 14px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--muted); }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.kbd { font: 11px var(--mono); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--sunk); color: var(--muted); }

/* ---------- Всплывающие панели и меню ---------- */
.pop, .menu { position: absolute; top: calc(var(--top-h) - 2px); z-index: 60; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: popin .16s var(--ease); }
.pop { right: 190px; width: 340px; padding: 16px; }
html:not(.electron) .pop { right: 50px; }
@keyframes popin { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.pop h3 { font-size: 16px; }
.pw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 4px; }
.pw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 11.5px; color: var(--text-2); }
.pw:hover:not(:disabled) { border-color: var(--accent-line); color: var(--text); background: var(--accent-bg); }
.pw:disabled { opacity: .35; cursor: not-allowed; }
.pop-link { border: 0; background: none; color: var(--accent); font-size: 12.5px; padding: 10px 0 0; font-weight: 550; }
.pop-link:hover { text-decoration: underline; }
.menu { right: 150px; width: 300px; padding: 6px; }
html:not(.electron) .menu { right: 12px; }
.menu-h { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-h b { display: block; font-weight: 600; font-size: 13.5px; }
.menu-h span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.menu button, .ctx button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.menu button:hover, .ctx button:hover { background: var(--hover); color: var(--text); }
.menu button .ic, .ctx button .ic { color: var(--muted); }
.menu button.danger, .ctx button.danger { color: var(--danger); }
.menu button.danger .ic, .ctx button.danger .ic { color: var(--danger); }
.menu .sep, .ctx .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; color: var(--text-2); }
.menu-row .seg { margin-left: auto; flex-wrap: nowrap; }
.menu .seg button { padding: 3px 7px; font-size: 12px; white-space: nowrap; }
.ctx { position: fixed; z-index: 180; min-width: 220px; padding: 5px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: popin .12s var(--ease); }
.ctx .kbd { margin-left: auto; }

/* ---------- Оверлеи (модалки, тосты) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 16, 19, .32); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; animation: fade .14s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); animation: modalin .2s var(--ease); max-height: 84vh; display: flex; flex-direction: column; }
@keyframes modalin { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-head { display: flex; align-items: center; padding: 16px 14px 10px 20px; font-size: 16px; font-weight: 600; letter-spacing: -.02em; flex: none; }
.modal-head span { flex: 1; }
.modal-body { padding: 4px 20px 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; flex: none; }
.modal-foot .btn.primary { background: var(--accent); color: #fff; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--invert); color: var(--on-invert); box-shadow: var(--shadow-lg); font-size: 13px; max-width: 460px; animation: slidein .22s var(--ease); pointer-events: auto; }
.toast .ic { color: var(--ochre); }
.toast.ok .ic { color: #5FD39A; } .toast.err .ic, .toast.warn .ic { color: #FF8A80; }
[data-theme="dark"] .toast.ok .ic { color: var(--ok); } [data-theme="dark"] .toast.err .ic, [data-theme="dark"] .toast.warn .ic { color: var(--danger); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Кошелёк ---------- */
.wl-top { display: flex; align-items: flex-end; gap: 16px; padding: 4px 0 16px; flex-wrap: wrap; }
.wl-bal { font-size: 36px; font-weight: 650; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.wl-bal small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.pack { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.pack:hover { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.pack .pk-t { font-size: 12px; color: var(--muted); font-weight: 550; }
.pack .pk-c { font-size: 22px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pack .pk-p { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.pack .pk-b { font-size: 11.5px; color: var(--ok); font-weight: 550; }
.pack.hot { border-color: var(--accent-line); }
.pack.hot::after { content: "Выгодно"; position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 650; color: var(--accent); background: var(--accent-bg); padding: 1px 7px; border-radius: 999px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.plan-card.cur { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.plan-card b { font-size: 15px; font-weight: 650; }
.plan-card .pc-price { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.plan-card .pc-price small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.plan-card ul { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 5px; flex: 1; }
.plan-card li { display: flex; gap: 6px; align-items: flex-start; }
.plan-card li .ic { color: var(--ok); margin-top: 2px; }

/* ---------- Вход ---------- */
.login { position: fixed; inset: 0; z-index: 150; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); animation: fade .25s; transition: opacity .3s; }
.login.out { opacity: 0; pointer-events: none; }
.login-art { position: relative; overflow: hidden; background: #0F1013; color: #ECECEA; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; -webkit-app-region: drag; }
.login-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-art h2 { position: relative; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; letter-spacing: -.035em; max-width: 520px; font-weight: 600; }
.login-art p { position: relative; color: #9A9CA3; margin: 14px 0 0; max-width: 460px; }
.login-art .feats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; margin-top: 28px; max-width: 580px; }
.login-art .feats div { display: flex; gap: 10px; font-size: 13px; color: #C7C8CC; }
.login-art .feats .ic { color: #8AA2FF; margin-top: 2px; }
.login-side { display: grid; place-items: center; padding: 40px; -webkit-app-region: drag; }
.login-card { width: min(380px, 100%); -webkit-app-region: no-drag; }
.login-card .mark { width: 44px; height: 44px; }
.login-card h1 { font-size: 26px; margin: 18px 0 6px; letter-spacing: -.03em; }
.login-card > p { color: var(--muted); margin: 0 0 26px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font-weight: 600; font-size: 14.5px; margin-bottom: 10px; color: var(--text); }
.auth-btn:hover { border-color: var(--faint); box-shadow: var(--shadow); }
.auth-btn svg { width: 18px; height: 18px; }
.auth-btn.wait { opacity: .7; pointer-events: none; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin: 16px 0; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-note { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.login-note .ic { color: var(--ok); margin-top: 2px; }
.login-tip { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); animation: fade .2s; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- Главная: чат с моделями ---------- */
.hm { height: 100%; display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 8px; }
.hm.no-side { grid-template-columns: minmax(0, 1fr); }
.hm-side { display: flex; flex-direction: column; min-height: 0; padding: 6px 4px 90px; }
.hm.no-side .hm-side { display: none; }
.hm-side .btn { justify-content: flex-start; margin: 0 4px 10px; }
.hm-hist { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.hm-hist .grp { font-size: 11.5px; color: var(--faint); font-weight: 600; padding: 10px 10px 4px; }
.hm-h { display: flex; align-items: center; gap: 6px; border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); width: 100%; }
.hm-h span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-h:hover { background: var(--hover); color: var(--text); }
.hm-h.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.hm-h .x { opacity: 0; color: var(--faint); border-radius: 5px; display: grid; }
.hm-h:hover .x { opacity: 1; }
.hm-h .x:hover { color: var(--danger); }
.hm-main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: hidden; }
.hm-top { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 6px; z-index: 3; pointer-events: none; }
.hm-top > * { pointer-events: auto; }
.hm-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 24px 100px; text-align: center; overflow: auto; }
.hm-mark { width: 46px; height: 46px; margin-bottom: 18px; }
.hm-title { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.035em; font-weight: 600; }
.hm-sub { color: var(--muted); margin: 8px 0 26px; font-size: 15px; }
.hm-hero .cmp { width: min(720px, 100%); text-align: left; }
.hm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; max-width: 760px; }
.hm-chips .chip { height: 32px; padding: 0 13px; font-size: 13px; }
.hm-chips .chip:hover { background: var(--accent-bg); border-color: var(--accent-line); }
.hm-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; width: min(860px, 100%); margin-top: 24px; }
.hm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left; font-size: 12.5px; color: var(--muted); }
.hm-tile b { font-size: 13.5px; color: var(--text); font-weight: 600; }
.hm-tile:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.hm-tile .ic { color: var(--accent); }
.hm-msgs { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: 56px max(24px, calc((100% - 780px) / 2)) 24px; }
.hm-dock { padding: 0 max(16px, calc((100% - 800px) / 2)) 84px; flex: none; }
.msg { font-size: 15px; animation: msgin .22s var(--ease); }
.msg.user { align-self: flex-end; max-width: 80%; background: var(--sunk); border: 1px solid var(--line); padding: 10px 15px; border-radius: 18px 18px 5px 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.ai { display: flex; gap: 14px; }
.msg.ai .av { width: 26px; height: 26px; flex: none; margin-top: 2px; }
.msg.ai .body { flex: 1; min-width: 0; }
.msg .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); margin-top: 8px; }
.msg .meta button { border: 0; background: none; color: var(--faint); padding: 2px; border-radius: 5px; display: inline-grid; }
.msg .meta button:hover { color: var(--text); background: var(--hover); }
.msg .err { color: var(--danger); }
.route { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent-line); background: var(--accent-bg); flex-wrap: wrap; }
.route .tile-ic { background: var(--card); }
.route b { display: block; font-weight: 600; font-size: 14px; }
.route span { font-size: 12.5px; color: var(--text-2); }
.route-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; }
.route-go:hover { background: var(--accent-2); }
.route-models { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nokey { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--text-2); }
.nokey .ic { color: var(--ochre); }

/* Строка ввода (Главная): модель, поиск, микрофон, отправка */
.cmp { position: relative; background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; padding: 12px 10px 8px 16px; box-shadow: var(--shadow); transition: border-color .16s, box-shadow .2s; }
.cmp:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-bg), var(--shadow); }
.cmp textarea { display: block; width: 100%; border: 0; outline: none; background: none; resize: none; font-size: 15.5px; line-height: 1.5; min-height: 26px; max-height: 240px; padding: 2px 0; }
.cmp.big textarea { min-height: 52px; }
.cmp-bar { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.cmp-model { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 550; color: var(--text-2); }
.cmp-model:hover { border-color: var(--line-2); color: var(--text); }
.cmp-model .ic { color: var(--muted); }
.cmp-tog { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; background: none; font-size: 13px; color: var(--muted); }
.cmp-tog:hover { background: var(--hover); color: var(--text); }
.cmp-tog.on { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-line); }
.cmp .price { margin: 0 6px; }
.cmp .send { width: 34px; height: 34px; }
.cmp .model-menu { left: 8px; right: auto; width: 390px; top: auto; bottom: calc(100% + 6px); }
.hm-hero .cmp .model-menu { bottom: auto; top: calc(100% + 6px); }

/* ---------- Контент: обзор, галерея, видео, аудио ---------- */
.sub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sub-card { padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 8px; cursor: pointer; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
.sub-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.sub-card > .ic { color: var(--accent); }
.sub-card h3 { font-size: 15px; font-weight: 600; }
.sub-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.gallery { columns: 4 200px; column-gap: 12px; }
.g-card { break-inside: avoid; margin: 0 0 12px; border-radius: 14px; overflow: hidden; position: relative; background: var(--card); border: 1px solid var(--line); }
.g-card img { width: 100%; display: block; cursor: zoom-in; }
.g-card figcaption { padding: 8px 10px 10px; font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.g-card:hover .g-acts, .g-card:focus-within .g-acts { opacity: 1; }
.g-acts button { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px); color: #16171A; display: grid; place-items: center; }
.g-acts button:hover { background: #fff; }
.g-acts button.on { color: var(--accent); }
.v-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.v-card { border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); position: relative; }
.v-thumb { position: relative; aspect-ratio: 16/9; background: #111; }
.v-thumb img, .v-thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-dur { position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.v-prog { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; background: rgba(15, 16, 19, .5); color: #fff; font-size: 13px; }
.v-bar { width: 60%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.v-bar i { display: block; height: 100%; background: #fff; transition: width .3s; }
.v-info { padding: 10px 12px; font-size: 13px; }
.v-info p { margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v-card .g-acts { top: 8px; right: 8px; }
.v-card:hover .g-acts { opacity: 1; }
.au-list { display: flex; flex-direction: column; gap: 8px; }
.au { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.au-play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--invert); color: var(--on-invert); display: grid; place-items: center; flex: none; }
.au-play.on { background: var(--accent); color: #fff; }
.au-wave { height: 32px; flex: 1.2; min-width: 60px; background-size: 100% 100%; opacity: .8; }
.au-meta { flex: 1; min-width: 0; }
.au-meta b { display: block; font-weight: 550; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-meta span { font-size: 12px; color: var(--muted); }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.recent img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; border: 1px solid var(--line); cursor: pointer; }
.img-view img { max-width: 100%; max-height: 62vh; border-radius: 16px; margin: 0 auto; display: block; box-shadow: var(--shadow-lg); }

/* Тренды */
.trend-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.trend { position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; padding: 0; }
.trend:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.trend-img { position: relative; aspect-ratio: 4/5; background: #111; overflow: hidden; }
.trend-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.trend:hover .trend-img img { transform: scale(1.04); }
.trend-img .tag { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; }
.trend-img .tag span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(15, 16, 19, .55); color: #fff; backdrop-filter: blur(6px); }
.trend-img .tag .hot { background: var(--ochre); color: #1A1407; }
.trend-img .uses { position: absolute; right: 10px; bottom: 10px; font-size: 11.5px; color: #fff; background: rgba(15, 16, 19, .55); padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(6px); display: flex; gap: 4px; align-items: center; }
.trend-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.trend-b b { font-size: 14px; font-weight: 600; }
.trend-b p { margin: 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trend-b .row { margin-top: auto; padding-top: 6px; }
.prompt-list { display: flex; flex-direction: column; gap: 8px; }
.prompt-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.prompt-row p { margin: 4px 0 0; font: 12.5px/1.55 var(--mono); color: var(--text-2); white-space: pre-wrap; }

/* ---------- Монтаж ---------- */
.ed { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ed-preview { flex: 1; min-height: 140px; display: flex; flex-direction: column; }
.ed-stage-wrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; position: relative; background: var(--sunk); }
.ed-stage { background: #0B0C0E; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); }
.ed-stage canvas { width: 100%; height: 100%; display: block; }
.ed-drop { position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: 14px; display: none; place-items: center; background: var(--accent-bg); font-weight: 600; }
.ed-preview.dragover .ed-drop { display: grid; }
.ed-bar { display: flex; align-items: center; gap: 6px; padding: 4px 12px; flex: none; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--card); }
.ed-time { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.ed-bar .tsep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.ed-bar input[type=range] { width: 100px; accent-color: var(--accent); }
.ed-insp { display: flex; align-items: center; gap: 10px; padding: 4px 14px; border-top: 1px solid var(--line); background: var(--panel); font-size: 12.5px; flex: none; min-height: 36px; flex-wrap: wrap; }
.ed-insp .input, .ed-insp .select { height: 28px; padding: 2px 8px; font-size: 12.5px; width: auto; }
.ed-timeline { height: 196px; flex: none; display: grid; grid-template-columns: 96px minmax(0, 1fr); background: var(--panel); border-top: 1px solid var(--line); }
.tl-heads { border-right: 1px solid var(--line); }
.tl-ruler-head { height: 24px; border-bottom: 1px solid var(--line); }
.tl-head { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.tl-scroll { overflow-x: auto; overflow-y: hidden; position: relative; }
.tl-inner { position: relative; min-width: 100%; }
.tl-ruler { height: 24px; position: relative; border-bottom: 1px solid var(--line); cursor: ew-resize; user-select: none; }
.tl-tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: var(--line-2); }
.tl-tick.major { height: 10px; background: var(--muted); }
.tl-tick span { position: absolute; left: 4px; bottom: 7px; font: 10px var(--mono); color: var(--muted); white-space: nowrap; }
.tl-track { height: 42px; position: relative; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0 calc(var(--pps) - 1px), var(--line) calc(var(--pps) - 1px) var(--pps)); }
.tl-track.drop { background-color: var(--accent-bg); }
.clip { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; overflow: hidden; cursor: grab; user-select: none; border: 1px solid rgba(0, 0, 0, .1); display: flex; align-items: flex-end; touch-action: none; }
.clip.sel { outline: 2px solid var(--accent); outline-offset: -1px; z-index: 3; }
.clip-v { background: #4F5D8C; background-size: auto 100%; background-repeat: repeat-x; }
.clip-t { background: #E9C46A; align-items: center; }
.clip-t .clip-name { color: #2B220C; text-shadow: none; }
.clip-a { background: #5E8C76; background-size: auto 100%; }
.clip-vo { background: #6B8DD6; background-size: auto 100%; }
.clip-name { position: relative; z-index: 1; font-size: 11px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.trim { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.trim.l { left: 0; } .trim.r { right: 0; }
.clip:hover .trim, .clip.sel .trim { background: rgba(255, 255, 255, .35); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 5; }
.tl-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--accent); }

/* ---------- Улучшение и конвертер ---------- */
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; border: 1.5px dashed var(--line-2); border-radius: 20px; text-align: center; background: var(--panel); color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--accent-bg); }
.drop-zone.small { padding: 22px 20px; margin-top: 14px; }
.drop-zone b { font-weight: 600; font-size: 17px; color: var(--text); letter-spacing: -.02em; }
.dz-ring { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--accent); background: var(--accent-bg); margin-bottom: 8px; }
.dz-kinds { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.rf-list { display: flex; flex-direction: column; gap: 8px; }
.rf { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.rf b { font-weight: 550; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-thumb { width: 46px; height: 46px; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; color: var(--muted); overflow: hidden; flex: none; border: 1px solid var(--line); }
.rf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.enh-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.enh-m { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; text-align: left; font-size: 12.5px; cursor: pointer; }
.enh-m b { font-weight: 600; font-size: 13.5px; }
.enh-m.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; margin-top: 2px; }
.on > .radio { border-color: var(--accent); background: radial-gradient(var(--accent) 40%, transparent 46%); }
.danger.on > .radio { border-color: var(--danger); background: radial-gradient(var(--danger) 40%, transparent 46%); }
.ba { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); cursor: ew-resize; user-select: none; touch-action: none; background: #0B0C0E; }
.ba > img { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
.ba-after { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.ba-after img { display: block; height: 100%; width: auto; max-width: none; }
.ba-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .4); }
.ba-handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 14px; color: #16171A; }
.ba-l, .ba-r { position: absolute; top: 10px; padding: 2px 9px; border-radius: 10px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12px; }
.ba-l { left: 10px; } .ba-r { right: 10px; }
.cv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cv-row { display: grid; grid-template-columns: 40px minmax(150px, 1fr) 16px 190px minmax(0, 1.15fr) 26px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.cv-row.done { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.cv-row.err { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.cv-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--sunk); color: var(--text-2); flex: none; overflow: hidden; }
.cv-ic img { width: 100%; height: 100%; object-fit: cover; }
.cv-name { min-width: 0; }
.cv-name b { display: block; font-weight: 550; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-name span { font-size: 12px; color: var(--muted); }
.cv-arrow { color: var(--faint); }
.cv-sel { width: 100%; height: 34px; }
.cv-res { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.cv-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.cv-st.ok { color: var(--ok); } .cv-st.err { color: var(--danger); white-space: normal; } .cv-st.run { color: var(--muted); }
.cv-row .cv-why { grid-column: span 2; font-size: 12.5px; color: var(--muted); }
.cv-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Разработка ---------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mcard { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.mcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.mcard .mc-h { display: flex; align-items: center; gap: 8px; }
.mcard .mc-h b { font-weight: 600; font-size: 14px; flex: 1; }
.mcard p { margin: 0; font-size: 12.5px; color: var(--muted); flex: 1; }
.mcard .bars { display: flex; flex-direction: column; gap: 5px; }
.mcard .bar-r { display: grid; grid-template-columns: 74px 1fr 26px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.mcard .bar-r i { display: block; height: 5px; border-radius: 5px; background: var(--sunk); overflow: hidden; }
.mcard .bar-r i b { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.ide { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.ide-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ide-head h2 { font-size: 15px; font-weight: 600; }
.ide-body { display: grid; min-height: 0; }
.ide-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.ide-pane:last-child { border-right: 0; }
.ide-ph { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.ide-ph .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text-2); }
.ide-files { overflow: auto; padding: 6px; flex: 1; }
.ide-f { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: none; text-align: left; padding: 4px 8px; border-radius: 6px; font-size: 12.5px; color: var(--text-2); }
.ide-f:hover { background: var(--hover); }
.ide-f.on { background: var(--accent-bg); color: var(--accent); }
.ide-f .ic { color: var(--faint); }
.ide-f.on .ic { color: var(--accent); }
.ide-f.new { animation: flash 1.2s var(--ease); }
@keyframes flash { from { background: color-mix(in srgb, var(--ochre) 40%, transparent); } }
.code-wrap { position: relative; flex: 1; min-height: 0; display: flex; background: var(--code-bg); }
.code-ln { padding: 12px 10px 12px 0; width: 46px; text-align: right; font: 12.5px/1.6 var(--mono); color: #4D5058; user-select: none; overflow: hidden; flex: none; white-space: pre; }
.code-ed { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: none; color: var(--code-fg); font: 12.5px/1.6 var(--mono); padding: 12px 14px 12px 4px; tab-size: 2; white-space: pre; overflow: auto; caret-color: #8AA2FF; }
.code-ed::selection { background: rgba(138, 162, 255, .3); }
.code-empty { flex: 1; display: grid; place-items: center; color: #6B6E76; font-size: 13px; background: var(--code-bg); text-align: center; padding: 20px; }
.prev-wrap { flex: 1; min-height: 0; background: #fff; position: relative; }
.prev-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.prev-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: var(--panel); text-align: center; padding: 20px; font-size: 13px; }
.agent-log { font: 12px/1.7 var(--mono); color: var(--muted); margin-top: 6px; }
.agent-log div { display: flex; gap: 6px; align-items: center; }
.agent-log .ic { color: var(--accent); }
.ref-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ref { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); text-align: left; padding: 0; cursor: pointer; }
.ref:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.ref-shot { position: relative; aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--line); }
.ref-shot .browser { position: absolute; inset: 12px 12px 0; border-radius: 9px 9px 0 0; overflow: hidden; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); background: #fff; }
.ref-shot .browser i { display: flex; gap: 4px; height: 14px; align-items: center; padding: 0 7px; background: #ECECEC; }
.ref-shot .browser i b { width: 5px; height: 5px; border-radius: 50%; background: #C9C9C9; }
.ref-shot canvas { display: block; width: 100%; height: calc(100% - 14px); }
.ref-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.ref-b b { font-weight: 600; font-size: 14px; }
.ref-b p { margin: 0; font-size: 12.5px; color: var(--muted); }
.ref-who { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.ref-feats { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.ref-feats li { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--chip, rgba(51, 85, 209, .08)); color: var(--text); }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.skill-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; }
.skill-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.skill-card p { margin: 0; font-size: 12.5px; color: var(--muted); flex: 1; }
.skill-editor { font-family: var(--mono); font-size: 13px; min-height: 340px; }
.mcp-list { display: flex; flex-direction: column; gap: 8px; }
.mcp { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.mcp b { font-weight: 600; font-size: 13.5px; }
.mcp p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.mcp code { font: 11.5px var(--mono); color: var(--muted); }

/* ---------- Мой ПК ---------- */
.access-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 8px; text-align: left; width: 100%; }
.access-row.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.access-row.danger.on { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.power-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; }
.power-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font-size: 13px; }
.power-btn:hover:not(:disabled) { border-color: var(--accent-line); color: var(--text); background: var(--accent-bg); }
.power-btn:disabled { opacity: .35; cursor: not-allowed; }
.power-btn .ic { width: 22px; height: 22px; }
.pc-hero { display: flex; gap: 20px; align-items: center; padding: 20px; flex-wrap: wrap; }
.pc-screen { width: 104px; height: 68px; border-radius: 10px; border: 3px solid var(--invert); background: linear-gradient(135deg, #3355D1, #8AA2FF 60%, #E9B949); flex: none; }
.pc-screen.off { background: #0B0C0E; } .pc-screen.sleep { background: #3A3B40; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.check-row:last-child { border-bottom: 0; }
.col-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.prj-list { display: flex; flex-direction: column; gap: 8px; }
.prj-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.prj-row:hover { border-color: var(--line-2); }
.qr { width: 160px; height: 160px; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Агенты: поле из плиток ---------- */
.lvl { display: flex; align-items: center; gap: 6px; padding: 10px 16px; flex-wrap: wrap; position: relative; z-index: 6; border-bottom: 1px solid var(--line); background: var(--card); flex: none; }
.lvl-pill { font-size: 11px; font-weight: 650; color: var(--accent); background: var(--accent-bg); padding: 2px 9px; border-radius: 999px; }
.lvl-crumb { border: 0; background: none; font-size: 14px; font-weight: 550; color: var(--muted); padding: 3px 6px; border-radius: 7px; }
.lvl-crumb:hover { color: var(--text); background: var(--hover); }
.lvl-crumb.cur { color: var(--text); cursor: default; background: none; }
.lvl-sep { color: var(--faint); }
.lvl-dots { display: inline-flex; gap: 4px; margin-left: 4px; }
.lvl-dots i { width: 18px; height: 3px; border-radius: 2px; background: var(--line-2); }
.lvl-dots i.on { background: var(--accent); }
.biz-page { display: flex; flex-direction: column; height: 100%; }
.biz-body { flex: 1; min-height: 0; position: relative; overflow: auto; }
.biz-body > .field-board, .biz-body > .flow { height: 100%; }
.biz-body .page { padding-top: 18px; }
.field-board { position: relative; height: 100%; overflow: hidden; cursor: grab; background-color: var(--panel); background-image: radial-gradient(color-mix(in srgb, var(--muted) 32%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.field-board.panning { cursor: grabbing; }
.field-inner { position: absolute; left: 0; top: 0; width: 2400px; height: 1500px; transform-origin: 0 0; }
.field-links { position: absolute; left: 0; top: 0; width: 2400px; height: 1500px; pointer-events: none; overflow: visible; }
.field-links path { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.field-links path.hot { stroke: var(--accent); stroke-dasharray: 5 5; animation: dash .7s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -10; } }
.btile { position: absolute; width: 250px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); user-select: none; touch-action: none; cursor: default; transition: box-shadow .18s var(--ease), border-color .18s; }
.btile:hover { box-shadow: var(--shadow-lg); }
.btile.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg), var(--shadow-lg); }
.btile-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 6px; cursor: grab; }
.btile-h:active { cursor: grabbing; }
.btile-h b { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.015em; }
.btile-b { padding: 0 12px 10px; font-size: 12.5px; color: var(--muted); }
.btile-stats { display: flex; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.btile-stats span { display: flex; align-items: center; gap: 5px; }
.btile-log { padding: 7px 12px 10px; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btile .knob { position: absolute; right: -7px; top: 20px; width: 13px; height: 13px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); cursor: crosshair; }
.btile .knob:hover, .btile.linking .knob { border-color: var(--accent); background: var(--accent); }
.field-hint { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); color: var(--muted); text-align: center; font-size: 14px; pointer-events: none; }
.field-tools { position: absolute; left: 12px; top: 12px; display: flex; gap: 4px; z-index: 5; padding: 4px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.sub-field { overflow: auto; padding: 18px 22px 96px; }
.sub-group { margin-bottom: 22px; }
.sub-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sub-tile { position: relative; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: transform .15s var(--ease), box-shadow .18s; min-height: 128px; display: flex; flex-direction: column; gap: 8px; }
.sub-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sub-tile b { font-weight: 600; font-size: 14.5px; letter-spacing: -.015em; }
.sub-tile p { margin: 0; font-size: 12.5px; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sub-tile .st-foot { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.sub-tile .st-go { position: absolute; top: 14px; right: 14px; color: var(--faint); }
.sub-tile:hover .st-go { color: var(--accent); }
.sub-tile.data { cursor: default; min-height: 0; }
.sub-tile.data:hover { transform: none; box-shadow: none; }
.zoom-ghost { position: fixed; z-index: 120; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); pointer-events: none; transition: all .32s cubic-bezier(.4, 0, .2, 1); }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ent { padding: 12px 14px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; }
.ent:hover { border-color: var(--line-2); }
.ent b { font-weight: 550; font-size: 13.5px; display: block; }
.ent p { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ent .row { font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.ent-empty { border: 1px dashed var(--line-2); border-radius: 14px; padding: 14px; font-size: 12.5px; color: var(--muted); }
.acat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.acat { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.acat:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.acat b { font-weight: 600; font-size: 14.5px; }
.acat p { margin: 0; font-size: 12.5px; color: var(--muted); flex: 1; }
.flow { position: relative; height: 100%; overflow: hidden; background-color: var(--panel); background-image: radial-gradient(color-mix(in srgb, var(--muted) 32%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.flow-scroll { position: absolute; inset: 0; overflow: auto; }
.flow-svg { position: absolute; left: 0; top: 0; width: 3000px; height: 1600px; pointer-events: none; }
.flow-svg path { fill: none; stroke: var(--line-2); stroke-width: 2; }
.flow-svg path.active { stroke: var(--accent); stroke-dasharray: 6 6; animation: dash .6s linear infinite; }
.flow-svg path.done { stroke: var(--ok); }
.node { position: absolute; width: 210px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); user-select: none; touch-action: none; }
.node.sel { border-color: var(--accent); }
.node.running { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.node.done { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.node-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px; cursor: grab; border-bottom: 1px solid var(--line); }
.node-title { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-body { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.node-foot { display: flex; justify-content: space-between; padding: 6px 10px; border-top: 1px solid var(--line); font-size: 11.5px; }
.port { position: absolute; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); }
.port.in { left: -7px; } .port.out { right: -7px; cursor: crosshair; }
.port.out:hover { border-color: var(--accent); background: var(--accent); }
.flow-cap { display: none; }

/* ---------- Мои файлы ---------- */
.fm { display: flex; flex-direction: column; height: 100%; min-height: 0; position: relative; }
.fm-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.fm-crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; overflow: hidden; }
.fm-crumbs button { border: 0; background: none; padding: 4px 7px; border-radius: 7px; font-size: 14px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.fm-crumbs button:hover { background: var(--hover); color: var(--text); }
.fm-crumbs button:last-child { color: var(--text); }
.fm-crumbs button.drop { background: var(--accent-bg); color: var(--accent); }
.fm-crumbs .ic { color: var(--faint); }
.fm-search { position: relative; width: 220px; }
.fm-search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.fm-search input { padding-left: 32px; height: 32px; border-radius: 9px; }
.fm-sel { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--accent-bg); font-size: 13px; flex: none; animation: fade .15s; }
.fm-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 14px 96px; position: relative; outline: none; }
.fm-body.over::after { content: "Отпустите — файлы загрузятся в эту папку"; position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 16px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); font-weight: 600; pointer-events: none; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; }
.fi { position: relative; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid transparent; background: none; padding: 6px; text-align: left; user-select: none; }
.fi:hover { background: var(--hover); }
.fi.sel { background: var(--accent-bg); border-color: var(--accent-line); }
.fi.drop { background: var(--accent-bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.fi-th { aspect-ratio: 4/3; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; overflow: hidden; color: var(--faint); border: 1px solid var(--line); position: relative; }
.fi-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fi-th .ext { position: absolute; left: 6px; bottom: 6px; font: 600 10px var(--mono); text-transform: uppercase; padding: 1px 5px; border-radius: 4px; background: var(--card); color: var(--text-2); border: 1px solid var(--line); }
.fi-th .play { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: rgba(15, 16, 19, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.fi.folder .fi-th { background: none; border: 0; color: var(--accent); }
.fi.folder .fi-th svg { width: 60px; height: 60px; }
.fi-n { font-size: 12.5px; font-weight: 500; margin-top: 6px; padding: 0 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; line-height: 1.35; }
.fi-m { font-size: 11.5px; color: var(--faint); padding: 0 2px; margin-top: 1px; }
.fi input, .fm-list input { width: 100%; font-size: 12.5px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--accent); outline: none; background: var(--card); margin-top: 6px; }
.fm-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm-list th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); position: sticky; top: -14px; background: var(--card); z-index: 1; }
.fm-list td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fm-list tbody tr:hover td { background: var(--hover); }
.fm-list tr.sel td { background: var(--accent-bg); }
.fm-list tr.drop td { background: var(--accent-bg); box-shadow: inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
.fm-list .nm { display: flex; align-items: center; gap: 8px; max-width: 520px; overflow: hidden; text-overflow: ellipsis; }
.fm-list .nm .ic { color: var(--faint); }
.fm-list tr.folder .nm .ic { color: var(--accent); }
.fm-ups { position: absolute; right: 16px; bottom: 84px; width: 300px; z-index: 6; display: flex; flex-direction: column; gap: 6px; }
.fm-up { padding: 9px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 12.5px; }
.fm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.fm-stat { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; }
.fm-stat:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.fm-stat .ic { color: var(--accent); margin-bottom: 8px; }
.fm-stat b { display: block; font-weight: 600; font-size: 13.5px; }
.fm-stat span { font-size: 12px; color: var(--muted); }

/* Просмотрщик файлов */
.viewer { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; background: rgba(11, 12, 14, .95); backdrop-filter: blur(10px); animation: fade .16s; color: #ECECEA; }
.vw-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 160px 0 16px; flex: none; -webkit-app-region: drag; }
html:not(.electron) .vw-head { padding-right: 16px; }
.vw-head > * { -webkit-app-region: no-drag; }
.vw-head b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vw-head span { font-size: 12px; color: #8C8E95; white-space: nowrap; }
.vw-head .btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .08); color: #ECECEA; }
.vw-head .btn:hover { background: rgba(255, 255, 255, .12); }
.vw-head .icon-btn { color: #A9ABB3; }
.vw-head .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.vw-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 64px 24px; position: relative; overflow: hidden; }
.vw-body > img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transition: transform .15s var(--ease); cursor: zoom-in; }
.vw-body > img.zoom { cursor: zoom-out; }
.vw-body video { max-width: 100%; max-height: 100%; border-radius: 8px; background: #000; outline: none; }
.vw-body iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 8px; background: #fff; }
.vw-audio { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.vw-audio .disc { width: 180px; height: 180px; border-radius: 40px; background: linear-gradient(135deg, #3355D1, #8AA2FF 60%, #E9B949); display: grid; place-items: center; color: #fff; box-shadow: 0 20px 60px rgba(51, 85, 209, .35); }
.vw-audio audio { width: min(520px, 80vw); }
.vw-text { width: min(1100px, 100%); height: 100%; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid #25282E; }
.vw-nav { position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; }
.vw-nav:hover { background: rgba(255, 255, 255, .16); }
.vw-nav.l { left: 12px; } .vw-nav.r { right: 12px; }
.vw-other { text-align: center; color: #A9ABB3; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vw-other .ic { color: #6B6E76; }

/* ---------- Узкое окно / телефон ---------- */
@media (max-width: 1100px) { :root { --tree-w: 210px; --chat-w: 320px; } .hm { grid-template-columns: minmax(0, 1fr); } .hm-side { display: none; } .hm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .main { grid-template-columns: minmax(0, 1fr); padding: 0 6px 6px; }
  .tree-col { position: fixed; top: var(--top-h); bottom: 0; left: 0; width: min(300px, 84vw); z-index: 35; display: none; box-shadow: var(--shadow-lg); background: var(--panel); }
  .chat-col { position: fixed; top: var(--top-h); bottom: 0; right: 0; width: 100vw; z-index: 35; display: none; border-radius: 0; }
  .main.m-tree .tree-col { display: block; }
  .main.m-chat .chat-col { display: flex; }
  .brand-name, .top-crumb, .pill .pl-txt { display: none; }
  .cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .power-grid { grid-template-columns: repeat(3, 1fr); }
  .page { padding: 22px 18px; }
  .dk { padding: 0 10px; }
  .ide-body { grid-template-columns: minmax(0, 1fr) !important; }
  .cv-row { grid-template-columns: 40px 1fr 26px; } .cv-row .cv-arrow { display: none; } .cv-row .cv-sel, .cv-row .cv-res, .cv-row .cv-why { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Движение и плитки в духе «Dashboard V15» (js/core/motion.js) ===== */
:root { --r-lg: 18px; --r-xl: 22px; --spring: cubic-bezier(.22, 1.2, .36, 1); }
.hm-tile, .plan-card, .pack, .sub-card, .mcard, .acat, .trend, .ref { border-radius: 20px; }
.hm-tile, .plan-card, .pack, .sub-card, .sub-tile, .mcard, .acat, .trend, .ref, .wl-stat {
  transition: transform .28s var(--spring), box-shadow .28s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease); }
.hm-tile:hover, .plan-card:hover, .pack:hover, .sub-card:hover, .sub-tile:hover, .mcard:hover, .acat:hover, .trend:hover, .ref:hover {
  transform: translateY(-3px); box-shadow: 0 2px 4px rgba(22, 23, 26, .04), 0 14px 34px rgba(22, 23, 26, .09); }
.hm-tile:active, .plan-card:active, .pack:active, .sub-card:active, .mcard:active, .acat:active, .trend:active, .ref:active { transform: translateY(-1px) scale(.985); }

/* плитки всплывают по очереди */
.m-in { animation: m-rise .6s var(--spring) both; animation-delay: calc(var(--mi, 0) * 45ms); }
@keyframes m-rise { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* скользящая пилюля во вкладках (нижняя панель — без изменений) */
.m-pill { position: relative; isolation: isolate; }
.m-pill > .m-thumb { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 8px; background: var(--card); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); pointer-events: none;
  transition: transform .42s var(--spring), width .42s var(--spring), height .3s var(--ease), opacity .2s; }
.tabs.m-pill button.on, .seg.m-pill button.on { background: transparent; box-shadow: none; }

/* полукруглая шкала */
.m-gauge { display: block; overflow: visible; }
.m-gauge path { fill: none; stroke-linecap: round; }
.m-gauge .g-bg { stroke: var(--sunk); }
.m-gauge .g-fg { stroke: var(--accent); stroke-dasharray: var(--len); stroke-dashoffset: var(--off); animation: m-gauge 1.2s var(--ease) both .15s; }
@keyframes m-gauge { from { stroke-dashoffset: var(--len); } }

/* столбики */
.m-bars { display: flex; align-items: stretch; gap: 8px; }
.m-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.m-col small { font-size: 11px; color: var(--faint); }
.m-b { flex: 1; width: 100%; max-width: 30px; position: relative; border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--sunk) 0 4px, transparent 4px 8px); border: 1px solid var(--line); overflow: hidden; }
.m-b::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 999px; background: var(--accent-bg); border-top: 2px solid var(--accent-line);
  transform-origin: bottom; animation: m-grow .9s var(--spring) both; animation-delay: calc(.2s + var(--mi, 0) * 60ms); }
.m-b.top::after { background: var(--accent); border-top-color: var(--accent); }
@keyframes m-grow { from { transform: scaleY(0); } }

/* кошелёк: сводка */
.wl-stats { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 10px; margin: 2px 0 16px; }
.wl-stat { padding: 14px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wl-stat > span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.wl-stat .big { font-size: 30px; font-weight: 650; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.wl-stat .big small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.wl-stat .g-wrap { position: relative; display: grid; place-items: center; margin-top: 2px; }
.wl-stat .g-num { position: absolute; bottom: 0; font-size: 20px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wl-stat.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.wl-stat.accent > span, .wl-stat.accent .big small { color: rgba(255, 255, 255, .75); }
@media (max-width: 640px) { .wl-stats { grid-template-columns: 1fr; } }

/* смена раздела */
#content { view-transition-name: content; }
/* нижняя панель — свой слой: при смене раздела не накрывается снимком содержимого и не мигает */
#dock { view-transition-name: dock; }
::view-transition-group(dock), ::view-transition-old(dock), ::view-transition-new(dock) { animation: none; }
::view-transition-old(dock) { display: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(content) { animation: m-out .18s var(--ease) both; }
::view-transition-new(content) { animation: m-rise .45s var(--spring) both; }
@keyframes m-out { to { opacity: 0; transform: translateY(-6px) scale(.99); } }

@media (prefers-reduced-motion: reduce) {
  .m-in, .m-gauge .g-fg, .m-b::after, ::view-transition-old(content), ::view-transition-new(content) { animation: none !important; }
  .m-pill > .m-thumb { transition: none; }
}
/* полоски оценок в карточках моделей и индикаторы — растут слева */
.mcard .bar-r i b, .meter i { transform-origin: left; animation: m-growx .9s var(--spring) both .25s; }
@keyframes m-growx { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .mcard .bar-r i b, .meter i { animation: none; } }

/* Разработка: «Сначала план», «Править», «Версии» */
.btn.ghost.on { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
.prev-wrap.editing { box-shadow: inset 0 0 0 2px var(--accent); }
.ide-pane[data-pane="preview"] { position: relative; }
.ve-panel { position: absolute; right: 12px; bottom: 84px; z-index: 5; width: min(290px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: m-rise .35s var(--spring) both; }
.ve-h { display: flex; align-items: center; gap: 8px; }
.ve-h b { font: 600 12.5px var(--mono); color: var(--accent); }
.ve-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; flex: 1; }
.ve-f textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 9px; font: inherit; font-size: 13px; color: var(--text); background: var(--card); resize: vertical; outline: none; }
.ve-f textarea:focus, .ve-f .input:focus { border-color: var(--accent); }
.ve-f input[type="color"] { width: 100%; height: 32px; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; background: var(--card); cursor: pointer; }
.ve-row { display: flex; gap: 10px; }
.ve-check { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.ve-note { margin: 0; font-size: 12px; color: var(--muted); }
.ve-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; padding-top: 4px; border-top: 1px solid var(--line); }
.ver-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.ver { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); }
.ver b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver .muted { font-size: 12px; }

/* Иконки в стиле знака «Мягкий мозг»: мягкая заливка замкнутых фигур, градиент у активных */
.ic .cl { fill: currentColor; fill-opacity: .12; }
.dk.on .ic, .node-row.active .ic, .tile-ic .ic, .hm-tile .ic, .sub-card > .ic, .mm-item.on .ic, .tabs button.on .ic, .seg button.on .ic, .btn.ghost.on .ic { stroke: url(#mira-g); }
.dk.on .ic .cl, .node-row.active .ic .cl, .tile-ic .ic .cl, .hm-tile .ic .cl, .sub-card > .ic .cl { fill: url(#mira-g); fill-opacity: .22; }
.dk.on .ic { stroke-width: 2.3; }

/* ===== Вид Главной и цветовые схемы (js/shell/look.js) ===== */
.hm-main { isolation: isolate; }
.hm-look { position: absolute; right: 14px; bottom: 14px; z-index: 6; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--glass); color: var(--text-2); backdrop-filter: blur(10px); }
.hm-look:hover { color: var(--text); background: var(--card); }
.lk-panel { position: absolute; right: 14px; bottom: 62px; z-index: 7; width: 320px; max-height: calc(100% - 80px); overflow: auto; padding: 14px 16px 16px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: popin .16s var(--ease); }
.lk-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lk-h b { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.lk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13.5px; color: var(--text); cursor: pointer; }
.lk-sep { height: 1px; background: var(--line); margin: 8px 0; }
.lk-bgs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 4px; }
.lk-bg { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font-size: 10.5px; color: var(--muted); }
.lk-bg i { width: 100%; aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lk-bg.on i { border-color: var(--accent); }
.lk-bg.on span { color: var(--text); font-weight: 600; }
.bgp-none { background: var(--card); }
.bgp-dawn { background: linear-gradient(180deg, #FFFFFF 10%, #DCE3FF 45%, #A9B4FF 75%, #FFCDB8 100%); }
.bgp-dusk { background: linear-gradient(180deg, #DCE3FF 0%, #7C82EA 45%, #4F3FC0 75%, #2C2070 100%); }
.bgp-aurora { background: linear-gradient(180deg, #F2FBF8 0%, #9BEBD9 40%, #5CA8F0 72%, #1E4FD0 100%); }
.bgp-peach { background: linear-gradient(180deg, #FFF8F3 0%, #FFD9C6 45%, #F4B7C8 75%, #F0A6CF 100%); }
.lk-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.lk-mode { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.lk-mode.on span:last-child { color: var(--text); font-weight: 600; }
.lk-mode.on .lk-sw { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
/* мини-превью схемы: угол-акцент, кнопка «+», значок и блок */
.lk-sw { position: relative; display: block; width: 58px; height: 58px; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); flex: none; }
.lk-sw .corner { position: absolute; right: 0; top: 0; width: 56%; height: 50%; border-bottom-left-radius: 10px; }
.lk-sw .plus { position: absolute; right: 9px; top: 9px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--font); }
.lk-sw .ic { position: absolute; left: 9px; bottom: 9px; font: 600 14px/1 var(--font); font-style: normal; }
.lk-sw u { position: absolute; right: 6px; bottom: 6px; width: 46%; height: 34%; border-radius: 6px; }
.lk-sw.sys { background: linear-gradient(135deg, #2B2C31 50%, #FFFFFF 50%); }
.lk-sw.sys .plus { background: #FFFFFF; color: #222; box-shadow: 0 0 0 1px #DDD; }
.lk-sw.sys .ic { color: #DDD; }
.lk-sw.sys u { background: #EDEDF0; }
.lk-sw.multi { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; background: #EEE; }
.lk-sw.multi i { border-radius: 7px; }
.lk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.lk-cell { border: 0; background: none; padding: 4px; border-radius: 20px; display: grid; place-items: center; transition: transform .2s var(--ease); }
.lk-cell:hover { transform: translateY(-2px); }
.lk-cell.on .lk-sw { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
@media (max-width: 640px) { .lk-grid { grid-template-columns: repeat(4, 1fr); } }

/* фоны Главной: светлый верх под приветствием, мягкие пятна плавают */
.hm-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; display: none; }
.hm-main:not([data-bg="none"]) .hm-bg { display: block; }
.hm-bg::before { content: ""; position: absolute; inset: 0; }
.hm-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--card) 0%, color-mix(in srgb, var(--card) 70%, transparent) 30%, transparent 55%); }
.hm-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .7; }
.hm-bg i:nth-child(1) { width: 55%; height: 45%; left: -8%; bottom: -14%; animation: float1 24s ease-in-out infinite alternate; }
.hm-bg i:nth-child(2) { width: 50%; height: 45%; right: -8%; bottom: -10%; animation: float2 28s ease-in-out infinite alternate; }
.hm-bg i:nth-child(3) { width: 60%; height: 40%; left: 20%; bottom: -26%; animation: float3 32s ease-in-out infinite alternate; }
.hm-bg i:nth-child(4) { width: 36%; height: 30%; left: 32%; bottom: 14%; opacity: .5; animation: float4 26s ease-in-out infinite alternate; }
.hm-main[data-bg="dawn"] .hm-bg::before { background: linear-gradient(180deg, transparent 30%, #DCE3FF 62%, #B6BEFF 86%, #FFD6C4 100%); }
.hm-main[data-bg="dawn"] .hm-bg i:nth-child(1) { background: #8FA2FF; } .hm-main[data-bg="dawn"] .hm-bg i:nth-child(2) { background: #B9A4FF; }
.hm-main[data-bg="dawn"] .hm-bg i:nth-child(3) { background: #FFC9B5; } .hm-main[data-bg="dawn"] .hm-bg i:nth-child(4) { background: #BFD3FF; }
.hm-main[data-bg="dusk"] .hm-bg::before { background: linear-gradient(180deg, transparent 28%, #B9C3FF 50%, #6D6CE0 75%, #34257E 100%); }
.hm-main[data-bg="dusk"] .hm-bg i:nth-child(1) { background: #7C8CFF; } .hm-main[data-bg="dusk"] .hm-bg i:nth-child(2) { background: #C42F86; }
.hm-main[data-bg="dusk"] .hm-bg i:nth-child(3) { background: #3B2B9E; } .hm-main[data-bg="dusk"] .hm-bg i:nth-child(4) { background: #F2A0B8; }
.hm-main[data-bg="aurora"] .hm-bg::before { background: linear-gradient(180deg, transparent 30%, #C7F3E8 58%, #7FD8EC 80%, #5A7BF2 100%); }
.hm-main[data-bg="aurora"] .hm-bg i:nth-child(1) { background: #5EE6D0; } .hm-main[data-bg="aurora"] .hm-bg i:nth-child(2) { background: #4FB6FF; }
.hm-main[data-bg="aurora"] .hm-bg i:nth-child(3) { background: #5B5BE0; } .hm-main[data-bg="aurora"] .hm-bg i:nth-child(4) { background: #9BEBD9; }
.hm-main[data-bg="peach"] .hm-bg::before { background: linear-gradient(180deg, transparent 30%, #FFE3D4 58%, #F7C3CF 82%, #C9B8FF 100%); }
.hm-main[data-bg="peach"] .hm-bg i:nth-child(1) { background: #FFC2A8; } .hm-main[data-bg="peach"] .hm-bg i:nth-child(2) { background: #F4A7C0; }
.hm-main[data-bg="peach"] .hm-bg i:nth-child(3) { background: #F0A6CF; } .hm-main[data-bg="peach"] .hm-bg i:nth-child(4) { background: #FFE0A8; }
[data-theme="dark"] .hm-bg i { opacity: .45; }
[data-theme="dark"] .hm-main:not([data-bg="none"]) .hm-bg::before { opacity: .55; }
.hm-main:not([data-bg="none"]) .hm-tile, .hm-main:not([data-bg="none"]) .hm-chips .chip { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); }
@keyframes float1 { 50% { transform: translate(14%, -8%) scale(1.12); } 100% { transform: translate(6%, 6%) scale(.95); } }
@keyframes float2 { 50% { transform: translate(-16%, 6%) scale(1.08); } 100% { transform: translate(-6%, -8%) scale(1.15); } }
@keyframes float3 { 50% { transform: translate(-10%, -8%) scale(1.1); } 100% { transform: translate(12%, -3%) scale(.95); } }
@keyframes float4 { 50% { transform: translate(-22%, -6%) scale(1.2); } 100% { transform: translate(-8%, 6%) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .hm-bg i { animation: none !important; } }

/* Фон Главной оживает при наведении: в покое стоит, под курсором плавает и тянется за ним; под курсором — мягкое свечение */
.hm-main { --mx: 0; --my: 0; --px: 50%; --py: 50%; }
.hm-main .hm-bg i:nth-child(n) { animation-play-state: paused; transition: translate 1.2s cubic-bezier(.2, .8, .2, 1), opacity .6s; }
.hm-main:hover .hm-bg i:nth-child(n) { animation-play-state: running; }
.hm-bg i:nth-child(1) { translate: calc(var(--mx) * 46px) calc(var(--my) * 34px); }
.hm-bg i:nth-child(2) { translate: calc(var(--mx) * -38px) calc(var(--my) * 30px); }
.hm-bg i:nth-child(3) { translate: calc(var(--mx) * 24px) calc(var(--my) * -22px); }
.hm-bg i:nth-child(4) { translate: calc(var(--mx) * 64px) calc(var(--my) * 48px); }
.hm-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .5s;
  background: radial-gradient(420px circle at var(--px) var(--py), var(--accent-bg), transparent 70%); }
.hm-main:hover .hm-glow { opacity: 1; }
.hm-main:not([data-bg="none"]) .hm-glow { background: radial-gradient(460px circle at var(--px) var(--py), rgba(255, 255, 255, .35), transparent 70%); mix-blend-mode: soft-light; }
@media (prefers-reduced-motion: reduce) { .hm-bg i { translate: none !important; } .hm-glow { display: none; } }

/* ===== Контент в установленной программе (content-real.js) ===== */
.cm-media { display: block; width: 100%; max-width: 320px; margin-top: 8px; border-radius: 10px; background: #0B0C0E; }
audio.cm-media { background: none; height: 40px; }
.rc-jobs { display: flex; flex-direction: column; gap: 8px; }
.rc-job { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.rc-job-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); flex: none; }
.rc-job.done .rc-job-ic { background: rgba(46, 139, 87, .12); color: #2E8B57; }
.rc-job.error .rc-job-ic { background: rgba(220, 70, 70, .12); color: #D64545; }
.rc-job-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-job-b b { font-weight: 550; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-job-b small { font-size: 12px; color: var(--muted); }
.rc-job.error .rc-job-b small { color: #D64545; }
.rc-bar { display: block; height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin-top: 4px; }
.rc-bar em { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s; }
.rc-form { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.rc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-l { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.rc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.rc-pk { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 0; padding: 0; background: var(--sunk); cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .12s, transform .12s; }
.rc-pk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-pk:hover { transform: scale(1.02); }
.rc-pk.sel { outline-color: var(--accent); }
.rc-pk-n { position: absolute; top: 6px; right: 6px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .35); border: 1.5px solid #fff; }
.rc-pk.sel .rc-pk-n { background: var(--accent); }
.rc-pk-v { position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .5); }
.rc-alist { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.rc-ai { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 13px; }
.rc-ai span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ai.on { border-color: var(--accent); background: var(--accent-bg); }
.v-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-card { cursor: pointer; }
.rc-playic { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); transition: transform .15s; }
.v-card:hover .rc-playic { transform: scale(1.08); }
.rc-player { display: block; width: 100%; max-height: 70vh; background: #0B0C0E; }
.au .rc-audio { height: 34px; flex: 1.4; min-width: 180px; }
.rc-projs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rc-new { min-height: 196px; border-radius: 16px; border: 1.5px dashed var(--line-2); background: transparent; color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: inherit; padding: 16px; text-align: center; }
.rc-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.rc-new b { font-size: 15px; color: var(--text); }
.rc-new small { font-size: 12px; color: var(--muted); }
.rc-proj { border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; position: relative; transition: box-shadow .15s, transform .15s; }
.rc-proj:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rc-cov { height: 140px; background: #16171A center / cover no-repeat; display: grid; place-items: center; color: rgba(255, 255, 255, .5); }
.rc-pinfo { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.rc-pinfo b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }
.rc-pinfo small { font-size: 12px; color: var(--muted); }
.rc-proj [data-a="pdel"] { position: absolute; right: 8px; bottom: 10px; opacity: 0; transition: opacity .15s; }
.rc-proj:hover [data-a="pdel"] { opacity: 1; }
.rc-asp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rc-aspb { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: var(--text); }
.rc-aspb:hover { border-color: var(--accent); background: var(--accent-bg); }
.rc-aspb i { display: block; border: 2px solid currentColor; border-radius: 6px; opacity: .7; }
.rc-aspb i.r916 { width: 27px; height: 48px; }
.rc-aspb i.r169 { width: 64px; height: 36px; margin: 6px 0; }
.rc-aspb i.r11 { width: 44px; height: 44px; margin: 2px 0; }
.rc-aspb small { font-size: 11.5px; color: var(--muted); text-align: center; }

/* редактор монтажа */
.rx-top { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--card); flex: none; }
.rx-top .tsep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.rx-title { font: inherit; font-weight: 600; font-size: 14px; border: 0; background: transparent; color: var(--text); padding: 4px 8px; border-radius: 8px; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.rx-title:hover { background: var(--sunk); }
.rx-save { font-size: 12px; }
.rx-stage { position: relative; }
.rx-stage video, .rx-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-stage video[hidden], .rx-stage img[hidden], .rx-txt[hidden], .rx-empty[hidden], .rx-prog[hidden] { display: none; }
.rx-txt { position: absolute; left: 6%; right: 6%; text-align: center; color: #fff; font-family: "Segoe UI", Inter, sans-serif; font-weight: 700; line-height: 1.15; pointer-events: none; z-index: 2;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 1px 1px 2px #000, -1px -1px 2px #000; white-space: pre-wrap; }
.rx-txt.title { top: 50%; translate: 0 -50%; font-size: var(--tt, 32px); }
.rx-txt.sub { bottom: var(--sb, 40px); font-size: var(--ts, 18px); }
.rx-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: rgba(255, 255, 255, .6); text-align: center; padding: 20px; font-size: 13px; }
.rx-prog { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 6; height: 30px; border-radius: 10px; background: rgba(16, 17, 20, .82); backdrop-filter: blur(8px); overflow: hidden; display: flex; align-items: center; }
.rx-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); opacity: .55; transition: width .4s; }
.rx-prog span { position: relative; color: #fff; font-size: 12.5px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx .ed-bar .btn.sm { height: 30px; }
.rx .ed-insp .seg button { padding: 3px 9px; font-size: 12px; }
.rx .ed-insp .rx-text { width: 280px; }
.rx .clip-v { background-size: auto 100%; background-repeat: repeat-x; }
.rx .tl-ruler { cursor: pointer; }
.rx { padding-bottom: 76px; background: var(--panel); }
.rx .ed-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.rx-zoom { display: flex; align-items: center; justify-content: center; gap: 4px; }
.rx-zoom button { width: 26px; height: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.rx-zoom button:hover { color: var(--accent); border-color: var(--accent-line); }
.rc-vprices { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.rc-vp { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.rc-vp:hover { border-color: var(--accent-line); }
.rc-vp.on { border-color: var(--accent); background: var(--accent-bg); }
.rc-vp b { font-size: 13.5px; font-weight: 600; }
.rc-vp small { font-size: 11.5px; color: var(--muted); }
.rc-vp span { font-size: 12px; color: var(--text-2); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ===== Агенты в установленной программе (agents-real.js) ===== */
.ag-page { max-width: 1120px; }
.ag-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ag-top .tile-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.ag-name { font: inherit; font-size: 24px; font-weight: 650; letter-spacing: -.025em; border: 0; background: transparent; color: var(--text); padding: 4px 6px; border-radius: 8px; min-width: 0; flex: 1; max-width: 560px; }
.ag-name:hover, .ag-name:focus { background: var(--sunk); outline: none; }
.ag-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 0 0 14px 4px; }
.switch-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.ag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.ag-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ag-card h3 { margin: 0; font-size: 14px; font-weight: 650; }
.ag-card:first-child { grid-row: span 2; }
.ag-instr { min-height: 220px; resize: vertical; font-size: 13.5px; line-height: 1.5; }
.ag-hint { font-size: 12px; line-height: 1.45; }
.ag-trow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ag-num { width: 96px; height: 32px; }
.ag-card .seg { flex-wrap: wrap; height: auto; }
.ag-conns { display: flex; flex-direction: column; gap: 6px; }
.ag-conn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.ag-conn.on { border-color: var(--accent); background: var(--accent-bg); }
.ag-conn input { accent-color: var(--accent); }
.ag-ci { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--sunk); color: var(--text-2); flex: none; }
.ag-ci.big { width: 40px; height: 40px; border-radius: 12px; }
.ag-cb { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ag-cb b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-cb small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-bar { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.ag-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.ag-log { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.ag-le { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ag-le:last-child { border-bottom: 0; }
.ag-le span { font: 11.5px var(--mono); color: var(--muted); flex: none; padding-top: 2px; }
.ag-le p { margin: 0; white-space: pre-wrap; }
.ag-le.error p { color: #D64545; }
.ag-le.report { background: var(--accent-bg); }
.ag-le.draft p::before { content: "✎ "; }
.ag-le.action p::before { content: "✓ "; color: #2E8B57; }
.btn.pulse { box-shadow: 0 0 0 4px var(--accent-bg); }
.ag-clist { display: flex; flex-direction: column; gap: 8px; }
.ag-citem { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.ag-citem .seg button { padding: 4px 10px; font-size: 12px; }
.ag-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ag-type { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.ag-type:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.ag-type b { font-size: 14.5px; font-weight: 600; }
.ag-type small { font-size: 12px; color: var(--muted); }
.ag-steps { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.ag-preset { margin: 10px 0; }
.ag-preset .notice { align-items: center; }
.ag-wres { margin-top: 10px; }
.ag-apb { position: relative; }
.ag-apb i { position: absolute; right: -4px; top: -4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #fff; font: 600 10px/16px var(--font, inherit); font-style: normal; padding: 0 4px; }
.ag-aps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ag-ap { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ag-ap-h { display: flex; align-items: center; gap: 10px; }
.ag-ap-h b { font-weight: 600; font-size: 14px; }
.ag-ap textarea { min-height: 120px; font-size: 13.5px; line-height: 1.5; }
.ag-quote { font-size: 12.5px; padding-left: 8px; border-left: 2px solid var(--line-2); }
.ag-done { font-size: 13px; color: var(--muted); }
.ag-ap.sent .ag-done { color: #2E8B57; }
.ag-fields { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ag-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ag-ct { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ag-ct .btile-h b { font-size: 15px; }
.ag-ct p { margin: 0; color: var(--text-2); font-size: 13px; flex: 1; }
.ag-needs { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-ct .btn { align-self: flex-start; }
@media (max-width: 1100px) { .ag-grid { grid-template-columns: 1fr; } .ag-card:first-child { grid-row: auto; } }
.ag-adv[hidden], .ag-preset[hidden], .ag-wres[hidden] { display: none !important; }
.rc-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rc-post { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.rc-post img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--sunk); }
.rc-post-noimg { aspect-ratio: 4 / 2; display: grid; place-items: center; color: var(--muted); background: var(--sunk); font-size: 13px; }
.rc-post-b { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.rc-post-b p { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.ag-post { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: start; }
.ag-post img { width: 100%; border-radius: 10px; display: block; }
.rc-posts { align-items: start; }
.cm-divider { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--muted); font-size: 12px; }
.cm-divider::before, .cm-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.cm-divider span { white-space: nowrap; }
.ch-head .ch-hact { height: 28px; padding: 0 10px; font-size: 12px; white-space: nowrap; }

/* логотипы компаний-моделей */
.vlogo { flex: none; display: block; color: var(--text); }
.model-pick .vlogo, .cmp-model .vlogo { margin-right: 2px; }
.mm-item { align-items: center; }
.mm-item .mm-logo { margin-right: 10px; }
.cm .av.vlogo, .msg .av.vlogo { flex: none; }
.cm > .vlogo.av { width: 22px; height: 22px; margin-top: 1px; }
.msg > .vlogo.av { width: 26px; height: 26px; }
.av.busy { animation: av-breathe 1.4s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes av-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.86); opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .av.busy { animation: none; } }
.hm-top .hm-ctx { margin-left: auto; height: 32px; background: var(--card); }
.rc-pick > .muted { grid-column: 1 / -1; }
.cm .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-retry { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11.5px; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.cm-retry:hover { color: var(--accent); background: var(--accent-bg); }

/* плитка «Добавить файл» в выборе фото */
.rc-pk.rc-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1.5px dashed var(--line-2, var(--line)); color: var(--muted); font: 500 11.5px var(--font); text-align: center; padding: 6px; }
.rc-pk.rc-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-bg); }
.rc-pk.rc-add:disabled { opacity: .6; cursor: progress; }

/* лучшая модель в сетке цен видео — фирменный градиент «Рассвет» */
.rc-vp.best { border: 1.5px solid transparent; background: linear-gradient(135deg, color-mix(in srgb, #2F6BEB 12%, var(--card)), color-mix(in srgb, #7FE3C4 8%, var(--card)) 55%, color-mix(in srgb, #5FD6C8 16%, var(--card))) padding-box, linear-gradient(135deg, #2F6BEB, #7FE3C4 55%, #5FD6C8) border-box; box-shadow: 0 6px 24px -10px rgba(47, 107, 235, .55); }
.rc-vp.best.on { background: linear-gradient(var(--accent-bg), var(--accent-bg)) padding-box, linear-gradient(135deg, #2F6BEB, #7FE3C4 55%, #5FD6C8) border-box; }
.rc-best { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #2563EB, #0F9BB5); vertical-align: 1px; }

/* токен, уровень, спецпредложение (кошелёк) */
.tkn { flex: none; vertical-align: -3px; }
#wallet-pill .tkn { margin-right: 2px; }
.pack .tkn { display: block; margin: 0 auto 6px; }
#wl-bal { display: flex; align-items: center; gap: 8px; }
.wl-lvl { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; }
.wl-lvl-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.wl-lvl-b { font-weight: 700; padding: 3px 10px; border-radius: 99px; color: #fff; background: linear-gradient(135deg, #2563EB, #0F9BB5); }
.wl-lvl-bar { height: 8px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.wl-lvl-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #2F6BEB, #7FE3C4 60%, #5FD6C8); }
.wl-lvl-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-lvl-steps span { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--sunk); color: var(--muted); }
.wl-lvl-steps span.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.wl-offer { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; color: #fff; margin-bottom: 12px; background: linear-gradient(135deg, #2563EB, #0F9BB5); }
.wl-locked { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px; border-radius: 14px; border: 1px dashed var(--line-2, var(--line)); margin-bottom: 14px; }
.plan-card.hot { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #2F6BEB, #7FE3C4 55%, #5FD6C8) border-box; border: 1.5px solid transparent; }

/* ---------- Серверы (демо) ---------- */
.dk-soon { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); font-size: 0; pointer-events: none; }
.dk.on .dk-soon { display: none; }
.page-head .kicker .badge { margin-left: 6px; vertical-align: 1px; }
.srv-demo { margin-bottom: 18px; }
.srv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 22px; }
.srv-big { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; text-align: left; color: var(--text); cursor: pointer; transition: border-color .15s, transform .15s var(--ease); }
.srv-big:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.srv-big .ic { color: var(--accent); margin-bottom: 4px; }
.srv-big b { font-size: 15px; }
.srv-big span { font-size: 13px; line-height: 1.45; }
.srv-steps { padding: 6px 16px; }
.srv-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.srv-step:last-child { border-bottom: 0; }
.srv-step i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 650; background: var(--accent-bg); color: var(--accent); }
.srv-step div { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.srv-step span { font-size: 12.5px; }
.srv-foot { font-size: 12px; margin-top: 12px; }
.srv-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 22px; }
.srv-plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px 16px; }
.srv-plan.hot { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }
.srv-hot { position: absolute; top: -10px; left: 14px; background: var(--card); }
.srv-name { font-size: 14px; }
.srv-price { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.srv-price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.srv-tk { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.srv-spec { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.srv-spec li { display: flex; align-items: center; gap: 7px; }
.srv-spec .ic { color: var(--muted); }
.srv-for { font-size: 12.5px; line-height: 1.45; flex: 1; margin: 6px 0 8px; }
.srv-inc { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; padding: 16px; font-size: 13px; }
.srv-inc span { display: flex; align-items: center; gap: 8px; }
.srv-inc .ic { color: var(--accent); flex: none; }
.srv-search { display: flex; gap: 8px; margin-bottom: 12px; }
.srv-search .input { flex: 1; min-width: 0; }
.srv-doms { padding: 4px 14px; }
.srv-dom { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.srv-dom:last-child { border-bottom: 0; }
.srv-dom.busy b { color: var(--muted); text-decoration: line-through; }
.srv-dom .grow { font-size: 12.5px; }
.srv-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); overflow: hidden; }
.srv-zones div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--card); font-size: 13px; }
.srv-zones b { font-size: 15px; }
.srv-zones small { font-size: 11.5px; }
.srv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; }
.srv-empty .ic { color: var(--muted); }

/* ---------- Обновление ---------- */
.upd-pill { color: var(--accent); border-color: var(--accent-line); background: var(--accent-bg); gap: 6px; }
.upd-pill:hover { background: var(--accent); color: #fff; }

/* ---------- Готовые решения (кейсы) ---------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.case { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.case-t { font-size: 15.5px; line-height: 1.3; }
.case-who { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: -4px; }
.case-row { display: flex; flex-direction: column; gap: 3px; }
.case-row span { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.case-row p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.case-row.pain span { color: var(--danger); }
.case-row.fix span { color: var(--ok); }
.case-st { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin-top: 2px; }
.case-st div { background: var(--sunk); padding: 8px 9px; display: flex; flex-direction: column; gap: 2px; }
.case-st small { font-size: 10.5px; color: var(--muted); }
.case-st b { font-size: 12px; font-weight: 600; line-height: 1.3; }
.case-st div:first-child b { color: var(--accent); }
.case-act { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.case-shot { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: var(--sunk); cursor: pointer; }
.case-shot iframe { position: absolute; left: 0; top: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.case-shot span { position: absolute; right: 8px; bottom: 8px; display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; background: rgba(20, 20, 28, .82); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.case-shot:hover span, .case-shot:focus-visible span { opacity: 1; }
.case-frame { height: min(72vh, 760px); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.case-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.trend-b .trend-biz { display: flex; gap: 5px; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.trend-b .trend-src { display: flex; gap: 5px; align-items: center; font-size: 11px; color: var(--accent); margin-top: 1px; }

/* подсказки «как повторить» */
.hint-steps { display: flex; flex-direction: column; gap: 16px; }
.hint-steps section { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--sunk); }
.hint-steps b { display: flex; align-items: center; gap: 10px; font-size: 14.5px; margin-bottom: 6px; }
.hint-steps b i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; background: var(--accent); color: #fff; flex: none; }
.hint-steps p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.hint-ph { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.hint-ph li { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-2); }
.hint-ph li span { flex: 1; }
.hint-prompt { margin-top: 8px !important; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line-2); font-family: var(--mono, monospace); font-size: 12.5px !important; }

/* ---------- Mira Pro: голосом ---------- */
.cmp.vz { --lvl: 0; }
.vz-row { display: flex; align-items: center; gap: 18px; padding: 14px 16px 6px; }
.vz-mic { position: relative; flex: none; width: 74px; height: 74px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #7FE3C4, #2F6BEB 55%, #1E4FD0); box-shadow: 0 12px 30px -10px rgba(30,79,208,.6); transition: transform .2s; }
.vz-mic:hover { transform: scale(1.04); } .vz-mic:active { transform: scale(.96); }
.vz-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(47,107,235,.5); transform: scale(calc(1 + var(--lvl) * .35)); opacity: calc(.3 + var(--lvl)); transition: transform .08s, opacity .08s; pointer-events: none; }
.vz-listen .vz-mic { background: radial-gradient(circle at 35% 30%, #5FD6C8, #FF7A6B 60%, #E8505B); }
.vz-listen .vz-ring { border-color: rgba(255,122,107,.6); }
.vz-think .vz-ring { animation: vzspin 1.1s linear infinite; border-style: dashed; opacity: .8; }
.vz-speak .vz-ring { animation: vzpulse 1.2s ease-in-out infinite; }
.vz-confirm .vz-mic { background: radial-gradient(circle at 35% 30%, #9BE7B5, #2EAD6B 60%, #1F8A5B); }
@keyframes vzspin { to { transform: rotate(360deg); } }
@keyframes vzpulse { 50% { transform: scale(1.18); opacity: .25; } }
.vz-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vz-txt b { font-size: 17px; } .vz-txt span { font-size: 13px; color: var(--muted); }
.vz-voice { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.vact { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent-line); background: var(--accent-bg); flex-wrap: wrap; }
.vact .grow { display: flex; flex-direction: column; min-width: 180px; } .vact b { font-size: 14.5px; } .vact span { font-size: 12.5px; color: var(--text-2); }
.vact.done { border-color: var(--line); background: var(--sunk); font-size: 13px; }
.msg.user .vmark { vertical-align: -2px; margin-right: 6px; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .vz-ring { animation: none !important; transition: none; } }
.cmp.vz, .cmp.vz.big { min-height: 0; }
.cmp.vz .vz-row { padding-top: 16px; }
.vz-listen .vz-txt span, .vz-think .vz-txt span, .vz-speak .vz-txt span, .vz-confirm .vz-txt span { visibility: hidden; }
.cmp.vz textarea { display: block; margin: 4px 0 2px; }

/* Приветствие Mira: приложение под лёгким стеклом, кнопка «Начать»; голос — маленькая волна рядом с чатом */
.hello-glass { position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 18%, transparent);
  -webkit-backdrop-filter: blur(7px) saturate(1.1); backdrop-filter: blur(7px) saturate(1.1);
  transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1), backdrop-filter 1.2s ease, -webkit-backdrop-filter 1.2s ease; }
.hello-glass.out { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); pointer-events: none; }
.hello-start { display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 30px 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 19px/1 Inter, system-ui, sans-serif; letter-spacing: -.01em; color: #fff;
  background: linear-gradient(135deg, #2563EB, #0F9BB5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 18px 44px -14px rgba(95, 214, 200, .55), 0 10px 30px -12px rgba(47, 107, 235, .55);
  opacity: 0; transform: translateY(10px) scale(.94); transition: opacity .5s ease, transform .7s cubic-bezier(.34, 1.56, .64, 1), filter .2s; outline: none; }
.hello-glass.ready .hello-start { opacity: 1; transform: none; }
.hello-start:hover { filter: brightness(1.06); }
.hello-start:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px #2F6BEB; }
.hs-mark { position: relative; width: 26px; height: 26px; }
.hs-mark i { position: absolute; width: 8px; height: 8px; border-radius: 3px; background: #FCFFFF; }
.hs-mark i:nth-child(1) { left: 2px; top: 16px; opacity: .7; } .hs-mark i:nth-child(2) { left: 9px; top: 9px; opacity: .85; } .hs-mark i:nth-child(3) { left: 16px; top: 2px; }
.hello-glass.ready .hs-mark i { animation: hs-step 2.2s ease-in-out infinite; }
.hello-glass.ready .hs-mark i:nth-child(2) { animation-delay: .15s; } .hello-glass.ready .hs-mark i:nth-child(3) { animation-delay: .3s; }
@keyframes hs-step { 0%, 70%, 100% { transform: none; } 35% { transform: translateY(-3px); } }
.mira-wave { position: fixed; z-index: 2147481000; transform: translate(-50%, 8px) scale(.9); opacity: 0; display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px -14px rgba(47, 107, 235, .45); cursor: pointer; transition: opacity .4s ease, transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.mira-wave.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.mira-wave.out { opacity: 0; transform: translate(-50%, 6px) scale(.92); pointer-events: none; }
.mira-wave i { display: block; width: 4px; height: 30px; border-radius: 9px; background: linear-gradient(180deg, #2F6BEB, #5FD6C8); transform: scaleY(.16); transition: transform .07s linear; }
.mira-wave:hover { border-color: #2F6BEB; }
@media (prefers-reduced-motion: reduce) { .hello-glass.ready .hs-mark i { animation: none; } }

/* Кошелёк 03.11.2026: обучение, топ-единицы, «Заработать вместе с Mira» */
.wl-course { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(47, 107, 235, .08), rgba(252, 255, 255, 0) 45%, rgba(95, 214, 200, .08)); }
.wl-course > div { flex: 1; display: grid; gap: 4px; } .wl-course b { display: inline-flex; align-items: center; gap: 6px; } .wl-course .muted { font-size: 12.5px; }
.wl-units { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; }
.wl-units b { margin-right: 4px; }
.wl-units .tu { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--sunk); }
.wl-units .tu i { font-style: normal; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #2563EB, #0F9BB5); }
.wl-locked .btn { margin-top: 10px; }
.earn { display: grid; gap: 12px; }
.earn-h { display: grid; gap: 4px; } .earn-h b { font-size: 17px; }
.earn-link { display: flex; gap: 8px; } .earn-link input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--text); font: inherit; font-size: 13px; }
.earn-st { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.earn-st div { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--sunk); text-align: center; }
.earn-st b { font-size: 22px; background: linear-gradient(120deg, #2F6BEB, #5FD6C8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.earn-st span { font-size: 12px; color: var(--muted); }
.earn-in { display: grid; gap: 6px; font-size: 12.5px; }
.model-top { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #2563EB, #0F9BB5); }

/* живая цена: память разговора и «Сжать» */
.cmp .price .ctx { display: inline-block; vertical-align: middle; width: 38px; height: 5px; margin-right: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.cmp .price .ctx i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2F6BEB, #22B8CF); transition: width .3s ease; }
.cmp .price .ctx i.hi { background: linear-gradient(90deg, #7FE3C4, #5FD6C8); }
.cmp .price .ctx-cut { margin-right: 8px; height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 11.5px; cursor: pointer; }
.cmp .price .ctx-cut:hover { border-color: #2F6BEB; }

/* Веб-версия: вход, экран «Домой», живой фон */
#web-gate { position: fixed; inset: 0; z-index: 2147483500; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); overflow: auto; }
#web-gate::before { content: ""; position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(40% 35% at 20% 25%, rgba(47, 107, 235, .22), transparent 70%), radial-gradient(38% 34% at 80% 75%, rgba(95, 214, 200, .2), transparent 70%);
  animation: wg-float 14s ease-in-out infinite alternate; }
@keyframes wg-float { to { transform: translate3d(4%, -3%, 0) rotate(6deg); } }
.wg { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.wg-card { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 30px 22px; border-radius: 26px; background: color-mix(in srgb, var(--card) 86%, transparent);
  border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -30px rgba(5, 60, 90, .35); animation: wg-in .6s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes wg-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.wg-card h1 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.02em; }
.wg-card p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.wg-btn { width: 100%; height: 50px; font-size: 16px; }
.wg-or { font-size: 12.5px !important; }
.wg-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; width: 100%; text-align: left; }
.wg-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--sunk); font-size: 14.5px; }
.wg-i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--card); color: #2F6BEB; box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .2); }
#web-gate .spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: #2F6BEB; animation: spin .8s linear infinite; }
html.web body::before { content: ""; position: fixed; inset: -15%; z-index: -1; pointer-events: none;
  background: radial-gradient(34% 30% at 12% 18%, rgba(47, 107, 235, .10), transparent 70%), radial-gradient(30% 28% at 88% 82%, rgba(95, 214, 200, .09), transparent 70%), radial-gradient(26% 24% at 70% 10%, rgba(34, 184, 207, .08), transparent 70%);
  animation: wg-float 22s ease-in-out infinite alternate; }
html.web #pc-pill { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #web-gate::before, html.web body::before { animation: none; } }

/* Телефон и узкое окно (в том числе веб-версия): панель голоса не сжимается, всё помещается в ширину */
.cmp.vz, .hm-hero > * { flex-shrink: 0; }
.wl-stat.accent { background: linear-gradient(135deg, #2F6BEB 0%, #3BAAD6 35%, #7FE3C4 75%, #5FD6C8 100%); }
@media (max-width: 600px) {
  .cmp.vz .vz-row { gap: 12px; padding: 12px 6px 4px; }
  .vz-mic { width: 62px; height: 62px; }
  .vz-txt b { font-size: 15.5px; } .vz-txt span { font-size: 12.5px; }
  .cmp-bar { flex-wrap: wrap; row-gap: 6px; }
  .cmp .price { margin-left: auto; font-size: 11.5px; }
  .cmp .model-menu { width: calc(100vw - 28px); left: -6px; }
  .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .plans { grid-template-columns: 1fr !important; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .wl-course { flex-direction: column; align-items: stretch; }
  .earn-st b { font-size: 18px; }
}

/* Контент → Моушен и анимация */
.mg-styles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mg-box { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(120deg, rgba(47, 107, 235, .06), transparent 40%, rgba(95, 214, 200, .06)), var(--card); }
.mg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mg-row .seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--sunk); gap: 2px; }
.mg-row .seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.mg-row .seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); font-weight: 600; }
.mg-st { font-size: 13px; } .mg-price { font-size: 13px; color: var(--muted); }
.mg-prog { position: relative; height: 34px; border-radius: 10px; background: var(--sunk); overflow: hidden; display: flex; align-items: center; padding: 0 12px; font-size: 13px; }
.mg-prog i { position: absolute; inset: 0 auto 0 0; width: 6%; background: linear-gradient(90deg, rgba(47, 107, 235, .25), rgba(95, 214, 200, .25)); transition: width .4s ease; }
.mg-prog span { position: relative; }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mg-item { padding: 10px; border-radius: 18px; display: grid; gap: 8px; }
.mg-frame { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #0f1013; max-height: 460px; }
.mg-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mg-frame.big { max-height: 72vh; }
.mg-meta { display: grid; gap: 2px; font-size: 13px; } .mg-meta .muted { font-size: 12px; }
.mg-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.trend-motion .mg-frame { aspect-ratio: 16 / 9; }

.trend-img.wide { aspect-ratio: 16 / 9; }
.trend-img.wide img { object-fit: cover; }

/* Обучение */
.learn .ln { padding: 0; margin-bottom: 10px; border-radius: 18px; overflow: hidden; }
.ln-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ln-h b { display: block; font-size: 15.5px; } .ln-h small { font-size: 12.5px; }
.ln-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2563EB, #0F9BB5); }
.ln.done .ln-n { background: #1F8A5B; }
.ln-b { padding: 0 16px 16px; display: grid; gap: 12px; }
.ln-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.ln-steps li { position: relative; display: grid; gap: 6px; padding: 10px 12px 10px 40px; border-radius: 14px; background: var(--sunk); }
.ln-steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--line); color: var(--text-2); }
.ln-steps li.cur::before { background: #2F6BEB; color: #fff; } .ln-steps li.ok::before { background: #1F8A5B; color: #fff; content: "✓"; }
.ln-steps li > b { font-size: 13px; } .ln-steps .muted { font-size: 13px; } .ln-steps .btn { justify-self: start; }
.ln-wait { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; } .ln-wait .spin { width: 14px; height: 14px; border-width: 2px; }
.ln-res { width: 100%; max-width: 420px; border-radius: 12px; display: block; }
.ln-pre { white-space: pre-wrap; margin: 0; font: 13px/1.5 ui-monospace, Consolas, monospace; }
.ln-why { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; background: linear-gradient(120deg, rgba(47, 107, 235, .08), rgba(95, 214, 200, .08)); }
.ln-buy { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; margin-bottom: 8px; background: linear-gradient(120deg, rgba(47, 107, 235, .1), transparent 50%, rgba(95, 214, 200, .1)), var(--card); }
.ln-buy > div { flex: 1; display: grid; gap: 4px; } .ln-buy b { font-size: 17px; }
.ln-prog { display: grid; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.ln-prog .bar { height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; } .ln-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2F6BEB, #5FD6C8); }
@media (max-width: 600px) { .ln-buy { flex-direction: column; align-items: stretch; } }
.mg-prog[hidden] { display: none; }

/* Разработка → Кейсы Mira */
.cases-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.case-tile { position: relative; display: grid; gap: 10px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .25s var(--spring, ease), box-shadow .25s; }
.case-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -18px rgba(5, 60, 90, .4); }
.ct-art { display: grid; place-items: end start; height: 110px; border-radius: 12px; padding: 12px; color: #fff; }
.ct-art b { font-size: 22px; letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.ct-b { display: grid; gap: 3px; } .ct-b b { font-size: 14.5px; } .ct-b small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ct-go { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #16171a; }

/* Лучшие модели: название переливается фирменным градиентом (вместо значка «ТОП») */
.best-name { background: linear-gradient(90deg, #2563EB, #0F9BB5, #1E4FD0, #2563EB); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; animation: best-flow 6s linear infinite; }
@keyframes best-flow { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .best-name { animation: none; } }

/* разделы без чата справа (Обучение) */
.main.solo, .main.solo.no-tree, .main.solo.no-chat { grid-template-columns: var(--tree-w) minmax(0, 1fr) 0; }
.main.solo.no-tree { grid-template-columns: 0 minmax(0, 1fr) 0; }
.main.solo .chat-col, .main.solo .rail-r { display: none; }
