:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #e2e7e2; background: #111413; font-size: 15px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 9px; transition: background .15s; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #b4ce8d; outline-offset: 3px; }
input, select, textarea { width: 100%; padding: 12px; color: #e2e7e2; background: #202623; border: 1px solid #39423b; border-radius: 9px; font-size: 16px; }
textarea { resize: vertical; }
label { display: block; font-size: .85rem; font-weight: 600; margin: 18px 0 7px; }
h1, h2, h3, p { margin: 0; }
.primary { background: #b4ce8d; color: #182312; padding: 12px 18px; font-weight: 600; white-space: nowrap; }
.primary:hover { background: #c6da9b; }
.quiet { padding: 10px 12px; background: transparent; color: #b2bdb0; }
.quiet:hover { background: #2a342c; }
.danger { color: #f1ab9f; background: #392724; padding: 12px; }
.eyebrow { color: #9aa993; font-size: .64rem; letter-spacing: .16em; font-weight: 700; margin-bottom: 6px; }
.brand-mark { width: 60px; height: 60px; border-radius: 18px; background: #35462f; color: #cee2af; font: bold 49px Georgia, serif; text-align: center; line-height: 60px; }
.brand-mark.small { width: 43px; height: 43px; border-radius: 12px; font-size: 37px; line-height: 43px; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 70% 0, #1f2c20, transparent 60%), #111413; }
.login-card { width: min(100%, 400px); }
.login-card .brand-mark { margin-bottom: 34px; }
.login-card h1 { font-size: 2.4rem; letter-spacing: -.06em; margin: 10px 0 20px; }
h1 span { font-weight: 400; color: #a0af97; }
.login-card > p:not(.eyebrow) { line-height: 1.7; color: #a2ad9d; }
.login-card form { margin: 30px 0 20px; }
.login-card .primary { width: 100%; margin-top: 24px; display: flex; justify-content: space-between; }
.fine { font-size: .7rem; color: #a1ad9b; line-height: 1.5; }
#workspace { height: 100dvh; max-width: 1540px; margin: auto; display: flex; flex-direction: column; padding: 0 28px 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; gap: 16px; }
.identity { display: flex; align-items: center; gap: 13px; }
.identity h1 { font-size: 1.4rem; letter-spacing: -.06em; }
.identity p { margin-top: 4px; font-size: .75rem; color: #a1ad9b; }
.top-actions { display: flex; align-items: center; gap: 14px; }
#connection { font-size: .7rem; color: #a6b59b; }
.tabs { display: none; }
.panels { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; }
.panel { background: #181d1a; border: 1px solid #303a31; border-radius: 16px; overflow: hidden; min-height: 0; display: flex; flex-direction: column; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 23px 24px; border-bottom: 1px solid #303a31; flex-shrink: 0; }
.panel-heading h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.035em; }
.members { display: flex; padding-left: 8px; }
.members span { width: 31px; height: 31px; display: grid; place-items: center; background: #514c3b; border: 2px solid #181d1a; border-radius: 50%; margin-left: -6px; font-size: .6rem; font-weight: 700; }
.members span:nth-child(2) { background: #354653; }
.members .ai-avatar { background: #35462f; }
.messages { flex: 1; overflow-y: auto; padding: 28px 24px; overscroll-behavior: contain; }
.empty-chat { max-width: 330px; margin: 12vh auto 20px; text-align: center; }
.spark { color: #b4ce8d; font-size: 3rem; margin-bottom: 24px; }
.empty-chat h3 { font-weight: 500; font-size: 1.3rem; letter-spacing: -.04em; }
.empty-chat p, .empty-tasks p { font-size: .85rem; line-height: 1.8; margin-top: 12px; color: #a9b5a2; }
.message { margin-bottom: 25px; max-width: 87%; width: fit-content; }
.message.own { margin-left: auto; }
.message-meta { display: flex; gap: 10px; align-items: center; margin: 0 2px 7px; }
.message-meta strong { font-size: .7rem; font-weight: 600; }
.message-meta time { font-size: .61rem; color: #9ba693; }
.bubble { padding: 13px 15px; background: #252e27; border-radius: 3px 13px 13px 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.own .bubble { background: #31432c; border-radius: 13px 3px 13px 13px; }
.system-message { max-width: 100%; }
.system-message .bubble { padding: 8px 0; background: transparent; color: #a9b5a2; font-size: .73rem; }
.change-badge { display: inline-block; font-size: .66rem; color: #b8d29b; margin-top: 8px; }
.compose-area { border-top: 1px solid #303a31; padding: 15px 20px 17px; }
.hint { color: #a1ad9b; font-size: .73rem; line-height: 1.6; }
.composer { display: flex; gap: 12px; align-items: flex-end; background: #202623; border: 1px solid #3b4838; border-radius: 12px; padding: 7px; margin: 10px 0; }
.composer textarea { border: none; resize: none; background: transparent; max-height: 180px; }
.composer .primary { margin-bottom: 2px; }
.task-tools { padding: 16px 20px; display: flex; gap: 8px; }
.task-tools select { background: #232c25; border: 0; padding: 10px; font-size: .8rem; }
.task-list { padding: 2px 20px 20px; overflow-y: auto; flex: 1; }
#task-total { font-size: .7rem; margin-left: 6px; border-radius: 20px; padding: 3px 7px; background: #2d3929; color: #b5c4a6; vertical-align: middle; }
.status-heading { display: flex; justify-content: space-between; padding: 13px 2px; font-size: .72rem; color: #a9b99f; font-weight: 600; }
.status-heading span { font-weight: 400; }
.task-card { width: 100%; text-align: left; background: #202623; border: 1px solid #364231; padding: 16px; margin-bottom: 10px; display: block; }
.task-card:hover { background: #283424; }
.category-tag { display: block; width: fit-content; font-size: .6rem; padding: 4px 7px; border-radius: 4px; color: #b6cba3; background: #2c3a26; margin-bottom: 10px; overflow-wrap: anywhere; }
.task-card strong { display: block; font-weight: 600; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.task-card p { margin-top: 8px; color: #a9b69f; font-size: .76rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 76px; overflow: hidden; }
.card-link { display: block; margin-top: 15px; font-size: .65rem; color: #adbe9f; }
.task-footer { padding: 14px 20px; border-top: 1px solid #303a31; color: #a3b097; font-size: .65rem; }
.empty-tasks { text-align: center; padding: 12vh 15px 30px; }
.empty-tasks h3 { font-size: 1rem; line-height: 1.6; font-weight: 500; }
.empty-symbol { color: #b4ce8d; font-size: 2rem; margin-bottom: 20px; }
dialog { width: min(94vw, 520px); max-height: 90dvh; border: 1px solid #404d38; border-radius: 16px; padding: 24px; background: #181d1a; color: #e2e7e2; }
dialog::backdrop { background: #12241f80; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { font-size: 1.2rem; }
.dialog-error { background: #392724; color: #f1ab9f; padding: 12px; margin-top: 12px; border-radius: 8px; font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dialog-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }
.notice { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(94vw, 640px); z-index: 20; display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 16px 20px; background: #342b22; border: 1px solid #aa8862; border-radius: 12px; color: #f1c99a; box-shadow: 0 8px 35px #12241f20; font-size: .85rem; }
.notice button { background: transparent; color: inherit; font-size: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  #workspace { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .topbar { padding: 16px; }
  .identity p { display: none; }
  .identity h1 { font-size: 1.15rem; }
  .brand-mark.small { width: 34px; height: 34px; font-size: 29px; line-height: 34px; border-radius: 9px; }
  .top-actions { gap: 4px; }
  #connection { max-width: 105px; font-size: .6rem; }
  .top-actions .quiet { padding: 10px 5px; font-size: .7rem; }
  .tabs { display: flex; border-bottom: 1px solid #364231; gap: 18px; padding: 0 18px; }
  .tabs button { padding: 12px 4px; border-radius: 0; background: transparent; color: #a5b29a; border-bottom: 2px solid transparent; font-size: .85rem; }
  .tabs button[aria-pressed="true"] { border-color: #b4ce8d; color: #b4ce8d; font-weight: 600; }
  #task-count { margin-left: 5px; font-size: .65rem; background: #303e29; padding: 2px 6px; border-radius: 20px; }
  .panels { display: flex; gap: 0; }
  .panel { width: 100%; border: 0; border-radius: 0; }
  .panels[data-view="chat"] .tasks, .panels[data-view="tasks"] .chat { display: none; }
  .panel-heading { padding: 18px; }
  .messages { padding: 22px 16px; }
  .message { max-width: 92%; }
  .compose-area { padding: 12px; }
  .compose-area .fine { font-size: .59rem; }
  .composer { gap: 4px; }
  .composer .primary { padding: 12px; font-size: .8rem; }
  .empty-chat { margin-top: 8vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
