/* =====================================================================
   Koles AI — v2 design layer: Manrope, 8px grid, glass, violet/cyan, живой Ботик
   (поверх styles.css: все старые разделы сохраняются)
   ===================================================================== */
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-cyrillic.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0b0918; --bg-elev: #110e22; --s1: #151229; --s2: #1d1935; --s3: #2a2547;
  --glass: rgba(21, 18, 41, .62); --glass2: rgba(29, 25, 53, .55);
  --line: rgba(196, 181, 253, .08); --line2: rgba(196, 181, 253, .14);
  --text: #f4f2ff; --muted: #a39fc0; --dim: #7a7699;
  --accent: #8b5cf6; --accent-ink: #c4b5fd; --accent2: #22d3ee;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6d5cf6 45%, #22b8ee 100%);
  --user: linear-gradient(135deg, #7c3aed 0%, #6152f5 55%, #3f7df0 100%);
  --sh1: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(10,6,30,.35);
  --sh2: 0 8px 32px rgba(8,4,28,.5), 0 2px 8px rgba(8,4,28,.3);
  --sh3: 0 24px 64px rgba(4,2,16,.6);
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;
  --blur: saturate(160%) blur(20px);
  font-family: "Manrope", "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
}
:root[data-theme="light"] {
  --bg: #f5f3fd; --bg-elev: #fbfaff; --s1: #ffffff; --s2: #f1eefb; --s3: #e5e0f7;
  --glass: rgba(255,255,255,.7); --glass2: rgba(255,255,255,.55);
  --line: rgba(76, 52, 160, .08); --line2: rgba(76, 52, 160, .14);
  --text: #17132e; --muted: #5d5880; --dim: #8a86a8; --accent-ink: #6d28d9;
  --sh1: 0 1px 2px rgba(60,40,140,.06), 0 4px 16px rgba(60,40,140,.06);
  --sh2: 0 8px 32px rgba(60,40,140,.10); --sh3: 0 24px 64px rgba(60,40,140,.16);
}
body.v2 { font-size: 15.5px; letter-spacing: -.005em; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.sm { width: 14px; height: 14px; stroke-width: 2.4; }
h1, h2, h3, h4 { letter-spacing: -.02em; }
.muted { color: var(--muted); }

/* фон: мягкие светящиеся сферы */
.bg-glow { inset: 0; background: none !important; overflow: hidden; }
.bg-glow i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: orb 24s ease-in-out infinite alternate; }
.bg-glow .o1 { width: 46vw; height: 46vw; left: -10vw; top: -14vw; background: radial-gradient(circle, rgba(139,92,246,.45), transparent 65%); }
.bg-glow .o2 { width: 40vw; height: 40vw; right: -12vw; top: 20vh; background: radial-gradient(circle, rgba(34,211,238,.25), transparent 65%); animation-delay: -8s; }
.bg-glow .o3 { width: 36vw; height: 36vw; left: 30vw; bottom: -18vw; background: radial-gradient(circle, rgba(244,114,182,.16), transparent 65%); animation-delay: -16s; }
:root[data-theme="light"] .bg-glow i { opacity: .35; }
@keyframes orb { to { transform: translate3d(4vw, 3vh, 0) scale(1.08); } }

/* кнопки */
.btn { border-radius: 12px; min-height: 40px; padding: 8px 16px; gap: 8px; display: inline-flex; align-items: center; justify-content: center; transition: transform .18s var(--spring), background .2s, box-shadow .2s, filter .2s; font-weight: 600; }
.btn.big { min-height: 48px; padding: 12px 22px; font-size: 15.5px; border-radius: 16px; }
.btn.primary { background: var(--grad); box-shadow: 0 8px 24px rgba(109, 92, 246, .35), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.icon { width: 40px; height: 40px; min-height: 40px; border-radius: 12px; display: inline-grid; place-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--glass2); color: var(--text); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 550; transition: background .2s, transform .18s var(--spring), border-color .2s; backdrop-filter: var(--blur); }
.chip .ic { width: 16px; height: 16px; color: var(--accent-ink); }
.chip:hover { background: var(--soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-1px); }

