:root {
  color-scheme: light dark;
  --bg-page: #fafafa;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-subtle: #f4f4f5;
  --text-primary: #18181b;
  --text-secondary: rgba(24, 24, 27, 0.55);
  --text-tertiary: rgba(24, 24, 27, 0.38);
  --divider: rgba(24, 24, 27, 0.08);
  --card-shadow: none;
  --chip-bg: rgba(24, 24, 27, 0.04);
  --chip-hover: rgba(24, 24, 27, 0.07);
  --code-bg: rgba(24, 24, 27, 0.05);
  --accent: #18181b;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(24, 24, 27, 0.06);
  --accent-engine-agy: #18181b;
  --accent-engine-oc: #0d9488;
  --user-bubble-bg: #f4f4f5;
  --user-bubble-text: #18181b;
  --user-bubble-border: var(--divider);
  --live-blue: #18181b;
  --danger: #ef4444;
  --tabbar-bg: #fafafa;
  --sheet-bg: #ffffff;
  --radius-xl: 16px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #000000;
    --surface: #12141a;
    --surface-elevated: rgba(18, 20, 26, 0.95);
    --surface-subtle: #1a1d25;
    --text-primary: #f5f7fa;
    --text-secondary: rgba(245, 247, 250, 0.56);
    --text-tertiary: rgba(245, 247, 250, 0.34);
    --divider: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    --chip-bg: rgba(255, 255, 255, 0.075);
    --chip-hover: rgba(255, 255, 255, 0.13);
    --code-bg: rgba(255, 255, 255, 0.09);
    --accent: #f5f7fa;
    --accent-contrast: #0b0d12;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --user-bubble-bg: rgba(26, 92, 184, 0.28);
    --user-bubble-text: #52a5ff;
    --user-bubble-border: rgba(82, 165, 255, 0.28);
    --live-blue: #3898ff;
    --tabbar-bg: rgba(14, 16, 21, 0.96);
    --sheet-bg: rgba(20, 23, 30, 0.97);
  }
}

:root[data-theme="dark"] {
  --bg-page: #000000;
  --surface: #12141a;
  --surface-elevated: rgba(18, 20, 26, 0.95);
  --surface-subtle: #1a1d25;
  --text-primary: #f5f7fa;
  --text-secondary: rgba(245, 247, 250, 0.56);
  --text-tertiary: rgba(245, 247, 250, 0.34);
  --divider: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --chip-bg: rgba(255, 255, 255, 0.075);
  --chip-hover: rgba(255, 255, 255, 0.13);
  --code-bg: rgba(255, 255, 255, 0.09);
  --accent: #f5f7fa;
  --accent-contrast: #0b0d12;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --user-bubble-bg: rgba(26, 92, 184, 0.28);
  --user-bubble-text: #52a5ff;
  --user-bubble-border: rgba(82, 165, 255, 0.28);
  --live-blue: #3898ff;
  --tabbar-bg: rgba(14, 16, 21, 0.96);
  --sheet-bg: rgba(20, 23, 30, 0.97);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, .msg-bubble, pre, code {
  user-select: text;
  -webkit-user-select: text;
}

/* Strict Full-Bleed Flex Root: stretches to physical bottom edge behind iPhone Home Indicator */
.app-root {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-page);
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

.app-shell {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 16px calc(env(safe-area-inset-bottom, 16px) + 8px);
}

.app-shell.home-active,
.app-shell:has(#tabHome.active) {
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}

.subpage-back-btn {
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 15.5px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  cursor: pointer;
}

.subpage-back-btn span:first-child {
  font-size: 24px;
  line-height: 1;
  margin-top: -2px;
}

.page-title-sm {
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
}

.header-spacer {
  width: 44px;
}

.tab-panel#tabHome {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 110px);
  gap: 24px;
  animation: fadeUp 0.18s ease;
  padding: 6px 0;
}

/* 优雅置顶的终端品牌区域 */
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 8px 4px 0;
}

.hero-top-stage {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-hero-title {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1.15;
}

.cli-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.09);
  border: 0.5px solid rgba(22, 163, 74, 0.25);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  letter-spacing: 0.04em;
}

.brand-hero-slogan {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* 放大版官方彩虹像素大 A Logo */
.agy-pixel-a.large {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 48px;
  flex-shrink: 0;
}

.agy-pixel-a.large .pixel-row {
  display: flex;
  height: 6px;
}

.agy-pixel-a.large .pixel-row.r1 { padding-left: 18px; }
.agy-pixel-a.large .pixel-row.r2 { padding-left: 13px; }
.agy-pixel-a.large .pixel-row.r3 { padding-left: 9px; }
.agy-pixel-a.large .pixel-row.r4 { padding-left: 5px; }
.agy-pixel-a.large .pixel-row.r5 { padding-left: 0px; }
.agy-pixel-a.large .pixel-row.r6 { padding-left: 0px; }
.agy-pixel-a.large .pixel-row.r7 { padding-left: 0px; }
.agy-pixel-a.large .pixel-row.r8 { padding-left: 0px; }

.agy-pixel-a.large .px {
  width: 6.5px;
  height: 6px;
  display: inline-block;
  margin-right: 1.5px;
  border-radius: 1px;
}

/* 居中输入框容器 */
.composer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto 0;
  width: 100%;
}

.tab-panel[hidden] {
  display: none;
}

@keyframes fadeUp {
  from { opacity: 0.6; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pull-to-refresh pill */
.ptr-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 12px) + 8px);
  left: 50%;
  transform: translate(-50%, -60px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--divider);
  box-shadow: var(--card-shadow);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ptr-indicator.visible { opacity: 1; }

.ptr-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--divider);
  border-top-color: var(--accent);
}

.ptr-indicator.refreshing .ptr-spinner {
  animation: spin 0.7s linear infinite;
}

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

/* Modern Compact Terminal Hero */
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 0 2px 2px;
  gap: 8px;
}

.hero-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hero-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  font-size: 12px;
  font-weight: 550;
  color: var(--text-secondary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.status-dot.online {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.28);
}

.status-dot.running {
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
  animation: pulse 1.6s ease-in-out infinite;
}

.status-dot.offline {
  background: #fbbf24;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

/* ========================================================
   Gemini APP 经典设计规范 · 底部对话框 + 左上角双横线侧边栏任务中心
   融入 Mac 终端 (Terminal) 极客质感
   ======================================================== */

/* --- 顶部固定导航栏 (Gemini Top Header) --- */
.gemini-top-header {
  flex-shrink: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 14px) + 6px) 16px 8px;
  background: var(--bg-page);
  z-index: 20;
}

/* 左上角一长一短两根线菜单按钮 (Gemini 标志性双横线) */
.gemini-drawer-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 8px 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.gemini-drawer-btn:active {
  background: var(--chip-bg);
  opacity: 0.8;
}

.gemini-drawer-btn .drawer-bar {
  height: 2.2px;
  background: var(--text-primary);
  border-radius: 999px;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
}

.gemini-drawer-btn .drawer-bar.long {
  width: 22px;
}

.gemini-drawer-btn .drawer-bar.short {
  width: 13px;
}

.drawer-dot-pulse {
  position: absolute;
  top: 7px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 6px #16a34a;
  animation: badgePulse 1.8s infinite;
}

/* 顶部居中 Gemini 品牌与模型胶囊 */
.gemini-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  user-select: none;
}

.gemini-sparkle-pill {
  font-size: 13px;
  background: linear-gradient(135deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  line-height: 1;
}

.gemini-title-pill {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.gemini-sub-pill {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 550;
  color: var(--text-tertiary);
  margin-left: 2px;
}

.gemini-pill-caret {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* 顶部右侧：终端快捷按钮 + 用户头像 */
.gemini-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gemini-term-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.gemini-term-badge:active {
  background: var(--chip-bg);
}

.term-traffic-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.term-traffic-dots .traffic-dot {
  width: 5px;
  height: 5px;
}

.gemini-term-badge .term-code-text {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.gemini-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  user-select: none;
}

/* --- TAB 1: 首页视口结构 (弹性填满，底部吸附对话框) --- */
.tab-panel#tabHome {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 100%;
  padding: 4px 0 calc(env(safe-area-inset-bottom, 16px) + 8px);
  overflow: hidden;
  box-sizing: border-box;
  animation: fadeUp 0.18s ease;
}

/* --- 居中沉浸舞台 (Gemini Stage) --- */
.gemini-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 6px 0;
  user-select: none;
}

.gemini-brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gemini-sparkle-glow {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 133, 244, 0.22) 0%, rgba(155, 114, 203, 0.15) 50%, transparent 70%);
  filter: blur(14px);
  pointer-events: none;
  animation: geminiGlow 3.5s ease-in-out infinite alternate;
}

@keyframes geminiGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 0.95; }
}

.gemini-greeting-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gemini-greeting-heading {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
}

.gemini-greeting-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 450;
  letter-spacing: 0.01em;
}

/* 终端遥测胶囊 (融入终端元素) */
.gemini-host-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 550;
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.035);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gemini-host-pill:active {
  background: var(--chip-bg);
}

.gemini-host-pill .term-traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
}

.gemini-host-pill .traffic-dot {
  width: 5.5px;
  height: 5.5px;
}

.term-cursor-blink {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  color: #16a34a;
  animation: termCursorBlink 1s step-end infinite;
}

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

/* Gemini 快捷建议气泡列表 (2列流式排布) */
.gemini-suggestion-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin-top: 4px;
  padding: 0 4px;
}

