:root {
  --void: #0e0f13;
  --glass: rgba(14, 15, 19, 0.28);
  --glass-strong: rgba(16, 18, 23, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --muted: rgba(238, 247, 246, 0.48);
  --text: #f3f8f7;
  --teal: #2dd4a8;
  --blue: #6d83ff;
  --purple: #a46cff;
  --danger: #ff6b73;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body.immersive-ui {
  margin: 0;
  color: var(--text);
  background: var(--void);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
button, textarea, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }

.cosmic-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #07090e; }
.cosmic-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#cosmicBgCanvas { z-index: 0; }
#cosmicOrbCanvas { z-index: 1; }
.cosmic-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cosmic-agent-label { position: absolute; left: 0; top: 0; min-width: 74px; opacity: 0; padding: 4px 6px; border-radius: 6px; text-align: center; transform: translate3d(-999px,-999px,0); transition: opacity .2s linear, filter .2s linear; will-change: transform, opacity; pointer-events: none; }
.cosmic-agent-label.positioned { filter: drop-shadow(0 0 10px rgba(45,212,168,.2)); }
.cosmic-agent-label strong, .cosmic-agent-label small { display: block; text-shadow: 0 1px 8px #000, 0 0 10px rgba(73,222,232,.25); }
.cosmic-agent-label strong { color: #e5fffb; font-size: 8px; font-weight: 700; }
.cosmic-agent-label small { margin-top: 2px; color: rgba(186,230,226,.48); font-size: 6px; }
.scene-vignette { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(circle at 50% 48%, transparent 20%, rgba(4, 5, 9, 0.14) 58%, rgba(2, 3, 6, 0.68) 100%); }

.glass-surface, .glass-header {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.glass-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  border-width: 0 0 1px;
  background: rgba(8, 10, 14, 0.38);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.brand-orb { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #eafffb 0 8%, #5ff9d5 22%, #159a82 54%, transparent 68%); box-shadow: 0 0 16px rgba(45, 212, 168, 0.75); }
.brand strong { display: block; font-size: 13px; font-weight: 700; }
.brand small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.header-status { display: flex; align-items: center; gap: 9px; min-width: 140px; justify-content: center; }
.header-status b { display: block; font-size: 11px; font-weight: 600; }
.header-status small { display: block; color: var(--muted); font-size: 9px; text-align: center; margin-top: 2px; }
.assistant-state-dot { width: 10px; height: 10px; border-radius: 50%; background: #6d747d; box-shadow: 0 0 0 rgba(45, 212, 168, 0); transition: background .25s ease, box-shadow .25s ease; }
.assistant-state-dot.listening { background: var(--teal); box-shadow: 0 0 14px rgba(45, 212, 168, .85); animation: dotPulse 1.4s ease-out infinite; }
.assistant-state-dot.processing { background: var(--purple); box-shadow: 0 0 14px rgba(164, 108, 255, .68); }
.assistant-state-dot.speaking { background: #69f6db; box-shadow: 0 0 16px rgba(45, 212, 168, .9); }
.assistant-state-dot.error { background: var(--danger); }
@keyframes dotPulse { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.2); } }
.header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(5, 8, 11, .28);
}
.glass-header .ghost-icon,
.glass-header .ghost-icon.nav-item {
  position: relative;
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.62);
  cursor: pointer;
  text-align: center;
}
.glass-header .ghost-icon:hover,
.glass-header .ghost-icon.active {
  color: white;
  border-color: rgba(45,212,168,.26);
  background: rgba(45,212,168,.075);
}
.glass-header .ghost-icon span {
  display: block;
  color: inherit;
}
.header-glyph {
  position: relative;
  width: 15px;
  height: 15px;
}
.chat-glyph,
.cards-glyph,
.focus-glyph,
.memory-glyph,
.spend-glyph,
.security-glyph,
.settings-glyph {
  color: inherit;
}
.chat-glyph {
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.chat-glyph:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  border-top: 2px solid currentColor;
  opacity: .7;
}
.cards-glyph {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  transform: translate(2px, -2px);
}
.cards-glyph:before {
  content: "";
  position: absolute;
  inset: 4px 4px -5px -5px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: .72;
}
.focus-glyph {
  border: 1.6px solid currentColor;
  border-radius: 50%;
}
.focus-glyph:after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}
.memory-glyph {
  width: 16px;
  border: 1.6px solid currentColor;
  border-radius: 50% / 22%;
}
.memory-glyph:before,
.memory-glyph:after {
  content: "";
  position: absolute;
  left: -1.6px;
  right: -1.6px;
  height: 6px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
}
.memory-glyph:before { top: -1.6px; background: rgba(8,10,14,.72); }
.memory-glyph:after { bottom: -1.6px; opacity: .55; }
.spend-glyph:before {
  content: "$";
  position: absolute;
  inset: -2px 0 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.security-glyph {
  width: 14px;
  height: 14px;
  border: 1.6px solid currentColor;
  transform: rotate(45deg);
}
.security-glyph:after {
  content: "";
  position: absolute;
  inset: 4px;
  background: currentColor;
  opacity: .8;
}
.settings-glyph {
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.settings-glyph:before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: currentColor;
}
.settings-glyph:after {
  content: "";
  position: absolute;
  left: 6px;
  top: -3px;
  width: 2px;
  height: 21px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  transform: rotate(45deg);
  opacity: .75;
}
.glass-header .ghost-icon b {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border: 1px solid rgba(5,8,11,.8);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(45,212,168,.95);
  color: #06100e;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}
#usageBadge,
.glass-header #usageBadge {
  width: 32px;
}
#usageBadge b,
.glass-header #usageBadge b {
  right: -4px;
  min-width: 15px;
}
.glass-header .quiet-badge b {
  width: 8px;
  min-width: 8px;
  height: 8px;
  padding: 0;
  top: 3px;
  right: 3px;
  overflow: hidden;
  color: transparent;
  border: 0;
  box-shadow: 0 0 8px rgba(45,212,168,.55);
}
.api-spend-section { border-color: rgba(45,212,168,.24) !important; }
.api-spend-summary { display: grid; gap: 10px; }
.api-spend-main { padding: 12px; border-radius: 6px; border: 1px solid rgba(45,212,168,.25); background: linear-gradient(135deg, rgba(45,212,168,.12), rgba(59,130,246,.06)); }
.api-spend-main small, .api-spend-grid small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.api-spend-main strong { display: block; margin-top: 4px; font-size: 24px; color: var(--teal); line-height: 1; }
.api-spend-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.api-spend-grid span { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.035); }
.api-spend-grid b { display: block; min-width: 0; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: white; font-size: 12px; }
.api-spend-open { width: 100%; height: 32px; border: 1px solid rgba(45,212,168,.28); border-radius: 6px; background: rgba(45,212,168,.08); color: var(--teal); cursor: pointer; font-size: 11px; }
.api-spend-open:hover { background: rgba(45,212,168,.14); }

.conversation-panel {
  position: fixed;
  z-index: 20;
  top: 72px;
  left: 16px;
  bottom: 112px;
  width: clamp(360px, 28vw, 470px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 11, 14, 0.68);
  transition: transform .34s cubic-bezier(.16,1,.3,1), opacity .24s ease;
}
.conversation-panel.collapsed { transform: translateX(calc(-100% + 38px)); opacity: .82; }
.panel-heading { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px 10px; border-bottom: 1px solid var(--line); }
.panel-heading p, .activity-heading p, .overlay-head p { margin: 0 0 4px; color: var(--teal); font-size: 9px; font-weight: 700; }
.panel-heading h1, .activity-heading h2, .overlay-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel-collapse, .activity-toggle { border: 0; background: transparent; color: rgba(255,255,255,.55); font-size: 25px; cursor: pointer; }
.conversation-context { display: flex; justify-content: space-between; padding: 8px 15px; color: var(--muted); font-size: 9px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.04); }
#continuityStatus { color: rgba(105,246,219,.88); letter-spacing: .08em; }
.immersive-chat { min-height: 0; overflow-y: auto; padding: 16px 15px 8px; scrollbar-width: thin; scrollbar-color: rgba(45,212,168,.25) transparent; }
.immersive-chat .message { width: 100%; margin: 0 0 18px; padding: 0; border: 0; background: transparent; }
.immersive-chat .message.user { padding-left: 46px; }
.immersive-chat .message-label { margin-bottom: 6px; color: rgba(255,255,255,.36); font-size: 9px; text-transform: uppercase; }
.immersive-chat .message.user .message-label { text-align: right; }
.immersive-chat .message-body { padding: 0; border: 0; border-radius: 0; background: transparent; color: rgba(245,250,249,.9); font-size: 14px; line-height: 1.62; white-space: pre-wrap; }
.immersive-chat .message.user .message-body { padding: 9px 11px; border-radius: 7px 7px 2px 7px; background: rgba(45,212,168,.08); border: 1px solid rgba(45,212,168,.14); }
.immersive-chat .message-tools button { margin-top: 7px; border: 0; background: transparent; color: var(--teal); font-size: 10px; cursor: pointer; padding: 0; }
.immersive-composer { margin: 10px 12px 12px; min-height: 78px; display: grid; grid-template-columns: 34px 1fr 38px; align-items: end; gap: 8px; padding: 9px; border: 1px solid rgba(45,212,168,.22); border-radius: 7px; background: rgba(4,7,10,.52); }
.immersive-composer textarea { width: 100%; min-height: 48px; max-height: 110px; resize: none; border: 0; outline: 0; background: transparent; color: white; font-size: 13px; line-height: 1.45; }
.immersive-composer .send-button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--teal); color: #06100e; font-size: 19px; cursor: pointer; }
.vision-button { width: 32px; height: 36px; border: 1px solid rgba(105,246,219,.24); border-radius: 6px; background: rgba(45,212,168,.07); color: rgba(105,246,219,.9); cursor: pointer; display: grid; place-items: center; }
.vision-button:hover { border-color: rgba(105,246,219,.55); background: rgba(45,212,168,.14); }
.vision-button span { width: 22px; overflow: hidden; font-size: 6px; font-weight: 800; letter-spacing: .03em; text-align: center; }
.camera-dialog { width: min(520px, calc(100vw - 24px)); padding: 0; }
.camera-shell { display: grid; gap: 12px; padding: 14px; }
.camera-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.camera-head p { margin: 0 0 4px; color: var(--teal); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.camera-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.camera-head button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: rgba(255,255,255,.72); cursor: pointer; }
.camera-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid rgba(105,246,219,.18); border-radius: 7px; background: rgba(2,5,8,.72); }
.camera-frame video { width: 100%; height: 100%; display: block; object-fit: cover; background: #05080b; }
#cameraStatus { position: absolute; left: 10px; bottom: 10px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(5,8,11,.78); color: rgba(255,255,255,.62); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
#cameraStatus.active { border-color: rgba(105,246,219,.48); color: #69f6db; }
.camera-dialog textarea { min-height: 62px; resize: vertical; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 10px; outline: 0; background: rgba(4,7,10,.52); color: white; font: inherit; font-size: 13px; line-height: 1.45; }
.camera-observation { min-height: 34px; margin: 0; padding: 8px 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: rgba(255,255,255,.035); color: rgba(245,250,249,.72); font-size: 11px; line-height: 1.45; }
.camera-actions { display: flex; justify-content: flex-end; gap: 8px; }
.camera-actions button { min-width: 78px; height: 34px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: transparent; color: rgba(255,255,255,.76); cursor: pointer; }
.camera-actions #cameraWatchBtn.active { border-color: rgba(105,246,219,.55); background: rgba(45,212,168,.1); color: #69f6db; box-shadow: 0 0 14px rgba(45,212,168,.14); }
.camera-actions #cameraCaptureBtn { border-color: rgba(105,246,219,.38); background: rgba(45,212,168,.14); color: #69f6db; }
.thinking { padding: 0 15px; }

.orb-interface { position: fixed; inset: 56px 0 0; z-index: 6; pointer-events: none; }
.orb-identity { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); text-align: center; text-shadow: 0 0 20px #05070a; }
.orb-identity p { margin: 0 0 4px; color: var(--teal); font-size: 9px; font-weight: 700; }
.orb-identity h2 { margin: 0; font-size: 12px; font-weight: 600; }
.orb-identity span { display: block; margin-top: 4px; color: rgba(255,255,255,.36); font-size: 8px; }
.response-card { position: absolute; width: 240px; padding: 13px 14px; border-radius: 7px; border: 1px solid var(--line); border-top: 2px solid var(--teal); background: rgba(22,23,29,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0,0,0,.28); pointer-events: auto; transition: width .22s ease, box-shadow .22s ease, opacity .18s ease; }
.response-card.dragging { animation: none; cursor: grabbing; box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(45,212,168,.2); }
.response-card.minimized { width: 184px; padding-block: 10px; animation: none; }
.response-card.minimized > :not(.response-title) { display: none; }
.response-card.minimized .response-title { margin-bottom: 0; }
.response-card.closed { display: none; }
.response-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; color: rgba(255,255,255,.4); font-size: 8px; font-weight: 700; cursor: grab; touch-action: none; user-select: none; }
.response-title b { color: var(--teal); }
.card-controls { display: flex; align-items: center; gap: 5px; }
.card-controls button { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: rgba(255,255,255,.42); font-size: 13px; cursor: pointer; }
.card-controls button:hover { background: rgba(255,255,255,.08); color: white; }
.response-card strong { font-size: 11px; }
.response-card p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.priority-card { left: calc(28vw + 32px); top: auto; bottom: 38px; }
.signal-card { right: 304px; top: 26px; animation-delay: -.8s; }
.memory-float { right: 308px; bottom: 38px; animation-delay: -1.7s; }
@keyframes cardFloat { 0%,100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
.metric-triplet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.metric-triplet span { display: grid; gap: 2px; }
.metric-triplet small { color: var(--muted); font-size: 7px; }
.metric-triplet b { font-size: 12px; }
.core-readouts { display: none; position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); gap: 44px; text-align: center; }
.core-readouts span { display: grid; gap: 3px; }
.core-readouts small { color: rgba(255,255,255,.32); font-size: 7px; }
.core-readouts b { color: rgba(255,255,255,.82); font-size: 9px; }
.cosmic-perf { position: absolute; right: 306px; bottom: 12px; width: 34px; height: 22px; border: 1px solid var(--line); border-radius: 4px; background: rgba(10,12,16,.42); color: var(--muted); font-size: 7px; pointer-events: auto; }

