/* ЦУБ — «новое время»: тёмное пространство, сияние, стекло, неон. Один образ везде — и отдельно, и во вкладке «Чаты» доски. */
:root {
  color-scheme: dark;
  --bg: #05060f; --bg-2: #0b0f24;
  --glass: rgba(255, 255, 255, .045); --glass-2: rgba(255, 255, 255, .075); --glass-3: rgba(255, 255, 255, .11);
  --panel: rgba(9, 12, 30, .62); --panel-solid: #0b0e22;
  --line: rgba(255, 255, 255, .085); --line-2: rgba(255, 255, 255, .15);
  --text: #eef1ff; --muted: #959ec8; --dim: #626b96;
  --violet: #7c5cff; --blue: #3a8bff; --cyan: #2ee6d6; --pink: #ff4fd8; --mint: #2ee6a0;
  --grad: linear-gradient(135deg, #7c5cff 0%, #3a8bff 52%, #2ee6d6 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, .24), rgba(46, 230, 214, .10));
  --grad-border: linear-gradient(135deg, rgba(124, 92, 255, .75), rgba(58, 139, 255, .35) 45%, rgba(46, 230, 214, .7));
  --glow: 0 0 28px rgba(124, 92, 255, .32), 0 0 60px rgba(46, 230, 214, .10);
  --warn: #ffbe5c; --err: #ff6b88;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
::selection { background: rgba(124, 92, 255, .4); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 8px; }

/* ---------- пространство: сияние + нейросетка ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(1100px 700px at 85% -10%, #151b44 0%, transparent 60%), radial-gradient(900px 600px at -10% 110%, #0f1838 0%, transparent 60%), var(--bg); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; will-change: transform; }
.aurora i:nth-child(1) { width: 62vmax; height: 62vmax; background: #5a3cff; opacity: .42; top: -28vmax; left: -18vmax; animation: drift1 38s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 58vmax; height: 58vmax; background: #00b4ff; opacity: .28; bottom: -32vmax; right: -22vmax; animation: drift2 46s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 34vmax; height: 34vmax; background: #19f5c1; opacity: .13; top: 32%; left: 42%; animation: drift3 54s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -10vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-22vmax, 14vmax) scale(.85); } }
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 55% 30%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 55% 30%, #000 0%, transparent 75%); }

/* ---------- сфера-ядро ЦУБ ---------- */
.orb { position: relative; display: inline-block; width: 120px; height: 120px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #d8ccff 7%, #8a6bff 26%, #3a6bff 50%, #0d2a6b 70%, #070a1c 82%);
  box-shadow: 0 0 50px rgba(124, 92, 255, .55), 0 0 110px rgba(46, 230, 214, .22), inset -10px -14px 30px rgba(0, 0, 0, .45);
  animation: breathe 6s ease-in-out infinite; }
.orb::before { content: ""; position: absolute; inset: -9%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(46, 230, 214, .95) 20%, transparent 32% 52%, rgba(124, 92, 255, .95) 62%, transparent 74% 100%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%, #000 68%, transparent 70%); mask: radial-gradient(circle, transparent 60%, #000 62%, #000 68%, transparent 70%);
  filter: blur(1.5px); animation: spin 9s linear infinite; }
.orb::after { content: ""; position: absolute; inset: 18%; border-radius: 50%;
  background: radial-gradient(circle at 60% 65%, rgba(46, 230, 214, .55), transparent 55%); mix-blend-mode: screen; animation: swirl 7s ease-in-out infinite; }
.orb.sm { width: 30px; height: 30px; box-shadow: 0 0 14px rgba(124, 92, 255, .55), 0 0 26px rgba(46, 230, 214, .2); }
.orb.xs { width: 22px; height: 22px; box-shadow: 0 0 10px rgba(124, 92, 255, .6); }
.orb.think { animation: breathe 1.6s ease-in-out infinite; }
.orb.think::before { animation-duration: 1.4s; }
@keyframes breathe { 50% { transform: scale(1.045); filter: brightness(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes swirl { 50% { transform: translate(-12%, -10%) scale(1.15); opacity: .7; } }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--glass);
  color: var(--text); border-radius: 12px; padding: 9px 15px; text-decoration: none; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.btn:hover { background: var(--glass-2); border-color: rgba(255, 255, 255, .24); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 24px rgba(91, 70, 255, .35); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(91, 70, 255, .5), 0 0 24px rgba(46, 230, 214, .25); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border: none; border-radius: 12px; background: transparent; color: var(--text); }
.icon:hover { background: var(--glass-2); }
.link { border: none; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }

/* ---------- вход ---------- */
.login { position: relative; z-index: 1; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 440px; text-align: center; padding: 40px 30px 32px; border-radius: 28px; background: rgba(10, 13, 34, .55);
  border: 1px solid var(--line); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.login-card .orb { width: 112px; height: 112px; margin-bottom: 26px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 46px; letter-spacing: .02em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin: 12px 0 26px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: 11.5px; font-weight: 600; }
.dev-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px; }
.dev-users button { border: 1px solid var(--line-2); background: var(--glass); border-radius: 12px; padding: 11px; }
.dev-users button:hover { border-color: rgba(46, 230, 214, .6); }
.login-msg { min-height: 1em; margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- раскладка ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100%; height: 100dvh; }
.side { display: flex; flex-direction: column; min-height: 0; background: rgba(7, 9, 24, .58); border-right: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(130%); -webkit-backdrop-filter: blur(20px) saturate(130%); }
.side-head { padding: 18px 18px 14px; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.brand-sub { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 700; margin-top: 5px; }
.net { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 4px 9px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); white-space: nowrap; }
.net::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.net.on { color: #bff7ec; } .net.on::before { background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: pulse 2s infinite; }
.net.off { color: #ffc2cf; } .net.off::before { background: var(--err); box-shadow: 0 0 10px var(--err); }
@keyframes pulse { 50% { opacity: .35; } }
.me-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 12.5px; }
.me { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-topic { margin: 2px 14px 12px; position: relative; border-radius: 14px; padding: 11px 14px; font-weight: 700; color: #fff;
  background: linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box, var(--grad) border-box; border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: box-shadow .2s, transform .15s; }
.new-topic:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.new-topic svg { color: var(--cyan); }
.topics { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding: 0 10px; }
.side > .topics { flex: 1; min-height: 0; }
.list-label { padding: 8px 14px 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.topic { position: relative; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 13px; padding: 10px 12px 10px 14px;
  display: flex; flex-direction: column; gap: 3px; transition: background .15s, border-color .15s; }
.topic:hover { background: var(--glass); }
.topic.active { background: var(--grad-soft); border-color: rgba(124, 92, 255, .38); box-shadow: 0 0 22px rgba(124, 92, 255, .12); }
.topic.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 10px var(--cyan); }
.topic .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.topic .s { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.topic.running .t { background: linear-gradient(90deg, var(--text) 0%, var(--cyan) 45%, #b9a8ff 55%, var(--text) 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.6s linear infinite; }
.topic.unread .t::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); margin-right: 7px; vertical-align: 2px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); display: inline-block; animation: pulse 1.1s infinite; }
.empty-list { padding: 8px 14px; color: var(--dim); font-size: 13px; }
.closed-box { padding: 4px 10px 14px; border-top: 1px solid var(--line); max-height: 40%; overflow-y: auto; }
.closed-box summary { padding: 10px 4px 6px; color: var(--dim); cursor: pointer; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; list-style: none; }
.closed-box summary::-webkit-details-marker { display: none; }
.closed-box summary::before { content: "▸ "; } .closed-box[open] summary::before { content: "▾ "; }
.closed-box .topic { opacity: .7; } .closed-box .topic:hover { opacity: 1; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 24, .42); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.title-wrap { flex: 1; min-width: 0; }
.topic-title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.005em; }
.topic-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.back { display: none; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px auto 0; width: min(860px, calc(100% - 32px)); padding: 10px 14px;
  border-radius: 14px; font-size: 14px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.banner.warn { border-color: rgba(255, 190, 92, .35); color: #ffe2b0; }
.banner.ok { border-color: rgba(46, 230, 214, .35); box-shadow: 0 0 24px rgba(46, 230, 214, .12); }
.banner span { flex: 1; font-weight: 600; }

/* ---------- лента ---------- */
.feed { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 26px max(18px, calc((100% - 860px) / 2)) 22px; }
.msg { display: flex; min-width: 0; }
.msg .bubble { min-width: 0; overflow-wrap: anywhere; }
.msg .time { font-size: 11px; color: var(--dim); margin-top: 6px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { max-width: min(640px, 82%); padding: 11px 16px; border-radius: 20px 20px 6px 20px; white-space: pre-wrap;
  background: linear-gradient(135deg, rgba(124, 92, 255, .92), rgba(58, 139, 255, .88)); color: #fff; box-shadow: 0 8px 28px rgba(80, 70, 255, .3); }
.msg.user .time { color: rgba(255, 255, 255, .7); text-align: right; }
.msg.user.pending .time::after { content: " · ждёт отправки"; }
.msg.assistant { gap: 12px; align-items: flex-start; }
.msg .av { flex: none; padding-top: 3px; }
.msg.assistant .bubble { flex: 1; max-width: 760px; padding: 14px 18px 12px; border-radius: 6px 20px 20px 20px;
  background: linear-gradient(rgba(12, 15, 38, .8), rgba(12, 15, 38, .8)) padding-box, var(--grad-border) border-box; border: 1px solid transparent;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.who { font-size: 10.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.msg.system { justify-content: center; }
.msg.system .bubble { max-width: 640px; padding: 10px 14px; border-radius: 14px; border: 1px dashed rgba(255, 107, 136, .45); background: rgba(255, 107, 136, .07); color: #ffd0da; font-size: 14px; }
.msg.system .bubble .time { color: rgba(255, 208, 218, .6); }
.msg .files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg .files .btn { border-color: rgba(46, 230, 214, .35); }
.msg details.steps { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.msg details.steps summary { cursor: pointer; width: fit-content; }
.msg details.steps summary:hover { color: var(--text); }
.msg details.steps ol { margin: 6px 0 0; padding-left: 20px; }
.msg details.steps li { margin: 2px 0; }
.appear { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }

.md p { margin: 0 0 9px; } .md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { font-size: 15.5px; margin: 12px 0 6px; font-weight: 800; }
.md b { color: #fff; }
.md ul, .md ol { margin: 4px 0 10px; padding-left: 22px; } .md li { margin: 3px 0; }
.md li::marker { color: var(--cyan); }
.md code { background: rgba(124, 92, 255, .16); color: #ddd5ff; padding: 1px 6px; border-radius: 6px; font-size: 13px; overflow-wrap: anywhere; }
.md pre { background: rgba(0, 0, 0, .38); border: 1px solid var(--line); padding: 12px; border-radius: 12px; overflow-x: auto; }
.md pre code { padding: 0; background: none; color: #d6dcff; }
.md .tbl { max-width: 100%; overflow-x: auto; margin: 8px 0 10px; border-radius: 12px; border: 1px solid var(--line); }
.md table { border-collapse: collapse; font-size: 14px; width: 100%; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 7px 11px; text-align: left; vertical-align: top; }
.md th { background: rgba(124, 92, 255, .13); font-weight: 700; color: #e4e0ff; white-space: nowrap; }
.md tr:last-child td { border-bottom: 0; }
.md tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.md a { color: var(--cyan); text-decoration-color: rgba(46, 230, 214, .4); text-underline-offset: 3px; }
.md a.task { font-weight: 700; text-decoration: none; border-bottom: 1px dashed currentColor; padding: 0 1px; white-space: nowrap; }
.md a.task:hover { text-shadow: 0 0 12px rgba(46, 230, 214, .7); }

/* ход работы: ЦУБ думает */
.live .bubble { position: relative; overflow: hidden; }
.live .bubble::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(124, 92, 255, .10) 45%, rgba(46, 230, 214, .10) 55%, transparent 70%); background-size: 250% 100%; animation: shimmer 2.8s linear infinite; }
.live-head { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.live-head .now { flex: 1; min-width: 0; font-weight: 700; background: linear-gradient(90deg, #c9c0ff 0%, var(--cyan) 40%, #fff 50%, #c9c0ff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }
.live-head .sec { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.steps-live { list-style: none; margin: 10px 0 0; padding: 0 0 0 4px; font-size: 13px; color: var(--muted); position: relative; z-index: 1; }
.steps-live li { position: relative; padding: 3px 0 3px 18px; }
.steps-live li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: rgba(124, 92, 255, .55); }
.steps-live li:not(:last-child)::after { content: ""; position: absolute; left: 3px; top: 18px; bottom: -8px; width: 1px; background: rgba(124, 92, 255, .25); }
.steps-live li.last { color: var(--text); }
.steps-live li.last::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1s infinite; }
.steps-live .d { display: block; font-size: 11.5px; color: var(--dim); overflow-wrap: anywhere; }
.live .draft { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); position: relative; z-index: 1; }
.live .draft > :last-child::after { content: ""; display: inline-block; width: 8px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: pulse .9s steps(1) infinite; }

/* пустой экран: «новое время» */
.hero { margin: auto; text-align: center; max-width: 640px; padding: 24px 8px; }
.hero .orb { width: 138px; height: 138px; margin-bottom: 30px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3.3vw, 36px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.005em;
  background: linear-gradient(135deg, #fff 0%, #cfc4ff 35%, var(--cyan) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 520px; }
.hero .code { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; font-weight: 800; letter-spacing: .06em; font-size: 13px;
  color: #bff7ec; border: 1px solid rgba(46, 230, 214, .45); background: rgba(46, 230, 214, .08); box-shadow: 0 0 20px rgba(46, 230, 214, .18); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 26px; }
.chip { border: 1px solid var(--line-2); background: var(--glass); color: var(--text); padding: 9px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .15s, border-color .2s, box-shadow .2s; }
.chip:hover { transform: translateY(-2px); border-color: rgba(46, 230, 214, .65); box-shadow: 0 0 22px rgba(46, 230, 214, .22); }
.chip .k { color: var(--cyan); margin-right: 6px; }

/* ---------- ввод ---------- */
.composer { position: relative; display: flex; align-items: flex-end; gap: 6px; width: min(860px, calc(100% - 32px)); margin: 6px auto 18px; padding: 7px;
  border-radius: 24px; background: rgba(12, 15, 38, .74); border: 1px solid var(--line-2); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .5); transition: border-color .2s, box-shadow .25s; }
.composer:focus-within { border-color: rgba(124, 92, 255, .65); box-shadow: 0 0 0 4px rgba(124, 92, 255, .14), 0 14px 44px rgba(0, 0, 0, .5), var(--glow); }
.composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 10px 10px 10px 14px; max-height: 40vh; line-height: 1.45; overflow-y: hidden; }
.composer textarea::placeholder { color: var(--dim); }
.round { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, box-shadow .2s, background .2s; }
.round:hover { background: var(--glass-3); }
.send { border: 0; background: var(--grad); color: #fff; box-shadow: 0 6px 22px rgba(91, 70, 255, .45); }
.send:hover { transform: scale(1.06); box-shadow: 0 8px 28px rgba(91, 70, 255, .6), 0 0 22px rgba(46, 230, 214, .35); }
#mic.rec { width: auto; padding: 0 16px 0 14px; border-radius: 22px; border-color: rgba(255, 79, 216, .6); background: rgba(255, 79, 216, .14); color: #ffd6f6;
  font-weight: 700; font-variant-numeric: tabular-nums; animation: recring 1.5s ease-out infinite; }
#mic.busy { cursor: progress; }
#mic.busy svg { animation: spin 1s linear infinite; }
@keyframes recring { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 216, .55); } 100% { box-shadow: 0 0 0 14px rgba(255, 79, 216, 0); } }
.bars { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.bars i { width: 3px; height: 100%; border-radius: 3px; background: var(--pink); transform-origin: center; animation: bar 1s ease-in-out infinite; }
.bars i:nth-child(1) { animation-delay: -.2s; } .bars i:nth-child(2) { animation-delay: -.5s; }
.bars i:nth-child(3) { animation-delay: -.1s; } .bars i:nth-child(4) { animation-delay: -.7s; } .bars i:nth-child(5) { animation-delay: -.35s; }
@keyframes bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9; max-width: min(90vw, 520px); padding: 10px 16px; border-radius: 14px;
  background: rgba(14, 18, 44, .92); color: var(--text); border: 1px solid rgba(124, 92, 255, .45); box-shadow: var(--glow), 0 12px 40px rgba(0, 0, 0, .5);
  font-size: 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* ---------- телефон ---------- */
@media (max-width: 800px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app .main { display: none; }
  .app.in-topic .side { display: none; }
  .app.in-topic .main { display: flex; }
  .back { display: inline-grid; }
  .main-head { padding: 10px 12px; gap: 6px; }
  .feed { padding: 18px 12px 14px; gap: 14px; }
  .msg.user .bubble { max-width: 88%; }
  .msg.assistant { gap: 8px; }
  .msg.assistant .bubble { padding: 12px 14px 10px; }
  .composer { width: calc(100% - 16px); margin: 4px auto max(8px, env(safe-area-inset-bottom)); border-radius: 22px; }
  .composer textarea { font-size: 16px; }   /* iOS не увеличивает страницу при вводе */
  .round { width: 42px; height: 42px; }
  .aurora i { filter: blur(60px); }
  .hero .orb { width: 112px; height: 112px; margin-bottom: 22px; }
  .chips { margin-top: 20px; }
  .banner { width: calc(100% - 16px); }
  #close-topic { padding: 6px 10px; font-size: 12.5px; }
}
/* ================= движение (05.10.2026, Сергей: «хоть какую-то анимацию — в современном мире хочется увидеть») ================= */
#neural { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.aurora i:nth-child(1) { animation-duration: 20s; } .aurora i:nth-child(2) { animation-duration: 26s; } .aurora i:nth-child(3) { animation-duration: 31s; }
@keyframes drift1 { to { transform: translate(26vmax, 16vmax) scale(1.25); } }
@keyframes drift2 { to { transform: translate(-24vmax, -14vmax) scale(1.2); } }
@keyframes drift3 { to { transform: translate(-30vmax, 18vmax) scale(.75); } }

/* сфера живая: блик ходит по поверхности, цвет переливается, кольцо быстрее */
@property --hx { syntax: "<percentage>"; inherits: false; initial-value: 32%; }
@property --hy { syntax: "<percentage>"; inherits: false; initial-value: 28%; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.orb { background: radial-gradient(circle at var(--hx) var(--hy), #ffffff 0%, #d8ccff 7%, #8a6bff 26%, #3a6bff 50%, #0d2a6b 70%, #070a1c 82%);
  animation: breathe 4.2s ease-in-out infinite, glare 9s ease-in-out infinite, hue 12s ease-in-out infinite; }
.orb::before { animation-duration: 4.5s; }
@keyframes glare { 0%, 100% { --hx: 32%; --hy: 28%; } 33% { --hx: 64%; --hy: 32%; } 66% { --hx: 40%; --hy: 60%; } }
@keyframes hue { 50% { filter: hue-rotate(-28deg) brightness(1.1); } }
.orb.think { animation: breathe 1.3s ease-in-out infinite, glare 3s ease-in-out infinite, hue 3s ease-in-out infinite; }
.orb.think::before { animation-duration: 1.1s; }

/* волны и искры вокруг большой сферы */
.orb-wrap { position: relative; display: inline-grid; place-items: center; width: 138px; height: 138px; margin-bottom: 30px; }
.orb-wrap .orb { width: 100%; height: 100%; margin: 0; }
.orb-wrap .ripple { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(46, 230, 214, .55); animation: ripple 3.6s cubic-bezier(.2, .6, .3, 1) infinite; }
.orb-wrap .ripple.d2 { animation-delay: 1.2s; border-color: rgba(124, 92, 255, .6); }
.orb-wrap .ripple.d3 { animation-delay: 2.4s; }
@keyframes ripple { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
.orb-wrap .orbit { position: absolute; inset: -16%; border-radius: 50%; animation: spin 6s linear infinite; }
.orb-wrap .orbit.o2 { inset: -30%; animation-duration: 10s; animation-direction: reverse; }
.orb-wrap .orbit i { position: absolute; top: 0; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #2ee6d6, 0 0 22px #2ee6d6; }
.orb-wrap .orbit.o2 i { width: 4px; height: 4px; margin-left: -2px; background: #e0d8ff; box-shadow: 0 0 10px #7c5cff, 0 0 22px #7c5cff; }
.login-card .orb-wrap { width: 112px; height: 112px; margin-bottom: 26px; }

/* стартовый экран появляется по очереди; заголовок переливается */
.hero > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.hero > :nth-child(2) { animation-delay: .12s; } .hero > :nth-child(3) { animation-delay: .24s; }
.hero > :nth-child(4) { animation-delay: .36s; } .hero > :nth-child(5) { animation-delay: .48s; }
.hero .chips { animation: none; }
.hero .chip { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.55s + var(--i, 0) * .08s); }
.hero .greet { margin: 0 0 10px; }
.hero h1 { background: linear-gradient(90deg, #ffffff 0%, #cfc4ff 25%, #2ee6d6 50%, #cfc4ff 75%, #ffffff 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both .24s, sheen 7s linear infinite 1s; }
@keyframes sheen { to { background-position: -200% 0; } }
.hero .orb-wrap { animation: pop 1s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6); filter: blur(8px); } }

/* новый ответ: по рамке пробегает свет */
.msg.assistant.appear .bubble { position: relative; overflow: hidden; }
.msg.assistant.appear .bubble::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(-120%); animation: sweep 1.4s .2s ease-out forwards; }
@keyframes sweep { to { transform: translateX(120%); } }

/* ЦУБ думает: рамка карточки вращается неоном */
.live .bubble { background: linear-gradient(rgba(12, 15, 38, .88), rgba(12, 15, 38, .88)) padding-box,
  conic-gradient(from var(--ang), #7c5cff, #2ee6d6, #3a8bff, #ff4fd8, #7c5cff) border-box; animation: rot 2.6s linear infinite; }
@keyframes rot { to { --ang: 360deg; } }

/* «Новая тема» — рамка медленно переливается; «Отправить» дышит, когда есть текст */
.new-topic { background: linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box, conic-gradient(from var(--ang), #7c5cff, #2ee6d6, #3a8bff, #7c5cff) border-box;
  animation: rot 6s linear infinite; }
.send.ready { animation: ready 1.8s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 7px rgba(124, 92, 255, .2), 0 6px 28px rgba(91, 70, 255, .65), 0 0 26px rgba(46, 230, 214, .35); } }
.topic { transition: background .15s, border-color .15s, transform .15s; }
.topic:hover { transform: translateX(2px); }

/* свет за курсором */
.main { position: relative; }
.main::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(520px circle at var(--mx, 60%) var(--my, 30%), rgba(124, 92, 255, .11), transparent 62%); }
.main > * { position: relative; z-index: 1; }
@media (max-width: 800px) { .hero .orb-wrap { width: 112px; height: 112px; margin-bottom: 22px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* внутри доски — без своего «Выйти» (вход даёт доска) */
.embed #logout { display: none; }

/* ================= экран «Управление» (06.10.2026) ================= */
.admin-btn { margin: -4px 14px 12px; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--glass); color: var(--text); font-weight: 600; transition: border-color .2s, box-shadow .2s; }
.admin-btn:hover, .app.admin-on .admin-btn { border-color: rgba(46, 230, 214, .55); box-shadow: 0 0 18px rgba(46, 230, 214, .18); }
.admin-btn svg { color: var(--cyan); }
.cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 11.5px; font-weight: 800;
  display: inline-grid; place-items: center; box-shadow: 0 0 12px rgba(255, 79, 216, .6); animation: pulse 1.6s infinite; }
.admin-tabs .cnt { margin-left: 6px; }
.app.admin-on .main-head, .app.admin-on #feed, .app.admin-on .composer, .app.admin-on .banner { display: none !important; }
.admin { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 24, .5); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.admin-title { font-family: var(--display); font-weight: 700; font-size: 17px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin-tabs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.admin-tabs button { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 7px 13px; border-radius: 10px; font-weight: 600; display: inline-flex; align-items: center; }
.admin-tabs button:hover { color: var(--text); background: var(--glass); }
.admin-tabs button.on { color: #fff; background: var(--grad-soft); border-color: rgba(124, 92, 255, .45); box-shadow: 0 0 16px rgba(124, 92, 255, .2); }
.admin-body { flex: 1; overflow-y: auto; padding: 22px max(18px, calc((100% - 980px) / 2)) 40px; display: flex; flex-direction: column; gap: 16px; }
.adm-card { padding: 18px 20px; border-radius: 18px; background: linear-gradient(rgba(12, 15, 38, .78), rgba(12, 15, 38, .78)) padding-box, var(--grad-border) border-box;
  border: 1px solid transparent; box-shadow: 0 10px 34px rgba(0, 0, 0, .3); animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.adm-card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.adm-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.adm-row:first-of-type { border-top: 0; }
.adm-row.off { opacity: .5; }
.adm-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.adm-who b { display: block; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 0 14px rgba(124, 92, 255, .4); }
.adm-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.adm-meta { font-size: 12.5px; color: var(--muted); }
.adm-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.admin select, .admin input:not([type=checkbox]) { background: rgba(255, 255, 255, .05); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; }
.admin select option { background: #10142e; }
.admin input:focus, .admin select:focus { outline: 0; border-color: rgba(124, 92, 255, .65); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.adm-search { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.adm-search input { flex: 1; min-width: 160px; }
.adm-note { font-size: 12.5px; color: var(--dim); margin: 12px 0 0; }
.adm-empty { color: var(--dim); font-size: 14px; padding: 8px 0; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.sw input { display: none; }
.sw span { width: 36px; height: 20px; border-radius: 10px; background: rgba(255, 255, 255, .12); position: relative; transition: background .2s; flex: none; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw input:checked + span { background: var(--grad); box-shadow: 0 0 12px rgba(46, 230, 214, .35); }
.sw input:checked + span::after { transform: translateX(16px); }
.sw input:disabled + span { opacity: .5; }
.adm-caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px 18px; margin-bottom: 14px; }
.adm-caps .sw { color: var(--text); }
.adm-req { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--glass); margin-bottom: 10px; }
.adm-req.pending { border-color: rgba(255, 79, 216, .5); box-shadow: 0 0 22px rgba(255, 79, 216, .14); }
.adm-req-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.adm-req-h span { font-size: 12.5px; color: var(--muted); }
.adm-req-d { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: #d6dcff; background: rgba(0, 0, 0, .3); padding: 8px 10px; border-radius: 10px; overflow-wrap: anywhere; margin-bottom: 10px; }
.adm-req .adm-ctl { justify-content: flex-start; }
.adm-split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-left { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.adm-pp { text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.adm-pp span { font-size: 12px; color: var(--muted); }
.adm-pp:hover { background: var(--glass); }
.adm-pp.on { background: var(--grad-soft); border-color: rgba(124, 92, 255, .4); }
.adm-right h3 { margin-top: 6px; }
.adm-topic { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; border: 1px solid var(--line-2); background: var(--glass); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; transition: border-color .2s, transform .15s; }
.adm-topic:hover { border-color: rgba(46, 230, 214, .55); transform: translateY(-1px); }
.adm-topic > span { font-size: 12px; color: var(--dim); }
.adm-topic .q, .adm-topic .a { font-size: 14px; line-height: 1.45; }
.adm-topic i { display: inline-block; min-width: 64px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-right: 6px; }
.adm-topic .q i { color: #b9a8ff; }
/* «Управление» → «Чаты»: фильтр по дням, коротко «вопрос → итог»; «Запросы»: уведомления из Telegram (08.10.2026) */
.adm-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.adm-days .btn.on { border-color: rgba(46, 230, 214, .7); background: rgba(46, 230, 214, .16); }
.adm-days input[type=date] { padding: 5px 8px; font-size: 13px; border-radius: 10px; }
.adm-topic.qa > b { font-size: 15px; }
.adm-topic .a, .adm-res { font-size: 14px; line-height: 1.4; color: var(--cyan); }
.adm-res { margin: 2px 0 4px; }
.adm-src { font-weight: 700; color: var(--muted); }
.adm-req-t { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 10px; }
.adm-hist { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.hm { padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.hm.user { background: rgba(124, 92, 255, .14); border-color: rgba(124, 92, 255, .3); }
.hm-h { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.hm-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-priv { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); }
.adm-priv code { font-size: 12.5px; color: #d6dcff; overflow-wrap: anywhere; }

/* отметки «Сергей разрешил / не разрешил» в ленте */
.msg.note { justify-content: center; }
.msg.note .bubble { max-width: 640px; padding: 9px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.msg.note.ok .bubble { border: 1px solid rgba(46, 230, 160, .5); background: rgba(46, 230, 160, .08); color: #c8fbe6; box-shadow: 0 0 20px rgba(46, 230, 160, .15); }
.msg.note.deny .bubble { border: 1px solid rgba(255, 107, 136, .5); background: rgba(255, 107, 136, .08); color: #ffd0da; }
.msg.note .time { color: inherit; opacity: .6; }

/* вход по почте */
.login-email { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.login-email input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 16px; text-align: center; }
.login-email input:focus { outline: 0; border-color: rgba(124, 92, 255, .65); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }

@media (max-width: 800px) {
  .admin-head { padding: 10px 12px; gap: 8px; }
  .admin-tabs { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .admin-tabs button { white-space: nowrap; }
  .admin-body { padding: 14px 10px 30px; }
  .adm-card { padding: 14px; }
  .adm-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .adm-ctl { justify-content: flex-start; }
  .adm-split { grid-template-columns: minmax(0, 1fr); }
  .admin input:not([type=checkbox]), .admin select { font-size: 16px; }
}

/* ================= светлая тема (07.10.2026, Сергей): тот же образ — сияние, стекло, градиент — на светлом ================= */
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1fb; --bg-2: #e4e8f7;
  --glass: rgba(40, 50, 120, .045); --glass-2: rgba(40, 50, 120, .08); --glass-3: rgba(40, 50, 120, .12);
  --panel: rgba(255, 255, 255, .7); --panel-solid: #ffffff;
  --line: rgba(30, 40, 100, .10); --line-2: rgba(30, 40, 100, .18);
  --text: #141933; --muted: #59618a; --dim: #8a90b2;
  --violet: #6a4bff; --blue: #2f74e8; --cyan: #0aa59a; --pink: #d6339f; --mint: #10a874;
  --grad: linear-gradient(135deg, #6a4bff 0%, #2f74e8 52%, #0fb5a8 100%);
  --grad-soft: linear-gradient(135deg, rgba(106, 75, 255, .14), rgba(15, 181, 168, .08));
  --grad-border: linear-gradient(135deg, rgba(106, 75, 255, .55), rgba(47, 116, 232, .25) 45%, rgba(15, 181, 168, .5));
  --glow: 0 0 24px rgba(106, 75, 255, .18), 0 0 50px rgba(15, 181, 168, .08);
  --warn: #b26a00; --err: #d6335a;
}
[data-theme="light"] ::selection { background: rgba(106, 75, 255, .22); }
[data-theme="light"] * { scrollbar-color: rgba(30, 40, 100, .2) transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(30, 40, 100, .2); }
[data-theme="light"] .aurora { background: radial-gradient(1100px 700px at 85% -10%, #dcd6ff 0%, transparent 60%), radial-gradient(900px 600px at -10% 110%, #d3ecff 0%, transparent 60%), var(--bg); }
[data-theme="light"] .aurora i { mix-blend-mode: multiply; }
[data-theme="light"] .aurora i:nth-child(1) { background: #b9a8ff; opacity: .35; }
[data-theme="light"] .aurora i:nth-child(2) { background: #9fd4ff; opacity: .35; }
[data-theme="light"] .aurora i:nth-child(3) { background: #9ff0dc; opacity: .25; }
[data-theme="light"] .grid-bg { background-image: linear-gradient(rgba(30, 40, 100, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 40, 100, .05) 1px, transparent 1px); }
[data-theme="light"] .orb { box-shadow: 0 0 34px rgba(106, 75, 255, .35), 0 0 70px rgba(15, 181, 168, .15), inset -10px -14px 30px rgba(0, 0, 0, .3); }
[data-theme="light"] .orb.sm, [data-theme="light"] .orb.xs { box-shadow: 0 0 10px rgba(106, 75, 255, .4); }
[data-theme="light"] .orb-wrap .orbit i { background: #0fb5a8; box-shadow: 0 0 8px rgba(15, 181, 168, .7); }
[data-theme="light"] .orb-wrap .orbit.o2 i { background: #6a4bff; box-shadow: 0 0 8px rgba(106, 75, 255, .7); }

[data-theme="light"] .btn:hover { border-color: rgba(30, 40, 100, .28); }
[data-theme="light"] .btn.primary { box-shadow: 0 6px 20px rgba(91, 70, 255, .25); }
[data-theme="light"] .login-card { background: rgba(255, 255, 255, .72); box-shadow: 0 30px 80px rgba(40, 50, 120, .16); }
[data-theme="light"] .side { background: rgba(255, 255, 255, .62); }
[data-theme="light"] .main-head, [data-theme="light"] .admin-head { background: rgba(255, 255, 255, .55); }
[data-theme="light"] .net.on { color: #0b7a55; } [data-theme="light"] .net.off { color: #b8264a; }
[data-theme="light"] .new-topic { color: var(--text); }
[data-theme="light"] .topic.active { border-color: rgba(106, 75, 255, .3); box-shadow: 0 0 18px rgba(106, 75, 255, .08); }
[data-theme="light"] .topic.running .t { background-image: linear-gradient(90deg, var(--text) 0%, var(--cyan) 45%, #6a4bff 55%, var(--text) 100%); }
[data-theme="light"] .banner.warn { border-color: rgba(178, 106, 0, .4); color: #8a5200; background: rgba(255, 190, 92, .14); }
[data-theme="light"] .banner.ok { border-color: rgba(15, 181, 168, .4); box-shadow: 0 0 18px rgba(15, 181, 168, .1); }

[data-theme="light"] .msg.user .bubble { box-shadow: 0 8px 24px rgba(80, 70, 255, .2); }
[data-theme="light"] .msg.assistant .bubble { background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)) padding-box, var(--grad-border) border-box;
  box-shadow: 0 10px 30px rgba(40, 50, 120, .1); }
[data-theme="light"] .msg.system .bubble { border-color: rgba(214, 51, 90, .45); background: rgba(214, 51, 90, .06); color: #a8243f; }
[data-theme="light"] .msg.system .bubble .time { color: rgba(168, 36, 63, .6); }
[data-theme="light"] .msg.note.ok .bubble { border-color: rgba(16, 168, 116, .45); background: rgba(16, 168, 116, .08); color: #0b6e4c; box-shadow: none; }
[data-theme="light"] .msg.note.deny .bubble { border-color: rgba(214, 51, 90, .45); background: rgba(214, 51, 90, .06); color: #a8243f; }
[data-theme="light"] .msg.assistant.appear .bubble::before { background: linear-gradient(110deg, transparent 35%, rgba(106, 75, 255, .08) 50%, transparent 65%); }
[data-theme="light"] .md b { color: #0b0f26; }
[data-theme="light"] .md code { background: rgba(106, 75, 255, .1); color: #3d2bb0; }
[data-theme="light"] .md pre { background: rgba(30, 40, 100, .05); }
[data-theme="light"] .md pre code { color: #232a52; }
[data-theme="light"] .md th { background: rgba(106, 75, 255, .08); color: #2a2366; }
[data-theme="light"] .md tbody tr:hover td { background: rgba(30, 40, 100, .03); }
[data-theme="light"] .md a { text-decoration-color: rgba(10, 165, 154, .45); }
[data-theme="light"] .md a.task:hover { text-shadow: none; }

[data-theme="light"] .live .bubble { background: linear-gradient(rgba(255, 255, 255, .93), rgba(255, 255, 255, .93)) padding-box,
  conic-gradient(from var(--ang), #6a4bff, #0fb5a8, #2f74e8, #d6339f, #6a4bff) border-box; }
[data-theme="light"] .live-head .now { background-image: linear-gradient(90deg, #5a3fe0 0%, var(--cyan) 40%, #2f74e8 50%, #5a3fe0 100%); }
[data-theme="light"] .hero h1 { background-image: linear-gradient(90deg, #141933 0%, #5a3fe0 25%, #0aa59a 50%, #5a3fe0 75%, #141933 100%); }
[data-theme="light"] .hero .code { color: #077a71; border-color: rgba(10, 165, 154, .45); background: rgba(10, 165, 154, .08); box-shadow: none; }
[data-theme="light"] .chip { background: rgba(255, 255, 255, .6); }
[data-theme="light"] .chip:hover { border-color: rgba(10, 165, 154, .55); box-shadow: 0 0 16px rgba(10, 165, 154, .15); }

[data-theme="light"] .composer { background: rgba(255, 255, 255, .85); box-shadow: 0 14px 40px rgba(40, 50, 120, .14); }
[data-theme="light"] .composer:focus-within { border-color: rgba(106, 75, 255, .5); box-shadow: 0 0 0 4px rgba(106, 75, 255, .1), 0 14px 40px rgba(40, 50, 120, .14); }
[data-theme="light"] #mic.rec { color: #a01f78; background: rgba(214, 51, 159, .1); }
[data-theme="light"] .toast { background: rgba(255, 255, 255, .95); box-shadow: 0 12px 40px rgba(40, 50, 120, .2); }
[data-theme="light"] .main::before { background: radial-gradient(520px circle at var(--mx, 60%) var(--my, 30%), rgba(106, 75, 255, .07), transparent 62%); }

[data-theme="light"] .admin-tabs button.on { color: var(--text); box-shadow: none; }
[data-theme="light"] .adm-card { background: linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)) padding-box, var(--grad-border) border-box;
  box-shadow: 0 10px 30px rgba(40, 50, 120, .08); }
[data-theme="light"] .admin select, [data-theme="light"] .admin input:not([type=checkbox]), [data-theme="light"] .login-email input { background: #fff; }
[data-theme="light"] .admin select option { background: #fff; }
[data-theme="light"] .sw span { background: rgba(30, 40, 100, .18); }
[data-theme="light"] .adm-req-d { color: #232a52; background: rgba(30, 40, 100, .05); }
[data-theme="light"] .adm-topic .q i { color: #5a3fe0; }
[data-theme="light"] .adm-topic .a, [data-theme="light"] .adm-res { color: #0b7d74; }
[data-theme="light"] .adm-days .btn.on { border-color: #12a89c; background: rgba(18, 168, 156, .12); }
[data-theme="light"] .hm.user { background: rgba(106, 75, 255, .08); border-color: rgba(106, 75, 255, .22); }
[data-theme="light"] .adm-priv code { color: #232a52; }

/* ================= лёгкий режим (08.10.2026, Сергей: ЦУБ подвешивает браузер — сам замеряет и предлагает) =================
   Без живого фона, плавающих пятен, размытий под стеклом и бесконечных анимаций; остаётся только «ЦУБ думает». Включается
   атрибутом data-lite на <html> (index.html ставит его до отрисовки по выбору на устройстве cub_lite). */
[data-lite] #neural, [data-lite] .aurora i, [data-lite] .main::before { display: none !important; }
[data-lite] *, [data-lite] *::before, [data-lite] *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important; transition: none !important; }
[data-lite] .orb.think { animation: breathe 1.6s ease-in-out infinite !important; }
.me-row { flex-wrap: wrap; row-gap: 6px; }
#lite-btn { white-space: nowrap; flex-basis: 100%; text-align: left; }
[data-lite] #lite-btn { color: var(--cyan); }
[data-theme="light"][data-lite] #lite-btn { color: #0b7d74; }

/* ================= шаги подключения (08.10.2026): полоса сверху + подпись; пока нет входа — показанное из памяти приглушено ================= */
.conn { position: fixed; top: 0; left: 0; right: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .5s; }
.conn.on { opacity: 1; }
.conn-bar { height: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.conn-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--grad); box-shadow: 0 0 12px rgba(46, 230, 214, .7);
  transition: width .6s cubic-bezier(.2, .8, .2, 1); position: relative; }
.conn-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; animation: connrun 1.1s linear infinite; }
@keyframes connrun { from { background-position: -40% 0; } to { background-position: 140% 0; } }
#conn-text { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text); background: var(--panel-solid); border: 1px solid var(--line-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.conn.done .conn-bar i::after { display: none; }
.conn.offline .conn-bar i { background: var(--warn); box-shadow: 0 0 10px rgba(255, 190, 92, .6); }
.conn.offline .conn-bar i::after, .conn.lost .conn-bar i::after { display: none; }
.conn.lost .conn-bar i { background: var(--err); box-shadow: 0 0 10px rgba(255, 107, 136, .6); }
.conn.offline #conn-text { color: var(--warn); white-space: normal; text-align: center; }
.app.stale .topics, .app.stale #feed { opacity: .62; transition: opacity .4s; }
.app .topics, .app #feed { transition: opacity .4s; }
[data-theme="light"] #conn-text { background: #fff; box-shadow: 0 6px 20px rgba(40, 50, 120, .14); }
[data-theme="light"] .conn-bar { background: rgba(30, 40, 100, .06); }
[data-theme="light"] .conn.offline #conn-text { color: #a86400; }

/* ---------- прикреплённые файлы (08.10.2026) ---------- */
.att { display: flex; flex-wrap: wrap; gap: 6px; width: min(860px, calc(100% - 32px)); margin: 4px auto 0; }
.afile { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 12px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text); font-size: 13px; }
.afile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: rgba(46, 230, 214, .16); transition: width .2s; }
.afile > * { position: relative; }
.afile .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.afile .sz { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.afile .x { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.afile .x:hover { background: var(--glass-3); color: var(--text); }
.afile.ok { border-color: rgba(46, 230, 214, .45); }
.afile.err { border-color: rgba(255, 90, 110, .6); cursor: pointer; }
.afile.err .sz { color: #ff7a8a; }
.app.drop .main { outline: 2px dashed rgba(46, 230, 214, .7); outline-offset: -10px; }
.app.drop .composer { border-color: rgba(46, 230, 214, .8); }
.msg.user .files .btn { font-size: 12.5px; }
@media (max-width: 800px) {
  .att { width: calc(100% - 16px); }
  .afile .nm { max-width: 170px; }
}
[data-theme="light"] .afile { background: rgba(255, 255, 255, .85); }
[data-theme="light"] .afile::before { background: rgba(20, 170, 160, .14); }
[data-theme="light"] .afile.err .sz { color: #c62840; }

/* «Показать раньше» — в ленте только последние сообщения (09.10.2026) */
.more-btn { display: block; margin: 0 auto 6px; }
