
/* 1. Fix wide gap inside Dot Auto dropdown */
#ace-model-box { width: auto !important; max-width: 175px !important; flex-shrink: 0 !important; }
#model-selector { width: auto !important; min-width: 120px !important; max-width: 175px !important; padding-right: 34px !important; }
#model-status-dot { right: 22px !important; }

/* 2. Prevent top-bar ACE logo from ever squishing into tiny dots */
header svg, .topbar svg, .brand-logo, .ace-logo-svg { flex-shrink: 0 !important; min-width: 24px !important; }

/* 3. Keep bottom mode bar on one clean scrollable line (no ugly 2-row wrap when Arcade opens) */
.mode-bar, .composer-tools, .quick-toggles {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
.mode-bar::-webkit-scrollbar, .composer-tools::-webkit-scrollbar { display: none !important; }

/* 4. Drag-and-Drop Overlay + Attribution */
#ace-drop-ov {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(8,11,18,.86); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; pointer-events: none;
}
#ace-drop-ov.show { display: flex !important; }
#ace-drop-ov .card {
  border: 2px dashed #f97316; background: #121826; border-radius: 18px;
  padding: 28px 40px; text-align: center; color: #f8fafc;
  box-shadow: 0 0 36px rgba(249,115,22,.28);
}
.ace-attr { font-size: 11px; color: #64748b; margin-left: 8px; }
#native-arcade-canvas { touch-action: none; border-radius: 12px; }


/* ==================== ACE v36.6 CLAUDE/GEMINI POLISH ==================== */
.ace-v-badge { font-size: 11px; color: #64748b; margin-left: 6px; }
.ace-single-row-bar { flex-wrap: nowrap !important; overflow-x: auto !important; scrollbar-width: none !important; }
.ace-single-row-bar::-webkit-scrollbar { display: none !important; }

/* Claude/Gemini-style bottom file preview card */
#attach-bar {
  display: none; align-items: center; gap: 10px;
  padding: 8px 10px !important; border-radius: 14px !important;
  background: rgba(17, 24, 39, 0.96) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  max-width: 360px !important; width: fit-content !important;
}
#attach-bar[style*="flex"], #attach-bar.show { display: inline-flex !important; }
#ace-file-preview { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.ace-prev-img { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; border: 1px solid rgba(255,255,255,0.12); flex-shrink: 0; }
.ace-prev-badge {
  min-width: 44px; height: 40px; border-radius: 9px; color: #fff;
  font-weight: 800; font-size: 11px; display: inline-flex;
  align-items: center; justify-content: center; letter-spacing: 0.4px; flex-shrink: 0;
}
.ace-prev-meta { display: flex; flex-direction: column; min-width: 0; }
.ace-prev-fn { font-size: 12.5px; font-weight: 600; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.ace-prev-sz { font-size: 11px; color: #94a3b8; }

/* Dark sleek scrollbars & guide cards */
.modal ::-webkit-scrollbar, .modal::-webkit-scrollbar { width: 6px; }
.modal ::-webkit-scrollbar-track, .modal::-webkit-scrollbar-track { background: transparent; }
.modal ::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }
#guide-modal .guide-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
#guide-modal .guide-card p { margin: 4px 0 0; font-size: 13px; color: #cbd5e1; line-height: 1.5; }
#guide-modal kbd { background: #1e293b; border: 1px solid #475569; border-radius: 4px; padding: 1px 5px; font-size: 11px; color: #f8fafc; }
#legal-modal code, #guide-modal code { background: #1e293b; padding: 1px 5px; border-radius: 4px; color: #38bdf8; font-size: 12px; }


/* ==================== ACE v36.7 FINAL PLAY-STORE POLISH ==================== */
.ace-single-row-bar { justify-content: flex-start !important; padding: 0 8px !important; gap: 6px !important; }
#guide-modal .guide-step p b { display: inline !important; color: #f8fafc; }


/* ACE v37.0 COMMERCIAL LOCK */
.ace-single-row-bar { justify-content: flex-start !important; padding: 0 8px !important; gap: 6px !important; }
#guide-modal .guide-step p b { display: inline !important; color: #f8fafc; }


/* ==================== ACE v38.0 NATIVE MOBILE UX OVERHAUL ==================== */
#ace-img-lightbox {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(4, 6, 12, 0.94); backdrop-filter: blur(8px);
  flex-direction: column; align-items: center; justify-content: center; padding: 16px;
}
#ace-img-lightbox.open { display: flex !important; }
#ace-lb-img { max-width: 96vw; max-height: 84vh; border-radius: 12px; object-fit: contain; box-shadow: 0 12px 48px rgba(0,0,0,0.7); }
.ace-lb-hint { margin-top: 12px; font-size: 12px; color: #94a3b8; }
#messages img, #attach-bar img { cursor: zoom-in; }

/* Fix green status dot collision on mobile & desktop */
#ace-model-box { position: relative !important; display: inline-flex !important; align-items: center !important; max-width: 150px !important; }
#model-status-dot { right: 18px !important; pointer-events: none !important; }

/* Clean scrollable pill strip with zero left/right clipping */
.ace-mobile-pill-strip {
  display: flex !important; flex-wrap: nowrap !important;
  justify-content: flex-start !important; overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important; scrollbar-width: none !important;
  width: 100% !important; max-width: 100vw !important; padding: 4px 12px !important; gap: 6px !important;
  box-sizing: border-box !important;
}
.ace-mobile-pill-strip::-webkit-scrollbar { display: none !important; }
.ace-mobile-pill-strip > * { flex-shrink: 0 !important; }

/* Hide desktop code-runner buttons (.html / Full) while Arcade is open */
body.arcade-mode #split-preview-pane button[onclick*="download"],
body.arcade-mode #split-preview-pane button[onclick*="Download"],
body.arcade-mode #split-preview-pane button[onclick*="Full"],
body.arcade-mode #split-preview-pane button[onclick*="full"] { display: none !important; }

/* True 100% Full-Screen Mobile Arcade + Clean 100vw Composer */
@media (max-width: 768px) {
  html, body { overflow-x: hidden !important; max-width: 100vw !important; }
  .composer-row-wrap, footer, #composer, .composer-dock {
    width: 100% !important; max-width: calc(100vw - 16px) !important;
    margin-left: auto !important; margin-right: auto !important; box-sizing: border-box !important;
  }
  #split-preview-pane.ace-arcade-fullscreen,
  body.arcade-mode #split-preview-pane.open {
    position: fixed !important; inset: 0 !important;
    width: 100vw !important; max-width: 100vw !important;
    height: 100dvh !important; z-index: 5000 !important;
    background: #070913 !important; border: none !important;
  }
  #native-arcade-canvas { width: min(92vw, 350px) !important; height: auto !important; }
  .native-arcade-dpad button { min-width: 56px !important; min-height: 44px !important; font-size: 16px !important; }
}


/* ==================== ACE v38.5 CLAUDE-GRADE CLEAN UI & TYPOGRAPHY ==================== */
/* 1. Hide VERA/SABO/NOVA starter cards & task chips in normal Chat (show ONLY in Project mode) */
body:not(.ace-in-project-mode) .minimal-hero .starter-grid,
body:not(.ace-in-project-mode) #task-chips { display: none !important; }

/* 2. Minimalist centered Claude-style welcome hero */
.minimal-hero {
  display: flex !important; flex-direction: column !important; align-items: center !important;
  justify-content: center !important; text-align: center !important;
  min-height: 52vh !important; padding: 24px 20px !important; gap: 10px !important;
}
.minimal-hero-logo { width: 112px !important; height: 58px !important; margin-bottom: 6px !important; }
.minimal-hero h1 { font-size: clamp(26px, 6vw, 34px) !important; font-weight: 700 !important; letter-spacing: -0.02em !important; margin: 0 !important; }
.minimal-hero .hero-sub { font-size: 15px !important; color: #94a3b8 !important; max-width: 360px !important; line-height: 1.5 !important; margin: 0 !important; }

/* 3. Fix Dot Auto spacing & green dot (inline, NEVER overlaps Arcade button) */
#topbar { gap: 8px !important; padding: 0 12px !important; }
.topbar-left { display: flex !important; align-items: center !important; gap: 8px !important; min-width: 0 !important; flex: 0 1 auto !important; }
.topbar-right { display: flex !important; align-items: center !important; gap: 6px !important; flex-shrink: 0 !important; }
.model-picker-wrap {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  max-width: fit-content !important; width: auto !important; padding: 4px 10px !important;
  border-radius: 10px !important; position: relative !important;
}
#ace-model-box {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  width: auto !important; max-width: 155px !important; position: static !important;
}
#model-selector {
  width: auto !important; min-width: 96px !important; max-width: 135px !important;
  padding: 4px 18px 4px 4px !important; font-size: 14.5px !important; font-weight: 600 !important;
}
#model-status-dot {
  position: static !important; transform: none !important; right: auto !important; top: auto !important;
  width: 7px !important; height: 7px !important; flex-shrink: 0 !important; margin-left: -4px !important;
}

/* 4. Claude/Gemini-grade readable typography & spacious composer */
#chat-stream, .msg-body, .msg-content { font-size: 15.5px !important; line-height: 1.68 !important; }
.msg, .message-row { padding: 12px 16px !important; }
#prompt-input, textarea#prompt-input { font-size: 16px !important; line-height: 1.45 !important; min-height: 44px !important; }


/* ==================== ACE v39.0 LAUNCH SPLASH & FINAL CLAUDE-GRADE CLEANUP ==================== */
#ace-launch-splash {
  position: fixed; inset: 0; z-index: 999999;
  background: radial-gradient(circle at 50% 45%, #121829 0%, #06080f 75%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
#ace-launch-splash svg { filter: drop-shadow(0 0 22px rgba(249,115,22,0.35)); animation: aceSplashPulse 0.6s ease; }
#ace-launch-splash .ace-sp-name { font-size: 20px; font-weight: 800; letter-spacing: 5px; color: #f8fafc; opacity: 0.92; }
#ace-launch-splash.fade-out { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes aceSplashPulse { 0% { opacity: 0; transform: scale(0.86); } 100% { opacity: 1; transform: scale(1); } }

/* Remove stray green dot overlapping Arcade icon */
#model-status-dot { display: none !important; }

/* ==================== ACE v41.0 RICH PASTE + BRANDED MODE SHEET + CLEAN BAR ==================== */
.search-ace-mini { display: none !important; }

#prompt-input.ace-hidden-native {
  position: absolute !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important; overflow: hidden !important;
}
#ace-rich-input {
  flex: 1 !important; min-width: 0 !important; min-height: 24px !important; max-height: 120px !important;
  overflow-y: auto !important; padding: 6px 4px !important;
  color: #f1f5f9 !important; font-size: 16px !important; line-height: 1.4 !important;
  outline: none !important; word-break: break-word !important; white-space: pre-wrap !important;
  -webkit-user-modify: read-write !important;
}
#ace-rich-input:empty::before { content: attr(data-placeholder); color: #64748b; pointer-events: none; }
#ace-rich-input img { display: none !important; }

#attach-bar {
  display: none !important; width: 100% !important; max-width: 100% !important;
  padding: 8px 12px !important; margin-bottom: 8px !important;
  border-radius: 16px !important; background: #111827 !important;
  border: 1px solid rgba(56,189,248,0.35) !important;
  align-items: center !important; gap: 10px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45) !important;
}
#attach-bar.show { display: flex !important; }
#attach-thumb {
  display: none !important; width: 52px !important; height: 52px !important;
  border-radius: 10px !important; object-fit: cover !important; flex-shrink: 0 !important;
  border: 1px solid rgba(255,255,255,0.16) !important; cursor: zoom-in !important;
}
#attach-thumb.show { display: block !important; }
#attach-file-chip {
  display: none !important; width: 44px !important; height: 44px !important;
  border-radius: 10px !important; align-items: center !important; justify-content: center !important;
  font-size: 11px !important; font-weight: 800 !important; letter-spacing: 0.4px !important;
  background: rgba(56,189,248,0.16) !important; color: #38bdf8 !important;
  border: 1px solid rgba(56,189,248,0.35) !important; flex-shrink: 0 !important;
}
#attach-file-chip.show { display: flex !important; }
#attach-name {
  flex: 1 !important; min-width: 0 !important; overflow: hidden !important;
  text-overflow: ellipsis !important; white-space: nowrap !important;
  color: #e2e8f0 !important; font-size: 13px !important; font-weight: 500 !important;
}

#model-selector, #model-status-dot { display: none !important; }
#ace-mode-trigger {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  padding: 7px 12px !important; border-radius: 999px !important;
  background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.14) !important;
  color: #f8fafc !important; font-size: 14px !important; font-weight: 600 !important;
  cursor: pointer !important; white-space: nowrap !important;
  -webkit-tap-highlight-color: transparent !important;
}
#ace-mode-trigger:active { transform: scale(0.97); background: rgba(255,255,255,0.12) !important; }
#ace-mode-trigger .ace-mode-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
#ace-mode-trigger .ace-mode-chev { opacity: 0.7; font-size: 11px; }

#ace-mode-backdrop {
  display: none; position: fixed; inset: 0; z-index: 100000;
  background: rgba(2, 6, 14, 0.78); backdrop-filter: blur(6px);
  align-items: flex-end; justify-content: center;
}
#ace-mode-backdrop.open { display: flex !important; }
#ace-mode-sheet {
  width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto;
  background: #0d121c !important; border-top: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px 22px 0 0; padding: 12px 16px 26px;
  box-shadow: 0 -14px 48px rgba(0,0,0,0.85); color: #f1f5f9;
  animation: aceSheetUp 0.2s ease-out;
}
@keyframes aceSheetUp { from { transform: translateY(28px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.ace-sheet-handle { width: 40px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.22); margin: 0 auto 14px; }
.ace-sheet-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #64748b; margin: 12px 4px 8px; }
.ace-mode-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 6px;
  border-radius: 14px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06); color: #f8fafc; cursor: pointer;
}
.ace-mode-row.active { background: rgba(56,189,248,0.12) !important; border-color: rgba(56,189,248,0.48) !important; }
.ace-mode-row-title { font-size: 15px; font-weight: 600; color: #f8fafc; }
.ace-mode-row-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.ace-mode-check {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid #475569;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px;
}
.ace-mode-row.active .ace-mode-check { border-color: #38bdf8; background: #38bdf8; color: #070b14; font-weight: 800; }

/* ==================== ACE v41.5 THEME-SYNCED MODES + GEMINI TYPOGRAPHY + ARCADE 2.0 ==================== */
body.ace-flame-mode #ace-mode-trigger {
  background: rgba(249,115,22,0.12) !important;
  border-color: rgba(249,115,22,0.38) !important;
  color: #fff7ed !important;
}
body.ace-flame-mode #ace-mode-sheet {
  background: #120c09 !important;
  border-top: 1px solid rgba(249,115,22,0.34) !important;
  box-shadow: 0 -16px 52px rgba(249,115,22,0.16), 0 -10px 36px rgba(0,0,0,0.9) !important;
}
body.ace-flame-mode .ace-sheet-sec { color: #fb923c !important; }
body.ace-flame-mode .ace-mode-row {
  background: rgba(249,115,22,0.04) !important;
  border-color: rgba(249,115,22,0.14) !important;
}
body.ace-flame-mode .ace-mode-row.active {
  background: rgba(249,115,22,0.18) !important;
  border-color: #f97316 !important;
}
body.ace-flame-mode .ace-mode-row.active .ace-mode-check {
  border-color: #f97316 !important; background: #f97316 !important; color: #120c09 !important;
}
body.ace-flame-mode #attach-bar {
  background: #1a100b !important; border-color: rgba(249,115,22,0.45) !important;
}
body.ace-flame-mode #attach-file-chip {
  background: rgba(249,115,22,0.18) !important; color: #fb923c !important; border-color: rgba(249,115,22,0.4) !important;
}
body:not(.ace-flame-mode) #ace-mode-sheet {
  background: #0d121c !important; border-top: 1px solid rgba(56,189,248,0.28) !important;
}
body:not(.ace-flame-mode) .ace-sheet-sec { color: #7dd3fc !important; }

#ace-paste-btn {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 34px !important; height: 34px !important; border-radius: 50% !important;
  background: transparent !important; border: 1px solid rgba(255,255,255,0.12) !important;
  color: #94a3b8 !important; font-size: 15px !important; cursor: pointer !important;
  flex-shrink: 0 !important; padding: 0 !important;
}
#ace-paste-btn:active { transform: scale(0.92); background: rgba(255,255,255,0.1) !important; color: #f8fafc !important; }
body.ace-flame-mode #ace-paste-btn { border-color: rgba(249,115,22,0.28) !important; color: #fdba74 !important; }

#messages, .msg-bubble, .msg-content, .ai-body, .user-bubble, .chat-msg {
  font-size: 16px !important; line-height: 1.62 !important;
}
#sidebar { width: 300px !important; max-width: 86vw !important; }
#sidebar .brand-title { font-size: 20px !important; }
#sidebar button, #sidebar .new-chat-btn, #sidebar .side-btn, #sidebar .sidebar-btn,
#sidebar .chat-item, #sidebar .history-item, #sidebar .project-item, #sidebar .nav-item,
#sidebar li, #sidebar a {
  font-size: 15.5px !important; line-height: 1.45 !important;
}
#sidebar .chat-item, #sidebar .history-item, #sidebar .project-item, #sidebar .nav-item {
  padding: 11px 14px !important; border-radius: 12px !important;
}
#sidebar .section-title, #sidebar .sidebar-label, #sidebar .side-sec-title, #sidebar h3, #sidebar h4 {
  font-size: 13px !important; letter-spacing: 0.6px !important; font-weight: 700 !important;
  padding: 10px 14px 6px !important;
}
#ace-rich-input { font-size: 16.5px !important; }

.arcade-tabs, #arcade-game-tabs {
  display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important;
  gap: 8px !important; padding: 8px 12px !important; scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}
.arcade-tabs::-webkit-scrollbar, #arcade-game-tabs::-webkit-scrollbar { display: none !important; }
.arcade-tab-btn {
  flex-shrink: 0 !important; white-space: nowrap !important;
  padding: 8px 14px !important; border-radius: 999px !important;
  font-size: 13.5px !important; font-weight: 600 !important;
}
#native-arcade-canvas {
  border-radius: 14px !important; touch-action: none !important;
  max-width: 94vw !important; height: auto !important;
}
.native-arcade-dpad {
  display: flex !important; gap: 10px !important; justify-content: center !important;
  flex-wrap: wrap !important; margin-top: 12px !important;
}
.native-arcade-dpad button {
  min-width: 54px !important; min-height: 46px !important; font-size: 16px !important;
  font-weight: 700 !important; border-radius: 12px !important; padding: 8px 14px !important;
  background: rgba(255,255,255,0.08) !important; color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,0.18) !important; user-select: none !important;
  -webkit-user-select: none !important; touch-action: manipulation !important;
}
.native-arcade-dpad button:active { background: rgba(249,115,22,0.35) !important; transform: scale(0.95); }