.gemini-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.gemini-chip:active {
  transform: scale(0.97);
  background: var(--chip-bg);
}

.gemini-chip .chip-spark {
  color: #4285f4;
  font-size: 13px;
  flex-shrink: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
}

.gemini-chip .chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* --- 底部固定对话框 (Gemini Mobile Bottom Composer + 终端质感融入) --- */
.gemini-bottom-composer-section {
  width: 100%;
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gemini-composer-box {
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 20px;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.03);
  padding: 8px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gemini-composer-box:focus-within {
  border-color: rgba(66, 133, 244, 0.65);
  box-shadow: 0 6px 26px rgba(66, 133, 244, 0.15), 0 0 0 1px rgba(66, 133, 244, 0.25);
}

.composer-term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 0.5px solid var(--divider);
  user-select: none;
}

.composer-term-bar .term-traffic-lights {
  display: flex;
  align-items: center;
  gap: 4.5px;
}

.composer-term-bar .traffic-dot {
  width: 6.5px;
  height: 6.5px;
}

.composer-term-bar .term-window-title {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--text-secondary);
}

.composer-term-bar .term-window-mode {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--chip-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

.gemini-input-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
}

.gemini-input-row .term-prompt-arrow {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #16a34a;
  line-height: 1.45;
  user-select: none;
  flex-shrink: 0;
  margin-top: 1px;
}

.gemini-input-row textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  resize: none;
  padding: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  max-height: 120px;
}

.gemini-input-row textarea::placeholder {
  color: var(--text-tertiary);
  font-size: 13.5px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.gemini-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.composer-tools-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gemini-tool-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.gemini-tool-btn:active {
  background: var(--chip-bg);
  color: var(--text-primary);
}

.gemini-term-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: var(--chip-bg);
  border: 0.5px solid var(--divider);
  border-radius: 999px;
  cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  color: var(--text-secondary);
}

.gemini-term-tool-btn .term-glyph {
  color: #16a34a;
  font-weight: 700;
}

.composer-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.claude-model-badge {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--chip-bg);
  padding: 2px 7px;
  border-radius: 4px;
  border: 0.5px solid var(--divider);
}

.gemini-send-circle-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--surface);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.2s ease;
}

.gemini-send-circle-btn:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.gemini-composer-hint {
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  user-select: none;
  padding-bottom: 2px;
}

.gemini-composer-hint .hint-dot {
  color: #16a34a;
  font-size: 9px;
}

