:root { color-scheme: dark; font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; background: #0b1220; color: #f4f7fb; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
summary { cursor: pointer; font-weight: 650; padding: 4px 0 16px; }
.chat-toolbar { display:flex; gap:12px; justify-content:space-between; align-items:center; color:#aab8cc; font-size:14px; }
.chat-toolbar button { background:#233451; color:#f4f7fb; min-height:44px; }
.setup-panel { margin-bottom:16px; }
textarea, select { font-size:16px !important; }
textarea { resize:vertical; max-height:180px; }
button:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible { outline:3px solid #76a7ff; outline-offset:3px; }
.shell { padding-bottom:max(24px, env(safe-area-inset-bottom)) !important; }
body { margin: 0; min-width: 320px; background: #0b1220; }
.shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 48px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 4px; color: #76a7ff; font-size: 12px; letter-spacing: 2px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 34px; }
h2 { font-size: 21px; margin-bottom: 10px; }
.badge { border: 1px solid #28436f; color: #b9d1ff; padding: 7px 10px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.panel { border: 1px solid #233451; background: #111c2f; border-radius: 8px; padding: 24px; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.setup-panel p { color: #aab8cc; line-height: 1.65; }
label { display: block; margin: 20px 0 8px; color: #c5d3e7; font-size: 14px; }
select, textarea { width: 100%; border: 1px solid #304664; border-radius: 6px; background: #0c1627; color: #f4f7fb; padding: 12px; font: inherit; }
button { border: 0; border-radius: 6px; padding: 12px 18px; font: inherit; cursor: pointer; }
.primary { margin-top: 18px; background: #3d7bfd; color: white; font-weight: 650; }
button:disabled { cursor: wait; opacity: .55; }
.progress-wrap { margin-top: 18px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 8px; background: #233451; }
.progress-bar { height: 100%; width: 0; background: #5b92ff; transition: width .2s ease; }
.progress-wrap p, .status { margin: 8px 0 0; color: #aab8cc; font-size: 13px; }
.chat-panel { min-height: 520px; display: flex; flex-direction: column; gap: 18px; }
.messages { flex: 1; min-height: 160px; max-height: 48dvh; overflow: auto; display: flex; flex-direction: column; gap: 12px; overflow-wrap:anywhere; }
.message { max-width: 82%; padding: 12px 14px; border-radius: 8px; line-height: 1.65; white-space: pre-wrap; }
.message.user { align-self: flex-end; background: #2555aa; }
.message.assistant { align-self: flex-start; background: #1b2a43; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.send { margin-top: 0; }
@media (max-width: 560px) { .shell { width: min(100% - 20px, 920px); padding-top: 20px; } .panel { padding: 18px; } .topbar { align-items: center; } h1 { font-size: 28px; } .composer { grid-template-columns: 1fr; } .send { width: 100%; } }