/* ==================== ACE v42.0 ARCADE PRO + GEMINI ATTACH CARD + LIVE CREW ==================== */
.arcade-tabs, #arcade-game-tabs {
  display: flex !important; flex-wrap: nowrap !important; justify-content: flex-start !important;
  align-items: center !important; overflow-x: auto !important; gap: 8px !important;
  padding: 10px 14px !important; scrollbar-width: none !important;
}
.arcade-tabs > span, #arcade-game-tabs > span { display: none !important; }
.arcade-tabs button, #arcade-game-tabs button { flex: 0 0 auto !important; white-space: nowrap !important; }

#ace-arcade-tip {
  width: 100%; max-width: 340px; margin: 6px auto 4px; padding: 8px 12px;
  border-radius: 12px; background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.28); color: #e2e8f0;
  font-size: 12.5px; line-height: 1.4; text-align: center; min-height: 36px;
  display: none; align-items: center; justify-content: center;
}
#ace-arcade-tip.show { display: flex !important; }
body.ace-flame-mode #ace-arcade-tip { background: rgba(24, 14, 9, 0.92); border-color: rgba(249, 115, 22, 0.35); }

#attach-bar.ace-img-card {
  width: fit-content !important; max-width: 92% !important;
  padding: 6px !important; border-radius: 16px !important;
  position: relative !important; gap: 0 !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}
#attach-bar.ace-img-card #attach-thumb {
  width: 96px !important; height: 96px !important;
  border-radius: 12px !important; object-fit: cover !important;
}
#attach-bar.ace-img-card #attach-name { display: none !important; }
#attach-bar.ace-img-card > button {
  position: absolute !important; top: -6px !important; right: -6px !important;
  width: 24px !important; height: 24px !important; border-radius: 50% !important;
  background: #1e293b !important; color: #f8fafc !important;
  border: 1.5px solid rgba(255,255,255,0.28) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 0 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
}

#right-panel:not(.hidden) #crew-unit-bar { display: flex !important; }

/* ==================== ACE v43.0 CREW ROOMS (SHARED GROUP CHAT + FILES) ==================== */
#ace-rooms-backdrop {
  display: none; position: fixed; inset: 0; z-index: 100020;
  background: rgba(2, 6, 14, 0.86); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 10px;
}
#ace-rooms-backdrop.open { display: flex !important; }
#ace-rooms-modal {
  width: 100%; max-width: 560px; height: 88vh; max-height: 760px;
  background: #0d121c; border: 1px solid rgba(56,189,248,0.28);
  border-radius: 20px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85); color: #f1f5f9;
}
body.ace-flame-mode #ace-rooms-modal { background: #120c09; border-color: rgba(249,115,22,0.34); }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.rm-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rm-code-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(56,189,248,0.16); color: #38bdf8; border: 1px solid rgba(56,189,248,0.35); cursor: pointer; }
body.ace-flame-mode .rm-code-pill { background: rgba(249,115,22,0.16); color: #fb923c; border-color: rgba(249,115,22,0.4); }
.rm-tabs { display: flex; gap: 6px; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.rm-tab { flex: 1; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: #94a3b8; font-size: 14px; font-weight: 600; cursor: pointer; }
.rm-tab.active { background: rgba(56,189,248,0.16); color: #f8fafc; border-color: #38bdf8; }
body.ace-flame-mode .rm-tab.active { background: rgba(249,115,22,0.18); border-color: #f97316; }
.rm-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rm-msg { padding: 10px 13px; border-radius: 14px; max-width: 88%; font-size: 15px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.rm-msg.me { align-self: flex-end; background: rgba(56,189,248,0.18); border: 1px solid rgba(56,189,248,0.35); }
body.ace-flame-mode .rm-msg.me { background: rgba(249,115,22,0.2); border-color: rgba(249,115,22,0.45); }
.rm-msg.other { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.rm-msg.ace { align-self: flex-start; background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.35); max-width: 94%; }
.rm-sender { font-size: 11.5px; font-weight: 700; opacity: 0.78; margin-bottom: 3px; }
.rm-foot { padding: 10px 12px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; gap: 8px; align-items: center; }
.rm-foot input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 10px 12px; color: #f8fafc; font-size: 15px; outline: none; }
.rm-btn { padding: 10px 14px; border-radius: 12px; border: none; font-size: 14px; font-weight: 700; cursor: pointer; background: #38bdf8; color: #070b14; white-space: nowrap; }
.rm-btn.sec { background: rgba(255,255,255,0.1); color: #f8fafc; border: 1px solid rgba(255,255,255,0.16); }
body.ace-flame-mode .rm-btn:not(.sec) { background: #f97316; color: #120c09; }
.rm-file-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.rm-lobby { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.rm-lobby input { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 11px 14px; color: #f8fafc; font-size: 15px; outline: none; }

/* ==================== ACE v43.5 LEFT-SIDEBAR GROUP CHATS + CLEAN ONLINE PICKER + OFFLINE PRO ==================== */
#top-rooms-btn { display: none !important; }
#center { position: relative !important; }
#ace-group-workspace {
  display: none; position: absolute; inset: 0; z-index: 40;
  background: var(--bg-amoled, #070b14);
  flex-direction: column; overflow: hidden;
}
#ace-group-workspace.open { display: flex !important; }
body.ace-flame-mode #ace-group-workspace { background: #090604; }
.gw-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(12, 16, 26, 0.92);
}
body.ace-flame-mode .gw-top { background: rgba(18, 12, 9, 0.95); border-color: rgba(249,115,22,0.22); }
.gw-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gw-title { font-size: 16.5px; font-weight: 700; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-members { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#groups-sidebar-pane { display: none; padding: 8px 10px 16px; }
#groups-sidebar-pane.open { display: block !important; }
.grp-side-form { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.grp-side-form input {
  width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; padding: 9px 11px; color: #f8fafc; font-size: 14px; outline: none;
}
.grp-side-row { display: flex; gap: 6px; }
.grp-side-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; padding: 11px 12px; margin-bottom: 6px;
  border-radius: 12px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); color: #f8fafc; cursor: pointer;
}
.grp-side-item.active { background: rgba(56,189,248,0.16) !important; border-color: rgba(56,189,248,0.45) !important; }
body.ace-flame-mode .grp-side-item.active { background: rgba(249,115,22,0.18) !important; border-color: rgba(249,115,22,0.5) !important; }

/* ==================== ACE v44.0 ANCHORED MODE DROPDOWN + 3-DOT MERGE TO GROUP + DRAG-DROP ==================== */
#ace-mode-backdrop {
  background: rgba(2, 6, 14, 0.24) !important;
  backdrop-filter: none !important;
  align-items: flex-start !important; justify-content: flex-start !important;
}
#ace-mode-sheet {
  position: fixed !important;
  width: 296px !important; max-width: calc(100vw - 20px) !important;
  max-height: 70vh !important; border-radius: 16px !important;
  padding: 10px 10px 12px !important;
  border: 1px solid rgba(56,189,248,0.28) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,0.75) !important;
  animation: aceDropDown 0.14s ease-out !important;
}
body.ace-flame-mode #ace-mode-sheet {
  border: 1px solid rgba(249,115,22,0.42) !important;
  box-shadow: 0 14px 44px rgba(249,115,22,0.18), 0 10px 30px rgba(0,0,0,0.85) !important;
}
@keyframes aceDropDown { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ace-sheet-handle { display: none !important; }
.ace-sheet-sec { margin: 4px 6px 6px !important; }
.ace-mode-row { padding: 10px 12px !important; margin-bottom: 5px !important; border-radius: 12px !important; }

#nav-groups.drag-over, #nav-projects.drag-over {
  background: rgba(56,189,248,0.22) !important; outline: 2px dashed #38bdf8 !important;
}
body.ace-flame-mode #nav-groups.drag-over, body.ace-flame-mode #nav-projects.drag-over {
  background: rgba(249,115,22,0.22) !important; outline: 2px dashed #f97316 !important;
}

#ace-row-menu {
  display: none; position: fixed; z-index: 100050; min-width: 215px;
  background: #0d121c; border: 1px solid rgba(56,189,248,0.32);
  border-radius: 14px; padding: 6px; box-shadow: 0 12px 36px rgba(0,0,0,0.8);
}
#ace-row-menu.open { display: block !important; }
body.ace-flame-mode #ace-row-menu { background: #160e0a; border-color: rgba(249,115,22,0.42); }
.ace-rm-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 10px; border: none; background: transparent;
  color: #f1f5f9; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ace-rm-opt:hover, .ace-rm-opt:active { background: rgba(255,255,255,0.09); }

/* ==================== ACE v44.5 ZERO-FLICKER DROPDOWN + NO SCROLLBAR ==================== */
#ace-mode-sheet {
  box-sizing: border-box !important;
  width: 324px !important; max-width: calc(100vw - 20px) !important;
  overflow-x: hidden !important; overflow-y: auto !important;
  animation: none !important;
}
#ace-mode-sheet *, .ace-mode-row { box-sizing: border-box !important; }
.ace-mode-row { width: 100% !important; overflow: hidden !important; }
.ace-mode-row-sub { white-space: normal !important; }

/* ==================== ACE v45.0 ZERO-FLASH LAUNCH + GROUP ADMIN + WHATSAPP COMPOSER ==================== */
body:not(.ace-hydrated) #sidebar,
body:not(.ace-hydrated) #right-panel { display: none !important; }

#gw-admin-panel {
  display: none; padding: 14px 16px; background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
#gw-admin-panel.open { display: block !important; }
body.ace-flame-mode #gw-admin-panel { background: rgba(24, 14, 9, 0.97); border-color: rgba(249,115,22,0.3); }
.gw-mem-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); margin-bottom: 6px;
}
.gw-kick-btn {
  padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(239,68,68,0.45);
  background: rgba(239,68,68,0.16); color: #fca5a5; font-size: 12px; font-weight: 700; cursor: pointer;
}
.gw-del-grp-btn {
  width: 100%; margin-top: 8px; padding: 10px; border-radius: 10px;
  border: 1px solid rgba(239,68,68,0.55); background: rgba(239,68,68,0.2);
  color: #fecaca; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.rm-msg img.gw-chat-img {
  display: block; max-width: 240px; max-height: 220px; border-radius: 10px;
  margin-top: 6px; cursor: zoom-in; border: 1px solid rgba(255,255,255,0.14);
}

/* ==================== ACE v45.1 NO WEB SPLASH + MOBILE 100DVH CHAT SPACE + GROUP TOGGLE ==================== */
/* 1. Completely remove extra web splash logo overlay on app open */
#ace-launch-splash { display: none !important; opacity: 0 !important; pointer-events: none !important; }

/* 2. Mobile 100dvh layout so chat messages & bottom Ask bar ALWAYS fit above the phone keyboard */
@media (max-width: 768px) {
  html, body, #app, #center {
    height: 100dvh !important; max-height: 100dvh !important; overflow: hidden !important;
  }
  #ace-group-workspace {
    position: fixed !important; inset: 0 !important;
    height: 100dvh !important; max-height: 100dvh !important; z-index: 950 !important;
  }
  .gw-top { padding: 8px 10px !important; gap: 6px !important; }
  .gw-title { font-size: 15px !important; }
  .gw-members { font-size: 11px !important; }
  .rm-tabs { padding: 6px 10px !important; gap: 6px !important; }
  .rm-tab { padding: 7px 10px !important; font-size: 13px !important; }
  .rm-body { flex: 1 1 auto !important; min-height: 0 !important; padding: 10px !important; }
  .rm-foot {
    flex-shrink: 0 !important; gap: 6px !important;
    padding: 8px 10px max(10px, env(safe-area-inset-bottom)) !important;
  }
  .rm-foot input { min-width: 0 !important; font-size: 15px !important; padding: 9px 10px !important; }
  .rm-foot .rm-btn { padding: 9px 10px !important; font-size: 13px !important; }
  .composer-dock, #composer-wrap { padding-bottom: max(6px, env(safe-area-inset-bottom)) !important; }
}

/* ==================== ACE v45.5 SIDEBAR Z-INDEX FIX + CLEAN TOPBAR + MEMBERS & BADGES ==================== */
#top-left-groups-btn { display: none !important; }
#sidebar { z-index: 1050 !important; }
#ace-group-workspace { z-index: 900 !important; }

.gw-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #070b14;
}
.gw-badge-pill {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px;
  padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
  background: rgba(56,189,248,0.18); color: #7dd3fc; border: 1px solid rgba(56,189,248,0.35);
}
.gw-badge-pill.admin { background: rgba(249,115,22,0.2); color: #fdba74; border-color: rgba(249,115,22,0.45); }
.gw-mem-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); margin-bottom: 8px;
}
.gw-tag-btn {
  padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(56,189,248,0.4);
  background: rgba(56,189,248,0.14); color: #7dd3fc; font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ==================== ACE v46.0 UNIVERSAL NOTEBOOKS WORKSPACE ==================== */
#ace-nb-workspace {
  display: none; position: absolute; inset: 0; z-index: 900;
  background: var(--bg-amoled, #070b14); flex-direction: column; overflow: hidden;
}
#ace-nb-workspace.open { display: flex !important; }
body.ace-flame-mode #ace-nb-workspace { background: #090604; }
@media (max-width: 768px) {
  #ace-nb-workspace { position: fixed !important; inset: 0 !important; height: 100dvh !important; max-height: 100dvh !important; }
}

/* ==================== ACE v49.0 PHASE 4 BILINGUAL ARABIC (RTL) + ENGLISH MODE ==================== */
#ace-lang-btn {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  height: 34px !important; padding: 0 10px !important; border-radius: 999px !important;
  background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.14) !important;
  color: #e2e8f0 !important; font-size: 12.5px !important; font-weight: 700 !important;
  cursor: pointer !important; white-space: nowrap !important; flex-shrink: 0 !important;
}
body.ace-flame-mode #ace-lang-btn {
  background: rgba(249,115,22,0.12) !important; border-color: rgba(249,115,22,0.34) !important; color: #ffedd5 !important;
}
html[dir="rtl"] body { font-family: "Segoe UI", "Tahoma", "Noto Sans Arabic", system-ui, sans-serif !important; }
html[dir="rtl"] #sidebar { border-right: none !important; border-left: 1px solid var(--border) !important; }
html[dir="rtl"] #ace-rich-input, html[dir="rtl"] .msg-content, html[dir="rtl"] .rm-msg, html[dir="rtl"] .ace-mode-row { text-align: right !important; }


/* ============================================================================
   ACE v51.5 — COMPLETE PURE MONOCHROME (MATTE BLACK <-> CRISP WHITE)
   Fixes: ACE Mode (Black/White), ACE Modes Dropdown, Profile Card, Welcome
   Balance, Composer Placeholder, Language Menu, Groups/Docs, Zero Blue/Orange
   ============================================================================ */
:root {
  --bg-amoled: #0e0e10 !important;
  --bg-sidebar: #141416 !important;
  --bg-panel: #17171a !important;
  --bg-pill: #1e1e22 !important;
  --bg-card: #17171a !important;
  --bg-hover: #222227 !important;
  --cyan: #e4e4e7 !important;
  --amber: #d4d4d8 !important;
  --terracotta: #d4d4d8 !important;
  --text: #f3f3f5 !important;
  --muted: #9898a4 !important;
  --border: rgba(255, 255, 255, 0.08) !important;
}

/* CRISP WHITE / LIGHT MODE (ACE Mode Toggle: body.ace-flame-mode) */
body.ace-flame-mode {
  --bg-amoled: #f7f6f3 !important;
  --bg-sidebar: #efece6 !important;
  --bg-panel: #ffffff !important;
  --bg-pill: #eae7e0 !important;
  --bg-card: #ffffff !important;
  --bg-hover: #e5e2da !important;
  --cyan: #141416 !important;
  --amber: #141416 !important;
  --terracotta: #141416 !important;
  --text: #121214 !important;
  --muted: #5e5e68 !important;
  --border: rgba(0, 0, 0, 0.09) !important;
}

body, html {
  background: var(--bg-amoled) !important;
  color: var(--text) !important;
  font-family: "Inter", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
code, pre, .code-block, .status-pill-tag {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

/* Kill ALL neon radial background fog in both Dark & Light modes */
#center,
body.ace-flame-mode #center {
  background: var(--bg-amoled) !important;
  background-image: none !important;
}
#sidebar,
body.ace-flame-mode #sidebar {
  background: var(--bg-sidebar) !important;
  border-right: 1px solid var(--border) !important;
  color: var(--text) !important;
}
#ace-group-workspace,
#ace-nb-workspace,
body.ace-flame-mode #ace-group-workspace,
body.ace-flame-mode #ace-nb-workspace {
  background: var(--bg-amoled) !important;
  color: var(--text) !important;
}

/* Sidebar typography, buttons & bottom profile card (zero orange border) */
.brand-title {
  color: var(--text) !important;
  gap: 9px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}
.new-chat-top-btn {
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
.new-chat-top-btn:hover {
  background: var(--bg-hover) !important;
}
#sidebar input,
#sidebar-search-input,
.sidebar-search input {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
#ace-sidebar-nav-v34 button,
#ace-sidebar-nav-v34 .nav-item,
.session-item {
  color: var(--text) !important;
}
#ace-sidebar-nav-v34 button.active,
#ace-sidebar-nav-v34 .nav-item.active,
.session-item.active {
  background: var(--bg-hover) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
#left-login-bar,
.login-left-pill,
body.ace-flame-mode #left-login-bar,
body.ace-flame-mode .login-left-pill {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
  color: var(--text) !important;
}
#sidebar-user-name { color: var(--text) !important; }
#sidebar-user-sub { color: var(--muted) !important; }

/* Topbar: flat quiet monochrome, single clean model trigger (no double-nested box) */
#topbar,
body.ace-flame-mode #topbar {
  background: var(--bg-amoled) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: none !important;
}
.model-picker-wrap {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  gap: 8px !important;
}
.model-picker-wrap > svg {
  display: none !important; /* logo already sits cleanly in sidebar + welcome */
}
#ace-mode-trigger,
body.ace-flame-mode #ace-mode-trigger {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-weight: 500 !important;
}
#ace-mode-trigger:hover,
body.ace-flame-mode #ace-mode-trigger:hover {
  background: var(--bg-hover) !important;
}
#ace-mode-dot {
  background: var(--text) !important;
  box-shadow: none !important;
  opacity: 0.7 !important;
}

.topbar-right .icon-circle-btn,
.topbar-left .icon-circle-btn,
#ace-lang-btn,
body.ace-flame-mode .topbar-right .icon-circle-btn,
body.ace-flame-mode .topbar-left .icon-circle-btn,
body.ace-flame-mode #ace-lang-btn,
body.ace-flame-mode #ace-mode-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--muted) !important;
  box-shadow: none !important;
}
.topbar-right .icon-circle-btn:hover,
.topbar-left .icon-circle-btn:hover,
#ace-lang-btn:hover,
body.ace-flame-mode .topbar-right .icon-circle-btn:hover,
body.ace-flame-mode .topbar-left .icon-circle-btn:hover,
body.ace-flame-mode #ace-lang-btn:hover,
body.ace-flame-mode #ace-mode-btn:hover {
  background: var(--bg-hover) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ACE MODES DROPDOWN — 100% Pure Monochrome (ZERO blue/orange!) */