/* --- Gemini 风格左侧抽屉侧边栏 (任务中心 + 宿主机其他布局) --- */
.gemini-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.gemini-drawer-backdrop[hidden] {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.gemini-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 86vw;
  max-width: 360px;
  height: 100%;
  background: var(--surface);
  border-right: 0.5px solid var(--divider);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.24);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.gemini-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 14px) + 10px) 16px 12px;
  border-bottom: 0.5px solid var(--divider);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-sparkle {
  font-size: 16px;
  background: linear-gradient(135deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.drawer-version {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--chip-bg);
  padding: 1px 5px;
  border-radius: 4px;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 17px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.drawer-close-btn:active {
  background: var(--chip-bg);
}

/* Gemini 标志性大按钮: + 新建任务 / 新对话 */
.drawer-new-chat-wrap {
  flex-shrink: 0;
  padding: 12px 14px 8px;
}

.drawer-new-chat-btn {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--surface);
  border: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.drawer-new-chat-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* 抽屉滚动内容 */
.drawer-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 6px 14px calc(env(safe-area-inset-bottom, 16px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.drawer-section-title {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.drawer-tag {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 650;
  padding: 1px 6px;
  border-radius: 999px;
}

.drawer-tag.online {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

/* 宿主机遥测卡片 */
.drawer-term-card {
  background: var(--surface-subtle);
  border: 0.5px solid var(--divider);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.term-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.term-card-row .term-label {
  color: var(--text-tertiary);
}

.term-card-row .term-val.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  color: var(--text-secondary);
}

.term-card-actions {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 0.5px solid var(--divider);
}

.drawer-term-launch-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  color: var(--text-primary);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
}

.drawer-term-launch-btn:active {
  background: var(--chip-bg);
}

/* 终端快捷指令网格 */
.drawer-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.drawer-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 9px;
  background: var(--surface-subtle);
  border: 0.5px solid var(--divider);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.drawer-chip:active {
  background: var(--chip-bg);
}

.drawer-chip .chip-cmd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text-primary);
}

.drawer-chip .chip-desc {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* 侧边栏底部快捷操作 */
.drawer-footer-section {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-footer-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--surface-subtle);
  border: 0.5px solid var(--divider);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}

.drawer-footer-btn:active {
  background: var(--chip-bg);
}

.drawer-footer-btn .btn-sub {
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* 任务列表条目与徽章规范 (沿用高辨识度 Terminal 风格) */
.term-sym {
  color: #16a34a;
  font-weight: 700;
}

.term-badge {
  font-size: 10px;
  background: var(--chip-bg);
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--text-tertiary);
  border: 0.5px solid var(--divider);
}

.term-grouped-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
}

.session-code-idx {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.session-code-state {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.session-code-state.running {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.session-code-state.idle {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}

.claude-text-link {
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 4px;
  cursor: pointer;
}

/* 深色模式下的 Gemini 风格质感微调 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gemini-composer-box {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  }
  :root:not([data-theme="light"]) .gemini-composer-box:focus-within {
    border-color: rgba(66, 133, 244, 0.7);
    box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.4), 0 8px 30px rgba(0, 0, 0, 0.6);
  }
  :root:not([data-theme="light"]) .gemini-drawer {
    border-right-color: rgba(255, 255, 255, 0.08);
    background: #181a20;
  }
}

:root[data-theme="dark"] .gemini-composer-box {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
:root[data-theme="dark"] .gemini-composer-box:focus-within {
  border-color: rgba(66, 133, 244, 0.7);
  box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.4), 0 8px 30px rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] .gemini-drawer {
  border-right-color: rgba(255, 255, 255, 0.08);
  background: #181a20;
}

/* 思考气泡内置停止执行按钮 */
.stop-task-inline-btn {
  border: 0.5px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 8px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.stop-task-inline-btn:active {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(0.96);
}

.stop-task-inline-btn .stop-sq {
  width: 6.5px;
  height: 6.5px;
  background: #dc2626;
  border-radius: 1px;
}

/* 排队中的指令气泡样式 */
.msg-bubble.queued {
  opacity: 0.88;
  border: 1px dashed rgba(217, 119, 6, 0.4);
  background: rgba(254, 243, 199, 0.3);
}

.queued-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 4px;
  width: fit-content;
}

.claude-grouped-card {
  border-radius: 18px !important;
  border: 0.5px solid var(--divider) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

/* 官方 Antigravity 字符像素彩色大 A Logo 与 CLI Meta */
.agy-cli-hero-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 2px;
}

.cli-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cli-status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}

.cli-status-dot.online {
  box-shadow: 0 0 0 2.5px rgba(22, 163, 74, 0.22);
  animation: pulse 1.8s ease-in-out infinite;
}

.cli-status-text {
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
}

.agy-pixel-a {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  width: 38px;
  flex-shrink: 0;
}

.pixel-row {
  display: flex;
  height: 4.5px;
}

.pixel-row.r1 { padding-left: 14px; }
.pixel-row.r2 { padding-left: 10px; }
.pixel-row.r3 { padding-left: 7px; }
.pixel-row.r4 { padding-left: 4px; }
.pixel-row.r5 { padding-left: 0px; }
.pixel-row.r6 { padding-left: 0px; }
.pixel-row.r7 { padding-left: 0px; }
.pixel-row.r8 { padding-left: 0px; }

.px {
  width: 5px;
  height: 4.5px;
  display: inline-block;
  margin-right: 1px;
}

.px.sp {
  background: transparent;
}

/* 官方彩虹像素阶梯色 (Red -> Orange -> Yellow -> Green -> Cyan -> Blue -> Purple) */
.px.r { background: #ef4444; }
.px.o { background: #f97316; }
.px.y { background: #eab308; }
.px.g { background: #22c55e; }
.px.c { background: #06b6d4; }
.px.b { background: #3b82f6; }
.px.p { background: #8b5cf6; }

.agy-cli-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.cli-app-name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: -0.01em;
}

.cli-account-info {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.cli-model-info {
  margin: 0;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Mac 宿主机硬件终端遥测条 */
.terminal-telemetry-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-secondary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.terminal-telemetry-badge .tele-icon {
  font-size: 13px;
  color: var(--text-primary);
}

.terminal-telemetry-badge .tele-divider {
  color: var(--divider);
}

.tele-term-btn {
  border: none;
  background: var(--chip-bg);
  color: var(--accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: background 0.15s ease;
}

.tele-term-btn:active {
  background: var(--chip-hover);
}

/* 首页快捷终端命令胶囊 */
.terminal-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 2px;
}

.terminal-quick-chips::-webkit-scrollbar {
  display: none;
}

.terminal-quick-chips .chips-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.term-quick-btn {
  flex-shrink: 0;
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 550;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.12s ease, background 0.12s ease;
}

.term-quick-btn:active {
  transform: scale(0.95);
  background: var(--chip-bg);
  color: var(--accent);
}

/* 全局弹窗终端样式 */
.global-term-modal {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.global-term-modal[hidden] {
  display: none;
}

.global-term-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.global-term-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #0f131a;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 82vh;
  min-height: 55vh;
  overflow: hidden;
  animation: slideUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.hero-center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 12px 2px;
}

.brand-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

.brand-avatar {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  display: block;
}

.hero-greeting {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
}

.hero-subtitle {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
  max-width: 320px;
}

.hero-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.14s ease, background 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-status-badge:active {
  transform: scale(0.95);
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.hero-status-badge.has-running .status-indicator-dot {
  background: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
  animation: pulse 1.6s ease-in-out infinite;
}

.hero-status-badge .metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-chevron {
  font-size: 14px;
  line-height: 1;
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* Spotlight-style Command Composer with macOS Terminal Frame */
.composer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.terminal-window-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

.terminal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.035);
  border-bottom: 0.5px solid var(--divider);
  margin: -16px -16px 12px -16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 5.5px;
}

.traffic-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.traffic-dot.red { background: #ff5f56; }
.traffic-dot.yellow { background: #ffbd2e; }
.traffic-dot.green { background: #27c93f; }

.terminal-card-title {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.terminal-card-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--chip-bg);
  padding: 1px 6px;
  border-radius: 4px;
}

.terminal-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.03);
  border-bottom: 0.5px solid var(--divider);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.spotlight-card {
  background: var(--surface);
  border: 0.5px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spotlight-card textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  resize: none;
  padding: 0;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.48;
  outline: none;
}

.spotlight-card textarea::placeholder {
  color: var(--text-tertiary);
}

.spotlight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.model-segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--chip-bg);
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.circle-send-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, opacity 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.circle-send-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.circle-send-btn:disabled {
  opacity: 0.45;
}

/* Single-row horizontally scrollable chips */
.quick-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px;
}

.quick-chips-scroll::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  flex-shrink: 0;
  border: none;
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  font-size: 12.5px;
  font-weight: 550;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.14s ease, color 0.15s ease;
}

.chip-btn:active {
  transform: scale(0.95);
  color: var(--text-primary);
}

/* iOS Grouped Inset List Section */
.list-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.list-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.list-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-primary);
}

.list-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.text-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 550;
  padding: 4px 4px;
  cursor: pointer;
}

.grouped-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.session-item.single-line-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8.5px 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.12s ease;
}

.session-item.single-line-item:active {
  background: var(--chip-bg);
}

.session-item.single-line-item + .session-item.single-line-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 0.5px;
  background: var(--divider);
}

.session-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.session-title-inline {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.session-time-inline {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
}

.session-chevron {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text-tertiary);
}

.session-time-inline {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.session-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex-shrink: 0;
}

.session-state-dot.running {
  background: var(--live-blue);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.16);
  animation: pulse 1.6s ease-in-out infinite;
}

.session-text {
  min-width: 0;
  flex: 1;
}

.session-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.session-meta {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.session-chevron {
  color: var(--text-tertiary);
  font-size: 19px;
  line-height: 1;
  flex-shrink: 0;
}

.empty-state {
  padding: 28px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Skeletons */
.skeleton-row {
  height: 62px;
  margin: 0 16px;
  border-bottom: 0.5px solid var(--divider);
  position: relative;
  overflow: hidden;
}

.skeleton-row::after {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 65%;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--chip-bg) 25%, var(--chip-hover) 50%, var(--chip-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

.skeleton-bubble {
  border-radius: 18px;
  height: 46px;
  width: 72%;
  background: linear-gradient(90deg, var(--chip-bg) 25%, var(--chip-hover) 50%, var(--chip-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

.skeleton-bubble.right { align-self: flex-end; width: 58%; }
.skeleton-bubble.tall { height: 84px; width: 82%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Page Header & Search (Sessions / Decor Tabs) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 0;
}

.page-title {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-bar-wrap input {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  color: var(--text-primary);
  padding: 11px 14px 11px 38px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.filter-pills {
  display: flex;
  gap: 8px;
}

.filter-pill {
  border: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* Docked Native iOS Bottom Tab Bar (Flush to physical bottom edge on iPhone 15 Pro Max) */
.tab-bar {
  flex-shrink: 0;
  width: 100%;
  background: var(--tabbar-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 0.5px solid var(--divider);
  padding: 8px 12px max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 30;
}

.tab-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 0;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.12s ease;
}

.tab-btn:active {
  transform: scale(0.92);
}

.tab-btn.active {
  color: var(--accent);
}

.tab-dot {
  position: absolute;
  top: 2px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--tabbar-bg);
}

.save-sheet-btn {
  margin-top: 4px;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 15.5px;
  font-weight: 650;
  padding: 13px;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.save-sheet-btn:active {
  transform: scale(0.98);
}

/* Native-style Conversation Detail View */
.detail-view {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg-page);
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
  animation: slideInRight 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-view[hidden] {
  display: none;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.detail-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 12px) + 8px) 12px 10px;
  background: var(--tabbar-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid var(--divider);
}

.detail-back-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 16px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.back-chev {
  font-size: 26px;
  line-height: 1;
  margin-top: -2px;
}

.detail-title-group {
  min-width: 0;
  flex: 1;
  text-align: center;
}

.detail-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-status {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detail-status.running {
  color: #34c759;
  font-weight: 600;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
  display: inline-block;
  animation: greenPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes greenPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 6px rgba(52, 199, 89, 0.7); }
}

.detail-more-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.detail-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.msg-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.msg-row.user {
  width: auto;
  max-width: 84%;
  align-self: flex-end;
  align-items: flex-end;
  margin-left: auto;
}

.msg-row.assistant {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  align-items: stretch;
}

.msg-bubble {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-row.user .msg-bubble {
  background: var(--user-bubble-bg);
  color: var(--user-bubble-text);
  border: 0.5px solid var(--user-bubble-border);
  border-radius: 18px 18px 4px 18px;
  padding: 10px 15px;
  font-size: 15px;
  line-height: 1.52;
  white-space: pre-wrap;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 96, 214, 0.08);
}

/* ChatGPT Mobile Style: Assistant responses flow directly on canvas with zero card background */
.msg-row.assistant .msg-bubble {
  width: 100%;
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 2px 2px 6px 2px;
  color: var(--text-primary);
  font-size: 15.5px;
  line-height: 1.64;
}

.msg-row.user .bubble-images {
  justify-content: flex-end;
}

.msg-row.assistant .bubble-images {
  justify-content: flex-start;
}

.queued-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 550;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  width: fit-content;
}

.md-content p { margin: 0 0 8px; }
.md-content p:last-child { margin-bottom: 0; }
.md-content h1, .md-content h2, .md-content h3 {
  margin: 10px 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
}
.md-content h1:first-child, .md-content h2:first-child, .md-content h3:first-child { margin-top: 0; }
.md-content ul, .md-content ol { margin: 6px 0 8px; padding-left: 18px; }
.md-content li { margin: 3px 0; }
.md-content blockquote {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 3px solid var(--accent);
  background: var(--chip-bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
}
.md-content a {
  color: var(--accent);
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.md-content code.inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.8px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--code-bg);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.code-block-wrap {
  margin: 8px 0;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid var(--divider);
  background: #0f131a;
  color: #e2e8f0;
}

.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: rgba(226, 232, 240, 0.72);
}

.code-copy-btn {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.code-block-wrap pre {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
}

.msg-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 0 4px;
}

.msg-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

.msg-copy-btn {
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: 11.5px;
  padding: 2px 4px;
  cursor: pointer;
}

.msg-tools {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tool-pill {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--chip-bg);
  padding: 4px 9px;
  border-radius: 999px;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounceDot 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes bounceDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.scroll-bottom-btn {
  position: absolute;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 12px) + 74px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0.5px solid var(--divider);
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--card-shadow);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  z-index: 5;
}

.scroll-bottom-btn[hidden] { display: none; }

.detail-composer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 8px) + 8px);
  background: var(--tabbar-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 0.5px solid var(--divider);
}

.detail-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.detail-input-wrap textarea {
  flex: 1;
  min-width: 0;
  max-height: 108px;
  resize: none;
  border: 0.5px solid var(--divider);
  border-radius: 20px;
  background: var(--surface-subtle);
  color: var(--text-primary);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  outline: none;
}

.detail-input-wrap textarea:focus {
  border-color: var(--accent);
}

.detail-send-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, opacity 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.detail-send-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.detail-send-btn:disabled { opacity: 0.45; }

.detail-send-btn.stopping {
  background: #ef4444 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: pointer;
  animation: pulseStop 1.8s ease-in-out infinite;
}

.detail-send-btn.stopping .stop-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  background: #ffffff;
  border-radius: 2.5px;
}

@keyframes pulseStop {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.22); }
}

.task-term-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #11151c;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}
.task-term-chips::-webkit-scrollbar {
  display: none;
}
.term-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.term-chip:active {
  background: rgba(88, 166, 255, 0.35);
  color: #58a6ff;
  transform: scale(0.95);
}

.msg-act-btn.retry-btn {
  color: var(--accent);
  font-weight: 600;
}

.user-edit-btn {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.85;
}
.user-edit-btn:active {
  opacity: 1;
  color: var(--accent);
}

.thinking-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.18);
  color: #0284c7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
}
[data-theme="dark"] .thinking-tool-badge {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

/* Native iOS Action Sheet */
.action-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(env(safe-area-inset-bottom, 12px) + 12px);
}

.action-sheet-backdrop[hidden] { display: none; }

.action-sheet {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: sheetUp 0.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes sheetUp {
  from { transform: translateY(36px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.action-group {
  border-radius: 16px;
  overflow: hidden;
  background: var(--sheet-bg);
}

.action-item {
  width: 100%;
  display: block;
  text-align: center;
  border: none;
  border-bottom: 0.5px solid var(--divider);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 550;
  padding: 15px 16px;
  cursor: pointer;
}

.action-item:last-child { border-bottom: none; }
.action-item.danger { color: var(--danger); }

.action-cancel {
  width: 100%;
  border: none;
  border-radius: 16px;
  background: var(--sheet-bg);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  padding: 15px;
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 12px) + 14px);
  transform: translate(-50%, -18px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
  max-width: 88vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Access Lock Overlay */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(10, 14, 24, 0.56);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lock-overlay[hidden] { display: none; }

.lock-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  padding: 28px 22px 22px;
  text-align: center;
}

.lock-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.lock-card h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.lock-desc {
  margin: 6px 0 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lock-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 0.5px solid var(--divider);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.16em;
  outline: none;
}

.lock-form input:focus { border-color: var(--accent); }

.lock-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--danger);
}

/* Voice Input Button (Gemini style) */
.composer-right-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.voice-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid var(--divider);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.voice-btn[hidden] {
  display: none;
}

.voice-btn:active {
  transform: scale(0.92);
}

.voice-btn.listening {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  animation: pulse 1.2s ease-in-out infinite;
}

/* Swipe-back visual indicator pill */
.swipe-back-indicator {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translate(-48px, -50%);
  width: 34px;
  height: 48px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 0.5px solid var(--divider);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

/* Gemini-style Sparkle Thinking Bar - Clean & Flat */
.gemini-thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 100%;
}

.gemini-spark {
  font-size: 14px;
  background: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sparkSpin 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

.thinking-text {
  font-size: 13px;
  font-weight: 550;
  background: linear-gradient(90deg, var(--text-secondary) 0%, var(--text-primary) 50%, var(--text-secondary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerWave 2.4s linear infinite;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.thinking-dots span {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #4285f4;
  opacity: 0.4;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  background: #9b72cb;
  animation-delay: 0.22s;
}

.thinking-dots span:nth-child(3) {
  background: #d96570;
  animation-delay: 0.44s;
}

@keyframes shimmerWave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes dotPulse {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes sparkSpin {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.22) rotate(18deg); opacity: 1; }
}

/* Collapsible Tool Steps Pill (Gemini-style) */
.tool-collapse {
  margin-top: 6px;
  max-width: 100%;
}

.tool-collapse summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
}

.tool-collapse summary::-webkit-details-marker {
  display: none;
}

.tool-collapse-list {
  margin-top: 6px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 0.5px solid var(--divider);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Action Bar for User and Assistant Messages (Copy / Read Aloud / Share) */
.msg-action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 0 2px;
}

.msg-row.user .msg-action-bar {
  justify-content: flex-end;
  padding: 0 4px;
  gap: 6px;
}

.msg-row.user .msg-act-btn {
  color: var(--text-tertiary);
  font-size: 11.5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
}

@media (prefers-color-scheme: dark) {
  .msg-row.user .msg-act-btn {
    background: rgba(255, 255, 255, 0.05);
  }
}

.msg-row.user .msg-act-btn:active {
  background: rgba(0, 122, 255, 0.12);
  color: var(--live-blue);
}

.msg-row.assistant .msg-action-bar {
  justify-content: flex-start;
  padding: 0 2px;
}

.msg-act-btn {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.14s ease, color 0.14s ease;
}

.msg-act-btn:active {
  background: var(--chip-bg);
  color: var(--text-primary);
}

.msg-act-btn.active {
  color: var(--live-blue);
  background: rgba(0, 122, 255, 0.1);
}

/* Image Attachment & Thumbnail Previews */
.img-attach-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid var(--divider);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
  flex-shrink: 0;
}

.img-attach-btn:active {
  transform: scale(0.92);
  background: var(--chip-hover);
}

.img-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.img-preview-bar[hidden] {
  display: none;
}

.img-thumb-item {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid var(--divider);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.img-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-thumb-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Chat bubble images */
.bubble-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.bubble-img-wrap {
  position: relative;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.bubble-img {
  display: block;
  max-width: 240px;
  max-height: 260px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
}

/* ============================================================
   Task Embedded Terminal (Zero Context Loss, Native Feel)
   ============================================================ */
.detail-header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-term-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0.5px solid var(--divider);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s, background 0.15s;
}

.detail-term-btn:active {
  transform: scale(0.96);
  opacity: 0.8;
}

.detail-term-btn .term-ico {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  font-size: 11px;
  color: #10b981;
}

.task-term-drawer {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  max-width: 640px;
  margin: 0 auto;
  box-sizing: border-box;
  max-height: 56vh;
  height: 48vh;
  display: flex;
  flex-direction: column;
  background: rgba(13, 17, 23, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: #e6edf3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.48);
  z-index: 60;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s;
  animation: termSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-term-drawer[hidden] {
  display: none !important;
}

@keyframes termSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.task-term-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 27, 34, 0.95);
  border-radius: 20px 20px 0 0;
}

.task-term-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 640;
  color: #f0f6fc;
}

.task-term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #238636;
  box-shadow: 0 0 6px #238636;
}

.task-term-cwd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: rgba(240, 246, 252, 0.6);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

.task-term-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-tool-btn {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #c9d1d9;
  font-size: 11.5px;
  font-weight: 580;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}

.term-tool-btn.close {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.term-tool-btn:active {
  opacity: 0.7;
}

.task-term-output {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
  box-sizing: border-box;
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #c9d1d9;
  user-select: text;
  -webkit-user-select: text;
  word-break: break-all;
  white-space: pre-wrap;
}

.task-term-output .term-line.prompt {
  color: #58a6ff;
  font-weight: 600;
  margin-bottom: 6px;
}

.task-term-output .term-line.cmd {
  color: #7ee787;
  font-weight: 700;
  margin: 8px 0 2px;
}

.task-term-output .term-line.err {
  color: #f85149;
}

.task-term-output .term-line.out {
  color: #e6edf3;
}

.task-term-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #161b22;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.task-term-bar textarea {
  flex: 1;
  min-height: 36px;
  max-height: 90px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0d1117;
  color: #f0f6fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  resize: none;
  outline: none;
  -webkit-appearance: none;
}

.task-term-bar textarea:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.task-term-run {
  border: none;
  background: #238636;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 650;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.task-term-run:active {
  background: #2ea043;
  transform: scale(0.96);
}

.task-term-run:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 合并版：双引擎切换器（反重力 / OpenCode） ===== */
.gemini-brand-pill.engine-switcher {
  gap: 2px;
  padding: 3px 4px;
  cursor: default;
}

.engine-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.engine-tab.active {
  background: var(--chip-bg);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 0.5px solid var(--divider);
}

.engine-tab-spark {
  font-size: 12px;
  background: linear-gradient(135deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.engine-tab-glyph {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* OpenCode 引擎激活时的强调色（青绿终端风） */
.engine-tab[data-engine="opencode"].active .engine-tab-glyph {
  color: #10a37f;
}

/* model badge 两个引擎各自显示自己的（agy: gemini / opencode: cli） */

/* ===== 引擎分脸：反重力=纯 Gemini 风（去终端味），OpenCode=终端 CLI 风 ===== */
/* 反重力首页：隐藏终端窗口标题栏和终端按钮 */
body[data-engine="agy"] .composer-term-bar {
  display: none;
}

body[data-engine="agy"] #composerTermModalBtn {
  display: none;
}

/* 反重力首页：状态胶囊与输入框再去终端残留 */
body[data-engine="agy"] #headerTermQuickBtn {
  display: none;
}

body[data-engine="agy"] #statusPill .term-traffic-lights,
body[data-engine="agy"] #statusPill .term-cursor-blink,
body[data-engine="agy"] .term-prompt-arrow {
  display: none;
}

body[data-engine="agy"] #statusPill {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body[data-engine="agy"] #statusPill .host-pill-text {
  font-family: inherit;
}

/* 侧栏：反重力隐藏 Mac 终端遥测与命令块；OpenCode 保留完整 CLI 侧栏 */
body[data-engine="agy"] .drawer-telemetry-section,
body[data-engine="agy"] .drawer-quick-chips-section {
  display: none;
}

body[data-engine="agy"] .drawer-tasks-section .term-grouped-card {
  border: 0.5px solid var(--divider);
}

body[data-engine="agy"] .drawer-tasks-section .session-code-idx,
body[data-engine="agy"] .drawer-tasks-section .session-code-state {
  font-family: inherit;
  letter-spacing: 0;
}

body[data-engine="agy"] .drawer-tasks-section .term-sym:not(.task-sym--cli) {
  background: linear-gradient(135deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drawer-sparkle.drawer-sparkle--cli {
  background: none;
  -webkit-text-fill-color: #10a37f;
  color: #10a37f;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.drawer-tasks-section .term-sym.task-sym--cli {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  color: #10a37f;
  -webkit-text-fill-color: #10a37f;
  background: none;
}

/* OpenCode 星标：青绿渐变（覆盖 Gemini 蓝紫红） */
body[data-engine="opencode"] .hub-spark stop:nth-child(1) { stop-color: #0e9488; }
body[data-engine="opencode"] .hub-spark stop:nth-child(2) { stop-color: #14b8a6; }
body[data-engine="opencode"] .hub-spark stop:nth-child(3) { stop-color: #34d399; }

body[data-engine="opencode"] .hub-spark {
  filter: drop-shadow(0 4px 18px rgba(16, 163, 127, 0.35));
}

body[data-engine="opencode"] .hub-spark-glow {
  background: radial-gradient(circle, rgba(16, 163, 127, 0.20) 0%, rgba(52, 211, 153, 0.12) 55%, transparent 75%);
}

/* ===== Hub 集合体首页（v55）：枢纽星标 + 工具架 ===== */
.hub-stage {
  justify-content: center;
  gap: 14px;
}

/* --- 枢纽星标：中央四角星 + 三颗轨道节点 --- */
.hub-mark {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-spark {
  width: 52px;
  height: 52px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 18px rgba(66, 133, 244, 0.35));
  animation: hubSparkBreathe 4.5s ease-in-out infinite alternate;
}

@keyframes hubSparkBreathe {
  0% { transform: scale(0.94) rotate(-2deg); }
  100% { transform: scale(1.05) rotate(2deg); }
}

.hub-spark-glow {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 133, 244, 0.20) 0%, rgba(155, 114, 203, 0.12) 55%, transparent 75%);
  filter: blur(12px);
  pointer-events: none;
  animation: geminiGlow 3.5s ease-in-out infinite alternate;
}

.hub-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: hubOrbitSpin 16s linear infinite;
}

@keyframes hubOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hub-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chip-bg);
  border: 0.5px solid var(--divider);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.hub-node.n1 { top: -2px; left: 50%; margin-left: -4.5px; }
.hub-node.n2 { bottom: 8px; left: 10px; }
.hub-node.n3 { bottom: 8px; right: 10px; }

body[data-engine="agy"] .hub-node.n1 { background: #4285f4; border-color: transparent; }
body[data-engine="agy"] .hub-node.n2 { background: #9b72cb; border-color: transparent; }
body[data-engine="agy"] .hub-node.n3 { background: #d96570; border-color: transparent; }

body[data-engine="opencode"] .hub-node.n1,
body[data-engine="opencode"] .hub-node.n2,
body[data-engine="opencode"] .hub-node.n3 { background: #10a37f; border-color: transparent; }

/* --- 工具架：引擎卡片 --- */
.hub-engine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 0 4px;
}

.hub-engine-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 11px;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.hub-engine-card:active {
  transform: scale(0.97);
}

.hub-engine-card.active {
  border-color: rgba(66, 133, 244, 0.45);
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.14), 0 1px 4px rgba(0, 0, 0, 0.04);
}

body[data-engine="opencode"] .hub-engine-card.active {
  border-color: rgba(16, 163, 127, 0.45);
  box-shadow: 0 2px 12px rgba(16, 163, 127, 0.14), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.hub-card-glyph {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--chip-bg);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.hub-engine-card[data-engine="agy"] .hub-card-glyph {
  background: var(--chip-bg);
}

/* 引擎 glyph 着色：反重力走 Gemini 渐变字，OpenCode 走终端青绿 */
.hub-engine-card[data-engine="agy"] .hub-card-glyph {
  background: linear-gradient(135deg, #4285f4, #9b72cb 55%, #d96570);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hub-engine-card[data-engine="opencode"] .hub-card-glyph {
  background: none;
  color: #10a37f;
}

.hub-card-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.hub-card-name {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-card-desc {
  font-size: 10.5px;
  color: var(--text-tertiary);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-card-status {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.hub-card-status.ok {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.10);
}

.hub-card-status.off {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.10);
}

.hub-engine-card.ghost {
  background: transparent;
  border: 1px dashed var(--divider);
  box-shadow: none;
  cursor: default;
}

.hub-engine-card.ghost .hub-card-glyph {
  background: transparent;
  border: 0.5px dashed var(--divider);
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ===== Bot 指令 / 记忆 编辑弹窗（v56） ===== */
.bot-edit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bot-edit-backdrop[hidden] {
  display: none;
}

.bot-edit-card {
  width: min(480px, 100%);
  background: var(--sheet-bg);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  animation: botSheetUp 0.22s ease;
}

@keyframes botSheetUp {
  from { transform: translateY(30px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.bot-edit-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bot-edit-ico {
  font-size: 17px;
}

.bot-edit-head h3 {
  margin: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.bot-edit-close {
  border: none;
  background: var(--chip-bg);
  color: var(--text-secondary);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}

.bot-edit-desc {
  margin: 8px 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.bot-edit-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.bot-preset-chip {
  border: 0.5px solid var(--divider);
  background: var(--chip-bg);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 550;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bot-preset-chip:active {
  background: var(--chip-hover);
}

.bot-edit-card textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 0.5px solid var(--divider);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: inherit;
  min-height: 120px;
}

.bot-edit-card textarea:focus {
  outline: none;
  border-color: rgba(66, 133, 244, 0.45);
}

.bot-edit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.bot-edit-note {
  font-size: 10.5px;
  color: var(--text-tertiary);
}

.bot-edit-save {
  padding: 9px 22px;
  font-size: 13.5px;
  border-radius: 12px;
}

/* ===== v60 · 引擎氛围与组件美化 ===== */
body[data-engine="agy"] {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 130% 55% at 50% -18%, rgba(66, 133, 244, 0.11), transparent 52%),
    radial-gradient(ellipse 70% 40% at 100% 30%, rgba(155, 114, 203, 0.07), transparent 50%),
    linear-gradient(rgba(15, 23, 42, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.018) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px;
}

body[data-engine="opencode"] {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 120% 50% at 50% -15%, rgba(16, 163, 127, 0.12), transparent 52%),
    linear-gradient(rgba(15, 23, 42, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.022) 1px, transparent 1px);
  background-size: auto, 22px 22px, 22px 22px;
}

body[data-engine="agy"] #statusPill {
  padding: 5px 14px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(66, 133, 244, 0.42), rgba(155, 114, 203, 0.38), rgba(217, 101, 112, 0.32)) border-box;
  box-shadow: 0 2px 14px rgba(66, 133, 244, 0.1);
  color: var(--text-primary);
}

body[data-engine="agy"] #statusPill .status-dot.online,
body[data-engine="agy"] #statusPill #statusDot.online {
  background: #4285f4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.22);
}

body[data-engine="opencode"] #statusPill {
  border-color: rgba(16, 163, 127, 0.22);
  box-shadow: 0 2px 10px rgba(16, 163, 127, 0.08);
}

body[data-engine="opencode"] #statusPill #statusDot.online {
  background: #10a37f;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.22);
}

.hub-engine-card:not(.active):not(.ghost) {
  opacity: 0.9;
}

.hub-engine-card.ghost {
  opacity: 0.55;
  border-style: dashed;
  background: transparent;
}

.hub-engine-card.ghost .hub-card-glyph {
  color: var(--text-tertiary);
  background: var(--chip-bg);
  -webkit-text-fill-color: unset;
}

/* 反重力 · 对话区 Gemini 风 */
body[data-engine="agy"] .gemini-composer-box {
  border-radius: 22px;
  padding: 12px 14px 10px;
  border-color: rgba(66, 133, 244, 0.14);
  box-shadow: 0 4px 24px rgba(66, 133, 244, 0.06), 0 1px 3px rgba(15, 23, 42, 0.03);
}

body[data-engine="agy"] .gemini-composer-box:focus-within {
  border-color: rgba(66, 133, 244, 0.48);
  box-shadow: 0 10px 32px rgba(66, 133, 244, 0.12), 0 0 0 1px rgba(66, 133, 244, 0.16);
}

body[data-engine="agy"] .gemini-input-row textarea {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', sans-serif;
  font-size: 15.5px;
}

body[data-engine="agy"] .gemini-send-circle-btn {
  background: linear-gradient(135deg, #4285f4 0%, #9b72cb 52%, #d96570 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(66, 133, 244, 0.35);
}

body[data-engine="agy"] .claude-model-badge {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: transparent;
  background: linear-gradient(135deg, #4285f4, #9b72cb 60%, #d96570);
  -webkit-background-clip: text;
  background-clip: text;
  border: none;
  padding: 0 2px;
}

body[data-engine="agy"] .gemini-composer-hint .hint-dot {
  color: #9b72cb;
}

body[data-engine="agy"] .gemini-chip .chip-spark {
  font-family: inherit;
  background: linear-gradient(135deg, #4285f4, #9b72cb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body[data-engine="agy"] .gemini-chip:active {
  border-color: rgba(66, 133, 244, 0.35);
  background: rgba(66, 133, 244, 0.06);
}

/* OpenCode · 对话区 CLI 风 */
body[data-engine="opencode"] .gemini-composer-box:focus-within {
  border-color: rgba(16, 163, 127, 0.5);
  box-shadow: 0 8px 28px rgba(16, 163, 127, 0.12), 0 0 0 1px rgba(16, 163, 127, 0.2);
}

body[data-engine="opencode"] .gemini-send-circle-btn {
  background: linear-gradient(180deg, #12b886 0%, #0d9668 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 163, 127, 0.35);
}

body[data-engine="opencode"] .claude-model-badge {
  color: #0d9668;
  border-color: rgba(16, 163, 127, 0.28);
  background: rgba(16, 163, 127, 0.08);
}

body[data-engine="opencode"] .gemini-composer-hint .hint-dot {
  color: #10a37f;
}

body[data-engine="opencode"] .gemini-chip .chip-spark {
  color: #10a37f;
}

body[data-engine="opencode"] .gemini-chip:active {
  border-color: rgba(16, 163, 127, 0.35);
  background: rgba(16, 163, 127, 0.06);
}

body[data-engine="agy"] .gemini-greeting-sub {
  color: var(--text-secondary);
  max-width: 260px;
}

body[data-engine="opencode"] .gemini-greeting-sub {
  max-width: 280px;
}

/* 反重力侧栏 · 快捷开工 */
body[data-engine="opencode"] .drawer-agy-quick-section {
  display: none;
}

.drawer-quick-sym {
  background: linear-gradient(135deg, #4285f4, #9b72cb 55%, #d96570);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drawer-quick-prompt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.drawer-quick-prompt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 11px;
  min-height: 68px;
  text-align: left;
  background: var(--surface);
  border: 0.5px solid var(--divider);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-quick-prompt:active {
  transform: scale(0.98);
  border-color: rgba(66, 133, 244, 0.35);
  box-shadow: 0 2px 10px rgba(66, 133, 244, 0.1);
}

.drawer-quick-prompt .dqp-icon {
  font-size: 15px;
  line-height: 1;
}

.drawer-quick-prompt .dqp-text {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-engine="agy"] .drawer-new-chat-btn {
  border: 0.5px solid rgba(66, 133, 244, 0.22);
  background: linear-gradient(180deg, rgba(66, 133, 244, 0.06), rgba(155, 114, 203, 0.04));
}

body[data-engine="opencode"] .drawer-new-chat-btn {
  border-color: rgba(16, 163, 127, 0.22);
  background: rgba(16, 163, 127, 0.05);
}

/* ===== v61 · 极简设计系统（覆盖装饰性 v55–v60 样式）===== */

body[data-engine="agy"],
body[data-engine="opencode"] {
  background: var(--bg-page) !important;
  background-image: none !important;
}

/* 顶栏：底部分割线，无阴影 */
.gemini-top-header {
  border-bottom: 0.5px solid var(--divider);
  padding-bottom: 10px;
}

.gemini-avatar-circle {
  background: var(--text-primary);
  box-shadow: none;
  font-weight: 500;
}

.gemini-term-badge {
  box-shadow: none;
  border-radius: 10px;
}

/* 引擎切换：内嵌分段器 */
.gemini-brand-pill.engine-switcher {
  background: var(--chip-bg);
  border: none;
  box-shadow: none;
  padding: 2px;
  border-radius: 12px;
}

.engine-tab {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
}

.engine-tab.active {
  background: var(--surface);
  border: none;
  box-shadow: none;
  color: var(--text-primary);
  font-weight: 600;
}

.engine-tab-spark {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: inherit;
  font-size: 11px;
}

body[data-engine="opencode"] .engine-tab[data-engine="opencode"].active .engine-tab-glyph {
  color: var(--accent-engine-oc);
}

.drawer-dot-pulse {
  background: var(--text-primary);
  box-shadow: none;
  animation: none;
}

/* 首页舞台 */
.hub-stage {
  gap: 20px;
}

.hub-mark {
  width: 44px;
  height: 44px;
  color: var(--accent-engine-agy);
}

body[data-engine="opencode"] .hub-mark {
  color: var(--accent-engine-oc);
}

.hub-spark {
  width: 40px;
  height: 40px;
  animation: none !important;
  filter: none !important;
}

.hub-orbit,
.hub-spark-glow,
.hub-node {
  display: none !important;
}

body[data-engine="opencode"] .hub-spark stop,
body[data-engine="agy"] .hub-spark stop {
  display: none;
}

.gemini-greeting-heading {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.gemini-greeting-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* 工具架：纵向列表 */
.hub-engine-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
  padding: 0 20px;
}

.hub-engine-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: none;
  border: 0.5px solid var(--divider);
  background: var(--surface);
}

.hub-engine-card:not(.active):not(.ghost) {
  opacity: 1;
}

.hub-engine-card.active {
  border-color: var(--text-primary);
  box-shadow: none;
  background: var(--surface);
}

body[data-engine="agy"] .hub-engine-card.active,
body[data-engine="opencode"] .hub-engine-card.active {
  border-color: var(--text-primary);
  box-shadow: none;
}

body[data-engine="opencode"] .hub-engine-card.active {
  border-color: var(--accent-engine-oc);
}

.hub-engine-card.ghost {
  opacity: 0.45;
  border-style: dashed;
  background: transparent;
}

.hub-card-glyph {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--chip-bg);
  font-size: 12px;
  color: var(--text-secondary);
  -webkit-text-fill-color: unset;
}

.hub-engine-card[data-engine="agy"] .hub-card-glyph,
.hub-engine-card[data-engine="opencode"] .hub-card-glyph {
  background: var(--chip-bg);
  color: var(--text-secondary);
  background-clip: border-box;
}

.hub-card-name {
  font-size: 13px;
  font-weight: 600;
}

.hub-card-desc {
  font-size: 11px;
  color: var(--text-tertiary);
}

.hub-card-status {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--text-tertiary);
  border: none;
}

/* 状态胶囊 */
.gemini-host-pill,
body[data-engine="agy"] #statusPill,
body[data-engine="opencode"] #statusPill {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 12px;
  border: 0.5px solid var(--divider);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: none;
  color: var(--text-secondary);
}

body[data-engine="agy"] #statusPill {
  background: var(--surface);
  border: 0.5px solid var(--divider);
}

#statusDot.status-dot.online,
body[data-engine="agy"] #statusDot.online,
body[data-engine="opencode"] #statusDot.online {
  background: var(--text-primary);
  box-shadow: none;
  width: 6px;
  height: 6px;
}

body[data-engine="opencode"] #statusDot.online {
  background: var(--accent-engine-oc);
}

.status-dot.running {
  animation: none;
  background: var(--text-secondary);
  box-shadow: none;
}

/* 快捷建议 */
.gemini-suggestion-chips {
  gap: 6px;
  max-width: 360px;
  padding: 0 20px;
}

.gemini-chip {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  box-shadow: none;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--surface);
}

.gemini-chip .chip-spark {
  font-family: inherit;
  font-size: 12px;
  color: var(--text-tertiary);
  background: none;
  -webkit-text-fill-color: currentColor;
}

body[data-engine="agy"] .gemini-chip:active,
body[data-engine="opencode"] .gemini-chip:active {
  background: var(--chip-bg);
  border-color: var(--divider);
}

body[data-engine="opencode"] .gemini-chip .chip-spark {
  color: var(--accent-engine-oc);
  font-family: ui-monospace, monospace;
}

/* 底部输入 */
.gemini-bottom-composer-section {
  padding: 0 16px;
  gap: 4px;
}

.gemini-composer-box,
body[data-engine="agy"] .gemini-composer-box,
body[data-engine="opencode"] .gemini-composer-box {
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--divider);
  box-shadow: none;
  padding: 10px 12px;
  background: var(--surface);
}

.gemini-composer-box:focus-within,
body[data-engine="agy"] .gemini-composer-box:focus-within,
body[data-engine="opencode"] .gemini-composer-box:focus-within {
  border-color: var(--text-primary);
  box-shadow: none;
}

body[data-engine="opencode"] .gemini-composer-box:focus-within {
  border-color: var(--accent-engine-oc);
}

.gemini-input-row textarea,
body[data-engine="agy"] .gemini-input-row textarea {
  font-family: inherit;
  font-size: 15px;
}

.gemini-send-circle-btn,
body[data-engine="agy"] .gemini-send-circle-btn,
body[data-engine="opencode"] .gemini-send-circle-btn {
  width: 34px;
  height: 34px;
  background: var(--text-primary);
  box-shadow: none;
  color: var(--accent-contrast);
}

body[data-engine="opencode"] .gemini-send-circle-btn {
  background: var(--accent-engine-oc);
}

.claude-model-badge,
body[data-engine="agy"] .claude-model-badge,
body[data-engine="opencode"] .claude-model-badge {
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  padding: 0;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.gemini-composer-hint {
  font-size: 10px;
  color: var(--text-tertiary);
  opacity: 0.85;
}

.gemini-composer-hint .hint-dot,
body[data-engine="agy"] .gemini-composer-hint .hint-dot,
body[data-engine="opencode"] .gemini-composer-hint .hint-dot {
  display: none;
}

.gemini-tool-btn {
  opacity: 0.7;
}

/* 侧栏 */
.gemini-drawer-backdrop {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
}

.drawer-sparkle {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-primary);
}

.drawer-sparkle.drawer-sparkle--cli {
  color: var(--accent-engine-oc);
  font-family: ui-monospace, monospace;
}

.drawer-tasks-section .term-sym:not(.task-sym--cli) {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-tertiary);
}

body[data-engine="agy"] .drawer-new-chat-btn,
body[data-engine="opencode"] .drawer-new-chat-btn {
  background: var(--surface);
  border: 0.5px solid var(--divider);
  box-shadow: none;
  border-radius: var(--radius-md);
}

.drawer-quick-prompt {
  min-height: auto;
  box-shadow: none;
  border-radius: var(--radius-md);
}

.drawer-quick-prompt:active {
  box-shadow: none;
  border-color: var(--divider);
  background: var(--chip-bg);
}

.drawer-quick-sym {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-tertiary);
}

/* 消息气泡极简 */
.msg-bubble.user {
  border-radius: 16px 16px 4px 16px;
}

.msg-bubble.assistant {
  padding-left: 0;
}

/* 锁屏 */
.lock-card {
  box-shadow: none;
  border: 0.5px solid var(--divider);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #0a0a0b;
    --surface: #141416;
    --chip-bg: rgba(255, 255, 255, 0.06);
    --divider: rgba(255, 255, 255, 0.1);
    --user-bubble-bg: #1c1c1f;
    --user-bubble-text: #f4f4f5;
  }

  body[data-engine="agy"],
  body[data-engine="opencode"] {
    background: var(--bg-page) !important;
  }

  .hub-engine-card.ghost {
    opacity: 0.35;
  }
}

/* ===== v62 · 居中对话框 + 双图标 / 滑动切引擎 ===== */

.header-engine-name {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
  user-select: none;
}

.tab-panel#tabHome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: calc(100vh - 64px - env(safe-area-inset-top, 0px));
  height: 100%;
  padding: 0;
  gap: 0;
}

.hub-home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  gap: 14px;
  padding: 8px 0 12px;
  will-change: transform;
}

.hub-engine-dock {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  width: 100%;
  margin-bottom: 4px;
}

.hub-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 4px 8px;
  cursor: pointer;
  opacity: 0.42;
  transition: opacity 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.hub-dock-btn.active {
  opacity: 1;
}

.hub-dock-btn.off {
  opacity: 0.25;
}

.hub-dock-btn:active:not(.off) {
  transform: scale(0.94);
}

.hub-dock-glyph {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--surface);
  border: 0.5px solid var(--divider);
  font-family: inherit;
}

.hub-dock-btn[data-engine="opencode"] .hub-dock-glyph {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px;
}

.hub-dock-btn.active .hub-dock-glyph {
  border-color: var(--text-primary);
  box-shadow: none;
}

body[data-engine="opencode"] .hub-dock-btn[data-engine="opencode"].active .hub-dock-glyph {
  border-color: var(--accent-engine-oc);
  color: var(--accent-engine-oc);
}

.hub-dock-name {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
}

.hub-dock-btn.active .hub-dock-name {
  color: var(--text-secondary);
  font-weight: 600;
}

.hub-swipe-hint {
  margin: -4px 0 0;
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  user-select: none;
}

.hub-home-center .hub-mark {
  display: none;
}

.home-composer-section {
  width: 100%;
  max-width: 400px;
  margin: 8px auto 0;
  padding: 0;
  flex-shrink: 0;
}

.hub-home-center .gemini-bottom-composer-section {
  padding: 0;
  margin: 0;
  width: 100%;
}

.gemini-suggestion-chips,
#geminiSuggestions {
  display: none !important;
}

