/* ============ HermesOS — Original Design ============ */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --border: #222222;
  --text: #e8e8e8;
  --text-dim: #666666;
  --text-mid: #999999;
  --accent: #ffffff;
  --error: #ef4444;
  --glass-outer: rgba(255,255,255,0.10);
  --glass-outer-hover: rgba(255,255,255,0.13);
  --glass-inner: rgba(23,23,23,0.80);
  --glass-border: rgba(255,255,255,0.11);
  --glass-border-strong: rgba(255,255,255,0.22);
  --glass-highlight: rgba(255,255,255,0.055);
  --glass-shadow: 0 34px 110px rgba(0,0,0,0.54), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(255,255,255,0.04);
  --radius-window: 22px;
  --radius-window-inner: 14px;
  --radius-card: 16px;
  --radius-card-inner: 8px;
  --inset-window: 8px;
  --inset-card: 8px;
  --motion-fast: 140ms;
  --motion-base: 220ms;
  --motion-slow: 360ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-family: 'JetBrains Mono';
  src: local('JetBrains Mono');
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(ellipse 74vw 74vw at 54% 118%, rgba(58,58,58,0.56), transparent 58%),
    radial-gradient(ellipse 48vw 48vw at 54% 84%, rgba(28,28,28,0.62), transparent 56%),
    #0a0a0a;
  color: var(--text);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}



/* === HERMESOS SOTA INTERACTION CONTRACT ===
Every OS surface, generated OpenUI primitive, status/loading/waiting/empty state,
content swap, and user action should feel refined: smooth, gentle, responsive,
intentional. Never abrupt, crude, noisy, or artificially long. */

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

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* === WORKSPACE === */
.workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* === STATUS BAR (top right) === */
.status-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  z-index: 100;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  transition: background var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease);
}

.status-dot.connected {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.45);
  animation: pulse-blue 2s ease-in-out infinite;
}

.status-dot.idle { background: #22c55e; }
.status-dot.error { background: var(--error); }

@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
  50% { box-shadow: 0 0 8px 3px rgba(59, 130, 246, 0.18); }
}

@keyframes ou-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.status-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.status-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 10px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease);
}

.status-btn:hover {
  color: var(--text);
  border-color: #333;
}

/* === CANVAS === */
.canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px;
  scroll-behavior: smooth;
}

.messages-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 0 24px;
}

/* === WELCOME === */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.welcome h1 {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

.welcome p {
  font-size: 14px;
  color: var(--text-dim);
}

/* === MESSAGES === */
.message {
  margin-bottom: 24px;
  animation: fadeIn var(--motion-slow) var(--motion-ease-soft);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  display: flex;
  justify-content: flex-end;
}

.message.user .bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 16px;
  max-width: 80%;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.assistant .bubble {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
}

.message.assistant .bubble code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.message.assistant .bubble pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.message.assistant .bubble pre code {
  background: none;
  border: none;
  padding: 0;
}

/* Markdown elements */
.bubble h1, .bubble h2, .bubble h3 { font-weight: 600; margin: 16px 0 8px; color: var(--accent); }
.bubble h1 { font-size: 18px; }
.bubble h2 { font-size: 16px; }
.bubble h3 { font-size: 15px; }
.bubble p { margin: 8px 0; }
.bubble ul, .bubble ol { padding-left: 20px; margin: 8px 0; }
.bubble li { margin: 4px 0; }
.bubble blockquote { border-left: 2px solid var(--border); padding-left: 12px; color: var(--text-mid); margin: 8px 0; }
.bubble a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.bubble hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.bubble strong { font-weight: 600; }
.bubble em { font-style: italic; }

/* === OPENUI / SHADCN SPIKE === */
.message.assistant .bubble.openui-bubble {
  max-width: 100%;
}

.ou-render-shell {
  width: 100%;
}

.ou-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.045)),
    var(--glass-outer);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: var(--inset-card);
  box-shadow: 0 18px 56px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.ou-card > * {
  border-radius: var(--radius-card-inner);
}

.ou-text {
  color: var(--text);
  letter-spacing: -0.01em;
}

