:root { color-scheme: dark; --ink:#edeff2; --muted:#9098a7; --panel:#14171d; --line:#282d38; --accent:#9dc4ff; --accent2:#c7b7ff; --danger:#ffacac; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 15% 0%,#172239 0,transparent 31%),#0d0f13; color:var(--ink); font:15px/1.5 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,select,textarea { font:inherit; }
.shell { max-width:1180px; height:100vh; height:100dvh; margin:auto; display:flex; flex-direction:column; }
header { height:72px; display:flex; align-items:center; justify-content:space-between; padding:0 24px; border-bottom:1px solid var(--line); }
.brand { display:flex; gap:12px; align-items:center; }
.brand strong,.brand small { display:block; }
.brand small { color:var(--muted); font-size:12px; }
.mark,.orb { display:grid; place-items:center; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#11151e; font-weight:800; }
.mark { width:34px; height:34px; border-radius:10px; }
.actions { display:flex; gap:8px; }
main { flex:1; min-height:0; display:grid; grid-template-columns:260px 1fr; }
aside { padding:24px; border-right:1px solid var(--line); }
label { display:block; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-bottom:8px; }
select,textarea { width:100%; color:var(--ink); background:#11141a; border:1px solid var(--line); border-radius:12px; outline:none; }
select { padding:11px; }
select:focus,textarea:focus { border-color:#6688bd; box-shadow:0 0 0 3px #6688bd22; }
button { color:#10141c; background:var(--accent); border:0; border-radius:10px; padding:9px 14px; cursor:pointer; font-weight:700; }
button:disabled { opacity:.45; cursor:not-allowed; }
.quiet { background:#1b2029; color:#cbd2df; border:1px solid var(--line); }
.full { width:100%; margin-top:10px; }
.danger { background:var(--danger); }
.capacity { margin-top:20px; color:var(--muted); font-size:13px; }
/* The capacity panel is hidden on a phone, so the quality line carries the
   label of the chosen provider there, and only there. */
.quality { display:none; }
.capacity strong { display:block; color:#d6dce7; margin-top:12px; }
.chat { min-height:0; display:flex; flex-direction:column; }
.messages { flex:1; overflow:auto; padding:42px clamp(20px,7vw,86px) 20px; }
.empty { min-height:55vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.empty h1 { margin:20px 0 5px; font-size:clamp(24px,4vw,38px); letter-spacing:-.03em; }
.empty p { color:var(--muted); margin:0; }
.orb { width:62px; height:62px; border-radius:22px; font-size:28px; box-shadow:0 15px 60px #809ee333; }
.message { max-width:760px; margin:0 auto 24px; overflow-wrap:anywhere; }
.message .role { color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; margin-bottom:6px; }
.message.user .body { display:inline-block; background:#202632; border:1px solid #303847; border-radius:16px 16px 4px 16px; padding:11px 15px; }
.message.assistant .body { font-size:16px; line-height:1.65; }
/* A plain body is text that was never Markdown: the person's own message, or
   a fallback line. Only there does a newline have to hold its own. */
.body.plain { white-space:pre-wrap; }
/* The answer is rendered Markdown, so the typing cursor rides the last block
   instead of sitting on a line of its own below it. */
.cursor:empty::after,.cursor > :last-child::after { content:""; display:inline-block; width:7px; height:1em; margin-left:4px; background:var(--accent); vertical-align:-2px; animation:blink 1s infinite; }
.body > :first-child { margin-top:0; }
.body > :last-child { margin-bottom:0; }
.body p { margin:0 0 12px; }
.body h2,.body h3,.body h4,.body h5,.body h6 { margin:20px 0 8px; line-height:1.3; letter-spacing:-.01em; }
.body h2 { font-size:20px; }
.body h3 { font-size:17px; }
.body h4,.body h5,.body h6 { font-size:15px; color:#d6dce7; }
.body ul,.body ol { margin:0 0 12px; padding-left:24px; }
.body li { margin:3px 0; }
.body li > ul,.body li > ol { margin:4px 0 2px; }
.body blockquote { margin:0 0 12px; padding:2px 0 2px 14px; border-left:3px solid var(--line); color:var(--muted); }
.body hr { border:0; border-top:1px solid var(--line); margin:18px 0; }
.body a { color:var(--accent); }
.body code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9em; background:#1b2029; border:1px solid var(--line); border-radius:6px; padding:1px 5px; }
/* A code block and a table scroll sideways by themselves, so a long line
   never widens the page on a phone. */
.body pre { margin:0 0 14px; padding:12px 14px; background:#0f1217; border:1px solid var(--line); border-radius:12px; overflow-x:auto; font-size:13px; line-height:1.55; }
.body pre code { font-size:1em; background:none; border:0; padding:0; white-space:pre; }
.body .tablewrap { margin:0 0 14px; overflow-x:auto; }
/* max-content keeps the columns readable: the wrapper scrolls instead of
   squeezing six columns into a phone. */
.body table { border-collapse:collapse; font-size:14px; width:max-content; }
.body th,.body td { border:1px solid var(--line); padding:6px 11px; text-align:left; vertical-align:top; }
.body th { background:#1b2029; font-weight:700; }
.body .al-center { text-align:center; }
.body .al-right { text-align:right; }
@keyframes blink { 50% { opacity:0; } }
.composer { display:flex; align-items:flex-end; gap:10px; margin:0 clamp(18px,6vw,76px); padding:12px; border:1px solid var(--line); border-radius:17px; background:var(--panel); box-shadow:0 12px 40px #0005; }
textarea { border:0; background:transparent; resize:none; padding:9px; max-height:180px; }
.status { min-height:40px; padding:8px clamp(30px,7vw,88px); color:var(--muted); font-size:12px; display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.hidden { display:none; }
.trial { color:var(--muted); font-size:12px; white-space:nowrap; }
.wall { margin:0 clamp(18px,6vw,76px); padding:22px; border:1px solid var(--line); border-radius:17px; background:var(--panel); text-align:center; box-shadow:0 12px 40px #0005; }
.wall strong { display:block; font-size:17px; margin-bottom:6px; }
.wall p { color:var(--muted); margin:0 0 14px; }
@media (max-width:720px) {
  header { padding:0 14px; gap:8px; }
  .brand small { display:none; }
  main { display:flex; flex-direction:column; min-height:0; }
  aside { border-right:0; border-bottom:1px solid var(--line); padding:12px 16px; display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
  aside label { grid-column:1 / -1; margin:0; }
  aside select { width:100%; }
  .capacity { display:none; }
  .quality:not([hidden]) { display:block; grid-column:1 / -1; color:var(--muted); font-size:12px; }
  .full { width:auto; margin:0; }
  .chat { flex:1; min-height:0; }
  .messages { padding-top:28px; }
  .composer { margin:0 12px; }
  .wall { margin:0 12px; }
  .status { padding:8px 16px; }
  .actions button { white-space:nowrap; padding:8px 10px; }
}
@media (max-width:345px) { .brand strong { display:none; } }