.card-manager { position: fixed; z-index: 55; top: 62px; right: 126px; width: 228px; padding: 10px; border-radius: 7px; background: rgba(10,12,16,.88); box-shadow: 0 20px 55px rgba(0,0,0,.46); }
.card-manager[hidden] { display: none; }
.card-manager > div { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px 9px; color: var(--muted); font-size: 8px; }
.card-manager > div button { border: 0; background: transparent; color: var(--teal); font-size: 8px; cursor: pointer; }
.card-manager > button { width: 100%; min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; border: 0; border-top: 1px solid rgba(255,255,255,.05); background: transparent; color: rgba(255,255,255,.76); font-size: 10px; cursor: pointer; }
.card-manager > button:hover { background: rgba(255,255,255,.04); }
.card-manager > button b { color: var(--teal); font-size: 8px; }

.activity-panel { position: fixed; z-index: 20; top: 72px; right: 16px; bottom: 112px; width: 276px; border-radius: 8px; transition: width .34s cubic-bezier(.16,1,.3,1); }
.activity-panel.collapsed { width: 36px; }
.activity-toggle { position: absolute; left: 0; top: 8px; width: 35px; height: 35px; z-index: 2; }
.activity-content { height: 100%; padding: 12px 12px 14px 40px; overflow-y: auto; opacity: 1; transition: opacity .18s ease; }
.activity-panel.collapsed .activity-content { opacity: 0; pointer-events: none; }
.activity-heading { display: flex; justify-content: space-between; align-items: center; min-width: 218px; margin-bottom: 18px; }
.activity-heading button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--teal); cursor: pointer; }
.activity-panel section { min-width: 218px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.055); }
.section-label { display: flex; justify-content: space-between; margin-bottom: 9px; color: rgba(255,255,255,.45); font-size: 8px; font-weight: 700; }
.section-label b { color: var(--teal); }
.activity-panel .empty { padding: 12px 0; border: 0; background: transparent; color: rgba(255,255,255,.3); font-size: 9px; }
.activity-panel .insight-card { padding: 8px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.04); background: transparent; }
.activity-panel .insight-card strong { font-size: 10px; }
.activity-panel .insight-card p { margin-top: 4px; font-size: 9px; line-height: 1.4; }
.activity-panel .mini-task-list, .activity-panel .mini-goal-grid { display: grid; gap: 5px; }
.proactive-row { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 9px; }