/* тултипы */
@media (hover: hover) {
  [data-tip] { position: relative; }
  [data-tip]:hover::after { content: attr(data-tip); position: absolute; z-index: 90; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; max-width: 280px; padding: 6px 10px; border-radius: 8px; background: #221c44; color: #fff; font-size: 12.5px; font-weight: 550; box-shadow: var(--sh2); pointer-events: none; animation: tipin .18s var(--ease) .35s both; }
  .composer [data-tip]:hover::after { top: auto; bottom: calc(100% + 8px); }
  .sidebar [data-tip]:hover::after { white-space: normal; width: max-content; max-width: 220px; }
}
@keyframes tipin { from { opacity: 0; transform: translate(-50%, 4px); } }

/* ---------- сайдбар ---------- */
.sidebar { background: var(--glass) !important; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-right: 1px solid var(--line) !important; width: 300px; }
.sidebar-top { padding: 16px 16px 8px; gap: 16px; }
.brand { gap: 12px; position: relative; }
.brand-bot { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text strong { font-size: 17px; font-weight: 800; }
.new-chat { min-height: 44px; border-radius: 14px; }
.nav { gap: 2px; }
.nav-sec { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 12px 12px 4px; }
.nav-item { min-height: 48px; padding: 8px 12px; gap: 12px; border-radius: 14px; align-items: center; transition: background .2s, color .2s; color: var(--muted); }
.nav-item .ic { color: var(--muted); transition: color .2s, transform .25s var(--spring); }
.nav-item .ni-t { display: flex; flex-direction: column; line-height: 1.25; text-align: left; flex: 1; min-width: 0; font-weight: 650; font-size: 14.5px; color: var(--text); }
.nav-item .ni-t small { font-weight: 500; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover .ic { transform: scale(1.08); color: var(--accent-ink); }
.nav-item.active { background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(34,211,238,.08)); box-shadow: inset 0 0 0 1px rgba(167,139,250,.22); }
.nav-item.active .ic { color: var(--accent-ink); }
.nav-pill { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.sidebar { overflow-y: auto; }
.sidebar .chat-list { min-height: 120px; }
.chat-search { min-height: 44px; border-radius: 12px; background: var(--glass2); }
.limits-mini { margin: 4px 16px 8px; padding: 12px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--line); display: grid; gap: 8px; }
.lm-head { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.lm-plan { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.lim { display: grid; gap: 4px; }
.lim-h { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.lim-h b { color: var(--text); font-weight: 700; }
.lim-bar { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; }
.lim-bar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width .8s var(--ease); }
.lim.low .lim-bar i { background: linear-gradient(90deg, #f59e0b, #f472b6); }
.lim-note { font-size: 11.5px; color: var(--dim); }
.trial-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 750; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(139,92,246,.22)); border: 1px solid rgba(34,211,238,.35); color: var(--text); cursor: pointer; margin-left: auto; white-space: nowrap; }
.trial-badge .tb-dot { width: 7px; height: 7px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 0 0 rgba(34,211,238,.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(34,211,238,0); } }
.trial-badge.top { margin: 0 4px; }
@media (max-width: 600px) { .trial-badge.top { display: none !important; } }

/* ---------- топбар ---------- */
.topbar { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); min-height: 64px; padding-left: 16px; padding-right: 12px; gap: 8px; }
.top-bot { width: 40px; height: 40px; cursor: pointer; }
.topbar-title h1 { font-size: 16.5px; font-weight: 750; }

/* ---------- чат ---------- */
.messages { padding: 24px 16px 16px; }
.thread { gap: 24px; max-width: 760px; }
.msg.user .bubble { border-radius: 22px 22px 8px 22px; padding: 12px 16px; box-shadow: 0 10px 28px rgba(97,82,245,.28); position: relative; }
.msg.assistant .bubble { line-height: 1.65; }
.avatar.kb-ava { width: 36px; height: 36px; border-radius: 12px; background: var(--glass2); box-shadow: inset 0 0 0 1px var(--line2); overflow: visible; padding: 0; }
.composer { padding: 8px 16px calc(12px + var(--safe-b)); }
.composer::before { background: linear-gradient(to top, var(--bg) 55%, transparent); }
.composer-card { border-radius: 24px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line2); box-shadow: var(--sh2); padding: 12px 12px 12px 16px; max-width: 760px; }
.composer-card textarea { font-size: 16px; min-height: 28px; }
.composer-bar { gap: 8px; }
.round-btn { width: 44px; height: 44px; background: var(--glass2); }
.mode-chip { height: 44px; padding: 0 14px; font-weight: 650; font-size: 14px; }
.task-chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(109,92,246,.4); }
.voice-pill { height: 44px; padding: 0 18px; }
.composer-hint { max-width: 760px; margin: 8px auto 0; font-size: 12px; color: var(--dim); text-align: center; position: relative; }
@media (max-width: 860px) { .composer-hint { display: none; } .task-chip span { display: none; } .task-chip { width: 44px; padding: 0; justify-content: center; } }

/* реакция на сообщение пользователя */
.react-pill { position: absolute; right: 10px; bottom: -14px; min-width: 32px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--s1); border: 1px solid var(--line2); box-shadow: var(--sh1); font-size: 16px; line-height: 1; animation: rpop .55s cubic-bezier(.3,1.8,.5,1) both; z-index: 2; }
.react-pill b { display: block; font-weight: 400; }
.react-pill.wobble b { animation: wob 1.2s ease-in-out .5s 2; }
.react-pill.fire b { animation: flick .6s ease-in-out .4s 3; }
.react-pill.love b { animation: beat .7s ease-in-out .4s 2; }
.react-pill i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-ink); left: 50%; top: 50%; opacity: 0; animation: burst .6s ease-out .15s both; }
.react-pill i:nth-child(2) { --a: 0deg; } .react-pill i:nth-child(3) { --a: 60deg; background: #22d3ee; } .react-pill i:nth-child(4) { --a: 120deg; background: #f472b6; }
.react-pill i:nth-child(5) { --a: 180deg; } .react-pill i:nth-child(6) { --a: 240deg; background: #facc15; } .react-pill i:nth-child(7) { --a: 300deg; background: #22d3ee; }
@keyframes rpop { 0% { transform: scale(0) rotate(-25deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1); } }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-26px) scale(.4); } }
@keyframes wob { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg) scale(1.1); } 75% { transform: rotate(14deg) scale(1.1); } }
@keyframes flick { 50% { transform: scale(1.25) translateY(-2px); } }
@keyframes beat { 30% { transform: scale(1.3); } 60% { transform: scale(.95); } }

