/* ВШИТ В БИНАРНИК (include_str!). Правка на диске НЕ ВИДНА без пересборки:
   cargo build -p monolith-studio --profile release-studio && systemctl restart monolith-studio
   Подробности — web/ЧИТАЙ_ПЕРЕД_ПРАВКОЙ.md */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  background: #0f1115;
  color: #e0e0e0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.app {
  display: flex;
  flex-direction: row;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* === Sidebar === */
.sidebar {
  width: 0;
  height: 100%;
  background: #161922;
  border-right: 1px solid #232734;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.sidebar.open { width: 280px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #232734;
  gap: 8px;
}

.sidebar-brand {
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
}

.sidebar-actions {
  display: flex;
  gap: 4px;
}

.sidebar-search {
  padding: 8px 12px;
  border-bottom: 1px solid #232734;
}

#searchInput {
  width: 100%;
  padding: 8px 12px;
  background: #1f2330;
  border: 1px solid #2a2f3d;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}
#searchInput:focus { border-color: #4a9eff; }

.stream-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.stream-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.stream-item:hover { background: #1a1d28; }
.stream-item.active {
  background: #1f2330;
  border-left-color: #4a9eff;
}

.stream-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #2a2f3d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #aaa;
  flex-shrink: 0;
}

.stream-info {
  flex: 1;
  min-width: 0;
}

