:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #08100f;
  color: #ecf8f3;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: radial-gradient(circle at 80% 0, #193a31 0, #0b1513 46%, #07100e 100%); }
button, input { font: inherit; }

.shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 282px;
  display: grid;
  grid-template-rows: 42px 1fr 38px 30px;
  gap: 4px;
  padding: 6px;
}

header { display: flex; align-items: center; justify-content: space-between; }
.header-actions { display: flex; gap: 4px; }
.identity { display: flex; align-items: center; gap: 7px; min-width: 0; }
.identity img { width: 32px; height: 32px; border-radius: 10px; }
.identity strong { display: block; font-size: 13px; letter-spacing: .14em; }
.identity small { display: block; color: #8fa8a0; font-size: 9px; margin-top: 1px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-button {
  width: 31px;
  height: 31px;
  border: 1px solid #315248;
  border-radius: 10px;
  background: #14231f;
  color: #78e0b8;
}
.icon-button.ready { background: #78e0b8; color: #07100e; }

.messages {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px;
  scrollbar-width: none;
}
.messages::-webkit-scrollbar { display: none; }
.empty { margin: auto; color: #82968f; font-size: 11px; text-align: center; padding: 12px; }
.bubble {
  max-width: 88%;
  padding: 6px 8px;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.3;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.user { align-self: flex-end; background: #245c49; }
.bubble.assistant { align-self: flex-start; background: #172622; border: 1px solid #2d4940; }
.bubble.system { align-self: center; max-width: 96%; color: #9eb4ac; background: transparent; font-size: 9px; text-align: center; }
.bubble.error { color: #ffb9b9; }
.play { border: 0; color: #78e0b8; background: transparent; padding: 4px 0 0; font-size: 10px; }

.composer { display: grid; grid-template-columns: 1fr 38px; gap: 4px; }
.composer input {
  min-width: 0;
  border: 1px solid #2d4940;
  border-radius: 10px;
  background: #101c19;
  color: #ecf8f3;
  padding: 0 9px;
  font-size: 11px;
}
.composer button {
  border: 0;
  border-radius: 10px;
  background: #78e0b8;
  color: #07100e;
  font-weight: 800;
}

.mic {
  border: 1px solid #315248;
  border-radius: 9px;
  background: #14231f;
  color: #b9d3ca;
  font-size: 9px;
}
.mic.recording { background: #9d3333; border-color: #e16d6d; color: white; }
button:disabled, input:disabled { opacity: .48; }

.bubble.selectable { cursor: pointer; }
.bubble.selected { outline: 2px solid #78e0b8; outline-offset: 1px; }

.overlay {
  position: absolute;
  inset: 43px 6px 6px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #315248;
  border-radius: 12px;
  background: rgba(8, 16, 15, .98);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
}
.overlay-title { color: #78e0b8; font-size: 12px; font-weight: 800; }
.overlay button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 5px 7px;
  background: #78e0b8;
  color: #07100e;
  font-size: 10px;
  font-weight: 750;
}
.overlay button.secondary { background: #1a2b26; color: #c7ddd5; border: 1px solid #315248; }
.menu-panel p, .camera-panel p, .chats-panel p { margin: 0; color: #91aaa1; font-size: 8px; line-height: 1.25; }

.chat-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: none;
}
.chat-list::-webkit-scrollbar { display: none; }
.chat-list button {
  min-height: 38px;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  text-align: left;
  background: #162722;
  color: #d9ebe5;
  border: 1px solid #315248;
}
.chat-list button.active { border-color: #78e0b8; background: #21483c; }
.chat-list strong, .chat-list small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-list strong { font-size: 9px; }
.chat-list small { margin-top: 2px; color: #91aaa1; font-size: 7px; font-weight: 500; }

.camera-panel { inset: 6px; }
.camera-panel video, .camera-panel img {
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: cover;
  border-radius: 9px;
  background: #020504;
}
.camera-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.camera-actions button { min-width: 0; min-height: 30px; padding: 3px; font-size: 9px; }