.ou-text-small { font-size: 12px; color: var(--text-mid); }
.ou-text-normal { font-size: 14px; }
.ou-text-large { font-size: 18px; font-weight: 500; color: #fff; }
.ou-text-large-heavy { font-size: 22px; font-weight: 650; color: #fff; line-height: 1.2; }

.ou-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #303030;
  background: #171717;
  color: #d4d4d4;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: lowercase;
}

.ou-badge-success { border-color: rgba(34,197,94,.35); color: #86efac; background: rgba(34,197,94,.08); }
.ou-badge-warning { border-color: rgba(245,158,11,.38); color: #fcd34d; background: rgba(245,158,11,.08); }
.ou-badge-danger { border-color: rgba(239,68,68,.38); color: #fca5a5; background: rgba(239,68,68,.08); }
.ou-badge-info { border-color: rgba(59,130,246,.38); color: #93c5fd; background: rgba(59,130,246,.08); }

.ou-metric {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-card-inner);
  padding: 12px;
  background: rgba(23,23,23,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
  transition: border-color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.ou-metric:hover {
  border-color: rgba(255,255,255,0.14);
  background: rgba(28,28,28,0.78);
  transform: translateY(-1px);
}

.ou-metric-label {
  color: var(--text-mid);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ou-metric-value {
  margin-top: 3px;
  color: #fff;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.ou-metric-delta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-mid);
}

.ou-tone-success .ou-metric-delta { color: #86efac; }
.ou-tone-warning .ou-metric-delta { color: #fcd34d; }
.ou-tone-danger .ou-metric-delta { color: #fca5a5; }
.ou-tone-info .ou-metric-delta { color: #93c5fd; }

.ou-progress { display: flex; flex-direction: column; gap: 7px; }
.ou-progress-head { display: flex; justify-content: space-between; color: var(--text-mid); font-size: 12px; }
.ou-progress-track { height: 8px; border-radius: 999px; background: rgba(23,23,23,0.82); overflow: hidden; border: 1px solid rgba(255,255,255,0.07); }
.ou-progress-fill { height: 100%; border-radius: inherit; background: #fff; transition: width .25s var(--motion-ease); }

.ou-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-card-inner);
  background: rgba(23,23,23,0.58);
}

.ou-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ou-table th,
.ou-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #222;
  text-align: left;
}

.ou-table th {
  color: #fff;
  font-weight: 500;
  background: rgba(255,255,255,0.035);
}

.ou-table td { color: #cfcfcf; }
.ou-table tr:last-child td { border-bottom: none; }

.ou-button {
  align-self: flex-start;
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(23,23,23,0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease);
}

.ou-button-primary { background: #fff; color: #050505; border-color: #fff; }
.ou-button-danger { color: #fca5a5; border-color: rgba(239,68,68,.38); background: rgba(239,68,68,.08); }
.ou-separator { height: 1px; background: #262626; margin: 2px 0; }
.ou-raw-fallback { white-space: pre-wrap; color: var(--text-mid); }

/* === THINKING DOTS === */
.thinking-dots {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.thinking-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: dot 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* === INPUT AREA === */
.input-area {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  width: max-content;
  margin: 0 auto;
  z-index: 2147483000;
  padding: 0;
  background: transparent;
  transform: none;
}

.input-area::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 76px;
  height: 76px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

.input-area:has(.input-chat-shell.expanded)::after,
.input-area:has(.input-chat-shell.chat-open)::after,
.input-area:has(.input-chat-shell.listening)::after {
  bottom: -24px;
  width: min(720px, calc(100vw - 32px));
  height: 126px;
}

.input-chat-shell {
  position: relative;
  z-index: 2147483000;
  width: 58px;
  transition:
    width 480ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 320ms var(--motion-ease),
    filter 320ms var(--motion-ease);
}

.input-chat-shell.expanded,
.input-chat-shell.chat-open,
.input-chat-shell:focus-within {
  width: min(720px, calc(100vw - 32px));
}

.input-chat-shell.dragging {
  transition: none;
  cursor: grabbing;
  user-select: none;
}

.input-container {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0;
  box-shadow: none;
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition:
    width 520ms cubic-bezier(0.16, 1, 0.3, 1),
    padding 520ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 520ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 340ms ease,
    background 340ms ease,
    box-shadow 420ms ease;
}

.input-chat-shell.expanded .input-container,
.input-chat-shell.chat-open .input-container,
.input-chat-shell:focus-within .input-container {
  width: min(720px, calc(100vw - 32px));
  border-radius: 999px;
  padding: 6px;
  background: rgba(17,17,17,0.92);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 18px 70px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.035);
}

.input-container:focus-within,
.input-chat-shell:hover .input-container {
  border-color: rgba(255,255,255,0.18);
  background: rgba(17,17,17,0.96);
}

.input-chat-shell.collapsed:not(.chat-open):not(:focus-within) .input-container textarea {
  min-width: 0;
  opacity: 0;
  width: 0;
  flex: 0 0 0;
  padding: 0;
  pointer-events: none;
}

.input-chat-shell.collapsed:not(.chat-open):not(:focus-within) .send-btn {
  opacity: 0;
  width: 0;
  margin-left: -8px;
  pointer-events: none;
}

.input-state {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  align-self: center;
  display: inline-grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: #22c55e;
  color: var(--bg);
  cursor: pointer;
  box-shadow: 0 14px 48px rgba(34,197,94,0.22), inset 0 1px 0 rgba(255,255,255,0.22);
  transition:
    transform 260ms var(--motion-ease),
    border-color 320ms var(--motion-ease),
    background 360ms var(--motion-ease),
    box-shadow 420ms var(--motion-ease),
    flex-basis 520ms cubic-bezier(0.16, 1, 0.3, 1),
    width 520ms cubic-bezier(0.16, 1, 0.3, 1),
    height 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.input-state:hover,
.input-state.open {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.34);
  background: #34d399;
  box-shadow: 0 18px 58px rgba(34,197,94,0.30), inset 0 1px 0 rgba(255,255,255,0.26);
}

.input-chat-shell.expanded .input-state,
.input-chat-shell.chat-open .input-state,
.input-chat-shell:focus-within .input-state {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

.input-state-pulse {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.48), rgba(255,255,255,0.08) 30%, transparent 62%);
  opacity: 0.52;
  pointer-events: none;
}

.input-state.active {
  background: #3b82f6;
  box-shadow: 0 16px 54px rgba(59,130,246,0.34), inset 0 1px 0 rgba(255,255,255,0.24);
  animation: pulse-blue 2s ease-in-out infinite;
}

.input-state.error {
  background: #ef4444;
  box-shadow: 0 16px 54px rgba(239,68,68,0.30), inset 0 1px 0 rgba(255,255,255,0.22);
}

.input-container textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  min-height: 24px;
  padding: 6px 0;
  opacity: 1;
  transition: opacity var(--motion-fast) var(--motion-ease), width var(--motion-base) var(--motion-ease-soft), flex-basis var(--motion-base) var(--motion-ease-soft), padding var(--motion-base) var(--motion-ease-soft);
}

.input-container textarea::placeholder { color: var(--text-dim); }

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 0.2s, width var(--motion-base) var(--motion-ease-soft), margin var(--motion-base) var(--motion-ease-soft);
}

.send-btn:hover { opacity: 0.9; }
.send-btn:disabled { opacity: 0.15; cursor: default; }

/* === LOGIN === */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--bg);
}

.login-box {
  text-align: center;
  width: 320px;
}

.login-box h1 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin-bottom: 6px;
}

.login-box .subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.login-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.login-input-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 48px 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.login-input-wrap input:focus { border-color: #333; }
.login-input-wrap input::placeholder { color: var(--text-dim); }

.login-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.login-submit:hover { opacity: 0.85; }
.login-submit:disabled { opacity: 0.2; cursor: default; }

.login-error {
  font-size: 12px;
  color: var(--error);
  min-height: 18px;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .messages-inner { padding: 40px 0 16px; }
  .input-container { border-radius: 12px; }
  .message.user .bubble { max-width: 90%; }
  .login-box { width: 280px; padding: 0 16px; }
}

.ou-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.ou-image {
  width: 100%;
  overflow: hidden;
  border: 1px solid #262626;
  border-radius: 14px;
  background: rgba(0,0,0,0.28);
}

.ou-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

.ou-image-wide img { aspect-ratio: 16 / 9; }
.ou-image-square img { aspect-ratio: 1 / 1; }
.ou-image-portrait img { aspect-ratio: 4 / 5; }
.ou-image-auto img { height: auto; object-fit: contain; }
.ou-image figcaption { padding: 9px 11px; color: var(--text-mid); font-size: 12px; border-top: 1px solid #222; }
.ou-image-invalid { padding: 24px; color: #fca5a5; font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.ou-chart {
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.22);
}

.ou-chart-title { color: #fff; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.ou-chart-bars { display: flex; flex-direction: column; gap: 9px; }
.ou-chart-row { display: grid; grid-template-columns: 88px minmax(80px, 1fr) 42px; align-items: center; gap: 9px; }
.ou-chart-label, .ou-chart-value { color: var(--text-mid); font-size: 11px; font-family: 'JetBrains Mono', monospace; }
.ou-chart-value { text-align: right; }
.ou-chart-track { position: relative; height: 9px; overflow: hidden; border-radius: 999px; background: #1d1d1d; border: 1px solid #292929; }
.ou-chart-fill { height: 100%; border-radius: inherit; background: #fff; position: relative; }
.ou-chart-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); animation: ou-shimmer 2.4s ease-in-out infinite; }

.ou-tone-success .ou-chart-fill, .ou-tone-success .ou-progress-fill { background: #22c55e; }
.ou-tone-warning .ou-chart-fill, .ou-tone-warning .ou-progress-fill { background: #f59e0b; }
.ou-tone-danger .ou-chart-fill, .ou-tone-danger .ou-progress-fill { background: #ef4444; }
.ou-tone-info .ou-chart-fill, .ou-tone-info .ou-progress-fill { background: #3b82f6; }

.ou-timeline { display: flex; flex-direction: column; gap: 0; }
.ou-timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.ou-timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 1px; background: #2a2a2a; }
.ou-timeline-dot { width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; border: 1px solid #444; background: #171717; z-index: 1; }
.ou-state-done .ou-timeline-dot { background: #22c55e; border-color: #22c55e; }
.ou-state-active .ou-timeline-dot { background: #3b82f6; border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.ou-state-blocked .ou-timeline-dot { background: #ef4444; border-color: #ef4444; }
.ou-timeline-title { color: #fff; font-size: 13px; font-weight: 550; }
.ou-timeline-detail { color: var(--text-mid); font-size: 12px; margin-top: 2px; }

.ou-checklist, .ou-status-list { display: flex; flex-direction: column; gap: 8px; }
.ou-check-item { display: flex; align-items: center; gap: 9px; color: #d4d4d4; font-size: 13px; }
.ou-check-box { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 5px; border: 1px solid #333; background: #151515; color: #050505; font-size: 12px; font-weight: 700; }
.ou-check-item:has(.ou-check-box:not(:empty)) .ou-check-box { background: #fff; border-color: #fff; }

.ou-status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid #262626;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
}
.ou-status-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ou-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #777; flex-shrink: 0; }
.ou-tone-success .ou-status-dot { background: #22c55e; }
.ou-tone-warning .ou-status-dot { background: #f59e0b; }
.ou-tone-danger .ou-status-dot { background: #ef4444; }
.ou-tone-info .ou-status-dot { background: #3b82f6; }
.ou-status-name { color: #fff; font-size: 13px; font-weight: 550; }
.ou-status-detail { color: var(--text-mid); font-size: 11px; }
.ou-status-state { color: var(--text-mid); font-family: 'JetBrains Mono', monospace; font-size: 11px; white-space: nowrap; }

.ou-architecture { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ou-arch-step { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ou-arch-node { min-width: 140px; max-width: 190px; border: 1px solid #292929; border-radius: 14px; padding: 11px; background: rgba(0,0,0,0.22); }
.ou-arch-title { color: #fff; font-size: 13px; font-weight: 600; }
.ou-arch-detail { color: var(--text-mid); font-size: 11px; margin-top: 3px; }
.ou-arch-arrow { color: #555; font-size: 18px; }

.ou-log { border: 1px solid #262626; border-radius: 14px; overflow: hidden; background: #080808; }
.ou-log-title { padding: 8px 11px; color: #fff; border-bottom: 1px solid #222; font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.ou-log pre { margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #bdbdbd; max-height: 260px; }

.ou-action-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ou-button { cursor: pointer; transition: transform .15s ease, opacity .15s ease, border-color .15s ease; }
.ou-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #555; }
.ou-button:disabled { opacity: .45; cursor: default; }

@media (max-width: 600px) {
  .ou-chart-row { grid-template-columns: 68px minmax(70px, 1fr) 36px; }
  .ou-architecture { flex-direction: column; }
  .ou-arch-step { flex-direction: column; align-items: stretch; }
  .ou-arch-arrow { transform: rotate(90deg); align-self: center; }
  .ou-arch-node { max-width: none; }
}

.ou-component-request {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,.08), transparent 34%),
    rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ou-component-request-kicker {
  color: #93c5fd;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ou-component-request-title {
  color: #fff;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.ou-component-request-purpose {
  color: #d4d4d4;
  font-size: 13px;
}

.ou-component-request-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ou-component-request-grid > div {
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 10px;
  background: rgba(0,0,0,.22);
}

.ou-component-request-grid span {
  display: block;
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ou-component-request-grid p {
  color: #d4d4d4;
  font-size: 12px;
  line-height: 1.45;
}

.ou-component-request-example {
  margin: 0 !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  color: #bdbdbd !important;
}

@media (max-width: 600px) {
  .ou-component-request-grid { grid-template-columns: 1fr; }
}
/* === OPENUI / LIVECONTROLPANEL === */
.ou-live-panel {
  display: flex;
  flex-direction: column;
  gap: 13px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.075), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(0,0,0,.28);
}

.ou-live-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ou-live-panel-kicker,
.ou-live-panel-refresh,
.ou-live-section-title,
.ou-live-metric-label,
.ou-live-port-state {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ou-live-panel-kicker {
  color: #93c5fd;
  font-size: 10px;
  margin-bottom: 3px;
}

.ou-live-panel-title {
  color: #fff;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.ou-live-panel-refresh {
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--text-mid);
  background: rgba(0,0,0,.32);
  font-size: 10px;
  white-space: nowrap;
}

.ou-live-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 9px;
}

.ou-live-metric,
.ou-live-service,
.ou-live-port,
.ou-live-log {
  border: 1px solid #262626;
  background: rgba(0,0,0,.24);
}

.ou-live-metric {
  border-radius: 14px;
  padding: 11px;
}

.ou-live-metric-label {
  color: var(--text-mid);
  font-size: 10px;
}

.ou-live-metric-value {
  margin-top: 3px;
  color: #fff;
  font-size: 23px;
  font-weight: 680;
  letter-spacing: -.035em;
}

.ou-live-metric-value span {
  margin-left: 3px;
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 500;
}

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

.ou-live-section-title {
  color: var(--text-mid);
  font-size: 10px;
}

.ou-live-services,
.ou-live-logs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ou-live-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 13px;
  padding: 10px;
}

.ou-live-service-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.ou-live-service-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.ou-live-service-meta,
.ou-live-port-detail {
  color: var(--text-mid);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.ou-live-inline-actions,
.ou-live-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.ou-live-control {
  height: 26px;
  border: 1px solid #303030;
  border-radius: 8px;
  padding: 0 9px;
  background: #151515;
  color: #d4d4d4;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.ou-live-control:hover { border-color: #555; }
.ou-live-control-danger { color: #fca5a5; border-color: rgba(239,68,68,.36); background: rgba(239,68,68,.08); }

.ou-live-port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 8px;
}

.ou-live-port {
  border-radius: 13px;
  padding: 10px;
}

.ou-live-port-number {
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
}

.ou-live-port-state {
  margin-top: 6px;
  color: var(--text-mid);
  font-size: 10px;
}

.ou-live-log {
  border-radius: 13px;
  overflow: hidden;
}

.ou-live-log summary {
  cursor: pointer;
  padding: 9px 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border-bottom: 1px solid transparent;
}

.ou-live-log[open] summary { border-bottom-color: #222; }
.ou-live-log pre { margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; max-height: 220px; color: #bdbdbd; }
.ou-live-actions { padding-top: 2px; }

.ou-tone-success.ou-live-metric,
.ou-tone-success.ou-live-service,
.ou-tone-success.ou-live-port,
.ou-tone-success.ou-live-log { border-color: rgba(34,197,94,.24); }
.ou-tone-warning.ou-live-metric,
.ou-tone-warning.ou-live-service,
.ou-tone-warning.ou-live-port,
.ou-tone-warning.ou-live-log { border-color: rgba(245,158,11,.30); }
.ou-tone-danger.ou-live-metric,
.ou-tone-danger.ou-live-service,
.ou-tone-danger.ou-live-port,
.ou-tone-danger.ou-live-log { border-color: rgba(239,68,68,.30); }
.ou-tone-info.ou-live-metric,
.ou-tone-info.ou-live-service,
.ou-tone-info.ou-live-port,
.ou-tone-info.ou-live-log { border-color: rgba(59,130,246,.28); }

@media (max-width: 600px) {
  .ou-live-panel-head,
  .ou-live-service { align-items: stretch; flex-direction: column; }
  .ou-live-panel-refresh { align-self: flex-start; }
}
/* === OPENUI / KANBANBOARD === */
.ou-kanban {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.07), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(0,0,0,.28);
  overflow-x: auto;
}

.ou-kanban-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: max-content;
}

.ou-kanban-kicker,
.ou-kanban-meta,
.ou-kanban-lane-head em,
.ou-kanban-owner,
.ou-kanban-priority,
.ou-kanban-labels span,
.ou-kanban-action {
  font-family: 'JetBrains Mono', monospace;
}

.ou-kanban-kicker {
  color: #93c5fd;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.ou-kanban-title {
  color: #fff;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.ou-kanban-meta {
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--text-mid);
  background: rgba(0,0,0,.32);
  font-size: 10px;
  white-space: nowrap;
}

.ou-kanban-lane-heads,
.ou-kanban-columns {
  display: grid;
  gap: 9px;
  min-width: max-content;
}

.ou-kanban-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 180px;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,.035);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.ou-kanban-lane-head em {
  color: var(--text-mid);
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
}

.ou-kanban-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: max-content;
}

.ou-kanban-swimlane {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  align-items: stretch;
}

.ou-kanban-swimlane-label {
  position: sticky;
  left: 0;
  z-index: 1;
  border: 1px solid #262626;
  border-radius: 13px;
  padding: 10px;
  background: rgba(8,8,8,.96);
  min-height: 100px;
}

.ou-kanban-swimlane-label strong {
  display: block;
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
}

.ou-kanban-swimlane-label span {
  display: block;
  color: var(--text-mid);
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.35;
}

.ou-kanban-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  min-height: 100px;
  border: 1px dashed #292929;
  border-radius: 13px;
  padding: 8px;
  background: rgba(0,0,0,.18);
}

.ou-kanban-column:empty::after {
  content: 'drop card';
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px;
}

.ou-kanban-card {
  border: 1px solid #2a2a2a;
  border-radius: 13px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    rgba(8,8,8,.86);
  cursor: grab;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}

.ou-kanban-card:active { cursor: grabbing; }
.ou-kanban-card:hover { border-color: #444; transform: translateY(-1px); transition: transform .15s ease, border-color .15s ease; }

.ou-kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.ou-kanban-priority {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #333;
  color: #d4d4d4;
  background: #151515;
  font-size: 10px;
  font-weight: 700;
}

.ou-priority-P0 { color: #fca5a5; border-color: rgba(239,68,68,.38); background: rgba(239,68,68,.08); }
.ou-priority-P1 { color: #fcd34d; border-color: rgba(245,158,11,.38); background: rgba(245,158,11,.08); }
.ou-priority-P2 { color: #93c5fd; border-color: rgba(59,130,246,.38); background: rgba(59,130,246,.08); }
.ou-priority-P3 { color: #d4d4d4; border-color: #333; background: #151515; }

.ou-kanban-owner {
  color: var(--text-mid);
  font-size: 10px;
}

.ou-kanban-card-title {
  color: #fff;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.3;
}

.ou-kanban-card-detail {
  margin-top: 4px;
  color: var(--text-mid);
  font-size: 11px;
  line-height: 1.38;
}

.ou-kanban-labels,
.ou-kanban-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.ou-kanban-labels span {
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  padding: 2px 6px;
  color: #bdbdbd;
  background: rgba(255,255,255,.035);
  font-size: 10px;
}

.ou-kanban-action {
  height: 25px;
  border: 1px solid #303030;
  border-radius: 8px;
  padding: 0 8px;
  background: #151515;
  color: #d4d4d4;
  cursor: pointer;
  font-size: 10px;
}

.ou-kanban-action:hover:not(:disabled) { border-color: #555; }
.ou-kanban-action:disabled { opacity: .45; cursor: default; }
.ou-kanban-action-primary { background: #fff; color: #050505; border-color: #fff; }
.ou-kanban-action-danger { color: #fca5a5; border-color: rgba(239,68,68,.38); background: rgba(239,68,68,.08); }

.ou-tone-success.ou-kanban-lane-head,
.ou-tone-success.ou-kanban-card { border-color: rgba(34,197,94,.24); }
.ou-tone-warning.ou-kanban-lane-head,
.ou-tone-warning.ou-kanban-card { border-color: rgba(245,158,11,.30); }
.ou-tone-danger.ou-kanban-lane-head,
.ou-tone-danger.ou-kanban-card { border-color: rgba(239,68,68,.30); }
.ou-tone-info.ou-kanban-lane-head,
.ou-tone-info.ou-kanban-card { border-color: rgba(59,130,246,.28); }

.ou-kanban-compact .ou-kanban-card-detail,
.ou-kanban-compact .ou-kanban-labels { display: none; }

@media (max-width: 600px) {
  .ou-kanban-swimlane { grid-template-columns: 1fr; }
  .ou-kanban-swimlane-label { position: static; min-height: auto; }
}



.visual-build-status {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,.075), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.visual-build-orb {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: radial-gradient(circle at 35% 25%, #fff, #777 34%, #171717 72%);
  box-shadow: 0 0 28px rgba(255,255,255,.14);
  animation: visual-build-breathe 2.4s ease-in-out infinite;
}

@keyframes visual-build-breathe {
  0%, 100% { transform: scale(.96); opacity: .74; }
  50% { transform: scale(1.04); opacity: 1; }
}

.visual-build-kicker {
  color: #93c5fd;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.visual-build-title {
  color: #fff;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.visual-build-copy {
  max-width: 560px;
  margin-top: 5px;
  color: var(--text-mid);
  font-size: 12.5px;
  line-height: 1.55;
}

.visual-build-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.visual-build-steps span {
  border: 1px solid #292929;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.visual-build-steps span.active {
  color: #fff;
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.07);
}
/* === OPENUI / SERVICECONSTELLATION3D === */
.ou-constellation {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.08), transparent 34%),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.055), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(0,0,0,.30);
  transform-style: preserve-3d;
}

.ou-constellation-head,
.ou-constellation-filters,
.ou-constellation-legend,
.ou-constellation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ou-constellation-kicker,
.ou-constellation-meta,
.ou-constellation-filter,
.ou-constellation-node em,
.ou-constellation-core em,
.ou-constellation-agent em,
.ou-constellation-legend,
.ou-constellation-action {
  font-family: 'JetBrains Mono', monospace;
}

.ou-constellation-kicker {
  color: #93c5fd;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.ou-constellation-title {
  color: #fff;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.ou-constellation-meta,
.ou-constellation-filter {
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--text-mid);
  background: rgba(0,0,0,.34);
  font-size: 10px;
  white-space: nowrap;
}

.ou-constellation-filter {
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.ou-constellation-filter.is-active {
  color: #050505;
  border-color: #fff;
  background: #fff;
}

.ou-constellation-stage {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #262626;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.09), transparent 13%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.035), transparent 46%),
    #050505;
  perspective: 900px;
  transform-style: preserve-3d;
  isolation: isolate;
}

.ou-constellation-3d .ou-constellation-stage,
.ou-constellation-2\.5d .ou-constellation-stage {
  transform: rotateX(8deg);
}

.ou-constellation-grid {
  position: absolute;
  inset: -30%;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: rotate(12deg) scale(1.2);
  opacity: .45;
}

.ou-constellation-auto .ou-constellation-grid {
  animation: ou-constellation-drift 18s linear infinite;
}

.ou-constellation-orbits span {
  position: absolute;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(62deg);
  box-shadow: 0 0 18px rgba(255,255,255,.03);
}

.ou-constellation-trails {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 30;
}

.ou-constellation-trail {
  stroke: rgba(147,197,253,.76);
  stroke-width: .42;
  stroke-linecap: round;
  stroke-dasharray: 4 5;
  filter: drop-shadow(0 0 5px rgba(147,197,253,.7));
  animation: ou-constellation-trail 1.6s linear infinite;
}

.ou-constellation-trail.ou-tone-success { stroke: rgba(134,239,172,.78); filter: drop-shadow(0 0 5px rgba(134,239,172,.65)); }
.ou-constellation-trail.ou-tone-warning { stroke: rgba(252,211,77,.80); filter: drop-shadow(0 0 5px rgba(252,211,77,.55)); }
.ou-constellation-trail.ou-tone-danger { stroke: rgba(252,165,165,.86); filter: drop-shadow(0 0 6px rgba(239,68,68,.78)); }

.ou-constellation-core,
.ou-constellation-node,
.ou-constellation-agent,
.ou-constellation-cron {
  position: absolute;
  border: 0;
  transform: translate(-50%, -50%);
  cursor: pointer;
  color: #fff;
  font: inherit;
}

.ou-constellation-core {
  z-index: 60;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0%, rgba(255,255,255,.76) 10%, rgba(255,255,255,.20) 40%, rgba(255,255,255,.035) 68%, transparent 72%);
  box-shadow: 0 0 28px rgba(255,255,255,.48), 0 0 90px rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  text-align: center;
  animation: ou-constellation-core 3.2s ease-in-out infinite;
}

.ou-constellation-core span {
  color: #050505;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: -.03em;
}

.ou-constellation-core em {
  display: block;
  color: rgba(0,0,0,.62);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ou-constellation-node {
  min-width: 92px;
  max-width: 128px;
  border: 1px solid #343434;
  border-radius: 999px;
  padding: 9px 10px;
  background: rgba(12,12,12,.90);
  box-shadow: 0 10px 28px rgba(0,0,0,.38), 0 0 18px rgba(255,255,255,.06);
  text-align: left;
  backdrop-filter: blur(8px);
}

.ou-constellation-node span {
  display: block;
  color: #fff;
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ou-constellation-node em {
  display: block;
  margin-top: 2px;
  color: var(--text-mid);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ou-constellation-node:hover,
.ou-constellation-agent:hover,
.ou-constellation-cron:hover {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 28px rgba(255,255,255,.16);
}

.ou-constellation-agent {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: transparent;
  padding: 0;
}

.ou-constellation-agent span {
  display: block;
  width: 13px;
  height: 13px;
  margin: 6px auto 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 16px rgba(255,255,255,.7);
  animation: ou-constellation-agent 2s ease-in-out infinite;
}

.ou-constellation-agent em {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  color: var(--text-mid);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.ou-constellation-cron {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.34);
  z-index: 45;
  animation: ou-constellation-pulse 5s ease-out infinite;
}

.ou-constellation-cron span {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #fff;
}

.ou-constellation-distortion {
  position: absolute;
  z-index: 20;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(239,68,68,.35), rgba(239,68,68,.10) 38%, transparent 68%);
  box-shadow: inset 0 0 38px rgba(239,68,68,.36), 0 0 46px rgba(239,68,68,.22);
  filter: blur(.2px) saturate(1.3);
  animation: ou-constellation-distort 2.7s ease-in-out infinite;
  pointer-events: none;
}

.ou-constellation-legend {
  justify-content: flex-start;
  color: var(--text-mid);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.ou-constellation-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ou-constellation-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #fff;
  display: inline-block;
}

.ou-constellation-legend .legend-core { box-shadow: 0 0 12px rgba(255,255,255,.8); }
.ou-constellation-legend .legend-service { background: #d4d4d4; }
.ou-constellation-legend .legend-agent { width: 7px; height: 7px; }
.ou-constellation-legend .legend-trail { width: 18px; height: 2px; border-radius: 2px; background: #93c5fd; }
.ou-constellation-legend .legend-failure { background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,.8); }

.ou-constellation-actions { justify-content: flex-start; }

.ou-tone-success.ou-constellation-node { border-color: rgba(34,197,94,.30); }
.ou-tone-warning.ou-constellation-node { border-color: rgba(245,158,11,.36); }
.ou-tone-danger.ou-constellation-node { border-color: rgba(239,68,68,.40); }
.ou-tone-info.ou-constellation-node { border-color: rgba(59,130,246,.34); }

@keyframes ou-constellation-drift {
  from { transform: rotate(12deg) scale(1.2) translate3d(0,0,0); }
  to { transform: rotate(372deg) scale(1.2) translate3d(0,0,0); }
}

@keyframes ou-constellation-trail {
  to { stroke-dashoffset: -18; }
}

@keyframes ou-constellation-core {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.045); }
}

@keyframes ou-constellation-agent {
  0%, 100% { transform: scale(.85); opacity: .72; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes ou-constellation-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); opacity: 1; }
  75%, 100% { box-shadow: 0 0 0 22px rgba(255,255,255,0); opacity: .62; }
}

@keyframes ou-constellation-distort {
  0%, 100% { transform: translate(-50%, -50%) scale(.96) rotate(0deg); }
  50% { transform: translate(-50%, -50%) scale(1.08) rotate(8deg); }
}

@media (max-width: 700px) {
  .ou-constellation-stage { min-height: 340px; }
  .ou-constellation-core { width: 86px; height: 86px; }
  .ou-constellation-node { min-width: 76px; max-width: 96px; padding: 7px 8px; }
  .ou-constellation-node span { font-size: 11px; }
}



/* === HERMESOS SURFACE RUNTIME V0 === */
.os-canvas {
  position: relative;
  flex: 1;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 92vw 92vw at 54% 118%, rgba(58,58,58,0.56), transparent 58%),
    radial-gradient(ellipse 58vw 58vw at 54% 82%, rgba(24,24,24,0.62), transparent 60%),
    #0a0a0a;
}

.os-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.12));
}

.surface-canvas-layer {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
  height: 100%;
}

.surface-canvas-empty-layer {
  display: grid;
  place-items: stretch;
  padding: 58px 18px 120px;
}

.surface-empty {
  min-height: calc(100vh - 190px);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 10%, rgba(255,255,255,0.07), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  color: var(--text-mid);
}

.surface-empty-title {
  color: #fff;
  font-size: 28px;
  letter-spacing: -0.05em;
  font-weight: 650;
}

.surface-empty-copy {
  margin-top: 8px;
  max-width: 520px;
  color: var(--text-dim);
}

.surface-window {
  position: absolute;
  width: min(639px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  min-width: 360px;
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 0;
  background: transparent;
  box-shadow: 0 28px 90px rgba(0,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 0;
  animation: surface-rise var(--motion-slow) var(--motion-ease-soft) both;
  transition: border-color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.surface-window::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255,255,255,0.045), transparent 54%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(8,8,8,0.34);
  backdrop-filter: blur(18px) saturate(1.14) brightness(0.76);
  -webkit-backdrop-filter: blur(18px) saturate(1.14) brightness(0.76);
  opacity: 1;
}

.surface-window::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: conic-gradient(from var(--surface-border-angle, 0deg), rgba(34,197,94,0.08), rgba(134,239,172,0.95), rgba(21,128,61,0.28), rgba(34,197,94,0.08) 34%, rgba(34,197,94,0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
}

.surface-window.selected {
  border-color: rgba(255,255,255,0.20);
  box-shadow: 0 34px 110px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.035), inset 0 1px 0 rgba(255,255,255,0.075);
}

.surface-window.selected::before {
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255,255,255,0.055), transparent 54%),
    linear-gradient(180deg, rgba(255,255,255,0.044), rgba(255,255,255,0.014)),
    rgba(8,8,8,0.38);
}

.surface-window.behind {
  opacity: 0.82;
}

.surface-window.behind:hover {
  opacity: 0.94;
  border-color: rgba(255,255,255,0.16);
}

.surface-window-dragging,
.surface-window-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.surface-window-resizing,
.surface-window-resizing * {
  user-select: none !important;
}

.surface-window-resizing .surface-window {
  transition: border-color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease) !important;
}

.surface-window-ready {
  border-color: rgba(255,255,255,0.14);
}

.surface-window-composing::after,
.surface-window-evolving::after {
  opacity: 1;
  animation: surface-border-orbit 3.2s linear infinite;
}

.surface-window-composing,
.surface-window-evolving {
  border-color: rgba(34,197,94,0.28);
  box-shadow: 0 28px 90px rgba(0,0,0,0.40), 0 0 38px rgba(34,197,94,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}

@property --surface-border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes surface-border-orbit {
  to { --surface-border-angle: 360deg; }
}

@keyframes surface-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes surface-content-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: none; }
}

.surface-window-head {
  position: relative;
  z-index: 2;
  height: 24px;
  flex: 0 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0 12px;
  cursor: grab;
  touch-action: none;
}

.surface-window-title-row {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.surface-window-title-group {
  min-width: 0;
}

.surface-window-kicker {
  display: none;
}

.surface-window-title {
  color: #a3a3a3;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-window-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a8a8a8;
  font-size: 14px;
  line-height: 1;
}

.surface-window-status em {
  font-style: normal;
}


/* === HERMESOS SURFACE REFINEMENT — shared window/chat polish === */
:root {
  interpolate-size: allow-keywords;
}

.shared-surface-control,
.surface-window-control,
.floating-chat-close {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a3a3a3;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: color var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.shared-surface-control:hover,
.surface-window-control:hover,
.floating-chat-close:hover {
  color: #f5f5f5;
  background: rgba(255,255,255,0.075);
  transform: translateY(-1px);
}

.surface-window {
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition:
    width 220ms var(--motion-ease-soft),
    height 220ms var(--motion-ease-soft),
    min-height 220ms var(--motion-ease-soft),
    max-height 220ms var(--motion-ease-soft),
    border-color var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    opacity var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease);
}

.surface-window-resizing .surface-window,
.surface-window-resizing .surface-window * {
  transition: none !important;
}

.surface-window-composing,
.surface-window-evolving,
.surface-window-failed {
  min-height: 280px;
}

.surface-window-head {
  height: 24px;
  margin: 0;
  padding: 0 12px;
  flex: 0 0 24px;
}

.surface-window-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  height: var(--surface-body-height, auto);
  max-height: none;
  overflow: auto;
  border-radius: 0;
}

.surface-window-body-ready .ou-card,
.surface-output {
  border-radius: 0;
}

.surface-resize-handle {
  position: absolute;
  z-index: 5;
  opacity: 0;
  transition: opacity var(--motion-fast) var(--motion-ease);
  touch-action: none;
}

.surface-resize-handle::before {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.025), 0 0 10px rgba(255,255,255,0.035);
  transition: background var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.surface-resize-handle:hover,
.surface-resize-handle:active {
  opacity: 1;
}

.surface-resize-e,
.surface-resize-w {
  top: 34px;
  bottom: 4px;
  width: 10px;
  cursor: ew-resize;
}

.surface-resize-e { right: 2px; }
.surface-resize-w { left: 2px; }

.surface-resize-e::before,
.surface-resize-w::before {
  top: 10px;
  bottom: 10px;
  width: 2px;
}

.surface-resize-e::before { right: 1px; }
.surface-resize-w::before { left: 1px; }

.surface-resize-n,
.surface-resize-s {
  left: 4px;
  right: 4px;
  height: 10px;
  cursor: ns-resize;
}

.surface-resize-n { top: 2px; }
.surface-resize-s { bottom: 2px; }

.surface-resize-n::before,
.surface-resize-s::before {
  left: 10px;
  right: 10px;
  height: 2px;
}

.surface-resize-n::before { top: 1px; }
.surface-resize-s::before { bottom: 1px; }

.surface-resize-ne,
.surface-resize-se,
.surface-resize-sw,
.surface-resize-nw {
  width: 18px;
  height: 18px;
}

.surface-resize-ne { top: 2px; right: 2px; cursor: nesw-resize; }
.surface-resize-se { right: 2px; bottom: 2px; cursor: nwse-resize; }
.surface-resize-sw { left: 2px; bottom: 2px; cursor: nesw-resize; }
.surface-resize-nw { left: 2px; top: 2px; cursor: nwse-resize; }

.surface-resize-ne::before,
.surface-resize-se::before,
.surface-resize-sw::before,
.surface-resize-nw::before {
  inset: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.11);
}

.surface-resize-handle:hover::before {
  background: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.045), 0 0 13px rgba(255,255,255,0.07);
}

.surface-window-status-failed span {
  background: #ef4444;
  box-shadow: 0 0 14px rgba(239,68,68,0.34);
  animation: none;
}

.surface-window-status-composing span,
.surface-window-status-evolving span {
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34,197,94,0.34);
  animation: surface-status-pulse 2.4s ease-in-out infinite;
}

.surface-output-loading {
  min-height: 488px;
  padding: 34px 32px 28px;
}

.surface-output-failed {
  min-height: 240px;
  padding: 28px;
}

.surface-skeleton {
  min-height: 420px;
  gap: 14px;
}

.sk-a { width: 76%; height: 24px; }
.sk-b { width: 54%; height: 24px; }
.sk-c { width: 70%; height: 24px; margin-top: 18px; }
.sk-d { width: 48%; height: 24px; }

.sk-grid {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 32%);
  gap: 22px;
  margin-top: 22px;
}

.sk-main-card,
.sk-side-card {
  border-radius: 10px;
  min-height: 276px;
}

.floating-chat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.985);
  transform-origin: 50% 100%;
  transition:
    opacity 360ms var(--motion-ease-soft),
    transform 480ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 360ms;
}

.floating-chat.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.floating-chat.closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.floating-chat-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-window);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(10,10,10,0.74);
  box-shadow: 0 28px 90px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  padding: 8px;
}

.floating-chat-head {
  min-height: 24px;
  padding: 0 7px 8px;
  border-bottom: 0;
  background: transparent;
}

.floating-chat-title-row {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.floating-chat-title {
  margin: 0;
  color: #e8e8e8;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.floating-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8a8a8a;
  font-size: 11px;
  line-height: 1;
}

.floating-chat-status em {
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.floating-chat-status .status-dot {
  width: 7px;
  height: 7px;
  margin: 0;
  vertical-align: 0;
}

.floating-chat-icon svg {
  display: block;
}

.floating-chat-body {
  border-radius: var(--radius-window-inner);
  background: rgba(17,17,17,0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
  max-height: min(520px, calc(100vh - 246px));
  overflow-y: auto;
  padding: 14px;
  overscroll-behavior: contain;
}

.floating-chat-body:not(:has(.message:nth-of-type(7))) {
  background: transparent;
  box-shadow: none;
  padding: 6px 4px 4px;
}

.floating-chat-action,
.floating-chat-kicker,
.floating-chat-title-group {
  display: none;
}

.input-chat-shell.expanded .input-container,
.input-chat-shell.chat-open .input-container,
.input-chat-shell:focus-within .input-container {
  border-radius: 999px;
}

.send-btn {
  border-radius: 999px;
}

@media (max-width: 980px) {
  .surface-window-composing,
  .surface-window-evolving,
  .surface-window-failed,
  .surface-window {
    width: calc(100vw - 24px);
  }
  .floating-chat-card { border-radius: var(--radius-window); }
}

/* === HERMESOS DARK SURFACE REFINEMENT — old-version depth, not white glass === */
:root {
  --glass-outer: rgba(17,17,17,0.86);
  --glass-outer-hover: rgba(20,20,20,0.92);
  --glass-inner: rgba(13,13,13,0.92);
  --glass-border: rgba(255,255,255,0.075);
  --glass-border-strong: rgba(255,255,255,0.14);
  --glass-highlight: rgba(255,255,255,0.028);
  --glass-shadow: 0 30px 96px rgba(0,0,0,0.58), inset 0 1px 0 rgba(255,255,255,0.035), inset 0 -1px 0 rgba(255,255,255,0.022);
}

.surface-window,
.floating-chat-card {
  border-color: rgba(255,255,255,0.075);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.010)),
    rgba(10,10,10,0.88);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(1.02);
  -webkit-backdrop-filter: blur(18px) saturate(1.02);
}

.surface-window::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.026), transparent 18%);
  opacity: 0.72;
}

.surface-window.selected {
  border-color: rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.012)),
    rgba(10,10,10,0.91);
  box-shadow: 0 34px 110px rgba(0,0,0,0.62), 0 0 0 1px rgba(255,255,255,0.018), inset 0 1px 0 rgba(255,255,255,0.042);
}

.surface-window.behind:hover {
  border-color: rgba(255,255,255,0.12);
}

.surface-window-body,
.surface-output,
.floating-chat-body {
  background: rgba(13,13,13,0.88);
  border: 1px solid rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.024);
}

.surface-window-body-ready .ou-card,
.ou-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.020), rgba(255,255,255,0.006)),
    rgba(14,14,14,0.94);
  border-color: rgba(255,255,255,0.060);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.024), 0 14px 42px rgba(0,0,0,0.24);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.surface-window-body-ready .ou-card {
  border-radius: 0;
}

.ou-metric,
.ou-table-wrap,
.ou-chart,
.ou-log,
.ou-status-item,
.ou-component-request,
.ou-live-control-panel,
.ou-kanban-card,
.ou-kanban-board,
.ou-action-list .ou-button,
.ou-button {
  background: rgba(18,18,18,0.86);
  border-color: rgba(255,255,255,0.070);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.020);
}

.ou-metric:hover,
.ou-button:hover:not(:disabled),
.ou-status-item:hover,
.ou-kanban-card:hover {
  background: rgba(24,24,24,0.90);
  border-color: rgba(255,255,255,0.12);
}

.ou-table th {
  background: rgba(255,255,255,0.025);
}

.ou-progress-track,
.ou-chart-track {
  background: rgba(10,10,10,0.72);
  border-color: rgba(255,255,255,0.055);
}

.surface-output-loading,
.surface-output-failed {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.006)),
    rgba(13,13,13,0.90);
}

.sk-line,
.sk-main-card,
.sk-side-card {
  background: linear-gradient(90deg, rgba(255,255,255,0.040), rgba(255,255,255,0.070), rgba(255,255,255,0.040));
  border-color: rgba(255,255,255,0.045);
}

.input-chat-shell.expanded .input-container,
.input-chat-shell.chat-open .input-container,
.input-chat-shell:focus-within .input-container {
  background: rgba(13,13,13,0.94);
  border-color: rgba(255,255,255,0.085);
  box-shadow: 0 20px 72px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.026);
}

.input-container:focus-within,
.input-chat-shell:hover .input-container {
  background: rgba(15,15,15,0.97);
  border-color: rgba(255,255,255,0.13);
}

.floating-chat-body:not(:has(.message:nth-of-type(7))) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.input-state {
  isolation: isolate;
  overflow: hidden;
  background: #2a2a2a;
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 14px 48px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.08);
}

.input-state:hover,
.input-state.open {
  background: #343434;
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 18px 58px rgba(0,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.10);
}

.input-state::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--orb-border-angle, 0deg), transparent 0 58%, rgba(255,255,255,0.38), transparent 76% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.30;
  pointer-events: none;
}

.input-state.active {
  background: #12381f;
  border-color: rgba(34,197,94,0.28);
  box-shadow: 0 18px 58px rgba(34,197,94,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
  animation: none;
}

.input-state.active::before {
  background: conic-gradient(from var(--orb-border-angle, 0deg), transparent 0 52%, rgba(134,239,172,0.96), rgba(34,197,94,0.48), transparent 76% 100%);
  opacity: 1;
  animation: orb-border-spin 2.6s linear infinite;
}

.input-state.wake-listening:not(.active):not(.error) {
  background: #242424;
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 18px 58px rgba(255,255,255,0.055), inset 0 1px 0 rgba(255,255,255,0.11);
}

.input-state.wake-listening:not(.active):not(.error)::before {
  background: conic-gradient(from var(--orb-border-angle, 0deg), transparent 0 62%, rgba(255,255,255,0.62), rgba(255,255,255,0.18), transparent 82% 100%);
  opacity: 0.78;
  animation: orb-border-spin 4.8s linear infinite;
}

.input-chat-shell.wake-wake_listening:not(.expanded):not(.chat-open)::after {
  opacity: 0.48;
}

.input-state.error {
  background: #3a1515;
  border-color: rgba(239,68,68,0.34);
  box-shadow: 0 18px 58px rgba(239,68,68,0.18), inset 0 1px 0 rgba(255,255,255,0.10);
}

.input-state.error::before {
  background: conic-gradient(from var(--orb-border-angle, 0deg), transparent 0 52%, rgba(252,165,165,0.94), rgba(239,68,68,0.48), transparent 76% 100%);
  opacity: 1;
}

.input-state-pulse {
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.32), rgba(255,255,255,0.055) 32%, transparent 64%);
  opacity: 0.58;
  position: relative;
  z-index: 1;
}