.hub-engine-grid {
  display: none !important;
}

.hub-home-center .gemini-greeting-group {
  gap: 2px;
}

.hub-home-center .gemini-host-pill {
  margin-bottom: 4px;
}

/* ===== v64 · 首页布局与视觉（home-canvas / app-header）===== */

.app-root {
  background-image: none;
}

.app-header,
.gemini-top-header {
  flex-shrink: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 12px) + 10px) 16px 12px;
  background: var(--bg-page);
  border-bottom: 0.5px solid var(--divider);
  z-index: 30;
}

.app-header-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-header-menu:active {
  background: var(--chip-bg);
}

.app-header-menu .menu-line {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--text-primary);
}

.app-header-menu .menu-line:first-child {
  width: 22px;
}

.app-header-menu .menu-line.short {
  width: 14px;
}

.app-header-title {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.app-header-term {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0.5px solid var(--divider);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.app-header-term:active {
  background: var(--chip-bg);
}

.app-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-contrast);
  background: var(--text-primary);
}

.app-shell.home-active,
.app-shell:has(#tabHome.active) {
  padding: 0 20px calc(env(safe-area-inset-bottom, 12px) + 4px);
  overflow: hidden;
}

.tab-panel#tabHome {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 0;
  justify-content: stretch;
  gap: 0;
}

