/* ===== Перенесено из прошлой версии: инструменты в ответах и админка ===== */
.arena-head .stats{ margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-modal{ max-width: 460px; }
.fm-fields{ display: grid; grid-template-columns: 72px 1fr; gap: 12px; margin: 14px 0 18px; }
.fm-fields .field + .field{ margin-top: 0; }
.fm-fields .field:not(.short){ grid-column: 1 / -1; }
.fm-fields .field.short + .field{ grid-column: 2; }
.fm-fields .field.short input{ text-align: center; font-size: 20px; padding: 6px; }
.fm-fields .textarea{ min-height: 120px; }
.hint-s{ font-size: 12px; color: var(--faint); margin: 0; }
.st-bar{ height: 6px; border-radius: 4px; background: rgba(var(--ov),.06); overflow: hidden; }
.st-bar i{ display: block; height: 100%; background: var(--bit); border-radius: 4px; }
.tl{ display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 10px; text-align: left; transition: background .12s; }
.tl:hover{ background: rgba(var(--ov),.06); }
.tl.on{ background: var(--bit-soft); }
.tl:hover .tl-e{ transform: scale(1.08) rotate(-4deg); }
.hx{ border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--panel); margin: 10px 0; }
.hx-head{ display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 12px; border-bottom: 1px solid var(--line); background: rgba(var(--ov),.02); flex-wrap: wrap; }
.hx-head > b{ font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.hx-head .sp{ flex: 1; }
.hx-dots{ display: flex; gap: 5px; margin-right: 4px; }
.hx-dots i{ width: 9px; height: 9px; border-radius: 50%; background: rgba(var(--ov),.12); }
.hx-dots i:first-child{ background: #ff6159; }
.hx-dots i:nth-child(2){ background: #ffbd2e; }
.hx-dots i:nth-child(3){ background: #28c941; }
.hx-body{ position: relative; height: 460px; background: #fff; }
.hx.canvasy .hx-body{ height: auto; aspect-ratio: 16 / 9; background: #000; }
.hx-frame, .hx-frame iframe{ width: 100%; height: 100%; border: 0; display: block; }
.hx-body:fullscreen{ height: 100%; }
.hx-code{ margin: 0; height: 100%; overflow: auto; background: var(--code); color: var(--text-2); font-family: var(--mono); font-size: 12px; padding: 14px; white-space: pre; }
.hx.canvasy .hx-code{ position: absolute; inset: 0; }
.rec-btn{ color: #ff6b6b; border-color: rgba(255,107,107,.35); }
.rec-btn svg{ width: 12px; height: 12px; animation: recBlink 1.2s steps(2) infinite; }
.hx-rec{ position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 12.5px; backdrop-filter: blur(8px); }
.rec-dot{ width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; animation: recBlink 1s steps(2) infinite; }
.hx-rec span:last-child{ font-variant-numeric: tabular-nums; color: rgba(255,255,255,.75); }
.hx-saved{ display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; color: var(--text-2); }
.hx-saved svg{ width: 16px; height: 16px; color: var(--ok); }
.hx-saved b{ margin-left: auto; color: var(--bit-strong); font-weight: 550; }
.hx-saved:hover{ background: rgba(var(--ov),.03); }
.svg-stage{ display: grid; place-items: center; padding: 18px; background: repeating-conic-gradient(rgba(var(--ov),.04) 0 25%, transparent 0 50%) 0 0 / 18px 18px; border-radius: 10px; }
.svg-stage img{ max-width: 100%; max-height: 380px; }
.tb-wrap{ overflow: auto; max-height: 460px; border-radius: 10px; border: 1px solid var(--line); }
.tb{ width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th{ position: sticky; top: 0; background: var(--panel-2); text-align: left; font-weight: 600; padding: 8px 12px; cursor: pointer; white-space: nowrap; user-select: none; border-bottom: 1px solid var(--line-2); }
.tb th:hover{ color: var(--bit-strong); }
.tb td{ padding: 7px 12px; border-bottom: 1px solid var(--line); }
.tb tr:nth-child(even) td{ background: rgba(var(--ov),.015); }
.tb tr:hover td{ background: rgba(var(--bit-rgb),.05); }
.bb-files{ display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.bb-file{ border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); overflow: hidden; }
.bf-top{ display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
.bf-ic{ width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(var(--ov),.05); }
.bf-n{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bf-n b{ font-size: 13.5px; font-family: var(--mono); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.bf-n small{ font-size: 11.5px; color: var(--faint); }
.bf-pre{ margin: 0; padding: 10px 14px; background: var(--code); font-family: var(--mono); font-size: 11.5px; color: var(--text-2); max-height: 170px; overflow: auto; border-top: 1px solid var(--line); }
.cd-bar{ height: 3px; border-radius: 3px; background: rgba(var(--ov),.06); margin: 2px 0 14px; overflow: hidden; }
.cd-bar i{ display: block; height: 100%; background: var(--bit); transition: width .4s var(--ease); }
.cd{ display: block; width: 100%; height: 200px; perspective: 1000px; }
.cd-in{ position: relative; display: block; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.3,1.3,.5,1); transform-style: preserve-3d; }
.cd.flip .cd-in{ transform: rotateY(180deg); }
.cd-f, .cd-b{ position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-size: 20px; font-weight: 600; text-align: center; line-height: 1.35; }
.cd-f{ background: linear-gradient(160deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--line-2); }
.cd-f small{ font-size: 11.5px; font-weight: 400; color: var(--faint); }
.cd-b{ background: linear-gradient(160deg, rgba(var(--bit-rgb),.16), rgba(var(--bit-rgb),.05)); border: 1px solid rgba(var(--bit-rgb),.35); transform: rotateY(180deg); font-weight: 500; font-size: 17px; }
.cd-btns{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.cd-done{ display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 0 6px; text-align: center; }
.cd-done b{ font-size: 30px; font-weight: 650; }
.cd-done span{ color: var(--muted); font-size: 13.5px; }
.bb-ask{ border-color: rgba(var(--bit-rgb),.3); background: linear-gradient(180deg, rgba(var(--bit-rgb),.05), transparent 120px), var(--panel); }
.ask-q + .ask-q{ margin-top: 14px; }
.ask-t{ font-size: 14px; font-weight: 550; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.ask-t small{ font-size: 11px; color: var(--faint); font-weight: 400; }
.ask-o{ display: flex; flex-wrap: wrap; gap: 6px; }
.ask-o .chip{ height: 32px; }
.ask-o .chip.on{ border-color: var(--bit); background: var(--bit-soft); color: var(--bit-strong); }
.ask-in{ height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; flex: 1 1 160px; min-width: 140px; }
.bb-ask .btns{ margin-top: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ask-sum{ display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ask-sum div{ display: flex; gap: 10px; }
.ask-sum span{ color: var(--muted); }
.deck{ border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); padding: 12px; margin: 10px 0; }
.deck-head{ display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.deck-ic{ width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: rgba(var(--ov),.05); }
.deck-ti{ display: flex; flex-direction: column; min-width: 0; }
.deck-ti b{ font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.deck-ti small{ font-size: 11.5px; color: var(--muted); }
.deck-head .sp{ flex: 1; }
.deck-stage{ position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px var(--shadow); cursor: zoom-in; }
.deck-stage .sl{ border-radius: 12px; }
.dk-arr{ position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s; backdrop-filter: blur(6px); }
.dk-arr svg{ width: 16px; height: 16px; }
.dk-arr.l{ left: 10px; }
.dk-arr.r{ right: 10px; }
.deck-stage:hover .dk-arr:not(:disabled){ opacity: 1; }
.dk-arr:disabled{ display: none; }
.deck-thumbs{ display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.dk-th{ flex: none; width: 112px; border-radius: 6px; overflow: hidden; outline: 2px solid transparent; outline-offset: 1px; opacity: .65; transition: opacity .15s, outline-color .15s; }
.dk-th .sl{ border-radius: 6px; pointer-events: none; }
.dk-th:hover{ opacity: 1; }
.dk-th.on{ opacity: 1; outline-color: var(--bit); }
.deck-notes{ margin-top: 8px; font-size: 13px; color: var(--text-2); }
.deck-notes summary{ cursor: pointer; color: var(--muted); font-size: 12.5px; }
.deck-notes p{ margin: 6px 0 0; line-height: 1.55; }
.deck-acts{ display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.dk-busy, .dk-ok{ font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.dk-ok svg{ width: 14px; height: 14px; color: var(--ok); }
.th-sw{ position: relative; width: 34px; height: 22px; border-radius: 6px; display: block; border: 1px solid rgba(var(--ov),.15); overflow: hidden; }
.th-sw i{ position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px; border-radius: 2px; }
.th-sw.auto{ background: conic-gradient(#0f1222, #f6f1e7, #3a1250, #0f1f17, #07070c, #0f1222); }
.pr-stage{ width: min(100vw, 177.78vh); }
.pr-stage .sl{ border-radius: 0; animation: prIn .35s var(--ease); }
.pr-bar{ position: fixed; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.08); }
.pr-bar i{ display: block; height: 100%; background: var(--s-acc, var(--bit)); transition: width .3s var(--ease); }
.pr-x{ position: fixed; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; opacity: .4; }
.pr-x:hover{ opacity: 1; }
.pr-x svg{ width: 18px; height: 18px; }
.pres-modal{ max-width: 560px; }
.pres-top{ display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.pres-ic{ width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--bit-soft); flex: none; }
.pres-top h3{ margin: 0 0 4px; }
.pres-top p{ margin: 0; color: var(--muted); font-size: 13px; }
.pres-modal .textarea{ min-height: 80px; }
.pres-row{ display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 14px; }
.pres-row .field + .field{ margin-top: 0; }
.pres-modal .field{ margin-top: 14px; }
.pres-modal .label b{ color: var(--bit-strong); }
.pres-themes{ display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pt .th-sw{ width: 100%; height: 26px; }
.pres-modal .switch{ margin-top: 14px; }
@media (max-width: 560px){
.pres-themes{ grid-template-columns: repeat(3, 1fr); }
.pres-row{ grid-template-columns: 1fr; }
}
.story-acts{ display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.story-vid{ position: relative; border-radius: 12px; overflow: hidden; margin-bottom: 12px; cursor: pointer; aspect-ratio: 16/9; background: #000; }
.story-vid video{ width: 100%; height: 100%; object-fit: cover; }
.story-vid span{ position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }
.story-vid span svg{ width: 14px; height: 14px; }
.story-pages{ display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sp-pg{ border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column; }
.sp-img{ position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(var(--bit-rgb),.08), rgba(var(--ov),.03)); display: grid; place-items: center; overflow: hidden; }
.sp-img img{ width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; animation: imgIn 1s var(--ease); }
.sp-img .bb-run{ position: absolute; inset: 0; }
.sp-ph{ font-size: 34px; font-weight: 700; color: rgba(var(--ov),.1); font-family: "Unbounded", var(--font); }
.sp-t{ padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.sp-t b{ font-size: 11px; color: var(--bit-strong); }
.sp-t p{ margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.sp-t audio{ width: 100%; height: 32px; }
.badge{ display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(var(--ov),.07); color: var(--text-2); white-space: nowrap; }
.badge.ok{ background: rgba(143,214,161,.13); color: var(--ok); }
.badge.wait{ background: rgba(var(--bit-rgb),.14); color: var(--bit-strong); }
.badge.bad{ background: var(--err-soft); color: var(--err); }
.badge.gold{ background: linear-gradient(135deg, rgba(var(--bit-rgb),.25), rgba(255,160,60,.2)); color: var(--bit-strong); }
.row-in{ display: flex; gap: 8px; align-items: center; }
.row-in .input{ flex: 1; }
.row-in .pre{ color: var(--muted); }
.adm-load{ padding: 30px; display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13.5px; }
.adm-body .card + .card, .adm-grid2 + .card, .card + .adm-grid2, .adm-grid2 + .adm-grid2, .adm-tiles + .adm-grid2{ margin-top: 14px; }
.adm-tiles{ display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.adm-grid2{ display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.adm-today{ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
.adm-today > div{ border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.adm-today span svg{ width: 15px; height: 15px; color: var(--bit-strong); }
.adm-today b{ font-size: 20px; font-variant-numeric: tabular-nums; }
.adm-today b i{ font-style: normal; font-size: 12px; color: var(--faint); font-weight: 500; }
.adm-today small{ font-size: 11px; color: var(--muted); }
.pend{ display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.pend + .pend{ border-top: 1px solid var(--line); border-radius: 0; }
.pend-i{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pend-i b{ font-size: 14px; }
.pend-i small{ font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-a{ display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.adm-u{ display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 6px; border-radius: 10px; text-align: left; }
.adm-u:hover{ background: rgba(var(--ov),.04); }
.adm-u span{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-u b{ font-size: 13.5px; }
.adm-u small{ font-size: 11.5px; color: var(--faint); }
.adm-u em{ font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-empty{ text-align: center; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ae-ic{ font-size: 40px; }
.adm-empty p{ margin: 0 0 8px; color: var(--muted); font-size: 13.5px; max-width: 380px; }
.adm-filter{ display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.adm-filter .sp{ flex: 1; }
.adm-filter .search{ display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); min-width: 240px; flex: 0 1 320px; }
.adm-filter .search svg{ width: 15px; height: 15px; color: var(--muted); }
.adm-filter .search input{ border: 0; background: transparent; outline: none; flex: 1; font-size: 13.5px; }
.ulist{ display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.urow{ display: grid; grid-template-columns: 30px minmax(0, 1.4fr) auto minmax(0, 1.2fr) minmax(0, .9fr); gap: 14px; align-items: center; padding: 11px 14px; text-align: left; transition: background .12s; }
.urow + .urow{ border-top: 1px solid var(--line); }
.urow:hover{ background: rgba(var(--ov),.03); }
.ur-id{ display: flex; flex-direction: column; min-width: 0; }
.ur-id b{ font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-id small{ font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-use{ display: flex; gap: 10px; }
.ur-use i{ display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ur-use i svg{ width: 14px; height: 14px; color: var(--muted); }
.ur-use i.off{ opacity: .3; }
.ur-use em{ font-style: normal; }
.ur-meta{ display: flex; flex-direction: column; align-items: flex-end; }
.ur-meta small{ font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ad-head{ display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 12px; }
.ad-id{ flex: 1; min-width: 0; }
.ad-id h3{ margin: 0 0 3px; font-size: 19px; }
.ad-id p{ margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: 13.5px; }
.ad-id small{ display: block; margin-top: 6px; font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.ad-acts{ display: flex; gap: 6px; flex-wrap: wrap; padding: 0 22px 12px; }
.ad-tabs{ position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ad-body{ padding: 18px 22px 40px; }
.ad-kv{ display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.ad-kv span{ color: var(--muted); width: 120px; }
.ad-kv b{ font-weight: 500; flex: 1; }
.pe .label{ margin-bottom: 8px; }
.pe-presets{ display: flex; gap: 6px; flex-wrap: wrap; }
.pe-ml{ max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 8px; }
.pe-m{ display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; cursor: pointer; min-width: 0; }
.pe-m:hover{ background: rgba(var(--ov),.04); }
.pe-m span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-m input{ accent-color: var(--bit-strong); flex: none; }
.pe-mb{ display: flex; gap: 4px; }
.pe-quick{ display: flex; gap: 4px; flex-wrap: wrap; padding-bottom: 2px; }
.pe-quick .chip{ height: 28px; padding: 0 9px; font-size: 12px; }
.pe-save{ position: sticky; bottom: 0; margin-top: 16px; padding: 12px 0 4px; background: linear-gradient(transparent, var(--panel) 30%); display: flex; align-items: center; gap: 12px; }
.pe-dirty{ font-size: 12px; color: var(--bit-strong); }
.adm-works{ display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.aw{ position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: pointer; border: 1px solid var(--line); }
.aw img, .aw video{ width: 100%; height: 100%; object-fit: cover; }
.aw-t{ position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 7px; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.aw-t svg{ width: 12px; height: 12px; }
.aw-a{ width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.aw-a svg{ width: 26px; height: 26px; }
.aw-c{ position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .15s; line-height: 1.3; }
.aw:hover .aw-c{ opacity: 1; }
.adm-wcap{ position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 20px 60px var(--shadow); z-index: 2; }
.adm-wcap span{ font-size: 13px; color: var(--text-2); max-height: 60px; overflow: auto; }
.adm-wcap small{ font-size: 11.5px; color: var(--faint); }
.adm-wcap .btns{ margin-top: 6px; }
.adm-chats{ display: flex; flex-direction: column; gap: 2px; }
.ac{ display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-align: left; }
.ac:hover{ background: rgba(var(--ov),.04); }
.ac > svg{ width: 17px; height: 17px; color: var(--muted); }
.ac span{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac b{ font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac small{ font-size: 11.5px; color: var(--faint); }
.adm-chat{ max-width: 760px; width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ac-head{ display: flex; align-items: center; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ac-head h3{ margin: 0; font-size: 16px; }
.ac-head small{ color: var(--muted); font-size: 12px; }
.ac-head .sp{ flex: 1; }
.ac-msgs{ overflow-y: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.ac-msgs .msg .att img{ max-width: 160px; border-radius: 10px; }
.feed{ display: flex; flex-direction: column; }
.fe{ display: flex; gap: 12px; padding: 10px 2px; align-items: flex-start; }
.fe + .fe{ border-top: 1px solid var(--line); }
.fe-ic{ width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(var(--ov),.05); flex: none; }
.fe-ic svg{ width: 15px; height: 15px; }
.fe-ic.k-chat{ color: #a9c3ff; }
.fe-ic.k-image{ color: #f5d04c; }
.fe-ic.k-video{ color: #ffa98f; }
.fe-ic.k-audio{ color: #8fd6a1; }
.fe-ic.k-enhance{ color: #c9a6ff; }
.fe.bad .fe-ic{ color: var(--err); }
.fe-b{ flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.fe-b p{ flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-u{ font-size: 13px; font-weight: 550; color: var(--text); }
.fe-u:hover{ color: var(--bit-strong); }
.fe-m{ font-size: 12px; color: var(--text-2); font-family: var(--mono); }
.fe > small{ font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.inv-form{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.inv-form label{ display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.inv-form label.wide{ grid-column: span 2; }
.inv{ display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.inv + .inv{ border-top: 1px solid var(--line); }
.inv code{ font-family: var(--mono); font-size: 13px; padding: 4px 9px; border-radius: 7px; background: var(--bit-soft); color: var(--bit-strong); }
.inv-i{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inv-i b{ font-size: 13.5px; font-weight: 500; }
.inv-i small{ font-size: 11.5px; color: var(--faint); }
.inv.dead{ opacity: .5; }
.secret{ display: flex; gap: 8px; align-items: center; margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px dashed rgba(var(--bit-rgb),.5); }
.secret code{ flex: 1; font-family: var(--mono); font-size: 16px; color: var(--bit-strong); letter-spacing: .03em; }
.sticky-save{ position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); margin-top: 8px; }
@media (max-width: 1000px){
.adm-tiles{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-grid2{ grid-template-columns: 1fr; }
.urow{ grid-template-columns: 30px minmax(0, 1fr) auto; }
.ur-use, .ur-meta{ display: none; }
}
@media (max-width: 860px){
.inv-form{ grid-template-columns: 1fr 1fr; }
.adm-today{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pend{ flex-wrap: wrap; }
.pend-a{ width: 100%; justify-content: flex-start; }
.ad-head, .ad-acts, .ad-tabs, .ad-body{ padding-left: 14px; padding-right: 14px; }
}
.adm-grid2 > .card{ margin-top: 0 !important; }
.pend{ flex-wrap: wrap; }
.pend-i{ min-width: 150px; }
.react.pend{ animation: reactPop .45s cubic-bezier(.3,1.7,.5,1), reactWait 1.6s ease-in-out infinite .5s; }
.by-plan{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.by-plan li{ display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); transition: color .3s; }
.by-plan .bx{ width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; transition: all .3s var(--ease); }
.by-plan .bx svg{ width: 11px; height: 11px; }
.by-plan li.done{ color: var(--muted); }
.by-plan li.done span:last-child{ text-decoration: line-through; text-decoration-color: rgba(var(--ov),.25); }
.by-plan li.done .bx{ background: var(--bit); border-color: var(--bit); color: var(--bit-ink); }
.by-plan li.now{ color: var(--text); }
.by-plan li.now .bx{ border-color: var(--bit); box-shadow: 0 0 0 3px var(--bit-soft); animation: nowPulse 1.4s ease-in-out infinite; }
.by-tl{ margin-top: 8px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.by-step{ display: flex; gap: 10px; padding: 6px 0; position: relative; }
.by-step.nw{ animation: stepIn .35s var(--ease) both; }
.by-step:not(:last-child)::before{ content: ""; position: absolute; left: 12px; top: 32px; bottom: -6px; width: 1px; background: var(--line-2); }
.by-ic{ width: 25px; height: 25px; border-radius: 8px; background: rgba(var(--ov),.05); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--text-2); }
.by-ic svg{ width: 14px; height: 14px; }
.by-step.st-run .by-ic{ color: var(--bit); border-color: rgba(var(--bit-rgb),.35); }
.by-step.st-err .by-ic{ color: var(--err); }
.by-sb{ min-width: 0; flex: 1; }
.by-sh{ display: flex; align-items: baseline; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.by-sh b{ font-weight: 550; }
.by-sh .by-lb{ color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.by-sb p{ margin: 2px 0 0; font-size: 12.5px; color: var(--faint); }
.sg-t{ font-size: 12.5px; color: var(--muted); font-weight: 550; margin: 26px 2px 8px; }
.sg-t.first, .hint-s.first{ margin-top: 0; }
.sgroup{ border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--ov),.015); overflow: hidden; }
.sgroup > .mem-i{ border-radius: 0; background: none; padding: 10px 14px; }
.sgroup > .mem-i + .mem-i{ margin: 0; border-top: 1px solid var(--line); }
.srow.wide .row-in{ display: flex; gap: 8px; }
.tgl{ position: relative; display: inline-block; width: 40px; height: 24px; flex: none; cursor: pointer; }
.tgl input{ position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.tgl i{ position: absolute; inset: 0; border-radius: 12px; background: rgba(var(--ov),.12); transition: background .25s var(--ease); }
.tgl i::after{ content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .32s cubic-bezier(.3,1.5,.5,1), background .2s; }
.tgl input:checked + i{ background: var(--bit); }
.tgl input:checked + i::after{ transform: translateX(16px); background: var(--bit-ink); }
.tgl input:focus-visible + i{ outline: 2px solid rgba(var(--bit-rgb),.5); outline-offset: 2px; }
.st-pane .hint-s{ margin: 14px 2px 0; }
.fb-list{ display: flex; flex-direction: column; gap: 8px; }
.fb-i{ border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; }
.fb-h{ display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.fb-h .dim{ color: var(--faint); font-size: 12px; }
.fb-h .badge{ margin-left: auto; }
.fb-m svg{ width: 17px; height: 17px; display: block; }
.fb-m.m-good{ color: var(--ok); }
.fb-m.m-ok{ color: var(--bit); }
.fb-m.m-bad{ color: var(--err); }
.fb-i p{ margin: 8px 0 0; font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; }
.fb-r{ margin-top: 10px; display: flex; gap: 8px; padding: 9px 11px; border-radius: 10px; background: var(--bit-soft); font-size: 13px; color: var(--text-2); }
.fb-r svg{ width: 15px; height: 15px; color: var(--bit); flex: none; margin-top: 1px; }
.bf-ic .fic{ width: 26px; height: 30px; color: var(--text); display: block; }
.deck-ic .tic, .pres-ic .tic{ width: 22px; height: 22px; color: var(--bit); }
.adm2{ max-width: 1160px; }
.adm2 .st-i .cnt{ margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bit); color: var(--bit-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; font-style: normal; }
.adm-add{ margin: 4px 8px 0; justify-content: center; }
.adm-add svg{ width: 14px; height: 14px; }
.adm2 .adm-tiles{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm2 .at{ text-align: left; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); background: rgba(var(--ov),.015); }
.adm2 .at:hover{ border-color: var(--line-2); transform: translateY(-1px); }
.adm2 .at.hot{ border-color: rgba(var(--bit-rgb),.4); background: var(--bit-soft); }
.adm2 .at.hot span svg{ color: var(--bit); }
.adm2 .adm-today{ grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.adm2 .adm-today .pet{ width: 15px; height: 14px; }
.adm2 .adm-grid2{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sgroup.pad{ padding: 14px 16px; }
.sgroup > .pend{ padding: 12px 14px; border-radius: 0; }
.sgroup > .adm-u{ border-radius: 0; padding: 10px 14px; }
.sgroup > .adm-u + .adm-u{ border-top: 1px solid var(--line); }
.sgroup .feed{ padding: 4px 14px; }
.hint-s.pad, p.pad{ padding: 14px 16px; margin: 0; }
.sg-t .lnk{ margin-left: 8px; }
.sg-t .hint, .sg-t.big .hint{ font-weight: 400; color: var(--faint); margin-left: 6px; }
.sg-t.big{ font-size: 15px; color: var(--text); font-weight: 600; margin-top: 34px; }
.input.sm.w90{ width: 90px; }
.input.sm.w70{ width: 70px; }
.input.sm.w220{ width: 220px; }
.pin-i svg{ width: 11px; height: 11px; color: var(--muted); vertical-align: -1px; }
.ur-use i .pet{ width: 13px; height: 12px; }
.pe-presets{ display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.pe-presets > span{ font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.pe-row{ display: flex; align-items: center; gap: 14px; padding: 11px 14px; transition: opacity .25s; }
.sgroup > .pe-row + .pe-row, .sgroup > .pe-models + .pe-row{ border-top: 1px solid var(--line); }
.pe-row.off .pe-n, .pe-row.off .pe-l, .pe-row.off .pe-mc{ opacity: .38; }
.pe-n{ flex: 1; min-width: 0; display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; }
.pe-n > span svg{ width: 16px; height: 16px; color: var(--bit); }
.pe-n > span .pet{ width: 16px; height: 15px; }
.pe-n b{ font-size: 14px; font-weight: 550; }
.pe-n small{ grid-column: 2; font-size: 11.5px; color: var(--faint); }
.pe-c{ display: flex; align-items: center; gap: 8px; }
.pe-l{ display: flex; flex-direction: column; gap: 2px; }
.pe-l span{ font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.pe-l .input{ width: 70px; height: 30px; text-align: center; }
.pe-mc{ min-width: 118px; height: 30px; padding: 0 8px 0 10px; border-radius: 9px; border: 1px solid var(--line); font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; align-self: flex-end; transition: all .15s; }
span.pe-mc{ border-color: transparent; }
button.pe-mc:hover{ border-color: var(--line-2); color: var(--text); }
.pe-mc svg{ width: 13px; height: 13px; transition: transform .25s var(--ease); }
.pe-mc.on svg{ transform: rotate(180deg); }
.pe-row .tgl{ align-self: flex-end; margin-bottom: 3px; }
.pe-models{ padding: 4px 14px 14px 44px; display: flex; flex-direction: column; gap: 10px; animation: paneIn .25s var(--ease); }
.pe-models .input.sm{ height: 32px; }
.pe-ml{ max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pe-vh{ display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pe-vg{ display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 10px; }
.pe-vg .pe-vh{ grid-column: 1 / -1; }
.pe-m{ display: flex; gap: 7px; align-items: center; font-size: 12.5px; padding: 3px 0; cursor: pointer; color: var(--text-2); }
.pe-m input{ accent-color: var(--bit); }
.pe-mb{ display: flex; gap: 6px; }
.pe-quick{ display: flex; gap: 4px; }
.pe-save{ position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px 0 6px; margin-top: 14px; background: linear-gradient(transparent, var(--panel) 30%); }
.st-main .pe-save{ background: linear-gradient(transparent, var(--bg) 30%); }
.pe-dirty{ font-size: 12.5px; color: var(--bit); }
.sticky-save{ position: sticky; bottom: 0; padding: 14px 0; margin-top: 18px; background: linear-gradient(transparent, var(--bg) 35%); }
.mt-grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.mt-photo{ border: 1px dashed var(--line-2); border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; background: rgba(var(--ov),.02); }
.mt-photo img{ width: 100%; height: 100%; object-fit: cover; }
.mt-ph{ display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; }
.mt-ph svg{ width: 26px; height: 26px; }
.mt-prev{ border: 1px solid var(--line); border-radius: 18px; padding: 26px 18px; background: var(--bg-2); min-height: 260px; display: grid; place-items: center; }
.maint{ text-align: center; max-width: 340px; }
.maint-img{ width: 100%; max-height: 190px; object-fit: cover; border-radius: 16px; margin-bottom: 14px; }
.maint-ic{ width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: rgba(var(--ov),.05); color: var(--text-2); }
.maint-ic svg{ width: 24px; height: 24px; }
.maint h3{ margin: 0 0 6px; font-size: 18px; }
.maint p{ margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.adm-task{ display: flex; gap: 12px; align-items: center; width: 100%; padding: 11px 14px; text-align: left; transition: background .15s; }
.adm-task + .adm-task{ border-top: 1px solid var(--line); }
.adm-task:hover{ background: rgba(var(--ov),.03); }
.adm-task .tk-b{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-task b{ font-size: 13.5px; font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-task small{ font-size: 12px; color: var(--faint); }
.adm-task .fe-ic .pet{ width: 16px; height: 15px; }
.fb-i.new{ border-color: rgba(var(--bit-rgb),.35); }
.fb-st{ margin-left: auto; display: flex; gap: 4px; }
.fb-ra{ display: flex; gap: 6px; margin-top: 10px; }
.fb-ra .input{ flex: 1; }
.fb-h .fe-u{ font-size: 12.5px; }
@media (max-width: 860px){
.adm2 .adm-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm2 .adm-today{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm2 .adm-grid2, .mt-grid{ grid-template-columns: 1fr; }
.adm-add{ display: none; }
.pe-row{ flex-wrap: wrap; }
.pe-c{ width: 100%; justify-content: space-between; }
.pe-models{ padding-left: 14px; }
.fb-st{ margin-left: 0; width: 100%; }
}
.sgroup > .hint-s{ padding: 14px 16px; margin: 0; }
@media (max-width: 860px){
.adm2 .st-i .cnt{ margin-left: 6px; }
}
.by-step.st-ask .by-ic{ color: var(--bit); border-color: rgba(var(--bit-rgb),.4); }
.by-step.st-skip{ opacity: .55; }
.tb{ display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tb::-webkit-scrollbar{ display: none; }
.tb .sp{ flex: 1; }
.sp-sum{ display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 4px; }
.sp-sum > div{ padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--ov),.02); display: flex; flex-direction: column; gap: 2px; }
.sp-sum b{ font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sp-sum small{ font-size: 12px; color: var(--muted); }
.sp-list{ padding: 4px 0; }
.sp-m{ display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 9px 14px; font-size: 13px; }
.sp-m + .sp-m{ border-top: 1px solid var(--line); }
.sp-m .nm{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-m small{ color: var(--muted); font-size: 12px; }
.sp-in{ grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.sp-in input{ width: 96px; }
.sp-u{ display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; }
.sp-u + .sp-u{ border-top: 1px solid var(--line); }
.sp-u .nm{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-u b{ font-variant-numeric: tabular-nums; }
@media (max-width: 560px){
.sp-u{ grid-template-columns: minmax(0, 1fr) 70px auto; }
}
.tgl input:checked + i, .switch input:checked{ background: var(--text) !important; }
.tgl input:checked + i::after, .switch input:checked::after{ background: var(--bg) !important; }
.pp-bar i, .st-bar i{ background: var(--text); }
.st-bar.over i{ background: var(--err); }
.deck{ padding: 16px; border-radius: 16px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.rec-dot{ width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: recBlink 1.2s ease-in-out infinite; }
.rec-sheet.paused .rec-dot{ animation: none; background: var(--faint); }
.sgroup, .bot-card, .deck, .fd-c, .pod, .film, .cv-card, .due-banner, .ch-soul, .lb-side .kv, .st-today > div, .sp-sum > div, .prof-stats > div{ box-shadow: var(--sh-1); }
.bot-card, .deck, .fd-c, .pod, .film, .cv-card, .sgroup, .sp-sum > div{ border-color: var(--line); background: rgba(var(--ov),.025); }
:root[data-theme="light"] .bot-card, :root[data-theme="light"] .deck, :root[data-theme="light"] .fd-c, :root[data-theme="light"] .pod, :root[data-theme="light"] .film, :root[data-theme="light"] .sgroup{ background: #fff; }
.fd-c:hover, .deck:hover, .bot-card:hover{ box-shadow: var(--sh-2); }
  0% { transform: translate(0); box-shadow: -2px 0 #ff3b6b, 2px 0 #3bf0ff; }
  16.6% { transform: translate(-2px, 1px); box-shadow: 2px 0 #ff3b6b, -2px 0 #3bf0ff; }
  33.3% { transform: translate(1px, -1px) scaleY(.6); box-shadow: -3px 0 #ff3b6b, 3px 0 #3bf0ff; }
  50% { transform: translate(0) skewX(-12deg); box-shadow: 1px 0 #ff3b6b, -1px 0 #3bf0ff; opacity: .4; }
  66.6% { transform: translate(2px, 0) scaleX(1.4); box-shadow: -1px 0 #ff3b6b, 1px 0 #3bf0ff; opacity: 1; }
  83.3% { transform: translate(-1px, 2px) scaleY(.4); box-shadow: 3px 0 #ff3b6b, -3px 0 #3bf0ff; }
}

@keyframes imgIn{ 0% { filter: blur(8px) saturate(0); opacity: .4; } 40%, 100% { filter: none; opacity: 1; } }
@keyframes recBlink{ 50% { opacity: .3; } }
@keyframes prIn{ from { opacity: .3; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes reactPop{ from { transform: scale(0) rotate(-30deg) } }
@keyframes reactWait{ 50% { transform: scale(.86) } }
@keyframes nowPulse{ 50% { box-shadow: 0 0 0 5px rgba(var(--bit-rgb),.06) } }
@keyframes stepIn{ from { opacity: 0; transform: translateY(5px) } }
@keyframes paneIn{ from { opacity: 0; transform: translateY(6px) } }
@keyframes recBlink{ 50% { opacity: .25; } }

.tag{ display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; background: rgba(var(--ov),.06); color: var(--text-2); }
.tag.k-chat{ color: #a9c3ff; background: rgba(169,195,255,.1); }
.tag.k-image{ color: #f5d04c; background: rgba(var(--bit-rgb),.1); }
.tag.k-video{ color: #ffa98f; background: rgba(255,169,143,.1); }
.tag.k-audio{ color: #8fd6a1; background: rgba(143,214,161,.1); }
.bb-sub{ font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.st-m{ display: grid; grid-template-columns: 54px minmax(0, 1fr) 120px 36px; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.st-m .nm{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-m b{ text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 860px){
.st-m{ grid-template-columns: 48px minmax(0, 1fr) 60px 30px; }
}
.at{ border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 3px; background: var(--panel); }
.at span svg{ width: 17px; height: 17px; color: var(--muted); }
.at b{ font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at small{ font-size: 11.5px; color: var(--muted); }
.at.hot{ border-color: rgba(var(--bit-rgb),.5); background: var(--bit-soft); }
.at.hot span svg, .at.hot b{ color: var(--bit-strong); }
.st-pane .acc-top{ margin-bottom: 18px; }
.st-pane .lims{ margin-bottom: 8px; }
.st-pane .status-line{ margin-top: 16px; }
.st-pane .swatches .sw{ transition: transform .2s var(--ease); }
.st-pane .swatches .sw:hover{ transform: translateY(-1px); }
.st-pane .hint-s{ margin: 14px 2px 0; }
.st-pane .btns{ margin-top: 12px; }
.st-pane .btns .btn svg{ width: 14px; height: 14px; }
.adm2{ max-width: 1160px; }
.adm2 .st-i .cnt{ margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bit); color: var(--bit-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; font-style: normal; }
.adm2 .adm-tiles{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm2 .at{ text-align: left; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); background: rgba(var(--ov),.015); }
.adm2 .at:hover{ border-color: var(--line-2); transform: translateY(-1px); }
.adm2 .at.hot{ border-color: rgba(var(--bit-rgb),.4); background: var(--bit-soft); }
.adm2 .at.hot span svg{ color: var(--bit); }
.adm2 .adm-today{ grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.adm2 .adm-today .pet{ width: 15px; height: 14px; }
.adm2 .adm-grid2{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px){
.adm2 .adm-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm2 .adm-today{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm2 .adm-grid2, .mt-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 860px){
.adm2 .st-i .cnt{ margin-left: 6px; }
}
.st-m .sp-n{ grid-column: 2 / -1; margin-top: -4px; font-size: 11.5px; color: var(--faint); }

/* ===== Эффекты печати и генерации (из прошлых версий) ===== */
.gen-wait.fx-shimmer::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(var(--ov),.045) 50%, transparent 80%);
  background-size: 220% 100%; animation: shimmer 1.6s linear infinite;
}
.lfx{ display: inline-flex; align-items: flex-end; gap: 3px; margin-left: 5px; vertical-align: -2px; height: 16px; }
.lfx i{ display: none; }
.lfx-none{ display: none; }
.lfx-bit i:first-of-type{ display: block; width: 8px; height: 15px; border-radius: 1.5px; background: var(--bit); box-shadow: 0 0 10px var(--bit-glow); animation: blink 1s steps(2) infinite; }
.lfx-dots{ align-items: center; }
.lfx-dots i{ display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--bit); animation: dotUp 1s var(--ease) infinite; }
.lfx-dots i:nth-child(2){ animation-delay: .15s; }
.lfx-dots i:nth-child(3){ animation-delay: .3s; }
.lfx-wave i{ display: block; width: 3px; height: 14px; border-radius: 2px; background: var(--bit); transform-origin: bottom; animation: eq .8s ease-in-out infinite; }
.lfx-wave i:nth-child(2){ animation-delay: .2s; }
.lfx-wave i:nth-child(3){ animation-delay: .4s; }
.lfx-shimmer i:first-of-type, .lfx-fade i:first-of-type{ display: block; width: 7px; height: 7px; margin-bottom: 4px; border-radius: 50%; background: var(--bit); box-shadow: 0 0 12px 3px var(--bit-glow); animation: pulseDot 1.2s ease-in-out infinite; }
.md.streaming.fx-shimmer > :last-child{
  background: linear-gradient(100deg, var(--text) 0%, var(--text) 42%, var(--bit) 50%, var(--text) 58%, var(--text) 100%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 2.2s linear infinite;
}
.md.streaming.fx-shimmer > :last-child .lfx{ -webkit-text-fill-color: initial; }
.lfx-glitch i:first-of-type{ display: block; width: 9px; height: 15px; background: var(--text); animation: glitch .5s steps(1) infinite; }
.md.streaming.fx-glitch > :last-child{ animation: textJitter 2.6s steps(1) infinite; }
.md.streaming.fx-fade > :last-child{ -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 140px), rgba(0,0,0,.25)); mask-image: linear-gradient(90deg, #000 calc(100% - 140px), rgba(0,0,0,.25)); }
.thinking .lfx{ margin-left: 0; }
.thinking .lfx-none + span, .thinking span:last-child{ background: linear-gradient(100deg, var(--muted) 30%, var(--text) 50%, var(--muted) 70%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 1.8s linear infinite; }
.gen-wait .fxl{ position: absolute; inset: 0; pointer-events: none; }
.gen-wait.fx-aurora .fxl{
  background: radial-gradient(40% 50% at 30% 30%, rgba(var(--bit-rgb),.22), transparent 70%), radial-gradient(45% 55% at 70% 60%, rgba(120,140,255,.22), transparent 70%), radial-gradient(35% 45% at 50% 90%, rgba(255,120,170,.18), transparent 70%);
  background-size: 200% 200%; filter: blur(14px); animation: aurora 6s ease-in-out infinite alternate;
}
.gen-wait.fx-noise .fxl{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .35; mix-blend-mode: screen; animation: grain .5s steps(4) infinite;
}
.gen-wait.fx-scan .fxl{ background-image: linear-gradient(rgba(var(--ov),.035) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--ov),.035) 1px, transparent 1px); background-size: 24px 24px; overflow: hidden; }
.gen-wait.fx-scan .fxl::after{ content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(transparent, rgba(var(--bit-rgb),.14) 85%, rgba(var(--bit-rgb),.65) 99%, transparent); border-bottom: 1px solid rgba(var(--bit-rgb),.8); box-shadow: 0 0 18px rgba(var(--bit-rgb),.5); animation: scan 2.4s cubic-bezier(.45,0,.55,1) infinite; }
.gen-wait.fx-pixels .fxl{ background-image: radial-gradient(rgba(var(--bit-rgb),.55) 1.6px, transparent 2px); background-size: 22px 22px; animation: pix 1.6s steps(3) infinite; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.gen-wait.fx-pulse .fxl{ background: radial-gradient(60% 60% at 50% 50%, rgba(var(--bit-rgb),.12), transparent 70%); animation: breathe 2s ease-in-out infinite; }
.lfx b{ display: none; font-weight: 400; }
.lfx-spark b, .lfx-scramble b{ display: inline-block; }
.lfx-spark{ align-items: center; }
.lfx-spark b{ color: var(--bit-strong); font-size: 16px; line-height: 16px; width: 15px; text-align: center; text-shadow: 0 0 10px var(--bit-glow); }
.lfx-scramble{ align-items: center; }
.lfx-scramble b{ font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--bit-strong); letter-spacing: 1px; opacity: .9; }
.lfx-orbit{ align-items: center; }
.lfx-orbit i:first-of-type{ display: block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(var(--bit-rgb),.22); border-top-color: var(--bit-strong); animation: spin .75s linear infinite; }
.lfx-breathe i:first-of-type{ display: block; width: 7px; height: 7px; margin-bottom: 4px; border-radius: 50%; background: var(--bit); animation: pulseDot 1.6s ease-in-out infinite; }
.md.streaming.fx-breathe > :last-child{ animation: breathe 2.2s ease-in-out infinite; }
.lfx-type i:first-of-type{ display: block; width: 9px; height: 2px; margin-bottom: 1px; background: var(--bit); animation: blink .9s steps(2) infinite; }
.md.streaming.fx-glitch > :last-child{ animation: textJitter 2s steps(1) infinite; }
.thinking.fx-glitch .think-word{ animation: textJitter 1.6s steps(1) infinite; }
.thinking.fx-scramble .think-word, .thinking.fx-spark .think-word{ color: var(--text-2); }
.gen-wait.fx-glitch .fxl{ background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(var(--bit-rgb),.05) 7px 9px); animation: tgl .5s steps(1) infinite; overflow: hidden; }
.gen-wait.fx-glitch .fxl::before, .gen-wait.fx-glitch .fxl::after{ content: ""; position: absolute; left: -10%; right: -10%; height: 12%; mix-blend-mode: screen; animation: band .66s steps(1) infinite; }
.gen-wait.fx-glitch .fxl::before{ background: rgba(255,59,107,.16); }
.gen-wait.fx-glitch .fxl::after{ background: rgba(59,240,255,.14); animation-delay: -.33s; height: 7%; }
.gen-wait.fx-film .fxl{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"), radial-gradient(120% 90% at 50% 50%, rgba(var(--bit-rgb),.06), rgba(0,0,0,.45));
  opacity: .5; mix-blend-mode: screen; animation: grain .33s steps(4) infinite, flick .25s steps(3) infinite;
}
.gen-wait.fx-film .fxl::after{ content: ""; position: absolute; top: 0; bottom: 0; width: 1px; left: 30%; background: rgba(255,240,200,.25); animation: scratch .5s steps(6) infinite; }
.gen-wait .fxl{ position: absolute; inset: 0; }
.gen-wait.fx-shimmer::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(var(--ov),.05) 50%, transparent 80%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
.gen-wait.fx-aurora .fxl, .gen-wait.fx-glitch .fxl, .gen-wait.fx-film .fxl, .gen-wait.fx-noise .fxl, .gen-wait.fx-scan .fxl, .gen-wait.fx-pixels .fxl{ }
.lfx-glitch i:first-of-type{ animation-duration: 1.4s !important; }
.md.streaming.fx-glitch > :last-child, .thinking.fx-glitch .think-word{ animation: none !important; }
.gen-wait.fx-glitch .fxl, .gen-wait.fx-glitch .fxl{ animation-duration: 2.6s !important; }
.gen-wait.fx-glitch .fxl::before, .gen-wait.fx-glitch .fxl::after, .gen-wait.fx-glitch .fxl::before, .gen-wait.fx-glitch .fxl::after{ animation-duration: 3.2s !important; opacity: .5; }
.gen-wait.fx-film .fxl, .gen-wait.fx-film .fxl{ animation: grain 1.2s steps(4) infinite !important; }
.gen-wait.fx-noise .fxl, .gen-wait.fx-noise .fxl{ animation-duration: 1.2s !important; }
.gen-wait.fx-pixels .fxl, .gen-wait.fx-pixels .fxl{ animation-duration: 3s !important; }
.gen-wait.fx-aurora .fxl{
  background: radial-gradient(40% 50% at 30% 30%, rgba(var(--bit-rgb),.22), transparent 70%), radial-gradient(45% 55% at 70% 60%, rgba(120,140,255,.22), transparent 70%), radial-gradient(35% 45% at 50% 90%, rgba(255,120,170,.18), transparent 70%);
  background-size: 200% 200%; filter: blur(14px); animation: aurora 6s ease-in-out infinite alternate;
}
.gen-wait.fx-noise .fxl{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .35; mix-blend-mode: screen; animation: grain .5s steps(4) infinite;
}
.gen-wait.fx-scan .fxl{ background-image: linear-gradient(rgba(var(--ov),.035) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--ov),.035) 1px, transparent 1px); background-size: 24px 24px; overflow: hidden; }
.gen-wait.fx-scan .fxl::after{ content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(transparent, rgba(var(--bit-rgb),.14) 85%, rgba(var(--bit-rgb),.65) 99%, transparent); border-bottom: 1px solid rgba(var(--bit-rgb),.8); box-shadow: 0 0 18px rgba(var(--bit-rgb),.5); animation: scan 2.4s cubic-bezier(.45,0,.55,1) infinite; }
.gen-wait.fx-pixels .fxl{ background-image: radial-gradient(rgba(var(--bit-rgb),.55) 1.6px, transparent 2px); background-size: 22px 22px; animation: pix 1.6s steps(3) infinite; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.gen-wait.fx-glitch .fxl{ background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(var(--bit-rgb),.05) 7px 9px); animation: tgl .5s steps(1) infinite; overflow: hidden; }
.gen-wait.fx-glitch .fxl::before, .gen-wait.fx-glitch .fxl::after{ content: ""; position: absolute; left: -10%; right: -10%; height: 12%; mix-blend-mode: screen; animation: band .66s steps(1) infinite; }
.gen-wait.fx-glitch .fxl::before{ background: rgba(255,59,107,.16); }
.gen-wait.fx-glitch .fxl::after{ background: rgba(59,240,255,.14); animation-delay: -.33s; height: 7%; }
.gen-wait.fx-film .fxl{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"), radial-gradient(120% 90% at 50% 50%, rgba(var(--bit-rgb),.06), rgba(0,0,0,.45));
  opacity: .5; mix-blend-mode: screen; animation: grain .33s steps(4) infinite, flick .25s steps(3) infinite;
}
.gen-wait.fx-film .fxl::after{ content: ""; position: absolute; top: 0; bottom: 0; width: 1px; left: 30%; background: rgba(255,240,200,.25); animation: scratch .5s steps(6) infinite; }
.gen-wait.fx-noise .fxl{ mix-blend-mode: multiply; opacity: .25; }
.gen-wait.fx-glitch .fxl{ animation-duration: 2.6s !important; }
.gen-wait.fx-glitch .fxl::before, .gen-wait.fx-glitch .fxl::after{ animation-duration: 3.2s !important; opacity: .5; }
.gen-wait.fx-film .fxl{ animation: grain 1.2s steps(4) infinite !important; }
.gen-wait.fx-noise .fxl{ animation-duration: 1.2s !important; }
.gen-wait.fx-pixels .fxl{ animation-duration: 3s !important; }
.md.streaming *, .lfx i, .lfx b, .lfx i::before{ animation-delay: calc(var(--d, 0s) - var(--fxt, 0s)) !important; }
.lfx-dots i:nth-child(2), .lfx-wave i:nth-child(2){ --d: .15s; }
.lfx-dots i:nth-child(3), .lfx-wave i:nth-child(3){ --d: .3s; }
.lfx-matrix{ align-items: flex-start; height: 18px; }
.lfx-matrix b{ display: inline-block; writing-mode: vertical-rl; text-orientation: upright; font-family: var(--mono); font-size: 9px; line-height: 9px; letter-spacing: -1px; color: #6dff96; text-shadow: 0 0 6px rgba(80,255,140,.9); -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.md.streaming.fx-matrix > :last-child{ color: #a8ffbd; text-shadow: 0 0 10px rgba(80,255,140,.4); }
.lfx-neon i:first-of-type{ display: block; width: 3px; height: 17px; border-radius: 3px; background: #fff; box-shadow: 0 0 4px #fff, 0 0 10px var(--bit), 0 0 22px var(--bit), 0 0 40px var(--bit); animation: neonHum 1.8s ease-in-out infinite; }
.md.streaming.fx-neon > :last-child{ color: #fffbea; text-shadow: 0 0 2px rgba(255,255,255,.6), 0 0 10px rgba(var(--bit-rgb),.8), 0 0 26px rgba(var(--bit-rgb),.45); }
.md.streaming.fx-rainbow > :last-child{ background: linear-gradient(90deg, #ff6b6b, #ffb36b, #ffe66b, #6bff9c, #6bd5ff, #a98bff, #ff7bd5, #ff6b6b); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbowFlow 4s linear infinite; }
.md.streaming.fx-rainbow > :last-child .lfx, .md.streaming.fx-fire > :last-child .lfx{ -webkit-text-fill-color: initial; }
.lfx-rainbow i:first-of-type{ display: block; width: 9px; height: 9px; margin-bottom: 3px; border-radius: 50%; background: conic-gradient(#ff6b6b, #ffe66b, #6bff9c, #6bd5ff, #a98bff, #ff6b6b); animation: spin 1.2s linear infinite; }
.md.streaming.fx-fire > :last-child{ background: linear-gradient(0deg, #ff3d00 0%, #ff8a00 45%, #ffd84d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 6px rgba(255,110,0,.35)); }
.lfx-fire i:first-of-type{ display: block; width: 10px; height: 15px; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%; background: radial-gradient(circle at 50% 75%, #fff3b0 0 18%, #ffb300 35%, #ff5a00 68%, rgba(255,40,0,0) 72%); filter: drop-shadow(0 0 6px rgba(255,120,0,.8)); transform-origin: 50% 100%; animation: flame .9s ease-in-out infinite alternate; }
.md.streaming.fx-holo{ position: relative; }
.md.streaming.fx-holo > :last-child{ color: #c9f7ff; text-shadow: -1.5px 0 rgba(255,0,120,.5), 1.5px 0 rgba(0,220,255,.5); }
.md.streaming.fx-holo::after{ content: ""; position: absolute; inset: -4px -8px; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(120,230,255,.07) 0 1px, transparent 1px 4px); border-radius: 10px; animation: holoMove 3s linear infinite; }
.lfx-holo i:first-of-type{ display: block; width: 9px; height: 15px; background: linear-gradient(180deg, rgba(0,220,255,.9), rgba(255,0,140,.6)); box-shadow: -2px 0 rgba(255,0,120,.6), 2px 0 rgba(0,220,255,.6); animation: neonHum 1.4s ease-in-out infinite; }
.lfx-comet{ align-items: center; gap: 0; }
.lfx-comet i:nth-of-type(1){ display: block; width: 34px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, rgba(var(--bit-rgb),.25) 40%, var(--bit)); transform-origin: right center; animation: cometTail 1.1s ease-in-out infinite; }
.lfx-comet i:nth-of-type(2){ display: block; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px var(--bit), 0 0 16px 5px rgba(var(--bit-rgb),.5); margin-left: -2px; }
.lfx-stardust, .lfx-hearts{ position: relative; width: 10px; align-items: center; }
.lfx-stardust b, .lfx-hearts b{ display: none; }
.lfx-stardust i, .lfx-hearts i{ display: block; position: absolute; left: 2px; bottom: 2px; animation: dustUp 1.5s ease-out infinite; }
.lfx-stardust i{ width: 4px; height: 4px; border-radius: 50%; background: var(--bit); box-shadow: 0 0 6px var(--bit); }
.lfx-stardust i:nth-child(3){ --d: -.5s; --dx: -9px; }
.lfx-stardust i:nth-child(4){ --d: -1s; --dx: 8px; width: 3px; height: 3px; background: #fff; }
.lfx-hearts i{ width: 10px; height: 10px; }
.lfx-hearts i::before{ content: "♥"; position: absolute; inset: 0; font-size: 11px; line-height: 10px; color: #ff6b9c; text-shadow: 0 0 6px rgba(255,90,150,.7); }
.lfx-hearts i:nth-child(3){ --d: -.5s; --dx: -10px; }
.lfx-hearts i:nth-child(4){ --d: -1s; --dx: 9px; }
.lfx-tetris{ gap: 1px; align-items: flex-end; }
.lfx-tetris i{ display: block; width: 6px; height: 6px; border-radius: 1px; animation: tetDrop 1.8s cubic-bezier(.5,0,.75,0) infinite; }
.lfx-tetris i:nth-child(2){ background: #6bd5ff; --d: 0s; }
.lfx-tetris i:nth-child(3){ background: var(--bit); --d: .3s; height: 12px; }
.lfx-tetris i:nth-child(4){ background: #ff7bd5; --d: .6s; }
.thinking .think-word{ font-weight: 550; }
details.think.live > summary .think-word{ background: linear-gradient(100deg, var(--muted) 30%, var(--text) 50%, var(--muted) 70%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 1.8s linear infinite; font-weight: 550; }
.gen-wait.fx-portal .fxl, .gen-wait.fx-portal .fxl{ background: radial-gradient(circle at 50% 50%, rgba(var(--bit-rgb),.18), transparent 45%); }
.gen-wait.fx-portal .fxl::before, .gen-wait.fx-portal .fxl::before{ content: ""; position: absolute; left: 50%; top: 50%; width: min(70%, 240px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(var(--bit-rgb),.9), #ff7bd5, #6bd5ff, transparent 70%); -webkit-mask: radial-gradient(closest-side, transparent 72%, #000 74%, #000 86%, transparent 88%); mask: radial-gradient(closest-side, transparent 72%, #000 74%, #000 86%, transparent 88%); filter: blur(1px) drop-shadow(0 0 12px rgba(var(--bit-rgb),.6)); animation: portalSpin 2.4s linear infinite; }
.gen-wait.fx-matrix .fxl, .gen-wait.fx-matrix .fxl{ background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(80,255,140,.0) 13px 14px), linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,30,10,.35)); overflow: hidden; }
.gen-wait.fx-matrix .fxl::before, .gen-wait.fx-matrix .fxl::before{ content: ""; position: absolute; inset: -100% 0 0; background-image: repeating-linear-gradient(180deg, rgba(90,255,150,.0) 0 6px, rgba(90,255,150,.55) 6px 8px, rgba(90,255,150,0) 8px 26px), repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 14px); background-size: 14px 120px, 14px 100%; -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 14px), linear-gradient(transparent, #000 40%, #000 80%, transparent); mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 14px); filter: drop-shadow(0 0 4px rgba(80,255,140,.8)); animation: matrixRain 2.2s linear infinite; }
.gen-wait.fx-holo .fxl, .gen-wait.fx-holo .fxl{ background: repeating-linear-gradient(0deg, rgba(120,230,255,.08) 0 1px, transparent 1px 4px), linear-gradient(120deg, rgba(0,220,255,.12), rgba(255,0,160,.1), rgba(var(--bit-rgb),.12)); background-size: 100% 4px, 300% 300%; animation: holoShift 5s ease-in-out infinite alternate; }
.gen-wait.fx-lava .fxl, .gen-wait.fx-lava .fxl{ background: radial-gradient(30% 34% at 25% 35%, rgba(255,90,40,.5), transparent 70%), radial-gradient(28% 32% at 70% 60%, rgba(var(--bit-rgb),.45), transparent 70%), radial-gradient(26% 30% at 45% 85%, rgba(255,60,120,.4), transparent 70%); background-size: 160% 160%; filter: blur(16px) saturate(140%); animation: lava 7s ease-in-out infinite alternate; }
.gen-wait.fx-stars .fxl, .gen-wait.fx-stars .fxl{ overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(var(--bit-rgb),.12), transparent 60%); }
.gen-wait.fx-stars .fxl::before, .gen-wait.fx-stars .fxl::after, .gen-wait.fx-stars .fxl::before, .gen-wait.fx-stars .fxl::after{ content: ""; position: absolute; inset: -50%; background-image: radial-gradient(1.4px 1.4px at 10% 20%, #fff, transparent), radial-gradient(1.2px 1.2px at 30% 70%, #fff, transparent), radial-gradient(1.6px 1.6px at 55% 35%, var(--bit), transparent), radial-gradient(1.2px 1.2px at 75% 80%, #fff, transparent), radial-gradient(1.4px 1.4px at 90% 15%, #cfe3ff, transparent), radial-gradient(1.2px 1.2px at 45% 55%, #fff, transparent), radial-gradient(1.2px 1.2px at 20% 90%, #fff, transparent), radial-gradient(1.5px 1.5px at 65% 10%, #fff, transparent); background-size: 220px 220px; animation: warp 3s linear infinite; }
.gen-wait.fx-stars .fxl::after, .gen-wait.fx-stars .fxl::after{ animation-delay: -1.5s; background-size: 160px 160px; }
.gen-wait.fx-prism .fxl, .gen-wait.fx-prism .fxl{ overflow: hidden; }
.gen-wait.fx-prism .fxl::before, .gen-wait.fx-prism .fxl::before{ content: ""; position: absolute; top: -50%; bottom: -50%; width: 40%; left: -50%; transform: rotate(18deg); background: linear-gradient(90deg, transparent, rgba(255,90,90,.25), rgba(255,220,90,.3), rgba(90,255,150,.3), rgba(90,200,255,.3), rgba(170,120,255,.25), transparent); filter: blur(6px); animation: prismSweep 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce){
.lfx *, .md.streaming *, .fxl, .fxl::before, .fxl::after{ animation: none !important; }
}
.thinking, .lfx{ color: var(--muted); }
.thinking.fx-silk{ display: inline-flex; align-items: center; gap: 12px; padding: 6px 0; background: none !important; border: 0 !important; color: var(--text-2); }
.tk-grid{ display: grid; grid-template-columns: repeat(3, 5px); gap: 2.5px; width: 20px; height: 20px; place-content: center; flex: none; }
.tk-grid i{ width: 5px; height: 5px; border-radius: 1.5px; background: var(--bit); opacity: .18; animation: tkWave 1.6s cubic-bezier(.45,0,.55,1) infinite; animation-delay: calc(var(--k) * .11s); }
.thinking.fx-silk .think-word{ font-size: 14.5px; font-weight: 500; letter-spacing: .005em; background: linear-gradient(100deg, var(--muted) 20%, var(--text) 40%, color-mix(in srgb, var(--bit) 70%, var(--text)) 50%, var(--text) 60%, var(--muted) 80%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: silkShine 2.2s linear infinite; transition: opacity .3s; }
.msg.ai .thinking.fx-silk{ animation: silkIn .45s var(--ease) both; }
.md.streaming.fx-silk .sk{ transition: opacity .2s; }
.lfx-silk{ display: inline-block; width: 9px; height: 9px; margin-left: 4px; border-radius: 50%; vertical-align: 1px; background: var(--bit); box-shadow: 0 0 0 0 rgba(var(--bit-rgb),.5), 0 0 12px rgba(var(--bit-rgb),.7); animation: silkDot 1.1s ease-in-out infinite; }
.lfx-silk b, .lfx-silk i{ display: none; }
@media (prefers-reduced-motion: reduce){
.tk-grid i, .lfx-silk, .thinking.fx-silk .think-word{ animation: none !important; opacity: 1; }
}
@keyframes shimmer{ from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes blink{ 50% { opacity: 0; } }
@keyframes dotUp{ 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes eq{ 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes pulseDot{ 50% { transform: scale(.55); opacity: .6; } }
@keyframes shine{ from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes glitch{ 
  0% { transform: translate(0); box-shadow: -2px 0 #ff3b6b, 2px 0 #3bf0ff; }
  16.6% { transform: translate(-2px, 1px); box-shadow: 2px 0 #ff3b6b, -2px 0 #3bf0ff; }
  33.3% { transform: translate(1px, -1px) scaleY(.6); box-shadow: -3px 0 #ff3b6b, 3px 0 #3bf0ff; }
  50% { transform: translate(0) skewX(-12deg); box-shadow: 1px 0 #ff3b6b, -1px 0 #3bf0ff; opacity: .4; }
  66.6% { transform: translate(2px, 0) scaleX(1.4); box-shadow: -1px 0 #ff3b6b, 1px 0 #3bf0ff; opacity: 1; }
  83.3% { transform: translate(-1px, 2px) scaleY(.4); box-shadow: 3px 0 #ff3b6b, -3px 0 #3bf0ff; }
}
@keyframes textJitter{ 0%, 92%, 100% { text-shadow: none; transform: none; } 93% { text-shadow: -1px 0 #ff3b6b, 1px 0 #3bf0ff; transform: translateX(1px); } 96% { text-shadow: 1px 0 #ff3b6b, -1px 0 #3bf0ff; transform: translateX(-1px); } }
@keyframes aurora{ 0% { background-position: 0% 0%; transform: scale(1); } 50% { background-position: 100% 50%; transform: scale(1.1); } 100% { background-position: 50% 100%; transform: scale(1); } }
@keyframes grain{ 0% { background-position: 0 0; } 25% { background-position: -40px 20px; } 50% { background-position: 30px -30px; } 75% { background-position: -20px -50px; } 100% { background-position: 50px 10px; } }
@keyframes scan{ from { top: -30%; } to { top: 100%; } }
@keyframes pix{ 0% { opacity: .2; background-position: 0 0; } 33% { opacity: .8; background-position: 11px 0; } 66% { opacity: .4; background-position: 11px 11px; } 100% { opacity: .2; background-position: 0 11px; } }
@keyframes tilePulse{ 0%, 100% { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); } 50% { background: #221f17; box-shadow: inset 0 0 40px rgba(var(--bit-rgb),.12), inset 0 0 0 1px rgba(var(--bit-rgb),.3); } }
@keyframes spin{ to { transform: rotate(360deg) } }
@keyframes breathe{ 50% { opacity: .55; } }
@keyframes tgl{ 0% { opacity: 1; } 33% { opacity: .6; transform: translateX(2px); } 66% { opacity: .9; transform: translateX(-2px); } }
@keyframes band{ 0% { top: 10%; transform: translateX(0); } 12.5% { top: 62%; transform: translateX(-6%); } 25% { top: 33%; transform: translateX(4%); } 37.5% { top: 80%; } 50% { top: 5%; transform: translateX(-3%); } 62.5% { top: 45%; transform: translateX(8%); } 75% { top: 70%; } 87.5% { top: 25%; transform: translateX(-5%); } }
@keyframes flick{ 0% { opacity: .45; } 33% { opacity: .6; } 66% { opacity: .5; } }
@keyframes scratch{ 0% { left: 18%; } 16% { left: 64%; opacity: .2; } 33% { left: 41%; opacity: .6; } 50% { left: 82%; opacity: 0; } 66% { left: 27%; opacity: .5; } 83% { left: 55%; opacity: .3; } }
@keyframes wordSwap{ from { opacity: 0; transform: translateY(6px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes neonHum{ 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@keyframes rainbowFlow{ from { background-position: 0 0; } to { background-position: 300% 0; } }
@keyframes flame{ 0% { transform: scale(1, 1) rotate(-4deg); } 50% { transform: scale(.88, 1.12) rotate(3deg); } 100% { transform: scale(1.05, .92) rotate(-2deg); } }
@keyframes holoMove{ from { background-position: 0 0; } to { background-position: 0 40px; } }
@keyframes cometTail{ 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.55); opacity: .6; } }
@keyframes dustUp{ 0% { transform: translate(0, 0) scale(1); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx, 3px), -22px) scale(.4); opacity: 0; } }
@keyframes tetDrop{ 0% { transform: translateY(-16px); opacity: 0; } 30% { transform: translateY(0); opacity: 1; } 85% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes portalSpin{ to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes matrixRain{ from { transform: translateY(0); } to { transform: translateY(50%); } }
@keyframes holoShift{ from { background-position: 0 0, 0% 50%; } to { background-position: 0 40px, 100% 50%; } }
@keyframes lava{ 0% { background-position: 0% 0%, 100% 50%, 50% 100%; } 50% { background-position: 60% 40%, 20% 80%, 80% 20%; } 100% { background-position: 100% 100%, 0% 0%, 20% 60%; } }
@keyframes warp{ 0% { transform: scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes prismSweep{ from { left: -50%; } to { left: 110%; } }
@keyframes tkWave{ 0%, 100% { opacity: .16; transform: scale(.8); } 35% { opacity: 1; transform: scale(1.05); box-shadow: 0 0 8px rgba(var(--bit-rgb),.65); } 60% { opacity: .45; transform: scale(.92); } }
@keyframes silkShine{ from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes silkIn{ from { opacity: 0; transform: translateY(4px); filter: blur(3px); } }
@keyframes silkDot{ 0%, 100% { transform: scale(.75); opacity: .75; } 50% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 5px rgba(var(--bit-rgb),.08), 0 0 16px rgba(var(--bit-rgb),.85); } }

/* ===== «Клод» — эффект по умолчанию (v17) ===== */
.lfx-claude{ display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; margin-left: .3em; vertical-align: -.2em; color: var(--bit); font: 600 1.25em/1 var(--mono); }
.lfx-claude b{ display: block; font-weight: 600; text-shadow: 0 0 10px rgba(var(--bit-rgb), .45); }
.lfx-claude i{ display: none; }
.thinking.fx-claude{ display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0; background: none !important; border: 0 !important; }
.thinking.fx-claude .lfx-claude{ margin-left: 0; font-size: 18px; width: 20px; height: 20px; }
.thinking.fx-claude .lfx-claude b{ animation: clPulse 1.2s ease-in-out infinite; }
.think-word.shim, .thinking.fx-claude .think-word{ font-size: 14.5px; font-weight: 500; letter-spacing: .005em; background: linear-gradient(100deg, var(--muted) 0%, var(--muted) 35%, var(--text) 47%, color-mix(in srgb, var(--bit) 55%, var(--text)) 50%, var(--text) 53%, var(--muted) 65%, var(--muted) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: clShine 2s cubic-bezier(.4, 0, .6, 1) infinite; }
.msg.ai .thinking.fx-claude{ animation: silkIn .4s var(--ease) both; }
details.think.live > summary .lfx-claude{ margin: 0; }
.md.streaming.fx-claude .cf{ animation: clIn 520ms cubic-bezier(.25, .6, .3, 1) both; }
.md.streaming.fx-claude .cf.demo{ animation: clDemo 2.2s ease-in-out infinite; }
.md .cl-after{ margin: 0; height: 1.4em; }
.md .cl-after .lfx-claude{ margin-left: 0; }
@keyframes clIn{ from { opacity: 0; filter: blur(2px); } 60% { filter: blur(0); } to { opacity: 1; filter: none; } }
@keyframes clDemo{ 0%, 15% { opacity: 0; filter: blur(2px); } 55%, 100% { opacity: 1; filter: none; } }
@keyframes clSpin{ to { transform: rotate(360deg); } }
@keyframes clPulse{ 50% { opacity: .55; } }
@keyframes clShine{ from { background-position: 100% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce){
.lfx-claude b, .md.streaming.fx-claude .cf, .think-word.shim{ animation: none !important; opacity: 1; }
}

/* ===== «Клод» v21: единственный эффект печати, доведённый ===== */
.md.streaming.fx-claude .cf{ animation: clIn2 640ms cubic-bezier(.22, .61, .36, 1) both; }
@keyframes clIn2{ 0% { opacity: 0; filter: blur(3px); color: color-mix(in srgb, var(--bit) 55%, var(--text)); } 45% { filter: blur(.5px); } 70% { color: var(--text); } 100% { opacity: 1; filter: none; color: inherit; } }
.lfx-claude{ width: 1.25em; height: 1.25em; font-size: 1.15em; }
.lfx-claude b{ display: inline-block; text-shadow: 0 0 12px rgba(var(--bit-rgb), .55), 0 0 2px rgba(var(--bit-rgb), .8); animation: clBreath 1.6s ease-in-out infinite; }
@keyframes clBreath{ 50% { transform: scale(.82); opacity: .7; } }
.thinking.fx-claude{ gap: 11px; }
.thinking.fx-claude .lfx-claude{ font-size: 20px; width: 22px; height: 22px; }
.thinking.fx-claude .lfx-claude b{ animation: clBreath 1.2s ease-in-out infinite; }
.think-word.shim, .thinking.fx-claude .think-word{ font-size: 15px; animation-duration: 1.8s; }
.md.streaming.fx-claude > :last-child{ transition: none; }
@media (prefers-reduced-motion: reduce){ .lfx-claude b, .md.streaming.fx-claude .cf{ animation: none !important; } }

/* =====================================================================
   Bit — дизайн. Тёплая глубокая основа, рабочая область — остров (см. блок v24 в конце файла).
   Исходник: src/styles.core.css (+ перенесённые стили инструментов и админки),
   сборка в public/styles.css — src/build.py
   ===================================================================== */
:root, [data-theme="dark"] {
  --bg: #1b1a18;
  --bg-2: #1b1a18;
  --surface: #232220;
  --surface-2: #2b2a27;
  --surface-3: #33312d;
  --raised: #242321;
  --line: #35332f;
  --line-soft: #2c2b28;
  --line-strong: #46433d;
  --text: #ebe7dd;
  --text-2: #b4afa3;
  --muted: #7e7a71;
  --faint: #5b5850;
  --bit: #d97757;
  --bit-rgb: 217, 119, 87;
  --bit-ink: #fff;
  --bit-soft: rgba(217, 119, 87, .14);
  --ok: #8fc79b;
  --err: #e5826f;
  --warn: #e0b45f;
  --err-soft: rgba(229, 130, 111, .12);
  --code: #141311;
  --send-off: #4a4740;
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-cmp: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 6px 24px rgba(0, 0, 0, .18);
  --toast-bg: rgba(43, 42, 39, .92);
  /* старые имена — для инструментов и админки */
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --glass: var(--raised);
  --line-2: var(--line-strong);
  --ov: 255, 255, 255;
  --ov2: 255, 238, 200;
  --bit-strong: var(--bit);
  --bit-glow: rgba(217, 119, 87, .4);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --read: var(--serif);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sbw: 288px;
  --col: 768px;
  --chat-fs: 16px;
  color-scheme: dark;
}
[data-theme="light"] {
  /* светлая — тёплая бумага, как у Claude: основной фон чуть светлее боковой панели */
  --bg: #faf9f5;
  --bg-2: #f3f1ea;
  --surface: #ffffff;
  --surface-2: #f0eee6;
  --surface-3: #e5e2d8;
  --raised: #ffffff;
  --line: #e3e0d5;
  --line-soft: #ebe8df;
  --line-strong: #cbc6b8;
  --text: #191917;
  --text-2: #45433e;
  --muted: #7a776e;
  --faint: #aaa598;
  --bit: #c6613f;
  --bit-rgb: 198, 97, 63;
  --bit-soft: rgba(198, 97, 63, .1);
  --bit-glow: rgba(198, 97, 63, .3);
  --ok: #2f7d45;
  --err: #bb4a35;
  --warn: #9a6b12;
  --err-soft: rgba(187, 74, 53, .09);
  --code: #f4f2eb;
  --send-off: #e0dccf;
  --shadow-pop: 0 14px 40px rgba(60, 45, 25, .13), 0 2px 6px rgba(60, 45, 25, .06), 0 0 0 1px rgba(60, 45, 25, .04);
  --shadow-cmp: 0 1px 2px rgba(60, 45, 25, .04), 0 6px 24px rgba(60, 45, 25, .06);
  --toast-bg: rgba(255, 255, 255, .94);
  --ov: 0, 0, 0;
  --ov2: 60, 40, 20;
  color-scheme: light;
}
/* чёрная — настоящий чёрный для OLED: фон #000, карточки едва светлее */
[data-theme="black"] {
  /* чёрная — настоящий чёрный для OLED: фон #000, слои едва светлее, тонкие границы, тёплый белый текст */
  --bg: #000000;
  --bg-2: #000000;
  --surface: #0d0d0c;
  --surface-2: #161615;
  --surface-3: #212120;
  --raised: #0d0d0c;
  --line: #1e1e1d;
  --line-soft: #141413;
  --line-strong: #2f2e2c;
  --text: #f0ede6;
  --text-2: #b3afa6;
  --muted: #76736c;
  --faint: #4a4844;
  --code: #070707;
  --send-off: #262624;
  --shadow-pop: 0 20px 60px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .07);
  --shadow-cmp: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 10px 40px rgba(0, 0, 0, .8);
  --toast-bg: rgba(18, 18, 17, .96);
}
[data-theme="light"] .sidebar { border-right-color: var(--line); }
[data-theme="light"] .composer { border-color: #dcd8cc; }
[data-theme="light"] .composer:focus-within { border-color: #c4bfb1; box-shadow: 0 1px 2px rgba(60, 45, 25, .05), 0 8px 30px rgba(60, 45, 25, .08); }
[data-theme="light"] .cmp-send.on { background: var(--bit); color: #fff; }
[data-theme="light"] .cmp-send { color: #fff; }
[data-theme="light"] .msg.user .bubble { background: #efece3; }
[data-theme="light"] .code { border-color: var(--line); }
[data-theme="light"] .lfx-claude b { text-shadow: none; }
[data-theme="light"] .t-ic { background: var(--surface-2); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background-color: #d6d2c6; }
[data-theme="black"] .sidebar { border-right-color: var(--line); }
[data-theme="black"] .composer { background: #0a0a0a; border-color: #232322; }
[data-theme="black"] .composer:focus-within { border-color: #3a3936; box-shadow: 0 0 0 1px rgba(var(--bit-rgb), .12), 0 10px 40px rgba(0, 0, 0, .8); }
[data-theme="black"] .msg.user .bubble { background: #151514; border: 1px solid #1f1f1e; }
[data-theme="black"] .sidebar { background: #000; }
[data-theme="black"] .sb-c.on, [data-theme="black"] .sb-c:hover { background: #121211; }
[data-theme="black"] .code { border-color: #1c1c1b; }
[data-theme="black"] .pop, [data-theme="black"] .modal { background: #0f0f0e; border-color: #222220; }
[data-theme="black"] .cmp-send.on { background: var(--text); color: #000; }
[data-theme="black"] .lfx-claude b { text-shadow: 0 0 14px rgba(var(--bit-rgb), .8), 0 0 2px rgba(var(--bit-rgb), 1); }
[data-theme="black"] .hero-t { text-shadow: 0 0 40px rgba(255, 255, 255, .06); }
.sans-answers { --read: var(--font); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; }
::selection { background: rgba(var(--bit-rgb), .35); }
:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; border-radius: 8px; }
svg { flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.sp { flex: 1; }
.muted { color: var(--muted); }

/* ---------- Знак ---------- */
.logo { width: 1em; height: auto; fill: currentColor; display: block; }
.logo .logo-dot { fill: var(--bit); }

/* ---------- Кнопки и поля ---------- */
.ib { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s; flex: none; }
.ib svg { width: 20px; height: 20px; }
.ib:hover { background: var(--surface-2); color: var(--text); }
.ib.on { color: var(--text); background: var(--surface-2); }
.ib.sm { width: 30px; height: 30px; border-radius: 8px; }
.ib.sm svg { width: 17px; height: 17px; }
.ib:disabled { opacity: .35; pointer-events: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background .15s, opacity .15s, transform .1s; border: 1px solid transparent; text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--err); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--err); border-color: var(--line); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 10px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.lg { height: 48px; font-size: 15.5px; border-radius: 14px; width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn:disabled { opacity: .5; }
.btn.load { position: relative; color: transparent !important; pointer-events: none; }
.btn.load::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.input { width: 100%; height: 40px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); outline: none; transition: border-color .15s; font-size: 15px; }
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--line-strong); }
.input.lg { height: 50px; font-size: 16px; border-radius: 14px; padding: 0 16px; }
.input.ta, textarea.input { height: auto; padding: 10px 13px; line-height: 1.5; resize: vertical; min-height: 44px; }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237e7a71' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.w90 { width: 96px !important; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 14px; background: transparent; transition: background .15s, color .15s; }
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip small { opacity: .6; font-size: 12.5px; }
.chip.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 12px; gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
[data-theme="light"] .seg button.on { box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg.sm button { height: 28px; font-size: 12.5px; }
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--text); }
.switch input:checked + i::after { transform: translateX(18px); background: var(--bg); }
.range { width: 180px; accent-color: var(--text); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.ok { color: var(--ok); background: rgba(143, 199, 155, .12); }
.pill.bad { color: var(--err); background: var(--err-soft); }
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 14px; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 11.5px; }
.av.lg { width: 52px; height: 52px; font-size: 20px; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: var(--text-2); border-radius: 4px; transition: width .4s var(--ease); }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .3; animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; } 40% { opacity: .9; } }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--err); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty.wide { grid-column: 1 / -1; }

/* ---------- Загрузка, вход, PIN ---------- */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity .25s; }
.boot.out { opacity: 0; }
.boot-logo { font-size: 46px; color: var(--text); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.auth { position: fixed; inset: 0; overflow: auto; background: var(--bg); display: flex; }
.auth-in { margin: auto; width: 100%; max-width: 400px; padding: 40px 22px; }
.auth-card { display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.auth-mark { font-size: 40px; color: var(--text); margin: 0 auto 26px; }
.auth-h { font: 600 32px/1.15 var(--serif); margin: 0 0 8px; letter-spacing: -.01em; }
.auth-p { color: var(--text-2); margin: 0 0 26px; font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.auth-form.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pw { position: relative; }
.pw .input { padding-right: 48px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.pw-eye svg { width: 19px; height: 19px; }
.pw-eye.on { color: var(--text); }
.auth-msg { min-height: 20px; font-size: 13.5px; color: var(--muted); text-align: center; }
.auth-msg.err { color: var(--err); }
.auth-msg.ok { color: var(--ok); }
.auth-foot { color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.auth-foot a { color: var(--text); font-weight: 500; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-card > .btn.lg { margin-top: 6px; }
.gate-img { width: 100%; border-radius: 16px; margin-bottom: 20px; }
.gate-foot { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.code-form { display: flex; flex-direction: column; gap: 10px; }
.code-in { display: flex; gap: 8px; justify-content: center; }
.code-in input { width: 46px; height: 56px; text-align: center; font-size: 22px; padding: 0; }
.lock { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; }
.lock-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; }
.lock-brand { font-size: 38px; color: var(--text); }
.lock-sub { color: var(--text-2); margin: 0; text-align: center; }
.lock-sub.err { color: var(--err); }
.pin { display: flex; gap: 16px; }
.pin span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background .15s; }
.pin span.on { background: var(--text); border-color: var(--text); }
.pin.bad { animation: shake .35s; }
.pin.bad span { border-color: var(--err); }
.pin.good span { background: var(--ok); border-color: var(--ok); }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; }
.keypad button { height: 72px; border-radius: 50%; background: var(--surface); font-size: 24px; font-weight: 500; display: grid; place-items: center; }
.keypad button:hover { background: var(--surface-2); }
.lock-out { color: var(--muted); font-size: 13.5px; }
.lock-out:hover { color: var(--text); }

/* ---------- Каркас ---------- */
.app { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; transition: grid-template-columns .24s var(--ease); }
.app.sb-off { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; min-width: 0; overflow: hidden; height: 100%; }
.sidebar > * { width: var(--sbw); flex: none; }
.app.sb-off .sidebar { border-right-color: transparent; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; position: relative; overflow: hidden; }
.topbar { height: 56px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; position: relative; z-index: 5; }
.tb-l, .tb-r { display: flex; align-items: center; gap: 2px; min-width: 84px; }
.tb-r { justify-content: flex-end; }
.tb-c { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 8px; }
.tb-title { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.tb-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-title svg { width: 16px; height: 16px; color: var(--muted); }
.tb-title:not(:disabled):hover { background: var(--surface-2); color: var(--text); }
.tb-new { display: none; }
.app.sb-off .tb-new { display: inline-grid; }
.view { flex: 1 1 0; min-height: 0; position: relative; overflow: hidden; }
.view > * { position: absolute; inset: 0; }
.scrim { display: none; }
.announce { flex: none; margin: 0 auto 6px; max-width: var(--col); width: calc(100% - 48px); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.an-ic svg { width: 18px; height: 18px; color: var(--bit); }
.an-t { flex: 1; }

/* ---------- Боковая панель ---------- */
.sb-top { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 18px; }
.sb-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.sb-brand .logo { font-size: 22px; }
.sb-brand span { font: 700 25px/1 var(--serif); letter-spacing: -.01em; }
.sb-new { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 14.5px; font-weight: 500; transition: background .15s; }
.sb-new svg { width: 18px; height: 18px; }
.sb-new:hover { background: var(--surface); }
.sb-search { display: flex; align-items: center; gap: 10px; margin: 2px 12px 10px; height: 44px; padding: 0 8px 0 14px; border-radius: 14px; background: var(--surface); color: var(--muted); cursor: text; width: calc(var(--sbw) - 24px) !important; }
.sb-search svg { width: 18px; height: 18px; }
.sb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.sb-search input::placeholder { color: var(--muted); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sb-row { display: flex; align-items: center; gap: 13px; height: 46px; padding: 0 10px 0 12px; border-radius: 12px; color: var(--text-2); font-size: 15.5px; text-align: left; transition: background .15s, color .15s; }
.sb-row > svg:first-child { width: 21px; height: 21px; }
.sb-row > svg:last-child { width: 17px; height: 17px; margin-left: auto; color: var(--faint); }
.sb-row:hover { background: var(--surface); color: var(--text); }
.sb-row.on { background: var(--surface); color: var(--text); }
.sb-row .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bit); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.sb-row .cnt + svg { margin-left: 6px !important; }
.sb-list { flex: 1 !important; min-height: 0; overflow-y: auto; padding: 4px 10px 12px; }
.sb-day { padding: 16px 12px 6px; font-size: 13px; color: var(--muted); }
.sb-c { position: relative; display: flex; align-items: center; height: 40px; padding: 0 4px 0 12px; border-radius: 10px; cursor: pointer; color: var(--text-2); transition: background .12s, color .12s; }
.sb-c .t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.sb-c:hover { background: var(--surface); color: var(--text); }
.sb-c.on { background: var(--surface); color: var(--text); }
.sb-dots { opacity: 0; color: var(--muted); }
.sb-c:hover .sb-dots, .sb-c.on .sb-dots, .sb-dots.open { opacity: 1; }
.sb-busy { width: 7px; height: 7px; border-radius: 50%; background: var(--bit); margin-right: 8px; flex: none; animation: breathe 1.2s infinite; }
.sb-empty { padding: 18px 12px; color: var(--muted); font-size: 14px; }
.sb-foot { border-top: 1px solid var(--line-soft); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.sb-lim { display: flex; flex-direction: column; gap: 9px; padding: 4px 6px 2px; }
.lim-r { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; }
.lim-r b { font-weight: 500; color: var(--text-2); }
.sb-user { display: flex; align-items: center; gap: 2px; }
.sb-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; text-align: left; }
.sb-me:hover { background: var(--surface); }
.sb-un { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-un b { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-un small { color: var(--muted); font-size: 13px; }

/* ---------- Чат ---------- */
.chat { display: flex; flex-direction: column; min-height: 0; }
.scroller { flex: 1 1 0; min-height: 0; overflow-y: auto; scrollbar-gutter: stable both-edges; overscroll-behavior: contain; }
.thread { max-width: var(--col); margin: 0 auto; padding: 8px 24px 36px; }
.chat.is-empty .thread { min-height: 100%; display: flex; align-items: center; justify-content: center; padding-bottom: 6vh; }
.hero { text-align: center; }
/* временный чат: свой вид — пунктирная рамка, призрачный значок, приглушённый фон */
.chat.is-temp .composer { border-style: dashed; border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 80%, var(--bg)); }
.chat.is-temp .composer textarea::placeholder { color: var(--faint); }
.hero-temp { display: flex; flex-direction: column; align-items: center; animation: silkIn .35s var(--ease) both; }
.ht-mark { position: relative; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 22px; color: var(--text-2); border: 1.5px dashed var(--line-strong); background: var(--surface); }
.ht-mark::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed var(--line); opacity: .7; animation: htSpin 18s linear infinite; }
.ht-mark svg { width: 30px; height: 30px; }
.hero-temp .hero-t { font-size: clamp(28px, 4vw, 38px); }
.ht-sub { margin: 12px 0 0; color: var(--muted); font-size: 15px; max-width: 360px; line-height: 1.5; }
.ht-off { margin-top: 18px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; transition: background .15s, color .15s; }
.ht-off:hover { background: var(--surface-2); color: var(--text); }
.tb-temp { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; flex: none; }
.tb-temp svg { width: 15px; height: 15px; }
@keyframes htSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ht-mark::after { animation: none; } }
.hero-mark { font-size: 54px; color: var(--text); display: inline-block; margin-bottom: 22px; }
.hero-t { font: 500 clamp(30px, 4.6vw, 44px)/1.15 var(--serif); margin: 0; letter-spacing: -.015em; }
.hero-p { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin: 14px 0 0; font-size: 14.5px; }
.hero-p svg { width: 17px; height: 17px; }

.dock { flex: none; padding: 0 24px calc(12px + env(safe-area-inset-bottom)); }
.dock-in { max-width: var(--col); margin: 0 auto; }
.composer { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 14px 12px 10px 18px; box-shadow: var(--shadow-cmp); transition: border-color .15s; cursor: text; }
.composer:focus-within { border-color: var(--line-strong); }
.composer.drop { border-color: var(--text-2); border-style: dashed; }
.composer textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font-size: 16.5px; line-height: 25px; min-height: 50px; max-height: 240px; padding: 2px 4px 10px 0; overflow-y: hidden; }
.composer textarea::placeholder { color: var(--muted); }
.cmp-row { display: flex; align-items: center; gap: 4px; height: 44px; margin-left: -8px; }
.cmp-row .ib { width: 40px; height: 40px; border-radius: 12px; }
.cmp-row .ib svg { width: 22px; height: 22px; }
.cmp-row .ib.rec { color: var(--err); background: var(--err-soft); }
.cmp-chips { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.chip-sm { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.chip-sm svg { width: 15px; height: 15px; }
.chip-sm.on { color: var(--text); }
.chip-sm.ghosty { background: transparent; border: 1px dashed var(--line-strong); }
.cmp-model { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 12px; color: var(--text-2); font-size: 15px; white-space: nowrap; min-width: 0; }
.cmp-model b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.cmp-model span { color: var(--muted); }
.cmp-model svg { width: 16px; height: 16px; color: var(--muted); }
.cmp-model:hover, .cmp-model.open { background: var(--surface-2); color: var(--text); }
.cmp-send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--send-off); color: var(--bg); transition: background .15s, transform .1s; margin-left: 4px; flex: none; }
.cmp-send svg { width: 21px; height: 21px; }
.cmp-send.on { background: var(--text); }
.cmp-send:active { transform: scale(.95); }
.cmp-send.stop svg { width: 18px; height: 18px; }
.cmp-att { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 10px; }
.att-img { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.att-img img { width: 100%; height: 100%; object-fit: cover; }
.att-doc { position: relative; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 34px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); max-width: 260px; }
.ad-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; }
.ad-ic svg { width: 19px; height: 19px; color: var(--text-2); }
.ad-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ad-t b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-t small { color: var(--muted); font-size: 12px; }
.att-img button, .att-doc button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.att-img button svg, .att-doc button svg { width: 13px; height: 13px; }
.att-doc button { background: var(--surface-3); color: var(--text); }
.edit-bar { display: flex; align-items: center; gap: 8px; padding: 0 6px 8px 14px; color: var(--text-2); font-size: 13.5px; }
.edit-bar svg { width: 16px; height: 16px; }
.edit-bar span { flex: 1; }
.dock-note { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 30px; padding: 6px 8px 0; font-size: 12.5px; color: var(--muted); }
.dock-note .bar { max-width: 220px; height: 3px; }
.dock-note b { font-weight: 500; color: var(--text-2); }
.dock-note:empty { min-height: 10px; padding: 0; }

/* ---------- Сообщения ---------- */
.msg { position: relative; }
.msg.m-in { animation: msgIn .28s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; margin: 26px 0 6px; }
.msg.user .bubble { max-width: min(82%, 620px); background: var(--surface-2); border-radius: 20px; padding: 10px 16px; font-size: calc(var(--chat-fs) - .5px); line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.u-att { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 8px; max-width: 82%; }
.u-att img { width: 140px; height: 140px; object-fit: cover; border-radius: 14px; cursor: zoom-in; border: 1px solid var(--line); }
.doc-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.doc-chip svg { width: 16px; height: 16px; }
.m-acts { display: flex; align-items: center; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; min-height: 30px; }
.msg:hover .m-acts, .msg:focus-within .m-acts, .msg.ai:last-child .m-acts { opacity: 1; }
.m-acts .ib { color: var(--muted); }
.m-acts .ib:hover { color: var(--text); }
.m-info { margin-left: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.msg.ai { margin: 14px 0 22px; }
.m-err { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--err-soft); color: var(--text); font-size: 14.5px; }
.m-err > svg { width: 19px; height: 19px; color: var(--err); }
.m-err span { flex: 1; }

/* «Думает» — пиксельная «B» мерцает по клеточкам, слово мягко переливается */
.thinking { display: flex; align-items: center; gap: 12px; height: 32px; color: var(--text-2); }
.th-mark { font-size: 19px; color: var(--text); display: inline-flex; }
.th-mark rect { animation: px 1.4s ease-in-out infinite; }
.th-mark rect:nth-child(4n+1) { animation-delay: 0s; }
.th-mark rect:nth-child(4n+2) { animation-delay: .18s; }
.th-mark rect:nth-child(4n+3) { animation-delay: .36s; }
.th-mark rect:nth-child(4n) { animation-delay: .54s; }
.th-mark .logo-dot { animation: px 1.4s ease-in-out infinite .72s; }
@keyframes px { 0%, 100% { opacity: .25; } 45% { opacity: 1; } }
.th-word { font-size: 15px; font-weight: 500; background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 35%, var(--text) 50%, var(--muted) 65%, var(--muted) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
details.think { margin: 0 0 10px; }
details.think > summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 8px; margin-left: -8px; border-radius: 9px; color: var(--muted); font-size: 13.5px; cursor: pointer; user-select: none; }
details.think > summary::-webkit-details-marker { display: none; }
details.think > summary svg { width: 16px; height: 16px; }
details.think > summary svg:last-child { transition: transform .2s; }
details.think[open] > summary svg:last-child { transform: rotate(180deg); }
details.think > summary:hover { background: var(--surface); color: var(--text-2); }
.think-tx { white-space: pre-wrap; color: var(--muted); font-size: 13.5px; line-height: 1.6; border-left: 2px solid var(--line); padding: 4px 0 4px 14px; margin: 6px 0 8px 2px; max-height: 340px; overflow: auto; }

/* Текст ответа */
.md { font-family: var(--read); font-size: calc(var(--chat-fs) + 1px); line-height: 1.68; color: var(--text); word-wrap: break-word; overflow-wrap: anywhere; }
.sans-answers .md { font-size: var(--chat-fs); line-height: 1.62; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: .7em 0; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--read); font-weight: 600; line-height: 1.3; margin: 1.3em 0 .5em; letter-spacing: -.005em; }
.md h1 { font-size: 1.5em; } .md h2 { font-size: 1.3em; } .md h3 { font-size: 1.12em; } .md h4 { font-size: 1em; }
.md ul, .md ol { margin: .6em 0; padding-left: 1.5em; }
.md li { margin: .3em 0; }
.md li::marker { color: var(--muted); }
.md strong { font-weight: 600; }
.md a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--text); }
.md blockquote { margin: .8em 0; padding: .1em 0 .1em 1em; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md code { font-family: var(--mono); font-size: .84em; background: var(--surface-2); padding: .12em .38em; border-radius: 6px; }
.md img { max-width: 100%; border-radius: 14px; margin: 8px 0; cursor: zoom-in; display: block; }
.md table { border-collapse: collapse; width: 100%; margin: 1em 0; font-family: var(--font); font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; vertical-align: top; }
.md th { background: var(--surface); font-weight: 600; }
.code { margin: 1em 0; border-radius: 14px; background: var(--code); border: 1px solid var(--line-soft); overflow: hidden; font-family: var(--font); }
.code-head { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 6px 0 14px; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--line-soft); }
.code-head .btn { background: transparent; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); }
.code pre code { background: none; padding: 0; font-size: inherit; }
.fn { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px; border-radius: 6px; background: var(--surface-2); color: var(--text-2) !important; font: 600 11px/1 var(--font); text-decoration: none !important; vertical-align: .15em; }
.src-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.src-row a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2); font-size: 12.5px; text-decoration: none; }
.src-row a b { width: 17px; height: 17px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 10.5px; }
.src-row.err { color: var(--muted); font-size: 13px; align-items: center; }
.src-row.err svg { width: 15px; height: 15px; }
.legacy-media { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* ---------- Блоки в ответе ---------- */
.bb { margin: 14px 0; font-family: var(--font); font-size: 15px; line-height: 1.5; }
.bb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.bb-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.bb-head svg { width: 17px; height: 17px; }
.bb-head em { font-style: normal; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-head > :nth-last-child(1):is(button, .bb-count) { margin-left: auto; }
.bb-pending { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.bb-err { color: var(--err); font-size: 14px; }
.bb-fail .bb-err { color: var(--text-2); }
.bb-acts { display: flex; gap: 8px; margin-top: 12px; }
.bb-count { color: var(--muted); font-weight: 500; }
.bb-mem { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2); font-size: 13.5px; }
.bb-mem > svg { width: 17px; height: 17px; }
.bb-mem span { flex: 1; }
.mm svg { max-width: 100%; height: auto; }
.bb-fail .bb-src, .bb-src { white-space: pre-wrap; font: 12.5px/1.55 var(--mono); color: var(--muted); margin: 8px 0 0; }

/* Генерация: спокойная заглушка нужного размера — ничего не съезжает */
.gen-wait { position: relative; width: min(100%, 440px); max-height: 560px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.gen-wait.k-video { width: min(100%, 560px); }
.gen-wait.k-audio { height: 92px; }
.gw-glow { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 0%, transparent 38%, rgba(var(--ov), .045) 50%, transparent 62%, transparent 100%); background-size: 260% 100%; animation: gwGlow 2.4s linear infinite; }
@keyframes gwGlow { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.gw-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; }
.gw-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); margin-bottom: 4px; }
.gw-ic svg { width: 22px; height: 22px; }
.gw-in b { font-weight: 500; font-size: 15px; }
.gw-in small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.gen-wait.k-audio .gw-in { flex-direction: row; gap: 12px; }
.gen-wait.k-audio .gw-ic { margin: 0; }
.gw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-soft); }
.gw-bar i { display: block; height: 100%; background: var(--text-2); transition: width 1s linear; }
.gen-out { position: relative; margin: 0; width: min(100%, 440px); max-height: 640px; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); cursor: zoom-in; }
.gen-out.k-video { width: min(100%, 560px); }
.gen-out img, .gen-out video { width: 100%; height: 100%; object-fit: cover; display: block; }
.go-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.gen-out:hover .go-tools { opacity: 1; }
.go-tools button { width: 34px; height: 34px; border-radius: 10px; background: rgba(20, 19, 17, .72); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.go-tools svg { width: 17px; height: 17px; }
.bb-speak audio { width: 100%; height: 40px; }
.prompt-view { white-space: pre-wrap; font-size: 14px; color: var(--text-2); max-height: 50vh; overflow: auto; }
/* графики, тесты, чек-листы, таймер */
.chart .ch-title { font-weight: 600; margin-bottom: 8px; }
.ch-svg, .ch-pie { width: 100%; height: auto; display: block; }
.ch-pie { max-width: 240px; margin: 0 auto; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ch-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.qz-q { margin: 6px 0 16px; }
.qz-t { display: flex; gap: 10px; font-weight: 500; margin-bottom: 8px; }
.qz-t span { width: 22px; height: 22px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; flex: none; margin-top: 1px; }
.qz-opts { display: grid; gap: 6px; }
.qz-o { text-align: left; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); transition: background .15s; }
.qz-o:hover:not(:disabled) { background: var(--surface-2); }
.qz-o.ok { border-color: var(--ok); background: rgba(143, 199, 155, .1); }
.qz-o.bad { border-color: var(--err); background: var(--err-soft); }
.qz-o.dim { opacity: .55; }
.qz-why { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.qz-score { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.td-bar { height: 4px; border-radius: 4px; background: var(--line); margin: 0 0 8px; overflow: hidden; }
.td-bar i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.td-i { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; cursor: pointer; }
.td-i input { margin-top: 3px; accent-color: var(--text); width: 16px; height: 16px; }
.td-i.on span { color: var(--muted); text-decoration: line-through; }
.tm { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tm-v { font: 600 34px/1 var(--font); font-variant-numeric: tabular-nums; min-width: 110px; }
.tm-bar { flex: 1; min-width: 120px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tm-bar i { display: block; height: 100%; background: var(--text-2); }
.tm-btns { display: flex; gap: 6px; }

/* ---------- Живые задания ---------- */
.lv .lv-head svg { color: var(--bit); }
.lv.off { opacity: .85; }
.lv-title { margin: 0; font-weight: 500; }
.lv-f { display: flex; flex-direction: column; gap: 5px; margin: 0 0 10px; }
.lv-f > span { font-size: 12.5px; color: var(--muted); }
.lv-f .input { background: var(--bg); }
.lv-row { display: grid; grid-template-columns: 1fr 96px 112px; gap: 10px; }
.lv-sum { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-soft); margin: 2px 0 12px; }
.lv-sum span { font-weight: 500; }
.lv-sum small { color: var(--muted); font-size: 12.5px; }
.lv-acts { display: flex; justify-content: flex-end; gap: 8px; }
.lv-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.lv-top b { font-weight: 500; }
.lv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.lv-dot.run { background: var(--bit); animation: breathe 1.4s infinite; }
.lv-dot.wait { background: var(--warn); }
.lv-dot.ok { background: var(--ok); }
.lv-dot.bad { background: var(--err); }
.lv-cost { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.lv-cost svg { width: 15px; height: 15px; }
.lv-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 12px; }
.lv-step { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.lv-step i { height: 4px; border-radius: 4px; background: var(--line); }
.lv-step.ok i { background: var(--text-2); }
.lv-step.ok { color: var(--text-2); }
.lv-step.cur i { background: linear-gradient(90deg, var(--text-2), var(--line)); background-size: 200% 100%; animation: gwGlow 1.6s linear infinite; }
.lv-err { padding: 10px 12px; border-radius: 12px; background: var(--err-soft); color: var(--text); font-size: 13.5px; margin: 0 0 12px; }
.lv-ws { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.lv-w { padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); }
.lv-wh { display: flex; align-items: center; gap: 8px; }
.lv-wh b { font-weight: 500; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-wh .pill.s-completed, .lv-wh .pill.s-in_hold { color: var(--ok); }
.lv-wh .pill.s-in_checking { color: var(--warn); }
.lv-wh .pill.s-cancelled_by_owner, .lv-wh .pill.s-expired { color: var(--err); }
.lv-wt { margin: 8px 0 0; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.lv-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lv-files img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }
.lv-file { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--surface); font-size: 13px; text-decoration: none; }
.lv-file svg { width: 15px; height: 15px; }
.lv-v { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.lv-v > svg { width: 17px; height: 17px; margin-top: 1px; }
.lv-v.ok > svg { color: var(--ok); }
.lv-v.bad > svg { color: var(--warn); }
.lv-v.wait > svg { color: var(--muted); }
.lv-v em { color: var(--muted); }
.lv-wa { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lv-foot { display: flex; align-items: center; gap: 8px; }
.lv-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; text-decoration: none; min-width: 0; }
.lv-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-link svg { width: 15px; height: 15px; }
.lv-link:hover { color: var(--text); }
.lv-load { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.lv-list { display: flex; flex-direction: column; gap: 12px; }
.lv-page { padding: 16px 18px; }
.lv-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lv-ph b { font-weight: 600; font-size: 16px; }
.lv-ph small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.lv-bal { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; color: var(--text-2); }
.lv-bal > svg { width: 19px; height: 19px; }
.lv-bal span { flex: 1; }
.lv-bal b { color: var(--text); font-weight: 600; }

/* ---------- Меню и выбор модели ---------- */
.pop { position: fixed; z-index: 76; background: var(--raised); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 6px; overflow-y: auto; animation: popIn .14s var(--ease); }
.pop.up { transform-origin: bottom; }
@keyframes popIn { from { opacity: 0; transform: scale(.98); } }
.pop-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 7px 10px; border-radius: 10px; text-align: left; color: var(--text); font-size: 14.5px; }
.pop-item > svg { width: 18px; height: 18px; color: var(--text-2); }
.pop-item:hover { background: var(--surface-2); }
.pop-item.danger, .pop-item.danger > svg { color: var(--err); }
.pi-t { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pi-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-t small { color: var(--muted); font-size: 12.5px; }
.pi-ck svg { width: 17px; height: 17px; color: var(--text); }
.pop-sep { height: 1px; background: var(--line-soft); margin: 5px 6px; }
.pop-head { padding: 8px 10px 4px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* ---------- Окна ---------- */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(10, 9, 8, .6); display: grid; place-items: center; padding: 16px; animation: fadeIn .15s; }
[data-theme="light"] .modal-back { background: rgba(40, 32, 20, .28); }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(540px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--raised); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-pop); animation: popIn .16s var(--ease); }
.modal.sm { width: min(430px, 100%); }
.modal.center { text-align: center; }
.modal h3 { margin: 0 0 8px; font: 600 23px/1.2 var(--serif); }
.modal p { color: var(--text-2); margin: 0 0 14px; }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal.center .btns { justify-content: center; }
.modal .input + .input, .modal .fld + .fld { margin-top: 12px; }
.na-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 14px; }
.na-ic svg { width: 24px; height: 24px; }
.share-url { display: flex; gap: 8px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 13px; color: var(--muted); }
.fld + .fld { margin-top: 14px; }
.search-modal { padding: 0; width: min(620px, 100%); align-self: start; margin-top: 12vh; overflow: hidden; display: flex; flex-direction: column; }
.sr-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 58px; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.sr-in svg { width: 20px; height: 20px; }
.sr-in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text); }
.sr-list { max-height: 56vh; overflow: auto; padding: 6px; }
.sr-i { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; }
.sr-i > svg { width: 18px; height: 18px; color: var(--muted); margin-top: 2px; }
.sr-i span { display: flex; flex-direction: column; min-width: 0; }
.sr-i b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-i small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-i.on, .sr-i:hover { background: var(--surface-2); }
.sr-empty { padding: 28px; text-align: center; color: var(--muted); }
.toasts { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toast { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 8px 10px 10px; border-radius: 16px; background: var(--toast-bg); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.4; overflow: hidden; touch-action: pan-y; user-select: none; animation: toastIn .34s cubic-bezier(.2, .9, .25, 1.15) both; transition: opacity .25s, transform .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), padding .3s var(--ease); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.toast.out { opacity: 0; transform: translateY(-10px) scale(.97); height: 0 !important; padding-top: 0; padding-bottom: 0; margin-bottom: -8px; border-width: 0; }
.toast.bump { animation: toastBump .32s var(--ease); }
.t-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.t-ic svg { width: 16px; height: 16px; }
.t-ok .t-ic { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.t-err .t-ic { background: var(--err-soft); color: var(--err); }
.t-err .t-ic svg { transform: rotate(180deg); }
.t-info .t-ic { background: color-mix(in srgb, var(--bit) 16%, transparent); color: var(--bit); }
.t-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.t-body b { font-weight: 600; font-size: 14px; }
.t-body span { color: var(--text); font-weight: 450; }
.t-body b + span { color: var(--text-2); font-size: 13.5px; }
.t-act { flex: none; height: 30px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px; }
.t-act:hover { background: var(--line); }
.t-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--muted); opacity: .7; transition: opacity .15s, background .15s; }
.t-x svg { width: 14px; height: 14px; }
.t-x:hover { opacity: 1; background: var(--surface-2); color: var(--text); }
.t-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--muted); opacity: .35; transform-origin: left; pointer-events: none; }
.t-ok .t-bar { background: var(--ok); opacity: .7; }
.t-err .t-bar { background: var(--err); opacity: .7; }
.t-info .t-bar { background: var(--bit); opacity: .7; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toastBump { 30% { transform: scale(1.03); } 60% { transform: scale(.99); } }
@media (max-width: 640px) { .toasts { top: max(10px, env(safe-area-inset-top)); } .toast { border-radius: 14px; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.bump { animation: none; } }
.lb { position: fixed; inset: 0; z-index: 85; background: rgba(8, 8, 7, .92); display: flex; flex-direction: column; animation: fadeIn .15s; }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 12px; object-fit: contain; }
.lb-img { background: rgba(8, 8, 7, .95); }
.lb-img .lb-stage { overflow: auto; padding: 8px 16px 16px; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.lb-img .lb-stage img { max-height: calc(100dvh - 104px); cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.lb-img.zoomed .lb-stage { display: block; text-align: center; }
.lb-img.zoomed .lb-stage img { max-width: none; max-height: none; cursor: zoom-out; border-radius: 6px; min-width: min(100%, 900px); }
.lb-img .lb-top { position: relative; z-index: 2; }
.lb-img .lb-top a.ib { color: rgba(255, 255, 255, .8); }
.lb-img .lb-top a.ib:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.lb-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); font-size: 12.5px; pointer-events: none; animation: lbHint 3.2s ease forwards; white-space: nowrap; }
.lb-img.zoomed .lb-hint { display: none; }
@keyframes lbHint { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.lb > .lb-stage:only-child, .lb > .lb-stage:first-child { cursor: zoom-out; }
.lb-x { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.lb-x svg { width: 20px; height: 20px; }
.lb-top { display: flex; align-items: center; gap: 4px; padding: 12px 14px; color: #fff; }
.lb-top .ib { color: rgba(255, 255, 255, .8); }
.lb-top .ib:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.lb-n { font-size: 13.5px; color: rgba(255, 255, 255, .6); padding-left: 6px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.lb-nav svg { width: 22px; height: 22px; }
.lb-nav.l { left: 16px; }
.lb-nav.r { right: 16px; }
.lb-cap { padding: 10px 20px 20px; color: rgba(255, 255, 255, .75); font-size: 13.5px; text-align: center; max-width: 820px; margin: 0 auto; }
.lb-cap b { color: #fff; font-weight: 500; margin-right: 8px; }
.lb-cap p { margin: 6px 0 0; color: rgba(255, 255, 255, .6); }
.lb-aud { display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; }
.lb-aud > svg { width: 48px; height: 48px; }

/* ---------- Страницы ---------- */
.page { height: 100%; overflow-y: auto; }
.page-in { max-width: 880px; margin: 0 auto; padding: 18px 24px 64px; }
.page.wide .page-in { max-width: 1120px; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-h h1 { margin: 0 0 6px; font: 600 34px/1.15 var(--serif); letter-spacing: -.01em; }
.page-h p { margin: 0; color: var(--text-2); max-width: 600px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 4px; margin: 0 0 10px -4px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.back svg { width: 18px; height: 18px; }
.back:hover { background: var(--surface); color: var(--text); }
.seg-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pj { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.pj:hover { border-color: var(--line-strong); }
.pj-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.pj-ic svg { width: 21px; height: 21px; color: var(--text-2); }
.pj-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pj-t b { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-t small { color: var(--muted); font-size: 13px; }
.pj-chats { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.pj-c { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.pj-c .t { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-c small { color: var(--muted); white-space: nowrap; }
.pj-c:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gal-i { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); cursor: zoom-in; }
.gal-i img, .gal-i video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.gal-i:hover img, .gal-i:hover video { transform: scale(1.02); }
.gal-play { position: absolute; left: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.gal-play svg { width: 14px; height: 14px; }
.gal-fav { position: absolute; right: 10px; top: 10px; color: #f2c96b; }
.gal-fav svg { width: 18px; height: 18px; }
.gal-aud { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; color: var(--text-2); font-size: 13.5px; }
.gal-aud svg { width: 26px; height: 26px; }

/* ---------- Настройки (и общий каркас для админки) ---------- */
.scroll { height: 100%; overflow-y: auto; }
.st-wrap { max-width: 1060px; margin: 0 auto; padding: 18px 24px 64px; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 36px; align-items: start; }
.st-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.st-nav h1 { margin: 0 0 16px 10px; font: 600 clamp(21px, 2.1vw, 28px)/1.15 var(--serif); overflow-wrap: anywhere; }
.st-g { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.st-gt { padding: 4px 12px 6px; font-size: 12.5px; color: var(--muted); }
.st-i { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 11px; color: var(--text-2); font-size: 14.5px; text-align: left; }
.st-i svg { width: 18px; height: 18px; }
.st-i:hover { background: var(--surface); color: var(--text); }
.st-i.on { background: var(--surface); color: var(--text); font-weight: 500; }
.st-i .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bit); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.st-out { margin-top: 8px; color: var(--muted); }
.st-main { min-width: 0; }
.st-pane h2 { margin: 0 0 6px; font: 600 26px/1.2 var(--serif); }
.st-sub { color: var(--text-2); margin: 0 0 16px; }
.st-pane > h2 + .card, .st-pane > h2 + div { margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px 18px; margin: 0 0 14px; }
.card > .fld { padding: 12px 0; }
.card > .fld + .fld { margin-top: 0; border-top: 1px solid var(--line-soft); }
.card.patch { padding: 16px 18px; }
.patch-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.patch-h b { font-weight: 600; }
.patch-h span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.patch ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14.5px; }
.patch li { margin: 5px 0; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.card > .srow:last-child, .sgroup > .srow:last-child { border-bottom: 0; }
.srow-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.srow-t b { font-weight: 500; }
.srow-t small { color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.srow-c { display: flex; align-items: center; gap: 8px; flex: none; }
.srow-c select.input { width: 250px; }
.srow.wide { flex-direction: column; align-items: stretch; }
.srow.wide .srow-c { flex: 1; }
.inl { display: flex; gap: 8px; align-items: center; width: 100%; }
.inl.col { flex-direction: column; align-items: stretch; }
.prof { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.prof div { display: flex; flex-direction: column; }
.prof b { font-size: 17px; font-weight: 600; }
.prof small { color: var(--muted); }
.st-note { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.mem-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 12px; }
.mem-i { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; }
.mem-i span { flex: 1; }
.card > .inl { padding: 0 0 14px; }
.admin-host { height: 100%; }
.admin-host > .scroll .st-wrap { max-width: 1240px; }
.st-main.wide { min-width: 0; }

/* ---------- Публичная ссылка ---------- */
.pub { position: fixed; inset: 0; overflow: auto; background: var(--bg); }
.pub-h { display: flex; align-items: center; padding: 18px 24px; }
.pub-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.pub-brand .logo { font-size: 22px; }
.pub-brand span { font: 700 24px/1 var(--serif); }
.pub-m { max-width: var(--col); margin: 0 auto; padding: 10px 24px 40px; }
.pub-m h1 { font: 600 32px/1.2 var(--serif); margin: 0 0 4px; }
.pub-sub { color: var(--muted); margin: 0 0 20px; }
.pub-f { text-align: center; color: var(--muted); padding: 30px; font-size: 13.5px; }
.pub-load, .pub-err { min-height: 100vh; display: grid; place-items: center; text-align: center; color: var(--muted); }
.pub-err h2 { font-family: var(--serif); color: var(--text); }
.pub .m-acts { opacity: 1; }

/* ---------- Телефон ---------- */
@media (max-width: 860px) {
  .app, .app.sb-off { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: min(88vw, 340px); --sbw: min(88vw, 340px); transform: translateX(-102%); transition: transform .26s var(--ease); border-right: 1px solid var(--line-soft); box-shadow: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .app.drawer .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .app.drawer .scrim { opacity: 1; pointer-events: auto; }
  .tb-new { display: inline-grid !important; }
  .topbar { padding: env(safe-area-inset-top) 6px 0; height: calc(52px + env(safe-area-inset-top)); }
  .tb-l, .tb-r { min-width: 76px; }
  .thread { padding: 4px 16px 28px; }
  .dock { padding: 0 10px calc(8px + env(safe-area-inset-bottom)); }
  .composer { border-radius: 24px; padding: 12px 8px 6px 14px; }
  .composer textarea { font-size: 16px; min-height: 30px; }
  .cmp-model { padding: 0 6px; font-size: 14px; max-width: 46vw; }
  .cmp-model span { display: none; }
  .dock-note { min-height: 22px; padding-top: 4px; font-size: 11.5px; }
  .m-acts { opacity: 1; }
  .msg.user .m-acts { display: none; }
  .msg.user .bubble { max-width: 88%; }
  .hero-mark { font-size: 44px; margin-bottom: 18px; }
  .sb-dots { opacity: 1; }
  .sb-c { height: 44px; }
  .page-in, .st-wrap { padding: 8px 16px 56px; }
  .page-h { flex-direction: column; gap: 12px; }
  .page-h h1 { font-size: 28px; }
  .st-wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .st-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-nav h1 { display: none; }
  .st-g { flex-direction: row; gap: 6px; margin: 0; }
  .st-gt { display: none; }
  .st-i { white-space: nowrap; border: 1px solid var(--line); height: 36px; }
  .srow { flex-direction: column; align-items: stretch; gap: 10px; }
  .srow-c select.input { width: 100%; }
  .lv-row { grid-template-columns: 1fr 1fr; }
  .lv-row .lv-f:first-child { grid-column: 1 / -1; }
  .lv-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .lv-step span { font-size: 10.5px; }
  .gal { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .gen-wait, .gen-out { width: 100%; }
  .u-att img { width: 110px; height: 110px; }
  .modal { padding: 20px; border-radius: 20px; }
  .lb-nav { display: none; }
  .go-tools { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Для инструментов и админки ---------- */
.select, select.select { height: 36px; padding: 0 30px 0 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237e7a71' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--text); appearance: none; outline: none; }
.textarea { width: 100%; min-height: 90px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); outline: none; resize: vertical; }
.input.sm { height: 34px; font-size: 14px; border-radius: 10px; }
.adm2 .at span svg { width: 18px !important; height: 18px !important; }
.at > span { display: inline-flex; }
.st-pane > h2 { margin-bottom: 16px; }
.gen-out img, .gen-out video { position: absolute; inset: 0; }
.app.sb-off [data-tb-new] { display: none; }
@media (max-width: 860px) {
  .app.sb-off [data-tb-new] { display: inline-grid; }
  .app.in-chat .tb-new { display: none !important; }
}

/* ---------- Выбор модели и мышления ---------- */
.pop.mp { padding: 0; border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; }
.mp-top { flex: none; padding: 12px 12px 6px; }
.mp-top h3 { margin: 6px 8px 4px; font: 700 22px/1.2 var(--serif); }
.mp-s { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 13px; border-radius: 13px; background: var(--surface-2); color: var(--muted); }
.mp-s svg { width: 17px; height: 17px; }
.mp-s input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; min-width: 0; }
.mp-think { flex: none; padding: 8px 12px 10px; border-bottom: 1px solid var(--line-soft); }
.mpt-row { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 8px; }
.mpt-row span { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.mpt-row span svg { width: 16px; height: 16px; color: var(--bit); }
.mpt-row em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.mpt-seg { --i: 0; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding: 3px; border-radius: 14px; background: var(--surface-2); }
.mpt-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 5); border-radius: 11px; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 0 0 1px var(--line); transform: translateX(calc(var(--i) * 100%)); transition: transform .28s var(--ease); }
[data-theme="light"] .mpt-thumb { box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 1px var(--line); }
.mpt-seg button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 7px; border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 500; transition: color .2s; }
.mpt-seg button:hover { color: var(--text-2); }
.mpt-seg button.on { color: var(--text); }
.tbars { width: 16px; height: 16px; }
.tbars rect { fill: currentColor; opacity: .25; transition: opacity .2s, fill .2s; }
.tbars rect.on { opacity: 1; }
.mpt-seg button.on .tbars rect.on { fill: var(--bit); }
.mp-list { flex: 1 1 auto; min-height: 90px; overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.mp-g { padding: 12px 10px 5px; font-size: 12.5px; color: var(--muted); }
.mp-i { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 0 10px; border-radius: 12px; text-align: left; }
.mp-i:hover { background: var(--surface-2); }
.mp-i.on { background: var(--surface-2); }
.mp-n { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-i small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mp-i em { font-style: normal; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.mp-ck { width: 18px; display: inline-flex; flex: none; }
.mp-ck svg { width: 17px; height: 17px; }
.mp-empty { padding: 18px; text-align: center; color: var(--muted); }
.cm-think { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14px; }
.cm-think .tbars rect.on { fill: var(--bit); }

/* ---------- Меню профиля ---------- */
.pop.acct { padding: 6px; border-radius: 18px; }
.ac-me { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.ac-me div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ac-me b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-me small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-me .av.lg { width: 42px; height: 42px; font-size: 17px; }
.ac-list .pop-item.on { background: var(--surface-2); }
.ac-c { color: var(--muted); font-size: 12.5px; }
.ac-c .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bit); color: #fff; font-size: 11.5px; display: grid; place-items: center; font-weight: 600; }
.sb-me > svg { width: 16px; height: 16px; color: var(--muted); margin-left: auto; transform: rotate(180deg); }
.sb-me .av { position: relative; }
.av-dot { position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--bit); border: 2px solid var(--bg); }

/* ---------- Эффекты в настройках ---------- */
.fx-head { margin: 22px 0 10px; font-weight: 600; font-size: 15px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.fx-card { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .15s; }
.fx-card:hover { border-color: var(--line-strong); }
.fx-card.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.fx-card b { font-weight: 600; font-size: 14px; margin-top: 6px; }
.fx-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.fx-prev { height: 74px; border-radius: 11px; background: var(--bg); overflow: hidden; position: relative; display: flex; align-items: center; padding: 0 12px; }
.fx-prev .md { font-size: 14px; line-height: 1.4; }
.fx-prev .md p { margin: 0; }
.fx-prev .gen-wait { position: absolute; inset: 0; width: auto; max-height: none; border-radius: 0; border: 0; }
.fx-prev .gen-wait .gw-in { padding: 0; }

/* ---------- Невысокое окно ноутбука: всё помещается ---------- */
@media (max-height: 760px) and (min-width: 861px) {
  .topbar { height: 50px; }
  .sb-top { padding: 10px 10px 8px 16px; }
  .sb-new { height: 36px; }
  .sb-search { height: 40px; margin-bottom: 6px; }
  .sb-row { height: 40px; }
  .sb-c { height: 36px; }
  .sb-foot { padding: 8px 10px 10px; gap: 6px; }
  .composer { padding: 10px 10px 6px 16px; border-radius: 22px; }
  .composer textarea { min-height: 28px; font-size: 16px; line-height: 24px; padding-bottom: 6px; }
  .cmp-row { height: 40px; }
  .cmp-send { width: 40px; height: 40px; }
  .dock { padding-bottom: 8px; }
  .dock-note { min-height: 22px; padding-top: 4px; font-size: 11.5px; }
  .hero-mark { font-size: 42px; margin-bottom: 14px; }
  .hero-t { font-size: 34px; }
  .msg.user { margin-top: 18px; }
  .page-in, .st-wrap { padding-top: 10px; }
  .page-h h1 { font-size: 28px; }
  .mpt-seg button { padding: 6px 2px 5px; }
}
@media (max-height: 600px) and (min-width: 861px) {
  .dock-note { display: none; }
  .hero-mark { display: none; }
  .sb-lim { display: none; }
  .mpt-row { display: none; }
}
@media (max-width: 1180px) and (min-width: 861px) {
  :root { --sbw: 256px; }
  .thread { padding-left: 20px; padding-right: 20px; }
  .st-wrap { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
}

/* ---------- Карточка пользователя в Админке ---------- */
.adm-shade { position: fixed; inset: 0; z-index: 77; background: rgba(10, 9, 8, .5); animation: fadeIn .15s; }
.adm-drawer { position: fixed; z-index: 78; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--raised); border-left: 1px solid var(--line); box-shadow: -24px 0 70px rgba(0, 0, 0, .4); overflow-y: auto; overscroll-behavior: contain; animation: drawerIn .24s var(--ease); }
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0; } }
.ad-head { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 12px; }
.ad-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 22px; background: var(--raised); border-bottom: 1px solid var(--line); }
.ad-body { padding: 18px 22px 40px; }
.ac-msgs { overflow-y: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.ac-msgs .msg .att img { max-width: 160px; border-radius: 10px; }
.ac-msgs .msg.assistant .bubble, .ac-msgs .msg.user .bubble { white-space: pre-wrap; }
.presenter { position: fixed; inset: 0; z-index: 95; background: #000; display: grid; place-items: center; cursor: pointer; }
@media (max-width: 860px) { .ad-head, .ad-acts, .ad-tabs, .ad-body { padding-left: 14px; padding-right: 14px; } }
.tb-back { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 12px 0 6px; border-radius: 10px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.tb-back svg { width: 19px; height: 19px; }
.tb-back:hover { background: var(--surface-2); color: var(--text); }
.modal { position: relative; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); z-index: 2; }
.modal-x svg { width: 18px; height: 18px; }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.modal h3 { padding-right: 36px; }
.search-modal .modal-x { top: 13px; }
.search-modal .sr-in { padding-right: 52px; }
/* скриншоты живых исполнителей — целиком, без обрезки */
.lv-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lv-files img { width: auto !important; height: auto !important; max-width: min(100%, 260px) !important; max-height: 340px !important; object-fit: contain !important; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: zoom-in; margin: 0 !important; display: block; }
.app:not(.in-chat) .tb-new { display: none !important; }

/* ---------- Узкая область (неполное окно, открытая панель): всё перестраивается, ничего не налезает ---------- */
.view { container-type: inline-size; container-name: view; }
.srow { flex-wrap: wrap; }
.srow-t { flex: 1 1 220px; }
.srow-c { flex: 0 1 auto; max-width: 100%; min-width: 0; flex-wrap: wrap; }
.srow-c select.input { width: min(260px, 100%); }
@container view (max-width: 820px) {
  .st-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 6px; }
  .st-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: none; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-nav h1 { display: none; }
  .st-g { flex-direction: row; gap: 6px; margin: 0; }
  .st-gt { display: none; }
  .st-i { white-space: nowrap; border: 1px solid var(--line); height: 36px; flex: none; }
  .st-nav .adm-add { flex: none; white-space: nowrap; }
  .page-h { flex-direction: column; gap: 12px; }
  .page-in { padding-left: 18px; padding-right: 18px; }
  .lv-row { grid-template-columns: 1fr 1fr; }
  .lv-row .lv-f:first-child { grid-column: 1 / -1; }
  .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .adm-today { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .adm-grid2 { grid-template-columns: minmax(0, 1fr) !important; }
}
@container view (max-width: 560px) {
  .srow { flex-direction: column; align-items: stretch; gap: 10px; }
  .srow-c { justify-content: flex-start; }
  .srow-c select.input { width: 100%; }
  .lv-steps span { font-size: 10.5px; }
  .thread { padding-left: 14px; padding-right: 14px; }
}
.srow.wide .srow-t { flex: none; }
.srow.wide .srow-c { width: 100%; }
@container view (max-width: 560px) { .srow .srow-t { flex: none; } }

/* ---------- Экран входа: живые детали (v18) ---------- */
.auth { --mx: 50vw; --my: 30vh; }
.auth-in { position: relative; z-index: 1; }
.auth-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.auth-bg::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(var(--ov), .08) 1px, transparent 1.5px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 30%, transparent 85%); mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 30%, transparent 85%); }
.ab-glow { position: fixed; left: var(--mx); top: var(--my); width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--bit-rgb), .13), transparent 62%); transition: left .5s var(--ease), top .5s var(--ease); }
.ab-chips { position: absolute; inset: 0; }
.ab-chip { position: absolute; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13.5px; white-space: nowrap; opacity: 0; box-shadow: var(--shadow-cmp); animation: abIn .8s var(--ease) forwards, abFloat 9s ease-in-out infinite; animation-delay: calc(var(--i) * .18s + .4s), calc(var(--i) * -1.3s); }
.ab-chip:nth-child(1) { left: 7%; top: 14%; } .ab-chip:nth-child(2) { right: 8%; top: 11%; }
.ab-chip:nth-child(3) { left: 4%; top: 46%; } .ab-chip:nth-child(4) { right: 5%; top: 42%; }
.ab-chip:nth-child(5) { left: 10%; bottom: 16%; } .ab-chip:nth-child(6) { right: 11%; bottom: 19%; }
.ab-chip:nth-child(7) { left: 22%; top: 6%; } .ab-chip:nth-child(8) { right: 24%; bottom: 7%; }
@keyframes abIn { to { opacity: .9; } }
@keyframes abFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@media (max-width: 980px), (max-height: 620px) { .ab-chips { display: none; } }
.ab-logo rect { transform-box: fill-box; transform-origin: center; animation: abPix .55s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d, 0ms); }
.ab-logo .logo-dot { animation: abPix .55s cubic-bezier(.3, 1.4, .5, 1) both, abBlink 2.4s ease-in-out 1.6s infinite; animation-delay: 1.1s, 1.8s; }
@keyframes abPix { from { opacity: 0; transform: scale(.2) translateY(-10px); } }
@keyframes abBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.auth-can { margin: -14px 0 24px; font-size: 14.5px; color: var(--muted); min-height: 22px; }
.auth-can b { font-weight: 500; color: var(--text); }
.auth-can b.in { display: inline-block; animation: clIn .6s cubic-bezier(.25, .6, .3, 1) both; }
.auth-can b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 2px; background: var(--bit); vertical-align: 1px; animation: abBlink 1.1s steps(2) infinite; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 5px; margin: -2px 2px 0; height: 16px; }
.pw-meter i { height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .25s; }
.pw-meter span { min-width: 64px; text-align: right; font-size: 12px; color: var(--muted); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--err); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: color-mix(in srgb, var(--ok) 70%, var(--warn)); }
.pw-meter[data-s="4"] i { background: var(--ok); }
@media (prefers-reduced-motion: reduce) { .ab-chip, .ab-logo rect, .auth-can b.in { animation: none; opacity: 1; } .ab-chip { opacity: .8; } }

/* ---------- Админка v18: помощник, данные, кредиты ---------- */
.asst { margin: 0 0 18px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--bit) 6%, var(--surface)), var(--surface)); }
.adm-drawer .asst { margin: 4px 22px 14px; }
.asst-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.asst-h svg { width: 17px; height: 17px; color: var(--bit); align-self: center; }
.asst-h b { font-size: 15px; font-weight: 600; }
.asst-h small { color: var(--muted); font-size: 13px; }
.asst-f { display: flex; gap: 8px; }
.asst-f .input { flex: 1; min-width: 0; height: 42px; border-radius: 14px; }
.asst-f .btn { width: 42px; height: 42px; padding: 0; border-radius: 14px; flex: none; }
.asst-f .btn svg { width: 19px; height: 19px; }
.asst-ex { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.asst-ex .chip { font-size: 12.5px; }
.asst-r { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); font-size: 14px; }
.asst-r.think { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.asst-r.err { color: var(--err); }
.asst-r p { margin: 0 0 8px; }
.asst-r ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.asst-r li { display: flex; align-items: flex-start; gap: 9px; color: var(--text); line-height: 1.4; }
.asst-r li > i { width: 7px; height: 7px; margin: 7px 4px 0; border-radius: 2px; background: var(--bit); flex: none; }
.asst-r li > svg { width: 15px; height: 15px; margin-top: 2px; flex: none; }
.asst-r li.ok > svg { color: var(--ok); }
.asst-r li.bad > svg { color: var(--err); }
.asst-r li em { color: var(--muted); font-style: normal; overflow-wrap: anywhere; }
.asst-r .btns { margin-top: 12px; justify-content: flex-end; }
.ad-id h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-id p { display: flex; align-items: center; gap: 4px; }
.ad-login { font-family: var(--mono); font-size: 13px; }
.ib.xs { width: 26px; height: 26px; border-radius: 8px; }
.ib.xs svg { width: 14px; height: 14px; }
.ad-stats { display: flex; gap: 8px; overflow-x: auto; padding: 0 22px 12px; scrollbar-width: none; }
.ad-stats::-webkit-scrollbar { display: none; }
.ad-st { flex: 1 0 auto; min-width: 92px; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); text-align: left; }
.ad-st small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ad-st b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-st b i { font-style: normal; color: var(--muted); font-weight: 400; font-size: 12.5px; }
button.ad-st { border: 1px solid color-mix(in srgb, var(--bit) 35%, transparent); }
.ad-data .ad-kv { flex-wrap: wrap; }
.ad-data code, .ad-kv code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 3px 8px; border-radius: 7px; overflow-wrap: anywhere; }
.pw-hid { letter-spacing: .1em; }
.pw-hid.shown { letter-spacing: 0; }
.ad-pw { display: flex; gap: 8px; margin-top: 12px; }
.ad-pw .input { flex: 1; min-width: 0; }
.ad-cr { display: flex; flex-direction: column; gap: 10px; }
.ad-crb { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ad-cri { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-cri .input { flex: 1 1 180px; min-width: 0; }
.ad-crq { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-costs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; }
.cr-cost { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-right: 1px solid var(--line-soft); }
.cr-cost span { display: flex; align-items: center; gap: 7px; font-weight: 500; font-size: 14px; }
.cr-cost span svg { width: 16px; height: 16px; color: var(--muted); }
.cr-cost small { color: var(--muted); font-size: 12px; }
.cr-m { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.cr-m .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 13px; }
.cr-madd { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cr-madd .input:first-child { flex: 1 1 200px; }
.cr-u { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.cr-u:last-child { border-bottom: 0; }
.cr-un { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.cr-un b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-un small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-ub { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cr-ub .dim { font-weight: 400; font-size: 12.5px; }
.cr-uq { display: flex; gap: 4px; }
.ur-cr { color: var(--bit) !important; font-weight: 600; }
.w120 { width: 120px; }
@media (max-width: 560px) { .cr-uq { display: none; } .adm-drawer .asst { margin: 4px 14px 14px; } .ad-stats { padding: 0 14px 12px; } }
.sgroup > .srow { padding: 12px 16px; min-height: 60px; }
.sgroup.cr-costs .cr-cost:last-child { border-right: 0; }
@media (max-width: 560px) { .asst-ex .chip:nth-child(n+4) { display: none; } .asst-h small { display: none; } }

/* ---------- v19: галочка владельца ---------- */
.ver { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; margin-left: .3em; vertical-align: -.14em; color: #3b9cf5; flex: none; --ver-ink: #fff; }
.ver svg { width: 100%; height: 100%; }
[data-theme="light"] .ver { color: #1d8cf0; }

/* ---------- v19: админка — 5 разделов, подразделы чипами ---------- */
.adm-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.adm-subs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.adm-subs .chip .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--bit); color: #fff; font-size: 11px; }
@container view (max-width: 820px) {
  .adm-nav { flex-direction: row; gap: 6px; margin: 0; }
  .adm-subs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px -2px 14px; padding: 0 2px; }
  .adm-subs::-webkit-scrollbar { display: none; }
  .adm-subs .chip { flex: none; }
  .adm2 .st-main h2 { font-size: 24px; margin-bottom: 12px; }
}
@media (max-width: 860px) {
  .adm-nav { flex-direction: row; gap: 6px; margin: 0; }
  .st-nav .adm-add { padding: 0 12px; }
  .st-nav .adm-add span { display: none; }
}

/* ---------- v19: помощник-разговор ---------- */
.asst.big { padding: 16px; }
.asst-h .lnk { font-size: 13px; color: var(--muted); }
.asst-h .lnk:hover { color: var(--text); }
.asst-log { display: flex; flex-direction: column; gap: 10px; max-height: min(58vh, 560px); overflow-y: auto; margin: 0 -4px 10px; padding: 0 4px; overscroll-behavior: contain; }
.asst-log:empty { display: none; }
.asst.big .asst-log { max-height: min(62vh, 640px); }
.al { display: flex; flex-direction: column; max-width: 100%; }
.al.me { align-items: flex-end; }
.al.me > div { max-width: 86%; padding: 9px 14px; border-radius: 16px 16px 4px 16px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.al.bot { align-items: stretch; }
.al-t { font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.al-t p { margin: 0 0 6px; } .al-t p:last-child { margin: 0; }
.al-t ul, .al-t ol { margin: 4px 0; padding-left: 20px; }
.al.bot .asst-r { margin-top: 8px; }
.al.note { flex-direction: row; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.asst-f { align-items: flex-end; }
.asst-f textarea.input { flex: 1; min-width: 0; min-height: 42px; max-height: 140px; height: 42px; padding: 10px 14px; border-radius: 14px; resize: none; line-height: 1.45; font-size: 15px; }
.asst-auto { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.asst-auto input { accent-color: var(--bit); width: 15px; height: 15px; }

/* ---------- v19: мелкие правки ---------- */
.st-note code, .hint-s code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; white-space: nowrap; display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: bottom; }
.st-note.sm { font-size: 12.5px; line-height: 1.5; }
.pe-ll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.pe-ll .pe-l { display: flex; flex-direction: column; gap: 4px; }
.pe-ll .pe-l span { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .pe-ll { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* края ленты: сообщения мягко уходят под шапку и поле ввода, без резкого обреза */
.scroller { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 10px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 10px), transparent 100%); }
.chat.is-empty .scroller { -webkit-mask-image: none; mask-image: none; }
.al.me.q > div { opacity: .55; }
@container view (max-width: 820px) { .adm2.st-wrap { padding-left: 16px; padding-right: 16px; } }
@media (max-width: 860px) { .adm2.st-wrap { padding-left: 16px; padding-right: 16px; } }
.bb-cut .bb-err { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); font-size: 13.5px; line-height: 1.45; } .bb-cut .bb-err svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }

/* ---------- v19: в чате шапка без полосы и без заголовка — сообщения идут до самого верха ---------- */
.app.in-chat .topbar { position: absolute; top: 0; left: 0; right: 0; background: none; pointer-events: none; }
.app.in-chat .topbar > * { pointer-events: auto; }
.app.in-chat .tb-c { pointer-events: none; }
.app.in-chat .tb-c > * { pointer-events: auto; }
.app.in-chat .thread { padding-top: 64px; }
.app.in-chat .scroller { -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.15) 20px, #000 72px, #000 calc(100% - 10px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.15) 20px, #000 72px, #000 calc(100% - 10px), transparent 100%); }
.app.in-chat .chat.is-empty .scroller { -webkit-mask-image: none; mask-image: none; }
.app.in-chat .chat.is-empty .thread { padding-top: 56px; }
@media (max-width: 860px) {
  .app.in-chat .thread { padding-top: calc(58px + env(safe-area-inset-top)); }
}

/* ---------- v20: вход через Google ---------- */
.g-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font-weight: 500; text-decoration: none; }
.g-btn:hover { background: var(--surface-2); }
.g-btn svg { width: 19px; height: 19px; flex: none; }
.g-btn.load { opacity: .6; pointer-events: none; }
[data-theme="light"] .g-btn { background: #fff; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-legal { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; } .auth-legal a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; } .auth-legal a:hover { color: var(--text); text-decoration: underline; }

/* ---------- v21: живые задания — повторы, ИИ решает сам ---------- */
.lv-rep { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
.lv-rep-i { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; }
.lv-rep-i svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--bit); }
.lv-rp { gap: 4px; } .lv-rp svg { width: 12px; height: 12px; }
.lv-sh { margin: 4px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lv-sc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lv-sc > svg { width: 18px; height: 18px; color: var(--bit); flex: none; }
.lv-sc > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lv-sc small { color: var(--muted); font-size: 12.5px; }
.lv-sc.off { opacity: .6; }
.lv-wa-t { color: var(--muted); font-size: 12px; margin-right: 4px; align-self: center; }
@media (max-width: 560px) { .lv-rep { grid-template-columns: 1fr 1fr; } .lv-rep .lv-f:first-child { grid-column: 1 / -1; } }

/* ---------- v22–23: вход через Google — прежний стиль, чуть ярче ---------- */
.btn.auth-g, .btn.auth-g:hover, .btn.auth-g:focus-visible { background: var(--text); color: var(--bg); }
.auth-g { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 12px; height: 54px; border-radius: 14px; font-weight: 600; font-size: 15.5px; text-decoration: none; border: 0; transition: transform .2s var(--ease), box-shadow .25s var(--ease), opacity .2s; box-shadow: 0 10px 30px -14px rgba(var(--bit-rgb), .6); }
.auth-g svg { width: 20px; height: 20px; flex: none; background: #fff; border-radius: 50%; padding: 3px; box-sizing: content-box; position: relative; z-index: 1; }
.auth-g span { position: relative; z-index: 1; }
.auth-g::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); opacity: 0; }
.auth-g:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -14px rgba(var(--bit-rgb), .75); }
.auth-g:hover::after { animation: agSweep .9s var(--ease); }
@keyframes agSweep { 0% { left: -40%; opacity: 1; } 100% { left: 120%; opacity: 1; } }
.auth-g:active { transform: none; }
.auth-g.load { pointer-events: none; opacity: .75; }
.auth-g.load span::after { content: "…"; }
/* стеклянная карточка и мягкое свечение вокруг */
.auth-in { max-width: 450px; }
.auth-card { position: relative; padding: 36px 30px 26px; border-radius: 28px; background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid var(--line-soft, var(--line)); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55); animation: acIn .7s cubic-bezier(.2, .8, .2, 1) both; }
[data-theme="light"] .auth-card { background: rgba(255, 255, 255, .62); box-shadow: 0 30px 70px -34px rgba(60, 45, 25, .3); }
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--acA, 0deg), transparent 0 70%, rgba(var(--bit-rgb), .55) 82%, transparent 94%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: acSpin 7s linear infinite; pointer-events: none; }
@property --acA { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes acSpin { to { --acA: 360deg; } }
@keyframes acIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.auth-card .auth-mark { position: relative; }
.auth-card .auth-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--bit-rgb), .28), transparent 65%); z-index: -1; animation: amGlow 3.6s ease-in-out infinite; }
@keyframes amGlow { 50% { transform: scale(1.18); opacity: .6; } }
.auth-card .auth-h { font-size: 34px; }
.ab-chip { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 480px) { .auth-card { padding: 30px 20px 22px; border-radius: 24px; } .auth-card .auth-h { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { .auth-card, .auth-card::before, .auth-card .auth-mark::after, .auth-g:hover::after { animation: none !important; } }
.ag-msg { margin-top: 10px; }
.ag-msg:empty { min-height: 0; margin: 0; }
.ag-inv { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -8px 0 14px; padding: 9px 14px; border-radius: 12px; background: rgba(143, 199, 155, .12); color: #9fd3ab; font-size: 14px; }
[data-theme="light"] .ag-inv { color: #2f7a45; }
.ag-inv svg { width: 16px; height: 16px; flex: none; }
.ag-invf { display: flex; gap: 8px; margin-top: 12px; }
.ag-invf .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; }
.ag-invf .input::placeholder { text-transform: none; letter-spacing: 0; }
.ad-del { display: flex; gap: 8px; align-items: flex-start; margin: 0 22px 12px; padding: 10px 14px; border-radius: 12px; background: var(--err-soft); color: var(--text-2); font-size: 13.5px; } .ad-del svg { width: 16px; height: 16px; color: var(--err); flex: none; margin-top: 2px; }

/* ---------- v21: временный чат — всё темнеет ---------- */
.app { transition: grid-template-columns .24s var(--ease), background-color .6s var(--ease); }
.app.temp-mode { --bg: #070706; --bg-2: #0b0a09; --surface: #121110; --surface-2: #1a1917; --line: #262422; --line-soft: #1a1917; --text-2: #a8a399; }
[data-theme="light"] .app.temp-mode { --bg: #1b1a18; --bg-2: #161513; --surface: #232220; --surface-2: #2b2a27; --surface-3: #33312d; --line: #35332f; --line-soft: #2c2b28; --line-strong: #46433d; --text: #ebe7dd; --text-2: #b4afa3; --muted: #7e7a71; color-scheme: dark; }
.app.temp-mode .main, .app.temp-mode .sidebar { background: var(--bg); transition: background-color .6s var(--ease); }
.app.temp-mode .sidebar { background: var(--bg-2); }
.app.temp-mode .chat::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 40%, rgba(0, 0, 0, .35)); animation: fadeIn .8s both; }
.app.temp-mode .composer { background: #0e0d0c; border-color: #3a3733; border-style: dashed; }
.temp-veil { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: rgba(0, 0, 0, .62); }
.temp-veil.in { animation: veilIn .85s cubic-bezier(.4, 0, .2, 1) forwards; }
.temp-veil.out { background: rgba(255, 255, 255, .05); animation: veilOut .6s ease forwards; }
@keyframes veilIn { 0% { clip-path: circle(0 at var(--x) var(--y)); opacity: 1; } 55% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: 1; } 100% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: 0; } }
@keyframes veilOut { 0% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: 1; } 100% { clip-path: circle(0 at var(--x) var(--y)); opacity: 0; } }
.hero-temp .ht-mark { width: 84px; height: 84px; background: radial-gradient(circle at 50% 40%, #1d1c1a, #0c0b0a); border: 1px solid #2f2c29; box-shadow: 0 0 0 8px rgba(255, 255, 255, .015), 0 20px 60px rgba(0, 0, 0, .6); color: #cfc9bd; animation: htFloat 5s ease-in-out infinite; }
.hero-temp .ht-mark svg { width: 34px; height: 34px; animation: htBlink 4.5s ease-in-out infinite; transform-origin: center; }
.hero-temp .ht-mark::after { inset: -12px; border-color: rgba(255, 255, 255, .12); }
.hero-temp .ht-mark::before { content: ""; position: absolute; inset: -26px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .06); animation: htSpin 30s linear infinite reverse; }
@keyframes htFloat { 50% { transform: translateY(-6px); } }
@keyframes htBlink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
.hero-temp .hero-t { animation: agIn .7s .15s cubic-bezier(.2, .8, .2, 1) both; }
.hero-temp .ht-sub { animation: agIn .7s .25s cubic-bezier(.2, .8, .2, 1) both; }
.hero-temp .ht-off { animation: agIn .7s .35s cubic-bezier(.2, .8, .2, 1) both; border-color: #2f2c29; }
@media (prefers-reduced-motion: reduce) { .temp-veil { display: none; } .hero-temp * { animation: none !important; } }
/* одна кнопка «Новый чат»: если панель слева открыта — справа сверху её нет */
@media (min-width: 861px) { .app:not(.sb-off) .topbar [data-tb-new] { display: none; } }
.pill svg { width: 13px; height: 13px; flex: none; }
.pill { gap: 5px; }
.srow-c .inl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gate-cd { display: inline-flex; align-items: center; gap: 8px; margin: 4px auto 18px; padding: 10px 16px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); font-variant-numeric: tabular-nums; } .gate-cd svg { width: 16px; height: 16px; color: var(--bit); } .gate-cd b { color: var(--text); font-size: 16px; }

/* ---------- v22: чат — расписания, кнопка «вниз», мягкие детали ---------- */
.dock-in { position: relative; }
.jump { position: absolute; left: 50%; top: -52px; z-index: 3; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); box-shadow: 0 6px 22px rgba(0, 0, 0, .18); opacity: 0; transform: translateY(8px) scale(.9); pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease), color .15s; }
.jump svg { width: 18px; height: 18px; }
.jump.on { opacity: 1; transform: none; pointer-events: auto; }
.jump:hover { color: var(--text); }
.composer { transition: border-color .2s, box-shadow .35s var(--ease); }
.composer:focus-within { box-shadow: var(--shadow-cmp), 0 0 0 4px rgba(var(--bit-rgb), .07); }
.msg.user.m-in { animation: msgInU .36s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes msgInU { from { opacity: 0; transform: translate(10px, 6px) scale(.97); } }
.msg.ai.m-in { animation: msgIn .4s var(--ease); }
.msg.sched-tag { display: flex; justify-content: center; margin: 30px 0 10px; }
.msg.sched-tag span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); }
.msg.sched-tag svg { width: 14px; height: 14px; }
.bb-sched .sc-row { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.bb-sched .sc-row + .sc-row { margin-top: 4px; }
.bb-sched .sc-row.muted { color: var(--muted); font-size: 13px; }
.bb-sched .sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.bb-sched.on .sc-dot { background: #7fbf8e; box-shadow: 0 0 0 0 rgba(127, 191, 142, .5); animation: scPulse 2.4s ease-out infinite; }
@keyframes scPulse { 70% { box-shadow: 0 0 0 7px rgba(127, 191, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 191, 142, 0); } }
.bb-sched .sc-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bb-sched.err .sc-row { color: var(--err); }
@media (prefers-reduced-motion: reduce) { .bb-sched.on .sc-dot, .msg.m-in { animation: none !important; } }

/* ---------- v23: уведомления, аватарки, акцент, стекло ---------- */
.announce { margin-top: 8px; position: relative; overflow: hidden; background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); animation: anIn .45s cubic-bezier(.2, .9, .3, 1.05); transition: opacity .2s, transform .22s var(--ease); }
.announce::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bit); }
.announce.good::before { background: #6fbf86; } .announce.good .an-ic svg { color: #6fbf86; }
.announce.warn::before { background: #e3a43f; } .announce.warn .an-ic svg { color: #e3a43f; }
.announce.personal { border-color: rgba(var(--bit-rgb), .35); }
.announce.out { opacity: 0; transform: translateY(-6px); }
.an-who { display: block; font-size: 11.5px; font-weight: 600; color: var(--bit); margin-bottom: 1px; }
.an-more { font-size: 12px; color: var(--muted); white-space: nowrap; }
@keyframes anIn { from { opacity: 0; transform: translateY(-8px); } }
.av { position: relative; overflow: hidden; }
.av > b { font: inherit; }
.av.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.av-dot { z-index: 1; }
.acc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.acc { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 0; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px transparent; transition: transform .15s var(--ease), box-shadow .15s; cursor: pointer; }
.acc:hover { transform: scale(1.08); }
.acc.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
/* стекло: меню, окна, кнопка «вниз», затемнение */
.pop { background: color-mix(in srgb, var(--raised) 86%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); }
.modal-back { background: rgba(10, 9, 8, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
[data-theme="light"] .modal-back { background: rgba(40, 32, 22, .22); }
.jump { background: color-mix(in srgb, var(--surface) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.scrim { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.toast { -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
/* админка: уведомления */
.nt-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.nt-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nt-row > span { width: 52px; font-size: 13px; color: var(--muted); }
.nt-form .textarea { min-height: 84px; }
.nt-list { display: flex; flex-direction: column; gap: 8px; }
.nt-i { position: relative; padding: 12px 14px 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.nt-i::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bit); }
.nt-i.k-good::before { background: #6fbf86; } .nt-i.k-warn::before { background: #e3a43f; }
.nt-i.off { opacity: .55; }
.nt-t { font-size: 14px; white-space: pre-wrap; }
.nt-m { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.nt-kseg { margin: 0 0 12px; }
.modal .textarea { width: 100%; min-height: 96px; box-sizing: border-box; }
.asst-undone { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.asst-undone svg { width: 14px; height: 14px; }
.asst-nu { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .app.in-chat .announce { margin-top: calc(54px + env(safe-area-inset-top)); width: calc(100% - 24px); } }

/* =====================================================================
   v24: агент, палитра, /-команды, закладки, расписания, быстрый старт, полировка
   ===================================================================== */
/* --- кнопка агента в поле ввода --- */
.cmp-agent { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 9px; margin-left: 2px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--text-2); border: 1px solid var(--line); transition: color .15s, background .2s, border-color .2s, box-shadow .3s var(--ease); white-space: nowrap; }
.cmp-agent svg { width: 15px; height: 15px; }
.cmp-agent:hover { color: var(--text); border-color: var(--line-strong); }
.cmp-agent.on { color: var(--bit); background: var(--bit-soft); border-color: rgba(var(--bit-rgb), .4); box-shadow: 0 0 0 3px rgba(var(--bit-rgb), .06); }
.cmp-agent.on svg { animation: agZap 2.6s ease-in-out infinite; }
@keyframes agZap { 0%, 86%, 100% { transform: none; } 90% { transform: scale(1.25) rotate(-8deg); } 95% { transform: scale(.95) rotate(4deg); } }
.composer.agent { border-color: rgba(var(--bit-rgb), .38); }
.composer.agent:focus-within { box-shadow: var(--shadow-cmp), 0 0 0 4px rgba(var(--bit-rgb), .1); }
/* --- сообщение агента --- */
.ag { margin: 2px 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; max-width: 640px; }
.ag.live { border-color: rgba(var(--bit-rgb), .32); box-shadow: 0 0 0 4px rgba(var(--bit-rgb), .05), 0 10px 40px -20px rgba(var(--bit-rgb), .35); }
.ag.err { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.ag-h { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; font-size: 14.5px; list-style: none; cursor: default; }
details.ag > summary.ag-h { cursor: pointer; }
details.ag > summary.ag-h::-webkit-details-marker { display: none; }
details.ag > summary.ag-h > svg { width: 16px; height: 16px; color: var(--muted); transition: transform .2s var(--ease); }
details.ag[open] > summary.ag-h > svg { transform: rotate(180deg); }
.ag-h b { font-weight: 600; }
.ag-n { color: var(--muted); font-size: 13px; }
.ag-mark { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--bit-soft); color: var(--bit); flex: none; position: relative; }
.ag-mark svg { width: 15px; height: 15px; }
.ag-mark.live::after { content: ""; position: absolute; inset: -4px; border-radius: 12px; border: 1.5px solid rgba(var(--bit-rgb), .5); animation: agRing 1.8s ease-out infinite; }
@keyframes agRing { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.ag-plan { list-style: none; margin: 0; padding: 4px 14px 10px; display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.ag-plan li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); transition: color .3s; }
.ag-plan li.done { color: var(--muted); }
.ag-plan li.done > span:last-child { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.ag-plan li.cur { color: var(--text); font-weight: 500; }
.ag-pc { width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; transition: background .3s, border-color .3s; }
.ag-pc svg { width: 11px; height: 11px; color: var(--bg); stroke-width: 3; }
.ag-plan li.done .ag-pc { background: var(--bit); border-color: var(--bit); animation: agPop .4s cubic-bezier(.3, 1.6, .5, 1); }
.ag-plan li.cur .ag-pc { border-color: var(--bit); box-shadow: 0 0 0 3px rgba(var(--bit-rgb), .15); }
@keyframes agPop { from { transform: scale(.4); } }
.ag-steps { list-style: none; margin: 0; padding: 6px 8px 8px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.ag-s { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 10px; font-size: 13.5px; min-width: 0; }
.ag.live .ag-s:last-child { animation: agStep .4s var(--ease) both; }
@keyframes agStep { from { opacity: 0; transform: translateY(6px); } }
.ag-si { width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.ag-si svg { width: 14px; height: 14px; }
.ag-s.run .ag-si { background: var(--bit-soft); color: var(--bit); }
.ag-st { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.ag-st b { font-weight: 500; white-space: nowrap; }
.ag-st i { font-style: normal; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ag-ss { flex: none; display: grid; place-items: center; width: 18px; height: 18px; color: var(--muted); }
.ag-ss svg { width: 14px; height: 14px; }
.ag-s.ok .ag-ss { color: #6fbf86; }
.ag-s.err .ag-ss { color: var(--err); }
.ag-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(var(--bit-rgb), .25); border-top-color: var(--bit); animation: agSpin .7s linear infinite; flex: none; }
@keyframes agSpin { to { transform: rotate(360deg); } }
.ag-job { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--text-2); }
.ag-ask { padding: 14px; border-top: 1px solid var(--line-soft); background: rgba(var(--bit-rgb), .05); animation: agStep .4s var(--ease) both; }
.ag-ask > b { display: block; font-size: 15px; margin-bottom: 4px; }
.ag-ask p { margin: 0 0 4px; font-size: 13.5px; color: var(--text-2); }
.ag-pr { color: var(--muted); }
.ag-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.ag-ask small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ag-media { display: grid; gap: 8px; margin: 0 0 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.ag-media.n1 { grid-template-columns: minmax(0, 440px); }
.ag-media .gen-out { width: 100%; animation: agArt .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes agArt { from { opacity: 0; transform: scale(.96); filter: blur(8px); } }
.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.ag-file { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); text-align: left; transition: border-color .15s, transform .2s var(--ease); max-width: 100%; }
.ag-file:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.ag-file > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.ag-file span { display: flex; flex-direction: column; min-width: 0; }
.ag-file b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-file small { font-size: 12px; color: var(--muted); }
.ag-audio audio { height: 40px; max-width: 100%; }
.ag-react { display: inline-block; margin-top: 4px; font-size: 20px; animation: agPop .5s cubic-bezier(.3, 1.6, .5, 1); }
/* --- палитра команд --- */
.sr-in kbd, .sr-i kbd { font: 500 11px/1 var(--font); padding: 4px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-soft); white-space: nowrap; }
.search-modal .sr-in { padding-right: 56px; }
.search-modal .sr-in kbd { display: none; }
.sr-g { padding: 10px 12px 4px; font-size: 12px; color: var(--muted); }
.sr-i { align-items: center; padding: 9px 12px; }
.sr-i > span { flex: 1; }
.sr-i > svg { margin-top: 0; }
.sr-i.act > svg { color: var(--text-2); }
.sr-i.on { background: var(--surface-2); }
.sr-i:hover { background: transparent; }
.sr-i.on:hover { background: var(--surface-2); }
/* --- команды через «/» --- */
.composer { position: relative; }
.slash { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 6; max-height: 300px; overflow-y: auto; padding: 6px; border-radius: 18px; background: color-mix(in srgb, var(--raised) 90%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: slashIn .18s var(--ease); }
@keyframes slashIn { from { opacity: 0; transform: translateY(6px); } }
.slash button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 14px; }
.slash button svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.slash button b { font-weight: 500; min-width: 108px; }
.slash button span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slash button.on { background: var(--surface-2); }
.slash button.on svg { color: var(--bit); }
.hero-mark { position: relative; }
.hero:not(.hero-temp) .hero-mark::before { content: ""; position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--bit-rgb), .13), transparent 62%); z-index: -1; pointer-events: none; animation: amGlow 5s ease-in-out infinite; }
/* --- закладки --- */
.m-acts .ib.on { color: var(--bit); background: transparent; }
.m-acts .ib.on svg { fill: currentColor; fill-opacity: .25; }
.msg.flash { animation: msgFlash 1.6s ease-out; border-radius: 16px; }
@keyframes msgFlash { 0%, 30% { box-shadow: 0 0 0 10px rgba(var(--bit-rgb), .12); background: rgba(var(--bit-rgb), .06); } 100% { box-shadow: 0 0 0 10px transparent; background: transparent; } }
.sv-list, .sc-list { display: flex; flex-direction: column; gap: 10px; }
.sv { padding: 16px 16px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .2s var(--ease); }
.sv:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.sv-q { font-size: 13px; color: var(--muted); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-a { font: 400 15.5px/1.55 var(--read); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sv-m { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.sv-m > span:not(.sp) { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-m svg { width: 14px; height: 14px; flex: none; }
.sv-m [data-sv-del] { color: var(--bit); }
/* --- расписания --- */
.sc { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.sc-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-h b { font-size: 15.5px; }
.sc .sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.sc.on .sc-dot { background: #7fbf8e; animation: scPulse 2.4s ease-out infinite; }
.sc-rule { font-size: 12.5px; color: var(--text-2); padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.sc-p { margin: 8px 0 12px; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-m { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.sc-m .lnk { display: inline-flex; align-items: center; gap: 6px; }
.sc-m .lnk svg { width: 14px; height: 14px; }
.sched-modal { width: min(520px, 100%); }
.sched-modal .fl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sched-modal .fl > span { font-size: 13px; color: var(--muted); }
.sched-modal .fl.inl { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.sched-modal .textarea { min-height: 92px; }
.sched-modal .seg { flex-wrap: wrap; }
.sf-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sf-row .input { width: auto; min-width: 110px; }
/* --- пустые состояния --- */
.empty-st { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 20px; color: var(--muted); animation: startIn .5s var(--ease) both; }
.es-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); margin-bottom: 16px; }
.es-ic svg { width: 26px; height: 26px; }
.empty-st b { color: var(--text); font: 600 19px/1.3 var(--serif); margin-bottom: 6px; }
.empty-st p { margin: 0; max-width: 380px; font-size: 14.5px; }
.page-load { display: grid; place-items: center; padding: 60px; }
/* --- меню модели: виды --- */
.mp-kinds { display: flex; gap: 4px; padding: 8px 8px 0; }
.mp-kinds button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: 10px; font-size: 13.5px; color: var(--text-2); transition: background .15s, color .15s; }
.mp-kinds button svg { width: 15px; height: 15px; }
.mp-kinds button:hover { color: var(--text); }
.mp-kinds button.on { background: var(--surface-2); color: var(--text); font-weight: 500; }
.mp-kinds button.on svg { color: var(--bit); }
.mp-hint { padding: 2px 16px 8px; font-size: 12.5px; color: var(--muted); }
/* --- ответ: плавнее --- */
.m-acts { transition: opacity .25s var(--ease), transform .3s var(--ease); }
.msg.ai:last-child > .m-acts { animation: actsIn .45s .05s var(--ease) both; }
@keyframes actsIn { from { opacity: 0; transform: translateY(4px); } }
.msg.ai .md > pre, .msg.ai .md > .code, .msg.ai .md > table, .msg.ai .md > blockquote { animation: none; }
.md a { transition: color .15s, text-decoration-color .15s; }
.cmp-send { transition: background .2s, color .2s, transform .18s cubic-bezier(.3, 1.5, .5, 1), opacity .2s; }
.cmp-send.on:hover { transform: scale(1.06); }
.cmp-send.on:active { transform: scale(.94); }
/* --- общая полировка --- */
::selection { background: rgba(var(--bit-rgb), .28); }
.sb-c { transition: background .15s, color .15s; position: relative; }
.sb-c.on::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--bit); animation: sbOn .3s var(--ease); }
@keyframes sbOn { from { transform: scaleY(.2); opacity: 0; } }
.sb-new { transition: background .15s, border-color .15s, transform .2s var(--ease); }
.sb-new:active { transform: scale(.97); }
.btn { transition: background .15s, border-color .15s, color .15s, transform .18s var(--ease), box-shadow .2s; }
.btn:active { transform: scale(.975); }
.btn.primary:hover { box-shadow: 0 6px 20px -8px rgba(var(--bit-rgb), .5); }
.pj, .gal-i { transition: border-color .15s, transform .25s var(--ease), box-shadow .25s; }
.pj:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .5); }
.gal-i:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .6); }
.page-in { animation: pageIn .4s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.pop { animation: popIn .18s var(--ease); transform-origin: var(--po, center bottom); }
@keyframes popIn { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.modal { animation: modalIn .26s cubic-bezier(.2, .9, .3, 1.02); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal-back { animation: backIn .2s ease-out; }
@keyframes backIn { from { opacity: 0; } }
@media (max-width: 860px) {
  .ag-st { flex-direction: column; gap: 0; align-items: flex-start; }
  .ag-st i { max-width: 100%; }
  .cmp-agent span { display: none; }
  .cmp-agent { padding: 0 9px; }
  .cmp-agent.on span { display: inline; }
  .slash button b { min-width: 92px; }
  .sv-m > span:nth-of-type(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ag-mark.live::after, .cmp-agent.on svg, .ag-spin, .page-in, .pop, .modal, .modal-back, .msg.ai:last-child > .m-acts, .hero .hero-mark::before { animation: none !important; } }
.pg-sub { font: 600 20px/1.2 var(--serif); margin: 34px 0 12px; }
.agt-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.agt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.at + .agt { border-top: 1px solid var(--line-soft); }
.agt[data-sc-chat] { cursor: pointer; }
.agt[data-sc-chat]:hover { background: var(--surface-2); }
.agt-ic { width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.agt-ic svg { width: 15px; height: 15px; }
.agt.run .agt-ic { background: var(--bit-soft); color: var(--bit); }
.agt.err .agt-ic { color: var(--err); }
.agt-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.agt-t b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agt-t small { font-size: 12.5px; color: var(--muted); }
.sv-a { color: var(--text); }
.sv-m > span:first-child { max-width: 46%; }

/* =====================================================================
   v24 · НОВЫЙ ОБЛИК. Глубокая тёплая основа, рабочая область — «остров»
   со своим светом; поле ввода парит; акцент — в действиях, а не в декоре.
   ===================================================================== */
html:not([data-theme="light"]):not([data-theme="black"]) {
  --base: #100f0e; --bg: #191816; --bg-2: #100f0e;
  --surface: #211f1d; --surface-2: #2a2826; --surface-3: #34312d; --raised: #232120;
  --line: #322f2b; --line-soft: #292724; --line-strong: #47443d;
  --isl-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 30px 80px -40px rgba(0, 0, 0, .8);
  --hi: rgba(255, 255, 255, .045);
}
[data-theme="light"] { --base: #ece8dd; --bg: #fbfaf6; --bg-2: #ece8dd; --isl-shadow: 0 0 0 1px rgba(60, 45, 25, .05), 0 24px 60px -36px rgba(60, 45, 25, .28); --hi: rgba(255, 255, 255, .7); }
[data-theme="black"] { --base: #000; --bg: #000; --bg-2: #000; --isl-shadow: none; --hi: rgba(255, 255, 255, .03); }
body { background: var(--base); }
/* тонкие полосы прокрутки */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
/* --- острова (только на большом экране) --- */
@media (min-width: 861px) {
  .app { background: var(--base); padding: 8px 8px 8px 0; }
  .app.sb-off { padding-left: 8px; }
  .sidebar { background: transparent; border-right: 0; }
  .main { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 22px; box-shadow: var(--isl-shadow); isolation: isolate; }
  /* свет сверху и едва заметная сетка точек — пиксели логотипа */
  .main::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(1000px 440px at 50% -10%, rgba(var(--bit-rgb), .075), transparent 70%); }
  .main::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(var(--ov), .07) 1px, transparent 1.6px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(760px 400px at 50% 0, #000, transparent 78%); mask-image: radial-gradient(760px 400px at 50% 0, #000, transparent 78%); }
  [data-theme="light"] .main::after { background-image: radial-gradient(rgba(60, 40, 20, .1) 1px, transparent 1.6px); }
  .app.temp-mode .main::before { background: none; }
  .msg.ai:not(.legacy)::before { content: ""; position: absolute; left: -19px; top: 11px; width: 6px; height: 6px; border-radius: 1.5px; background: var(--bit); opacity: .8; }
  .msg.ai.ag-msg::before { top: 21px; }
}
/* --- боковая панель --- */
.sb-top { padding: 14px 10px 12px 16px; }
.sb-new { height: 38px; padding: 0 14px 0 12px; background: var(--surface); border-color: var(--line); box-shadow: inset 0 1px 0 var(--hi); }
.sb-new svg { color: var(--bit); }
.sb-new:hover { background: var(--surface-2); border-color: var(--line-strong); }
.sb-search { height: 40px; border-radius: 12px; background: transparent; border: 1px solid var(--line); margin: 2px 10px 8px; width: calc(var(--sbw) - 20px) !important; transition: border-color .15s, background .15s; }
.sb-search:focus-within { border-color: var(--line-strong); background: var(--surface); }
.sb-search input { font-size: 14.5px; }
.sb-list { padding: 2px 8px 12px; }
.sb-day { padding: 16px 10px 6px; font-size: 12px; letter-spacing: .01em; }
.sb-c { height: 38px; padding: 0 4px 0 10px; font-size: 14.5px; }
.sb-c:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.sb-c.on { background: var(--surface-2); box-shadow: inset 0 1px 0 var(--hi); }
.sb-c.on::before { left: -5px; }
.sb-foot { border-top: 0; padding: 8px 8px 10px; }
.sb-user { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 4px; box-shadow: inset 0 1px 0 var(--hi); }
.sb-me:hover { background: var(--surface-2); }
/* --- поле ввода: парит, на фокусе по краю бежит свет --- */
.composer { border-radius: 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #fff), var(--surface) 46%); border-color: var(--line); box-shadow: inset 0 1px 0 var(--hi), 0 22px 60px -28px rgba(0, 0, 0, .7), 0 3px 12px rgba(0, 0, 0, .16); }
[data-theme="light"] .composer { background: #fff; box-shadow: 0 16px 44px -26px rgba(60, 45, 25, .3), 0 2px 8px rgba(60, 45, 25, .05); }
.composer::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--cmpA, 0deg), transparent 0 58%, rgba(var(--bit-rgb), .95) 76%, rgba(var(--bit-rgb), .2) 86%, transparent 94%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; animation: cmpSpin 6s linear infinite; animation-play-state: paused; }
.composer:focus-within::before { opacity: 1; animation-play-state: running; }
@property --cmpA { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes cmpSpin { to { --cmpA: 360deg; } }
.composer:focus-within { border-color: var(--line-strong); box-shadow: inset 0 1px 0 var(--hi), 0 26px 70px -28px rgba(0, 0, 0, .75), 0 0 0 5px rgba(var(--bit-rgb), .055); }
[data-theme="black"] .composer:focus-within { box-shadow: 0 0 0 5px rgba(var(--bit-rgb), .06); }
.composer textarea::placeholder { color: var(--muted); transition: color .2s; }
.cmp-send { width: 42px; height: 42px; }
.cmp-send.on { background: var(--bit); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px -8px rgba(var(--bit-rgb), .8); }
.cmp-send.on.stop { background: var(--text); color: var(--bg); box-shadow: none; }
/* --- сообщения --- */
.msg.user .bubble { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 20px 20px 6px 20px; padding: 10px 16px 11px; box-shadow: inset 0 1px 0 var(--hi); }
.msg.user { margin: 30px 0 8px; }
/* --- главный экран --- */
.hero-mark { font-size: 62px; margin-bottom: 26px; }
.hero-t { font-size: clamp(32px, 4.8vw, 50px); letter-spacing: -.02em; }
.hero:not(.hero-temp) .hero-mark::before { width: 320px; height: 320px; margin: -160px 0 0 -160px; background: radial-gradient(circle, rgba(var(--bit-rgb), .16), rgba(var(--bit-rgb), .04) 45%, transparent 66%); }
.hero-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 26px 0 0; font-size: 13px; color: var(--muted); animation: actsIn .6s .25s var(--ease) both; }
.hero-keys span { display: inline-flex; align-items: center; gap: 8px; }
.hero-keys kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 8px; font: 500 12px/1 var(--font); color: var(--text-2); background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi), 0 1px 0 rgba(0, 0, 0, .25); }
.hero-keys kbd svg { width: 12px; height: 12px; color: var(--bit); }
/* --- кнопки, поля, карточки --- */
.btn { border-radius: 12px; box-shadow: inset 0 1px 0 var(--hi); }
.btn.ghost { box-shadow: none; }
.btn.primary { background: var(--bit); color: var(--bit-ink, #fff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 22px -12px rgba(var(--bit-rgb), .9); }
.btn.primary:hover { opacity: 1; filter: brightness(1.08); }
.btn.auth-g, .btn.auth-g:hover { box-shadow: 0 10px 30px -14px rgba(var(--bit-rgb), .6); filter: none; }
.input, .textarea { transition: border-color .15s, box-shadow .2s, background .15s; }
.input:focus, .textarea:focus { border-color: rgba(var(--bit-rgb), .55); box-shadow: 0 0 0 4px rgba(var(--bit-rgb), .1); }
.card, .pj, .sv, .sc, .nt-form, .agt-list, .ag { box-shadow: inset 0 1px 0 var(--hi); }
.card { border-radius: 20px; }
.page-h h1 { font-size: 36px; letter-spacing: -.02em; }
.seg button.on { box-shadow: inset 0 1px 0 var(--hi), 0 1px 3px rgba(0, 0, 0, .25); }
.pop { border-radius: 18px; box-shadow: inset 0 1px 0 var(--hi), var(--shadow-pop); }
.modal { border-radius: 24px; box-shadow: inset 0 1px 0 var(--hi), 0 40px 100px -30px rgba(0, 0, 0, .7); }
.toast { box-shadow: inset 0 1px 0 var(--hi), 0 18px 40px -16px rgba(0, 0, 0, .6); }
.gen-out { border-radius: 22px; box-shadow: 0 18px 44px -26px rgba(0, 0, 0, .7); }
.jump { box-shadow: inset 0 1px 0 var(--hi), 0 10px 26px -10px rgba(0, 0, 0, .6); }
@media (max-width: 860px) {
  body { background: var(--bg); }
  .sidebar { background: var(--base); }
  .composer { border-radius: 24px; }
  .hero-mark { font-size: 54px; }
}
@media (prefers-reduced-motion: reduce) { .composer::before { animation: none; } }

/* ---------- v25: капча и проверка «не робот» ---------- */
.ts-slot { display: flex; justify-content: center; min-height: 0; transition: margin .2s; }
.ts-slot.need { margin: 12px 0 4px; }
.ts-slot iframe { max-width: 100%; }
.hc { text-align: center; width: min(400px, 100%); }
.hc-ic { width: 52px; height: 52px; margin: 2px auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--bit-soft); color: var(--bit); }
.hc-ic svg { width: 24px; height: 24px; }
.hc h3 { margin: 0 0 6px; }
.hc p { margin: 0 0 16px; color: var(--text-2); font-size: 14.5px; }
.hc-ts { display: flex; justify-content: center; min-height: 66px; }
.hc-msg { min-height: 20px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.hc .btns { justify-content: center; }

/* =====================================================================
   v26 · вход по почте, 2FA, темы по описанию, каталог моделей, скорость видео
   ===================================================================== */
/* --- поле ввода: кнопка отправки чуть выше, ряд дышит --- */
.composer { padding-bottom: 15px; }
.cmp-row { height: 42px; }
.cmp-send { width: 40px; height: 40px; margin-right: 1px; }
@media (max-width: 860px) { .composer { padding: 12px 9px 11px 14px; } }

/* --- мини-логотипы компаний --- */
.co-logo { --co: #888; position: relative; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; overflow: hidden; background: color-mix(in srgb, var(--co) 20%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--co) 34%, transparent); }
.co-logo b { font: 700 11.5px/1 var(--font); color: color-mix(in srgb, var(--co) 70%, var(--text)); letter-spacing: 0; }
.co-logo.img { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
[data-theme="light"] .co-logo.img { box-shadow: inset 0 0 0 1px var(--line); }
.co-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.co-logo.xs { width: 18px; height: 18px; border-radius: 6px; }
.co-logo.xs b { font-size: 10px; }
.co-logo.lg { width: 34px; height: 34px; border-radius: 10px; }
.co-logo.lg b { font-size: 15px; }
.cmp-model .co-logo { margin-right: 7px; }
/* --- выбор модели: строки с логотипом и подписью --- */
.mp-i { gap: 11px; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
.mp-i .co-logo { width: 26px; height: 26px; border-radius: 8px; }
.mp-tx { display: flex; flex-direction: column; min-width: 0; gap: 1px; text-align: left; }
.mp-tx .mp-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-d { font-size: 12px; line-height: 1.3; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.mp-g { padding-top: 12px; }

/* --- вход: почта первой, Google под ней --- */
.am-step { transition: opacity .22s var(--ease), transform .22s var(--ease); }
.am-step.out { opacity: 0; transform: translateX(-18px); }
.am-step.in { animation: amIn .42s var(--ease) both; }
@keyframes amIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.am-form { position: relative; text-align: left; }
.am-form.shake { animation: shake .35s; }
.am-field { position: relative; display: flex; align-items: center; height: 56px; padding: 0 6px 0 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface-2) 75%, transparent); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi); transition: border-color .18s, box-shadow .25s, background .18s; cursor: text; }
.am-field:focus-within { border-color: rgba(var(--bit-rgb), .6); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 5px rgba(var(--bit-rgb), .1); background: var(--surface-2); }
.am-ic { display: grid; place-items: center; color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.am-ic svg { width: 20px; height: 20px; }
.am-field:focus-within .am-ic { color: var(--bit); transform: rotate(-8deg) scale(1.06); }
.am-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 16.5px/1 var(--font); padding: 0 12px; }
.am-field input::placeholder { color: var(--muted); font-weight: 400; }
.am-go { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); transition: background .2s, color .2s, transform .15s, box-shadow .2s; }
.am-go svg { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.am-go.on { background: var(--bit); color: var(--bit-ink, #fff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -10px rgba(var(--bit-rgb), .9); }
.am-go.on:hover svg { transform: translateX(2px); }
.am-go:active { transform: scale(.94); }
.am-go.load { pointer-events: none; }
.am-go.load svg { opacity: 0; }
.am-go.load::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.am-go { position: relative; }
@keyframes spin { to { transform: rotate(360deg); } }
.am-inv { margin-top: 8px; }
.am-inv .input { width: 100%; text-transform: uppercase; letter-spacing: .08em; height: 46px; border-radius: 13px; }
.am-ts.need { margin-top: 12px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; color: var(--muted); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card > .am-step > .btn.auth-g { margin-top: 0; }
/* шаг с кодом */
.am-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: -10px 0 6px -6px; padding: 6px 10px 6px 6px; border-radius: 10px; color: var(--muted); font-size: 13.5px; }
.am-back:hover { color: var(--text); background: var(--surface-2); }
.am-back svg { width: 16px; height: 16px; }
.am-step[data-step="code"] { display: flex; flex-direction: column; }
.am-step[data-step="code"][hidden] { display: none; }
.am-env { position: relative; width: 64px; height: 64px; margin: 4px auto 16px; }
.am-env-b { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 20px; background: rgba(var(--bit-rgb), .14); color: var(--bit); box-shadow: inset 0 0 0 1px rgba(var(--bit-rgb), .28); animation: envPop .6s var(--ease) both; }
.am-env-b svg { width: 28px; height: 28px; }
.am-env i { position: absolute; width: 6px; height: 6px; border-radius: 2px; background: var(--bit); opacity: 0; animation: envFly 2.4s var(--ease) infinite; }
.am-env i:nth-of-type(1) { left: 70px; top: 12px; animation-delay: .3s; }
.am-env i:nth-of-type(2) { left: 76px; top: 30px; animation-delay: .9s; }
.am-env i:nth-of-type(3) { left: 68px; top: 48px; animation-delay: 1.5s; }
@keyframes envPop { from { transform: scale(.6) rotate(-10deg); opacity: 0; } 60% { transform: scale(1.06) rotate(3deg); opacity: 1; } to { transform: none; } }
@keyframes envFly { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translateX(46px); } }
.am-env.shield i { background: var(--ok); }
.am-name { margin: 0 0 14px; text-align: center; }
.am-code { gap: 8px; margin: 2px 0 6px; }
.am-code input { width: 48px; height: 60px; border-radius: 14px; font: 600 25px/1 var(--mono); text-align: center; padding: 0; caret-color: var(--bit); background: color-mix(in srgb, var(--surface-2) 75%, transparent); animation: cellIn .45s var(--ease) both; animation-delay: calc(var(--i) * 45ms); transition: border-color .15s, transform .15s, background .15s, box-shadow .2s; }
.am-code input:nth-child(3) { margin-right: 10px; }
.am-code input.on { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.am-code input:focus { border-color: rgba(var(--bit-rgb), .7); box-shadow: 0 0 0 4px rgba(var(--bit-rgb), .12); }
.am-code.bad { animation: shake .35s; }
.am-code.bad input { border-color: var(--err); }
.am-code.good input { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface-2)); transform: translateY(-3px); transition-delay: calc(var(--i) * 40ms); }
@keyframes cellIn { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
.am-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.am-row .btn:disabled { opacity: .55; }
.am-trust { display: inline-flex; align-items: center; gap: 9px; align-self: center; margin: 8px 0 2px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.am-trust input { position: absolute; opacity: 0; pointer-events: none; }
.am-trust i { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.am-trust input:checked + i { background: var(--bit); border-color: var(--bit); }
.am-trust input:checked + i::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
@media (max-width: 400px) { .am-code { gap: 6px; } .am-code input { width: 42px; height: 54px; font-size: 22px; } .am-code input:nth-child(3) { margin-right: 6px; } }
@media (prefers-reduced-motion: reduce) { .am-step, .am-step.in, .am-code input, .am-env-b, .am-env i { animation: none !important; transition: none !important; } }

/* --- агент из чата и тема из чата --- */
.bb-agent, .bb-theme { display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); box-shadow: inset 0 1px 0 var(--hi); }
.bb-agent > svg, .bb-theme > svg { width: 18px; height: 18px; color: var(--bit); flex: none; }
.bb-agent > span, .bt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bb-agent b, .bt-t b { font-size: 14px; }
.bb-agent small, .bt-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bb-agent > svg:last-child { color: var(--muted); width: 16px; height: 16px; }
.bb-agent.err > svg:first-child { color: var(--err); }
.bt-sw { display: inline-flex; gap: 3px; margin-right: 7px; vertical-align: -2px; }
.bt-sw i { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(var(--ov), .15); }
.bb-theme .th-thumb { width: 64px; height: 44px; }

/* --- превью темы --- */
.th-thumb { --tb: #100f0e; --tg: #191816; --ts: #211f1d; --tl: #322f2b; --tt: #ebe7dd; --tm: #7e7a71; --ta: #d97757; --tr: 12px; position: relative; flex: none; display: block; width: 92px; height: 62px; border-radius: 12px; background: var(--tb); box-shadow: inset 0 0 0 1px rgba(var(--ov), .1); overflow: hidden; }
.th-thumb.lg { width: 132px; height: 88px; border-radius: 16px; }
.th-thumb i { position: absolute; display: block; }
.th-isl { left: 18%; top: 9%; right: 6%; bottom: 9%; background: var(--tg); border-radius: calc(var(--tr) * .5); box-shadow: inset 0 0 0 1px var(--tl); }
.th-l1 { left: 22%; right: 22%; top: 20%; height: 7%; border-radius: 9px; background: var(--tt); opacity: .85; }
.th-l2 { left: 30%; right: 30%; top: 34%; height: 5%; border-radius: 9px; background: var(--tm); opacity: .8; }
.th-cmp { left: 10%; right: 10%; bottom: 10%; height: 26%; border-radius: var(--tr); background: var(--ts); box-shadow: inset 0 0 0 1px var(--tl); }
.th-btn { right: 5%; top: 50%; width: 18%; aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%; background: var(--ta); }
/* --- настройки: тема по описанию --- */
.th-card { display: flex; flex-direction: column; gap: 14px; }
.th-now { display: flex; align-items: center; gap: 16px; }
.th-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.th-meta small { color: var(--muted); font-size: 12px; }
.th-meta b { font-size: 17px; }
.th-meta span { color: var(--text-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.th-ask { display: flex; gap: 10px; align-items: flex-end; }
.th-ask textarea { flex: 1; min-height: 52px; resize: vertical; }
.th-ask .btn { height: 52px; padding: 0 18px; white-space: nowrap; }
.th-ask.busy textarea { opacity: .6; }
.th-ask.busy .btn svg { animation: spin 1.1s linear infinite; }
.th-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.th-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--muted); font-size: 13px; }
.th-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--bit); }
.th-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.th-h { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer; transition: border-color .15s, transform .15s; }
.th-h:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.th-h.on { border-color: rgba(var(--bit-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--bit-rgb), .12); }
.th-h .th-thumb { width: 100%; height: 74px; }
.th-h b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-h small { color: var(--muted); font-size: 12px; margin-top: -4px; }
.th-h .ib { position: absolute; top: 6px; right: 6px; opacity: 0; background: var(--surface-2); }
.th-h:hover .ib { opacity: 1; }
@media (max-width: 600px) { .th-ask { flex-direction: column; align-items: stretch; } .th-ask .btn { height: 46px; } .th-now { flex-wrap: wrap; } .th-thumb.lg { width: 104px; height: 70px; } .th-acts { width: 100%; justify-content: flex-start; } .th-h .ib { opacity: 1; } }
.om-code { margin-top: 6px; }
.om-code .code-in { justify-content: flex-start; }

/* --- скорость видео --- */
.vspd { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(12, 11, 10, .62); color: #f2efe8; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.vspd .vs-ic svg { width: 15px; height: 15px; display: block; opacity: .85; }
.vspd input { -webkit-appearance: none; appearance: none; width: 86px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #f2efe8 var(--p, 43%), rgba(255, 255, 255, .25) var(--p, 43%)); outline: 0; cursor: pointer; }
.vspd input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.vspd input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.vspd b { min-width: 34px; text-align: right; font-weight: 600; }
.go-spd { position: absolute; left: 10px; top: 10px; z-index: 2; opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; }
.gen-out:hover .go-spd, .go-spd:focus-within { opacity: 1; transform: none; }
@media (hover: none) { .go-spd { opacity: 1; transform: none; } }
.lb-vid { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lb-vid video { max-width: 100%; max-height: calc(100vh - 220px); }
.lb-spd { position: static; }

/* --- админка: модели --- */
.co-list { padding: 4px 0; }
.co-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.co-row + .co-row { border-top: 1px solid var(--line-soft); }
.co-row .input { width: 220px; max-width: 46vw; }
.co-n { color: var(--muted); font-size: 12px; min-width: 18px; }
.co-up { position: relative; border-radius: 10px; }
.co-cam { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity .15s; }
.co-cam svg { width: 15px; height: 15px; }
.co-up:hover .co-cam { opacity: 1; }
.co-add { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.co-add .input { flex: 1; }
.cm-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.cm-g { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.cm-gh { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.cm-gh b { font-size: 14px; }
.cm-gh small { color: var(--muted); }
.cm-row { display: grid; grid-template-columns: auto minmax(130px, 1fr) minmax(120px, .9fr) 130px minmax(160px, 1.6fr); gap: 8px; align-items: center; padding: 8px 14px; }
.cm-row + .cm-row { border-top: 1px solid var(--line-soft); }
.cm-row.off .cm-id, .cm-row.off .input, .cm-row.off .select { opacity: .45; }
.cm-id { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.cm-id code { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cm-row .input, .cm-row .select { width: 100%; min-width: 0; }
@media (max-width: 900px) { .cm-row { grid-template-columns: auto 1fr 1fr; } .cm-row .cm-co { grid-column: 2; } .cm-row .cm-desc { grid-column: 2 / -1; } .cm-row .cm-name { grid-column: 3; grid-row: 1; } .cm-id { grid-column: 2; grid-row: 1; } }
@media (max-width: 560px) { .cm-row { grid-template-columns: auto 1fr; } .cm-row > * { grid-column: 2 !important; grid-row: auto !important; } .cm-row > .tgl { grid-column: 1 !important; grid-row: 1 / span 4 !important; align-self: start; } }
.pv-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.pv { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 12px 14px; }
.pv.off { opacity: .6; }
.pv-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bit-soft); color: var(--bit); }
.pv-ic svg { width: 17px; height: 17px; }
.pv-t { display: flex; flex-direction: column; min-width: 0; }
.pv-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pv-test { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pv-test > svg { width: 16px; height: 16px; flex: none; }
.pv-test.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pv-test.bad { background: var(--err-soft); color: var(--err); }
.pv-ids { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; width: 100%; }
.pv-ids .chip.on { background: var(--bit-soft); border-color: rgba(var(--bit-rgb), .5); }
/* --- админка: защита --- */
.gd-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi); margin-bottom: 6px; transition: border-color .2s, background .2s; }
.gd-hero.on { border-color: rgba(var(--bit-rgb), .45); background: linear-gradient(135deg, rgba(var(--bit-rgb), .1), var(--surface) 60%); }
.gd-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.gd-hero.on .gd-ic { background: rgba(var(--bit-rgb), .16); color: var(--bit); }
.gd-ic svg { width: 22px; height: 22px; }
.gd-t { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.gd-t b { font-size: 16px; }
.gd-t small { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.tgl.big { transform: scale(1.25); transform-origin: right center; margin-right: 4px; }
.srow-link { width: 100%; text-align: left; cursor: pointer; }
.srow-link:hover { background: rgba(var(--ov), .03); }
.srow-link .srow-c svg { width: 16px; height: 16px; color: var(--muted); }
/* --- список людей: быстрые доступы --- */
.urow { cursor: pointer; }
.ur-use i.q { cursor: pointer; padding: 4px 6px; margin: -4px -2px; border-radius: 8px; transition: background .12s, opacity .12s; }
.ur-use i.q:hover { background: var(--surface-2); opacity: 1; }
.ur-use i.q.off:hover { opacity: .8; }
.ur-use i.busy { opacity: .5; pointer-events: none; }
@media (max-width: 860px) { .urow { grid-template-columns: 30px minmax(0, 1fr) auto; } .urow .ur-use { display: flex; grid-column: 2 / -1; gap: 6px; } }
.bt-t small { display: block; -webkit-line-clamp: unset; white-space: normal; }
.cm-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) 150px; row-gap: 6px; }
.cm-row .cm-desc { grid-column: 2 / -1; }
@media (max-width: 900px) { .cm-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); } .cm-row .cm-co { grid-column: 2 / -1; grid-row: auto; } .cm-row .cm-desc { grid-column: 2 / -1; } }
.ts-fail { display: block; font-size: 13px; color: var(--err); text-align: center; padding: 4px 8px; }
