:root {
  color-scheme:dark;
  --bg:#212121;
  --panel:#171717;
  --panel2:#2b2b2b;
  --hover:#303030;
  --text:#f4f4f4;
  --muted:#a5a5a5;
  --border:#3b3b3b;
  --accent:#f4f4f4;
  --user:#303030;
  --shadow:0 18px 50px #0005;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
* {
  box-sizing:border-box}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-size:14px}
.app-shell {
  height:100dvh;
  min-height:500px;
  display:flex;
  overflow:hidden}
.sidebar {
  width:260px;
  flex:0 0 260px;
  background:var(--panel);
  display:flex;
  flex-direction:column;
  padding:14px 12px 10px;
  z-index:20}
.sidebar-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 2px 22px}
.brand-button {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  font-weight:650;
  font-size:15px;
  background:none;
  border:0;
  padding:5px;
  cursor:pointer}
.brand-mark,.welcome-mark {
  display:grid;
  place-items:center;
  background:#f4f4f4;
  color:#171717;
  font-weight:800;
  border-radius:11px;
  width:28px;
  height:28px;
  font-size:20px;
  line-height:1}
.brand-mark.small {
  width:24px;
  height:24px;
  font-size:17px;
  border-radius:8px}
.icon-button {
  width:34px;
  height:34px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--text);
  font-size:20px;
  display:grid;
  place-items:center;
  cursor:pointer}
.icon-button:hover,.profile-button:hover,.new-chat-button:hover {
  background:var(--hover)}
.sidebar-toggle {
  font-size:25px;
  color:var(--muted)}
.new-chat-button {
  height:40px;
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  border-radius:10px;
  text-align:left;
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:9px;
  font-weight:550;
  cursor:pointer}
.plus {
  font-size:20px;
  color:var(--muted)}
.history-heading {
  font-size:12px;
  color:var(--muted);
  font-weight:600;
  margin:25px 9px 9px}
.chat-list {
  overflow:auto;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:3px}
.history-item {
  border:0;
  background:transparent;
  color:var(--text);
  border-radius:8px;
  text-align:left;
  padding:10px 11px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0}
.history-item.active,.history-item:hover {
  background:var(--hover)}
.history-title {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1}
.delete-chat {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:17px;
  padding:0 3px;
  cursor:pointer;
  display:none}
.history-item:hover .delete-chat {
  display:block}
.sidebar-bottom {
  border-top:1px solid var(--border);
  padding-top:10px}
.profile-button {
  width:100%;
  border:0;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  border-radius:10px;
  padding:9px;
  cursor:pointer}
.avatar {
  width:32px;
  height:32px;
  border-radius:50%;
  background:#484848;
  display:grid;
  place-items:center;
  font-weight:700}
.profile-copy {
  display:flex;
  flex-direction:column;
  gap:3px;
  flex:1}
.profile-copy strong {
  font-size:12px}
.profile-copy small {
  font-size:11px;
  color:var(--muted)}
.dots {
  color:var(--muted);
  letter-spacing:2px}
.main-panel {
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  position:relative}
.topbar {
  height:58px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px}
.topbar-left,.topbar-right {
  display:flex;
  align-items:center;
  gap:10px}
.menu-button,.mobile-brand {
  display:none}
.model-label {
  border:1px solid var(--border);
  border-radius:999px;
  padding:7px 10px;
  color:var(--muted);
  font-size:12px;
  display:flex;
  gap:7px;
  align-items:center}
.status-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#75c99a}
.conversation {
  flex:1;
  min-height:0;
  overflow:auto;
  scroll-behavior:smooth;
  padding:12px 24px 20px}
.welcome {
  max-width:740px;
  margin:clamp(30px,9vh,100px) auto 0}
.welcome-mark {
  width:43px;
  height:43px;
  border-radius:14px;
  font-size:30px;
  margin-bottom:24px}
.welcome h1 {
  font-size:clamp(27px,4vw,35px);
  font-weight:550;
  letter-spacing:-1.1px;
  margin:0 0 10px}