.home-engine-rail,
#hubEngineDock {
  display: none !important;
}

.home-canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 4px 0 8px;
  will-change: transform;
}

.home-hero {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  flex-shrink: 0;
}

.home-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.home-title {
  margin: 0;
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--text-primary);
}

.home-tagline {
  margin: 2px 0 0;
  max-width: 22em;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

body[data-engine="opencode"] .home-tagline {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 24em;
  color: var(--text-secondary);
}

body[data-engine="opencode"] .home-title {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-status {
  margin-top: 8px;
  border: 0.5px solid var(--divider);
  background: var(--chip-bg);
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.home-status:active {
  background: var(--chip-hover);
}

.home-engine-rail {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--chip-bg);
  flex-shrink: 0;
}

.home-engine-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  width: 32px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.12s ease, color 0.2s ease;
}

.home-engine-btn.active {
  opacity: 1;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.home-engine-btn.off {
  opacity: 0.22;
  cursor: not-allowed;
}

.home-engine-btn:active:not(.off) {
  transform: scale(0.94);
}

.home-engine-icon {
  display: block;
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
}

.home-engine-btn[data-engine="opencode"] .home-engine-icon {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.04em;
  transform: translateY(-0.5px);
}

body[data-engine="opencode"] .home-engine-btn[data-engine="opencode"].active {
  color: var(--accent-engine-oc);
}

.home-engine-label {
  display: none;
}

.home-composer-card {
  width: 100%;
  max-width: 400px;
  flex-shrink: 0;
}

.home-composer.gemini-composer-box {
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 0.5px solid var(--divider);
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.06),
    0 2px 8px rgba(15, 23, 42, 0.03);
  background: var(--surface);
}

.home-composer.gemini-composer-box:focus-within {
  border-color: rgba(24, 24, 27, 0.18);
  box-shadow:
    0 16px 44px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(24, 24, 27, 0.06);
}

body[data-engine="opencode"] .home-composer.gemini-composer-box:focus-within {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow:
    0 16px 44px rgba(13, 148, 136, 0.1),
    0 0 0 1px rgba(13, 148, 136, 0.12);
}

.home-composer .composer-term-bar {
  margin: 0;
  padding: 8px 14px 6px;
  border-bottom: 0.5px solid var(--divider);
}

.home-composer-tag {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.home-composer-input {
  width: 100%;
  min-height: 72px;
  max-height: 140px;
  margin: 0;
  padding: 12px 14px 4px;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', sans-serif;
}

body[data-engine="opencode"] .home-composer-input {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, -apple-system, sans-serif;
  font-size: 15px;
}

.home-composer-input::placeholder {
  color: var(--text-tertiary);
}

.home-composer .img-preview-bar {
  padding: 8px 12px 0;
}

.home-composer-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 10px;
}

.home-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.home-icon-btn:active {
  background: var(--chip-bg);
}

.home-term-btn span {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.home-model {
  margin-left: auto;
  padding-right: 4px;
  font-size: 11px;
  font-weight: 550;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38%;
}

.home-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--accent-contrast);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

body[data-engine="opencode"] .home-send {
  background: var(--accent-engine-oc);
}

.home-send:active:not(:disabled) {
  transform: scale(0.94);
}

.home-send:disabled {
  opacity: 0.45;
}

.home-send.is-sending svg {
  opacity: 0.35;
}

.home-footnote {
  margin: -6px 0 0;
  width: 100%;
  max-width: 400px;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-engine-btn.active {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  }

  :root:not([data-theme="light"]) .home-composer.gemini-composer-box {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  }

  :root:not([data-theme="light"]) .home-composer.gemini-composer-box:focus-within {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

@media (max-height: 640px) {
  .home-canvas {
    gap: 14px;
    justify-content: flex-start;
    padding-top: 12px;
  }

}

body[data-engine="opencode"] {
  background-color: var(--bg-page) !important;
  background-image: none !important;
}

#statusPill.home-status {
  font-size: 12px;
  font-weight: 550;
}

#statusPill.home-status .status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

body[data-engine="opencode"] #statusPill.home-status .status-dot.online {
  background: var(--accent-engine-oc);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

/* ===== v70 · 首页：左对齐文案 + 安静顶栏 + 一张输入卡 ===== */

body[data-engine="agy"] {
  background: #f3f3f1 !important;
  background-image: none !important;
}

body:has(#tabHome.active) .app-header {
  border-bottom-color: transparent;
  background: transparent;
  padding-bottom: 4px;
}

.app-header-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.app-header-avatar {
  width: 30px;
  height: 30px;
  background: #e7e7e4;
  color: #1c1c1a;
  font-size: 12px;
  font-weight: 600;
}

body[data-engine="agy"] header.app-header #statusPill.home-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin: 0;
  padding: 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(24, 24, 27, 0.48);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

body[data-engine="agy"] header.app-header #statusPill .status-dot {
  width: 6px;
  height: 6px;
  background: #a1a1aa;
  box-shadow: none;
}

body[data-engine="agy"] header.app-header #statusPill .status-dot.online {
  background: #16a34a;
}