.mic-dock { position: fixed; z-index: 35; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.mic-control { position: relative; width: 64px; height: 64px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.09); background: #16171d; box-shadow: 0 10px 32px rgba(0,0,0,.42); cursor: pointer; pointer-events: auto; }
.mic-control b { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.mic-symbol { position: relative; width: 14px; height: 21px; border: 2px solid white; border-radius: 8px; }
.mic-symbol::before { content: ""; position: absolute; left: 50%; bottom: -7px; width: 22px; height: 12px; transform: translateX(-50%); border: 2px solid white; border-top: 0; border-radius: 0 0 12px 12px; }
.mic-symbol::after { content: ""; position: absolute; left: 50%; bottom: -11px; width: 2px; height: 5px; transform: translateX(-50%); background: white; }
.mic-control.listening { border-color: var(--teal); box-shadow: 0 0 24px rgba(45,212,168,.5); }
.mic-control.listening .mic-symbol { width: 15px; height: 15px; border: 0; border-radius: 2px; background: white; }
.mic-control.listening .mic-symbol::before, .mic-control.listening .mic-symbol::after { display: none; }
.mic-control.listening::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--teal); border-radius: 50%; animation: micRing 1.4s cubic-bezier(.16,1,.3,1) infinite; }
@keyframes micRing { from { transform: scale(1); opacity: 1; } to { transform: scale(1.32); opacity: 0; } }
.mic-hint { color: rgba(255,255,255,.42); font-size: 9px; font-weight: 600; }
.hands-free-control { pointer-events: auto; min-width: 104px; height: 24px; padding: 0 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(9,12,16,.82); color: rgba(255,255,255,.52); font-size: 8px; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.hands-free-control.active { border-color: rgba(105,246,219,.58); color: #69f6db; background: rgba(45,212,168,.12); box-shadow: 0 0 16px rgba(45,212,168,.18); }

.workspace-layer { position: fixed; inset: 56px 0 0; z-index: 40; pointer-events: none; }
.workspace-layer > .view { display: none; }
.workspace-layer > #commandView.active { display: block; }
.overlay-view.active { display: block; pointer-events: auto; position: absolute; inset: 16px 308px 28px max(16px, calc(28vw + 32px)); padding: 22px; border-radius: 8px; overflow-y: auto; background: rgba(10,12,16,.82); }
.overlay-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.overlay-head button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.split-workspace, .intelligence-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; margin-top: 20px; }
.intelligence-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
.section-heading button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 5px; background: transparent; }
.overlay-view h3 { font-size: 13px; }
.usage-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.usage-metric { padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.035); }
.usage-metric small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.usage-metric strong { display: block; margin-top: 4px; font-size: 17px; color: white; }
.usage-metric.good strong { color: var(--teal); }
.usage-metric.bad strong { color: var(--danger); }
.usage-section { grid-column: 1 / -1; margin-top: 4px; max-height: 190px; overflow: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.usage-section h4 { margin: 0 0 8px; font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }
.usage-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.045); }
.usage-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: white; font-size: 12px; }
.usage-row strong { color: var(--teal); font-size: 12px; }
.usage-row small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.usage-row.compact small { grid-column: auto; text-align: right; }
.usage-note { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.support-elements { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.modal { color: var(--text); background: rgba(14,15,19,.96); border: 1px solid var(--line); border-radius: 8px; backdrop-filter: blur(20px); }
.modal::backdrop { background: rgba(2,3,6,.72); backdrop-filter: blur(8px); }
.toast { z-index: 100; }

@media (max-width: 1180px) {
  .conversation-panel { width: 380px; }
  .activity-panel { width: 230px; }
  .priority-card { left: 400px; }
  .signal-card, .memory-float { right: 250px; }
  .overlay-view.active { left: 400px; right: 250px; }
}

@media (max-width: 900px) {
  .glass-header { grid-template-columns: 1fr auto; }
  .header-status { display: none; }
  .conversation-panel { width: min(420px, calc(100vw - 32px)); transform: translateX(calc(-100% - 20px)); opacity: 0; }
  .conversation-panel.mobile-open { transform: none; opacity: 1; }
  .activity-panel { width: 36px; }
  .activity-content { opacity: 0; pointer-events: none; }
  .activity-panel.mobile-open { width: min(300px, calc(100vw - 32px)); }
  .activity-panel.mobile-open .activity-content { opacity: 1; pointer-events: auto; }
  .response-card { display: none; }
  .core-readouts { bottom: 16%; gap: 24px; }
  .orb-identity { top: 12%; }
  .overlay-view.active { inset: 14px; }
  .intelligence-grid, .split-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .glass-header { padding: 0 10px; }
  .brand small { display: none; }
  .ghost-icon { width: 31px; }
  .ghost-icon b, .cosmic-perf { display: none; }
  .orb-identity { top: 9%; }
  .core-readouts { bottom: 18%; }
  .core-readouts span:nth-child(3) { display: none; }
  .cosmic-labels { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .response-card, .assistant-state-dot, .mic-control::after { animation: none !important; }
}