#ace-mode-sheet,
body:not(.ace-flame-mode) #ace-mode-sheet,
body.ace-flame-mode #ace-mode-sheet {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
  border-radius: 14px !important;
}
body:not(.ace-flame-mode) #ace-mode-sheet {
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65) !important;
}
.ace-sheet-sec,
body:not(.ace-flame-mode) .ace-sheet-sec,
body.ace-flame-mode .ace-sheet-sec {
  color: var(--muted) !important;
  letter-spacing: 0.08em !important;
}
.ace-mode-row,
body:not(.ace-flame-mode) .ace-mode-row,
body.ace-flame-mode .ace-mode-row {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 11px !important;
}
.ace-mode-row:hover {
  background: var(--bg-hover) !important;
}
.ace-mode-row-title { color: var(--text) !important; font-weight: 600 !important; }
.ace-mode-row-sub { color: var(--muted) !important; }
.ace-mode-row.active,
body:not(.ace-flame-mode) .ace-mode-row.active,
body.ace-flame-mode .ace-mode-row.active {
  background: var(--bg-hover) !important;
  border-color: var(--text) !important;
  box-shadow: none !important;
}
.ace-mode-check {
  border: 1.5px solid var(--muted) !important;
  background: transparent !important;
  color: transparent !important;
}
.ace-mode-row.active .ace-mode-check,
body:not(.ace-flame-mode) .ace-mode-row.active .ace-mode-check,
body.ace-flame-mode .ace-mode-row.active .ace-mode-check {
  background: var(--text) !important;
  border-color: var(--text) !important;
  color: var(--bg-amoled) !important;
}

/* Language Menu & Context Menus — pure monochrome */
#ace-lang-menu,
#ace-row-menu,
body.ace-flame-mode #ace-row-menu {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35) !important;
}
#ace-lang-menu button,
#ace-row-menu button {
  color: var(--text) !important;
}
#ace-lang-menu button:hover,
#ace-row-menu button:hover {
  background: var(--bg-hover) !important;
}

/* Welcome Hero: balanced, clean, zero gradient text, crisp quick prompts */
.minimal-hero {
  gap: 10px !important;
}
.minimal-hero-logo {
  color: var(--text) !important;
  filter: none !important;
  margin-bottom: 6px !important;
}
.minimal-hero h1 {
  font-size: clamp(24px, 3.2vw, 30px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.025em !important;
  color: var(--text) !important;
}
.minimal-hero .grad-txt {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--text) !important;
  color: var(--text) !important;
}
.minimal-hero .hero-sub {
  color: var(--muted) !important;
  font-size: 14px !important;
  max-width: 460px !important;
}
#ace-v51-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  max-width: 560px;
}
.ace-v51-qpill {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ace-v51-qpill:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--text);
}

/* Composer: crisp matte box, readable placeholder, monochrome controls */
.composer-row-wrap { position: relative !important; }
#composer,
body.ace-flame-mode #composer {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18) !important;
}
body:not(.ace-flame-mode) #composer {
  border-color: rgba(255, 255, 255, 0.13) !important;
}
#composer:focus-within {
  border-color: var(--text) !important;
}
#ace-rich-input,
#prompt-input {
  color: var(--text) !important;
  font-size: 15px !important;
}
#ace-rich-input:empty::before {
  content: attr(data-placeholder) !important;
  color: var(--muted) !important;
  opacity: 0.78 !important;
  pointer-events: none !important;
}
#composer .plus-attach-btn,
#ace-paste-btn,
body.ace-flame-mode #ace-paste-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--muted) !important;
}
#composer .plus-attach-btn:hover,
#ace-paste-btn:hover {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}
#send-btn,
body.ace-flame-mode #send-btn {
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
  border: none !important;
  box-shadow: none !important;
}
#send-btn svg,
body.ace-flame-mode #send-btn svg {
  color: var(--bg-amoled) !important;
  stroke: var(--bg-amoled) !important;
}

/* Tools Popover */
#ace-tools-popover-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
#ace-tools-popover-btn:hover,
#ace-tools-popover-btn.active {
  background: var(--bg-hover);
  border-color: var(--text);
  color: var(--text);
}
#ace-tools-popover-btn .v51-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  display: none;
}
#ace-tools-popover-btn.has-active .v51-dot { display: inline-block; }

.dock-controls-row.v51-popover-managed {
  display: none !important;
  position: absolute !important;
  bottom: calc(100% + 10px) !important;
  left: 14px !important;
  z-index: 650 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  max-width: min(92vw, 480px) !important;
  padding: 12px !important;
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
}
.dock-controls-row.v51-popover-managed.v51-open { display: flex !important; }
.dock-controls-row .opt-toggle-pill,
.dock-controls-row #persona-selector,
.dock-controls-row .chat-task-switch {
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}
.dock-controls-row .opt-toggle-pill.active,
.dock-controls-row .ct-btn.active {
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
  border-color: var(--text) !important;
}

/* Messages, Modals, Groups, Documents, Attach Bar — Pure Monochrome */
.msg-user .msg-bubble,
.msg-user { color: var(--text) !important; }
.msg-ai, .msg-body { color: var(--text) !important; }
.msg-meta svg,
.brand-title svg,
#sidebar-avatar-slot svg { color: var(--text) !important; }
.brand-tag { color: var(--text) !important; font-weight: 600 !important; }
.status-pill-tag {
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
}
#attach-bar, #attach-file-chip,
body.ace-flame-mode #attach-bar, body.ace-flame-mode #attach-file-chip {
  background: var(--bg-panel) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.gw-badge-pill, .gw-badge-pill.admin, .gw-tag-btn, .rm-code-pill,
body.ace-flame-mode .rm-code-pill {
  background: var(--bg-pill) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.rm-tab.active, .rm-btn, .rm-msg.me, .grp-side-item.active,
body.ace-flame-mode .rm-tab.active,
body.ace-flame-mode .rm-btn:not(.sec),
body.ace-flame-mode .rm-msg.me,
body.ace-flame-mode .grp-side-item.active {
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
  border-color: var(--text) !important;
}
.modal-card, .modal-box, #ace-rooms-modal,
body.ace-flame-mode #ace-rooms-modal {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.disclaimer-bar, .disclaimer-link { color: var(--muted) !important; }

/* Orbiting Thinking Animation for "One Eye, Two Lids" */
@keyframes aceV51Orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.msg-ai:has(.thinking-pulse) .msg-meta svg,
svg.ace-v51-orbiting {
  animation: aceV51Orbit 1.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite !important;
  transform-origin: center center !important;
}


/* ============================================================================
   ACE v51.6 — UNIFIED MONOCHROME CREW (ACE, MARCO, VISTA, SABO, SHAKA, OLVIA)
   ============================================================================ */
#right-panel {
  background: var(--bg-sidebar) !important;
  border-left: 1px solid var(--border) !important;
  color: var(--text) !important;
}
#right-panel strong, #right-panel .sec-head { color: var(--text) !important; }
#right-panel .btn-accent, #right-panel .sec-add-btn {
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
#right-panel .btn-accent:hover, #right-panel .sec-add-btn:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text) !important;
}
#crew-canvas { display: none !important; }

#ace-v516-crew-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0 8px;
}
.ace-crew-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ace-crew-card:hover {
  background: var(--bg-hover);
  border-color: var(--muted);
}
.ace-crew-card.active {
  background: var(--bg-hover);
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.ace-crew-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-amoled);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
}
.ace-crew-card.active .ace-crew-icon svg {
  animation: aceV51Orbit 3.2s linear infinite;
}
.ace-crew-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ace-crew-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.2;
}
.ace-crew-role {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#active-station { color: var(--text) !important; font-weight: 600 !important; }
#live-log {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
}

/* Monochrome Account Avatar Picker (.char-option) */
.char-option {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
}
.char-option.selected, .char-option:hover {
  border-color: var(--text) !important;
  color: var(--text) !important;
  background: var(--bg-hover) !important;
}
.char-option svg, #sidebar-avatar-slot svg {
  color: var(--text) !important;
}


/* ============================================================================
   ACE v51.7 — LIGHT MODE CONTRAST & BUG SWEEP
   Fixes: Tools popover text/icons, #top-arcade-btn, Crew close X, .ace-mode-dot
   ============================================================================ */
#ace-mode-trigger .ace-mode-dot,
body.ace-flame-mode #ace-mode-trigger .ace-mode-dot {
  background: var(--text) !important;
  box-shadow: none !important;
  opacity: 0.72 !important;
}

/* Fix washed-out #top-arcade-btn and #right-panel close X in Light Mode */
#top-arcade-btn,
body.ace-flame-mode #top-arcade-btn,
#right-panel .icon-circle-btn,
body.ace-flame-mode #right-panel .icon-circle-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--muted) !important;
  opacity: 1 !important;
  box-shadow: none !important;
}
#top-arcade-btn:hover,
#top-arcade-btn.active,
body.ace-flame-mode #top-arcade-btn:hover,
body.ace-flame-mode #top-arcade-btn.active,
#right-panel .icon-circle-btn:hover,
body.ace-flame-mode #right-panel .icon-circle-btn:hover {
  background: var(--bg-hover) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

/* Fix washed-out Think / Web / Voice Loop / Compare pills inside Tools ▾ popover */
.dock-controls-row.v51-popover-managed button,
.dock-controls-row.v51-popover-managed .opt-toggle-pill,
.dock-controls-row.v51-popover-managed #compare-btn,
.dock-controls-row.v51-popover-managed select {
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  opacity: 1 !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.dock-controls-row.v51-popover-managed .chat-task-switch {
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  padding: 2px !important;
}
.dock-controls-row.v51-popover-managed .chat-task-switch .ct-btn {
  background: transparent !important;
  border: none !important;
  color: var(--muted) !important;
}
.dock-controls-row.v51-popover-managed button span,
.dock-controls-row.v51-popover-managed button svg,
.dock-controls-row.v51-popover-managed .opt-toggle-pill span,
.dock-controls-row.v51-popover-managed .opt-toggle-pill svg {
  color: var(--text) !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}
.dock-controls-row.v51-popover-managed .opt-toggle-pill:hover,
.dock-controls-row.v51-popover-managed button:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text) !important;
}
.dock-controls-row.v51-popover-managed .opt-toggle-pill.active,
.dock-controls-row.v51-popover-managed .ct-btn.active,
.dock-controls-row.v51-popover-managed .opt-toggle-pill.voice-loop-on {
  background: var(--text) !important;
  border-color: var(--text) !important;
  color: var(--bg-amoled) !important;
}
.dock-controls-row.v51-popover-managed .opt-toggle-pill.active *,
.dock-controls-row.v51-popover-managed .ct-btn.active *,
.dock-controls-row.v51-popover-managed .opt-toggle-pill.voice-loop-on * {
  color: var(--bg-amoled) !important;
  stroke: var(--bg-amoled) !important;
}


/* ============================================================================
   ACE v52.0 — RECENTS CONTRAST FIX + 3RD GAMER MODE + RADIAL HUB + 12 AVATARS
   ============================================================================ */

/* FIX: Recents (.row-item, .row-title, .mini-act) matched across ALL 3 modes */
#session-list, #pinned-list, .sidebar-sec-label, .sec-head {
  color: var(--muted) !important;
}
#session-list .row-item,
#pinned-list .row-item,
.row-item {
  color: var(--text) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}
#session-list .row-item:hover,
#pinned-list .row-item:hover,
.row-item:hover {
  background: var(--bg-hover) !important;
  border-color: var(--border) !important;
}
#session-list .row-item.active,
#pinned-list .row-item.active,
.row-item.active {
  background: var(--bg-hover) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.row-item .row-title,
.row-item .row-left,
.row-item .row-left svg {
  color: var(--text) !important;
  opacity: 0.92 !important;
}
.row-item .mini-act,
.row-item .row-actions button {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.row-item .mini-act:hover,
.row-item .row-actions button:hover {
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
}
.row-item .mini-act:hover svg,
.row-item .row-actions button:hover svg {
  color: var(--bg-amoled) !important;
  stroke: var(--bg-amoled) !important;
}

/* ============================================================================
   3RD MODE: GAMER MODE (body.ace-gamer-mode)
   Deep obsidian + electric cyan/violet accents + neon hub glow
   ============================================================================ */
body.ace-gamer-mode {
  --bg-amoled: #07060d !important;
  --bg-sidebar: #0b0916 !important;
  --bg-panel: #120f24 !important;
  --bg-pill: #1a1533 !important;
  --bg-card: #120f24 !important;
  --bg-hover: #211a42 !important;
  --cyan: #22d3ee !important;
  --amber: #a855f7 !important;
  --terracotta: #ec4899 !important;
  --text: #f8fafc !important;
  --muted: #9ca3c9 !important;
  --border: rgba(168, 85, 247, 0.28) !important;
}
body.ace-gamer-mode #center {
  background:
    radial-gradient(ellipse 70% 42% at 50% 100%, rgba(168, 85, 247, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 32% at 85% 12%, rgba(34, 211, 238, 0.11), transparent 65%),
    #07060d !important;
}
body.ace-gamer-mode #topbar {
  background: rgba(7, 6, 13, 0.88) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.28) !important;
}
body.ace-gamer-mode #sidebar,
body.ace-gamer-mode #right-panel {
  background: #0b0916 !important;
  border-color: rgba(168, 85, 247, 0.28) !important;
}
body.ace-gamer-mode #composer {
  background: #120f24 !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.2) !important;
}
body.ace-gamer-mode #composer:focus-within {
  border-color: #22d3ee !important;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.28) !important;
}
body.ace-gamer-mode #send-btn {
  background: linear-gradient(135deg, #22d3ee, #a855f7) !important;
  color: #07060d !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35) !important;
}
body.ace-gamer-mode #send-btn svg { color: #07060d !important; stroke: #07060d !important; }
body.ace-gamer-mode .minimal-hero-logo,
body.ace-gamer-mode .brand-title svg {
  color: #22d3ee !important;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45)) !important;
}
body.ace-gamer-mode #ace-mode-trigger .ace-mode-dot {
  background: #22d3ee !important;
  box-shadow: 0 0 8px #22d3ee !important;
  opacity: 1 !important;
}
body.ace-gamer-mode .ace-v51-qpill:hover,
body.ace-gamer-mode #ace-tools-popover-btn:hover {
  border-color: #22d3ee !important;
  color: #22d3ee !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2) !important;
}
body.ace-gamer-mode .ace-mode-row.active {
  border-color: #22d3ee !important;
  background: rgba(34, 211, 238, 0.12) !important;
}
body.ace-gamer-mode .ace-mode-row.active .ace-mode-check {
  background: #22d3ee !important;
  border-color: #22d3ee !important;
  color: #07060d !important;
}

/* Theme switch toast */
#ace-v52-theme-toast {
  position: fixed;
  top: 62px;
  right: 20px;
  z-index: 9999;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#ace-v52-theme-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   RADIAL HUB-AND-SPOKE CREW DIAGRAM (ACE IN THE MIDDLE SUPPLYING ALL 5)
   ============================================================================ */
#ace-v516-crew-grid { display: none !important; }
#ace-v52-hub {
  position: relative;
  width: 100%;
  height: 282px;
  margin: 8px 0 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  user-select: none;
}
#ace-v52-hub svg.hub-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hub-spoke {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  opacity: 0.38;
  transition: stroke 0.2s ease, opacity 0.2s ease, stroke-width 0.2s ease;
}
.hub-spoke.active {
  stroke: var(--text);
  stroke-width: 2.2;
  opacity: 0.95;
  animation: hubFlow 1.1s linear infinite;
}
body.ace-gamer-mode .hub-spoke.active {
  stroke: #22d3ee;
  filter: drop-shadow(0 0 6px rgba(34,211,238,0.8));
}
@keyframes hubFlow {
  from { stroke-dashoffset: 16; }
  to { stroke-dashoffset: 0; }
}

.hub-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text);
  font-family: inherit;
}
.hub-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-amoled);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.hub-node.center-hub .hub-badge {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  border-width: 1.5px;
  border-color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}
body.ace-gamer-mode .hub-node.center-hub .hub-badge {
  border-color: #22d3ee;
  box-shadow: 0 0 18px rgba(34,211,238,0.35);
}
.hub-node:hover .hub-badge {
  transform: scale(1.06);
  border-color: var(--text);
}
.hub-node.active .hub-badge {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--text);
}
body.ace-gamer-mode .hub-node.active .hub-badge {
  border-color: #22d3ee;
  box-shadow: 0 0 0 2px #22d3ee, 0 0 14px rgba(34,211,238,0.4);
}
.hub-node.active .hub-badge svg {
  animation: aceV51Orbit 2.8s linear infinite;
}
.hub-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}
.hub-sub {
  font-size: 9px;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}

/* 12-Avatar Picker Grid (4 columns for crisp compact selection) */
.char-grid, #char-picker-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 7px !important;
}


/* ============================================================================
   ACE v52.5 — THOROUGH BUG FIXES & UX POLISH
   1. Arcade ONLY in Gamer Mode
   2. Calm zero-headache ACE Radial Hub (no constant spinning/marching dashes)
   3. Theme-matched Drag & Drop overlay (zero orange mismatch)
   4. Gemini/Claude-style Attachment Preview INSIDE #composer (fixes white PDF!)
   5. Live Chat Search results dropdown (themed across Dark / Light / Gamer)
   6. Welcome-only Chat | Project pill (auto-hides once chat starts)
   ============================================================================ */

/* 1. Arcade ONLY visible in Gamer Mode */
body:not(.ace-gamer-mode) #top-arcade-btn {
  display: none !important;
}
body.ace-gamer-mode #top-arcade-btn {
  display: inline-flex !important;
  color: #22d3ee !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  background: rgba(34, 211, 238, 0.1) !important;
}
body.ace-gamer-mode #top-arcade-btn:hover {
  background: rgba(34, 211, 238, 0.22) !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35) !important;
}

/* 2. Calm Radial Hub — ZERO constant rotation or marching dashes! */
.hub-spoke {
  stroke: var(--border) !important;
  stroke-dasharray: none !important;
  stroke-width: 1.4 !important;
  opacity: 0.75 !important;
  animation: none !important;
}
.hub-spoke.active {
  stroke: var(--text) !important;
  stroke-width: 1.8 !important;
  opacity: 0.55 !important;
  animation: none !important;
}
body.ace-gamer-mode .hub-spoke.active {
  stroke: #22d3ee !important;
  opacity: 0.7 !important;
}
.hub-node.active .hub-badge svg {
  animation: none !important; /* kills headache spinning! */
}
.hub-pulse-dot {
  fill: var(--text);
  opacity: 0;
  pointer-events: none;
}
body.ace-gamer-mode .hub-pulse-dot {
  fill: #22d3ee;
  filter: drop-shadow(0 0 5px #22d3ee);
}

/* 3. Drag & Drop Overlay (#ace-drop-ov) — 100% theme-matched (zero orange!) */
#ace-drop-ov {
  background: rgba(10, 10, 14, 0.72) !important;
  backdrop-filter: blur(8px) !important;
}
body.ace-flame-mode #ace-drop-ov {
  background: rgba(247, 246, 243, 0.78) !important;
}
#ace-drop-ov .card,
body.ace-flame-mode #ace-drop-ov .card,
body.ace-gamer-mode #ace-drop-ov .card {
  background: var(--bg-panel) !important;
  border: 2px dashed var(--text) !important;
  color: var(--text) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32) !important;
  padding: 28px 36px !important;
}
body.ace-gamer-mode #ace-drop-ov .card {
  border-color: #22d3ee !important;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.28) !important;
}
#ace-drop-ov .card *,
#ace-drop-ov .card strong,
#ace-drop-ov .card h3,
#ace-drop-ov .card div {
  color: var(--text) !important;
}
#ace-drop-ov .card p,
#ace-drop-ov .card span,
#ace-drop-ov .card small {
  color: var(--muted) !important;
}