body[data-engine="agy"] header.app-header #statusPill .status-dot.offline {
  background: #d97706;
}

body[data-engine="agy"] header.app-header #statusPill .status-dot.running {
  background: #2563eb;
}

.home-canvas {
  align-items: stretch;
  justify-content: center;
  gap: 36px;
  padding: 8px 2px 12vh;
}

.home-hero {
  align-items: flex-start;
  text-align: left;
  max-width: none;
  gap: 0;
}

.home-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(24, 24, 27, 0.45);
}

.home-title {
  font-size: clamp(30px, 8vw, 36px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.home-tagline {
  margin: 12px 0 0;
  max-width: 16em;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(24, 24, 27, 0.62);
}

.home-composer-card {
  max-width: none;
}

.home-composer.gemini-composer-box,
body[data-engine="agy"] .home-composer.gemini-composer-box {
  border-radius: 20px;
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.05);
}

.home-composer.gemini-composer-box:focus-within,
body[data-engine="agy"] .home-composer.gemini-composer-box:focus-within {
  border-color: rgba(24, 24, 27, 0.16);
  box-shadow: 0 14px 36px rgba(24, 24, 27, 0.07);
}

body[data-engine="agy"] .home-composer .composer-term-bar {
  display: none;
}

.home-composer-input {
  min-height: 84px;
  padding: 16px 16px 6px;
  font-size: 16px;
  line-height: 1.5;
}

.home-composer-bar {
  padding: 4px 8px 8px 8px;
}

.home-icon-btn svg {
  width: 18px;
  height: 18px;
}

.home-model {
  font-size: 12px;
  font-weight: 500;
  color: rgba(24, 24, 27, 0.38);
}

.home-send {
  width: 34px;
  height: 34px;
  background: #1c1c1a;
}

.home-send svg {
  width: 16px;
  height: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-engine="agy"] {
    background: #0e0e0d !important;
  }

  :root:not([data-theme="light"]) .app-header-avatar {
    background: #2a2a28;
    color: #f4f4f2;
  }

  :root:not([data-theme="light"]) body[data-engine="agy"] header.app-header #statusPill.home-status {
    color: rgba(244, 244, 242, 0.5);
  }

  :root:not([data-theme="light"]) .home-kicker {
    color: rgba(244, 244, 242, 0.42);
  }

  :root:not([data-theme="light"]) .home-tagline {
    color: rgba(244, 244, 242, 0.62);
  }

  :root:not([data-theme="light"]) .home-composer.gemini-composer-box,
  :root:not([data-theme="light"]) body[data-engine="agy"] .home-composer.gemini-composer-box {
    background: #171716;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  :root:not([data-theme="light"]) .home-model {
    color: rgba(244, 244, 242, 0.38);
  }

  :root:not([data-theme="light"]) .home-send {
    background: #f4f4f2;
    color: #141413;
  }
}

