:root { color-scheme: light; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color: #24282a; background: #fff; font-size: 16px; letter-spacing: 0; }
* { box-sizing: border-box; }
body { margin: 0; }
button,input,textarea,select { font: inherit; letter-spacing: 0; }
button,a,select,input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible { outline: 2px solid #257b63; outline-offset: 3px; }
button { color: inherit; }
a { color: #256b58; }
.shell { height: 100dvh; min-height: 420px; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.sidebar { background: #f4f5f4; border-right: 1px solid #e5e7e5; padding: 22px 15px 12px; display: flex; flex-direction: column; min-width: 0; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 2px 24px; }
.brand strong { font-size: 20px; flex: 1; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; color: #22785c; }
.brand-mark svg { width: 26px; height: 26px; }
.project-label { display: flex; gap: 9px; padding: 12px; color: #646b67; font-size: 14px; }
.project-label svg { width: 17px; height: 17px; color: #b75a46; }
#chat-list { overflow: auto; flex: 1; margin-top: 8px; }
.chat-item { display: block; width: 100%; border: 0; border-radius: 6px; text-align: left; padding: 12px; margin-bottom: 3px; background: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.chat-item:hover { background: #e9ece9; }
.chat-item.active { background: #e0e9e2; color: #235740; }
.sidebar-bottom { border-top: 1px solid #dfe3df; display: flex; align-items: center; gap: 7px; padding: 12px 0 0 4px; font-size: 12px; color: #66716a; }
.sidebar-bottom .icon-button { margin-left: auto; }
.connection-dot { width: 6px; height: 6px; border-radius: 50%; background: #697b6d; flex: none; }
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
header { height: 82px; flex: none; border-bottom: 1px solid #eceeec; padding: 14px 28px; display: flex; gap: 13px; align-items: center; }
.heading { flex: 1; min-width: 0; }
h1 { font-size: 17px; font-weight: 600; margin: 0 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-status { font-size: 12px; color: #737c76; }
.icon-button { display: inline-grid; place-items: center; height: 36px; width: 36px; flex: none; background: none; border: none; border-radius: 6px; text-decoration: none; }
.icon-button svg { width: 19px; height: 19px; stroke-width: 1.8; }
.icon-button:hover { background: #e8ece9; }
.icon-button.primary,.command.primary { background: #24634e; color: #fff; }
.icon-button.primary:hover,.command.primary:hover { background: #184c3a; }
.notice { margin: 16px 28px 0; padding: 12px 16px; border-left: 3px solid #bd7250; background: #fff4ed; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 34px max(24px,calc((100% - 800px)/2)); min-height: 0; }
.empty-state { margin: 12vh auto 0; text-align: center; color: #7b847e; }
.empty-state>svg { width: 35px; height: 35px; stroke-width: 1.3; color: #789b83; }
.empty-state h2 { font-size: 23px; color: #46544b; font-weight: 500; margin: 18px 0 8px; }
.empty-state p { margin: 0; font-size: 14px; }
.message { margin: 0 0 30px; line-height: 1.65; font-size: 16px; overflow-wrap: anywhere; }
.message .message-byline { font-size: 12px; font-weight: 600; color: #758078; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.message.user { margin-left: 12%; padding: 14px 18px; background: #f1f4f1; border-radius: 8px; }
.message.user .content { white-space: pre-wrap; }
.message p { margin: .5em 0 .9em; }
.message p:last-child { margin-bottom: 0; }
.message pre { padding: 16px; border: 1px solid #e0e4df; background: #f5f7f5; border-radius: 6px; overflow-x: auto; font-size: 13px; }
.message code { font-family: ui-monospace,SFMono-Regular,monospace; }
.message table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; font-size: 14px; }
.message th,.message td { border: 1px solid #d8dfd8; padding: 7px 10px; }
.message img { max-width: 100%; }
.message-file { font-size: 12px; color: #68776d; display: block; margin-top: 8px; }
footer { padding: 0 max(24px,calc((100% - 840px)/2)) 16px; flex: none; }
.composer { border: 1px solid #cdd7ce; border-radius: 8px; padding: 13px; box-shadow: 0 2px 8px #243a2610; }
textarea { display: block; resize: vertical; width: 100%; min-height: 52px; max-height: 220px; background: transparent; border: none; line-height: 1.5; padding: 0 4px; outline: none; }
textarea:focus-visible { outline: none; }
.composer:focus-within { border-color: #7caa8b; }
.composer-tools { display: flex; gap: 8px; align-items: center; padding-top: 8px; }
.composer-tools select { max-width: min(320px,65%); min-width: 0; font-size: 13px; border: 0; background: transparent; color: #65736a; padding: 7px 2px; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.footer-status { display: flex; gap: 16px; justify-content: space-between; color: #849087; font-size: 11px; margin: 9px 4px 0; }
#account-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#plan-label { white-space: nowrap; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pending-send { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 4px 10px; margin-bottom: 8px; background: #fff4ed; border-left: 3px solid #bd7250; font-size: 13px; }
.older-messages { display: block; margin: 0 auto 28px; border: 0; border-bottom: 1px solid #bacdbf; background: transparent; font-size: 13px; color: #647d6c; padding: 8px; }
.attachment { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #edf3ee; border-radius: 5px; max-width: 100%; font-size: 13px; }
.attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment .icon-button { width: 26px; height: 26px; }
.outputs { margin: 0 max(24px,calc((100% - 800px)/2)) 12px; display: flex; flex-wrap: wrap; gap: 8px; max-height: 100px; overflow-y: auto; }
.output-file { display: inline-flex; align-items: center; gap: 7px; border-bottom: 1px solid #c6d4c8; padding: 6px; font-size: 13px; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.output-file svg { width: 16px; height: 16px; flex: none; }
dialog { width: min(440px,calc(100% - 32px)); border: 1px solid #e0e5e0; border-radius: 8px; padding: 26px; box-shadow: 0 20px 90px #13271833; color: #28352d; }
dialog::backdrop { background: #15271f55; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.dialog-heading h2 { font-size: 20px; font-weight: 600; flex: 1; margin: 0; }
.dialog-heading>svg { width: 22px; color: #637e69; }
dialog label:not(.check-label) { display: block; font-size: 13px; margin-bottom: 8px; }
dialog input[type=password] { width: 100%; border: 1px solid #c9d1ca; border-radius: 5px; padding: 11px; }
.command { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border: 1px solid #c6d0c7; border-radius: 6px; background: #fff; font-size: 14px; }
#owner-form .command { width: 100%; }
.command.danger { color: #994f42; }
.account-divider { border-top: 1px solid #e2e7e2; margin: 24px 0; }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.check-label input { margin-top: 4px; width: 17px; height: 17px; flex: none; accent-color: #24634e; }
.settings-link { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; margin: 15px 0 4px; }
.settings-link svg { width: 13px; height: 13px; }
.muted { color: #78847b; font-size: 13px; line-height: 1.6; }
.error { color: #a74235; font-size: 13px; min-height: 18px; overflow-wrap: anywhere; }
.hidden { display: none !important; }
@media(min-width:901px) { #sidebar-toggle { display: none; } .shell.sidebar-hidden { grid-template-columns: minmax(0,1fr); } }
@media(max-width:900px) { .shell { grid-template-columns: minmax(0,1fr); } .sidebar { display: none; } .shell.sidebar-open .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 5; box-shadow: 0 0 0 100vw #14241a55; } header { height: 74px; padding: 12px 16px; } .messages { padding: 24px 20px; } footer { padding: 0 16px 14px; } .outputs { margin: 0 16px 12px; } .notice { margin: 12px 16px 0; } }
@media(max-width:420px) { .message.user { margin-left: 5%; } .message { font-size: 15px; } .composer-tools { gap: 4px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; } }