/* 4. Gemini/Claude-style Attachment Preview INSIDE #composer (fixes white PDF!) */
#composer.v525-stacked {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  padding: 10px 12px !important;
}
.v525-composer-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}
#composer #attach-bar {
  display: none !important;
  align-items: center !important;
  gap: 10px !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 0 4px 2px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
#composer #attach-bar.show,
#composer #attach-bar[style*="display: flex"],
#composer #attach-bar[style*="display:flex"] {
  display: inline-flex !important;
}
#composer #attach-thumb {
  width: 52px !important;
  height: 52px !important;
  object-fit: cover !important;
  border-radius: 9px !important;
  border: 1px solid var(--border) !important;
  display: none;
}
#composer #attach-thumb.show { display: block !important; }
#composer #attach-file-chip {
  display: none !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 8px !important;
  border-radius: 9px !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
  border: none !important;
  flex-shrink: 0 !important;
}
#composer #attach-file-chip.show { display: inline-flex !important; }
#composer #attach-name {
  color: var(--text) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  max-width: 240px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#composer #attach-bar button {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: var(--bg-hover) !important;
  color: var(--text) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
}
#composer #attach-bar button svg {
  color: var(--text) !important;
  stroke: var(--text) !important;
}

/* 5. Live Search Results Dropdown (#search-results-box) */
.chat-search-wrap { position: relative !important; }
#search-results-box {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1200 !important;
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35) !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  padding: 6px !important;
  display: none;
}
#search-results-box.v525-open { display: block !important; }
.v525-sr-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v525-sr-item:hover { background: var(--bg-hover); }
.v525-sr-sub { font-size: 10.5px; color: var(--muted); }
.v525-sr-empty { padding: 10px; font-size: 12px; color: var(--muted); text-align: center; }

/* 6. Welcome-only Chat | Project pill (auto-hides once chat starts) */
#ace-v525-welcome-mode {
  display: inline-flex;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 6px;
}
#ace-v525-welcome-mode button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
#ace-v525-welcome-mode button.active {
  background: var(--text);
  color: var(--bg-amoled);
  font-weight: 600;
}


/* ACE v52.6 — Safe flex-wrap composer (preserves all direct children of #composer) */
#composer.v526-wrap {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 12px !important;
}
#composer.v526-wrap #attach-bar {
  flex: 0 0 100% !important;
  order: -10 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: none !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 4px 0 !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
#composer.v526-wrap #attach-bar.v526-visible {
  display: flex !important;
}


/* ============================================================================
   ACE v52.7 — CHATGPT / CLAUDE / GEMINI CENTERED START + CLEAN COLLAPSED SIDEBAR
   ============================================================================ */
body.ace-welcome-centered #center {
  justify-content: center !important;
  padding-top: 56px !important;
  padding-bottom: 44px !important;
}
body.ace-welcome-centered #topbar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 40 !important;
}
body.ace-welcome-centered #chat-scroll,
body.ace-welcome-centered #chat-area,
body.ace-welcome-centered #messages {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding-top: 0 !important;
  padding-bottom: 16px !important;
}
body.ace-welcome-centered .minimal-hero {
  margin: 0 auto !important;
  padding: 0 16px !important;
  min-height: 0 !important;
}
body.ace-welcome-centered .composer-row-wrap {
  width: 100% !important;
  max-width: 700px !important;
  margin: 0 auto !important;
}
body.ace-welcome-centered .disclaimer-bar {
  position: absolute !important;
  bottom: 10px !important;
  left: 0 !important;
  right: 0 !important;
}
/* Keep quick-prompts ultra-clean & compact on centered start */
body.ace-welcome-centered #ace-v51-quick-prompts {
  margin-top: 10px !important;
}


/* ============================================================================
   ACE v53.0 — SLICK COMPOSER (NO CLUNKY TOOLS BOX), CENTERED CHAT|PROJECT,
   INLINE TONE PILL + VOICE LOOP ICON, AUTO-THINK & ALWAYS-ON WEB
   ============================================================================ */

/* Kill the old clunky Tools ▾ button & dock popover completely */
#ace-tools-popover-btn,
.dock-controls-row {
  display: none !important;
}

/* Sleek inline Tone/Style selector directly inside #composer (Claude-style) */
#composer #persona-selector {
  display: inline-flex !important;
  align-items: center !important;
  height: 30px !important;
  max-width: 132px !important;
  padding: 0 22px 0 10px !important;
  border-radius: 999px !important;
  background: var(--bg-pill) !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  outline: none !important;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease !important;
}
#composer #persona-selector:hover,
#composer #persona-selector:focus {
  color: var(--text) !important;
  border-color: var(--text) !important;
  background: var(--bg-hover) !important;
}

/* Sleek Voice Loop icon button right next to Mic inside #composer */
#ace-v53-voiceloop-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--muted) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}
#ace-v53-voiceloop-btn:hover {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
}
#ace-v53-voiceloop-btn.active {
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
  border-color: var(--text) !important;
}
body.ace-gamer-mode #ace-v53-voiceloop-btn.active {
  background: #22d3ee !important;
  color: #07060d !important;
  box-shadow: 0 0 12px rgba(34,211,238,0.45) !important;
}

/* Centered Welcome: Chat | Project pill sits right ABOVE #composer (Gemini/Claude style) */
#ace-v525-welcome-mode {
  display: none !important; /* moved into #ace-v53-mode-above-composer */
}
#ace-v53-mode-above-composer {
  display: none;
  justify-content: center;
  margin: 0 auto 12px;
}
body.ace-welcome-centered #ace-v53-mode-above-composer {
  display: flex !important;
}
.v53-mode-pill {
  display: inline-flex;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}
.v53-mode-pill button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.v53-mode-pill button.active {
  background: var(--text);
  color: var(--bg-amoled);
  font-weight: 600;
}
body.ace-gamer-mode .v53-mode-pill button.active {
  background: #22d3ee;
  color: #07060d;
}

/* Centered composer polish */
body.ace-welcome-centered .composer-row-wrap {
  max-width: 680px !important;
  margin: 0 auto !important;
}
#composer {
  border-radius: 20px !important;
  padding: 10px 12px !important;
}


/* ============================================================================
   ACE v53.5 — TRUE 2-ROW CLAUDE-GRADE COMPOSER + INLINE HERO + BOTTOM CHIPS
   Row 1: Full-width roomy input (no icons on left of text!)
   Row 2: Left [+] [Paste] [Chat|Project]  ---  Right [Dot Auto ▾] [Tone] [Mic] [Voice] [↑]
   Below composer: 4 crisp quick-prompt chips (Welcome only)
   ============================================================================ */

/* Hide old above-composer pill & old topbar model wrapper */
#ace-v53-mode-above-composer { display: none !important; }
.topbar-left .model-picker-wrap { display: none !important; }

/* Inline Logo + Headline on Welcome (just like Claude's [✳ Evening thoughts]) */
body.ace-welcome-centered .minimal-hero {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 0 16px 18px !important;
}
body.ace-welcome-centered .minimal-hero-logo {
  width: 36px !important;
  height: 34px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
body.ace-welcome-centered .minimal-hero h1 {
  font-size: clamp(26px, 3.4vw, 34px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.025em !important;
  margin: 0 !important;
}
body.ace-welcome-centered .minimal-hero .hero-sub {
  display: none !important;
}

/* TRUE 2-ROW COMPOSER BOX (Zero DOM reparenting: pure CSS flex-wrap + order!) */
#composer,
#composer.v526-wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 14px 14px 10px 16px !important;
  border-radius: 18px !important;
  min-height: 108px !important;
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
}
body:not(.ace-flame-mode):not(.ace-gamer-mode) #composer {
  background: #1b1b1f !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Row 1: Attachment preview (top inside box when shown) */
#composer #attach-bar {
  order: 1 !important;
  flex: 0 0 100% !important;
}

/* Row 2: Full-width roomy text input (ZERO clutter to the left!) */
#composer #ace-rich-input {
  order: 2 !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  min-height: 44px !important;
  max-height: 160px !important;
  padding: 2px 2px 12px 2px !important;
  font-size: 15.5px !important;
  line-height: 1.45 !important;
}

/* Row 3 Bottom-Left: [+] [Paste] [Chat | Project] */
#composer .plus-attach-btn:not(#voice-btn) {
  order: 10 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
}
#composer #ace-paste-btn {
  order: 11 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
}
#ace-v535-chatproj {
  order: 12 !important;
  display: none !important;
  align-items: center;
  background: var(--bg-amoled);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
  margin-left: 2px;
}
body.ace-welcome-centered #ace-v535-chatproj {
  display: inline-flex !important;
}
#ace-v535-chatproj button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
#ace-v535-chatproj button.active {
  background: var(--bg-hover);
  color: var(--text);
  font-weight: 600;
}

/* Flexible middle spacer pushing right-side controls cleanly to bottom-right */
#ace-v535-spacer {
  order: 15 !important;
  flex: 1 1 auto !important;
  min-width: 8px !important;
}

/* Row 3 Bottom-Right: [Dot Auto ▾] [Tone] [Mic] [Voice Loop] [↑] */
#composer #ace-mode-trigger {
  order: 20 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: 4px 8px !important;
  height: 30px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  border-radius: 8px !important;
}
#composer #ace-mode-trigger:hover {
  background: var(--bg-hover) !important;
}
#composer #persona-selector {
  order: 21 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  height: 30px !important;
  max-width: 118px !important;
  padding: 0 18px 0 6px !important;
  border-radius: 8px !important;
}
#composer #persona-selector:hover,
#composer #persona-selector:focus {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
#composer #voice-btn {
  order: 22 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
}
#composer #ace-v53-voiceloop-btn {
  order: 23 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
}
#composer #send-btn {
  order: 24 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  margin-left: 2px !important;
}

/* Quick Prompts Row: cleanly BELOW #composer (Welcome only, just like Claude!) */
#ace-v535-below-chips {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 14px auto 0;
  max-width: 680px;
}
body.ace-welcome-centered #ace-v535-below-chips {
  display: flex !important;
}
#ace-v51-quick-prompts { display: none !important; }

.v535-chip {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.v535-chip:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--muted);
}


/* ============================================================================
   ACE v53.6 — EXACT #chat-stream + #bottom-dock + COLUMN .composer-row-wrap FIX
   Eliminates squished composer & centers [Logo + Headline] + [2-Row Composer] + [Chips]
   ============================================================================ */

/* 1. Vertical centering on Welcome using the REAL #chat-stream & #bottom-dock IDs */
body.ace-welcome-centered #center {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding-top: 56px !important;
  padding-bottom: 44px !important;
}
body.ace-welcome-centered #chat-stream {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 720px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 16px 18px !important;
  margin: 0 auto !important;
}
body.ace-welcome-centered #bottom-dock {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 720px !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
  background: transparent !important;
  border-top: none !important;
  position: static !important;
}

/* 2. CRITICAL FIX: .composer-row-wrap MUST be column so #composer stays full 680px wide! */
.composer-row-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 700px !important;
  margin: 0 auto !important;
  gap: 0 !important;
}
#composer,
#composer.v526-wrap {
  width: 100% !important;
  max-width: 680px !important;
  flex: none !important;
  box-sizing: border-box !important;
}

/* Remove duplicate Chat|Project pill completely */
#ace-v53-mode-above-composer {
  display: none !important;
}

/* Keep bottom-dock disclaimer pinned quietly at bottom during centered welcome */
body.ace-welcome-centered #bottom-dock .disclaimer-bar {
  position: fixed !important;
  bottom: 10px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 20 !important;
}

/* Hide scroll-to-bottom floating arrow on empty welcome screen */
body.ace-welcome-centered #scroll-bottom-btn,
body.ace-welcome-centered .scroll-down-btn {
  display: none !important;
}


/* ============================================================================
   ACE v54.0 — STRICT THEME ISOLATION AUDIT + BUG FIXES
   1. Fixes black-on-black .msg-user bubble in White Theme
   2. Fixes .action-pill hover, deliverable cards, code blocks across all 3 modes
   3. Fixes tiny Voice Loop icon (#ace-v53-voiceloop-btn svg)
   4. Clean upward #ace-mode-sheet above bottom composer
   ============================================================================ */

/* User chat bubble: crisp & readable in ALL 3 themes (kills old dark-brown gradient!) */
.msg-user,
body:not(.ace-flame-mode):not(.ace-gamer-mode) .msg-user {
  background: #1f1f24 !important;
  background-image: none !important;
  color: #f3f3f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}
body.ace-flame-mode .msg-user {
  background: #eae7e0 !important;
  background-image: none !important;
  color: #121214 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: none !important;
}
body.ace-gamer-mode .msg-user {
  background: #1a1533 !important;
  background-image: none !important;
  color: #f8fafc !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.14) !important;
}

/* Action pills under AI messages — strict theme isolation */
.action-pill,
body.ace-flame-mode .action-pill {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
}
.action-pill:hover,
body.ace-flame-mode .action-pill:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text) !important;
  color: var(--text) !important;
}
.action-pill.flagged,
.action-pill.speaking,
.action-pill.rated,
body.ace-flame-mode .action-pill.flagged,
body.ace-flame-mode .action-pill.speaking,
body.ace-flame-mode .action-pill.rated {
  background: var(--text) !important;
  border-color: var(--text) !important;
  color: var(--bg-amoled) !important;
}
body.ace-gamer-mode .action-pill.flagged,
body.ace-gamer-mode .action-pill.speaking,
body.ace-gamer-mode .action-pill.rated {
  background: rgba(34, 211, 238, 0.18) !important;
  border-color: #22d3ee !important;
  color: #22d3ee !important;
}

/* Deliverable cards, code blocks, reasoning boxes — crisp in White / Dark / Gamer */
.deliverable-card,
body.ace-flame-mode .deliverable-card,
.reason-box,
body.ace-flame-mode .reason-box {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
body.ace-flame-mode pre,
body.ace-flame-mode code {
  background: #efece6 !important;
  color: #121214 !important;
  border-color: rgba(0, 0, 0, 0.09) !important;
}

/* Fix tiny Voice Loop icon next to Mic — full crisp 18px monochrome waveform */
#ace-v53-voiceloop-btn {
  padding: 0 !important;
}
#ace-v53-voiceloop-btn svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  flex-shrink: 0 !important;
  display: block !important;
  stroke: currentColor !important;
  fill: none !important;
}

/* Clean Tone selector text width */
#composer #persona-selector {
  max-width: 136px !important;
}

/* Sidebar close X & Projects empty folder icon readability in White mode */
body.ace-flame-mode #sidebar .icon-circle-btn,
body.ace-flame-mode #sidebar svg {
  color: #5e5e68 !important;
}
body.ace-flame-mode #sidebar .brand-title svg {
  color: #121214 !important;
}


/* ============================================================================
   ACE v54.5 — MOBILE & PHONE AUDIT FIXES
   1. Fix Assistant / Sidebar scrolling on mobile
   2. Remove Paste button completely
   3. Move Voice Loop out of composer into topbar
   4. Mobile (<=768px): Dot Auto back in topbar -> composer fits cleanly on 1 row!
   5. Hide #task-chips clutter above composer + clean mobile keyboard fit
   6. Fix white-on-white "Documents" header in Light Mode
   ============================================================================ */

/* 1. Sidebar & Assistant smooth mobile scroll */
#sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}
#sidebar .sidebar-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 36px !important;
}

/* 2. Remove Paste button completely */
#ace-paste-btn {
  display: none !important;
}

/* 3. Voice Loop cleanly in topbar-right (out of composer!) */
#topbar #ace-v53-voiceloop-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
}

/* 4. Hide noisy #task-chips above composer during chat (keeps mobile keyboard view clean) */
#task-chips {
  display: none !important;
}

/* 5. Mobile (<=768px): Dot Auto sits cleanly in Topbar, composer stays ultra-clean 1-row! */
@media (max-width: 768px) {
  .topbar-left .model-picker-wrap {
    display: inline-flex !important;
  }
  #topbar #ace-mode-trigger {
    background: var(--bg-panel) !important;
    border: 1px solid var(--border) !important;
    padding: 5px 10px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
  }
  #composer,
  #composer.v526-wrap {
    min-height: 92px !important;
    padding: 10px 12px 8px 12px !important;
    gap: 6px !important;
  }
  #composer #ace-rich-input {
    min-height: 36px !important;
    padding: 2px 2px 8px 2px !important;
  }
  #composer #persona-selector {
    order: 12 !important;
    max-width: 112px !important;
    font-size: 12px !important;
  }
}

/* 6. Fix white-on-white "Documents" & sidebar section headers in Light Mode */
body.ace-flame-mode #ace-nb-sidebar-panel,
body.ace-flame-mode #ace-nb-sidebar-panel *,
body.ace-flame-mode #ace-nb-sidebar-panel strong,
body.ace-flame-mode #ace-nb-sidebar-panel h3,
body.ace-flame-mode #ace-nb-sidebar-panel h4,
body.ace-flame-mode #ace-nb-sidebar-panel span,
body.ace-flame-mode #ace-grp-sidebar-panel,
body.ace-flame-mode #ace-grp-sidebar-panel strong,
body.ace-flame-mode #ace-grp-sidebar-panel h3,
body.ace-flame-mode #ace-grp-sidebar-panel span,
body.ace-flame-mode #sidebar [style*="color:#fff"],
body.ace-flame-mode #sidebar [style*="color: #fff"],
body.ace-flame-mode #sidebar [style*="color:#ffffff"],
body.ace-flame-mode #sidebar [style*="color: #ffffff"],
body.ace-flame-mode #sidebar [style*="color:#f8fafc"],
body.ace-flame-mode #sidebar [style*="color:#e2e8f0"] {
  color: #121214 !important;
}
/* Keep dark button icons (e.g., X and + buttons) readable in Light Mode */
body.ace-flame-mode #ace-nb-sidebar-panel button[style*="background:#"],
body.ace-flame-mode #ace-nb-sidebar-panel button[style*="background: #"],
body.ace-flame-mode #ace-nb-sidebar-panel .nb-close-btn,
body.ace-flame-mode #ace-nb-sidebar-panel .nb-add-btn {
  color: #ffffff !important;
}
body.ace-flame-mode #ace-nb-sidebar-panel button *,
body.ace-flame-mode #ace-nb-sidebar-panel button svg {
  color: inherit !important;
  stroke: currentColor !important;
}


/* ============================================================================
   ACE v55.0 — CLEAN "+" MENU (ATTACH + LIVE VOICE), ZERO TOPBAR VOICE LOOP,
   FULL-SCREEN $0 ACE LIVE VOICE OVERLAY + NEURAL VOICE ENGINE
   ============================================================================ */

/* Remove Voice Loop from Top Bar completely (now lives cleanly inside "+" menu!) */
#topbar #ace-v53-voiceloop-btn,
#ace-v53-voiceloop-btn {
  display: none !important;
}

