html, body, #app { height: 100%; }
/* Tailwind CDN 失败时仍保持暗色底，避免整页「假黑屏」 */
html, body {
  background-color: #0b0d12;
  color: #e2e8f0;
}
* { -webkit-tap-highlight-color: transparent; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3040; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a4055; }

.skeleton {
  background: linear-gradient(90deg, #1a1d24 0%, #232734 50%, #1a1d24 100%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bubble {
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* 消息「⋯」：在气泡外侧，轻量毛玻璃，避免压住正文 */
.chat-msg-fab-out {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  touch-action: manipulation;
}
/* 深色聊天区默认（无 html.chat-theme-light 或与深色 token 同屏） */
.chat-msg-fab-out.chat-msg-fab--mine {
  background-color: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.chat-msg-fab-out.chat-msg-fab--mine:hover {
  background-color: rgba(30, 41, 59, 0.78);
}
.chat-msg-fab-out.chat-msg-fab--peer {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.chat-msg-fab-out.chat-msg-fab--peer:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.chat-msg-copy-btn {
  border-width: 1px;
  border-style: solid;
}
.chat-msg-copy-btn.chat-msg-copy--mine {
  background-color: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.25);
}
.chat-msg-copy-btn.chat-msg-copy--mine:hover {
  background-color: rgba(30, 41, 59, 0.82);
}
.chat-msg-copy-btn.chat-msg-copy--peer {
  background-color: rgba(15, 23, 42, 0.42);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.22);
}
.chat-msg-copy-btn.chat-msg-copy--peer:hover {
  background-color: rgba(30, 41, 59, 0.55);
}

.fade-enter-active, .fade-leave-active { transition: opacity .15s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.slide-enter-active, .slide-leave-active {
  transition: transform .25s ease, opacity .25s ease;
}
.slide-enter-from { transform: translateY(8px); opacity: 0; }
.slide-leave-to { transform: translateY(-8px); opacity: 0; }

@media (max-width: 767px) {
  .desktop-only { display: none !important; }
}
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}

.online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #10b981;
  border: 2px solid #0F1115;
}

/* 右下角浮窗：避免被父级裁剪 */
.chat-float-shell {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

.sidebar-collapsed-scroll {
  scrollbar-width: thin;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}