@property --orb-border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes orb-border-spin {
  to { --orb-border-angle: 360deg; }
}

.floating-chat-head {
  height: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 8px;
}

.floating-chat-title-row {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.floating-chat-title {
  height: 24px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.floating-chat-status {
  height: 24px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.shared-surface-control,
.surface-window-control,
.floating-chat-close,
.floating-chat-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.floating-chat-icon svg,
.floating-chat-close svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* === ATLAS CARD SURFACE REFINEMENT — lighter blurred window, borderless inner card === */
:root {
  --atlas-window-bg: rgba(20,20,20,0.78);
  --atlas-window-bg-selected: rgba(23,23,23,0.84);
  --atlas-window-border: rgba(255,255,255,0.085);
  --atlas-card-bg: rgba(9,9,9,0.84);
  --atlas-card-bg-hover: rgba(12,12,12,0.90);
  --atlas-well-bg: rgba(15,15,15,0.76);
  --atlas-well-border: rgba(255,255,255,0.060);
}

.surface-window,
.floating-chat-card {
  border-color: var(--atlas-window-border);
  background:
    radial-gradient(ellipse 86% 72% at 50% 110%, rgba(255,255,255,0.052), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.038), rgba(255,255,255,0.014)),
    var(--atlas-window-bg);
  box-shadow: 0 34px 112px rgba(0,0,0,0.58), inset 0 1px 0 rgba(255,255,255,0.045), inset 0 -1px 0 rgba(255,255,255,0.018);
  backdrop-filter: blur(26px) saturate(1.06);
  -webkit-backdrop-filter: blur(26px) saturate(1.06);
}

.surface-window.selected {
  border-color: rgba(255,255,255,0.13);
  background:
    radial-gradient(ellipse 90% 76% at 50% 110%, rgba(255,255,255,0.058), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.044), rgba(255,255,255,0.016)),
    var(--atlas-window-bg-selected);
  box-shadow: 0 38px 120px rgba(0,0,0,0.62), 0 0 0 1px rgba(255,255,255,0.018), inset 0 1px 0 rgba(255,255,255,0.055);
}

.surface-window-body,
.surface-output {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.surface-window-body-ready .ou-card,
.ou-card {
  background:
    radial-gradient(ellipse 80% 80% at 50% 112%, rgba(255,255,255,0.025), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.004)),
    var(--atlas-card-bg);
  border: 0;
  box-shadow: 0 18px 54px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.020);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.surface-window-body-ready .ou-card:hover,
.ou-card:hover {
  background:
    radial-gradient(ellipse 80% 80% at 50% 112%, rgba(255,255,255,0.030), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.006)),
    var(--atlas-card-bg-hover);
}