/* Clean "+" Action Menu anchored above the "+" button inside #composer */
#ace-v55-plus-menu {
  position: fixed;
  z-index: 95000;
  min-width: 210px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  gap: 2px;
}
#ace-v55-plus-menu.open { display: flex !important; }
#ace-v55-plus-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease;
}
#ace-v55-plus-menu button:hover {
  background: var(--bg-hover);
}
#ace-v55-plus-menu button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

/* Full-Screen $0 ACE Live Voice Overlay */
#ace-live-overlay {
  position: fixed;
  inset: 0;
  z-index: 120000;
  background: var(--bg-amoled);
  color: var(--text);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 32px 24px 40px;
}
#ace-live-overlay.open { display: flex !important; }
.ace-live-top {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ace-live-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  max-width: 520px;
}
.ace-live-orb {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ace-live-orb.listening {
  border-color: var(--text);
  box-shadow: 0 0 0 12px rgba(128, 128, 140, 0.12);
  transform: scale(1.04);
}
.ace-live-orb.speaking {
  border-color: var(--text);
  animation: aceLivePulse 1.4s ease-in-out infinite;
}
body.ace-gamer-mode .ace-live-orb.listening,
body.ace-gamer-mode .ace-live-orb.speaking {
  border-color: #22d3ee;
  color: #22d3ee;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}
.ace-live-orb.thinking svg {
  animation: aceV51Orbit 1.8s cubic-bezier(0.45,0.05,0.55,0.95) infinite;
}
@keyframes aceLivePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.ace-live-status {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.ace-live-transcript {
  font-size: 13.5px;
  color: var(--muted);
  min-height: 40px;
  line-height: 1.5;
}
.ace-live-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ace-live-btn {
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.ace-live-btn.end {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}


/* ============================================================================
   ACE v55.5 — GEMINI/CLAUDE COMPOSER EXPANSION + DYNAMIC LIVE VOICE <-> SEND
   ============================================================================ */

/* Composer grows cleanly upward when typing; bottom action items NEVER wrap */
#composer,
#composer.v526-wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  padding: 12px 12px 10px 14px !important;
  gap: 6px !important;
  border-radius: 20px !important;
}
#composer #ace-rich-input {
  order: 2 !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  min-height: 36px !important;
  max-height: 180px !important;
  overflow-y: auto !important;
  padding: 2px 2px 10px 2px !important;
  font-size: 15.5px !important;
  line-height: 1.45 !important;
}

/* Keep bottom controls strictly compact so far-right button NEVER wraps to row 3 */
#composer .plus-attach-btn:not(#voice-btn) { order: 10 !important; flex-shrink: 0 !important; }
#composer #ace-v535-chatproj { order: 11 !important; flex-shrink: 0 !important; }
#composer #persona-selector {
  order: 12 !important;
  flex-shrink: 1 !important;
  min-width: 0 !important;
  max-width: 104px !important;
  font-size: 11.5px !important;
  padding: 0 14px 0 6px !important;
}
#composer #ace-v535-spacer {
  order: 15 !important;
  flex: 1 1 4px !important;
  min-width: 4px !important;
}
#composer #ace-mode-trigger { order: 20 !important; flex-shrink: 0 !important; }
#composer #voice-btn { order: 22 !important; flex-shrink: 0 !important; }

/* Dynamic Far-Right Action Slot: Live Voice (|||) when empty <-> Send (↑) when typing! */
#composer #ace-v53-voiceloop-btn {
  order: 24 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  background: var(--text) !important;
  color: var(--bg-amoled) !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.ace-gamer-mode #composer #ace-v53-voiceloop-btn {
  background: linear-gradient(135deg, #22d3ee, #a855f7) !important;
  color: #07060d !important;
}
#composer #ace-v53-voiceloop-btn svg {
  color: inherit !important;
  stroke: currentColor !important;
}
#composer #send-btn {
  order: 24 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  margin-left: 0 !important;
  display: none !important; /* Hidden when composer is empty */
}

/* When user is typing or has an attachment: hide Live Voice, show Send Arrow on far right! */
#composer.ace-has-text #ace-v53-voiceloop-btn {
  display: none !important;
}
#composer.ace-has-text #send-btn {
  display: inline-flex !important;
}

/* On mobile, hide Chat|Project pill once typing so bottom row stays spacious & 1-line */
@media (max-width: 768px) {
  #composer.ace-has-text #ace-v535-chatproj { display: none !important; }
  #composer #persona-selector { max-width: 96px !important; }
}


/* ============================================================================
   ACE v55.5 — PC MATCHING DOWNWARD MENUS (Dot Auto + CUSTOM TONE MENU)
   Phone (<=768px) stays completely untouched!
   ============================================================================ */

/* PC (>768px): Remove dark gray dim backdrop on ACE Modes so it feels crisp & native */
@media (min-width: 769px) {
  #ace-mode-backdrop {
    background: transparent !important;
    backdrop-filter: none !important;
  }
  #ace-mode-sheet {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16) !important;
  }
  body:not(.ace-flame-mode) #ace-mode-sheet {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55) !important;
  }

  /* Hide ugly black native OS <select> on PC; use matching custom Tone button + menu */
  #composer #persona-selector.v555-native-hidden {
    display: none !important;
  }
}

#ace-tone-trigger {
  display: none;
  align-items: center;
  gap: 5px;
  order: 21;
  height: 30px;
  padding: 4px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
@media (min-width: 769px) {
  #ace-tone-trigger { display: inline-flex !important; }
}
#ace-tone-trigger:hover,
#ace-tone-trigger.open {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border);
}

#ace-tone-menu {
  display: none;
  position: fixed;
  z-index: 100001;
  width: 256px;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  color: var(--text);
}
body:not(.ace-flame-mode) #ace-tone-menu {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.6);
}
#ace-tone-menu.open { display: block !important; }
.ace-tone-sec {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.ace-tone-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.ace-tone-row:hover {
  background: var(--bg-hover);
}
.ace-tone-row.active {
  background: var(--bg-hover);
  border-color: var(--text);
  font-weight: 600;
}
.ace-tone-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid var(--muted);
  color: transparent;
}
.ace-tone-row.active .ace-tone-check {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg-amoled);
}
body.ace-gamer-mode .ace-tone-row.active {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
}
body.ace-gamer-mode .ace-tone-row.active .ace-tone-check {
  background: #22d3ee;
  border-color: #22d3ee;
  color: #07060d;
}


/* ============================================================================
   ACE v56.0 — FINAL MOBILE & DESKTOP POLISH (BUILT ON CLAUDE v55.5–v55.7)
   1. Eliminates duplicate Chat | Project pills (1 clean pill only!)
   2. Fixes mobile Live Voice / Send button wrapping onto a 3rd line
   3. Clean '+' menu (duplicate Voice Loop removed)
   ============================================================================ */

/* Desktop (>768px): keep ONLY the sleek Chat|Project pill INSIDE bottom-left of #composer */
@media (min-width: 769px) {
  #ace-v525-welcome-mode,
  #ace-v53-mode-above-composer {
    display: none !important;
  }
  body.ace-welcome-centered #ace-v535-chatproj {
    display: inline-flex !important;
  }
}

/* Mobile (<=768px): keep ONLY ONE Chat|Project pill ABOVE #composer (Welcome only)
   so #composer bottom row is cleanly [+] [Tone] ... [Mic] [Voice/Send] on ONE row! */
@media (max-width: 768px) {
  #ace-v535-chatproj,
  #ace-v53-mode-above-composer {
    display: none !important;
  }
  body.ace-welcome-centered #ace-v525-welcome-mode {
    display: inline-flex !important;
    margin: 6px auto 12px !important;
  }
  body:not(.ace-welcome-centered) #ace-v525-welcome-mode {
    display: none !important;
  }
  /* Guarantee 1-row bottom toolbar inside mobile composer (zero wrapping!) */
  #composer,
  #composer.v526-wrap {
    padding: 12px 12px 10px 14px !important;
    gap: 6px !important;
  }
  #composer #ace-tone-trigger,
  #composer #persona-selector {
    max-width: 118px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  #composer #voice-btn,
  #composer #ace-v53-voiceloop-btn,
  #composer #send-btn {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }
}

/* ACE v56.1 — Hide duplicate '+' menu */
#ace-v55-plus-menu { display: none !important; }


/* ============================================================================
   ACE v61.0 — COMPLETE FINAL POLISH (MOBILE + DESKTOP + ALL 3 THEMES + MODALS)
   ============================================================================ */
/* 1. Assistant & Sidebar scroll + hide legacy duplicate rows */
#sidebar { display: flex !important; flex-direction: column !important; height: 100dvh !important; max-height: 100dvh !important; overflow: hidden !important; }
#sidebar .sidebar-scroll { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; padding-bottom: 36px !important; }
#sidebar .sidebar-scroll #nav-groups, #sidebar .sidebar-scroll #nav-assistant { display: none !important; }
#ace-paste-btn, #task-chips, #ace-v525-welcome-mode, body.ace-welcome-centered #ace-v525-welcome-mode { display: none !important; }
#topbar #ace-v53-voiceloop-btn { width: 34px !important; height: 34px !important; border-radius: 50% !important; }

/* 2. Light Mode contrast fixes (Assistant, Documents, Settings, Select) */
body.ace-flame-mode #assistant-sec .asst-btn-row button { background: #121214 !important; color: #ffffff !important; border: 1px solid #121214 !important; opacity: 1 !important; }
body.ace-flame-mode #asst-tasks-list > div { background: #ffffff !important; border: 1px solid rgba(0,0,0,0.12) !important; color: #121214 !important; }
body.ace-flame-mode #ace-nb-sidebar-panel, body.ace-flame-mode #ace-nb-sidebar-panel *, body.ace-flame-mode #ace-grp-sidebar-panel strong { color: #121214 !important; }
body.ace-flame-mode #ace-nb-sidebar-panel .nb-close-btn, body.ace-flame-mode #ace-nb-sidebar-panel .nb-add-btn { color: #ffffff !important; }
body.ace-flame-mode #persona-selector, body.ace-flame-mode #persona-selector option { color-scheme: light !important; background-color: #ffffff !important; color: #121214 !important; }
body:not(.ace-flame-mode) #persona-selector, body:not(.ace-flame-mode) #persona-selector option { color-scheme: dark !important; background-color: #17171a !important; color: #f3f3f5 !important; }
body.ace-flame-mode #settings-modal button, body.ace-flame-mode .modal button { color: #121214 !important; border-color: rgba(0,0,0,0.14) !important; }
body.ace-flame-mode #settings-modal .btn-danger, body.ace-flame-mode .modal .btn-danger { color: #dc2626 !important; border-color: rgba(220,38,38,0.35) !important; }
body.ace-flame-mode #settings-modal .btn-primary, body.ace-flame-mode .modal .btn-primary { background: #121214 !important; color: #ffffff !important; }

/* 3. Modals: above mobile sidebar + never clipped + Account X pinned top-right */
.modal-backdrop { z-index: 2200 !important; padding: 12px !important; }
.modal, .modal-card, .modal-box { box-sizing: border-box !important; width: calc(100vw - 24px) !important; max-width: 440px !important; max-height: 88dvh !important; overflow-x: hidden !important; overflow-y: auto !important; padding: 18px !important; }
.modal button, .modal select, .modal input { max-width: 100% !important; white-space: normal !important; word-break: break-word !important; }
#privacy-toggle { box-sizing: border-box !important; width: 100% !important; padding: 9px 14px !important; background-position: right 12px center !important; }
#account-modal div:has(> #acc-modal-title) { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; width: 100% !important; }
#acc-modal-title { flex: 1 1 auto !important; min-width: 0 !important; text-align: left !important; }
#account-modal .icon-circle-btn { flex-shrink: 0 !important; }

/* 4. Search dropdown & Hub label polish */
#search-results-box { overflow-x: hidden !important; overflow-y: auto !important; }
.v525-sr-item { align-items: flex-start !important; text-align: left !important; width: 100% !important; min-width: 0 !important; overflow: hidden !important; }
.v525-sr-item > span { display: block !important; width: 100% !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; text-align: left !important; }
#ace-v52-hub .hub-node { z-index: 4 !important; }
#ace-v52-hub .hub-node.center-hub { z-index: 6 !important; }
#ace-v52-hub .hub-node[data-hub="ATLAS"] { top: 13% !important; }
#ace-v52-hub .hub-node[data-hub="ATLAS"] .hub-lbl, #ace-v52-hub .hub-node[data-hub="ATLAS"] .hub-sub { order: -1 !important; }
#ace-v52-hub .hub-lbl, #ace-v52-hub .hub-sub { background: var(--bg-panel) !important; padding: 1px 6px !important; border-radius: 5px !important; box-shadow: 0 0 0 2px var(--bg-panel) !important; }

/* 5. Mobile Layout (<=768px): Stacked Hero + Single-Row Bottom Composer + 3x3 D-Pad */
@media (max-width: 768px) {
  .topbar-left .model-picker-wrap { display: inline-flex !important; }
  #topbar #ace-mode-trigger { background: var(--bg-panel) !important; border: 1px solid var(--border) !important; padding: 5px 10px !important; font-size: 12.5px !important; border-radius: 10px !important; }
  body.ace-welcome-centered .minimal-hero { flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 10px !important; padding: 0 16px 14px !important; text-align: center !important; }
  body.ace-welcome-centered .minimal-hero-logo { width: 38px !important; height: 36px !important; }
  body.ace-welcome-centered .minimal-hero h1 { font-size: 24px !important; line-height: 1.25 !important; white-space: normal !important; width: 100% !important; text-align: center !important; }
  #composer, #composer.v526-wrap { min-height: 92px !important; padding: 12px 10px 8px 12px !important; gap: 4px !important; }
  #composer #ace-rich-input { min-height: 36px !important; padding: 2px 2px 8px 2px !important; }
  #composer .plus-attach-btn:not(#voice-btn) { width: 30px !important; height: 30px !important; }
  #ace-v535-chatproj { margin-left: 0 !important; padding: 2px !important; gap: 1px !important; }
  #ace-v535-chatproj button { padding: 3px 8px !important; font-size: 11px !important; }
  #composer #persona-selector { order: 12 !important; max-width: 86px !important; font-size: 11px !important; padding: 0 14px 0 4px !important; height: 28px !important; }
  #ace-v535-spacer { min-width: 2px !important; }
  #composer #voice-btn, #composer #send-btn { width: 32px !important; height: 32px !important; flex-shrink: 0 !important; }
  #ace-v535-below-chips { gap: 6px !important; padding: 0 8px !important; }
  .v535-chip { padding: 6px 11px !important; font-size: 12px !important; }
}
.native-arcade-dpad:has(#pm-u), #arc-ctrl:has(#pm-u), [id*="arcade"] .dpad:has(#pm-u) {
  display: grid !important; grid-template-columns: repeat(3, 56px) !important; grid-template-rows: repeat(3, 56px) !important;
  gap: 6px !important; justify-content: center !important; align-items: center !important; margin: 12px auto 4px !important; width: fit-content !important;
}
#pm-u { grid-column: 2 !important; grid-row: 1 !important; }
#pm-l { grid-column: 1 !important; grid-row: 2 !important; }
#pm-r { grid-column: 3 !important; grid-row: 2 !important; }
#pm-d { grid-column: 2 !important; grid-row: 3 !important; }
#pm-u, #pm-l, #pm-r, #pm-d { width: 56px !important; height: 56px !important; border-radius: 14px !important; font-size: 20px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; touch-action: manipulation !important; }

/* ACE v61.5 — Fix Light-Mode .modal dark-on-dark, oval X button, Assistant wrap, & Arcade tabs */
.modal,
body.ace-flame-mode .modal,
body.ace-gamer-mode .modal {
  background: var(--bg-panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
.modal .icon-circle-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  flex: 0 0 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.ace-flame-mode .modal strong,
body.ace-flame-mode .modal h2,
body.ace-flame-mode .modal h3,
body.ace-flame-mode .modal p,
body.ace-flame-mode .modal li,
body.ace-flame-mode .modal .icon-circle-btn {
  color: #121214 !important;
}
#assistant-sec .asst-btn-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}
#assistant-sec .asst-btn-row button {
  flex: 1 1 44% !important;
  min-width: 0 !important;
  font-size: 11.5px !important;
  padding: 7px 8px !important;
  text-align: center !important;
}
.arcade-tabs button, .arc-tabs button, #arcade-tabs button {
  font-size: 11.5px !important;
  padding: 5px 9px !important;
  white-space: nowrap !important;
}

