:root {
  color-scheme: light dark;
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #6366f1;
  --user: #1f2937;
  --model: #0b3b2e;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.chat-wrap {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  max-width: 840px;
  margin: 0 auto;
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: var(--panel);
  position: sticky;
  top: 0;
}

.chat-header h1 { font-size: 16px; margin: 0; }
.chat-header small { color: var(--muted); }

.messages {
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.35;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.bubble.user { align-self: flex-end; background: var(--user); }
.bubble.model { align-self: flex-start; background: var(--model); }

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--panel);
}

.composer input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--text);
}

.composer button {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}
.composer button:disabled { opacity: .6; cursor: default; }

.tip { color: var(--muted); font-size: 12px; margin-top: 4px; }