.ou-metric,
.ou-table-wrap,
.ou-chart,
.ou-log,
.ou-status-item,
.ou-component-request,
.ou-live-panel,
.ou-live-metric,
.ou-live-service,
.ou-live-port,
.ou-live-log,
.ou-kanban-board,
.ou-kanban-lane,
.ou-kanban-card {
  background: var(--atlas-well-bg);
  border-color: var(--atlas-well-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
}

.ou-metric:hover,
.ou-status-item:hover,
.ou-kanban-card:hover {
  background: rgba(18,18,18,0.84);
  border-color: rgba(255,255,255,0.105);
}

.ou-button,
.ou-kanban-action,
.ou-constellation-filter,
.ou-live-panel-refresh {
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.105);
  color: #f5f5f5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.ou-button:hover:not(:disabled),
.ou-kanban-action:hover:not(:disabled),
.ou-constellation-filter:hover,
.ou-live-panel-refresh:hover {
  background: rgba(255,255,255,0.105);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

.ou-button-primary,
.ou-kanban-action-primary,
.ou-constellation-filter.is-active {
  background: #f4f4f4;
  border-color: #f4f4f4;
  color: #050505;
  box-shadow: 0 8px 24px rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.10);
}

.ou-button-primary:hover:not(:disabled),
.ou-kanban-action-primary:hover:not(:disabled),
.ou-constellation-filter.is-active:hover {
  background: #fff;
  border-color: #fff;
  color: #050505;
}

.ou-button-danger,
.ou-kanban-action-danger {
  color: #fca5a5;
  border-color: rgba(239,68,68,.32);
  background: rgba(239,68,68,.10);
}

.ou-button-danger:hover:not(:disabled),
.ou-kanban-action-danger:hover:not(:disabled) {
  color: #fecaca;
  border-color: rgba(239,68,68,.48);
  background: rgba(239,68,68,.15);
}

/* === SURFACE V2 EXPERIMENT — single window surface, lifted header only on scroll === */
:root {
  --surface-v2-window-bg: rgba(24,24,24,0.58);
  --surface-v2-window-bg-selected: rgba(27,27,27,0.64);
  --surface-v2-window-border: rgba(255,255,255,0.090);
  --surface-v2-content-pad-x: 24px;
  --surface-v2-content-pad-y: 16px;
}

.surface-window {
  padding: 8px;
  border-color: var(--surface-v2-window-border);
  background:
    radial-gradient(ellipse 88% 72% at 50% 112%, rgba(255,255,255,0.060), transparent 64%),
    radial-gradient(ellipse 72% 54% at 18% 0%, rgba(255,255,255,0.030), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.044), rgba(255,255,255,0.014)),
    var(--surface-v2-window-bg);
  box-shadow: 0 36px 124px rgba(0,0,0,0.60), 0 0 0 1px rgba(255,255,255,0.012), inset 0 1px 0 rgba(255,255,255,0.052);
  backdrop-filter: blur(34px) saturate(1.12);
  -webkit-backdrop-filter: blur(34px) saturate(1.12);
}