/* ACE v61.5 — Fix Light-Mode .modal dark-on-dark, oval X button, Assistant wrap, & Arcade tabs */
.modal,
body.ace-flame-mode .modal,
body.ace-gamer-mode .modal {
  background: var(--bg-panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
.modal .icon-circle-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  flex: 0 0 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.ace-flame-mode .modal strong,
body.ace-flame-mode .modal h2,
body.ace-flame-mode .modal h3,
body.ace-flame-mode .modal p,
body.ace-flame-mode .modal li,
body.ace-flame-mode .modal .icon-circle-btn {
  color: #121214 !important;
}
#assistant-sec .asst-btn-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}
#assistant-sec .asst-btn-row button {
  flex: 1 1 44% !important;
  min-width: 0 !important;
  font-size: 11.5px !important;
  padding: 7px 8px !important;
  text-align: center !important;
}
.arcade-tabs button, .arc-tabs button, #arcade-tabs button {
  font-size: 11.5px !important;
  padding: 5px 9px !important;
  white-space: nowrap !important;
}
/* === ACE_STEP1_MODES_START === */
:root {
  --ace-mode-accent: var(--text, #f4f4f6);
  --ace-mode-surface: var(--bg-panel, #16161a);
  --ace-mode-bar-h: 40px;
}
body[data-ace-mode="arcade"] { --ace-mode-accent: #22d3ee; }
body[data-ace-mode="pc"] { --ace-mode-accent: var(--text, #f4f4f6); }

#topbar { position: relative; }

#ace-mode-switch {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  height: 34px;
  box-sizing: border-box;
  background: var(--bg-panel, #16161a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 999px;
  z-index: 60;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.ace-flame-mode #ace-mode-switch {
  background: #eceae4;
  border-color: rgba(17, 17, 20, 0.12);
}
body.ace-gamer-mode #ace-mode-switch {
  background: rgba(15, 13, 28, 0.92);
  border-color: rgba(34, 211, 238, 0.3);
}
.ace-mode-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted, #9a9aa6);
  font: 600 12.5px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}
.ace-mode-tab:hover { color: var(--text, #f4f4f6); }
.ace-mode-tab.active {
  background: var(--text, #f4f4f6);
  color: var(--bg-amoled, #0e0e10);
}
body.ace-flame-mode .ace-mode-tab.active { background: #141417; color: #f7f6f3; }
body.ace-gamer-mode .ace-mode-tab.active { background: #22d3ee; color: #07060d; }

body[data-ace-mode="arcade"] #topbar { z-index: 5100 !important; }
body[data-ace-mode="arcade"] #split-preview-pane.open.ace-arcade-fullscreen,
body[data-ace-mode="arcade"] #split-preview-pane.open.fullscreen {
  top: 56px !important;
  height: calc(100dvh - 56px) !important;
}

@media (max-width: 768px) {
  #ace-mode-switch {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    height: var(--ace-mode-bar-h);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    padding: 4px 10px;
    gap: 6px;
    justify-content: center;
    background: var(--bg-amoled, #0e0e10);
    z-index: 45;
  }
  body.ace-flame-mode #ace-mode-switch { background: #f7f6f3; }
  body.ace-gamer-mode #ace-mode-switch { background: #07060d; }
  .ace-mode-tab {
    flex: 1 1 0;
    min-height: 30px;
    padding: 6px 8px;
    text-align: center;
    font-size: 12.5px;
  }
  #chat-stream { padding-top: 44px !important; }
  body.ace-welcome-centered #center { padding-top: 0 !important; }
  body[data-ace-mode="arcade"] #ace-mode-switch { top: 0 !important; z-index: 5150 !important; }
  body[data-ace-mode="arcade"] #split-preview-pane.open,
  body[data-ace-mode="arcade"] #split-preview-pane.ace-arcade-fullscreen {
    top: var(--ace-mode-bar-h) !important;
    height: calc(100dvh - var(--ace-mode-bar-h)) !important;
  }
}

#ace-pc-shell {
  display: none;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 20px 18px 28px;
  color: var(--text, #f4f4f6);
}
body[data-ace-mode="pc"] #chat-stream,
body[data-ace-mode="pc"] #bottom-dock { display: none !important; }
body[data-ace-mode="pc"] #center {
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body[data-ace-mode="pc"] #topbar { position: relative !important; }
body[data-ace-mode="pc"] #ace-pc-shell { display: flex; flex-direction: column; align-items: center; }
@media (max-width: 768px) {
  body[data-ace-mode="pc"] #ace-pc-shell { padding: 54px 12px 24px; }
}
.ace-pc-inner { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 14px; }
.ace-pc-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--bg-panel, #16161a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
body.ace-flame-mode .ace-pc-header,
body.ace-flame-mode .ace-pc-card { background: #ffffff; border-color: rgba(17, 17, 20, 0.11); }
.ace-pc-title-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ace-pc-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ace-pc-sub { margin: 0; font-size: 12.5px; color: var(--muted, #9a9aa6); }
.ace-pc-preset-group {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px;
  background: var(--bg-amoled, #0e0e10);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
body.ace-flame-mode .ace-pc-preset-group { background: #f0eee9; }
.ace-pc-preset-btn {
  appearance: none; border: none; background: transparent;
  color: var(--muted, #9a9aa6);
  font: 600 12.5px/1 system-ui, -apple-system, sans-serif;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
}
.ace-pc-preset-btn.active { background: var(--text, #f4f4f6); color: var(--bg-amoled, #0e0e10); }
body.ace-flame-mode .ace-pc-preset-btn.active { background: #141417; color: #f7f6f3; }
.ace-pc-meta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ace-pc-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border-radius: 999px; font-size: 12px;
  background: var(--bg-panel, #16161a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  color: var(--muted, #9a9aa6);
}
.ace-pc-pill strong { color: var(--text, #f4f4f6); font-weight: 600; }
body.ace-flame-mode .ace-pc-pill { background: #ffffff; }
.ace-pc-grid { display: grid; grid-template-columns: 240px 1fr; gap: 14px; }
@media (max-width: 768px) { .ace-pc-grid { grid-template-columns: 1fr; } }
.ace-pc-card {
  padding: 16px; border-radius: 14px;
  background: var(--bg-panel, #16161a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  display: flex; flex-direction: column; gap: 10px;
}
.ace-pc-card-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted, #9a9aa6);
}
.ace-pc-folders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ace-pc-folder-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 9px; font-size: 13px;
  color: var(--muted, #9a9aa6); border: 1px solid transparent;
}
.ace-pc-folder-item.is-home {
  color: var(--text, #f4f4f6); font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border, rgba(255, 255, 255, 0.14));
}
body.ace-flame-mode .ace-pc-folder-item.is-home { background: #f0eee9; }
.ace-pc-home-tag {
  font-size: 10.5px; font-weight: 600; padding: 2px 7px;
  border-radius: 999px; border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
}
.ace-pc-empty-stage {
  min-height: 200px; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; gap: 10px; padding: 18px; border-radius: 12px;
  border: 1px dashed var(--border, rgba(255, 255, 255, 0.18));
}
.ace-pc-empty-stage p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted, #9a9aa6); }
.ace-pc-back-btn {
  appearance: none; border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  background: transparent; color: var(--text, #f4f4f6);
  font: 600 12.5px/1 system-ui, -apple-system, sans-serif;
  padding: 9px 14px; border-radius: 9px; cursor: pointer;
}
.ace-pc-back-btn:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.06)); }
/* === ACE_STEP1_MODES_END === */
/* === ACE_STEP2_WORKSPACE_START === */
body[data-ace-mode="pc"] #ace-drop-ov {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body[data-ace-mode="pc"] #ace-pc-shell {
  padding: 12px 16px 14px !important;
  overflow: hidden !important;
  align-items: stretch !important;
}
@media (max-width: 768px) {
  body[data-ace-mode="pc"] #ace-pc-shell {
    padding: 48px 8px 10px !important;
    overflow-y: auto !important;
  }
}

/* Realistic PC Explorer Window Frame */
.ace-pc-window {
  width: 100%;
  max-width: 1320px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-panel, #141418);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.11));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}
body.ace-flame-mode .ace-pc-window {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.14);
  box-shadow: 0 12px 32px rgba(17, 17, 20, 0.08);
}
@media (max-width: 768px) {
  .ace-pc-window {
    height: auto;
    min-height: calc(100dvh - 108px);
    border-radius: 12px;
  }
}

/* Top OS Window Title / Address Bar */
.ace-pc-winbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg-amoled, #0e0e10);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.09));
  flex-shrink: 0;
}
body.ace-flame-mode .ace-pc-winbar {
  background: #f3f2ee;
  border-bottom-color: rgba(17, 17, 20, 0.1);
}
.ace-pc-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.ace-pc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.ace-pc-dot.r { background: #ef4444; opacity: 0.78; }
.ace-pc-dot.y { background: #f59e0b; opacity: 0.78; }
.ace-pc-dot.g { background: #22c55e; opacity: 0.78; }

.ace-pc-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ace-pc-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: transparent;
  color: var(--text, #f4f4f6);
  font-size: 13px;
  cursor: pointer;
}
.ace-pc-icon-btn:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.08)); }
.ace-pc-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ace-pc-icon-btn.active {
  background: var(--text, #f4f4f6);
  color: var(--bg-amoled, #0e0e10);
  border-color: transparent;
}
body.ace-flame-mode .ace-pc-icon-btn { color: #141417; border-color: rgba(17, 17, 20, 0.14); }
body.ace-flame-mode .ace-pc-icon-btn.active { background: #141417; color: #f7f6f3; }

.ace-pc-address {
  flex: 1 1 200px;
  min-width: 140px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--bg-panel, #16161a);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12.5px;
}
body.ace-flame-mode .ace-pc-address {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.14);
}
.ace-pc-crumb {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted, #9a9aa6);
  font: 600 12.5px/1 system-ui, -apple-system, sans-serif;
  padding: 4px 5px;
  border-radius: 5px;
  cursor: pointer;
}
.ace-pc-crumb:hover { background: rgba(255, 255, 255, 0.07); color: var(--text, #f4f4f6); }
.ace-pc-crumb.current { color: var(--text, #f4f4f6); }
.ace-pc-crumb-sep { color: var(--muted, #6b6b76); font-size: 11px; user-select: none; }

.ace-pc-search {
  width: 180px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--bg-panel, #16161a);
  color: var(--text, #f4f4f6);
  font: 500 12px/1 system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}
body.ace-flame-mode .ace-pc-search {
  background: #ffffff;
  color: #141417;
  border-color: rgba(17, 17, 20, 0.14);
}
@media (max-width: 768px) {
  .ace-pc-dots { display: none; }
  .ace-pc-search { width: 100%; order: 4; }
}

/* Main Split Body: Sidebar + Content Pane */
.ace-pc-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 230px 1fr;
}
@media (max-width: 768px) {
  .ace-pc-body {
    grid-template-columns: 1fr;
  }
}

.ace-pc-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 10px;
  background: rgba(0, 0, 0, 0.18);
  border-right: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  gap: 8px;
}
body.ace-flame-mode .ace-pc-sidebar {
  background: #f8f7f4;
  border-right-color: rgba(17, 17, 20, 0.1);
}
@media (max-width: 768px) {
  .ace-pc-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    padding: 10px;
  }
}
.ace-pc-side-label {
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted, #8e8e99);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ace-pc-folders {
  flex: 1 1 auto;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (max-width: 768px) {
  .ace-pc-folders {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
  }
}
.ace-pc-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted, #a1a1ad);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.ace-pc-folder-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #f4f4f6);
}
body.ace-flame-mode .ace-pc-folder-item:hover { background: #eceae4; color: #141417; }
.ace-pc-folder-item.is-selected {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text, #f4f4f6);
  font-weight: 600;
}
body.ace-flame-mode .ace-pc-folder-item.is-selected {
  background: #e5e3dc;
  color: #141417;
}
.ace-pc-folder-item.drag-over,
.ace-pc-dropzone.drag-over {
  border-color: #22d3ee !important;
  background: rgba(34, 211, 238, 0.1) !important;
}
.ace-pc-folder-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}
.ace-pc-folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ace-pc-count { font-size: 11px; color: var(--muted, #8e8e99); flex-shrink: 0; }

/* Drive Storage Meter pinned at bottom of sidebar */
.ace-pc-drive-box {
  margin-top: auto;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-amoled, #0e0e10);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.ace-flame-mode .ace-pc-drive-box {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.1);
}
.ace-pc-drive-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text, #f4f4f6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ace-pc-quota-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
body.ace-flame-mode .ace-pc-quota-track { background: rgba(17, 17, 20, 0.1); }
.ace-pc-quota-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--text, #f4f4f6);
  transition: width 180ms ease;
}
body.ace-flame-mode .ace-pc-quota-fill { background: #141417; }
.ace-pc-quota-fill.warn { background: #f59e0b !important; }
.ace-pc-quota-fill.full { background: #ef4444 !important; }
.ace-pc-quota-text { font-size: 11px; color: var(--muted, #8e8e99); }

/* Right Explorer Content Pane */
.ace-pc-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.ace-pc-actionbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  flex-shrink: 0;
}
.ace-pc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.ace-pc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.13));
  background: var(--bg-amoled, #0e0e10);
  color: var(--text, #f4f4f6);
  font: 600 12px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.ace-pc-btn:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.08)); }
.ace-pc-btn.primary {
  background: var(--text, #f4f4f6);
  color: var(--bg-amoled, #0e0e10);
  border-color: transparent;
}
body.ace-flame-mode .ace-pc-btn { background: #f5f4f0; color: #141417; border-color: rgba(17, 17, 20, 0.14); }
body.ace-flame-mode .ace-pc-btn.primary { background: #141417; color: #f7f6f3; }
.ace-pc-btn.danger { color: #f87171; border-color: rgba(248, 113, 113, 0.3); }

.ace-pc-newfolder-row {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: rgba(255, 255, 255, 0.02);
}
.ace-pc-newfolder-row.show { display: flex; }
.ace-pc-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  background: var(--bg-amoled, #0e0e10);
  color: var(--text, #f4f4f6);
  font: 500 12.5px/1 system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}
body.ace-flame-mode .ace-pc-input { background: #ffffff; color: #141417; border-color: rgba(17, 17, 20, 0.18); }

/* Scrollable File Canvas (Grid or List View) */
.ace-pc-workspace-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ace-pc-dropzone {
  flex: 1 1 auto;
  min-height: 180px;
  border-radius: 10px;
  border: 1px dashed transparent;
  padding: 4px;
  transition: border-color 140ms ease, background 140ms ease;
}
.ace-pc-dropzone.is-empty {
  border-color: var(--border, rgba(255, 255, 255, 0.14));
  display: flex;
  align-items: center;
  justify-content: center;
}
.ace-pc-empty-hint {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted, #8e8e99);
}

/* Grid (Desktop Icon) View */
.ace-pc-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
}
.ace-pc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 11px;
  border-radius: 11px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-amoled, #0e0e10);
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: border-color 120ms ease, background 120ms ease;
}
body.ace-flame-mode .ace-pc-tile {
  background: #faf9f6;
  border-color: rgba(17, 17, 20, 0.09);
}
.ace-pc-tile:hover { border-color: var(--border, rgba(255, 255, 255, 0.24)); }
.ace-pc-tile.active {
  border-color: var(--text, #f4f4f6);
  background: rgba(255, 255, 255, 0.06);
}
body.ace-flame-mode .ace-pc-tile.active {
  border-color: #141417;
  background: #efede7;
}
.ace-pc-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #f4f4f6);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
body.ace-flame-mode .ace-pc-tile-icon { background: #eceae4; color: #141417; }
.ace-pc-tile-icon.is-folder { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }
.ace-pc-tile-icon.t-xlsx { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
.ace-pc-tile-icon.t-docx { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.ace-pc-tile-icon.t-pdf  { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.ace-pc-tile-icon.t-code { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.ace-pc-tile-thumb {
  width: 100%;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}
.ace-pc-tile-snippet {
  width: 100%;
  height: 54px;
  box-sizing: border-box;
  padding: 6px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  color: var(--muted, #9a9aa6);
  font: 10px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}
body.ace-flame-mode .ace-pc-tile-snippet { background: #f2f0ea; color: #52525c; }
.ace-pc-tile-name {
  width: 100%;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #f4f4f6);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  line-height: 1.3;
}
.ace-pc-tile-meta { font-size: 10.5px; color: var(--muted, #8e8e99); }

/* List (Details) View */
.ace-pc-list-view {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ace-pc-node-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
  background: var(--bg-amoled, #0e0e10);
  cursor: pointer;
}
body.ace-flame-mode .ace-pc-node-row { background: #faf9f6; border-color: rgba(17, 17, 20, 0.09); }
.ace-pc-node-row:hover { border-color: var(--border, rgba(255, 255, 255, 0.22)); }
.ace-pc-node-row.active { border-color: var(--text, #f4f4f6); }
.ace-pc-node-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.ace-pc-node-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ace-pc-node-name {
  font-size: 13px; font-weight: 600; color: var(--text, #f4f4f6);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ace-pc-node-meta { font-size: 11px; color: var(--muted, #8e8e99); }
.ace-pc-node-actions { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.ace-pc-mini-btn {
  appearance: none;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 600 11px/1 system-ui, -apple-system, sans-serif;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
}
.ace-pc-mini-btn:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.08)); }
.ace-pc-mini-btn.danger { color: #f87171; border-color: rgba(248, 113, 113, 0.28); }

/* Inspector / File Preview Panel */
.ace-pc-viewer {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.13));
  background: var(--bg-amoled, #0e0e10);
}
body.ace-flame-mode .ace-pc-viewer { background: #f8f7f4; border-color: rgba(17, 17, 20, 0.12); }
.ace-pc-viewer.show { display: flex; }
.ace-pc-viewer-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.ace-pc-viewer-pre {
  margin: 0; max-height: 260px; overflow: auto; padding: 11px; border-radius: 8px;
  background: var(--bg-panel, #16161a); color: var(--text, #f4f4f6);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-word;
}
body.ace-flame-mode .ace-pc-viewer-pre { background: #ffffff; color: #141417; border: 1px solid rgba(17, 17, 20, 0.08); }
.ace-pc-viewer-img { max-width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; align-self: flex-start; }
.ace-pc-viewer-pdf { width: 100%; height: 340px; border: 1px solid var(--border, rgba(255, 255, 255, 0.12)); border-radius: 8px; background: #ffffff; }

/* Bottom OS Status Bar */
.ace-pc-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  font-size: 11.5px;
  color: var(--muted, #8e8e99);
  background: var(--bg-amoled, #0e0e10);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  flex-shrink: 0;
}
body.ace-flame-mode .ace-pc-statusbar { background: #f3f2ee; border-top-color: rgba(17, 17, 20, 0.1); }

/* Floating Toast (ZERO layout shift when shown/hidden!) */
.ace-pc-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(90vw, 420px);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  background: var(--bg-panel, #18181d);
  color: var(--text, #f4f4f6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  z-index: 5200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
}
.ace-pc-banner.show { opacity: 1; transform: translateY(0); }
.ace-pc-banner.error {
  border-color: rgba(239, 68, 68, 0.55);
  background: #2a1215;
  color: #fca5a5;
}
body.ace-flame-mode .ace-pc-banner { background: #141417; color: #f7f6f3; }
body.ace-flame-mode .ace-pc-banner.error { background: #fef2f2; color: #b91c1c; }

@media (max-width: 768px) {
  .ace-pc-grid-view { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .ace-pc-node-row { flex-wrap: wrap; }
  .ace-pc-node-actions { width: 100%; justify-content: flex-end; }
  .ace-pc-viewer-pdf { height: 240px; }
}
/* Global polish fixes from screen-sandbox QA */
#sidebar .nav-list { display: none !important; }
@media (min-width: 769px) {
  #ace-mode-switch {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    flex-shrink: 1 !important;
  }
}
.ace-pc-tile-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: var(--bg-panel, #16161a);
  color: #f87171;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 120ms ease;
}
.ace-pc-tile:hover .ace-pc-tile-del,
.ace-pc-tile:focus-within .ace-pc-tile-del { opacity: 1; }
@media (max-width: 768px) { .ace-pc-tile-del { opacity: 0.85; } }
/* === ACE_STEP2_WORKSPACE_END === */
/* === ACE_STEP3_VM_PRIVACY_START === */
.ace-pc-dot {
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}
.ace-pc-dot:hover { transform: scale(1.2); opacity: 1 !important; }

.ace-pc-window.vm-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  z-index: 5180 !important;
}
.ace-pc-window.vm-sidebar-collapsed .ace-pc-body {
  grid-template-columns: 1fr !important;
}
.ace-pc-window.vm-sidebar-collapsed .ace-pc-sidebar {
  display: none !important;
}

.ace-vm-apps-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .ace-vm-apps-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 4px;
  }
}
.ace-vm-app-btn {
  appearance: none;
  width: 100% !important;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #a1a1ad);
  font: 600 12.5px/1 system-ui, -apple-system, sans-serif;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  text-align: left !important;
}
.ace-vm-app-btn svg { flex-shrink: 0; opacity: 0.88; }
@media (max-width: 768px) {
  .ace-vm-app-btn { width: auto !important; }
}
.ace-vm-app-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text, #f4f4f6); }
.ace-vm-app-btn.active { background: rgba(255, 255, 255, 0.11); color: var(--text, #f4f4f6); }
body.ace-flame-mode .ace-vm-app-btn:hover { background: #eceae4; color: #141417; }
body.ace-flame-mode .ace-vm-app-btn.active { background: #e5e3dc; color: #141417; }

.ace-vm-privacy-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ace-vm-toggle-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--bg-amoled, #0e0e10);
  color: var(--muted, #a1a1ad);
  font: 600 11.5px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
body.ace-flame-mode .ace-vm-toggle-pill { background: #f5f4f0; color: #4a4a55; border-color: rgba(17, 17, 20, 0.14); }
.ace-vm-toggle-pill.is-private {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}
body.ace-flame-mode .ace-vm-toggle-pill.is-private { color: #b45309; background: #fef3c7; }
.ace-vm-toggle-pill.is-allowed {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
}
body.ace-flame-mode .ace-vm-toggle-pill.is-allowed { color: #15803d; background: #dcfce7; }
.ace-vm-toggle-pill:disabled { opacity: 0.4; cursor: not-allowed; }
.ace-vm-lock-badge { font-size: 11px; margin-left: 3px; opacity: 0.9; }

.ace-vm-sheet-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.ace-vm-sheet-tab {
  appearance: none;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--muted, #a1a1ad);
  font: 600 11.5px/1 system-ui, -apple-system, sans-serif;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.ace-vm-sheet-tab.active {
  background: var(--text, #f4f4f6);
  color: var(--bg-amoled, #0e0e10);
  border-color: transparent;
}
body.ace-flame-mode .ace-vm-sheet-tab.active { background: #141417; color: #f7f6f3; }
.ace-vm-table-wrap {
  width: 100%;
  max-height: 320px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
}
.ace-vm-table { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--text, #f4f4f6); }
.ace-vm-table th, .ace-vm-table td {
  padding: 6px 9px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  text-align: left;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ace-vm-table th { position: sticky; top: 0; background: var(--bg-panel, #18181d); font-weight: 700; }
.ace-vm-table td[contenteditable="true"]:focus,
.ace-vm-table th[contenteditable="true"]:focus {
  outline: 2px solid #22d3ee;
  outline-offset: -2px;
  background: rgba(34, 211, 238, 0.08);
}
.ace-vm-inline-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap;
}
.ace-vm-inline-bar .ace-pc-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 160px !important;
}
@media (max-width: 768px) {
  .ace-vm-inline-bar { flex-wrap: wrap; }
}
body.ace-flame-mode .ace-vm-table { color: #141417; }
body.ace-flame-mode .ace-vm-table th { background: #eceae4; }
body.ace-flame-mode .ace-vm-table th, body.ace-flame-mode .ace-vm-table td { border-color: rgba(17, 17, 20, 0.1); }

#ace-vm-ctx-menu {
  position: fixed;
  min-width: 176px;
  padding: 5px;
  border-radius: 10px;
  background: var(--bg-panel, #18181e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
  z-index: 5300;
  display: none;
  flex-direction: column;
  gap: 2px;
}
body.ace-flame-mode #ace-vm-ctx-menu { background: #ffffff; border-color: rgba(17, 17, 20, 0.14); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14); }
#ace-vm-ctx-menu.show { display: flex; }
.ace-vm-ctx-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 500 12.5px/1.2 system-ui, -apple-system, sans-serif;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.ace-vm-ctx-item:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.08)); }
.ace-vm-ctx-item.danger { color: #f87171; }
.ace-vm-ctx-sep { height: 1px; margin: 3px 6px; background: var(--border, rgba(255, 255, 255, 0.1)); }

.ace-vm-app-pane {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}
.ace-vm-app-pane.show { display: flex; }
.ace-vm-note-area {
  flex: 1 1 auto;
  min-height: 260px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--bg-amoled, #0e0e10);
  color: var(--text, #f4f4f6);
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}
body.ace-flame-mode .ace-vm-note-area { background: #ffffff; color: #141417; border-color: rgba(17, 17, 20, 0.16); }

.ace-vm-yt-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 11px;
  background: #000000;
}

.ace-vm-calc {
  max-width: 300px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--bg-amoled, #0e0e10);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.ace-flame-mode .ace-vm-calc { background: #f8f7f4; border-color: rgba(17, 17, 20, 0.14); }
.ace-vm-calc-disp {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--bg-panel, #16161a);
  color: var(--text, #f4f4f6);
  font: 700 22px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: right;
  overflow-x: auto;
}
body.ace-flame-mode .ace-vm-calc-disp { background: #ffffff; color: #141417; }
.ace-vm-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.ace-vm-calc-btn {
  appearance: none;
  height: 44px;
  border-radius: 9px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--bg-panel, #18181e);
  color: var(--text, #f4f4f6);
  font: 600 15px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
}
.ace-vm-calc-btn:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.1)); }
.ace-vm-calc-btn.op { background: rgba(255, 255, 255, 0.08); }
.ace-vm-calc-btn.eq { background: var(--text, #f4f4f6); color: var(--bg-amoled, #0e0e10); border-color: transparent; }
body.ace-flame-mode .ace-vm-calc-btn { background: #ffffff; color: #141417; border-color: rgba(17, 17, 20, 0.14); }
body.ace-flame-mode .ace-vm-calc-btn.eq { background: #141417; color: #f7f6f3; }

#ace-vm-consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 5400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#ace-vm-consent-backdrop.show { display: flex; }
.ace-vm-consent-box {
  width: 100%;
  max-width: 440px;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg-panel, #16161a);
  color: var(--text, #f4f4f6);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.ace-flame-mode .ace-vm-consent-box { background: #ffffff; color: #141417; }
/* === ACE_STEP3_VM_PRIVACY_END === */
/* === ACE_STEP4_BM25_TERMINAL_START === */
/* VM Terminal App */
.ace-vm-term-box {
  flex: 1 1 auto;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border-radius: 11px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: #0b0b0e;
  color: #e4e4eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
}
body.ace-flame-mode .ace-vm-term-box {
  background: #141418;
  color: #e8e8ee;
  border-color: rgba(17, 17, 20, 0.22);
}
.ace-vm-term-out {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.ace-vm-term-line.cmd { color: #22d3ee; font-weight: 600; }
.ace-vm-term-line.err { color: #f87171; }
.ace-vm-term-line.ok  { color: #4ade80; }
.ace-vm-term-line.dim { color: #8e8e9e; }
.ace-vm-term-in-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.ace-vm-term-prompt {
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.ace-vm-term-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #f4f4f6;
  font: 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Inline Ask Dot Bar inside File Viewer */
.ace-vm-ask-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--bg-panel, #16161a);
}
body.ace-flame-mode .ace-vm-ask-panel { background: #ffffff; border-color: rgba(17, 17, 20, 0.14); }
.ace-vm-ask-panel.show { display: flex; }
.ace-vm-ask-ans {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text, #f4f4f6);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}
body.ace-flame-mode .ace-vm-ask-ans { color: #141417; }
/* === ACE_STEP4_BM25_TERMINAL_END === */
/* === ACE_STEP5_AGENT_CHESS_START === */
/* ==================== GOOGLE DRIVE-INSPIRED VM REDESIGN ==================== */
body[data-ace-mode="pc"] #ace-pc-shell {
  padding: 0 !important;
  background: #0e0e11 !important;
}
body.ace-flame-mode[data-ace-mode="pc"] #ace-pc-shell {
  background: #f4f5f7 !important;
}
@media (max-width: 768px) {
  body[data-ace-mode="pc"] #ace-pc-shell {
    padding: 40px 0 0 !important;
  }
}

.ace-pc-window {
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Top Google Drive Search Header */
.ace-pc-winbar {
  padding: 10px 18px 10px 16px !important;
  background: transparent !important;
  border-bottom: none !important;
  gap: 12px !important;
}
.ace-pc-dots { display: none !important; }
.ace-pc-address { display: none !important; } /* Moved into elevated Drive surface header */
.ace-pc-search {
  flex: 1 1 320px !important;
  max-width: 640px !important;
  height: 40px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #1a1b20 !important;
  font-size: 13.5px !important;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.ace-pc-search:focus {
  outline: none;
  background: #202229 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}
body.ace-flame-mode .ace-pc-search {
  background: #e9eef6 !important;
  border-color: transparent !important;
  color: #1f1f1f !important;
}
body.ace-flame-mode .ace-pc-search:focus {
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}
.ace-vm-header-spacer { flex: 1 1 auto; }

/* Signature Ask Dot Toggle Pill in Top-Right */
.ace-vm-ask-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c1d24;
  color: #f4f4f6;
  font: 600 13px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}
.ace-vm-ask-toggle:hover { background: #262832; border-color: rgba(255, 255, 255, 0.24); }
.ace-vm-ask-toggle.active {
  background: #f4f4f6;
  color: #0e0e11;
  border-color: transparent;
}
body.ace-flame-mode .ace-vm-ask-toggle {
  background: #ffffff;
  color: #1f1f1f;
  border-color: rgba(17, 17, 20, 0.14);
}
body.ace-flame-mode .ace-vm-ask-toggle.active {
  background: #1a73e8;
  color: #ffffff;
  border-color: transparent;
}

/* Main Drive Body: Left Rail + Elevated Rounded Surface + Optional Right Ask Dot Panel */
.ace-pc-body {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 0 14px 12px 0 !important;
  gap: 12px !important;
}
@media (max-width: 768px) {
  .ace-pc-body {
    flex-direction: column !important;
    padding: 0 8px 10px !important;
    gap: 8px !important;
  }
}

/* Google Drive Left Rail */
.ace-pc-sidebar {
  width: 236px !important;
  flex: 0 0 236px !important;
  padding: 4px 12px 12px 14px !important;
  background: transparent !important;
  border: none !important;
  gap: 10px !important;
}
@media (max-width: 768px) {
  .ace-pc-sidebar {
    width: 100% !important;
    flex: 0 0 auto !important;
    padding: 6px 4px !important;
  }
}

/* Signature "+ New" Floating Pill Button + Dropdown */
.ace-drive-new-wrap {
  position: relative;
  margin-bottom: 4px;
}
.ace-drive-new-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e2028;
  color: #f4f4f6;
  font: 600 13.5px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.26);
  transition: background 140ms ease, box-shadow 140ms ease;
}
.ace-drive-new-btn:hover { background: #272a35; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34); }
body.ace-flame-mode .ace-drive-new-btn {
  background: #ffffff;
  color: #1f1f1f;
  border-color: rgba(17, 17, 20, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
body.ace-flame-mode .ace-drive-new-btn:hover { background: #edf2fa; }

.ace-drive-new-menu {
  position: absolute;
  top: 50px;
  left: 0;
  min-width: 210px;
  padding: 6px;
  border-radius: 12px;
  background: #1d1e25;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 5250;
}
body.ace-flame-mode .ace-drive-new-menu {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.ace-drive-new-menu.show { display: flex; }
.ace-drive-new-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 500 13px/1.2 system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.ace-drive-new-item:hover { background: rgba(255, 255, 255, 0.08); }
body.ace-flame-mode .ace-drive-new-item:hover { background: #f1f3f4; }

/* Pill-shaped Google Drive Nav Items */
.ace-pc-folder-item,
.ace-vm-app-btn {
  border-radius: 999px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
}
.ace-pc-folder-item.is-selected,
.ace-vm-app-btn.active {
  background: rgba(138, 180, 248, 0.16) !important;
  color: #c2d9ff !important;
}
body.ace-flame-mode .ace-pc-folder-item.is-selected,
body.ace-flame-mode .ace-vm-app-btn.active {
  background: #c2e7ff !important;
  color: #001d35 !important;
}

/* Minimal Borderless Drive Storage Meter */
.ace-pc-drive-box {
  background: transparent !important;
  border: none !important;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 0 !important;
  padding: 12px 6px 2px !important;
}
.ace-pc-quota-track { height: 4px !important; }
.ace-pc-quota-fill { background: #8ab4f8 !important; }
body.ace-flame-mode .ace-pc-quota-fill { background: #1a73e8 !important; }

/* Elevated Rounded Main Drive Surface */
.ace-pc-main {
  flex: 1 1 auto !important;
  border-radius: 16px !important;
  background: #16171c !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  overflow: hidden !important;
}
body.ace-flame-mode .ace-pc-main {
  background: #ffffff !important;
  border-color: rgba(17, 17, 20, 0.08) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ace-pc-actionbar {
  padding: 14px 18px 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  gap: 10px !important;
}
body.ace-flame-mode .ace-pc-actionbar { border-bottom-color: rgba(17, 17, 20, 0.07) !important; }

.ace-drive-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #f4f4f6);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ace-drive-heading .ace-pc-crumb {
  font-size: 17px !important;
  font-weight: 600 !important;
  padding: 3px 6px !important;
}

/* Hide redundant +Add Files / +Add Folder / +New Folder buttons from toolbar (now cleanly inside "+ New") */
#ace-pc-upload-file-btn,
#ace-pc-upload-folder-btn,
#ace-pc-newfolder-toggle {
  display: none !important;
}

/* Google Drive-Style 2-Part File Cards */
.ace-pc-grid-view {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)) !important;
  gap: 14px !important;
}
@media (max-width: 768px) {
  .ace-pc-grid-view { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 10px !important; }
}
.ace-pc-tile {
  padding: 10px !important;
  border-radius: 13px !important;
  background: #1d1e25 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  align-items: stretch !important;
  text-align: left !important;
  gap: 8px !important;
}
.ace-pc-tile:hover {
  background: #23252e !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
.ace-pc-tile.active {
  background: rgba(138, 180, 248, 0.14) !important;
  border-color: rgba(138, 180, 248, 0.55) !important;
}
body.ace-flame-mode .ace-pc-tile {
  background: #f0f4f9 !important;
  border-color: transparent !important;
}
body.ace-flame-mode .ace-pc-tile:hover { background: #e6ecf5 !important; }
body.ace-flame-mode .ace-pc-tile.active { background: #c2e7ff !important; border-color: #1a73e8 !important; }

.ace-pc-tile-thumb { height: 96px !important; border-radius: 9px !important; }
.ace-pc-tile-snippet { height: 84px !important; border-radius: 9px !important; font-size: 11px !important; padding: 8px 9px !important; }
.ace-pc-tile-icon {
  width: 100% !important;
  height: 76px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}
.ace-pc-tile-name {
  font-size: 13px !important;
  -webkit-line-clamp: 1 !important;
}

/* Clean Google Drive List Rows (subtle bottom dividers, zero boxes) */
.ace-pc-list-view { gap: 0 !important; }
.ace-pc-node-row {
  border-radius: 8px !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: transparent !important;
  padding: 10px 12px !important;
}
.ace-pc-node-row:hover { background: rgba(255, 255, 255, 0.04) !important; }
body.ace-flame-mode .ace-pc-node-row { border-bottom-color: rgba(17, 17, 20, 0.08) !important; }
body.ace-flame-mode .ace-pc-node-row:hover { background: #f1f3f4 !important; }

.ace-pc-statusbar {
  background: transparent !important;
  border-top: none !important;
  padding: 4px 18px 8px !important;
  font-size: 11px !important;
}

/* ==================== RIGHT-HAND "Ask Dot" SIDE PANEL (GEMINI IN DRIVE STYLE) ==================== */
#ace-vm-side-agent {
  width: 348px;
  flex: 0 0 348px;
  display: none;
  flex-direction: column;
  border-radius: 16px;
  background: #16171c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  min-height: 0;
}
body.ace-flame-mode #ace-vm-side-agent {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
#ace-vm-side-agent.open { display: flex; }
@media (max-width: 960px) {
  #ace-vm-side-agent.open {
    position: fixed;
    top: 96px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    z-index: 5220;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
}

.ace-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
body.ace-flame-mode .ace-side-head { border-bottom-color: rgba(17, 17, 20, 0.08); }
.ace-side-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ace-side-title strong { font-size: 14px; color: var(--text, #f4f4f6); }
.ace-side-ctx { font-size: 11.5px; color: #8ab4f8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ace-flame-mode .ace-side-ctx { color: #1a73e8; }

.ace-side-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 4px;
}
.ace-side-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f4f4f6);
  font: 500 12px/1 system-ui, -apple-system, sans-serif;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.ace-side-chip:hover { background: rgba(138, 180, 248, 0.16); border-color: rgba(138, 180, 248, 0.4); }
body.ace-flame-mode .ace-side-chip { background: #f0f4f9; color: #1f1f1f; border-color: transparent; }
body.ace-flame-mode .ace-side-chip:hover { background: #d3e3fd; }

.ace-side-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ace-side-msg {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ace-side-msg.user {
  align-self: flex-end;
  max-width: 88%;
  background: rgba(138, 180, 248, 0.18);
  color: var(--text, #f4f4f6);
}
body.ace-flame-mode .ace-side-msg.user { background: #e8f0fe; color: #1f1f1f; }
.ace-side-msg.ace {
  align-self: stretch;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text, #f4f4f6);
}
body.ace-flame-mode .ace-side-msg.ace { background: #f8f9fa; border-color: rgba(17, 17, 20, 0.08); color: #1f1f1f; }
.ace-side-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ace-side-composer {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.ace-flame-mode .ace-side-composer { border-top-color: rgba(17, 17, 20, 0.08); }
.ace-side-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: #1e2028;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
body.ace-flame-mode .ace-side-input-wrap { background: #f0f4f9; border-color: transparent; }
.ace-side-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 13px/1.3 system-ui, -apple-system, sans-serif;
}
.ace-side-send {
  appearance: none;
  border: none;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: #f4f4f6;
  color: #0e0e11;
  font: 600 12px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
}
body.ace-flame-mode .ace-side-send { background: #1a73e8; color: #ffffff; }
.ace-side-foot-note { font-size: 11px; color: var(--muted, #8e8e99); padding: 0 4px; }
/* === ACE_STEP5_AGENT_CHESS_END === */
/* === ACE_STEP6_STIER_START === */
/* 1. Remove Terminal & Apps list clutter from the Google Drive left rail */
#ace-vm-app-term,
.ace-vm-apps-list,
.ace-pc-sidebar > .ace-pc-side-label:first-of-type {
  display: none !important;
}

/* 2. S-Tier Google Drive Polish */
.ace-pc-winbar {
  padding: 10px 20px 10px 16px !important;
}
.ace-drive-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.ace-drive-rail-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted, #b4b5be);
  font: 500 13.5px/1 system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}
.ace-drive-rail-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text, #f4f4f6); }
.ace-drive-rail-btn.active { background: rgba(138, 180, 248, 0.16); color: #c2d9ff; font-weight: 600; }
body.ace-flame-mode .ace-drive-rail-btn { color: #444746; }
body.ace-flame-mode .ace-drive-rail-btn:hover { background: #e8eaed; color: #1f1f1f; }
body.ace-flame-mode .ace-drive-rail-btn.active { background: #c2e7ff; color: #001d35; }

.ace-drive-divider {
  height: 1px;
  margin: 8px 10px;
  background: rgba(255, 255, 255, 0.07);
}
body.ace-flame-mode .ace-drive-divider { background: rgba(17, 17, 20, 0.08); }

/* Google-style 9-dot Tools Launcher in top-right (Calculator, Notepad, YouTube) */
.ace-vm-launcher-wrap { position: relative; }
.ace-vm-launcher-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted, #b4b5be);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 130ms ease, color 130ms ease;
}
.ace-vm-launcher-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text, #f4f4f6); }
body.ace-flame-mode .ace-vm-launcher-btn { color: #444746; border-color: rgba(17, 17, 20, 0.12); }
body.ace-flame-mode .ace-vm-launcher-btn:hover { background: #e8eaed; color: #1f1f1f; }

.ace-vm-launcher-pop {
  position: absolute;
  top: 44px;
  right: 0;
  width: 244px;
  padding: 12px;
  border-radius: 16px;
  background: #1d1e25;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  z-index: 5300;
}
body.ace-flame-mode .ace-vm-launcher-pop {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.ace-vm-launcher-pop.show { display: grid; }
.ace-vm-tool-tile {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text, #f4f4f6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  font: 500 11.5px/1 system-ui, -apple-system, sans-serif;
}
.ace-vm-tool-tile:hover { background: rgba(255, 255, 255, 0.08); }
body.ace-flame-mode .ace-vm-tool-tile { color: #1f1f1f; }
body.ace-flame-mode .ace-vm-tool-tile:hover { background: #f0f4f9; }
.ace-vm-tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(138, 180, 248, 0.14);
  color: #8ab4f8;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.ace-flame-mode .ace-vm-tool-icon { background: #e8f0fe; color: #1a73e8; }

/* Floating Utility Window for Calculator (feels like a real PC widget!) */
#ace-vm-calc-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 280px;
  border-radius: 16px;
  background: #1b1c23;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  z-index: 5320;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
body.ace-flame-mode #ace-vm-calc-float {
  background: #ffffff;
  border-color: rgba(17, 17, 20, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
#ace-vm-calc-float.show { display: flex; }
.ace-vm-float-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #f4f4f6);
}
body.ace-flame-mode .ace-vm-float-bar { border-bottom-color: rgba(17, 17, 20, 0.08); color: #1f1f1f; }
#ace-vm-calc-float .ace-vm-calc {
  border: none !important;
  border-radius: 0 !important;
  max-width: none !important;
  background: transparent !important;
}

/* Google Drive "My Drive" Root Folders Grid (clean horizontal folder pills) */
.ace-drive-root-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ace-drive-folder-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 13px;
  background: #1d1e25;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.ace-drive-folder-pill:hover { background: #242630; border-color: rgba(255, 255, 255, 0.16); }
body.ace-flame-mode .ace-drive-folder-pill { background: #f0f4f9; border-color: transparent; }
body.ace-flame-mode .ace-drive-folder-pill:hover { background: #e3eaf4; }
.ace-drive-folder-pill-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ace-drive-folder-pill-name { font-size: 13.5px; font-weight: 600; color: var(--text, #f4f4f6); }
.ace-drive-folder-pill-desc { font-size: 11.5px; color: var(--muted, #8e8e99); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chess Difficulty Pill Bar */
.ace-chess-lvl-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ace-chess-lvl-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font: 600 11.5px/1 system-ui, -apple-system, sans-serif;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.ace-chess-lvl-btn.active {
  background: #22d3ee !important;
  color: #07060d !important;
  border-color: transparent !important;
}
/* === ACE_STEP6_STIER_END === */
/* === ACE_STEP8_OFFICE_POLISH_START === */
/* 1. Remove duplicate Arcade gamepad button from top-right (Arcade is in [Chat | Arcade | VM]) */
#top-arcade-btn,
body.ace-gamer-mode #top-arcade-btn {
  display: none !important;
}

/* 2. Full-Canvas Document Viewer inside VM (opens like real Excel / Word / PDF!) */
#ace-pc-viewer.show.ace-doc-full {
  position: absolute !important;
  inset: 0 !important;
  z-index: 40 !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  background: #14151a !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
body.ace-flame-mode #ace-pc-viewer.show.ace-doc-full {
  background: #f8f9fa !important;
}
.ace-pc-main {
  position: relative !important;
}

#ace-pc-viewer.ace-doc-full .ace-pc-viewer-head {
  padding: 10px 16px !important;
  background: #1b1c23 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0 !important;
}
body.ace-flame-mode #ace-pc-viewer.ace-doc-full .ace-pc-viewer-head {
  background: #ffffff !important;
  border-bottom-color: rgba(17, 17, 20, 0.1) !important;
}

#ace-pc-viewer.ace-doc-full .ace-step7-studio-root {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden !important;
}

/* Real Excel / Google Sheets Styling (fx bar + A/B/C col letters + 1/2/3 row gutter + bottom tabs) */
.ace-xl-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: #181920;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-xl-ribbon {
  background: #edf2fa;
  border-bottom-color: rgba(17, 17, 20, 0.1);
}
.ace-xl-fx-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: #14151a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-xl-fx-bar {
  background: #ffffff;
  border-bottom-color: rgba(17, 17, 20, 0.1);
}
.ace-xl-cell-ref {
  min-width: 48px;
  text-align: center;
  font: 700 12px/1 ui-monospace, SFMono-Regular, monospace;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #f4f4f6);
}
body.ace-flame-mode .ace-xl-cell-ref { background: #f1f3f4; color: #1f1f1f; }
.ace-xl-fx-tag {
  font: italic 700 13px/1 Georgia, serif;
  color: var(--muted, #8e8e99);
}
.ace-xl-fx-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 13px/1.3 system-ui, -apple-system, sans-serif;
}
body.ace-flame-mode .ace-xl-fx-input { color: #1f1f1f; }

#ace-pc-viewer.ace-doc-full .ace-vm-table-wrap {
  flex: 1 1 auto !important;
  max-height: none !important;
  border: none !important;
  border-radius: 0 !important;
  background: #111217 !important;
}
body.ace-flame-mode #ace-pc-viewer.ace-doc-full .ace-vm-table-wrap {
  background: #ffffff !important;
}
.ace-xl-table {
  border-collapse: collapse;
  font: 13px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text, #f4f4f6);
  min-width: 100%;
}
body.ace-flame-mode .ace-xl-table { color: #1f1f1f; }
.ace-xl-table th.ace-xl-colh,
.ace-xl-table th.ace-xl-corner {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #1e2028;
  color: #9ca3af;
  font-weight: 600;
  font-size: 11.5px;
  text-align: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  user-select: none;
}
.ace-xl-table td.ace-xl-rowh {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #1e2028;
  color: #9ca3af;
  font-weight: 600;
  font-size: 11.5px;
  text-align: center;
  width: 38px;
  min-width: 38px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  user-select: none;
}
.ace-xl-table td.ace-xl-cell {
  min-width: 110px;
  max-width: 280px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ace-xl-table tr.ace-xl-first-row td.ace-xl-cell {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}
.ace-xl-table td.ace-xl-cell:focus {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
  background: rgba(26, 115, 232, 0.12);
  white-space: normal;
}
body.ace-flame-mode .ace-xl-table th.ace-xl-colh,
body.ace-flame-mode .ace-xl-table th.ace-xl-corner,
body.ace-flame-mode .ace-xl-table td.ace-xl-rowh {
  background: #f1f3f4;
  color: #5f6368;
  border-color: #dadce0;
}
body.ace-flame-mode .ace-xl-table td.ace-xl-cell {
  border-color: #e0e3e7;
}
body.ace-flame-mode .ace-xl-table tr.ace-xl-first-row td.ace-xl-cell {
  background: #f8f9fa;
}

.ace-xl-bottombar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px;
  background: #1b1c23;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-xl-bottombar {
  background: #f1f3f4;
  border-top-color: #dadce0;
}

/* Real Google Docs / Word Centered Page Canvas */
.ace-word-canvas {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 16px 36px;
  background: #111216;
  display: flex;
  justify-content: center;
}
body.ace-flame-mode .ace-word-canvas { background: #edf0f4; }
.ace-word-page {
  width: 100%;
  max-width: 816px;
  min-height: 760px;
  padding: 44px 52px;
  box-sizing: border-box;
  border-radius: 6px;
  background: #1b1c22;
  color: #f4f4f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  font: 14.5px/1.7 "Segoe UI", system-ui, -apple-system, sans-serif;
  outline: none;
}
body.ace-flame-mode .ace-word-page {
  background: #ffffff;
  color: #1f1f1f;
  border-color: #dadce0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .ace-word-page { padding: 20px 18px; min-height: 480px; }
}

/* Full-height PDF Viewer */
#ace-pc-viewer.ace-doc-full .ace-pc-viewer-pdf {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 420px !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Visible YouTube pill button right in top-right VM header */
.ace-vm-yt-quick {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 600 12.5px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.ace-vm-yt-quick:hover { background: rgba(255, 255, 255, 0.08); }
body.ace-flame-mode .ace-vm-yt-quick { color: #1f1f1f; border-color: rgba(17, 17, 20, 0.14); background: #ffffff; }
body.ace-flame-mode .ace-vm-yt-quick:hover { background: #f0f4f9; }
/* Hide Neon Maze HUD & power banners cleanly while Chess vs ACE is active */
body.ace-chess-active #native-arcade-hud,
body.ace-chess-active #native-arcade-canvas,
body.ace-chess-active #native-arcade-stage > div:not(#ace-chess-hud):not(#native-arcade-controls) {
  display: none !important;
}
#ace-chess-hud {
  display: none;
  font-weight: 700;
  font-size: 13.5px;
  color: #38bdf8;
  margin-bottom: 8px;
  text-align: center;
}
body.ace-chess-active #ace-chess-hud { display: block !important; }
/* === ACE_STEP8_OFFICE_POLISH_END === */
/* === ACE_STEP9_REAL_OFFICE_START === */
/* 1. Classic ACE Flame Theme Button Styling */
#ace-mode-btn {
  transition: color 150ms ease, transform 150ms ease;
}
body.ace-flame-mode #ace-mode-btn {
  color: #ea580c !important;
}
body:not(.ace-flame-mode) #ace-mode-btn {
  color: #f4f4f6 !important;
}

/* 2. Real DOCX Editor (docx-preview) High-Fidelity Page Canvas */
.ace-docx-preview-wrap {
  flex: 1 1 auto;
  overflow: auto;
  padding: 20px 16px 36px;
  background: #1c1d22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
body.ace-flame-mode .ace-docx-preview-wrap {
  background: #e8eaed;
}
.ace-docx-preview-wrap .docx-wrapper {
  background: transparent !important;
  padding: 0 !important;
}
.ace-docx-preview-wrap .docx-wrapper > section.docx {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32) !important;
  border-radius: 4px !important;
  margin-bottom: 18px !important;
  background: #ffffff !important;
  color: #111111 !important;
}

/* 3. High-DPI PDF.js Canvas Page Viewer (works on desktop AND Android phones!) */
.ace-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: #181920;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-pdf-toolbar {
  background: #edf2fa;
  border-bottom-color: rgba(17, 17, 20, 0.1);
}
.ace-pdf-pages-wrap {
  flex: 1 1 auto;
  overflow: auto;
  padding: 20px 14px 36px;
  background: #111216;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
body.ace-flame-mode .ace-pdf-pages-wrap {
  background: #e8eaed;
}
.ace-pdf-page-card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  max-width: 100%;
}
.ace-pdf-page-card canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
}
.ace-pdf-page-num {
  font-size: 11px;
  color: var(--muted, #9a9aa6);
  text-align: center;
  margin-top: -10px;
}

/* 4. Excel Authentic Green Accent Polish */
.ace-xl-ribbon {
  border-top: 2px solid #107c41 !important;
}
.ace-xl-bottombar .ace-vm-sheet-tab.active {
  background: #107c41 !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* 5. Standing Orders (Auto-Rules) Popover */
#ace-vm-rules-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 5420;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#ace-vm-rules-backdrop.show { display: flex; }
.ace-vm-rules-box {
  width: 100%;
  max-width: 480px;
  padding: 18px;
  border-radius: 15px;
  background: #181920;
  color: #f4f4f6;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.ace-flame-mode .ace-vm-rules-box {
  background: #ffffff;
  color: #1f1f1f;
  border-color: rgba(17, 17, 20, 0.14);
}
.ace-vm-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
}
body.ace-flame-mode .ace-vm-rule-row { background: #f4f6f9; border-color: rgba(17, 17, 20, 0.08); }
/* === ACE_STEP9_REAL_OFFICE_END === */
/* === ACE_STEP7_DOC_STUDIO_START === */
/* Rich Word (.docx) Editor inside VM Viewer */
.ace-doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
body.ace-flame-mode .ace-doc-toolbar {
  background: #f0f4f9;
  border-color: rgba(17, 17, 20, 0.1);
}
.ace-doc-fmt-btn {
  appearance: none;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: var(--text, #f4f4f6);
  font: 700 12px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
}
.ace-doc-fmt-btn:hover { background: rgba(255, 255, 255, 0.1); }
body.ace-flame-mode .ace-doc-fmt-btn { color: #1f1f1f; border-color: rgba(17, 17, 20, 0.14); }
body.ace-flame-mode .ace-doc-fmt-btn:hover { background: #e2e8f0; }

.ace-doc-editor {
  min-height: 240px;
  max-height: 420px;
  overflow-y: auto;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: #14151a;
  color: #f4f4f6;
  font: 14px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
}
.ace-doc-editor:focus { border-color: #8ab4f8; }
body.ace-flame-mode .ace-doc-editor {
  background: #ffffff;
  color: #1f1f1f;
  border-color: rgba(17, 17, 20, 0.16);
}
.ace-doc-editor h1, .ace-doc-editor h2, .ace-doc-editor h3 { margin: 0.6em 0 0.3em; }
.ace-doc-editor p { margin: 0.35em 0; }

/* ZIP Explorer inside VM Viewer */
.ace-zip-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 9px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.02);
}
.ace-zip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text, #f4f4f6);
}
.ace-zip-row:hover { background: rgba(255, 255, 255, 0.05); }
body.ace-flame-mode .ace-zip-row { color: #1f1f1f; }
body.ace-flame-mode .ace-zip-row:hover { background: #f0f4f9; }

/* PDF Tabs (View PDF vs Edit Extracted Text) */
.ace-pdf-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ace-step7-studio-root .ace-pc-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
/* === ACE_STEP7_DOC_STUDIO_END === */
/* === ACE_STEP10_POWER_SUITE_START === */
/* 1. Critical VM UI Bug Fixes: Toast position, Full-Canvas Viewer Z-Index, List View Icons */
body[data-ace-mode="pc"] #toast-container {
  top: auto !important;
  bottom: 24px !important;
}
#ace-pc-viewer.show.ace-doc-full {
  position: fixed !important;
  top: 56px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 4950 !important;
}
@media (max-width: 720px) {
  #ace-pc-viewer.show.ace-doc-full {
    top: 0 !important;
  }
}
#ace-pc-shell:has(#ace-pc-viewer.show.ace-doc-full) .ace-pc-grid,
#ace-pc-shell:has(#ace-pc-viewer.show.ace-doc-full) .ace-pc-list-view,
#ace-pc-shell:has(#ace-pc-viewer.show.ace-doc-full) .ace-pc-actionbar {
  display: none !important;
}
.ace-pc-list-view .ace-pc-tile-icon,
.ace-pc-list-view .ace-pc-tile-thumb,
.ace-pc-list-view .ace-pc-badge {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  flex: 0 0 34px !important;
  font-size: 10px !important;
  border-radius: 7px !important;
  padding: 0 !important;
}
.ace-pdf-thumb-box {
  width: 156px;
  height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
}
#ace-pdf-ed-col {
  width: 32px !important;
  min-width: 32px !important;
  flex: 0 0 32px !important;
  height: 28px !important;
  padding: 2px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: transparent !important;
}

/* Word Layout Exact Paper Polish */
.ace-docx-preview-wrap .docx-wrapper > section.docx {
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 400px;
}
.ace-docx-preview-wrap .docx-wrapper > section.docx * {
  box-sizing: border-box;
}

/* Pro Word Ribbon */
.ace-word-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #1b1c23;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-word-ribbon {
  background: #f1f5f9;
  border-bottom-color: rgba(17, 17, 20, 0.1);
}
.ace-word-ribbon select,
.ace-word-ribbon input[type="color"] {
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #14151a;
  color: #f4f4f6;
  font-size: 12px;
  padding: 0 6px;
  cursor: pointer;
}
body.ace-flame-mode .ace-word-ribbon select,
body.ace-flame-mode .ace-word-ribbon input[type="color"] {
  background: #ffffff;
  color: #1f1f1f;
  border-color: rgba(17, 17, 20, 0.16);
}
.ace-word-ribbon input[type="color"] {
  width: 30px;
  padding: 2px;
}
.ace-word-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 3px;
}
body.ace-flame-mode .ace-word-sep { background: rgba(17, 17, 20, 0.14); }
.ace-word-findbar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #15161c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-word-findbar { background: #e8eef7; border-bottom-color: rgba(17, 17, 20, 0.1); }
.ace-word-findbar.show { display: flex; }
.ace-word-page table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}
.ace-word-page th,
.ace-word-page td {
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  min-width: 60px;
}
.ace-word-page th { background: #f1f5f9; font-weight: 600; }

/* PDF Page Rearrange & Rotate Thumbnail Grid */
.ace-pdf-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
  padding: 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  background: #111216;
}
body.ace-flame-mode .ace-pdf-org-grid { background: #e8eaed; }
.ace-pdf-org-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border-radius: 11px;
  background: #1b1c23;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
body.ace-flame-mode .ace-pdf-org-card { background: #ffffff; border-color: rgba(17, 17, 20, 0.12); }
.ace-pdf-org-card canvas {
  max-width: 100%;
  max-height: 165px;
  width: auto !important;
  height: auto !important;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease;
}
.ace-pdf-org-acts {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.ace-pdf-deg-in {
  width: 58px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #111216;
  color: #f4f4f6;
  font-size: 11px;
  padding: 0 5px;
  text-align: center;
}
body.ace-flame-mode .ace-pdf-deg-in { background: #f8f9fa; color: #1f1f1f; border-color: rgba(17, 17, 20, 0.18); }

/* Complete Interactive Visual PDF Editor */
.ace-pdf-editor-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #111216;
}
body.ace-flame-mode .ace-pdf-editor-shell { background: #e8eaed; }
.ace-pdf-ed-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #1b1c23;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
}
body.ace-flame-mode .ace-pdf-ed-bar { background: #f1f5f9; border-bottom-color: rgba(17, 17, 20, 0.1); }
.ace-pdf-ed-stage {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px 36px;
  gap: 12px;
}
.ace-pdf-canvas-stack {
  position: relative;
  display: inline-block;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.36);
  border-radius: 4px;
  touch-action: none;
  user-select: none;
}
.ace-pdf-canvas-stack canvas { display: block; }
.ace-pdf-overlay-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* PDF Compress & Form Panels */
.ace-pdf-panel {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #14151a;
}
body.ace-flame-mode .ace-pdf-panel { background: #f8f9fa; }
.ace-pdf-form-card {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  border-radius: 12px;
  background: #1b1c23;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.ace-flame-mode .ace-pdf-form-card { background: #ffffff; border-color: rgba(17, 17, 20, 0.12); }

/* PDF & File Power Tools Modal */
#ace-vm-tools-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 5450;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#ace-vm-tools-backdrop.show { display: flex; }
.ace-vm-tools-modal {
  width: 100%;
  max-width: 640px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 18px;
  border-radius: 16px;
  background: #181920;
  color: #f4f4f6;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.ace-flame-mode .ace-vm-tools-modal {
  background: #ffffff;
  color: #1f1f1f;
  border-color: rgba(17, 17, 20, 0.14);
}
.ace-vm-pick-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.ace-vm-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.03);
}
body.ace-flame-mode .ace-vm-pick-row { background: #f4f6f9; }
.ace-vm-pick-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.ace-vm-pick-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* === ACE_STEP10_POWER_SUITE_END === */