.welcome>p {
  font-size:15px;
  color:var(--muted);
  margin:0 0 29px;
  line-height:1.6}
.suggestions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px}
.suggestion {
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  background:transparent;
  border:1px solid var(--border);
  border-radius:13px;
  padding:15px;
  color:var(--text);
  cursor:pointer;
  min-height:75px}
.suggestion:hover {
  background:var(--panel2)}
.suggestion-icon {
  color:var(--muted);
  font-size:19px;
  width:26px;
  text-align:center}
.suggestion span:last-child {
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0}
.suggestion strong {
  font-weight:550;
  font-size:13px}
.suggestion small {
  color:var(--muted);
  font-size:12px}
.messages {
  max-width:760px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:25px;
  padding:16px 0 24px}
.message {
  display:flex;
  gap:12px;
  align-items:flex-start;
  line-height:1.7;
  min-width:0}
.message.user {
  justify-content:flex-end}
.message .message-body {
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere}
.message.user .message-body {
  background:var(--user);
  padding:11px 16px;
  border-radius:20px;
  max-width:min(84%,620px);
  white-space:pre-wrap}
.message.assistant .message-body {
  flex:1;
  padding-top:2px}
.message-avatar {
  width:29px;
  height:29px;
  flex:0 0 29px;
  border-radius:10px;
  background:#f4f4f4;
  color:#171717;
  display:grid;
  place-items:center;
  font-weight:800}
.message p {
  margin:0 0 12px}
.message p:last-child {
  margin-bottom:0}
.message pre {
  background:#111;
  border:1px solid var(--border);
  padding:14px;
  border-radius:10px;
  overflow:auto;
  white-space:pre;
  max-width:100%}
.message code {
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:.9em}
.message :not(pre)>code {
  background:var(--panel2);
  padding:2px 5px;
  border-radius:5px}
.message ul,.message ol {
  padding-left:24px}
.message h1,.message h2,.message h3 {
  line-height:1.3;
  margin:16px 0 8px}
.message h1 {
  font-size:23px}
.message h2 {
  font-size:19px}
.message h3 {
  font-size:16px}
.message blockquote {
  border-left:3px solid var(--border);
  padding-left:12px;
  color:var(--muted);
  margin:8px 0}
.message-actions {
  display:flex;
  gap:6px;
  margin-top:9px}
.message-action {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  padding:5px 7px;
  border-radius:6px;
  cursor:pointer}
.message-action:hover {
  background:var(--hover);
  color:var(--text)}
.typing {
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px}
.typing-pulse {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--muted);
  animation:pulse 1s infinite alternate}
@keyframes pulse {
  to {
  opacity:.25;
  transform:scale(.8)}
}
.composer-area {
  padding:8px 22px 10px;
  flex-shrink:0}
.composer {
  max-width:760px;
  margin:0 auto;
  background:var(--panel2);
  border:1px solid #414141;
  border-radius:23px;
  padding:12px 12px 9px;
  box-shadow:0 5px 25px #0000000a}
.composer textarea {
  width:100%;
  resize:none;
  max-height:180px;
  min-height:30px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:15px;
  line-height:1.5;
  padding:3px 4px 9px}
.composer textarea::placeholder {
  color:var(--muted)}
.composer-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px}
.composer-note {
  font-size:10px;
  color:var(--muted);
  padding-left:4px}
.send-button {
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:#f4f4f4;
  color:#171717;
  font-size:24px;
  font-weight:600;
  display:grid;
  place-items:center;
  cursor:pointer;
  flex-shrink:0}
.send-button:disabled {
  opacity:.35;
  cursor:not-allowed}
.send-button span {
  transform:translateY(-1px)}
footer {
  text-align:center;
  color:var(--muted);
  font-size:10px;
  padding-top:10px}
footer span {
  padding:0 4px}
.modal-backdrop {
  position:fixed;
  inset:0;
  background:#0009;
  z-index:50;
  display:grid;
  place-items:center;
  padding:20px}