.surface-window.selected {
  border-color: rgba(255,255,255,0.14);
  background:
    radial-gradient(ellipse 88% 72% at 50% 112%, rgba(255,255,255,0.070), transparent 64%),
    radial-gradient(ellipse 72% 54% at 18% 0%, rgba(255,255,255,0.036), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.016)),
    var(--surface-v2-window-bg-selected);
  box-shadow: 0 40px 132px rgba(0,0,0,0.64), 0 0 0 1px rgba(255,255,255,0.018), inset 0 1px 0 rgba(255,255,255,0.064);
}

.surface-window::before {
  opacity: 0.38;
}

.surface-window-head {
  position: relative;
  z-index: 4;
  height: 32px;
  flex: 0 0 32px;
  margin: 0 0 0;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: translateY(0);
  transition:
    background var(--motion-base) var(--motion-ease-soft),
    border-color var(--motion-base) var(--motion-ease-soft),
    box-shadow var(--motion-base) var(--motion-ease-soft),
    backdrop-filter var(--motion-base) var(--motion-ease-soft),
    transform var(--motion-base) var(--motion-ease-soft);
}

.surface-window-head.is-scrolled {
  border-color: rgba(255,255,255,0.075);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.036), rgba(255,255,255,0.012)),
    rgba(11,11,11,0.66);
  box-shadow: 0 12px 36px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.028);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  transform: translateY(0);
}