/* ---------- Ботик (общий движок) ---------- */
.kbx { position: relative; display: inline-block; line-height: 0; }
.kbx-in { position: absolute; inset: 0; }
.kbx-body { position: absolute; inset: 0; animation: kbxFloat 4.2s ease-in-out infinite; transform-origin: 50% 90%; }
.kbx-l { position: absolute; inset: 0; opacity: 0; transform: scale(.94); transition: opacity .42s var(--ease), transform .5s var(--spring); }
.kbx-l.on { opacity: 1; transform: scale(1); }
.kbx-l.off { opacity: 0; transform: scale(1.04); }
.kbx-media { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; filter: drop-shadow(0 10px 18px rgba(20,8,60,.35)); }
.kbx-shadow { position: absolute; left: 22%; right: 22%; bottom: 0; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(10,4,40,.45), transparent); animation: kbxShadow 4.2s ease-in-out infinite; }
:root[data-theme="light"] .kbx-shadow { background: radial-gradient(closest-side, rgba(60,40,140,.22), transparent); }
.kbx-head .kbx-body { inset: -6% -6% -30% -6%; animation-duration: 5s; }
.kbx-head .kbx-shadow { display: none; }
.kbx-head .kbx-media { filter: none; object-position: 50% 0; }
.kbx.kbx-pop .kbx-body { animation: kbxPop .6s var(--spring), kbxFloat 4.2s ease-in-out .6s infinite; }
.kbx[data-role="sleepy"] .kbx-body { animation-duration: 6s; }
.kbx[data-role="crown"] .kbx-body, .kbx[data-role="love"] .kbx-body { animation: kbxHop 1.4s ease-in-out infinite; }
.kbx[data-role="hacker"] .kbx-body, .kbx[data-role="writing"] .kbx-body { animation: kbxType 1.1s ease-in-out infinite; }
.kbx[data-role="dj"] .kbx-body { animation: kbxGroove .9s ease-in-out infinite; }
.kbx.kb-still .kbx-body, .kbx.kb-still .kbx-shadow { animation: none !important; }
@keyframes kbxFloat { 0%,100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3.5%) scale(1.01, .995); } }
@keyframes kbxShadow { 0%,100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.86); opacity: .7; } }
@keyframes kbxPop { 0% { transform: scale(.9, 1.08); } 40% { transform: translateY(-8%) scale(1.06, .95); } 70% { transform: scale(.98, 1.02); } 100% { transform: none; } }
@keyframes kbxHop { 0%,100% { transform: translateY(0) scale(1); } 20% { transform: translateY(0) scale(1.04, .95); } 45% { transform: translateY(-7%) scale(.97, 1.04); } 70% { transform: translateY(0) scale(1.02, .98); } }
@keyframes kbxType { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-1%) rotate(-1deg); } 75% { transform: translateY(-1%) rotate(1deg); } }
@keyframes kbxGroove { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-3%); } }
/* частицы ролей */
.kbx-fx { position: absolute; inset: 0; pointer-events: none; }
.fx { position: absolute; font-style: normal; line-height: 1; font-weight: 800; opacity: 0; animation: fxUp 2.6s ease-in infinite; animation-delay: calc(var(--i) * .55s); left: calc(18% + var(--i) * 22%); top: 22%; font-size: clamp(9px, 9%, 22px); color: var(--accent-ink); text-shadow: 0 0 10px rgba(139,92,246,.6); }
.fx-code { font-family: ui-monospace, monospace; color: #22d3ee; font-size: clamp(8px, 7%, 15px); }
.fx-notes, .fx-zzz { color: #22d3ee; }
.fx-hearts { color: #f472b6; text-shadow: 0 0 10px rgba(244,114,182,.6); }
.fx-confetti { width: 6%; height: 3%; min-width: 4px; min-height: 3px; border-radius: 2px; background: hsl(calc(var(--i) * 47 + 260), 90%, 65%); top: 8%; left: calc(6% + var(--i) * 11.5%); animation: fxFall 2.4s linear infinite; animation-delay: calc(var(--i) * .3s); }
.fx-paint { color: hsl(calc(var(--i) * 70 + 270), 85%, 65%); }
.fx-flash { color: #fff; animation-name: fxFlash; }
.fx-dots { top: 6%; left: calc(62% + var(--i) * 9%); animation-name: fxBlink; animation-duration: 1.4s; animation-delay: calc(var(--i) * .2s); }
.fx-heart1 { animation-name: fxUpBig; left: 44%; top: 40%; font-size: clamp(10px, 12%, 26px); }
@keyframes fxUp { 0% { opacity: 0; transform: translateY(10%) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-260%) scale(1.15); } }
@keyframes fxUpBig { 0% { opacity: 0; transform: translateY(0) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-300%) scale(1.2); } }
@keyframes fxFall { 0% { opacity: 0; transform: translateY(-40%) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(900%) rotate(540deg); } }
@keyframes fxFlash { 0%, 100% { opacity: 0; transform: scale(.4); } 10% { opacity: 1; transform: scale(1.4); } 25% { opacity: 0; } }
@keyframes fxBlink { 0%,100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

/* ---------- док с Ботиком ---------- */
.kb-dock { position: absolute; right: 24px; bottom: 132px; z-index: 6; width: 160px; height: 160px; cursor: pointer; outline: none; transition: opacity .35s, transform .45s var(--spring); }
.kb-dock-bot { width: 100%; height: 100%; }
.kb-dock:hover .kb-dock-bot { transform: translateY(-3px); transition: transform .3s var(--spring); }
.kb-dock:focus-visible { box-shadow: var(--ring); border-radius: 24px; }
.kb-say { position: absolute; right: 50%; bottom: calc(100% - 8px); transform: translateX(40%) translateY(6px) scale(.9); opacity: 0; transform-origin: 70% 100%; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line2); box-shadow: var(--sh2); font-size: 13px; font-weight: 650; color: var(--text); pointer-events: none; transition: opacity .25s, transform .35s var(--spring); line-height: 1.35; }
.kb-say.on { opacity: 1; transform: translateX(40%) translateY(0) scale(1); }
body.dock-away .kb-dock { opacity: 0; transform: scale(.6) translateY(20px); pointer-events: none; }
body:not([data-view="chat"]):not([data-view="tasks"]) .kb-dock { opacity: 0; pointer-events: none; transform: scale(.7); }
@media (max-width: 1180px) { .kb-dock { width: 112px; height: 112px; right: 12px; bottom: 128px; } .kb-say { font-size: 12.5px; } }
@media (max-width: 860px) { .kb-dock { display: none !important; } }
.welcome.v2w ~ * {}
body[data-view="chat"] .messages:has(.v2w) ~ .kb-dock { opacity: 0; pointer-events: none; }

/* ---------- приветствие ---------- */
.welcome.v2w { max-width: 760px; margin: 2vh auto 0; padding: 0 8px 24px; }
.w-stage { position: relative; width: 248px; height: 248px; margin: 0 auto 8px; }
.w-halo { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.45), rgba(34,211,238,.12) 55%, transparent 70%); filter: blur(18px); animation: halo 5s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.1); opacity: .8; } }
.w-stage .hero-bot { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.v2w h2 { font-size: clamp(28px, 4.8vw, 40px); font-weight: 800; margin: 0 0 8px; }
.w-sub { font-size: 16px; color: var(--muted); max-width: 520px; margin: 0 auto 24px !important; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; }
@media (max-width: 760px) { .actions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .actions { grid-template-columns: 1fr; } }
.action { position: relative; display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 16px; border-radius: 20px; border: 1px solid var(--line2); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); cursor: pointer; color: var(--text); font: inherit; box-shadow: var(--sh1); transition: transform .25s var(--spring), box-shadow .25s, border-color .25s; animation: rise .5s var(--ease) both; overflow: hidden; }
.action::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .25s; }
.action:hover { transform: translateY(-3px); box-shadow: var(--sh2); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.action:hover::before { opacity: 1; }
.action:active { transform: scale(.98); }
.a-ic { position: relative; width: 48px; height: 48px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(0,0,0,.2); }
.a-ic .ic { width: 22px; height: 22px; }
.a-ask { background: linear-gradient(135deg, #8b5cf6, #6366f1); } .a-image { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.a-video { background: linear-gradient(135deg, #f97316, #ec4899); } .a-music { background: linear-gradient(135deg, #06b6d4, #6366f1); }
.a-task { background: linear-gradient(135deg, #10b981, #06b6d4); } .a-docs { background: linear-gradient(135deg, #3b82f6, #22d3ee); }
.a-t { position: relative; display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.a-t b { font-size: 15px; font-weight: 750; line-height: 1.25; }
.a-t small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.a-go { position: relative; color: var(--dim); opacity: 0; transform: translateX(-6px); transition: .25s var(--ease); }
.action:hover .a-go { opacity: 1; transform: none; color: var(--accent-ink); }
.w-more { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 24px 0 16px; }
.w-tip { font-size: 13.5px; color: var(--muted); padding: 12px 16px; border-radius: 16px; background: var(--glass2); border: 1px dashed var(--line2); max-width: 560px; margin: 0 auto; }

/* ---------- панели ---------- */
.pcard { background: var(--glass) !important; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line) !important; border-radius: 24px !important; box-shadow: var(--sh1); padding: 24px !important; }
.pcard h3 { font-weight: 750; }
.modal-back { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal { border-radius: 28px !important; background: var(--s1) !important; border: 1px solid var(--line2); box-shadow: var(--sh3); }

/* ---------- задачи ---------- */
.tasks-top { display: flex; align-items: center; gap: 16px; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 24px 24px 8px; flex-wrap: wrap; }
.tasks-top h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.tasks-top p { margin: 0; max-width: 560px; font-size: 14px; }
.task-card.v2 { position: relative; display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--sh1); transition: transform .2s var(--spring), border-color .2s, box-shadow .2s; text-align: left; }
.task-card.v2:hover { transform: translateY(-2px); border-color: var(--line2); box-shadow: var(--sh2); }
.task-card.v2.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px var(--soft), var(--sh2); }
.task-card.v2.st-running { padding-right: 84px; }
.task-card.v2 .tc-title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.task-card.v2 .tc-step { font-size: 12.5px; color: var(--muted); }
.tc-bot { position: absolute; right: 8px; top: 8px; width: 68px; height: 68px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.st-chip.big { height: 28px; font-size: 13px; }
.st-chip.q { background: rgba(148,163,184,.16); color: #cbd5e1; } .st-chip.run { background: rgba(139,92,246,.2); color: #c4b5fd; }
.st-chip.wait { background: rgba(245,158,11,.18); color: #fbbf24; } .st-chip.pause { background: rgba(148,163,184,.16); color: #94a3b8; }
.st-chip.ok { background: rgba(16,185,129,.18); color: #34d399; } .st-chip.err { background: rgba(239,68,68,.16); color: #f87171; } .st-chip.off { background: rgba(148,163,184,.12); color: var(--dim); }
:root[data-theme="light"] .st-chip.q { color: #475569; } :root[data-theme="light"] .st-chip.run { color: #6d28d9; } :root[data-theme="light"] .st-chip.ok { color: #047857; } :root[data-theme="light"] .st-chip.wait { color: #b45309; } :root[data-theme="light"] .st-chip.err { color: #b91c1c; }
.st-chip .spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tc-bar { height: 8px; border-radius: 8px; background: var(--s3); overflow: hidden; }
.tc-bar i { position: relative; display: block; height: 100%; border-radius: 8px; background: var(--grad); transition: width .8s var(--ease); overflow: hidden; }
.tc-bar.anim i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.task-empty { text-align: left; padding: 24px; border-radius: 24px; background: var(--glass); border: 1px dashed var(--line2); }
.task-empty .te-bot { width: 120px; height: 120px; margin: 0 auto 8px; display: block; }
.task-empty h4 { margin: 0 0 8px; font-size: 17px; text-align: center; }
.task-empty ul { margin: 8px 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.task-empty .btn { width: 100%; }
.td-bot { width: 64px !important; height: 64px !important; }
.say-lbl { font-size: 12.5px; font-weight: 700; color: var(--accent-ink); padding: 0 4px 6px; width: 100%; }
.td-say { flex-wrap: wrap; }
.task-modal { max-width: 560px; width: calc(100vw - 32px); padding: 24px !important; position: relative; }
.m-x { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--s2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.tm-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-right: 40px; }
.tm-head h3 { margin: 0 0 4px; font-size: 20px; }
.tm-head p { margin: 0; font-size: 13.5px; }
.tm-bot { width: 88px; height: 88px; flex-shrink: 0; }
.fld { display: grid; gap: 8px; margin: 0 0 16px; font-weight: 650; font-size: 14px; }
.fld textarea, .fld select, .fld input { font: inherit; font-size: 15px; font-weight: 500; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--s2); color: var(--text); outline: none; resize: vertical; }
.fld textarea:focus, .fld select:focus, .fld input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.tm-ex { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 16px; }
.tm-ex .chip { font-size: 12.5px; min-height: 32px; }
.tm-prio { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 24px; cursor: pointer; }
.tm-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-btns .primary { flex: 1; }
.onb-modal { max-width: 480px; width: calc(100vw - 32px); padding: 24px !important; text-align: center; }
.onb-bot { width: 140px; height: 140px; margin: -8px auto 0; }
.onb-steps { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 12px; text-align: left; }
.onb-steps li { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: var(--s2); animation: rise .5s var(--ease) both; }
.onb-steps li:nth-child(2) { animation-delay: .1s; } .onb-steps li:nth-child(3) { animation-delay: .2s; }
.onb-steps .n { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.onb-steps p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.onb-modal .btn { width: 100%; }

/* ---------- тосты ---------- */
.toast { display: none !important; }
.toasts { position: fixed; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast2 { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; border-radius: 16px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line2); box-shadow: var(--sh3); font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .25s, transform .35s var(--spring); }
.toast2.on { opacity: 1; transform: none; }
.toast2 .t-txt { flex: 1; }
.t-act { border: none; background: var(--grad); color: #fff; font: inherit; font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.t-x { border: none; background: none; color: var(--dim); width: 32px; height: 32px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.t-x .ic { width: 16px; height: 16px; }

/* ---------- тарифы ---------- */
.plans-wrap, .help-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 24px; }
.plans-hero, .help-hero { display: flex; gap: 24px; align-items: center; }
.plans-hero h2, .help-hero h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin: 0 0 8px; }
.plans-hero p, .help-hero p { margin: 0; color: var(--muted); max-width: 640px; }
.ph-bot, .hh-bot { width: 160px; height: 160px; flex-shrink: 0; }
@media (max-width: 600px) { .plans-hero, .help-hero { flex-direction: column; text-align: center; } .ph-bot, .hh-bot { width: 128px; height: 128px; } }
.trial-card { margin-top: 12px; padding: 12px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(139,92,246,.18)); border: 1px solid rgba(34,211,238,.3); font-size: 14px; }
.today-card .lim { margin-bottom: 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } }
.plan2 { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 24px; background: var(--glass); backdrop-filter: var(--blur); border: 1px solid var(--line2); box-shadow: var(--sh1); animation: rise .5s var(--ease) both; transition: transform .25s var(--spring), box-shadow .25s; }
.plan2:hover { transform: translateY(-4px); box-shadow: var(--sh2); }
.plan2::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: 24px 24px 0 0; background: var(--pc); }
.plan2.hot { border-color: color-mix(in srgb, var(--pc) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pc) 40%, transparent), 0 16px 48px color-mix(in srgb, var(--pc) 25%, transparent); }
.plan2.cur { outline: 2px solid var(--pc); outline-offset: 2px; }
.plan2 h3 { margin: 0; font-size: 22px; font-weight: 800; }
.p-tag { align-self: flex-start; font-size: 11.5px; font-weight: 750; color: var(--muted); padding: 2px 10px; border-radius: 999px; background: var(--s2); }
.p-ribbon { align-self: flex-start; font-size: 11.5px; font-weight: 800; color: #fff; padding: 3px 10px; border-radius: 999px; background: var(--grad); }
.p-price b { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.p-price span { color: var(--muted); font-size: 14px; margin-left: 6px; }
.p-stars { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.plan2 ul { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 8px; font-size: 14px; flex: 1; }
.plan2 li { display: flex; gap: 8px; } .plan2 li::before { content: "✓"; color: var(--pc); font-weight: 800; }
.p-btn { width: 100%; min-height: 48px; text-decoration: none; }
.cmp-scroll { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp th, .cmp td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp th { font-weight: 800; color: var(--pc); }
.cmp td:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.plans-foot { text-align: center; font-size: 13px; }
/* «лимит закончился» */
.limit-card { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(244,114,182,.12), rgba(139,92,246,.14)); border: 1px solid rgba(244,114,182,.3); animation: rise .5s var(--ease) both; }
.lc-bot { width: 88px; height: 88px; flex-shrink: 0; }
.lc-body b { font-size: 16px; } .lc-body p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.lc-partial { padding: 12px; border-radius: 12px; background: var(--s1); margin-bottom: 12px; font-size: 14px; }
.lc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- помощь ---------- */
.h-sec { font-size: 18px; font-weight: 800; margin: 8px 0 -8px; scroll-margin-top: 16px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.map-card { text-align: left; display: grid; gap: 4px; padding: 16px; border-radius: 20px; border: 1px solid var(--line2); background: var(--glass); color: var(--text); font: inherit; cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; }
.map-card:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.map-card .mi { font-size: 22px; } .map-card b { font-size: 15px; } .map-card small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.faq { display: grid; gap: 8px; }
.faq details { padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.eggs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.egg { padding: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); display: grid; gap: 8px; }
.egg-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.egg p { margin: 0; font-size: 13.5px; color: var(--muted); }
.egg code { justify-self: start; font-size: 12.5px; padding: 2px 8px; border-radius: 8px; background: var(--s2); color: var(--accent-ink); }

/* ---------- шалости ---------- */
#antics { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.actor { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); pointer-events: auto; cursor: pointer; will-change: transform; transition: opacity .3s; }
.actor .a-body { position: absolute; inset: 0; transform-origin: 50% 92%; }
.actor img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(20,8,60,.4)); user-select: none; }
.actor .a-shadow { position: absolute; left: 20%; right: 20%; bottom: -2%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(10,4,40,.4), transparent); }
.actor.left .a-body img { transform: scaleX(-1); }
.actor.walking .a-body { animation: walk .42s ease-in-out infinite; }
.actor.walking .a-shadow { animation: walkSh .42s ease-in-out infinite; }
@keyframes walk { 0%,100% { transform: translateY(0) rotate(-3deg) scale(1.02, .98); } 50% { transform: translateY(-9%) rotate(3deg) scale(.98, 1.03); } }
@keyframes walkSh { 50% { transform: scaleX(.75); opacity: .6; } }
.actor.swap .a-body { animation: kbxPop .5s var(--spring); }
.actor.big { transform-origin: center; }
.actor.dancing .a-body { animation: dance .5s ease-in-out infinite; }
@keyframes dance { 0%,100% { transform: rotate(-8deg) translateY(0); } 25% { transform: rotate(0) translateY(-10%) scale(1.04, .96); } 50% { transform: rotate(8deg) translateY(0); } 75% { transform: rotate(0) translateY(-10%); } }
.actor.snoring .a-body { animation: snore 3s ease-in-out infinite; }
@keyframes snore { 50% { transform: scale(1.03, .97) translateY(2%); } }
.actor.startle .a-body { animation: startle .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes startle { 30% { transform: translateY(-35%) scale(.95, 1.08); } }
.actor.sneezing .a-body { animation: sneeze .9s ease-in-out; } @keyframes sneeze { 0% { transform: rotate(0); } 40% { transform: rotate(-6deg) translateY(-3%); } 55% { transform: rotate(10deg) translateX(6%) scale(1.06, .94); } 100% { transform: none; } }
.actor.hiccup .a-body { animation: hic .45s cubic-bezier(.3,1.8,.5,1) 2; } @keyframes hic { 40% { transform: translateY(-14%) scale(.96, 1.05); } }
.actor.clap .a-body { animation: kbxPop .5s var(--spring); }
.actor.rumble .a-body { animation: rumble .08s linear infinite; } @keyframes rumble { 50% { transform: translate(2px, -1px); } }
.actor.peek .a-body { animation: peek 1s var(--spring) both; } @keyframes peek { from { transform: translateX(-30%) rotate(-12deg); } to { transform: rotate(14deg); } }
.actor.peek-left .a-body { animation: peek 1s var(--spring) both; }
.actor.bye { opacity: 0; }
.a-bubble { position: absolute; left: 50%; bottom: 100%; transform: translate(calc(-50% + var(--nx, 0px)), 8px) scale(.8); opacity: 0; transform-origin: 50% 100%; white-space: nowrap; padding: 10px 16px; border-radius: 18px; background: #fff; color: #1b1535; font-weight: 750; font-size: 15px; box-shadow: 0 12px 30px rgba(10,4,40,.35); transition: opacity .25s, transform .4s var(--spring); }
.a-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; }
.a-bubble.on { opacity: 1; transform: translate(calc(-50% + var(--nx, 0px)), -4px) scale(1); }
.a-bubble.warn { background: #ffe4e6; color: #9f1239; } .a-bubble.warn::after { border-top-color: #ffe4e6; }
.a-bubble.code { background: #0b1220; color: #22d3ee; font-family: ui-monospace, monospace; } .a-bubble.code::after { border-top-color: #0b1220; }
.a-bubble.soft { background: rgba(255,255,255,.85); color: #4c1d95; }
.a-fx { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s; }
.a-fx.out { opacity: 0; }
.a-fx.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: conf var(--d) cubic-bezier(.25,.6,.4,1) both; }
@keyframes conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--w), 110vh) rotate(var(--r)); opacity: .9; } }
.a-fx.petals i { position: absolute; top: -30px; font-style: normal; font-size: 20px; animation: petal var(--d) ease-in both; }
@keyframes petal { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--w), 110vh) rotate(360deg); } }
.bloom { position: absolute; width: 0; height: 0; }
.bloom b { position: absolute; font-size: 34px; transform: rotate(var(--a)) translateY(0) scale(0); animation: bloom 1s var(--spring) var(--dl) forwards; }
@keyframes bloom { to { transform: rotate(var(--a)) translateY(-120px) rotate(calc(-1 * var(--a))) scale(1); } }
.a-fx.word { position: absolute; left: 0; right: 0; display: flex; justify-content: center; inset: auto 0 auto 0; }
.bigword text { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 190px; fill: transparent; stroke: url(#gw); stroke-width: 5; stroke-linejoin: round; stroke-dasharray: 2600; stroke-dashoffset: 2600; letter-spacing: -6px; }
.a-fx.word.draw text { animation: drawWord 2.4s ease-in-out forwards, fillWord .8s ease 2.3s forwards; }
@keyframes drawWord { to { stroke-dashoffset: 0; } }
@keyframes fillWord { to { fill: url(#gw); } }
.disco { position: absolute; inset: 0; }
.disco .ball { position: absolute; left: 50%; top: -10px; width: 90px; height: 90px; margin-left: -45px; border-radius: 50%; background: conic-gradient(from 0deg, #c4b5fd, #fff, #67e8f9, #f9a8d4, #fff, #c4b5fd); box-shadow: 0 0 40px rgba(196,181,253,.8); animation: ballIn .6s var(--spring) both, spin 3s linear infinite; }
@keyframes ballIn { from { transform: translateY(-120px); } }
.disco i { position: absolute; left: 50%; top: 40px; width: 140vmax; height: 60px; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(196,181,253,.35), transparent 70%); animation: beam 3s linear infinite; mix-blend-mode: screen; }
.disco i:nth-child(2) { --o: 30deg; } .disco i:nth-child(3) { --o: 90deg; background: linear-gradient(90deg, rgba(103,232,249,.32), transparent 70%); } .disco i:nth-child(4) { --o: 150deg; }
.disco i:nth-child(5) { --o: 210deg; background: linear-gradient(90deg, rgba(249,168,212,.32), transparent 70%); } .disco i:nth-child(6) { --o: 270deg; } .disco i:nth-child(7) { --o: 330deg; }
@keyframes beam { from { transform: rotate(var(--o)); } to { transform: rotate(calc(var(--o) + 360deg)); } }
.matrix { position: fixed; inset: 0; opacity: .85; transition: opacity .6s; }
.matrix.out { opacity: 0; }
.float-heart { position: absolute; font-size: 44px; animation: heartUp 3.4s ease-out forwards; }
@keyframes heartUp { 0% { transform: translate(-50%, 0) scale(.3); opacity: 0; } 15% { opacity: 1; transform: translate(-50%, -20px) scale(1.2); } 100% { transform: translate(-50%, -60vh) scale(1.6); opacity: 0; } }
.clap-burst { position: absolute; font-size: 30px; animation: rpop .6s cubic-bezier(.3,1.8,.5,1) both; }
.flame { position: absolute; width: 22px; height: 30px; margin: -26px 0 0 -11px; border: none; padding: 0; cursor: pointer; background: radial-gradient(ellipse at 50% 70%, #fff7c2 0 25%, #ffb020 45%, rgba(255,90,0,.0) 72%); border-radius: 50% 50% 45% 45%; filter: drop-shadow(0 0 8px rgba(255,170,40,.9)); animation: flameF .25s ease-in-out infinite alternate; pointer-events: auto; }
.flame::after { content: ""; position: absolute; inset: -14px; }
.flame.out { animation: none; background: none; filter: none; } .flame.out::before { content: "💨"; position: absolute; left: -4px; top: -10px; font-size: 18px; animation: heartUp 1.4s ease-out forwards; }
@keyframes flameF { to { transform: scale(.9, 1.1) rotate(3deg); } }
.a-fx.smoke i { position: absolute; bottom: 120px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.7); animation: smoke 1.6s ease-out both; }
@keyframes smoke { 0% { transform: scale(.4); opacity: .9; } 100% { transform: translateY(80px) scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kbx-body, .kbx-shadow, .fx, .bg-glow i, .actor .a-body { animation: none !important; } }

/* ---------- мобильная адаптация ---------- */
@media (max-width: 860px) {
  .sidebar { width: min(320px, 88vw); }
  .topbar { min-height: 56px; padding-left: 8px; }
  .messages { padding: 16px 12px 12px; }
  .w-stage { width: 184px; height: 184px; }
  .action { min-height: 72px; padding: 12px; }
}
.fx-sparkle { color: #fde68a; text-shadow: 0 0 10px rgba(253,230,138,.7); } .fx-ink { color: #a5b4fc; } .fx-flour { color: #fff7ed; } .fx-bubbles { color: #67e8f9; } .fx-scan { color: #facc15; } .fx-chalk { color: #e2e8f0; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .tc-id { font-size: 12px; color: var(--dim); }
.a-t { text-align: left; }
@media (min-width: 601px) { .sidebar .trial-badge:not(.top) { display: none !important; } }
@media (max-height: 960px) and (min-width: 861px) { .w-stage { width: 196px; height: 196px; } .v2w h2 { font-size: 34px; } .w-sub { margin-bottom: 16px !important; } .action { min-height: 72px; padding: 12px 16px; } }
/* док — в правом поле, не поверх текста */
@media (min-width: 1181px) { .kb-dock { right: max(8px, calc((100% - 760px) / 2 - 176px)); } }
.voice-pill.send, .voice-pill.busy { width: 44px; }
.plans-wrap > *, .help-wrap > * { min-width: 0; }
.plans-wrap, .help-wrap { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 480px) {
  .voice-pill .vp-label { display: none; } .voice-pill { width: 44px; padding: 0; justify-content: center; }
  .composer-bar { gap: 6px; } .mode-chip { padding: 0 12px; }
  .actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .action { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding: 12px; border-radius: 18px; }
  .a-ic { width: 40px; height: 40px; border-radius: 13px; } .a-go { display: none; }
  .a-t b { font-size: 14px; } .a-t small { font-size: 12px; }
  .w-stage { width: 152px; height: 152px; } .v2w h2 { font-size: 26px; } .w-sub { font-size: 14.5px; margin-bottom: 16px !important; }
  .kb-say { right: 0; transform: translateY(6px) scale(.9); width: max-content; max-width: 62vw; white-space: normal; border-radius: 16px 16px 4px 16px; }
  .kb-say.on { transform: none; }
  .tasks-top { padding: 16px 16px 8px; } .tasks-top h2 { font-size: 22px; } .tasks-top .btn { width: 100%; }
  .plan2 { padding: 20px; }
}
/* пока Ботик гуляет по странице — герой на приветствии «уходит» вместе с ним */
.w-stage .kbx, .kb-dock { transition: opacity .4s var(--ease), transform .45s var(--spring); }
body[class*="antic-"] .w-stage .kbx { opacity: 0; transform: scale(.85) translateY(10px); }

/* =====================================================================
   ТАРИФЫ v2: динамическое число тарифов, на телефоне — свайп-карусель
   ===================================================================== */
.plan-scroller { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.plan-dots { display: none; justify-content: center; gap: 8px; margin-top: -8px; }
.plan-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--s3); transition: width .3s var(--spring), background .3s; cursor: pointer; }
.plan-dots i.on { width: 24px; background: var(--grad); }
.p-ribbon.alt { background: linear-gradient(135deg, #f472b6, #fb923c); }
.trial-card.warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); }
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; background: var(--s1); z-index: 1; }
@media (max-width: 860px) {
  .plan-scroller { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 8px 16px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .plan-scroller::-webkit-scrollbar { display: none; }
  .plan-scroller .plan2 { flex: 0 0 min(80vw, 320px); scroll-snap-align: center; }
  .plan-scroller .plan2:hover { transform: none; }
  .plan-dots { display: flex; }
  .cmp { font-size: 13px; min-width: 520px; } .cmp th, .cmp td { padding: 10px 6px; }
}

/* =====================================================================
   МОБИЛЬНАЯ ВЕРСИЯ (главная): 320–860 px, iOS Safari, Android Chrome,
   Samsung Internet, Telegram in-app. Safe areas, dvh, клавиатура.
   ===================================================================== */
:root { --tabh: 64px; --kb: 0px; }
.tabbar, .bsheet, .bsheet-back { display: none; }
.tap-wave { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: currentColor; opacity: .18; pointer-events: none; animation: tapw .5s var(--ease) forwards; z-index: 0; }
@keyframes tapw { to { transform: scale(18); opacity: 0; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .topbar, .composer-card, .tabbar, .bsheet, .toast2, .action, .plan2, .pcard { background: var(--s1) !important; }
}
@media (max-width: 860px) {
  html, body { overscroll-behavior: none; }
  body { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
  .app { height: var(--app-height, 100dvh); }
  @supports not (height: 100dvh) { .app { height: var(--app-height, 100vh); } }
  .main { padding-bottom: calc(var(--tabh) + var(--safe-b)); transition: padding-bottom .25s var(--ease); }
  body.kb-open .main { padding-bottom: 0; }
  /* верх: учёт выреза / Dynamic Island */
  .topbar { padding: calc(6px + var(--safe-t)) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left)); min-height: calc(56px + var(--safe-t)); gap: 4px; }
  #menuBtn, #topTasks, #topProjects, #topNew { display: none !important; }
  .top-bot { width: 36px; height: 36px; }
  .topbar-title h1 { font-size: 16px; }
  /* нижняя панель под большой палец */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: calc(var(--tabh) + var(--safe-b)); padding: 0 max(4px, env(safe-area-inset-right)) var(--safe-b) max(4px, env(safe-area-inset-left));
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-top: 1px solid var(--line);
    transition: transform .28s var(--ease), opacity .2s; }
  body.kb-open .tabbar { transform: translateY(110%); opacity: 0; pointer-events: none; }
  .tb { position: relative; height: var(--tabh); min-width: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: none; background: none; color: var(--dim); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; overflow: hidden; -webkit-user-select: none; user-select: none; }
  .tb .ic { width: 24px; height: 24px; transition: transform .3s var(--spring), color .2s; }
  .tb.on { color: var(--text); } .tb.on .ic { color: var(--accent-ink); transform: translateY(-1px); }
  .tb.on::before { content: ""; position: absolute; top: 6px; width: 40px; height: 32px; border-radius: 12px; background: var(--soft); z-index: -1; }
  .tb.bump .ic { animation: tbBump .45s var(--spring); }
  @keyframes tbBump { 30% { transform: scale(.82); } 70% { transform: scale(1.12); } }
  .tb:active .ic { transform: scale(.88); }
  .tb-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
  .tb-plus { overflow: visible; }
  .tb-plus i { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(109,92,246,.5), inset 0 1px 0 rgba(255,255,255,.3); transform: translateY(-6px); transition: transform .3s var(--spring); }
  .tb-plus i .ic { width: 26px; height: 26px; stroke-width: 2.4; color: #fff !important; }
  .tb-plus.on::before { display: none; } .tb-plus.on i { transform: translateY(-6px) rotate(45deg); }
  .tb-plus:active i { transform: translateY(-4px) scale(.92); }
  /* поле ввода: крупные цели, у клавиатуры */
  .composer { padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left)); }
  body.kb-open .composer { padding-bottom: 8px; }
  .composer-card { border-radius: 24px; padding: 8px 8px 8px 14px; }
  .composer-card textarea { font-size: 16px; /* без авто-зума iOS */ max-height: 32dvh; }
  .round-btn { width: 44px; height: 44px; }
  .ideas-wrap { display: none; }
  .tasks-pill { margin: 0 0 6px 12px; align-self: flex-start; max-width: calc(100% - 96px); min-height: 36px; font-size: 13px; }
  .jump-down { bottom: calc(var(--tabh) + var(--safe-b) + 120px); }
  body.kb-open .jump-down { bottom: 120px; }
  .messages { padding: 16px max(12px, env(safe-area-inset-right)) 72px max(12px, env(safe-area-inset-left)); }
  .panel-view, .projects { padding-bottom: 24px; }
  /* Ботик сидит на краю поля ввода и не закрывает текст */
  .composer > .kb-dock { position: absolute; right: 18px; bottom: calc(100% - 22px); width: 68px; height: 68px; z-index: 5; }
  .composer > .kb-dock .kb-say { right: 4px; bottom: calc(100% - 2px); left: auto; transform: translateY(6px) scale(.9); transform-origin: 90% 100%; max-width: min(64vw, 260px); width: max-content; white-space: normal; font-size: 13px; }
  .composer > .kb-dock .kb-say.on { transform: none; }
  body:not([data-view="chat"]) .composer > .kb-dock { opacity: 0; pointer-events: none; }
  body[data-view="chat"] .messages:has(.v2w) ~ .composer > .kb-dock { opacity: 0; pointer-events: none; }
  body.kb-open .composer > .kb-dock { width: 52px; height: 52px; bottom: calc(100% - 14px); }
  /* сайдбар-«Ещё» поверх панели */
  .sidebar { z-index: 60; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
  .sidebar-backdrop { z-index: 55; }
  /* тосты под вырезом */
  .toasts { top: calc(8px + var(--safe-t)); }
  /* приветствие */
  .welcome.v2w { margin-top: 1vh; padding-bottom: 16px; }
  .w-more { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 16px -12px 12px; padding: 2px 12px; scrollbar-width: none; }
  .w-more::-webkit-scrollbar { display: none; } .w-more .chip { flex-shrink: 0; min-height: 40px; }
  .w-tip { font-size: 13px; }
  /* задачи */
  .tasks-view { padding-bottom: 16px; }
  .task-card.v2 { padding: 14px; } .task-card.v2.st-running { padding-right: 76px; }
  .tc-bot { width: 60px; height: 60px; }
  .task-modal, .onb-modal { width: 100vw; max-width: 100vw; border-radius: 28px 28px 0 0 !important; position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: 0; padding-bottom: calc(24px + var(--safe-b)) !important; max-height: 92dvh; overflow-y: auto; animation: sheetUp .38s var(--spring) both; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  .tm-bot { width: 64px; height: 64px; }
  /* шторка снизу */
  .bsheet-back { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(4,2,16,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
  .bsheet-back.on { opacity: 1; } .bsheet-back[hidden] { display: none; }
  .bsheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; height: var(--sh-h, 58dvh); max-height: calc(100dvh - var(--safe-t) - 8px);
    background: var(--s1); border-radius: 28px 28px 0 0; box-shadow: 0 -16px 48px rgba(4,2,16,.5); border-top: 1px solid var(--line2);
    transform: translateY(105%); transition: transform .42s cubic-bezier(.2,.9,.25,1.05), height .35s var(--ease); padding-bottom: var(--safe-b); touch-action: pan-y; }
  .bsheet[hidden] { display: none; }
  .bsheet.on { transform: translateY(0); }
  .bsheet.dragging { transition: none; }
  .sh-grab { display: grid; place-items: center; height: 28px; flex-shrink: 0; cursor: grab; }
  .sh-grab i { width: 40px; height: 5px; border-radius: 99px; background: var(--s3); }
  .sh-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; -webkit-overflow-scrolling: touch; }
  .sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  .sh-head h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; } .sh-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
  .sh-head .btn { flex-shrink: 0; min-height: 44px; }
  .sh-sec { font-size: 12px; font-weight: 750; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin: 8px 4px; }
  .sh-list { display: grid; gap: 8px; margin-bottom: 16px; }
  .sh-list .task-card { width: 100%; }
  .sh-all { width: 100%; min-height: 48px; }
  .sh-empty { text-align: center; padding: 8px 8px 16px; } .sh-empty-bot { width: 104px; height: 104px; margin: 0 auto 8px; }
  .sh-empty p { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
  .sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sh-act { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; min-height: 96px; border-radius: 20px; border: 1px solid var(--line); background: var(--s2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 650; text-align: center; line-height: 1.25; cursor: pointer; transition: transform .2s var(--spring); animation: rise .4s var(--ease) both; }
  .sh-act:active { transform: scale(.94); }
  .sh-act b { font-weight: 650; }
  .sh-install { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 14px 16px; border-radius: 20px; border: 1px dashed var(--line2); background: var(--glass2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
  .sh-install > span:first-child { font-size: 26px; } .sh-install b { display: block; font-size: 15px; } .sh-install small { color: var(--muted); font-size: 12.5px; }
  /* шалости на телефоне: поменьше и не под пальцем у ввода */
  .actor { --s: 120px; }
  .a-bubble { font-size: 13.5px; padding: 8px 12px; width: max-content; max-width: min(70vw, 260px); white-space: normal; text-align: center; }
  .bigword text { stroke-width: 7; }
}
/* маленькие телефоны (320–375) */
@media (max-width: 380px) {
  :root { --tabh: 60px; }
  .tb { font-size: 10.5px; } .tb .ic { width: 22px; height: 22px; } .tb-plus i { width: 48px; height: 48px; border-radius: 16px; }
  #modeLabel { display: none; } .mode-chip { padding: 0 10px; gap: 4px; }
  .round-btn { width: 42px; height: 42px; } .composer-bar { gap: 4px; }
  .actions { gap: 8px; } .action { padding: 10px; } .a-t small { display: none; }
  .w-stage { width: 128px; height: 128px; } .v2w h2 { font-size: 23px; }
  .sh-grid { grid-template-columns: repeat(2, 1fr); }
  .composer > .kb-dock { width: 58px; height: 58px; right: 12px; }
  .plan-scroller .plan2 { flex-basis: 84vw; }
  .trial-badge.top { display: none !important; }
}
@media (max-width: 340px) { .tb span { display: none; } .tb { gap: 0; } }
/* телефон боком / низкий экран */
@media (max-width: 960px) and (max-height: 480px) and (orientation: landscape) {
  :root { --tabh: 52px; }
  .tb span { display: none; } .tb-plus i { width: 44px; height: 44px; transform: none; }
  .w-stage { display: none; } .composer > .kb-dock { display: none; }
}
/* очень широкий складной / планшет-портрет: шторка по центру */
@media (min-width: 600px) and (max-width: 860px) { .bsheet { left: 50%; right: auto; width: 560px; margin-left: -280px; } .sh-grid { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .bsheet, .tabbar, .tb .ic { transition: none !important; } .tap-wave { display: none; } }
/* аккаунт в профиле */
.acc-card { display: grid; gap: 8px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--s2); }
.acc-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .acc-row b { font-size: 15px; } .acc-row small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.acc-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--s3); font-size: 18px; } .acc-ic.tg { background: rgba(42,171,238,.18); }
.acc-ok { color: var(--ok); font-weight: 800; font-size: 18px; padding: 0 8px; }
.acc-row .btn { flex-shrink: 0; min-height: 40px; }
.acc-form { display: grid; gap: 8px; padding: 0 4px; } .acc-form input { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--s2); color: var(--text); }
.acc-wait { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--soft); font-size: 14px; }
.spin-dot { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--accent-ink); border-right-color: transparent; animation: spin .8s linear infinite; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
@media (max-width: 420px) { .acc-row { flex-wrap: wrap; } .acc-row .btn { width: 100%; } }
@media (max-width: 860px) { .cmp-scroll { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } .cmp-card h3::after { content: " · листай →"; font-size: 12px; font-weight: 600; color: var(--dim); } }
.acc-link { align-self: flex-start; font-size: 13px; padding: 4px 8px; }
.acc-out { width: 100%; color: var(--muted); }
.acc-link-box { padding: 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(42,171,238,.12), rgba(139,92,246,.12)); border: 1px solid rgba(42,171,238,.3); animation: rise .4s var(--ease) both; }
.lk-steps { display: grid; gap: 12px; }
.lk-step { display: flex; gap: 12px; align-items: center; } .lk-step .n { width: 28px; height: 28px; border-radius: 9px; background: #2aabee; color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.lk-step b { display: block; font-size: 15px; } .lk-step small { color: var(--muted); font-size: 12.5px; }
.tg-open { min-height: 52px; border-radius: 16px; background: #2aabee; color: #fff !important; font-weight: 750; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; box-shadow: 0 8px 22px rgba(42,171,238,.3); }
.lk-or { text-align: center; font-size: 12.5px; color: var(--dim); }
.lk-code { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 16px; border: 1px dashed var(--line2); background: var(--s1); color: var(--text); font: inherit; cursor: pointer; }
.lk-code code { font-size: 20px; font-weight: 800; letter-spacing: .08em; color: var(--accent-ink); } .lk-code span { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.lk-wait { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.lk-have summary { cursor: pointer; font-size: 13px; color: var(--accent-ink); padding: 4px 0; } .lk-have form { margin-top: 8px; }
.acc-form { display: grid; gap: 8px; }
@media (max-width: 480px) {
  .cmp { min-width: 0; width: max-content; }
  .cmp th:first-child, .cmp td:first-child { width: 128px; max-width: 128px; white-space: normal; font-size: 12.5px; line-height: 1.25; }
  .cmp th:not(:first-child), .cmp td:not(:first-child) { min-width: 64px; }
}
.acc-card .acc-link { justify-self: start; background: transparent !important; border: 0; box-shadow: none; color: var(--pc, #a78bfa); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 8px; border-radius: 10px; cursor: pointer; text-align: left; line-height: 1.35; }
.acc-card .acc-link:hover { background: var(--soft) !important; }
.acc-form input { width: 100%; box-sizing: border-box; }

/* voice settings: groups + emotion chips (synced with bot) */
.voice-card .vo-gt{font-size:12.5px;font-weight:700;opacity:.8;margin:10px 0 6px;text-transform:none}
.voice-card .vo-styles{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.voice-card .vo-sty{border:1px solid var(--line,rgba(255,255,255,.12));background:transparent;color:inherit;border-radius:999px;padding:7px 12px;font:inherit;font-size:13px;cursor:pointer}
.voice-card .vo-sty.on{background:linear-gradient(135deg,#8b5cf6,#38bdf8);border-color:transparent;color:#fff;font-weight:700}
