:root {
  color-scheme: light;
  --md-text: #1c1917;
  --md-text-soft: #44403c;
  --md-text-mute: #57534e;
  --md-link: #047857;
  --md-link-underline: #6ee7b7;
  --md-border: #e7e5e4;
  --md-border-soft: #d6d3d1;
  --md-code-bg: #f5f5f4;
  --md-code-border: #e7e5e4;
  --md-inline-code-bg: #f1f5f9;
  --md-inline-code-text: #334155;
  --md-pre-bg: #242830;
  --md-pre-text: #e6edf3;
  --md-th-bg: #fafaf9;
  --scrollbar: rgba(120, 113, 108, 0.26);
  --scrollbar-hover: rgba(120, 113, 108, 0.45);
  --dots: rgba(120, 113, 108, 0.14);
  --copy-text: #a8a29e;
  --copy-bg: rgba(255, 255, 255, 0.06);
  --copy-border: rgba(255, 255, 255, 0.12);
  --copy-hover-text: #fafaf9;
  --copy-hover-bg: rgba(255, 255, 255, 0.14);
  --reasoning-bg: #fafaf9;
  --reasoning-border: #e7e5e4;
  --reasoning-header-text: #57534e;
  --reasoning-header-hover: #f5f5f4;
  --reasoning-body-bg: #f0f1f3;
  --reasoning-body-text: #4b515b;
}

.dark {
  color-scheme: dark;
  --md-text: #fafaf9;
  --md-text-soft: #e7e5e4;
  --md-text-mute: #a8a29e;
  --md-link: #34d399;
  --md-link-underline: #10b981;
  --md-border: #44403c;
  --md-border-soft: #44403c;
  --md-code-bg: #292524;
  --md-code-border: #44403c;
  --md-inline-code-bg: #27272a;
  --md-inline-code-text: #e4e4e7;
  --md-pre-bg: #242830;
  --md-pre-text: #e6edf3;
  --md-th-bg: #1c1917;
  --scrollbar: rgba(168, 162, 158, 0.28);
  --scrollbar-hover: rgba(168, 162, 158, 0.45);
  --dots: rgba(120, 113, 108, 0.18);
  --copy-text: #d6d3d1;
  --copy-bg: rgba(255, 255, 255, 0.08);
  --copy-border: rgba(255, 255, 255, 0.16);
  --copy-hover-text: #fafaf9;
  --copy-hover-bg: rgba(255, 255, 255, 0.16);
  --reasoning-bg: #1c1917;
  --reasoning-border: #44403c;
  --reasoning-header-text: #a8a29e;
  --reasoning-header-hover: #292524;
  --reasoning-body-bg: #2b3039;
  --reasoning-body-text: #c4c9d2;
}