.surface-window-scrolled .surface-window-title {
  color: #d8d8d8;
}

.surface-window-body {
  position: relative;
  z-index: 1;
  border-radius: 0;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: auto;
  scrollbar-gutter: stable;
}

.surface-window-body-ready {
  padding: 0;
}

.surface-content-enter {
  min-height: 100%;
}

.surface-window-body-ready .ou-render-shell {
  min-height: 100%;
}

.surface-window-body-ready .ou-card,
.ou-card {
  min-height: 100%;
  padding: var(--surface-v2-content-pad-y) var(--surface-v2-content-pad-x) 24px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.surface-window-body-ready .ou-card:hover,
.ou-card:hover {
  background: transparent !important;
}

.surface-window-body-ready .ou-card > * {
  border-radius: var(--radius-card-inner);
}

.surface-output-loading,
.surface-output-failed {
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.surface-output-loading {
  padding: 30px var(--surface-v2-content-pad-x) 28px;
}

.surface-output-failed {
  padding: 28px var(--surface-v2-content-pad-x);
}

@media (max-width: 640px) {
  :root {
    --surface-v2-content-pad-x: 16px;
  }
}

/* === SURFACE V2 BLUR FIX — material layer owns backdrop-filter === */
.surface-window {
  isolation: isolate;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.surface-window::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(ellipse 88% 72% at 50% 112%, rgba(255,255,255,0.060), transparent 64%),
    radial-gradient(ellipse 72% 54% at 18% 0%, rgba(255,255,255,0.034), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.012)),
    rgba(8,8,8,0.42);
  backdrop-filter: blur(46px) saturate(1.22) brightness(0.82);
  -webkit-backdrop-filter: blur(46px) saturate(1.22) brightness(0.82);
}

.surface-window.selected::before {
  background:
    radial-gradient(ellipse 88% 72% at 50% 112%, rgba(255,255,255,0.072), transparent 64%),
    radial-gradient(ellipse 72% 54% at 18% 0%, rgba(255,255,255,0.040), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.062), rgba(255,255,255,0.016)),
    rgba(8,8,8,0.48);
}

.surface-window::after {
  z-index: 7;
}

.surface-window-head {
  z-index: 5;
}

.surface-window-body {
  z-index: 2;
}

.surface-resize-handle {
  z-index: 8;
}

/* === HERMES ORB RING-ONLY STATUS — transparent surface center, state border === */
.input-state {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 16px 52px rgba(0,0,0,0.36) !important;
  color: #d4d4d4;
}

.input-state::after {
  content: '';
  position: absolute;
  inset: 2px;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 36% 24%, rgba(255,255,255,0.060), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.030), rgba(255,255,255,0.006)),
    rgba(18,18,18,0.34);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.input-state::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: rgba(255,255,255,0.24);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 1;
  animation: none;
}

.input-state:hover::before,
.input-state.open::before {
  background: rgba(255,255,255,0.34);
}

.input-state:hover::after,
.input-state.open::after {
  background:
    radial-gradient(circle at 36% 24%, rgba(255,255,255,0.075), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.040), rgba(255,255,255,0.008)),
    rgba(22,22,22,0.42);
}

.input-state.active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 16px 52px rgba(0,0,0,0.36), 0 0 34px rgba(34,197,94,0.10) !important;
  animation: none;
}

.input-state.active::before {
  background: conic-gradient(from var(--orb-border-angle, 0deg), rgba(34,197,94,0.16), rgba(134,239,172,0.98), rgba(34,197,94,0.34), rgba(34,197,94,0.16) 34%, rgba(34,197,94,0.16));
  opacity: 1;
  animation: orb-border-spin 2.8s linear infinite;
}

.input-state.active::after {
  background:
    radial-gradient(circle at 36% 24%, rgba(134,239,172,0.070), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.034), rgba(255,255,255,0.007)),
    rgba(17,24,20,0.34);
}

.input-state.error {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 16px 52px rgba(0,0,0,0.36), 0 0 34px rgba(239,68,68,0.10) !important;
}

.input-state.error::before {
  background: conic-gradient(from var(--orb-border-angle, 0deg), rgba(239,68,68,0.20), rgba(252,165,165,0.96), rgba(239,68,68,0.42), rgba(239,68,68,0.20) 34%, rgba(239,68,68,0.20));
  opacity: 1;
}

.input-state.error::after {
  background:
    radial-gradient(circle at 36% 24%, rgba(252,165,165,0.070), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.034), rgba(255,255,255,0.007)),
    rgba(25,17,17,0.34);
}

.input-state-pulse {
  position: relative;
  z-index: 2;
  background: transparent !important;
  opacity: 0 !important;
}

/* === HERMES BOTTOM ORB GROUND LIGHT — canvas-centered half-dome status glow === */
.os-canvas::after {
  content: '';
  position: fixed;
  left: 50%;
  bottom: -150px;
  width: min(620px, 82vw);
  height: 310px;
  z-index: 0;
  transform: translateX(-50%) scale(0.98);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(18px);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18), rgba(255,255,255,0.060) 34%, rgba(115,115,115,0.075) 52%, transparent 72%);
  transition:
    opacity var(--motion-base) var(--motion-ease-soft),
    background var(--motion-base) var(--motion-ease-soft),
    transform var(--motion-base) var(--motion-ease-soft),
    filter var(--motion-base) var(--motion-ease-soft);
}

.workspace:has(.input-chat-shell.collapsed.status-idle:not(.chat-open):not(:focus-within)) .os-canvas::after {
  opacity: 0.46;
}

.workspace:has(.input-chat-shell.collapsed.status-active:not(.chat-open):not(:focus-within)) .os-canvas::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(134,239,172,0.42), rgba(34,197,94,0.20) 34%, rgba(21,128,61,0.12) 54%, transparent 74%);
  opacity: 0.62;
  animation: hermes-browser-bottom-pulse 2.7s ease-in-out infinite;
}

.workspace:has(.input-chat-shell.collapsed.status-error:not(.chat-open):not(:focus-within)) .os-canvas::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(252,165,165,0.36), rgba(239,68,68,0.16) 34%, rgba(127,29,29,0.10) 54%, transparent 74%);
  opacity: 0.56;
  animation: hermes-browser-bottom-pulse 3.1s ease-in-out infinite;
}

.input-chat-shell::before {
  content: none !important;
  display: none !important;
}

.input-chat-shell > * {
  position: relative;
  z-index: 2;
}

/* === DICTATION LAUNCHER STATE — click to speak, long-press to open chat === */
.input-state.listening {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 16px 52px rgba(0,0,0,0.36), 0 0 38px rgba(255,255,255,0.16) !important;
  animation: none !important;
}

.input-state.listening::before {
  background: conic-gradient(from var(--orb-border-angle, 0deg), rgba(255,255,255,0.18), rgba(255,255,255,0.98), rgba(255,255,255,0.42), rgba(255,255,255,0.18) 34%, rgba(255,255,255,0.18)) !important;
  opacity: 1;
  animation: orb-border-spin 2.8s linear infinite;
}

.input-state.listening::after {
  background:
    radial-gradient(circle at 36% 24%, rgba(255,255,255,0.115), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.010)),
    rgba(22,22,22,0.38) !important;
}

.input-state.hold-opening {
  transform: translateY(-1px) scale(1.055);
}

.input-state.hold-opening::before {
  background: conic-gradient(from -90deg, rgba(255,255,255,0.96) 0deg, rgba(255,255,255,0.96) 0deg, rgba(255,255,255,0.20) 0deg, rgba(255,255,255,0.20) 360deg);
  animation: orb-hold-progress 520ms linear forwards;
}

.input-chat-shell.hold-opening .input-container {
  filter: drop-shadow(0 0 22px rgba(255,255,255,0.08));
}

.dictation-bubble {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: max-content;
  max-width: min(390px, calc(100vw - 32px));
  min-width: 150px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  background: rgba(18,18,18,0.84);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 18px 62px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.055);
  backdrop-filter: blur(22px) saturate(1.14);
  -webkit-backdrop-filter: blur(22px) saturate(1.14);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  pointer-events: none;
  text-align: center;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: dictation-bubble-in 240ms var(--motion-ease-soft) both;
  z-index: 4;
}