/* ===== v72 · 首页：一句问候，输入条贴底 ===== */

body[data-engine="agy"] {
  background: #ffffff !important;
  background-image: none !important;
}

body:has(#tabHome.active) .app-header,
body:has(#tabHome.active) header.app-header {
  border-bottom-color: transparent;
  background: #ffffff;
}

body:has(#tabHome.active) .app-shell,
.app-shell.home-active,
.app-shell:has(#tabHome.active) {
  padding: 0;
  background: #ffffff;
}

#tabHome.tab-panel {
  height: 100%;
  min-height: 0;
}

#tabHome .home-canvas {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: #ffffff;
}

#tabHome .home-hero {
  flex: 1;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  padding: 0 12px 9vh;
}

#tabHome .home-kicker {
  display: none;
}

#tabHome .home-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.25;
  color: #1c1c1e;
}

#tabHome .home-tagline {
  margin: 8px 0 0;
  max-width: none;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #8e8e93;
}

#tabHome .home-composer-card {
  width: 100%;
  max-width: none;
  flex-shrink: 0;
}

#tabHome .home-composer.gemini-composer-box,
body[data-engine="agy"] #tabHome .home-composer.gemini-composer-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#tabHome .home-composer.gemini-composer-box:focus-within,
body[data-engine="agy"] #tabHome .home-composer.gemini-composer-box:focus-within {
  border: none;
  box-shadow: none;
}