.modal-backdrop[hidden] {
  display:none}
.settings-modal {
  width:min(100%,470px);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:17px;
  padding:22px;
  box-shadow:var(--shadow)}
.modal-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:24px}
.modal-heading h2 {
  font-size:20px;
  margin:0 0 5px}
.modal-heading p,.help-text {
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
  margin:0}
.settings-modal label {
  display:block;
  font-size:12px;
  font-weight:600;
  margin-bottom:8px}
.settings-modal input {
  width:100%;
  background:var(--bg);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:9px;
  padding:12px;
  font:inherit;
  font-size:13px;
  outline:none}
.settings-modal input:focus {
  border-color:#858585}
.help-text {
  margin-top:9px}
.modal-actions {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:23px}
.primary-button,.secondary-button {
  border-radius:9px;
  padding:10px 13px;
  font:inherit;
  font-size:12px;
  font-weight:600;
  cursor:pointer}
.primary-button {
  background:#f4f4f4;
  color:#171717;
  border:1px solid #f4f4f4}
.secondary-button {
  background:transparent;
  color:var(--text);
  border:1px solid var(--border)}
.settings-status {
  font-size:12px;
  color:var(--muted);
  margin-bottom:0}
.sidebar-scrim {
  display:none}
body.light {
  color-scheme:light;
  --bg:#fff;
  --panel:#f7f7f7;
  --panel2:#f1f1f1;
  --hover:#e9e9e9;
  --text:#202020;
  --muted:#737373;
  --border:#dedede;
  --accent:#202020;
  --user:#f0f0f0;
  --shadow:0 18px 50px #0002}
body.light .brand-mark,body.light .welcome-mark,body.light .message-avatar {
  background:#222;
  color:#fff}
body.light .send-button {
  background:#222;
  color:#fff}
body.light .primary-button {
  background:#222;
  color:#fff;
  border-color:#222}
body.light .message pre {
  background:#f7f7f7}
@media(min-width:1200px) {
  .welcome {
  margin-top:clamp(55px,11vh,120px)}
}
@media(max-width:760px) {
  .app-shell {
  min-height:420px}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:min(300px,85vw);
  transform:translateX(-102%);
  transition:transform .22s ease;
  box-shadow:none}
.sidebar.open {
  transform:translateX(0);
  box-shadow:var(--shadow)}
.sidebar-scrim.show {
  display:block;
  position:fixed;
  inset:0;
  background:#0008;
  z-index:15}
.sidebar-toggle {
  display:grid}
.main-panel {
  width:100%}
.topbar {
  height:54px;
  padding:0 13px}
.menu-button,.mobile-brand {
  display:flex;
  align-items:center}
.mobile-brand {
  gap:8px;
  font-size:14px;
  font-weight:600}
.topbar-left {
  gap:8px}
.model-label {
  font-size:11px;
  padding:6px 8px}
.conversation {
  padding:4px 16px 12px}
.welcome {
  margin:clamp(40px,11vh,90px) auto 0}
.welcome-mark {
  margin-bottom:19px}
.welcome h1 {
  font-size:29px}
.welcome>p {
  font-size:14px}
.suggestions {
  grid-template-columns:1fr;
  gap:8px}
.suggestion {
  min-height:61px;
  padding:11px 13px}
.suggestion-icon {
  font-size:17px}
.suggestion small {
  font-size:11px}
.messages {
  padding-top:12px;
  gap:22px}
.composer-area {
  padding:7px 10px max(8px,env(safe-area-inset-bottom))}
.composer {
  border-radius:20px;
  padding:10px 10px 8px}
.composer textarea {
  font-size:16px}
.composer-note {
  font-size:9px}
.message.user .message-body {
  max-width:88%}
.settings-modal {
  padding:18px}
.modal-actions {
  flex-wrap:wrap}
.modal-actions button {
  flex:1}
.history-item .delete-chat {
  display:block}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
  animation-duration:.01ms!important;
  transition-duration:.01ms!important;
  scroll-behavior:auto!important}
}