.dictation-bubble.listening {
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 18px 62px rgba(0,0,0,0.34), 0 0 28px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.070);
}

.dictation-bubble.listening::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  box-shadow: 9px 0 0 rgba(255,255,255,0.42), 18px 0 0 rgba(255,255,255,0.22);
  animation: dictation-listening-dots 1.15s ease-in-out infinite;
  vertical-align: 2px;
}

.workspace:has(.input-chat-shell.collapsed.listening:not(.status-active):not(.status-error):not(.chat-open):not(:focus-within)) .os-canvas::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.40), rgba(255,255,255,0.18) 34%, rgba(190,190,190,0.105) 54%, transparent 74%);
  opacity: 0.62;
  animation: hermes-browser-bottom-pulse 2.7s ease-in-out infinite;
}

@keyframes orb-hold-progress {
  0% {
    background: conic-gradient(from -90deg, rgba(255,255,255,0.96) 0deg, rgba(255,255,255,0.96) 0deg, rgba(255,255,255,0.20) 0deg, rgba(255,255,255,0.20) 360deg);
  }
  100% {
    background: conic-gradient(from -90deg, rgba(255,255,255,0.96) 0deg, rgba(255,255,255,0.96) 360deg, rgba(255,255,255,0.20) 360deg, rgba(255,255,255,0.20) 360deg);
  }
}

@keyframes dictation-bubble-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes dictation-listening-dots {
  0%, 100% { opacity: 0.34; transform: translateY(0); }
  45% { opacity: 1; transform: translateY(-1px); }
}

@keyframes hermes-browser-bottom-pulse {
  0%, 100% {
    opacity: 0.48;
    transform: translateX(-50%) scale(0.95);
    filter: blur(20px);
  }
  50% {
    opacity: 0.70;
    transform: translateX(-50%) scale(1.08);
    filter: blur(24px);
  }
}

/* === ADRIAN WINDOW GEOMETRY CORRECTION — rounded blurred window + flush square resize handles === */
.surface-window {
  border-radius: var(--radius-window) !important;
  padding: 0 !important;
  background: rgba(8,8,8,0.38) !important;
  backdrop-filter: blur(36px) saturate(1.2) brightness(0.86) !important;
  -webkit-backdrop-filter: blur(36px) saturate(1.2) brightness(0.86) !important;
  overflow: hidden;
  isolation: isolate !important;
}

.surface-window::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit !important;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(ellipse 92% 82% at 50% 112%, rgba(255,255,255,0.085), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.050), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.070), rgba(255,255,255,0.016)),
    rgba(7,7,7,0.42);
  backdrop-filter: blur(40px) saturate(1.22) brightness(0.86) !important;
  -webkit-backdrop-filter: blur(40px) saturate(1.22) brightness(0.86) !important;
}

.surface-window.selected::before {
  background:
    radial-gradient(ellipse 92% 82% at 50% 112%, rgba(255,255,255,0.098), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.058), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.080), rgba(255,255,255,0.018)),
    rgba(7,7,7,0.48);
}

.surface-window-body {
  border-radius: 0 !important;
}

.surface-window-head {
  margin: 6px 6px 0 !important;
  padding: 0 6px !important;
  width: auto;
  height: 30px !important;
  flex-basis: 30px !important;
  box-sizing: border-box;
}

.surface-resize-handle {
  z-index: 8;
  opacity: 0;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: opacity var(--motion-fast) var(--motion-ease), background var(--motion-fast) var(--motion-ease);
}

.surface-resize-handle::before,
.surface-resize-handle::after {
  content: none !important;
  display: none !important;
}

.surface-resize-handle:hover,
.surface-resize-handle:active {
  opacity: 1;
  background: rgba(255,255,255,0.105) !important;
}

.surface-window:hover .surface-resize-handle,
.surface-window.selected .surface-resize-handle {
  opacity: 0;
}

.surface-window .surface-resize-handle:hover,
.surface-window .surface-resize-handle:active {
  opacity: 1;
}

.surface-resize-e,
.surface-resize-w {
  top: 0 !important;
  bottom: 0 !important;
  width: 7px !important;
}

.surface-resize-e { right: 0 !important; }
.surface-resize-w { left: 0 !important; }

.surface-resize-n,
.surface-resize-s {
  left: 0 !important;
  right: 0 !important;
  height: 7px !important;
}

.surface-resize-n { top: 0 !important; }
.surface-resize-s { bottom: 0 !important; }

.surface-resize-ne,
.surface-resize-se,
.surface-resize-sw,
.surface-resize-nw {
  width: 14px !important;
  height: 14px !important;
}

.surface-resize-ne { top: 0 !important; right: 0 !important; }
.surface-resize-se { right: 0 !important; bottom: 0 !important; }
.surface-resize-sw { left: 0 !important; bottom: 0 !important; }
.surface-resize-nw { left: 0 !important; top: 0 !important; }

/* === VOICE LAUNCHER POSITION FIX — keep bubbles/edge anchored to orb/input === */
.input-chat-shell .floating-chat {
  bottom: calc(100% + 18px) !important;
}

}

.input-chat-shell .dictation-bubble {
  left: 50% !important;
  bottom: 70px !important;
  transform: translateX(-50%) translateY(0) !important;
  border-radius: 18px !important;
  text-align: center !important;
  z-index: 7 !important;
}

.dictation-bubble {
  display: none !important;
}

/* === ORB CONTRACT: click=voice only, long-press=input only === */
.input-area:has(.input-chat-shell.listening)::after {
  bottom: -14px !important;
  width: 76px !important;
  height: 76px !important;
  opacity: 0.62 !important;
}

.input-chat-shell.collapsed.listening,
.input-chat-shell.collapsed.hold-opening {
  width: 58px !important;
}

.input-chat-shell.collapsed.listening .input-container,
.input-chat-shell.collapsed.hold-opening .input-container,
.input-chat-shell.collapsed:focus-within:not(.expanded):not(.chat-open) .input-container {
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.input-chat-shell.collapsed.listening .input-container textarea,
.input-chat-shell.collapsed.listening .send-btn,
.input-chat-shell.collapsed.hold-opening .input-container textarea,
.input-chat-shell.collapsed.hold-opening .send-btn,
.input-chat-shell.collapsed:focus-within:not(.expanded):not(.chat-open) .input-container textarea,
.input-chat-shell.collapsed:focus-within:not(.expanded):not(.chat-open) .send-btn {
  min-width: 0 !important;
  width: 0 !important;
  flex: 0 0 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin-left: 0 !important;
  pointer-events: none !important;
}

.input-chat-shell.collapsed.listening .input-state,
.input-chat-shell.collapsed.hold-opening .input-state,
.input-chat-shell.collapsed:focus-within:not(.expanded):not(.chat-open) .input-state {
  width: 58px !important;
  height: 58px !important;
  flex: 0 0 58px !important;
}

.input-chat-shell .dictation-bubble {
  bottom: 62px !important;
}

.input-chat-shell .dictation-bubble {
  bottom: calc(100% + 12px) !important;
}

.input-chat-shell > .input-container {
  position: relative !important;
}

.input-chat-shell.chat-open > .floating-chat {
  left: 50% !important;
  right: auto !important;
  bottom: 100% !important;
  padding-bottom: 0 !important;
  transform: translateX(-50%) !important;
  transition: bottom 260ms var(--motion-ease-soft), transform 280ms var(--motion-ease-soft), opacity 220ms var(--motion-ease-soft) !important;
}

/* === CHAT HISTORY BOTTOM-GROW REVEAL + SOFTER ORB HOLD === */
.input-chat-shell > .floating-chat {
  left: 50% !important;
  right: auto !important;
  bottom: 100% !important;
  padding-bottom: 0 !important;
  width: min(720px, calc(100vw - 32px)) !important;
  transform-origin: 50% 100% !important;
  will-change: opacity, transform, clip-path, filter !important;
  transition:
    opacity 420ms var(--motion-ease-soft),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 620ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 520ms var(--motion-ease-soft),
    visibility 0s linear 640ms !important;
}

.input-chat-shell > .floating-chat.closed {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(22px) scale(0.92) !important;
  clip-path: inset(74% 9% 0 9% round 28px) !important;
  filter: blur(8px) saturate(0.92) !important;
}

.input-chat-shell.chat-open > .floating-chat.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) scale(1) !important;
  clip-path: inset(0 0 0 0 round var(--radius-window)) !important;
  filter: blur(0) saturate(1) !important;
  transition-delay: 0s !important;
}

.input-chat-shell > .floating-chat .floating-chat-card {
  margin-bottom: 16px !important;
  transform-origin: 50% 100%;
  transition:
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 420ms var(--motion-ease-soft),
    box-shadow 520ms var(--motion-ease-soft);
}

.input-chat-shell > .floating-chat.closed .floating-chat-card {
  transform: translateY(14px) scaleY(0.88);
  opacity: 0.42;
}

.input-chat-shell.chat-open > .floating-chat.open .floating-chat-card {
  transform: translateY(0) scaleY(1);
  opacity: 1;
}

.input-state.hold-opening {
  transform: translateY(-2px) scale(1.085) !important;
  transition:
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 420ms var(--motion-ease),
    background 520ms var(--motion-ease),
    box-shadow 620ms var(--motion-ease),
    flex-basis 560ms cubic-bezier(0.16, 1, 0.3, 1),
    width 560ms cubic-bezier(0.16, 1, 0.3, 1),
    height 560ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.input-chat-shell.hold-opening .input-container {
  transform: scale(1.015);
  transition:
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    width 560ms cubic-bezier(0.16, 1, 0.3, 1),
    padding 560ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 560ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 420ms ease,
    background 420ms ease,
    box-shadow 620ms ease,
    filter 560ms var(--motion-ease-soft) !important;
}

.input-chat-shell:not(.hold-opening) .input-container {
  transform: scale(1);
}

/* === CHAT HISTORY REAL BACKDROP GLASS — do not touch canvas windows === */
.floating-chat-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background: rgba(8,8,8,0.24) !important;
  backdrop-filter: blur(42px) saturate(1.24) brightness(0.92) !important;
  -webkit-backdrop-filter: blur(42px) saturate(1.24) brightness(0.92) !important;
  border-color: rgba(255,255,255,0.13) !important;
  box-shadow: 0 30px 96px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.07) !important;
  transform: translateZ(0);
}

.floating-chat-card::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  opacity: 1 !important;
  background:
    radial-gradient(ellipse 92% 82% at 50% 112%, rgba(255,255,255,0.090), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.056), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.078), rgba(255,255,255,0.018)),
    rgba(7,7,7,0.24) !important;
  backdrop-filter: blur(46px) saturate(1.28) brightness(0.94) !important;
  -webkit-backdrop-filter: blur(46px) saturate(1.28) brightness(0.94) !important;
}

.floating-chat-card > * {
  position: relative;
  z-index: 1;
}

