:root {
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1c1c1c; --line: #2a2a2a;
  --ink: #f2f2ef; --muted: #a3a39c; --brand: #b5cea5; --brand-2: #9db58b;
  --font: "Google Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Code", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  display: flex; flex-direction: column; min-height: 100dvh;
}
a { color: var(--brand); }
button { font: inherit; }
.top {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); text-decoration: none; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #0a0a0a; display: grid; place-items: center; font-weight: 800; }
.beta { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); border: 1px solid #33402c; background: #141d0e; border-radius: 999px; padding: 2px 7px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 7px 12px; cursor: pointer;
}
.btn:hover { border-color: #3c3c3c; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #0a0a0a; font-weight: 700; }
.btn.small { font-size: 13px; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; text-decoration: underline; }
.chat { flex: 1; width: min(820px, 100%); margin: 0 auto; padding: 28px 18px 12px; overflow-y: auto; }
.welcome { padding: 8vh 0 24px; }
.welcome h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 14px; }
.welcome h1 em { color: var(--brand); font-style: normal; }
.welcome p { color: var(--muted); max-width: 62ch; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 14px; }
.suggestions button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 13px; }
.suggestions button:hover { border-color: var(--brand); }
.note { font-size: 12px; color: var(--muted); }
.messages { display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; flex-direction: column; gap: 6px; }
.msg .who { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .body { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
.msg.assistant .body { padding: 0 2px; }
.body pre { background: #0f0f0f; border: 1px solid var(--line); border-radius: 9px; padding: 12px; overflow-x: auto; }
.body code { font-family: var(--mono); font-size: .9em; background: #1a1a1a; padding: 2px 5px; border-radius: 4px; }
.body pre code { background: none; padding: 0; }
.body a { color: var(--brand); }
.ad { margin: 22px 0 8px; border: 1px dashed #3a4a32; background: #111a0d; border-radius: 10px; padding: 11px 13px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; }
.ad[hidden] { display: none; }
.ad-label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.ad a { margin-left: auto; }
.composer-wrap { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 22%); padding: 10px 18px 14px; }
.composer { width: min(820px, 100%); margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.composer textarea { flex: 1; resize: none; border: 0; background: none; color: var(--ink); padding: 7px; max-height: 180px; font: inherit; outline: none; }
.send { border: 0; border-radius: 8px; background: var(--brand); color: #0a0a0a; font-weight: 700; padding: 9px 15px; cursor: pointer; }
.send:disabled { opacity: .45; cursor: default; }
.send.stop { background: #cf2f2f; color: #fff; }
.legal { width: min(820px, 100%); margin: 8px auto 0; text-align: center; font-size: 11px; color: #7d7d77; }
.dialog { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 22px; width: min(480px, calc(100% - 32px)); }
.dialog::backdrop { background: rgba(0,0,0,.65); }
.dialog h2 { margin: 0 0 6px; font-size: 20px; }
.dialog label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.dialog input { width: 100%; margin-top: 5px; background: #0f0f0f; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 9px 10px; font: inherit; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.preset { border: 1px solid var(--line); background: #0f0f0f; color: var(--ink); border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.preset:hover { border-color: var(--brand); }
.note.warn { color: #f0b45a; border-left: 2px solid #f0b45a; padding-left: 8px; }
.cloud-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #101012; }
.cloud-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
@media (max-width: 640px) {
  .beta { display: none; }
  .chat { padding-top: 16px; }
  .welcome { padding-top: 4vh; }
}