.dark body { background: #0c0a09 !important; color: #fafaf9 !important; }
.dark .bg-stone-50\/70 { background-color: rgba(12,10,9,0.7) !important; }
.dark .bg-white\/60,
.dark .bg-white\/70,
.dark .bg-white\/80,
.dark .bg-white\/85,
.dark .bg-white\/90,
.dark .bg-white\/95 { background-color: rgba(28,25,23,0.75) !important; }
.dark .bg-white { background-color: #1c1917 !important; }
.dark .bg-stone-50 { background-color: #1c1917 !important; }
.dark .bg-stone-100 { background-color: #292524 !important; }

.dark .bg-stone-900,
.dark button.bg-stone-900,
.dark div.bg-stone-900,
.dark [class*="bg-stone-900"] {
  background-color: #292524 !important;
  color: #fafaf9 !important;
}
.dark .hover\:bg-stone-800:hover { background-color: #44403c !important; }
.dark .hover\:bg-stone-700:hover { background-color: #57534e !important; }

.dark .text-stone-900 { color: #fafaf9 !important; }
.dark .text-stone-800 { color: #e7e5e4 !important; }
.dark .text-stone-700 { color: #d6d3d1 !important; }
.dark .text-stone-600 { color: #a8a29e !important; }
.dark .text-stone-500 { color: #a8a29e !important; }
.dark .text-stone-400 { color: #78716c !important; }
.dark .text-white { color: #ffffff !important; }

.dark .border-stone-200,
.dark .border-stone-200\/60,
.dark .border-stone-200\/70,
.dark .border-stone-200\/80,
.dark .border-stone-200\/90 { border-color: #292524 !important; }

.dark .bg-rose-50\/80, .dark .bg-rose-50\/95 { background-color: rgba(76,5,25,0.5) !important; }
.dark .bg-emerald-50\/80, .dark .bg-emerald-50\/95, .dark .bg-emerald-50\/70 { background-color: rgba(6,78,59,0.5) !important; }
.dark .text-rose-700 { color: #fda4af !important; }
.dark .border-rose-100, .dark .border-rose-200 { border-color: #4c0519 !important; }
.dark .text-emerald-700, .dark .text-emerald-800 { color: #6ee7b7 !important; }
.dark .border-emerald-200 { border-color: rgba(16,185,129,0.35) !important; }
.dark .ring-emerald-200\/70 { --tw-ring-color: rgba(16,185,129,0.5) !important; }

.dark .hover\:bg-stone-100\/80:hover,
.dark .hover\:bg-stone-100:hover,
.dark .hover\:bg-stone-50:hover { background-color: #292524 !important; }
.dark .hover\:bg-rose-50:hover { background-color: rgba(76,5,25,0.5) !important; }

.dark #input-dock > .pointer-events-none {
  background-image: linear-gradient(to top, rgba(12,10,9,1), transparent) !important;
}
.dark #scroll-bottom {
  background-color: #1c1917 !important;
  border-color: #44403c !important;
  color: #a8a29e !important;
}
.dark #scroll-bottom:hover { color: #fafaf9 !important; }

.bg-dots {
  background-image: radial-gradient(circle at 1px 1px, var(--dots) 1px, transparent 0);
  background-size: 22px 22px;
}

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 9999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
*::-webkit-scrollbar-track { background: transparent; }
html { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
textarea { scrollbar-width: thin; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.animate-fade-up { animation: fadeUp 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) both; }

@keyframes thinkingBounce {
  0%, 80%, 100% { transform: translateY(0) scale(0.82); opacity: 0.45; }
  40% { transform: translateY(-5px) scale(1.05); opacity: 1; }
}

@keyframes statusShimmer {
  0% { background-position: -150% 0; }
  100% { background-position: 150% 0; }
}

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

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

.thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.dark .thinking-indicator {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
}

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

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: #10b981;
  animation: thinkingBounce 1.2s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: -0.32s; background-color: #10b981; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; background-color: #14b8a6; }
.thinking-dot:nth-child(3) { animation-delay: 0s; background-color: #0d9488; }

.dark .thinking-dot:nth-child(1) { background-color: #34d399; }
.dark .thinking-dot:nth-child(2) { background-color: #2dd4bf; }
.dark .thinking-dot:nth-child(3) { background-color: #14b8a6; }

.thinking-label {
  font-size: 0.78rem;
  font-weight: 600;
  background: linear-gradient(90deg, #059669 0%, #34d399 50%, #059669 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: statusShimmer 2.2s linear infinite;
}

.dark .thinking-label {
  background: linear-gradient(90deg, #6ee7b7 0%, #ffffff 50%, #6ee7b7 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
}

.md.is-streaming > *:last-child::after {
  content: "";
  display: inline-block;
  width: 2.5px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  border-radius: 2px;
  background-color: #10b981;
  animation: cursorBlink 0.85s infinite;
}

.md { overflow-wrap: break-word; color: var(--md-text); }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md p { margin: 0.65em 0; }
.md h1, .md h2, .md h3, .md h4 { font-weight: 700; line-height: 1.3; margin: 1.1em 0 0.5em; color: var(--md-text); }
.md h1 { font-size: 1.35em; }
.md h2 { font-size: 1.2em; }
.md h3 { font-size: 1.08em; }
.md ul, .md ol { margin: 0.65em 0; padding-left: 1.4em; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li { margin: 0.28em 0; }
.md a { color: var(--md-link); text-decoration: underline; text-decoration-color: var(--md-link-underline); text-underline-offset: 2px; }
.md a:hover { text-decoration-color: var(--md-link); }
.md strong { font-weight: 650; color: var(--md-text); }
.md blockquote { margin: 0.8em 0; padding-left: 0.9em; border-left: 3px solid var(--md-link-underline); color: var(--md-text-soft); }
.md hr { margin: 1.2em 0; border: 0; border-top: 1px solid var(--md-border); }

.md code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--md-inline-code-bg);
  color: var(--md-inline-code-text);
  border: 1px solid var(--md-code-border);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

.md pre {
  position: relative;
  margin: 0.85em 0;
  padding: 2.7rem 1rem 0.95rem !important;
  background: var(--md-pre-bg) !important;
  color: var(--md-pre-text) !important;
  border: 1px solid var(--md-code-border);
  border-radius: 0.9rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  font-size: 0.84rem;
  line-height: 1.6;
}

.md pre code,
.md pre code.hljs {
  display: block;
  min-width: max-content;
  white-space: pre;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: inherit;
  color: var(--md-pre-text);
}

.md table { display: block; width: 100%; max-width: 100%; margin: 0.85em 0; border-collapse: collapse; font-size: 0.92em; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--md-border); padding: 0.45em 0.7em; text-align: left; color: var(--md-text); }
.md th { background: var(--md-th-bg); font-weight: 600; }
.md img { max-width: 100%; border-radius: 0.75rem; }

.code-toolbar {
  position: absolute;
  inset: 0 0 auto;
  height: 2.25rem;
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid var(--copy-border);
}
.code-language { color: var(--copy-text); font-size: 0.68rem; font-weight: 600; text-transform: lowercase; }
.code-copy {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.55rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--copy-text);
  background: var(--copy-bg);
  border: 1px solid var(--copy-border);
  transition: all 0.15s ease;
  cursor: pointer;
}
.code-copy:hover { color: var(--copy-hover-text); background: var(--copy-hover-bg); }

.reasoning-accordion {
  margin: 0 0 12px;
  border: 1px solid var(--reasoning-border);
  border-radius: 0.75rem;
  background: var(--reasoning-bg);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.reasoning-accordion.open { border-color: var(--md-border-soft); }
.reasoning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--reasoning-header-text);
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
  font-family: inherit;
}
.reasoning-header:hover { background: var(--reasoning-header-hover); color: var(--md-text-soft); }
.reasoning-icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex-shrink: 0; }
.reasoning-label { flex: 1; letter-spacing: -0.01em; }
.reasoning-chevron { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); flex-shrink: 0; }
.reasoning-accordion.open .reasoning-chevron { transform: rotate(180deg); }
.reasoning-body { padding: 0 14px 12px; animation: fadeUp 0.18s ease both; }
.reasoning-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  max-height: 320px;
  overflow-y: auto;
  color: var(--reasoning-body-text);
  background: var(--reasoning-body-bg);
  padding: 10px 12px;
  border-radius: 0.5rem;
}

#model-menu, #plus-menu {
  max-height: 280px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  animation: fadeUp 0.16s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}

.coding-stack-select { max-width: min(52vw, 13rem); cursor: pointer; }
.coding-stack-select option { background: #fff; color: #292524; }
.dark .coding-stack-select { color: #6ee7b7; border-color: rgba(52,211,153,0.35); background: rgba(6,78,59,0.4); }
.dark .coding-stack-select option { background: #1c1917; color: #fafaf9; }

#sidebar.sidebar-hidden { display: none !important; }
#preview-panel {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #1c1917;
  border-left: 0 solid rgba(120,113,108,.22);
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  transition: flex-basis .24s cubic-bezier(.2,.8,.2,1), width .24s cubic-bezier(.2,.8,.2,1), border-width .2s ease, visibility .24s;
}
#preview-panel.is-open {
  flex-basis: var(--preview-width, 42vw);
  width: var(--preview-width, 42vw);
  min-width: 280px;
  border-left-width: 1px;
  box-shadow: -18px 0 48px rgba(28,25,23,.07);
  visibility: visible;
  pointer-events: auto;
}
#workspace-main { min-width: 0; flex: 1 1 0%; }
.preview-resize {
  position: absolute;
  z-index: 8;
  inset: 0 auto 0 0;
  display: flex;
  width: 9px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
.preview-resize > span {
  display: block;
  width: 3px;
  height: 44px;
  border-radius: 99px;
  background: #d6d3d1;
  opacity: .75;
  transition: height .16s ease, background .16s ease, opacity .16s ease;
}
.preview-resize:hover > span, .preview-resize:focus-visible > span { height: 64px; background: #10b981; opacity: 1; }
.preview-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.35rem;
  padding: .75rem 1rem .75rem 1.15rem;
  border-bottom: 1px solid #e7e5e4;
  background: rgba(250,250,249,.94);
}
.preview-heading { margin: 0; font-size: .9rem; font-weight: 700; letter-spacing: -.015em; }
.preview-subtitle { margin: .18rem 0 0; color: #78716c; font-size: .68rem; }
.preview-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.preview-actions { display: flex; align-items: center; gap: .35rem; }
.preview-actions button {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #e7e5e4;
  border-radius: .65rem;
  color: #57534e;
  background: #fff;
  font-size: 1.1rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.preview-actions button:hover { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.preview-stage { min-width: 0; min-height: 0; flex: 1 1 auto; background: #fff; }
#preview-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.preview-footer {
  display: flex; flex: 0 0 auto; justify-content: space-between; gap: .75rem;
  padding: .55rem .9rem; border-top: 1px solid #e7e5e4; color: #78716c; background: #fafaf9; font-size: .62rem;
}
body.is-resizing-preview, body.is-resizing-preview * { cursor: col-resize !important; user-select: none !important; }
#preview-panel:fullscreen { position: fixed; z-index: 9999; inset: 0; width: 100vw; height: 100vh; flex: none; border: 0; }
#preview-panel:fullscreen .preview-resize { display: none; }
#preview-panel:fullscreen .preview-stage { flex: 1 1 auto; }

.code-preview {
  position: absolute;
  top: .35rem;
  right: 4.55rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .55rem;
  border: 1px solid rgba(16,185,129,.34);
  border-radius: .5rem;
  color: #a7f3d0;
  background: rgba(6,78,59,.42);
  font-size: .68rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.code-preview:hover { background: rgba(6,95,70,.72); border-color: rgba(110,231,183,.7); }

.assistant-timeline {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.workflow-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e7e5e4;
  border-radius: .9rem;
  color: #44403c;
  background: #fafaf9;
  box-shadow: 0 4px 18px rgba(28,25,23,.035);
  animation: fadeUp .22s ease both;
}
.workflow-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .68rem .85rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.workflow-header:hover { background: rgba(120,113,108,.06); }

.flow-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(16,185,129,.22);
  border-top-color: #10b981;
  animation: spinLoader .75s linear infinite;
}
.workflow-card.is-complete .flow-spinner {
  display: none;
}

.workflow-pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.42);
  animation: workflowPulse 1.5s infinite;
}
.workflow-card:not(.is-complete) .workflow-pulse {
  display: none;
}
.workflow-card.is-complete .workflow-pulse {
  display: block;
  animation: none;
  box-shadow: none;
  background: #059669;
}

.workflow-title {
  font-size: .76rem;
  font-weight: 700;
  color: var(--md-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workflow-status {
  margin-left: auto;
  color: #78716c;
  font-size: .66rem;
  font-weight: 600;
  flex-shrink: 0;
}
.workflow-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a8a29e;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.workflow-card.is-collapsed .workflow-chevron { transform: rotate(-90deg); }
.workflow-body { padding: 0 .85rem .85rem; }
.workflow-card.is-collapsed .workflow-body { display: none; }

.workflow-steps { display: flex; flex-direction: column; gap: .48rem; margin: 0; padding: 0 0 0 .55rem; list-style: none; }
.workflow-step { display: flex; align-items: flex-start; gap: .55rem; color: #78716c; font-size: .71rem; line-height: 1.45; }
.workflow-step.is-active { color: #047857; font-weight: 600; }
.workflow-step.is-complete { color: #57534e; }
.workflow-step-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-top: .26rem; border: 1.5px solid #a8a29e; border-radius: 50%; background: transparent; }
.workflow-step.is-active .workflow-step-dot { border-color: #10b981; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.12); animation: workflowPulse 1.3s infinite; }
.workflow-step.is-complete .workflow-step-dot { border-color: #059669; background: #059669; }

.flow-cmd-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .2rem;
}
.flow-cmd-item {
  border: 1px solid var(--md-code-border);
  border-radius: .65rem;
  background: #0d1117;
  color: #e6edf3;
  overflow: hidden;
}
.flow-cmd-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .68rem;
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .73rem;
}
.flow-cmd-prompt {
  color: #34d399;
  font-weight: 700;
  user-select: none;
}
.flow-cmd-text {
  color: #f8fafc;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
}
.flow-cmd-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: .35rem;
  text-transform: uppercase;
  flex-shrink: 0;
}
.flow-cmd-badge.is-running {
  color: #6ee7b7;
  background: rgba(16,185,129,.18);
}
.flow-cmd-badge.is-ok {
  color: #a7f3d0;
  background: rgba(5,150,105,.25);
}
.flow-cmd-badge.is-err {
  color: #fda4af;
  background: rgba(225,29,72,.25);
}
.flow-cmd-output {
  margin: 0;
  padding: .55rem .68rem;
  max-height: 220px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.flow-note {
  padding: .55rem .8rem;
  border-left: 3px solid #10b981;
  border-radius: 0 .65rem .65rem 0;
  background: rgba(16,185,129,.06);
  color: var(--md-text-soft);
  font-size: .85rem;
  line-height: 1.55;
  animation: fadeUp .22s ease both;
}
.dark .flow-note {
  background: rgba(16,185,129,.1);
  color: #e7e5e4;
}

@keyframes workflowPulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.36); } 70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.dark .workflow-card { color: #e7e5e4; background: #1c1917; border-color: #44403c; }
.dark .workflow-header:hover { background: rgba(255,255,255,.04); }
.dark .workflow-status, .dark .workflow-step { color: #a8a29e; }
.dark .workflow-step.is-active { color: #6ee7b7; }
.dark .workflow-step.is-complete { color: #d6d3d1; }
.dark .preview-header { color: #fafaf9; background: rgba(28,25,23,.96); border-color: #44403c; }
.dark .preview-subtitle, .dark .preview-footer { color: #a8a29e; }
.dark .preview-resize > span { background: #57534e; }
.dark .preview-footer { background: #0c0a09; border-color: #44403c; }
.dark .preview-actions button { color: #d6d3d1; background: #292524; border-color: #44403c; }
.dark .preview-actions button:hover { color: #6ee7b7; background: #064e3b; }

@media (max-width: 900px) and (min-width: 641px) {
  #preview-panel.is-open { flex-basis: min(var(--preview-width, 48vw), 58vw); width: min(var(--preview-width, 48vw), 58vw); }
}
@media (max-width: 640px) {
  #preview-panel { position: fixed; z-index: 45; inset: 0; width: 100%; min-width: 0; flex: none; border: 0; box-shadow: none; }
  #preview-panel.is-open { width: 100%; min-width: 0; flex: none; }
  .preview-resize { display: none; }
  .preview-header { min-height: 3.9rem; }
  .preview-footer { font-size: .58rem; }
  .code-preview { right: 4.4rem; font-size: .62rem; padding: .23rem .4rem; }
  .coding-stack-select { max-width: 48vw; }
}

.code-quick-actions { display: flex; justify-content: flex-end; margin: .35rem 0 .6rem; }
.code-quick-actions .code-preview { position: static; min-height: 1.9rem; padding: .35rem .65rem; border: 1px solid rgba(16,185,129,.24); border-radius: .65rem; color: #047857; background: rgba(16,185,129,.07); font-size: .68rem; font-weight: 700; transition: .18s ease; }
.code-quick-actions .code-preview:hover { border-color: rgba(16,185,129,.5); background: rgba(16,185,129,.13); transform: translateY(-1px); }
.dark .code-quick-actions .code-preview { color: #6ee7b7; background: rgba(16,185,129,.1); border-color: rgba(52,211,153,.2); }

.code-disclosure {
  margin: .85rem 0 1rem;
  overflow: hidden;
  border: 1px solid var(--md-code-border);
  border-radius: .95rem;
  background: var(--md-pre-bg);
  box-shadow: 0 5px 20px rgba(15,23,42,.06);
  animation: fadeUp .22s ease both;
}
.code-disclosure-summary {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.8rem;
  padding: .65rem .85rem;
  color: var(--md-pre-text);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.code-disclosure-summary::-webkit-details-marker { display: none; }
.code-disclosure-leading { display: inline-flex; color: #10b981; }
.code-disclosure-language { color: var(--md-pre-text); font-size: .72rem; font-weight: 750; text-transform: lowercase; }
.code-disclosure-label { margin-left: auto; color: #9ca3af; font-size: .68rem; font-weight: 650; }
.code-disclosure-chevron { display: inline-flex; color: #9ca3af; transition: transform .2s ease; }
.code-disclosure[open] .code-disclosure-chevron { transform: rotate(180deg); }
.code-disclosure > pre { margin: 0 !important; border: 0 !important; border-top: 1px solid rgba(255,255,255,0.08) !important; border-radius: 0 !important; }
.code-disclosure-summary:hover { background: rgba(16,185,129,.1); }

.ask-you-card {
  margin: .5rem 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 1rem;
  background: linear-gradient(135deg,rgba(16,185,129,.075),rgba(20,184,166,.035));
  box-shadow: 0 8px 26px rgba(15,23,42,.045);
  animation: fadeUp .28s ease both;
}
.ask-you-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ask-you-eyebrow { color: #059669; font-size: .65rem; font-weight: 850; letter-spacing: .12em; }
.ask-you-status { color: #78716c; font-size: .62rem; font-weight: 650; }
.ask-you-question { margin: .7rem 0 .9rem; color: var(--md-text); font-size: .9rem; font-weight: 650; line-height: 1.55; }
.ask-you-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.ask-you-choice {
  display: flex;
  align-items: center;
  min-height: 2.65rem;
  padding: .65rem .8rem;
  border: 1px solid var(--md-code-border);
  border-radius: .75rem;
  color: var(--md-text);
  background: rgba(255,255,255,.72);
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.ask-you-choice:hover:not(:disabled) { border-color: #34d399; background: rgba(16,185,129,.09); transform: translateY(-1px); }
.ask-you-choice:disabled { opacity: .5; cursor: default; }
.ask-you-other { grid-column: 1 / -1; justify-content: center; border-style: dashed; color: var(--md-text-soft); }
.ask-you-custom { display: grid; gap: .6rem; margin-top: .7rem; }
.ask-you-input { width: 100%; min-height: 4.2rem; resize: vertical; padding: .7rem .8rem; border: 1px solid var(--md-code-border); border-radius: .75rem; outline: none; color: var(--md-text); background: var(--md-pre-bg); font: inherit; font-size: .75rem; }
.ask-you-input:focus { border-color: #34d399; box-shadow: 0 0 0 3px rgba(16,185,129,.1); }
.ask-you-submit { justify-self: end; padding: .55rem .85rem; border: 0; border-radius: .7rem; color: #042f24; background: linear-gradient(100deg,#6ee7b7,#34d399); font-size: .7rem; font-weight: 800; cursor: pointer; }
.ask-you-card.is-resolved { border-color: var(--md-code-border); background: rgba(148,163,184,.05); }
.ask-you-card.is-resolved .ask-you-eyebrow { color: #78716c; }
.dark .ask-you-choice { background: rgba(28,25,23,.78); }
.dark .ask-you-choice:hover:not(:disabled) { background: rgba(6,78,59,.35); }

.attachment-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  max-width: min(15rem, 70vw);
  min-height: 2.7rem;
  padding: .35rem .7rem .35rem .4rem;
  border: 1px solid var(--md-code-border);
  border-radius: .85rem;
  background: rgba(148,163,184,.08);
}
.attachment-thumbnail { width: 2.2rem; height: 2.2rem; border-radius: .55rem; object-fit: cover; }
.attachment-file-icon { flex: 0 0 auto; padding: .35rem .42rem; border-radius: .45rem; color: #047857; background: rgba(16,185,129,.13); font-size: .58rem; font-weight: 850; }
.attachment-file-name { overflow: hidden; color: var(--md-text); font-size: .68rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.attachment-remove { position: absolute; top: -.4rem; right: -.4rem; display: grid; width: 1.15rem; height: 1.15rem; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: white; background: #44403c; font-size: .85rem; line-height: 1; cursor: pointer; opacity: .45; transition: opacity .15s ease; }
.attachment-chip:hover .attachment-remove, .attachment-remove:focus-visible { opacity: 1; }
.dark .attachment-chip { border-color: #44403c; background: rgba(255,255,255,.035); }
.dark .attachment-file-name { color: #e7e5e4; }

.workflow-step.is-pending { color: #a8a29e; opacity: .75; }
.workflow-step.is-pending .workflow-step-dot { border-color: #d6d3d1; background: transparent; }
.dark .workflow-step.is-pending { color: #78716c; }
.dark .workflow-step.is-pending .workflow-step-dot { border-color: #57534e; }

@media (max-width: 520px) {
  .ask-you-card { padding: .85rem; }
  .ask-you-choices { grid-template-columns: 1fr; }
  .ask-you-other { grid-column: auto; }
}

/* Live generation indicator: visible from the first SSE meta event until completion. */
.generation-status {
  display: inline-flex !important;
  align-items: center;
  gap: .42rem;
  min-height: 22px;
  border: 1px solid rgba(16,185,129,.2);
  background: rgba(16,185,129,.075) !important;
  color: #047857 !important;
  box-shadow: 0 0 0 0 rgba(16,185,129,.16);
  animation: generationGlow 2.2s ease-in-out infinite;
}
.generation-status::before {
  content: '';
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 1.7px solid rgba(16,185,129,.25);
  border-top-color: #10b981;
  border-right-color: #10b981;
  border-radius: 50%;
  animation: spinLoader .7s linear infinite;
}
.dark .generation-status {
  border-color: rgba(52,211,153,.22);
  background: rgba(16,185,129,.12) !important;
  color: #6ee7b7 !important;
}
@keyframes generationGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
  50% { box-shadow: 0 0 0 4px rgba(16,185,129,.08); }
}

/* Premium interaction layer: fast to paint, calm by default, accessible on mobile. */
:root {
  --lotune-accent: #10b981;
  --lotune-accent-soft: rgba(16,185,129,.12);
  --lotune-surface: rgba(255,255,255,.84);
  --lotune-ease: cubic-bezier(.2,.75,.25,1);
}
.dark {
  --lotune-surface: rgba(24,24,27,.86);
  --lotune-accent-soft: rgba(52,211,153,.13);
}
.dark body { background: #090b10 !important; }
.dark #app { background: #090b10 !important; }
.dark #workspace-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% -20%, rgba(16,185,129,.10), transparent 52%),
              radial-gradient(ellipse at 100% 100%, rgba(20,184,166,.05), transparent 42%);
}
.dark #sidebar { background: rgba(17,19,24,.94) !important; border-color: rgba(255,255,255,.07) !important; }
.dark #workspace-main > header { background: rgba(12,14,19,.82) !important; border-color: rgba(255,255,255,.07) !important; }
.dark #input-dock .rounded-3xl {
  background: rgba(22,25,31,.94) !important;
  border-color: rgba(148,163,184,.18) !important;
  box-shadow: 0 18px 56px rgba(0,0,0,.32), 0 0 0 1px rgba(16,185,129,.025) inset !important;
}
.dark .assistant-message > :first-child {
  box-shadow: 0 0 0 1px rgba(52,211,153,.2), 0 0 24px rgba(16,185,129,.13);
}
.assistant-message { min-width: 0; animation: fadeUp .24s var(--lotune-ease) both; }
.assistant-message .md { min-width: 0; overflow-wrap: anywhere; }
.assistant-header { min-height: 1.5rem; }
.generation-timer {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0 .5rem;
  border: 1px solid rgba(16,185,129,.18);
  border-radius: 999px;
  color: #059669;
  background: rgba(16,185,129,.055);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.dark .generation-timer { color: #6ee7b7; background: rgba(16,185,129,.10); border-color: rgba(52,211,153,.18); }
.generation-status.is-terminal::before { display: none; }
.generation-status.is-error { color: #e11d48 !important; background: rgba(244,63,94,.08) !important; border-color: rgba(244,63,94,.2) !important; animation: none !important; }
.dark .generation-status.is-error { color: #fda4af !important; background: rgba(159,18,57,.2) !important; }
.md table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.md pre, .flow-cmd-output { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(16,185,129,.75); outline-offset: 2px; }

@media (max-width: 640px) {
  html, body { width: 100%; height: 100%; min-height: 100%; overflow: hidden; }
  #app { width: 100%; height: 100dvh; min-height: 100dvh; overflow: hidden; }
  #workspace-main { width: 100%; min-width: 0; max-width: 100vw; }
  #scroll-area { min-width: 0; overscroll-behavior: contain; scroll-padding-bottom: 8rem; }
  #chat, #hero { max-width: 100%; }
  #messages { min-width: 0; width: 100%; }
  #input-dock { padding-left: .65rem; padding-right: .65rem; padding-bottom: max(.65rem, env(safe-area-inset-bottom)); }
  #input-dock .rounded-3xl { border-radius: 1.25rem; }
  #prompt { max-height: min(208px, 30dvh); font-size: 16px; }
  .md pre { max-width: calc(100vw - 2.25rem); }
  .md table { max-width: calc(100vw - 2.25rem); }
  .workflow-card { max-width: 100%; }
  .flow-cmd-text { min-width: 0; overflow-wrap: anywhere; }
  .generation-timer { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Unified AI processing flow: step reviews live inside their owning step. */
.workflow-card { background: var(--reasoning-bg); border-color: var(--reasoning-border); }
.workflow-steps { gap: .58rem; padding-left: .15rem; }
.workflow-step { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; column-gap: .58rem; row-gap: .35rem; }
.workflow-step-dot { grid-column: 1; grid-row: 1; }
.workflow-step-label { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
.workflow-step-toggle { grid-column: 3; grid-row: 1; min-width: 38px; min-height: 36px; padding: 0 .55rem; border: 0; border-radius: .55rem; background: transparent; color: var(--reasoning-header-text); font-size: 1.05rem; line-height: 1; letter-spacing: .08em; cursor: pointer; touch-action: manipulation; transition: background .16s ease, color .16s ease; }
.workflow-step-toggle:hover, .workflow-step-toggle:focus-visible { background: var(--reasoning-header-hover); color: var(--md-text); outline: none; }
.workflow-step-detail { grid-column: 2 / 4; grid-row: 2; margin: 0; padding: .58rem .72rem; border: 0; border-left: 2px solid var(--reasoning-border); border-radius: .55rem; background: var(--reasoning-body-bg); color: var(--reasoning-body-text); font-size: .78rem; font-weight: 400; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; animation: flowDetailIn .18s ease both; }
.workflow-step-detail[hidden] { display: none; }
.workflow-step.is-active { color: var(--md-text); }
.dark .workflow-step.is-active { color: #e7e5e4; }
.dark .workflow-step-toggle { color: #a8a29e; }
@keyframes flowDetailIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
  .workflow-header { min-height: 46px; padding: .7rem .75rem; }
  .workflow-body { padding: 0 .75rem .8rem; }
  .workflow-step { font-size: .74rem; }
  .workflow-step-toggle { min-width: 42px; min-height: 42px; }
  .workflow-step-detail { font-size: .8rem; }
}

/* Processing reviews are secondary status context, never answer content. */
.workflow-step.is-active,
.dark .workflow-step.is-active { color: var(--md-text-mute); font-weight: 500; }
.workflow-step.is-active .workflow-step-dot,
.workflow-step.is-complete .workflow-step-dot,
.dark .workflow-step.is-active .workflow-step-dot,
.dark .workflow-step.is-complete .workflow-step-dot {
  border-color: #78716c;
  background: #78716c;
  box-shadow: none;
  animation: none;
}
.workflow-step.is-pending .workflow-step-dot,
.dark .workflow-step.is-pending .workflow-step-dot { border-color: #a8a29e; }
.workflow-step-detail {
  border: 1px solid rgba(120,113,108,.16);
  border-left: 2px solid #a8a29e;
  border-radius: .6rem;
  background: rgba(120,113,108,.075);
  color: #78716c;
  font-size: .77rem;
}
.dark .workflow-step-detail {
  border-color: rgba(168,162,158,.14);
  border-left-color: #78716c;
  background: rgba(168,162,158,.075);
  color: #a8a29e;
}
.workflow-step-toggle { color: #78716c; }
.dark .workflow-step-toggle { color: #a8a29e; }
.workflow-step-toggle:hover,
.workflow-step-toggle:focus-visible,
.dark .workflow-step-toggle:hover,
.dark .workflow-step-toggle:focus-visible {
  color: var(--md-text-soft);
  background: rgba(120,113,108,.10);
}
.flow-note {
  border-left-color: #a8a29e;
  background: rgba(120,113,108,.075);
  color: #78716c;
}
.dark .flow-note {
  border-left-color: #78716c;
  background: rgba(168,162,158,.075);
  color: #a8a29e;
}
.workflow-card .flow-spinner {
  border-color: rgba(120,113,108,.22);
  border-top-color: #78716c;
}
.workflow-card.is-complete .workflow-pulse {
  background: #78716c;
  box-shadow: none;
}
.workflow-step-detail,
.dark .workflow-step-detail {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height .2s ease, opacity .16s ease, padding .2s ease, margin .2s ease, visibility .2s ease;
  animation: none;
}
.workflow-step.has-open-detail .workflow-step-detail,
.dark .workflow-step.has-open-detail .workflow-step-detail {
  max-height: 40rem;
  margin-top: .35rem;
  padding: .58rem .72rem;
  opacity: 1;
  visibility: visible;
}

/* LotuneAI processing UI: keep process metadata quiet and visually subordinate. */
.workflow-card,
.dark .workflow-card {
  background: #101216;
  border: 1px solid rgba(148, 153, 163, .16);
  box-shadow: none;
  color: #c4c7ce;
}
.workflow-header:hover,
.dark .workflow-header:hover { background: rgba(255,255,255,.025); }
.workflow-title,
.dark .workflow-title { color: #c4c7ce; font-weight: 600; }
.workflow-status,
.dark .workflow-status { color: #858b96; }
.workflow-pulse,
.workflow-card.is-complete .workflow-pulse,
.dark .workflow-pulse,
.dark .workflow-card.is-complete .workflow-pulse {
  background: #858b96;
  box-shadow: none;
  animation: none;
}
.flow-spinner,
.dark .flow-spinner {
  border-color: rgba(148,153,163,.2);
  border-top-color: #858b96;
}
.workflow-step,
.workflow-step.is-active,
.workflow-step.is-complete,
.dark .workflow-step,
.dark .workflow-step.is-active,
.dark .workflow-step.is-complete {
  color: #a3a8b2;
  font-weight: 400;
}
.workflow-step-dot,
.workflow-step.is-active .workflow-step-dot,
.workflow-step.is-complete .workflow-step-dot,
.dark .workflow-step-dot,
.dark .workflow-step.is-active .workflow-step-dot,
.dark .workflow-step.is-complete .workflow-step-dot {
  border-color: #737985;
  background: #737985;
  box-shadow: none;
  animation: none;
}
.workflow-step.is-pending .workflow-step-dot,
.dark .workflow-step.is-pending .workflow-step-dot {
  background: transparent;
  border-color: #555b66;
}
.workflow-step-toggle,
.dark .workflow-step-toggle { color: #858b96; }
.workflow-step-toggle:hover,
.workflow-step-toggle:focus-visible,
.dark .workflow-step-toggle:hover,
.dark .workflow-step-toggle:focus-visible {
  color: #c4c7ce;
  background: rgba(255,255,255,.055);
}
.workflow-step-detail,
.dark .workflow-step-detail {
  border: 1px solid rgba(148,153,163,.12);
  border-left: 2px solid #646b77;
  border-radius: .55rem;
  background: rgba(148,153,163,.055);
  color: #9da3ae;
  font-weight: 400;
}
.flow-note,
.dark .flow-note {
  border-left-color: #646b77;
  background: rgba(148,153,163,.055);
  color: #9da3ae;
}
/* Markdown quotations are neutral too; process/review text must not look like success. */
.md blockquote {
  border-left-color: #747b87;
  border-radius: 0 .55rem .55rem 0;
  background: rgba(120,126,138,.065);
  padding: .65rem .8rem;
  color: var(--md-text-soft);
}
.dark .md blockquote {
  border-left-color: #666d79;
  background: rgba(148,153,163,.065);
  color: #aeb3bd;
}

/* Compact composer skills picker. */
.skills-popover {
  max-width: calc(100vw - 1.5rem);
  max-height: min(26rem, calc(100vh - 7rem));
  overflow: hidden;
  animation: fadeUp .16s cubic-bezier(.21, 1.02, .73, 1) both;
}
.skills-button-active {
  color: #047857 !important;
  border-color: rgba(16,185,129,.42) !important;
  background: rgba(16,185,129,.10) !important;
}
.dark #skills-btn {
  color: #a8a29e;
  border-color: rgba(148,163,184,.18);
  background: rgba(22,25,31,.75);
}
.dark #skills-btn:hover { background: rgba(41,45,54,.9); }
.dark #skills-btn.skills-button-active {
  color: #6ee7b7 !important;
  border-color: rgba(52,211,153,.38) !important;
  background: rgba(6,78,59,.36) !important;
}
.dark #coding-mode-btn {
  color: #a8a29e;
  border-color: rgba(148,163,184,.18);
  background: rgba(22,25,31,.75);
}
.dark #coding-mode-btn.bg-emerald-50\/80 {
  color: #6ee7b7 !important;
  border-color: rgba(52,211,153,.38) !important;
  background: rgba(6,78,59,.36) !important;
}
.dark .skills-popover {
  color: #e7e5e4;
  border-color: rgba(148,163,184,.2);
  background: rgba(17,19,24,.98) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.dark .skills-popover .text-stone-800,
.dark .skills-popover .text-stone-700 { color: #e7e5e4 !important; }
.dark .skills-popover .text-stone-500,
.dark .skills-popover .text-stone-400 { color: #9299a5 !important; }
.dark .skills-popover .border-stone-200,
.dark .skills-popover .border-stone-200\/80 { border-color: rgba(148,163,184,.17) !important; }
.dark .skills-popover .bg-stone-50,
.dark .skills-popover .bg-stone-50\/70,
.dark .skills-popover .bg-stone-50\/80 { background: rgba(255,255,255,.045) !important; }
.dark .skills-popover .hover\:bg-stone-50:hover,
.dark .skills-popover .hover\:bg-stone-100:hover { background: rgba(255,255,255,.06) !important; }
/* Legacy external-skill input styling removed: skills are local-only. */
.skill-switch input {
  appearance: none;
  -webkit-appearance: none;
  width: 2rem;
  height: 1.15rem;
  margin: 0;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #e7e5e4;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
  position: relative;
}
.skill-switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .16s ease;
}
.skill-switch input:checked {
  background: #059669;
  border-color: #059669;
}
.skill-switch input:checked::after { transform: translateX(.85rem); }
.skill-switch input:focus-visible { outline: 2px solid rgba(16,185,129,.45); outline-offset: 2px; }
.dark .skill-switch input { border-color: #4b5563; background: #374151; }
.dark .skill-switch input:checked { border-color: #059669; background: #059669; }

@media (max-width: 420px) {
  .skills-popover { right: -3.25rem; width: min(21rem, calc(100vw - 1.25rem)); }
}


/* Calm, consistent process, terminal, and code surfaces. */
:root {
  --md-pre-bg: #242830;
  --md-pre-text: #e0e4eb;
  --reasoning-bg: #f2f3f5;
  --reasoning-border: #e2e5e9;
  --reasoning-header-text: #69717d;
  --reasoning-header-hover: #e9ebef;
  --reasoning-body-bg: #eceef1;
  --reasoning-body-text: #4d5561;
}
.dark {
  --md-pre-bg: #242830;
  --md-pre-text: #e0e4eb;
  --reasoning-bg: #242830;
  --reasoning-border: #343a45;
  --reasoning-header-text: #b7bec9;
  --reasoning-header-hover: #2d333e;
  --reasoning-body-bg: #2b3039;
  --reasoning-body-text: #c4c9d2;
}
.workflow-card,
.dark .workflow-card {
  color: var(--md-text-soft);
  background: var(--reasoning-bg);
  border: 1px solid var(--reasoning-border);
  box-shadow: 0 2px 10px rgba(20, 26, 35, .035);
}
.workflow-header:hover,
.dark .workflow-header:hover { background: var(--reasoning-header-hover); }
.workflow-title,
.dark .workflow-title { color: var(--md-text); }
.workflow-status,
.dark .workflow-status { color: var(--md-text-mute); }
.workflow-step,
.workflow-step.is-active,
.workflow-step.is-complete,
.dark .workflow-step,
.dark .workflow-step.is-active,
.dark .workflow-step.is-complete { color: var(--md-text-soft); font-weight: 400; }
.workflow-step-detail,
.dark .workflow-step-detail {
  border: 1px solid var(--reasoning-border);
  border-left: 2px solid #a3aab5;
  background: var(--reasoning-body-bg);
  color: var(--reasoning-body-text);
  font-family: inherit;
  font-size: .8rem;
}
.flow-thinking-list { display: grid; gap: .5rem; margin-top: .55rem; }
.flow-note,
.dark .flow-note {
  border: 1px solid var(--reasoning-border);
  border-left: 3px solid #a3aab5;
  border-radius: .65rem;
  background: var(--reasoning-bg);
  color: var(--md-text-soft);
  font-family: inherit;
  font-size: .82rem;
  line-height: 1.6;
  white-space: normal;
}
.flow-note-label { display: block; margin-bottom: .18rem; color: var(--reasoning-header-text); font-size: .62rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.flow-note-text { margin: 0; color: var(--reasoning-body-text); }
.reasoning-text {
  font-family: inherit;
  background: var(--reasoning-body-bg);
  color: var(--reasoning-body-text);
  border: 1px solid var(--reasoning-border);
  font-size: .82rem;
}
.flow-terminal-heading {
  margin: .8rem 0 .4rem;
  color: var(--md-text-mute);
  font-size: .64rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.flow-cmd-item,
.dark .flow-cmd-item {
  border: 1px solid rgba(148, 156, 169, .22);
  border-radius: .7rem;
  background: #242830;
  color: #e0e4eb;
}
.flow-cmd-bar,
.dark .flow-cmd-bar {
  background: #2a2f38;
  border-bottom-color: rgba(255,255,255,.07);
}
.flow-cmd-text,
.dark .flow-cmd-text { color: #e0e4eb; }
.flow-cmd-output,
.dark .flow-cmd-output { color: #c9ced8; background: #242830; }

.code-block-shell {
  margin: .85rem 0 1rem;
  overflow: hidden;
  border: 1px solid #3a414d;
  border-radius: .9rem;
  background: #242830;
  box-shadow: 0 4px 18px rgba(20,26,35,.08);
  animation: fadeUp .2s ease both;
}
.code-block-shell .code-toolbar {
  position: static;
  inset: auto;
  height: auto;
  min-height: 2.65rem;
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  padding: .45rem .7rem;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #2a2f38;
}
.code-block-shell .code-language {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #aeb6c3;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .025em;
  text-transform: lowercase;
}
.code-toolbar-actions { display: inline-flex; align-items: center; gap: .4rem; }
.code-block-shell .code-expand,
.code-block-shell .code-copy {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 1.85rem;
  padding: .25rem .55rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem;
  color: #c4cad4;
  background: rgba(255,255,255,.045);
  font-size: .67rem;
  font-weight: 650;
  cursor: pointer;
}
.code-block-shell .code-expand:hover,
.code-block-shell .code-copy:hover { color: #f2f4f8; background: rgba(255,255,255,.1); }
.code-block-shell .code-expand.is-muted { opacity: .75; }
.code-block-viewport { position: relative; min-height: 2.8rem; background: #242830; }
.code-block-viewport.is-preview { max-height: 9.4rem; overflow: hidden; }
.code-block-viewport.is-preview::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2.8rem;
  content: '';
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(36,40,48,0), #242830 94%);
}
.code-block-viewport > pre,
.md .code-block-shell pre {
  margin: 0 !important;
  padding: .85rem .95rem 1rem !important;
  min-height: 2.8rem;
  border: 0 !important;
  border-radius: 0 !important;
  background: #242830 !important;
  color: #e0e4eb !important;
  font-size: .8rem;
  line-height: 1.55;
}
.md .code-block-shell pre code,
.md .code-block-shell pre code.hljs { color: inherit; }
.code-quick-actions { margin-top: .35rem; }
@media (max-width: 640px) {
  .code-block-shell .code-toolbar { min-height: 2.85rem; padding: .4rem .5rem; }
  .code-block-shell .code-expand, .code-block-shell .code-copy { min-height: 2rem; padding: .3rem .48rem; }
  .code-block-viewport.is-preview { max-height: 9.4rem; }
}

.workspace-changes-card {
  margin-top: .85rem;
  padding: .8rem .9rem;
  border: 1px solid var(--reasoning-border);
  border-radius: .85rem;
  background: var(--reasoning-bg);
  color: var(--md-text-soft);
}
.workspace-changes-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; }
.workspace-changes-head strong { color: var(--md-text); font-size: .78rem; }
.workspace-changes-head span { color: var(--md-text-mute); font-size: .67rem; }
.workspace-changes-list { display: flex; flex-direction: column; gap: .35rem; margin: .65rem 0; padding: 0; list-style: none; }
.workspace-changes-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-width: 0; font-size: .68rem; }
.workspace-change-status { flex: 0 0 auto; color: var(--md-text-mute); font-weight: 700; }
.workspace-changes-list code { min-width: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--md-text); }
.workspace-change-counts { color: #748091; font-size: .63rem; }
.workspace-download-button {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .4rem .7rem;
  border: 1px solid var(--reasoning-border);
  border-radius: .6rem;
  color: var(--md-text);
  background: rgba(255,255,255,.45);
  font-size: .68rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.dark .workspace-download-button { background: rgba(255,255,255,.04); }
.workspace-download-button:hover { background: var(--reasoning-header-hover); transform: translateY(-1px); }

.welcome-modal-overlay[hidden] { display: none !important; }
.welcome-modal-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(27, 31, 38, .34);
  backdrop-filter: blur(8px);
  animation: welcomeFadeIn .22s ease both;
}
.welcome-modal-card {
  position: relative;
  width: min(100%, 25rem);
  padding: 2rem 1.6rem 1.5rem;
  border: 1px solid rgba(148,156,169,.25);
  border-radius: 1.25rem;
  background: #f7f8fa;
  color: #343b46;
  text-align: center;
  box-shadow: 0 22px 75px rgba(22,27,35,.16);
  animation: welcomeCardIn .38s cubic-bezier(.2,.8,.2,1) both;
}
.dark .welcome-modal-card { border-color: #373d47; background: #252a33; color: #e6e9ef; }
.welcome-modal-mark { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin: 0 auto .9rem; border-radius: .9rem; background: #e6e9ee; color: #626d7c; font-weight: 850; font-size: 1.1rem; }
.dark .welcome-modal-mark { background: #343b47; color: #d7dce5; }
.welcome-modal-close { position: absolute; top: .7rem; right: .8rem; width: 2rem; height: 2rem; border-radius: .6rem; color: #858d99; font-size: 1.35rem; }
.welcome-modal-eyebrow { color: #8b94a1; font-size: .62rem; font-weight: 800; letter-spacing: .15em; }
.welcome-modal-card h1 { margin: .55rem 0 .45rem; font-size: 1.28rem; font-weight: 750; letter-spacing: -.025em; }
.welcome-modal-card p:not(.welcome-modal-eyebrow) { color: #7b8491; font-size: .82rem; line-height: 1.55; }
.dark .welcome-modal-card p:not(.welcome-modal-eyebrow) { color: #aeb6c3; }
.welcome-modal-start { width: 100%; min-height: 2.65rem; margin-top: 1.25rem; border-radius: .75rem; background: #343b46; color: white; font-size: .78rem; font-weight: 700; }
.dark .welcome-modal-start { background: #e2e6ed; color: #2b313a; }
@keyframes welcomeFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcomeCardIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .welcome-modal-overlay, .welcome-modal-card { animation: none; } }

.welcome-modal-overlay.is-closing { opacity: 0; transition: opacity .18s ease; }


/* ==========================================================================
   LOTUNEAI — Lotus Piano / Liquid Glass visual direction
   A warm pearl canvas, translucent glass surfaces, piano-key details.
   ========================================================================== */
:root {
  --lotune-ink: #302b2a;
  --lotune-muted: #827875;
  --lotune-rose: #c77d88;
  --lotune-sage: #82958a;
  --lotune-glass: rgba(255, 252, 249, .68);
  --lotune-line: rgba(255, 255, 255, .78);
}
html, body { background: #f5f0eb !important; }
body { color: var(--lotune-ink) !important; }
#app {
  background:
    radial-gradient(ellipse at 78% 12%, rgba(237, 195, 190, .28), transparent 36%),
    radial-gradient(ellipse at 20% 82%, rgba(175, 196, 181, .22), transparent 35%),
    linear-gradient(135deg, #f8f5f1 0%, #f2eeeb 55%, #f8f3ef 100%) !important;
}
#workspace-main { background: transparent !important; }
#workspace-main > .bg-dots { opacity: .12 !important; background-image: radial-gradient(circle at 1px 1px, rgba(116,94,88,.16) 1px, transparent 0) !important; }
#sidebar {
  background: rgba(255, 252, 249, .62) !important;
  border-color: rgba(255,255,255,.82) !important;
  box-shadow: 12px 0 48px rgba(79,61,55,.055), inset -1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(28px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(145%) !important;
}
#sidebar .bg-gradient-to-br.from-emerald-500,
#hero .bg-gradient-to-br.from-emerald-500 {
  background: linear-gradient(145deg, #d9a0a5, #a8b8a8) !important;
  box-shadow: 0 8px 24px rgba(178,126,134,.2) !important;
}
#sidebar .border-t, #sidebar .border-r { border-color: rgba(160,139,132,.18) !important; }
#sidebar .bg-white\/60, #sidebar .border-stone-200\/80 {
  background: rgba(255,255,255,.42) !important;
  border-color: rgba(255,255,255,.78) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.85), 0 10px 30px rgba(93,75,68,.045);
  backdrop-filter: blur(18px);
}
#sidebar button[data-nav="home"].nav-item,
#sidebar .nav-item:hover { color: #9d626d !important; background: rgba(210,160,164,.13) !important; }
#sidebar #new-project {
  background: linear-gradient(120deg, #8c7774, #9e7e80) !important;
  box-shadow: 0 9px 22px rgba(133,98,100,.2) !important;
}
#workspace-main > header {
  background: rgba(255,252,249,.48) !important;
  border-color: rgba(255,255,255,.76) !important;
  backdrop-filter: blur(24px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
}
#header-title { color: #665b58 !important; }
#hero {
  position: relative;
  isolation: isolate;
  max-width: 1120px !important;
  overflow: hidden;
  border-radius: 34px;
  margin-top: 18px;
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 5vw, 68px) !important;
  background:
    linear-gradient(100deg, rgba(250,247,243,.96) 0%, rgba(250,247,243,.9) 40%, rgba(250,247,243,.16) 100%),
    url('/assets/lotune-piano-lotus.webp') right 45% center / auto 112% no-repeat,
    linear-gradient(135deg, rgba(255,255,255,.6), rgba(230,216,208,.26));
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: 0 24px 80px rgba(92,72,66,.10), inset 0 1px rgba(255,255,255,.95);
}
#hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 78% 50%, transparent 0%, rgba(249,245,240,.08) 44%, rgba(249,245,240,.62) 100%);
  pointer-events: none;
}
#hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 5%;
  right: 5%;
  bottom: 15px;
  height: 15px;
  opacity: .22;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #655a58 0 1px, transparent 1px 8.333%), linear-gradient(#fff,#fff);
  box-shadow: 0 -1px rgba(255,255,255,.8);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}
#hero > * { position: relative; z-index: 1; }
#hero > div:first-child { align-items: flex-start !important; text-align: left !important; max-width: 510px; }
#hero > div:first-child > div:first-child { display: none !important; }
#hero h2 {
  color: #514442 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-weight: 500 !important;
  font-size: clamp(34px, 4vw, 54px) !important;
  letter-spacing: -.045em !important;
  line-height: 1.06 !important;
}
#hero #greeting-name {
  background: linear-gradient(110deg, #b56f7b, #9a8d76) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
#hero p { color: #7c706b !important; font-size: 15px !important; }
#hero-input-slot { max-width: 620px; margin-top: 24px; }
#hero-input-slot > * {
  background: rgba(255,255,255,.76) !important;
  border: 1px solid rgba(255,255,255,.96) !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 45px rgba(89,66,61,.12), inset 0 1px rgba(255,255,255,.98) !important;
  backdrop-filter: blur(26px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(150%) !important;
}
#hero-input-slot textarea, #dock-input-slot textarea {
  color: #463c39 !important;
}
#hero-input-slot textarea::placeholder, #dock-input-slot textarea::placeholder { color: #a19590 !important; }
#suggestions { max-width: 620px; }
#suggestions > * {
  background: rgba(255,255,255,.48) !important;
  border: 1px solid rgba(255,255,255,.88) !important;
  border-radius: 17px !important;
  color: #756662 !important;
  box-shadow: 0 8px 25px rgba(87,65,60,.055), inset 0 1px rgba(255,255,255,.95);
  backdrop-filter: blur(18px);
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
#suggestions > *:hover { transform: translateY(-2px); background: rgba(255,255,255,.78) !important; box-shadow: 0 12px 30px rgba(87,65,60,.10); }
#input-dock { background: linear-gradient(180deg, transparent, rgba(246,241,237,.9) 30%) !important; }
#input-dock .pointer-events-none { background: linear-gradient(to top, rgba(246,241,237,.96), transparent) !important; }
#dock-input-slot > * {
  border: 1px solid rgba(255,255,255,.92) !important;
  border-radius: 22px !important;
  background: rgba(255,252,249,.82) !important;
  box-shadow: 0 12px 38px rgba(84,65,60,.10), inset 0 1px rgba(255,255,255,.98) !important;
  backdrop-filter: blur(24px) saturate(145%);
}
#chat { max-width: 900px !important; }
#chat #messages { color: #463d3a; }
#preview-panel { background: rgba(250,247,244,.88) !important; backdrop-filter: blur(24px); }
.welcome-modal-card {
  background: rgba(255,250,247,.88) !important;
  border: 1px solid rgba(255,255,255,.95) !important;
  color: #514442 !important;
  box-shadow: 0 28px 90px rgba(75,53,49,.18), inset 0 1px rgba(255,255,255,.95) !important;
  backdrop-filter: blur(30px) saturate(150%) !important;
}
.welcome-modal-mark { background: linear-gradient(145deg,#d9a0a5,#a8b8a8) !important; }
.welcome-modal-start { background: linear-gradient(120deg,#8c7774,#b27e85) !important; }
@media (max-width: 760px) {
  #hero {
    min-height: 570px !important;
    justify-content: flex-start !important;
    background:
      linear-gradient(180deg, rgba(250,247,243,.97) 0%, rgba(250,247,243,.90) 42%, rgba(250,247,243,.12) 100%),
      url('/assets/lotune-piano-lotus.webp') center bottom / auto 62% no-repeat,
      #f8f3ef !important;
    border-radius: 24px;
    padding: 34px 20px 260px !important;
  }
  #hero > div:first-child { align-items: flex-start !important; text-align: left !important; }
  #hero-input-slot { margin-top: 18px; }
  #suggestions { grid-template-columns: 1fr !important; }
  #hero::after { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #suggestions > * { transition: none !important; }
}


/* ==========================================================================
   LOTUNEAI — No More Eurydice / Midnight Piano Liquid Glass palette
   Primary: #0E1117, #181C24 | Text: #F4F1EA, #9AA3B2
   Accents: #D89AA8, #B8C7E0
   ========================================================================== */
:root {
  color-scheme: dark;
  --lotune-night: #0E1117;
  --lotune-panel: #181C24;
  --lotune-ivory: #F4F1EA;
  --lotune-slate: #9AA3B2;
  --lotune-petal: #D89AA8;
  --lotune-glass-blue: #B8C7E0;
  --lotune-glass: rgba(24, 28, 36, .72);
  --lotune-rim: rgba(184, 199, 224, .22);
}
html, body {
  color-scheme: dark !important;
  background: var(--lotune-night) !important;
  color: var(--lotune-ivory) !important;
}
body, #app {
  background:
    radial-gradient(ellipse at 78% 12%, rgba(184,199,224,.09), transparent 34%),
    radial-gradient(ellipse at 14% 82%, rgba(216,154,168,.075), transparent 34%),
    linear-gradient(145deg, #0E1117 0%, #141923 54%, #0E1117 100%) !important;
  color: var(--lotune-ivory) !important;
}
#workspace-main { background: transparent !important; }
#workspace-main > .bg-dots {
  opacity: .13 !important;
  background-image: radial-gradient(circle at 1px 1px, rgba(184,199,224,.24) 1px, transparent 0) !important;
}
#sidebar {
  background: rgba(16, 20, 28, .78) !important;
  border-color: rgba(184,199,224,.16) !important;
  color: var(--lotune-ivory) !important;
  box-shadow: 14px 0 54px rgba(0,0,0,.28), inset -1px 0 rgba(184,199,224,.12);
  backdrop-filter: blur(32px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(140%) !important;
}
#sidebar .border-t, #sidebar .border-r,
#workspace-main header, #workspace-main .border-b {
  border-color: rgba(184,199,224,.14) !important;
}
#sidebar .text-stone-400, #sidebar .text-stone-500,
#sidebar .text-gray-400, #sidebar .text-gray-500,
#header-title, #workspace-main header button {
  color: var(--lotune-slate) !important;
}
#sidebar .bg-white\/60, #sidebar .border-stone-200\/80,
#sidebar [class*="bg-stone-"], #sidebar [class*="bg-neutral-"] {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(184,199,224,.14) !important;
  box-shadow: inset 0 1px rgba(184,199,224,.09), 0 12px 34px rgba(0,0,0,.12);
  backdrop-filter: blur(22px);
}
#sidebar button[data-nav="home"].nav-item,
#sidebar .nav-item:hover {
  color: var(--lotune-petal) !important;
  background: rgba(216,154,168,.105) !important;
}
#sidebar #new-project {
  color: #0E1117 !important;
  background: linear-gradient(115deg, #D89AA8, #B8C7E0) !important;
  box-shadow: 0 9px 28px rgba(184,199,224,.13) !important;
}
#sidebar .bg-gradient-to-br.from-emerald-500,
#hero .bg-gradient-to-br.from-emerald-500,
.welcome-modal-mark {
  color: #0E1117 !important;
  background: linear-gradient(145deg, #D89AA8, #B8C7E0) !important;
  box-shadow: 0 9px 28px rgba(216,154,168,.16) !important;
}
#workspace-main > header {
  background: rgba(14,17,23,.62) !important;
  border-color: rgba(184,199,224,.14) !important;
  backdrop-filter: blur(28px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(145%) !important;
}
#hero {
  color: var(--lotune-ivory) !important;
  background:
    linear-gradient(90deg, rgba(14,17,23,.98) 0%, rgba(14,17,23,.91) 34%, rgba(14,17,23,.48) 66%, rgba(14,17,23,.20) 100%),
    linear-gradient(0deg, rgba(14,17,23,.42), transparent 45%),
    url('/assets/lotune-piano-lotus.webp') right 43% center / auto 112% no-repeat,
    #181C24 !important;
  border: 1px solid rgba(184,199,224,.24) !important;
  box-shadow: 0 28px 90px rgba(0,0,0,.34), inset 0 1px rgba(244,241,234,.11), inset 0 0 0 1px rgba(184,199,224,.045) !important;
}
#hero::before {
  background:
    radial-gradient(ellipse at 82% 40%, rgba(184,199,224,.12), transparent 38%),
    linear-gradient(90deg, rgba(14,17,23,.08), rgba(14,17,23,.08)) !important;
}
#hero::after {
  opacity: .48 !important;
  background: repeating-linear-gradient(90deg, rgba(244,241,234,.72) 0 1px, transparent 1px 8.333%), linear-gradient(#181C24,#181C24) !important;
  box-shadow: 0 -1px rgba(184,199,224,.32) !important;
}
#hero h2 {
  color: var(--lotune-ivory) !important;
  text-shadow: 0 3px 28px rgba(0,0,0,.32);
}
#hero #greeting-name {
  background: linear-gradient(110deg, #D89AA8, #B8C7E0) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
#hero p { color: #C0C5CF !important; }
#hero-input-slot > *, #dock-input-slot > * {
  color: var(--lotune-ivory) !important;
  background: rgba(24,28,36,.76) !important;
  border: 1px solid rgba(184,199,224,.25) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 52px rgba(0,0,0,.28), inset 0 1px rgba(244,241,234,.12), inset 0 0 24px rgba(184,199,224,.025) !important;
  backdrop-filter: blur(30px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(145%) !important;
}
#hero-input-slot textarea, #dock-input-slot textarea {
  color: var(--lotune-ivory) !important;
  caret-color: var(--lotune-petal);
}
#hero-input-slot textarea::placeholder, #dock-input-slot textarea::placeholder {
  color: var(--lotune-slate) !important;
}
#suggestions > * {
  color: #D5D9E0 !important;
  background: rgba(24,28,36,.58) !important;
  border: 1px solid rgba(184,199,224,.19) !important;
  border-radius: 17px !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.19), inset 0 1px rgba(244,241,234,.09) !important;
  backdrop-filter: blur(22px) saturate(140%);
}
#suggestions > *:hover {
  color: var(--lotune-ivory) !important;
  background: rgba(216,154,168,.12) !important;
  border-color: rgba(216,154,168,.34) !important;
  box-shadow: 0 14px 38px rgba(0,0,0,.25), 0 0 24px rgba(216,154,168,.055) !important;
}
#input-dock {
  background: linear-gradient(180deg, transparent, rgba(14,17,23,.94) 34%) !important;
}
#input-dock .pointer-events-none {
  background: linear-gradient(to top, rgba(14,17,23,.96), transparent) !important;
}
#chat { color: var(--lotune-ivory) !important; }
#chat #messages { color: #E7E5E1 !important; }
#chat .text-stone-500, #chat .text-gray-500,
#chat .text-stone-400, #chat .text-gray-400 { color: var(--lotune-slate) !important; }
#preview-panel {
  color: var(--lotune-ivory) !important;
  background: rgba(18,22,30,.91) !important;
  border-color: rgba(184,199,224,.17) !important;
  backdrop-filter: blur(28px);
}
.welcome-modal-card {
  color: var(--lotune-ivory) !important;
  background: rgba(24,28,36,.88) !important;
  border: 1px solid rgba(184,199,224,.25) !important;
  box-shadow: 0 30px 100px rgba(0,0,0,.5), inset 0 1px rgba(244,241,234,.12) !important;
  backdrop-filter: blur(34px) saturate(145%) !important;
}
.welcome-modal-start {
  color: #0E1117 !important;
  background: linear-gradient(115deg, #D89AA8, #B8C7E0) !important;
}
#hero button, #dock-input-slot button {
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
#hero button:hover, #dock-input-slot button:hover {
  box-shadow: 0 0 24px rgba(184,199,224,.16) !important;
}
@media (max-width: 760px) {
  #hero {
    background:
      linear-gradient(180deg, rgba(14,17,23,.98) 0%, rgba(14,17,23,.90) 38%, rgba(14,17,23,.18) 100%),
      url('/assets/lotune-piano-lotus.webp') center bottom / auto 62% no-repeat,
      #181C24 !important;
  }
}