.floating-chat-body,
.floating-chat-body:not(:has(.message:nth-of-type(7))) {
  background: transparent !important;
  border-color: rgba(255,255,255,0.035) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* === SHARED CHAT GLASS MATERIAL — history card and launcher peek use the same blur architecture === */
.floating-chat.open {
  isolation: isolate !important;
  border-radius: var(--radius-window) !important;
  background: rgba(8,8,8,0.10) !important;
  backdrop-filter: blur(64px) saturate(1.38) brightness(1.02) !important;
  -webkit-backdrop-filter: blur(64px) saturate(1.38) brightness(1.02) !important;
}

.floating-chat.open .floating-chat-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  border-radius: var(--radius-window) !important;
  background:
    radial-gradient(ellipse 96% 86% at 50% 112%, rgba(255,255,255,0.070), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.010)),
    rgba(8,8,8,0.16) !important;
  border-color: rgba(255,255,255,0.13) !important;
  backdrop-filter: blur(64px) saturate(1.38) brightness(1.02) !important;
  -webkit-backdrop-filter: blur(64px) saturate(1.38) brightness(1.02) !important;
  box-shadow: 0 32px 104px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.070) !important;
}

.floating-chat.open .floating-chat-card::before {
  background:
    radial-gradient(ellipse 92% 82% at 50% 112%, rgba(255,255,255,0.060), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.036), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.050), rgba(255,255,255,0.010)),
    rgba(7,7,7,0.08) !important;
  backdrop-filter: blur(72px) saturate(1.42) brightness(1.04) !important;
  -webkit-backdrop-filter: blur(72px) saturate(1.42) brightness(1.04) !important;
}

.floating-chat.open .floating-chat-head,
.floating-chat.open .floating-chat-body {
  background: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.floating-chat.open .floating-chat-body {
  border-radius: 0 !important;
}

/* === LAUNCHER PEEK GLASS — single source of truth ===
   The peek bubble is now a real glass card, matching chat history's material layer.
   Outer wrapper handles layout/motion; .transient-glass-card owns the backdrop blur;
   inner .message/.bubble are transparent content only. */
.input-chat-shell > .transient-chat-bubbles {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 66px !important;
  width: min(420px, calc(100vw - 32px)) !important;
  transform: translateX(-50%) translateY(0) !important;
  z-index: 12 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 7px !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
  transition: bottom 220ms var(--motion-ease-soft), transform 240ms var(--motion-ease-soft), opacity 180ms var(--motion-ease-soft) !important;
}

.input-chat-shell.expanded > .transient-chat-bubbles {
  bottom: 88px !important;
}

.input-chat-shell > .transient-chat-bubbles.dictation-transient {
  pointer-events: auto !important;
}

.input-chat-shell > .transient-chat-bubbles.leaving {
  animation: launcher-peek-fade-down 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  pointer-events: none !important;
}

.input-chat-shell > .transient-chat-bubbles.leaving .transient-chat-bubble.latest {
  animation: none !important;
}

.transient-chat-bubble {
  position: relative !important;
  width: auto !important;
  max-width: min(390px, 100%) !important;
  align-self: center !important;
  opacity: 0;
  animation: launcher-bubble-replace-in 360ms var(--motion-ease-soft) both !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  isolation: auto !important;
}

.transient-chat-bubble.assistant.latest {
  animation-duration: 420ms !important;
}

.transient-glass-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  max-width: min(390px, calc(100vw - 32px)) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  background:
    radial-gradient(ellipse 96% 86% at 50% 112%, rgba(255,255,255,0.110), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.070), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.080), rgba(255,255,255,0.014)),
    rgba(10,10,10,0.14) !important;
  background-clip: padding-box !important;
  box-shadow:
    0 30px 96px rgba(0,0,0,0.50),
    inset 0 1px 0 rgba(255,255,255,0.090),
    inset 0 -1px 0 rgba(255,255,255,0.028) !important;
  backdrop-filter: blur(72px) saturate(1.46) brightness(1.06) contrast(1.04) !important;
  -webkit-backdrop-filter: blur(72px) saturate(1.46) brightness(1.06) contrast(1.04) !important;
  transform: translateZ(0) !important;
}

.transient-glass-material {
  display: none !important;
}

.transient-glass-card::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  background:
    radial-gradient(ellipse 92% 82% at 50% 112%, rgba(255,255,255,0.070), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.010)),
    rgba(7,7,7,0.04) !important;
  backdrop-filter: blur(84px) saturate(1.52) brightness(1.08) !important;
  -webkit-backdrop-filter: blur(84px) saturate(1.52) brightness(1.08) !important;
}

.transient-glass-card > * {
  position: relative !important;
  z-index: 1 !important;
}

.transient-glass-card .message,
.transient-glass-card .message.user,
.transient-glass-card .message.assistant {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.transient-glass-card .bubble,
.transient-glass-card .message.user .bubble,
.transient-glass-card .message.assistant .bubble {
  position: relative !important;
  z-index: 1 !important;
  max-width: 100% !important;
  padding: 11px 14px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: rgba(255,255,255,0.93) !important;
  text-align: center !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.transient-chat-bubble.dictating .bubble {
  min-width: 122px !important;
  padding-right: 40px !important;
}

.transient-chat-bubble.dictating > .dictation-cancel {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(12,12,12,0.62);
  color: rgba(255,255,255,0.76);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  font: 500 14px/1 Inter, sans-serif;
  cursor: pointer;
  z-index: 4 !important;
  pointer-events: auto;
  transition: color 160ms var(--motion-ease), border-color 160ms var(--motion-ease), background 160ms var(--motion-ease), transform 160ms var(--motion-ease);
}

.transient-chat-bubble.dictating > .dictation-cancel:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.30);
  background: rgba(24,24,24,0.72);
  transform: scale(1.04);
}

@keyframes launcher-bubble-replace-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes launcher-peek-fade-down {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(16px) scale(0.982);
  }
}

/* === HERMESOS SHARED CHAT GLASS CONTRACT — history card + peek card use same material === */
:root {
  --hermes-chat-glass-bg:
    radial-gradient(ellipse 96% 86% at 50% 112%, rgba(255,255,255,0.080), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.044), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.058), rgba(255,255,255,0.012)),
    rgba(8,8,8,0.18);
  --hermes-chat-glass-before-bg:
    radial-gradient(ellipse 92% 82% at 50% 112%, rgba(255,255,255,0.064), transparent 64%),
    radial-gradient(ellipse 68% 56% at 16% 0%, rgba(255,255,255,0.038), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.010)),
    rgba(7,7,7,0.07);
  --hermes-chat-glass-border: rgba(255,255,255,0.14);
  --hermes-chat-glass-shadow: 0 32px 104px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.075), inset 0 -1px 0 rgba(255,255,255,0.024);
  --hermes-chat-glass-filter: blur(64px) saturate(1.38) brightness(1.02) contrast(1.02);
  --hermes-chat-glass-filter-before: blur(72px) saturate(1.42) brightness(1.04);
  --hermes-peek-glass-bg:
    radial-gradient(ellipse 98% 90% at 50% 112%, rgba(255,255,255,0.082), transparent 66%),
    radial-gradient(ellipse 72% 58% at 14% 0%, rgba(255,255,255,0.052), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.060), rgba(255,255,255,0.012)),
    rgba(8,8,8,0.14);
  --hermes-peek-glass-before-bg:
    radial-gradient(ellipse 98% 88% at 50% 112%, rgba(255,255,255,0.052), transparent 66%),
    linear-gradient(180deg, rgba(255,255,255,0.042), rgba(255,255,255,0.008)),
    rgba(255,255,255,0.010);
  --hermes-peek-glass-filter: blur(96px) saturate(1.54) brightness(1.05) contrast(1.03);
  --hermes-peek-glass-filter-before: blur(120px) saturate(1.58) brightness(1.07);
}

.floating-chat.open .floating-chat-card,
.transient-glass-card {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  border-color: var(--hermes-chat-glass-border) !important;
  background: var(--hermes-chat-glass-bg) !important;
  box-shadow: var(--hermes-chat-glass-shadow) !important;
  backdrop-filter: var(--hermes-chat-glass-filter) !important;
  -webkit-backdrop-filter: var(--hermes-chat-glass-filter) !important;
  transform: translateZ(0) !important;
}

.floating-chat.open .floating-chat-card::before,
.transient-glass-card::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  opacity: 1 !important;
  background: var(--hermes-chat-glass-before-bg) !important;
  backdrop-filter: var(--hermes-chat-glass-filter-before) !important;
  -webkit-backdrop-filter: var(--hermes-chat-glass-filter-before) !important;
}

/* Peek bubbles are smaller than history/windows, so they need a stronger lens to read as real blur. */
.input-chat-shell:not(.chat-open) .transient-chat-bubble {
  border-radius: 18px !important;
  background: rgba(255,255,255,0.012) !important;
  backdrop-filter: blur(36px) saturate(1.42) brightness(1.10) !important;
  -webkit-backdrop-filter: blur(36px) saturate(1.42) brightness(1.10) !important;
}

.input-chat-shell:not(.chat-open) .transient-glass-card {
  border-color: rgba(255,255,255,0.13) !important;
  background: var(--hermes-peek-glass-bg) !important;
  box-shadow:
    0 26px 86px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.085),
    inset 0 -1px 0 rgba(255,255,255,0.020) !important;
  backdrop-filter: var(--hermes-peek-glass-filter) !important;
  -webkit-backdrop-filter: var(--hermes-peek-glass-filter) !important;
}

.input-chat-shell:not(.chat-open) .transient-glass-card::before {
  background: var(--hermes-peek-glass-before-bg) !important;
  backdrop-filter: var(--hermes-peek-glass-filter-before) !important;
  -webkit-backdrop-filter: var(--hermes-peek-glass-filter-before) !important;
}

.floating-chat.open .floating-chat-card > *,
.transient-glass-card > * {
  position: relative !important;
  z-index: 1 !important;
}

.transient-glass-card .message,
.transient-glass-card .message.user,
.transient-glass-card .message.assistant,
.transient-glass-card .bubble,
.transient-glass-card .message.user .bubble,
.transient-glass-card .message.assistant .bubble {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.input-chat-shell .transient-chat-bubble.dictating .transient-glass-card .message.user .bubble {
  padding-right: 40px !important;
}

/* === CHAT HISTORY LABEL — anchored to orb/input, never far above === */
.input-chat-shell > .chat-history-edge {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 64px !important;
  transform: translateX(-50%) translateY(0) !important;
  z-index: 13 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  min-width: 0 !important;
  height: 18px !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: rgba(255,255,255,0.58) !important;
  font: 500 11px/1 Inter, sans-serif !important;
  letter-spacing: -0.01em !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: color 160ms var(--motion-ease), transform 180ms var(--motion-ease-soft) !important;
}

.input-chat-shell > .chat-history-edge:hover {
  color: rgba(255,255,255,0.88) !important;
  transform: translateX(-50%) translateY(-1px) !important;
}

