:root {
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152e29; background: #f5f7f3; font-synthesis: none; -webkit-font-smoothing: antialiased;
  --ink: #152e29; --green: #153d33; --muted: #52655c; --line: #d6ded6; --acid: #d6f291;
  --paper: #fff; --soft: #f0f5ed; --error: #a12c2a;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea, select { font: inherit; }
button, .button, .brand { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-underline-offset: 3px; }
button, .button {
  min-height: 40px; font-weight: 650; font-size: .875rem; cursor: pointer; border: 1px solid var(--line);
  border-radius: 9px; padding: .61rem .95rem; color: var(--ink); background: white; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; text-decoration: none;
}
button:hover, .button:hover { background: #f2f6ef; border-color: #a7b6a8; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #548745; outline-offset: 3px;
}
button:disabled { cursor: wait; opacity: .65; }
button.primary, .button.primary { background: var(--green); color: #fff; border-color: var(--green); }
button.primary:hover, .button.primary:hover { background: #225043; }
button.primary:disabled { cursor: default; }
.ghost { background: transparent; border-color: transparent; }
.danger { color: var(--error); }
.mast { background: var(--ink); color: #fff; }
.mast-inner { max-width: 1400px; margin: auto; min-height: 66px; padding: 0 clamp(1rem,4vw,3.5rem); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { color: white; text-decoration: none; font-size: 1.18rem; font-weight: 720; letter-spacing: -.04em; display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; }
.brand-mark { position: relative; display: inline-block; width: 30px; height: 28px; }
.brand-mark i { width: 20px; height: 16px; display: block; border: 2px solid var(--acid); border-radius: 5px 5px 5px 0; position:absolute; top:1px; left:0; }
.brand-mark i + i { top:10px; left:10px; border-color:var(--ink); box-shadow:0 0 0 2px var(--ink); background:var(--acid); border-radius:5px 5px 0 5px; }
.account { display: flex; align-items: center; color: #d9e4d8; gap: .85rem; min-width:0; }
.account-name { max-width: min(36vw, 260px); font-size: .85rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account button { min-height: 32px; font-size: .815rem; border-color:#527265; color:white; background: transparent; padding:.42rem .65rem; }
.account button:hover { background:#264b3e; }
.loading, .load-failure { padding: clamp(2rem,8vw,6rem); color: var(--muted); }
.welcome { max-width:1230px; margin:auto; min-height: calc(93svh - 66px); display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); align-items:center; gap: clamp(2.25rem,6vw,6rem); padding:clamp(2.5rem,7vw,6rem) clamp(1.3rem,5vw,4.5rem); }
.welcome h1 { margin:0; font-size:clamp(3rem,6.6vw,6rem); line-height: .99; letter-spacing:-.055em; font-weight:640; text-wrap:balance; }
.welcome-lead { margin:1.35rem 0 2rem; max-width:36ch; color:var(--muted); font-size:1.13rem; line-height:1.55; }
.google { min-height:48px; padding:.8rem 1.15rem; font-size:.97rem; }
.status-line { font-size:.9rem; line-height:1.45; color:var(--muted); max-width:43ch; }
.preview { background: #183c32; background-image: radial-gradient(ellipse at 85% 10%,#355b42,transparent 57%); color:#f7faf1; min-height:360px; padding:clamp(1.5rem,3vw,2.8rem); border-radius:22px; display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden; }
.preview:before { content:""; opacity:.48; position:absolute; left:13%; bottom:33%; width:160%; height:110%; transform:rotate(-32deg); border:1px solid #75956f; border-radius:46%; box-shadow: 0 0 0 13px #183c32,0 0 0 14px #5a7c5d,0 0 0 28px #183c32,0 0 0 29px #456d51,0 0 0 44px #183c32,0 0 0 45px #3c664d; pointer-events:none; }
.preview > * { position:relative; }
.preview-mark { width:50px; height:50px; display:grid; place-items:center; background:var(--acid); color:var(--ink); border-radius:15px; }
.preview-mark .icon { width:28px; height:28px; }
.preview-caption { display:block; font-size:.875rem; color:#c6dac5; margin-bottom:.6rem; }
.preview blockquote { font-size:clamp(1.4rem,2.8vw,2.15rem); line-height:1.23; letter-spacing:-.045em; margin:0; overflow-wrap:anywhere; max-width:22ch; }
.icon { display:inline-block; height:16px; width:16px; flex:none; vertical-align:middle; stroke:currentColor; stroke-width:1.65; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.workspace { max-width:1400px; margin:auto; display:grid; grid-template-columns:260px minmax(0,1fr); gap:22px; padding:clamp(1rem,2.7vw,2.4rem) clamp(1rem,4vw,3.5rem); }
.sidebar, .conversation { border:1px solid var(--line); border-radius:15px; background:white; }
.sidebar { align-self:start; padding:1.2rem 1rem; min-height:350px; }
.sidebar-head, .dialog-head, .feed-head, .header-actions, .room-tools, .split, .row, .inline-actions, .composer-bar { display:flex; align-items:center; gap:.55rem; }
.sidebar-head, .dialog-head, .feed-head, .composer-bar, .split { justify-content:space-between; }
h2,h3,p { margin-top:0; }
.sidebar h2 { font-size:1.08rem; letter-spacing:-.04em; margin:0; }
.icon-only { display:grid; place-items:center; padding:.38rem; width:32px; min-height:32px; border-radius:8px; }
.sidebar .new-room { margin-top:1.1rem; width:100%; }
.room-group { margin:1.35rem 0 .45rem; font-size:.78rem; font-weight:700; color:var(--muted); letter-spacing:.035em; text-transform:uppercase; }
.room-list { display:grid; gap:3px; }
.room-item { display:flex; width:100%; min-height:39px; justify-content:flex-start; text-align:left; padding:.55rem .6rem; border-color:transparent; border-radius:7px; font-weight:500; }
.room-item span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.room-item[aria-current=true] { background:#eaf2e2; border-color:#d6e4ce; color:#1d422d; font-weight:660; }
.subtle, .help { color:var(--muted); font-size:.89rem; line-height:1.5; }
.subtle { margin:0; }
.conversation { min-height:min(730px,calc(100svh - 130px)); display:flex; flex-direction:column; min-width:0; }
.blank { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:3rem 1.4rem; }
.blank .preview-mark, .empty-feed .preview-mark { width:42px; height:42px; border-radius:12px; background:#e9f0e1; margin:0 auto 1rem; }
.blank .preview-mark .icon, .empty-feed .preview-mark .icon { height:23px; width:23px; }
.blank h1 { font-size:clamp(1.65rem,4vw,2.65rem); letter-spacing:-.045em; line-height:1.08; margin:0 0 .6rem; }
.blank p { max-width:42ch; color:var(--muted); line-height:1.5; margin-bottom:1.2rem; }
.room-header { padding:1.35rem clamp(1rem,2.5vw,1.8rem); border-bottom:1px solid var(--line); }
.room-meta { display:flex; align-items:center; gap:.45rem; font-size:.83rem; font-weight:650; color:var(--muted); }
.room-header h1 { font-size:clamp(1.45rem,3.6vw,2.55rem); line-height:1.08; font-weight:650; letter-spacing:-.045em; margin:.65rem 0 1.1rem; overflow-wrap:anywhere; }
.room-tools { flex-wrap:wrap; }
.room-tools button { min-height:35px; padding:.5rem .68rem; font-size:.83rem; }
.room-id { color:var(--muted); font-family:ui-monospace,monospace; font-size:.75rem; }
.thread { padding:1.2rem clamp(1rem,2.5vw,1.8rem); flex:1; min-height:190px; }
.feed-head h2 { font-size:.97rem; margin:0; }
.feed-head { margin-bottom:.75rem; }
.feed-head button { min-height:30px; }
.log { overflow:auto; max-height: min(53svh,610px); min-height:90px; scrollbar-width:thin; padding-right:.2rem; }
.empty-feed { text-align:center; color:var(--muted); padding:2.2rem .5rem; }
.empty-feed h3 { color:var(--ink); font-size:1rem; margin:0 0 .35rem; }
.empty-feed p { font-size:.90rem; margin:0; }
.message { display:grid; grid-template-columns:33px minmax(0,1fr); gap:.7rem; padding:.78rem 0; }
.avatar { display:grid; width:33px; height:33px; place-items:center; border-radius:10px; background:#e7eddf; font-size:.81rem; font-weight:750; color:#31553e; }
.avatar.agent { background:#e9e6f1; color:#574b70; }
.message-by { display:flex; align-items:baseline; flex-wrap:wrap; gap:.35rem .55rem; }
.message-by strong { font-size:.9rem; overflow-wrap:anywhere; }
.message-by small, .message-by time { color:var(--muted); font-size:.77rem; }
.message p { white-space:pre-wrap; overflow-wrap:anywhere; margin:.22rem 0 0; line-height:1.48; font-size:.97rem; }
.composer { border-top:1px solid var(--line); padding:1rem clamp(1rem,2.5vw,1.8rem); background:#fbfcfa; border-radius:0 0 15px 15px; }
.composer textarea { min-height:70px; max-height:200px; }
.composer-bar { justify-content:flex-end; margin-top:.55rem; }
input,textarea,select { color:var(--ink); border:1px solid #bcc8bc; border-radius:8px; background:white; padding:.64rem .75rem; width:100%; }
textarea { resize:vertical; }
input::placeholder,textarea::placeholder { color:#6b7d73; }
label, .legend { display:block; font-size:.90rem; font-weight:660; margin-bottom:.4rem; }
.field { margin:1.05rem 0; }
.help { margin:.55rem 0; }
.error { color:var(--error); font-size:.9rem; line-height:1.4; margin:.75rem 0; }
.error:empty { margin:0; }
dialog { padding:0; color:var(--ink); border:1px solid var(--line); border-radius:16px; width:min(480px,calc(100vw - 24px)); max-height:90svh; overflow:auto; box-shadow:0 20px 85px #102d2436; }
dialog::backdrop { background:rgb(17 39 31 / .48); }
#modal-inner { padding:1.45rem; }
.dialog-head { margin-bottom:.8rem; }
.dialog-head h2 { font-size:1.45rem; line-height:1.12; letter-spacing:-.05em; margin:0; }
.dialog-actions { margin-top:1.2rem; display:flex; justify-content:flex-end; gap:.55rem; }
.inline-actions { flex-wrap:wrap; }
.choice { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.choice label { position:relative; margin:0; display:flex; align-items:center; gap:.6rem; padding:.72rem; border:1px solid var(--line); border-radius:8px; font-weight:550; cursor:pointer; }
.choice input { width:16px; height:16px; accent-color:var(--green); margin:0; }
.choice label:has(:checked) { border-color:#678765; background:var(--soft); }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); border:0; white-space:nowrap; }
.info { background:var(--soft); border:1px solid var(--line); padding:.8rem; border-radius:9px; color:var(--muted); font-size:.885rem; line-height:1.45; }
.info p:last-child { margin-bottom:0; }
.step { border-top:1px solid var(--line); padding-top:1rem; margin-top:1rem; }
.step h3 { font-size:1rem; margin:0 0 .45rem; }
.step p { font-size:.9rem; line-height:1.48; margin-bottom:.65rem; }
.step pre { font-size:.8rem; line-height:1.5; background:#f1f4ef; border-radius:7px; padding:.65rem; white-space:pre-wrap; overflow-wrap:anywhere; user-select:all; }
.agent-line { display:flex; align-items:center; gap:.6rem; justify-content:space-between; padding:.4rem 0; font-size:.9rem; }
.agent-line span { overflow-wrap:anywhere; }
.agent-line button { min-height:30px; font-size:.78rem; padding:.35rem .55rem; }
.invite-card { max-width:500px; margin:clamp(2rem,8vh,5rem) auto; padding:1.5rem; background:white; border:1px solid var(--line); border-radius:14px; }
.invite-card h1 { font-size:1.7rem; letter-spacing:-.055em; margin:0 0 .6rem; }
#notice { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); padding:.7rem 1.05rem; border-radius:11px; background:var(--ink); color:white; z-index:3; font-size:.9rem; box-shadow:0 5px 25px #143e2c29; width:max-content; max-width:92vw; }
#notice:empty { display:none; }
@media(max-width:800px) { .workspace {grid-template-columns:195px minmax(0,1fr);gap:12px;} .sidebar {padding:.9rem .7rem;} .welcome {gap:2rem;} .preview {min-height:295px;} }
@media(max-width:620px) {
  .welcome { grid-template-columns:1fr; padding-top:3.1rem; gap:2.3rem; align-content:start; }
  .welcome h1 { max-width:10ch; } .welcome-lead { margin-bottom:1.3rem; } .preview { min-height:230px; border-radius:16px; gap:2.3rem; }
  .workspace { grid-template-columns:1fr; padding:.8rem; }
  .sidebar { min-height:0; padding:.8rem; }
  .sidebar .new-room { width:auto; margin:0; padding:.45rem .65rem; min-height:32px; }
  .sidebar-head h2 { flex:1; } .sidebar-head { flex-wrap:wrap; }
  .room-group { margin:.7rem 0 .25rem; } .room-list { display:flex; overflow-x:auto; }
  .room-item { width:auto; max-width:235px; flex-shrink:0; min-height:33px; }
  .conversation { min-height:420px; }
  .room-header { padding:1rem; } .thread { padding:1rem; }
  .invite-card { margin:1rem; } .account { gap:.35rem; } .account-name { max-width:31vw; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; } }
@media(min-width:621px) { .sidebar-head { flex-wrap:wrap; gap:0; } .sidebar-head h2 { width:100%; } }

.step details { font-size:.875rem; } .step summary { cursor:pointer; color:var(--green); }
