.session-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.session-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  flex: 1 1 100%;
}

.session-card.small {
  flex: 1 1 calc(50% - 6px);
}

.session-card:hover {
  border-color: var(--accent);
}

.reveal-pill {
  display: block;
  width: 100%;
  margin: 16px 0 8px;
  padding: 12px;
  background: rgba(10, 132, 255, 0.12);
  color: #0a84ff;
  border: 1px solid rgba(10, 132, 255, 0.3);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 200ms;
}
.reveal-pill:active { background: rgba(10, 132, 255, 0.24); }

.secondary-group {
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 16px;
  animation: fade-in 300ms ease-out;
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.secondary-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  letter-spacing: 1px;
  margin-bottom: 8px;
  width: 100%;
}
.tile.tiny {
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  opacity: 0.9;
  padding: 4px;
  color: var(--fg);
  flex: 0 0 64px;
  overflow: hidden;
}

.tile.tiny .status-dot {
  margin-right: 0;
  margin-bottom: 4px;
}

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

.session-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.session-card-sub {
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 8px;
}

.session-card-time {
  font-size: 12px;
  color: var(--fg-muted);
}

.chat-events {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 120px; /* space for composer */
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg.agent {
  align-self: flex-start;
}

.chat-msg .msg-text {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
}

.chat-msg.user .msg-text {
  background: var(--accent);
  color: white;
  border-color: transparent;
  border-bottom-right-radius: 4px;
}

.chat-msg.agent .msg-text {
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 4px;
  margin-left: 4px;
  margin-right: 4px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  padding: 8px 0;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.composer {
  position: fixed;
  bottom: 60px; /* above nav bar */
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--surface-2);
  padding: 8px 16px;
  z-index: 100;
}

#composer-context {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

#composer-target {
  font-weight: 600;
  color: var(--fg);
}

.composer-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#composer-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  color: var(--fg);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
}

#composer-input:focus {
  border-color: var(--accent);
}

.composer button {
  background: var(--accent);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.composer button:disabled {
  background: var(--surface-2);
  color: var(--fg-muted);
  cursor: not-allowed;
}

#voice-btn {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--surface-2);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spawn-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--fg-muted);
}