.stream-name {
  font-size: 14px;
  font-weight: 500;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.stream-busy-dot, .stream-new-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.stream-busy-dot { background: #4a9eff; animation: pulse 1s ease-in-out infinite; }
.stream-new-dot { background: #4ade80; }

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.stream-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.stream-item:hover .stream-actions,
.stream-item.active .stream-actions { opacity: 1; }

.stream-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 26px; height: 26px;
  border-radius: 6px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.stream-action-btn:hover { background: #2a2f3d; color: #e0e0e0; }
.stream-action-btn.del:hover { background: #f87171; color: #fff; }

/* === Main area === */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #161922;
  border-bottom: 1px solid #232734;
  padding-top: calc(8px + env(safe-area-inset-top, 0));
}

.stream-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 18px;
  color: #aaa;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.icon-btn:hover, .icon-btn:active { background: #232734; color: #e0e0e0; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 12px;
  padding: 24px;
}
.welcome h2 { font-size: 26px; font-weight: 600; color: #f0f0f0; }

.muted { color: #888; font-size: 14px; line-height: 1.5; }
.muted.small { font-size: 12px; }

/* Messages */
.msg {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  max-width: 96%;
  word-wrap: break-word;
}
.msg-assistant { max-width: 98%; }
.msg-user { align-self: flex-end; align-items: flex-end; }
.msg-assistant { align-self: flex-start; align-items: flex-start; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  position: relative;
}
.msg-assistant .msg-bubble { padding-bottom: 34px; }
.msg-user .msg-bubble { background: #4a9eff; color: #fff; border-bottom-right-radius: 4px; }
.msg-assistant .msg-bubble { background: #1f2330; color: #e0e0e0; border-bottom-left-radius: 4px; }

.msg-time {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
  padding: 0 4px;
}
.msg-play-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(255,255,255,0.10);
  border: none;
  color: #ddd;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.msg-play-btn:active { background: rgba(255,255,255,0.22); }

/* Composer */
.composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px;
  background: #161922;
  border-top: 1px solid #232734;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
}

#msgInput {
  flex: 1;
  resize: none;
  background: #1f2330;
  border: 1px solid #2a2f3d;
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  max-height: 140px;
  outline: none;
}
#msgInput:focus { border-color: #4a9eff; }
#msgInput::placeholder { color: #555; }

.mic { font-size: 22px; }

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.16);
  border: 1px solid rgba(74, 158, 255, 0.35);
  color: #6ab4ff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.15s, transform 0.1s, color 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.send-btn:hover { background: rgba(74, 158, 255, 0.26); color: #9ccdff; }
.send-btn:active { transform: scale(0.92); background: rgba(74, 158, 255, 0.36); }

/* Buttons */
.primary, .secondary {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}
.primary { background: #4a9eff; color: #fff; }
.secondary { background: #2a2f3d; color: #e0e0e0; margin-top: 6px; }

/* Tool events */
.tool-event {
  margin: 6px 0;
  padding: 6px 12px;
  background: #1a1d28;
  border-left: 3px solid #4a9eff;
  border-radius: 4px;
  font-size: 12px;
  color: #aaa;
  font-family: "SF Mono", Consolas, monospace;
}
.tool-event .tool-head { font-weight: 600; color: #4a9eff; margin-bottom: 2px; cursor: pointer; user-select: none; }
.tool-event .tool-caret { display: inline-block; transition: transform .15s; font-size: 10px; color: #666; }
.tool-event:not(.tool-collapsed) .tool-caret { transform: rotate(90deg); }
.tool-event .tool-body { color: #888; }
.tool-event.tool-collapsed .tool-body { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.tool-event:not(.tool-collapsed) .tool-body { white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.tool-event.tool-result { border-left-color: #4ade80; }
.tool-event.tool-result .tool-head { color: #4ade80; }
.messages.hide-service .tool-event { display: none; }
.icon-btn.service-off { opacity: 0.4; }

/* Сердцебиение */
.hb-pop-timer { font-weight: 400; opacity: 0.75; font-variant-numeric: tabular-nums; }
#btnHeartbeat { filter: grayscale(1) opacity(0.55); }
#btnHeartbeat.hb-on { filter: none; animation: hb-pulse 1.4s ease-in-out infinite; }
@keyframes hb-pulse {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.18); }
  60% { transform: scale(1); }
}
.hb-popover {
  z-index: 9999 !important;
  position: fixed;
  z-index: 1000;
  background: #1e1e24;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  min-width: 220px;
}
.hb-pop-title { font-size: 12px; color: #aaa; margin-bottom: 8px; }
.hb-pop-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hb-pop-opt, .hb-pop-off {
  background: #2a2a33; color: #ddd; border: 1px solid #3a3a44;
  border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer;
}
.hb-pop-off { width: 100%; }
.hb-pop-opt:hover, .hb-pop-off:hover { background: #34343f; }
.hb-pop-active { background: #b3263b; border-color: #d0405a; color: #fff; }

/* Drawer (settings) */
.drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  max-width: 100%;
  background: #161922;
  border-left: 1px solid #232734;
  z-index: 30;
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.drawer-hidden { transform: translateX(110%); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #232734; }
.drawer-header h3 { font-size: 17px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; }

.setting-group { display: flex; flex-direction: column; gap: 6px; }
.setting-label { font-size: 13px; color: #999; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

#apiKeyInput, #providerSelect, #modelSelect {
  padding: 10px 14px;
  background: #1f2330;
  border: 1px solid #2a2f3d;
  border-radius: 8px;
  outline: none;
}

.toggle { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.toggle input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #4a9eff; }

.overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); z-index: 25; transition: opacity 0.2s; }
.overlay-hidden { opacity: 0; pointer-events: none; }

/* === Mobile: sidebar полный экран === */
@media (max-width: 767px) {
  .sidebar {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 100%;
    z-index: 40;
    transition: transform 0.25s ease;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
}

@media (min-width: 768px) {
  .sidebar.open { width: 300px; }
}
@media (min-width: 1024px) {
  .sidebar.open { width: 340px; }
}

/* === Markdown rendering === */
.msg-bubble p { margin: 0 0 8px 0; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble h1, .msg-bubble h2, .msg-bubble h3, .msg-bubble h4 { margin: 12px 0 6px 0; font-weight: 600; }
.msg-bubble h1 { font-size: 20px; }
.msg-bubble h2 { font-size: 18px; }
.msg-bubble h3 { font-size: 16px; }
.msg-bubble ul, .msg-bubble ol { margin: 4px 0 8px 24px; }
.msg-bubble li { margin: 2px 0; }
.msg-bubble code {
  background: #0d0f14;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 13px;
}
.msg-bubble pre {
  background: #0d0f14;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0;
  overflow-x: auto;
  font-size: 13px;
  position: relative;
  border: 1px solid #232734;
}
.msg-bubble pre code {
  background: transparent;
  padding: 0;
  font-family: "SF Mono", Consolas, monospace;
}
.msg-bubble blockquote {
  border-left: 3px solid #4a9eff;
  padding-left: 12px;
  margin: 8px 0;
  color: #aaa;
}
.msg-bubble a {
  color: #4a9eff;
  text-decoration: none;
}
.msg-bubble a:hover { text-decoration: underline; }

.msg-bubble table { display: block; width: max-content; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; margin: 8px 0; font-size: 13px; white-space: normal; }
.msg-bubble th, .msg-bubble td { border: 1px solid #2a2f3d; padding: 6px 10px; text-align: left; white-space: nowrap; }
.msg-bubble th { background: #1a1d28; }

.msg-bubble img { max-width: 100%; border-radius: 8px; margin: 6px 0; cursor: pointer; }

.code-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #aaa;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.code-copy:hover { background: #2a2f3d; color: #fff; }

.html-preview-btn {
  position: absolute;
  top: 6px;
  right: 38px;
  background: rgba(74,158,255,0.2);
  border: 1px solid #4a9eff;
  color: #4a9eff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}

/* === Fullscreen image / html preview === */
.img-fullscreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.img-fullscreen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
  background: #0a0c11;
  border-bottom: 1px solid #232734;
  position: relative;
  z-index: 2;
}
.img-fullscreen-name { color: #aaa; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-fullscreen-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 12px;
}
.img-fullscreen-btn:active { background: rgba(255,255,255,0.3); }
.img-fullscreen img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.img-fullscreen iframe { flex: 1; min-height: 0; border: none; background: #fff; }

/* === Files в чате === */
.msg-file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0d0f14;
  border: 1px solid #2a2f3d;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px 0;
  cursor: pointer;
  min-width: 220px;
  max-width: 340px;
}
.msg-file:hover { border-color: #4a9eff; }
.msg-file-icon { font-size: 28px; }
.msg-file-info { flex: 1; min-width: 0; }
.msg-file-name { font-size: 14px; font-weight: 500; color: #e0e0e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-file-meta { font-size: 12px; color: #666; }
.chat-img { max-width: 100%; max-height: 60vh; border-radius: 10px; margin: 4px 0; cursor: pointer; display: block; }
.msg-img-caption { font-size: 12px; color: #888; margin-top: 2px; }

/* === Active UI === */
.aui-block {
  margin: 8px 0;
  padding: 12px;
  background: #1a1d28;
  border: 1px solid #2a2f3d;
  border-left: 3px solid #4a9eff;
  border-radius: 8px;
  max-width: 460px;
}
.aui-text {
  color: #c0c0c0;
  font-size: 14px;
  margin-bottom: 10px;
}
.aui-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.aui-btn {
  background: #2a2f3d;
  border: 1px solid #3a4050;
  color: #e0e0e0;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.aui-btn:hover { background: #353a4a; border-color: #4a9eff; }
.aui-btn:active { transform: scale(0.97); }
.aui-btn-yes { background: #1f3a2e; border-color: #2d6447; color: #4ade80; }
.aui-btn-no { background: #3a1f1f; border-color: #6e2d2d; color: #f87171; }
.aui-btn-submit { background: #2552a1; border-color: #4a9eff; color: #fff; margin-top: 8px; }
.aui-btn-other { background: transparent; color: #888; border-color: #2a2f3d; }

.aui-select {
  width: 100%;
  background: #1f2330;
  border: 1px solid #2a2f3d;
  border-radius: 6px;
  padding: 8px 12px;
  color: #e0e0e0;
  font-size: 14px;
}

.aui-cb-cont {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.aui-cb {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.aui-cb input { width: 16px; height: 16px; accent-color: #4a9eff; }

.aui-text-input {
  width: 100%;
  background: #1f2330;
  border: 1px solid #2a2f3d;
  border-radius: 6px;
  padding: 8px 12px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
  margin-bottom: 8px;
}
.aui-text-input:focus { border-color: #4a9eff; }

.aui-responded {
  border-left-color: #4ade80;
}
.aui-result {
  color: #4ade80;
  font-size: 14px;
  font-weight: 500;
  padding: 2px 0;
}

.aui-error {
  color: #f87171;
  font-size: 13px;
}

/* === Фикс overflow для code-блоков === */
.msg { min-width: 0; }
.msg-bubble { min-width: 0; max-width: 100%; overflow: hidden; }
.msg-bubble pre { max-width: 100%; overflow-x: auto; }
.msg-bubble pre code { white-space: pre; }

/* === Code header (lang + actions) === */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0a0c11;
  border: 1px solid #232734;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 8px 4px 12px;
  margin-top: 8px;
  font-size: 11px;
  color: #888;
}
.code-header + pre {
  border-radius: 0 0 8px 8px !important;
  border-top: none !important;
  margin-top: 0 !important;
}
.code-lang {
  font-family: "SF Mono", Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.code-header-actions { display: flex; gap: 2px; }
.code-action-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  width: 26px; height: 26px;
  border-radius: 4px;
  font-size: 14px;
}
.code-action-btn:hover { background: #2a2f3d; color: #fff; }

/* === HTML preview block === */
.code-block-html {
  background: #0d0f14;
  border: 1px solid #232734;
  border-radius: 8px;
  margin: 8px 0;
  overflow: hidden;
  max-width: 100%;
}
.code-block-tabs {
  display: flex;
  align-items: center;
  background: #0a0c11;
  padding: 4px 6px;
  gap: 4px;
  border-bottom: 1px solid #232734;
}
.code-tab {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.code-tab:hover { background: #1a1d28; color: #ccc; }
.code-tab-active { background: #4a9eff; color: #fff; }
.code-block-actions { margin-left: auto; display: flex; gap: 2px; }

.code-preview-box { background: #fff; min-height: 240px; max-height: 60vh; overflow: hidden; }
.code-preview-box iframe { width: 100%; height: 60vh; min-height: 240px; border: none; background: #fff; }
.code-raw-box pre { margin: 0 !important; border-radius: 0 !important; border: none !important; }

/* === Code fullscreen === */
.code-fullscreen { z-index: 1001; }

/* === Modal (общий) для add workspace и т.д. === */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal[hidden] { display: none !important; }
.modal-content {
  background: #161922;
  border: 1px solid #232734;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 460px;
  display: flex; flex-direction: column; gap: 10px;
}
.modal-content h3 { font-size: 17px; font-weight: 600; }
.modal-content label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #aaa; }
.modal-content input, .modal-content textarea {
  background: #1f2330; border: 1px solid #2a2f3d; border-radius: 8px;
  padding: 10px 12px; color: #e0e0e0; font-size: 14px; outline: none;
}
.modal-content input:focus { border-color: #4a9eff; }
.modal-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }

/* Workspace list в settings */
.ws-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #1f2330; border: 1px solid #2a2f3d; border-radius: 8px;
  padding: 8px 10px;
}
.ws-item-name { color: #e0e0e0; font-weight: 500; }
.ws-item-url { font-size: 11px; color: #666; }
.ws-item-actions { display: flex; gap: 4px; }
.ws-item-actions button { background: transparent; border: none; color: #888; cursor: pointer; padding: 4px; }
.ws-item-actions button:hover { color: #f87171; }


/* === Status bar (золотая полоска как в Legion) === */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(90deg, #3d2f0a 0%, #5a4513 50%, #3d2f0a 100%);
  border-top: 1px solid #b8860b;
  border-bottom: 1px solid #b8860b;
  color: #ffd866;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.status-bar[hidden] { display: none !important; }
.status-bar:hover { background: linear-gradient(90deg, #4a3a0d 0%, #6e5417 50%, #4a3a0d 100%); }

.status-bar-spinner {
  width: 14px; height: 14px;
  border: 2px solid #b8860b;
  border-top-color: #ffd866;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.status-bar-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-bar-hint {
  font-size: 11px;
  color: #b8860b;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .status-bar-hint { display: none; }
}


/* === Library === */
.lib-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid #1a1d28;
}
.lib-item:hover { background: #1a1d28; }
.lib-item-icon { font-size: 22px; opacity: 0.7; }
.lib-item-name { flex: 1; font-size: 14px; }
.lib-item-meta { font-size: 11px; color: #666; }
.lib-item-actions { display: flex; gap: 4px; opacity: 0; }
.lib-item:hover .lib-item-actions { opacity: 1; }
.lib-item-actions button { background: transparent; border: none; color: #888; padding: 4px 8px; cursor: pointer; font-size: 14px; }
.lib-item-actions button:hover { color: #f87171; }

.lib-viewer {
  padding: 16px;
  overflow-y: auto;
  font-family: -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
.lib-viewer pre {
  background: #0d0f14;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 13px;
}
.lib-viewer code { background: #0d0f14; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.lib-viewer h1, .lib-viewer h2, .lib-viewer h3 { margin: 12px 0 8px; font-weight: 600; }
.lib-viewer table { border-collapse: collapse; margin: 8px 0; }
.lib-viewer th, .lib-viewer td { border: 1px solid #2a2f3d; padding: 6px 10px; }
.lib-viewer th { background: #1a1d28; }


/* === Attachments bar (preview before send) === */
.attachments-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
  background: #161922;
  border-top: 1px solid #232734;
}
.attachments-bar[hidden] { display: none !important; }
.attach-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1f2330;
  border: 1px solid #2a2f3d;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: #e0e0e0;
  max-width: 240px;
}
.attach-item .ai-icon { font-size: 16px; flex-shrink: 0; }
.attach-item .ai-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.attach-item .ai-size { color: #666; font-size: 11px; flex-shrink: 0; }
.attach-item .ai-x { background: transparent; border: none; color: #888; cursor: pointer; padding: 0 4px; font-size: 14px; }
.attach-item .ai-x:hover { color: #f87171; }

/* === Mic recording indicator (поверх textarea) === */
.msg-input-wrap { position: relative; flex: 1; display: flex; }
.msg-input-wrap > textarea { flex: 1; }
.mic-wave[hidden] { display: none !important; }
.mic-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(239,68,68,0.12);
  border-radius: 8px;
  pointer-events: none;
  animation: mw-bg-pulse 1.2s ease-in-out infinite;
}
@keyframes mw-bg-pulse {
  0%, 100% { background: rgba(239,68,68,0.10); }
  50%      { background: rgba(239,68,68,0.22); }
}
.mic-wave-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,0.7);
  animation: mw-blink 0.9s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes mw-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
.mic-wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  flex: 1;
  justify-content: center;
}
.mic-wave-bars span {
  display: inline-block;
  width: 3px;
  height: 6px;
  background: #ef4444;
  border-radius: 2px;
  transform-origin: 50% 50%;
  animation: mw-bars 0.9s ease-in-out infinite;
}
.mic-wave-bars span:nth-child(1)  { animation-delay: 0.00s; }
.mic-wave-bars span:nth-child(2)  { animation-delay: 0.07s; }
.mic-wave-bars span:nth-child(3)  { animation-delay: 0.14s; }
.mic-wave-bars span:nth-child(4)  { animation-delay: 0.21s; }
.mic-wave-bars span:nth-child(5)  { animation-delay: 0.28s; }
.mic-wave-bars span:nth-child(6)  { animation-delay: 0.35s; }
.mic-wave-bars span:nth-child(7)  { animation-delay: 0.42s; }
.mic-wave-bars span:nth-child(8)  { animation-delay: 0.35s; }
.mic-wave-bars span:nth-child(9)  { animation-delay: 0.28s; }
.mic-wave-bars span:nth-child(10) { animation-delay: 0.21s; }
.mic-wave-bars span:nth-child(11) { animation-delay: 0.14s; }
.mic-wave-bars span:nth-child(12) { animation-delay: 0.07s; }
.mic-wave-bars span:nth-child(13) { animation-delay: 0.00s; }
@keyframes mw-bars {
  0%, 100% { height: 6px; opacity: 0.55; }
  50%      { height: 22px; opacity: 1; }
}
.mic-wave-label {
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

/* === Workspace Status panel === */
.aws-fab {
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(99,102,241,0.35);
  color: #a5b4fc;
  font-size: 18px;
}
.aws-fab:hover { background: rgba(99,102,241,0.32); color: #c7d2fe; }
.aws-modal[hidden] { display: none !important; }
.aws-modal {
  position: fixed;
  top: 56px;
  right: 12px;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  background: rgba(18, 18, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 12px;
  z-index: 901;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
}
.aws-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(99,102,241,0.18);
}
.aws-title { flex: 1; font-size: 14px; font-weight: 600; color: #c7d2fe; }
.aws-tabs { display: flex; gap: 2px; padding: 8px 8px 0; flex-wrap: wrap; }
.aws-tab {
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.18);
  color: #a5b4fc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.aws-tab.active { background: rgba(99,102,241,0.32); color: #fff; border-color: rgba(99,102,241,0.6); }
.aws-body {
  padding: 12px 14px;
  font-size: 13px;
  color: #e0e0e0;
  white-space: pre-wrap;
  overflow-y: auto;
  flex: 1;
  min-height: 140px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  line-height: 1.5;
}

/* === Кнопка прокрутки вниз (как в Legion) === */
.scroll-down-btn[hidden] { display: none !important; }
.scroll-down-btn {
  position: fixed;
  bottom: 96px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(31,35,48,0.85);
  border: 1px solid rgba(255,255,255,0.12);
  color: #c7d2fe;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.scroll-down-btn:hover { background: rgba(40,45,60,0.95); color: #fff; }
.scroll-down-btn:active { transform: scale(0.92); }

/* === Context menu (по клику на ctxMeter) === */
.ctx-menu[hidden] { display: none !important; }
.ctx-menu {
  position: fixed;
  top: 56px;
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  background: rgba(18, 18, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124,130,255,0.3);
  border-radius: 14px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  overflow: hidden;
  animation: ctxmenu-in 0.16s ease-out;
}
@keyframes ctxmenu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ctx-menu-header {
  display: flex; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(124,130,255,0.15);
}
.ctx-menu-title { flex: 1; font-size: 14px; font-weight: 600; color: #e2e3ff; }
.ctx-menu-stats {
  padding: 10px 14px 6px;
  font-size: 12px;
  color: #9094c8;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.ctx-menu-action {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(124,130,255,0.1);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 14px;
  transition: background 0.15s;
}
.ctx-menu-action:hover { background: rgba(124,130,255,0.10); }
.ctx-menu-action:active { background: rgba(124,130,255,0.18); }
.ctx-menu-action.danger { color: #fda4af; }
.ctx-menu-action.danger:hover { background: rgba(239,68,68,0.12); }
.ctx-menu-action.danger:active { background: rgba(239,68,68,0.22); }
.ctx-menu-icon { font-size: 22px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.ctx-menu-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ctx-menu-label { font-weight: 600; font-size: 14px; }
.ctx-menu-sub { font-size: 12px; color: #9094c8; line-height: 1.4; }
.ctx-menu-action.danger .ctx-menu-sub { color: #fca5a5; opacity: 0.75; }

/* Подложка для модалки подтверждения */
.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1500;
  display: flex; align-items: center; justify-content: center;
  animation: bd-in 0.15s ease-out;
}
@keyframes bd-in { from {opacity:0;} to {opacity:1;} }
.confirm-modal {
  width: min(360px, calc(100vw - 32px));
  background: #14172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.confirm-modal h3 { margin: 0 0 8px 0; font-size: 17px; color: #f5f5ff; }
.confirm-modal p { margin: 0 0 18px 0; font-size: 14px; color: #b0b3d3; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-btn {
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.confirm-btn:hover { background: rgba(255,255,255,0.06); }
.confirm-btn.danger {
  background: rgba(239,68,68,0.85);
  border-color: rgba(239,68,68,0.6);
  color: #fff;
  font-weight: 600;
}
.confirm-btn.danger:hover { background: rgba(239,68,68,1); }

/* === Кнопка очистки textarea === */
.msg-input-wrap > textarea { padding-right: 34px; }
.msg-input-clear[hidden] { display: none !important; }
.msg-input-clear {
  position: absolute;
  top: 8px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: none;
  color: #aaa;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.msg-input-clear:hover { background: rgba(255,255,255,0.20); color: #fff; }
.msg-input-clear:active { transform: scale(0.92); }

/* === Lock screen === */
.lock-screen[hidden] { display: none !important; }
.lock-screen {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, #0c0e16 0%, #14172a 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lock-content { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lock-logo { font-size: 56px; line-height: 1; }
.lock-title { font-size: 22px; font-weight: 700; color: #e8eaff; letter-spacing: 0.5px; }
.lock-sub { font-size: 14px; color: #8e92b3; margin-bottom: 8px; }
.lock-pin-row { display: flex; gap: 14px; min-height: 16px; }
.lock-pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.25);
  transition: background 0.15s, border-color 0.15s;
}
.lock-pin-dot.filled { background: #a5b4fc; border-color: #a5b4fc; }
.lock-error { font-size: 13px; color: #fda4af; min-height: 18px; }
.lock-keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 10px;
  margin-top: 8px;
}
.lock-key {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e8eaff;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, transform 0.05s;
}
.lock-key:hover { background: rgba(255,255,255,0.12); }
.lock-key:active { background: rgba(255,255,255,0.20); transform: scale(0.93); }
.lock-key.action { background: transparent; border: none; font-size: 18px; color: #8e92b3; }
.lock-key.action:active { color: #fff; }
.lock-bio-btn {
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 22px;
  background: rgba(124,130,255,0.18);
  border: 1px solid rgba(124,130,255,0.35);
  color: #c7d2fe;
  font-size: 14px;
  cursor: pointer;
}
.lock-bio-btn:hover { background: rgba(124,130,255,0.30); color: #fff; }

/* === Provider settings row + modal === */
.provider-row { display: flex; gap: 6px; align-items: center; }
.provider-row select { padding: 6px 8px; }
.provider-row .icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.provider-card { max-width: 480px; width: calc(100% - 24px); }
.provider-form { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.provider-form input, .provider-form textarea { padding: 8px 10px; background: #1a1c20; color: #e6e6e6; border: 1px solid #2a2d33; border-radius: 6px; font-family: inherit; font-size: 13px; }
.provider-form textarea { resize: vertical; min-height: 80px; font-family: monospace; }
.provider-actions { display: flex; gap: 6px; align-items: center; }
.provider-actions .danger { background: #5a1f1f; color: #ff9b9b; }

/* === Copy button on message bubbles === */
.msg-bubble { position: relative; }
.msg-copy-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #c0c0c0;
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-copy-btn:hover, .msg-copy-btn:active { opacity: 1; background: rgba(255,255,255,0.18); }
.msg-user .msg-copy-btn { top: 4px; right: 4px; background: rgba(0,0,0,0.18); color: #f0f0f0; }
/* Если play-btn есть — copy-btn чуть левее */
.msg-bubble .msg-play-btn + .msg-copy-btn,
.msg-bubble .msg-copy-btn ~ .msg-play-btn { right: 30px; }

/* Кнопка подгрузки старых сообщений (виртуализация чата) */
.load-prev-btn {
  display: block;
  margin: 8px auto 12px;
  padding: 8px 16px;
  background: #2a2a2e;
  color: #cfcfd4;
  border: 1px solid #3a3a40;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.85;
}
.load-prev-btn:active { background: #34343a; }

/* Малыш — активный тумблер локальной модели */
#btnMisha.mm-on { filter: none; box-shadow: 0 0 0 2px rgba(74,222,128,.5) inset; border-radius: 8px; animation: hb-pulse 1.6s ease-in-out infinite; }

/* Схлопнутое меню шапки */
.main-header { position: relative; z-index: 10; }
.header-menu { position:absolute; top:44px; right:6px; background:#181920; border:1px solid rgba(168,133,247,.28); border-radius:12px; padding:6px; box-shadow:0 10px 34px rgba(0,0,0,.55); z-index:9998; display:flex; flex-direction:column; min-width:210px; }
.header-menu .hm-row { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; cursor:pointer; }
.header-menu .hm-row:hover { background:rgba(168,133,247,.12); }
.header-menu .hm-row > span { font-size:13px; color:#d7d9ee; }
.header-menu .hm-row button { background:transparent; border:0; font-size:18px; }
.header-menu .hm-row button.mm-on { box-shadow:0 0 0 2px rgba(74,222,128,.5) inset; border-radius:8px; }

/* Модалка сердцебиения */
.hbm-opt { background:#2a2b36; color:#e8e8f0; border:1px solid #3a3a44; border-radius:9px; padding:9px 15px; font-size:14px; cursor:pointer; }
.hbm-opt.hbm-active { background:#b3263b; border-color:#d0405a; color:#fff; }

/* ── Hands-free: индикатор кнопки + плашка активации потягиванием ── */
.icon-btn.mic-hf { background: #ef4444 !important; color: #fff !important; }
.icon-btn.mic-hf-cap { animation: hfPulse 1s infinite; }
@keyframes hfPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); }
  50%      { box-shadow: 0 0 0 9px rgba(239,68,68,0); }
}
.composer.hf-on #msgInput { opacity: .25; }
.hf-target {
  position: fixed; transform: translate(-50%, -118%); z-index: 10001;
  background: rgba(28,30,42,.97); color: #e8e8f0; border: 1px solid rgba(168,133,247,.55);
  border-radius: 16px; padding: 9px 16px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 13px; font-weight: 600; box-shadow: 0 10px 34px rgba(0,0,0,.55); pointer-events: none;
  transition: transform .12s, background .12s; white-space: nowrap;
}
.hf-target[hidden] { display: none; }
.hf-target-ic { font-size: 18px; }
.hf-target-hint { font-size: 10px; font-weight: 400; color: #9aa0c8; }
.hf-target.hf-target-armed {
  background: #7c3aed; border-color: #c084fc;
  transform: translate(-50%, -135%) scale(1.09);
}
.hf-target.hf-target-armed .hf-target-hint { color: #ece2ff; }
.hf-target.hf-target-armed .hf-target-hint::after { content: ' — отпусти'; }

#micBtn { touch-action: none; -webkit-user-select: none; user-select: none; }

/* === Фикс мерцания модалок в Android WebView (2026-07-12) ===
   backdrop-filter: blur() на модальных поверхностях при анимации фона (neo-edge/стрим/микрофон)
   заставляет blur-слой пере-композиться каждый кадр → мерцание. Убираем blur на модалках. */
.modal, .modal-content, .modal-backdrop, .confirm-modal, .aws-modal, .ctx-menu,
.lock-screen, #providerModal, #ghModal, #modalAddWs, .provider-card, .header-menu {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.modal-content, .confirm-modal, .aws-modal, .ctx-menu, .lock-screen, .header-menu {
  background-color: rgba(18, 19, 30, 0.98) !important;
}


/* === Мерцание модалок v2 (2026-07-12): гасим анимированную неон-кромку (mask-composite репейнт)
   + модалки на своём композитор-слое, фон непрозрачный, чтобы не пере-композиться с анимацией чата. */
.neo-edge::before { animation: none !important; }
.modal, .modal-content, .confirm-modal, .aws-modal, .ctx-menu, .lock-screen,
#providerModal, #ghModal, #modalAddWs, .provider-card, .header-menu {
  transform: translateZ(0);
  will-change: auto;
}
.modal-content, .confirm-modal, .aws-modal, .ctx-menu, .lock-screen, .header-menu, .provider-card {
  background-color: #14151e !important;
}



/* === Плавающая панель фоновых задач (субагентов) — полупрозрачно, ненавязчиво, стопкой === */
#mainArea { position: relative; }
.bg-tasks{ position:absolute; left:8px; right:8px; z-index:44; display:flex; flex-direction:column; gap:4px; pointer-events:none; }
.bg-tasks[hidden]{ display:none; }
.bg-task{ display:flex; align-items:center; gap:8px; padding:5px 10px; border-radius:9px; background:rgba(18,20,30,0.62); border:1px solid rgba(139,92,246,0.22); font-size:12px; color:#c9cce0; pointer-events:auto; box-shadow:0 4px 14px rgba(0,0,0,0.28); animation:bgTaskIn .2s ease-out; }
.bg-task .spin{ width:11px; height:11px; border:2px solid rgba(167,139,250,0.30); border-top-color:#a78bfa; border-radius:50%; animation:bgTaskSpin .8s linear infinite; flex-shrink:0; }
.bg-task .bt-task{ flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bg-task .bt-st{ opacity:.55; font-size:11px; flex-shrink:0; max-width:42%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bg-task.more{ justify-content:center; opacity:.6; background:rgba(18,20,30,0.42); border-style:dashed; font-size:11px; }
@keyframes bgTaskSpin{ to{ transform:rotate(360deg);} }
@keyframes bgTaskIn{ from{ opacity:0; transform:translateY(-4px);} to{ opacity:1; transform:none;} }