#tabHome .composer-term-bar,
#tabHome .home-model,
#tabHome .home-term-btn {
  display: none !important;
}

#tabHome .home-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 48px;
  padding: 4px 4px 4px 2px;
  border-radius: 24px;
  background: #f2f2f7;
}

#tabHome .home-composer-input {
  flex: 1;
  width: auto;
  min-height: 24px;
  max-height: 120px;
  margin: 0;
  padding: 10px 4px 10px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.35;
  color: #1c1c1e;
}

#tabHome .home-composer-input::placeholder {
  color: #aeaeb2;
}

#tabHome .home-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  color: #1c1c1e;
}

#tabHome .home-send {
  width: 32px;
  height: 32px;
  margin: 2px 2px 2px 0;
  background: #1c1c1e;
  color: #ffffff;
}

#tabHome .img-preview-bar {
  padding: 0 4px;
}

header.app-header .app-header-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

header.app-header .app-header-avatar {
  width: 28px;
  height: 28px;
  background: #f2f2f7;
  color: #1c1c1e;
  font-size: 12px;
}

body[data-engine="agy"] header.app-header #statusPill.home-status {
  color: #8e8e93;
  font-size: 13px;
  font-weight: 400;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-engine="agy"],
  :root:not([data-theme="light"]) body:has(#tabHome.active) .app-header,
  :root:not([data-theme="light"]) body:has(#tabHome.active) .app-shell,
  :root:not([data-theme="light"]) #tabHome .home-canvas {
    background: #000000 !important;
  }

  :root:not([data-theme="light"]) #tabHome .home-title {
    color: #f5f5f7;
  }

  :root:not([data-theme="light"]) #tabHome .home-composer-row {
    background: #1c1c1e;
  }

  :root:not([data-theme="light"]) #tabHome .home-composer-input {
    color: #f5f5f7;
  }

  :root:not([data-theme="light"]) #tabHome .home-icon-btn {
    color: #f5f5f7;
  }

  :root:not([data-theme="light"]) #tabHome .home-send {
    background: #f5f5f7;
    color: #000000;
  }

  :root:not([data-theme="light"]) header.app-header .app-header-avatar {
    background: #1c1c1e;
    color: #f5f5f7;
  }
}

/* ===== v73 · 书写页：大字左齐，没有输入胶囊 ===== */

body[data-engine="agy"],
body:has(#tabHome.active) .app-header,
body:has(#tabHome.active) .app-shell,
#tabHome .home-canvas {
  background: #fafaf9 !important;
  background-image: none !important;
}

body:has(#tabHome.active) header.app-header {
  border-bottom: none;
  padding-left: 22px;
  padding-right: 22px;
}

header.app-header .app-header-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

header.app-header .app-header-avatar {
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 500;
}

#tabHome .home-canvas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100%;
  min-height: 0;
  gap: 0;
  padding: 28px 28px calc(env(safe-area-inset-bottom, 0px) + 18px);
}

#tabHome .home-hero {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 0;
  padding: 12px 0 0;
}

#tabHome .home-kicker {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #1a1a1a;
}

#tabHome .home-title {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
  text-align: left;
  color: #1a1a1a;
}

#tabHome .home-tagline {
  display: none;
}

body[data-engine="agy"] #tabHome #statusPill.home-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #9a9a96;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

#tabHome .home-status .status-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
  background: #b0b0aa;
}

#tabHome .home-status .status-dot.online { background: #1a1a1a; }
#tabHome .home-status .status-dot.offline { background: #c4a15a; }
#tabHome .home-status .status-dot.running { background: #1a1a1a; }

#tabHome .home-composer-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin-top: 36px;
}

#tabHome .home-composer.gemini-composer-box,
body[data-engine="agy"] #tabHome .home-composer.gemini-composer-box,
#tabHome .home-composer.gemini-composer-box:focus-within,
body[data-engine="agy"] #tabHome .home-composer.gemini-composer-box:focus-within {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#tabHome .composer-term-bar,
#tabHome .home-model,
#tabHome .home-term-btn {
  display: none !important;
}

#tabHome .home-composer-input {
  flex: 1;
  width: 100%;
  min-height: 72px;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

#tabHome .home-composer-input::placeholder {
  color: #c8c8c4;
}

#tabHome .home-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  margin-top: 4px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

#tabHome .home-icon-btn,
#tabHome .home-send {
  width: auto;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#tabHome .home-send {
  margin-left: auto;
  font-weight: 600;
}

#tabHome .home-composer-input:placeholder-shown ~ .home-composer-row .home-send {
  color: #c8c8c4;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-engine="agy"],
  :root:not([data-theme="light"]) body:has(#tabHome.active) .app-header,
  :root:not([data-theme="light"]) body:has(#tabHome.active) .app-shell,
  :root:not([data-theme="light"]) #tabHome .home-canvas {
    background: #111110 !important;
  }

  :root:not([data-theme="light"]) header.app-header .app-header-title,
  :root:not([data-theme="light"]) header.app-header .app-header-avatar,
  :root:not([data-theme="light"]) #tabHome .home-kicker,
  :root:not([data-theme="light"]) #tabHome .home-title,
  :root:not([data-theme="light"]) #tabHome .home-composer-input,
  :root:not([data-theme="light"]) #tabHome .home-icon-btn,
  :root:not([data-theme="light"]) #tabHome .home-send {
    color: #f3f3f1;
  }

  :root:not([data-theme="light"]) #tabHome .home-status {
    color: #8d8d88;
  }

  :root:not([data-theme="light"]) #tabHome .home-composer-input::placeholder,
  :root:not([data-theme="light"]) #tabHome .home-composer-input:placeholder-shown ~ .home-composer-row .home-send {
    color: #5c5c58;
  }

  :root:not([data-theme="light"]) header.app-header .app-header-avatar {
    background: transparent;
  }
}
