/* Chat workspace: retain the original green palette, with clearer navigation and quieter surfaces. */
:root{--workspace-border:#e2ece4;--workspace-soft:#f4f8f1;--workspace-radius:18px}
body{background:#f0f3ef}
.chat-app{width:calc(100% - 48px);max-width:1640px;grid-template-columns:80px 360px minmax(0,1fr);margin:24px auto;height:calc(100dvh - 48px);border-radius:22px;border-color:#dfe7de;box-shadow:0 16px 60px #28483909}
.workspace-rail{display:flex;flex-direction:column;align-items:center;gap:38px;padding:26px 10px 22px;background:#edf3e9;border-right:1px solid #e0e9dd;min-height:0}
.rail-brand{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#fff;border:1px solid #dfe9dc}
.rail-links{display:flex;flex-direction:column;gap:15px;width:100%}.rail-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:62px;border-radius:13px;color:#7c8d7e;font-size:12px}.rail-link svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}.rail-link.active{color:#147d64;background:#fff;box-shadow:0 3px 12px #28483906}.rail-link:hover:where(html:not([data-input="touch"]) *){background:#fff}.rail-link img{filter:grayscale(1);opacity:.68}.rail-signature{margin-top:auto;text-align:center;font-size:12px;line-height:2;letter-spacing:2px;color:#99a595}
.sidebar{border-right:1px solid var(--workspace-border);background:#fff}.sidebar-brand{padding:28px 24px 26px;min-height:94px}.sidebar-brand .brand{font-size:21px;letter-spacing:.5px}.sidebar-brand .brand img{display:none}.sidebar-brand .brand-en{letter-spacing:1.5px;font-size:12px;margin-top:5px}.school-label{border:0;background:#f0f5ec;border-radius:6px;font-size:12px;padding:6px 8px;color:#799175}
.sidebar-section-label{padding:0 24px 12px;font-size:12px;letter-spacing:1.6px;color:#a2ae9e}.sidebar-heading{padding:0 24px}.sidebar-heading h1{font-size:26px;letter-spacing:-.5px}.sidebar-heading h1 span{border-radius:6px;background:#eef4e9;font-size:12px;padding:4px 7px}.connection{font-size:12px}.search-box{margin:22px 20px 22px;padding:12px 13px;border:1px solid #e8ede5;background:#f8faf6;border-radius:11px}.search-box svg{width:17px;height:17px;flex:none}.search-box input{font-size:12px}.list-heading{font-size:12px;color:#9ba697;letter-spacing:.5px;padding-bottom:13px}.list-heading span:last-child{font-size:12px}
.user-list{padding:0 12px 12px;scrollbar-width:thin;scrollbar-color:#dfe7d9 transparent}.user-item{position:relative;border:1px solid transparent;border-radius:13px;padding:15px 12px;margin:4px 0;gap:11px;transition:background .15s,border-color .15s}.user-item:hover:where(html:not([data-input="touch"]) *){transform:none;background:#f5f8f1;box-shadow:none}.user-item.selected{background:#eaf2e6;border-color:#dce8d4;box-shadow:none}.user-item.selected::after{content:'';position:absolute;right:0;top:22px;bottom:22px;width:3px;border-radius:4px;background:#258264}.user-item.group-item{background:#f3f8ef;border-color:#e3eddd;box-shadow:none;margin-bottom:12px}.user-item.group-item.selected{background:#e4f0de;box-shadow:none;border-color:#d0e2c8}.user-top strong{font-size:12px;font-weight:650}.user-top time{font-size:12px}.user-bottom{margin-top:6px}.preview{font-size:12px}.user-item .avatar{height:42px;width:42px;border-radius:12px;font-size:15px}.role-badge{font-size:12px;padding:4px 6px}.unread{font-size:12px;min-width:18px;height:18px}
.sidebar-utilities{padding:15px 18px 16px;border-top:1px solid var(--workspace-border);display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:stretch}.utilities-heading{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#879782;padding:1px 4px 6px}.utilities-heading small{font-size:12px;letter-spacing:1.5px;color:#a4afa0}.sidebar-utilities .drive-entry,.sidebar-utilities .announcement-entry,.sidebar-utilities .tools-entry{grid-column:auto;display:flex;align-items:center;gap:7px;min-height:45px;margin:0;padding:10px 9px;border-radius:10px;border:1px solid #e6ede1;background:#fafcf8;color:#657f63;font-size:12px;font-weight:500;box-shadow:none}.sidebar-utilities .drive-entry:hover:where(html:not([data-input="touch"]) *),.sidebar-utilities .announcement-entry:hover:where(html:not([data-input="touch"]) *),.sidebar-utilities .tools-entry:hover:where(html:not([data-input="touch"]) *){background:#eef5e9;border-color:#d2e2c9;transform:none}.sidebar-utilities .drive-entry>img,.sidebar-utilities .announcement-entry>svg,.sidebar-utilities .tools-entry>svg{width:19px;height:19px;flex:none}.sidebar-utilities .drive-entry>span:last-child,.sidebar-utilities .tools-entry>span:last-child{display:none}.sidebar-utilities #announcement-unread{margin-left:auto}.my-profile{padding:17px 21px;gap:10px;background:#fff}.my-profile .avatar{width:35px;height:35px;border-radius:10px}.profile-text strong{font-size:12px}.profile-text span{font-size:12px}.my-profile .icon-button{padding:6px}.my-profile .role-badge{max-width:62px;overflow:hidden;text-overflow:ellipsis}
.conversation{background:#f8faf6}.active-chat{isolation:isolate}.chat-header{padding:22px 35px;min-height:94px;border-bottom:1px solid var(--workspace-border);box-shadow:none;background:#ffffffed}.chat-header h2{font-size:15px;font-weight:650;letter-spacing:.2px}.chat-header .avatar{width:43px;height:43px;border-radius:13px}.peer-status{font-size:12px}.chat-header-note{font-size:12px;color:#98a68f;letter-spacing:.3px}.secondary-button{border-radius:9px;border-color:#e0e9dc;background:#fff;padding:9px 12px;font-size:12px}.message-scroll{padding:26px 38px;scrollbar-color:#dce6d5 transparent}.day-divider{font-size:12px;letter-spacing:1px;margin:19px 0 28px}.day-divider::before,.day-divider::after{content:'';display:inline-block;width:30px;height:1px;vertical-align:middle;background:#e1e9dc;margin:0 12px}.message-row{gap:12px;margin-bottom:25px}.message-row .avatar{width:33px;height:33px;border-radius:11px}.bubble{padding:12px 17px;border-radius:4px 16px 16px;border-color:#e3eadf;box-shadow:0 2px 6px #28483903;line-height:1.85}.own .bubble{background:#daedca;border:1px solid #d2e6c0;border-radius:16px 4px 16px 16px;box-shadow:none}.message-meta{font-size:12px;gap:8px;margin-top:8px}.message-quote{border-radius:7px;border-left-width:2px;padding:9px 11px}.attachment-link{border-radius:10px;padding:12px;font-size:12px}.message-image{border-radius:12px}
.composer{margin:0 24px 22px;padding:12px 16px 14px;border:1px solid #dfe8d8;border-radius:17px;background:#fff;box-shadow:0 3px 14px #28483904}.composer-top{gap:5px;padding-bottom:7px;border-bottom:1px solid #f0f4ec}.attachment-tool{gap:5px;padding:6px 9px;font-size:12px;color:#7b9173;border-radius:8px}.attachment-tool svg{width:18px;height:18px}#composer-note{font-size:12px;margin-left:6px;color:#677d5e}#char-count{font-size:12px;color:#677d5e}.composer textarea{padding:13px 5px;min-height:72px;font-size:13px;line-height:1.8;color:#354b34}.composer-bottom{padding:1px 4px 0;gap:9px}.composer-bottom>span{font-size:12px;color:#677d5e}.newline-button{border-color:#e6edde;font-size:12px;padding:7px 11px;background:#fafcf8;border-radius:8px}.send{padding:9px 15px;border-radius:9px;min-width:90px;font-size:12px;box-shadow:none;background:#147d64}.send:hover:where(html:not([data-input="touch"]) *):enabled{background:#09654e;transform:none}.compose-preview{margin:0 0 10px;border-radius:9px}.emoji-panel{margin:0 24px 12px;border:1px solid var(--workspace-border);border-radius:13px;padding:12px 15px}.new-messages{bottom:205px;right:39px;font-size:12px;border-radius:10px;padding:9px 14px}.reconnect-banner{font-size:12px}
.welcome{padding:100px 40px 50px;background:radial-gradient(ellipse at 50% 35%,#eaf3e475,transparent 65%);overflow:auto}.welcome-topline{top:30px;left:36px;right:36px;color:#99a690;font-size:12px;letter-spacing:.5px}.welcome-art{width:110px;height:105px;margin-bottom:33px;background:#e6f0df;border:1px solid #dbe8d3;border-radius:30px;box-shadow:0 12px 40px #52804a08;transform:rotate(-7deg)}.welcome-art>img{width:63px;height:63px}.welcome-art>span:not(.orbit-dot){font-size:12px;padding:10px 13px;right:-45px;bottom:0;border:1px solid #e4ecdf;border-radius:10px;box-shadow:0 5px 18px #28483904}.welcome .eyebrow{font-size:12px;letter-spacing:2.8px}.welcome h2{font-size:32px;letter-spacing:.2px;font-weight:650;margin:17px 0 8px}.welcome p{font-size:12px;line-height:2;color:#8a9b80;margin:9px 0 0}.welcome-links{width:min(460px,100%);display:grid;gap:11px;margin-top:30px;text-align:left}.welcome-links>a{display:flex;align-items:center;gap:14px;padding:17px 19px;background:#ffffffb8;border:1px solid #e3ebdc;border-radius:13px;transition:border-color .15s,background .15s}.welcome-links>a:hover:where(html:not([data-input="touch"]) *){border-color:#b7d0aa;background:#fff}.welcome-link-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eff5e9;color:#6f9361;flex:none}.welcome-link-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.welcome-links strong{display:block;color:#58704d;font-size:12px;font-weight:600}.welcome-links small{display:block;font-size:12px;color:#657b58;margin-top:6px;line-height:1.5}.welcome-links b{margin-left:auto;font-size:14px;color:#95a58b;font-weight:400}.welcome-bottom{margin-top:30px;font-size:12px;color:#9aa991}
/* Sign-in has the same measured spacing as the workspace, retaining its established colors. */
.auth-screen{padding:24px;background:#f0f3ef;min-height:100dvh;gap:0}.intro{border-radius:23px 0 0 23px;background:#e9f0e7;padding:40px 11%;box-shadow:none}.intro:after{border-color:#c4d6bf;opacity:.45}.intro-content{position:relative;z-index:1;padding:48px 0}.intro h1{font-size:clamp(34px,3.6vw,55px);font-weight:650;letter-spacing:0;line-height:1.5;margin:23px 0}.intro p{font-size:13px;color:#7f9277}.intro .eyebrow{font-size:12px;letter-spacing:2px}.intro-footer{font-size:12px;color:#879b7e}.illustration{filter:none;margin-top:40px}.note>div{box-shadow:0 5px 20px #28483905;border-radius:5px 14px 14px;padding:18px 21px;font-size:12px}.note-two>div{border-radius:14px 5px 14px 14px}.mini-avatar{font-size:12px;padding:11px;border:1px solid #d5e1ce}.note small{font-size:12px}.note-stamp{font-size:12px}.auth-panel{border-radius:0 23px 23px 0;background:#fff;padding:50px 38px}.auth-card{width:400px;padding:0;border:0;box-shadow:none;border-radius:0}.small-brand{font-size:12px;color:#96a28d;letter-spacing:2px;margin-bottom:25px}.auth-card h2{font-size:28px;font-weight:650;letter-spacing:0}.auth-card>.muted{font-size:12px}.auth-tabs{margin:28px 0;background:#f3f6ef;padding:5px;border-radius:11px;border:1px solid #eaf0e3}.auth-tabs button{font-size:12px;padding:11px}.auth-card form label{font-size:12px;color:#617951;margin-bottom:20px}.auth-card form input{background:#fafcf8;border-radius:10px;border-color:#e0e8d9;padding:14px;margin-top:10px}.auth-submit{background:#147d64;box-shadow:none;font-size:12px;border-radius:10px;padding:14px 18px;margin-top:10px}.auth-footnote{font-size:12px;text-align:left;color:#a0ac96;line-height:1.95;margin-top:23px}.panel-footer{font-size:12px;letter-spacing:1px}.auth-card input:focus-visible{outline:3px solid #147d6412;outline-offset:0}
/* Shared account and management surfaces. Existing dialog semantics and scroll handling stay in charge. */
.manage-dialog{border:1px solid #dfe9d9;border-radius:20px;box-shadow:0 24px 90px #173c3420;background:#fff}.manage-dialog::backdrop{background:#183e3455;backdrop-filter:blur(4px)}.dialog-heading{border-bottom-color:#e8eee2;padding-bottom:16px}.dialog-header-label{font-size:12px;letter-spacing:1.2px;color:#93a187}.dialog-close{background:#f3f7ef;border:1px solid #e7eddf;border-radius:9px;font-size:22px}.manage-dialog h2{font-weight:650;font-size:25px;letter-spacing:0;margin:14px 0 10px}.manage-dialog p.muted{font-size:12px;color:#657b58;line-height:1.9}.manage-dialog input,.manage-dialog select{border-radius:10px;border-color:#e0e9d9;background:#fafcf7}.manage-dialog .primary{background:#147d64;box-shadow:none;border-radius:9px}.tool-card{border-radius:13px;border-color:#e2eadb;background:#fff;padding:17px}.tool-card:hover:where(html:not([data-input="touch"]) *){background:#f6f9f2;border-color:#c8dabb;box-shadow:none;transform:none}.tool-symbol{border-radius:11px;background:#f0f5e9;color:#6f9360}.tool-copy strong{font-size:12px;font-weight:600}.tool-copy small{font-size:12px;color:#657b58;line-height:1.7;margin-top:5px}.admin-shortcuts h3{font-size:12px;letter-spacing:1px;color:#8e9d83}.info-box,.lock-note,.admin-benefits{border-radius:11px}.toast{border-radius:12px;font-size:12px}.recall-menu{border-color:#dce7d5;border-radius:15px;box-shadow:0 12px 40px #28483918}.recall-menu button{border-radius:9px;font-size:12px}
@media(min-width:1600px){.chat-app{height:92dvh;margin:4dvh auto}.welcome{padding-top:110px}.welcome h2{font-size:36px}}
@media(max-width:1200px){.chat-app{width:100%;grid-template-columns:68px 330px minmax(0,1fr);margin:0;height:100dvh;border:0;border-radius:0}.workspace-rail{padding:25px 7px}.sidebar-brand{padding:27px 20px}.sidebar-heading,.list-heading{padding-left:20px;padding-right:20px}.sidebar-section-label{padding-left:20px}.sidebar-utilities{padding-left:14px;padding-right:14px;gap:6px}.sidebar-utilities .drive-entry,.sidebar-utilities .announcement-entry,.sidebar-utilities .tools-entry{font-size:12px;padding:9px 7px;gap:5px}.chat-header{padding:22px 25px}.message-scroll{padding:24px 27px}.welcome{padding-left:28px;padding-right:28px}.welcome h2{font-size:27px}.composer{margin:0 18px 17px}.auth-card{width:350px}.intro{padding:35px 9%}}
@media(max-width:900px) and (min-width:701px){.workspace-rail{display:none}.chat-app{width:100%;grid-template-columns:300px minmax(0,1fr)}.chat-header-note{display:none}.chat-header{padding:18px;min-height:85px}.welcome h2{font-size:24px}.welcome-links>a{padding:14px 12px;gap:10px}.welcome-links strong{font-size:12px}.welcome-links small{font-size:12px}.welcome-topline{left:24px;right:24px}.message-scroll{padding:20px}.composer{margin:0 13px 13px;padding:10px 12px}.composer-top{gap:2px}#composer-note{display:none}}
@media(max-width:700px){.workspace-rail{display:none}.chat-app{display:block;margin:0;width:100%;height:var(--mobile-app-height,100dvh);border:0;border-radius:0}.sidebar{height:100%;border:0}.sidebar-brand{padding:23px 23px 22px;min-height:83px}.sidebar-brand .brand img{display:block;width:36px;height:36px}.sidebar-brand .brand{font-size:22px}.school-label{font-size:12px;padding:6px 10px}.sidebar-section-label{padding:0 24px 10px;font-size:12px}.sidebar-heading{padding:0 24px}.sidebar-heading h1{font-size:28px}.connection{font-size:12px}.search-box{margin:19px 23px 20px;padding:12px 14px}.search-box input{font-size:12px}.list-heading{padding:0 26px 9px}.user-list{padding:0 14px 12px}.user-item{padding:16px 12px;gap:13px}.user-item .avatar{width:45px;height:45px;font-size:16px}.user-top strong{font-size:14px}.preview{font-size:12px}.user-top time{font-size:12px}.sidebar-utilities{padding:14px 20px;gap:8px}.utilities-heading{font-size:12px}.sidebar-utilities .drive-entry,.sidebar-utilities .announcement-entry,.sidebar-utilities .tools-entry{padding:11px 13px;font-size:12px;min-height:45px;gap:9px}.my-profile{padding:15px 24px max(16px,env(safe-area-inset-bottom))}.profile-text strong{font-size:12px}.profile-text span{font-size:12px}.conversation{height:100%;display:none}.chat-app.show-chat .conversation{display:block}.chat-header{min-height:78px;padding:15px 17px;gap:10px}.chat-header h2{font-size:14px}.chat-header .avatar{height:38px;width:38px;border-radius:12px}.peer-status{font-size:12px}.back{font-size:27px;padding:0 5px}.message-scroll{padding:20px 17px}.message-row{gap:9px;margin-bottom:23px}.message-row .avatar{width:31px;height:31px;font-size:12px}.message-body{max-width:80%}.bubble{font-size:14px;padding:11px 14px;border-radius:3px 14px 14px}.own .bubble{border-radius:14px 3px 14px 14px}.message-meta{font-size:12px}.day-divider{font-size:12px}.day-divider::before,.day-divider::after{width:20px;margin:0 9px}.composer{margin:0 10px max(10px,env(safe-area-inset-bottom));padding:9px 10px 10px;border-radius:15px}.composer textarea{font-size:16px;padding:11px 5px;height:74px;min-height:58px}.composer-top{gap:4px;padding-bottom:5px;flex-wrap:nowrap}.attachment-tool{padding:7px;min-height:34px;font-size:12px}.attachment-tool svg{width:19px;height:19px}#char-count{width:85px;font-size:12px;flex:none}.composer-bottom{gap:6px;padding:0 2px}.composer-bottom>span{font-size:12px;min-width:80px}.newline-button{font-size:12px;padding:8px 10px}.send{min-width:79px;padding:9px 12px;font-size:12px;gap:14px}.emoji-panel{margin:0 10px 10px;padding:9px 11px;max-height:180px}.new-messages{bottom:190px;right:20px;font-size:12px}.auth-screen{padding:0;display:block;background:#fff}.intro{padding:25px 25px 27px;min-height:155px;border-radius:0;background:#e9f0e7}.intro .brand{font-size:21px}.intro-content{padding:0;margin-top:22px}.intro h1{font-size:25px;line-height:1.45;letter-spacing:0;margin:0}.intro p,.intro-footer,.illustration,.intro-content .eyebrow{display:none}.intro:after{width:160px;height:160px;right:-70px;top:-45px}.auth-panel{padding:33px 27px 65px;border-radius:0}.auth-card{width:400px}.auth-card h2{font-size:25px}.auth-card>.muted{font-size:12px}.auth-card .small-brand{display:none}.auth-card form input{font-size:16px}.auth-footnote{font-size:12px}.auth-tabs{margin:23px 0}.panel-footer{bottom:22px}.manage-dialog{border-radius:18px}.manage-dialog h2{font-size:23px}.tool-card{padding:15px}.welcome{display:none}}
@media(max-height:760px) and (min-width:701px){.sidebar-brand{padding-top:20px;padding-bottom:17px;min-height:76px}.sidebar-section-label{padding-bottom:8px}.search-box{margin-top:16px;margin-bottom:17px}.sidebar-utilities{padding-top:10px;padding-bottom:10px}.sidebar-utilities .drive-entry,.sidebar-utilities .announcement-entry,.sidebar-utilities .tools-entry{min-height:38px;padding-top:7px;padding-bottom:7px}.my-profile{padding-top:13px;padding-bottom:13px}.welcome{padding-top:75px;padding-bottom:25px}.welcome-art{width:85px;height:83px;margin-bottom:24px}.welcome-art>img{width:51px;height:51px}.welcome-links{margin-top:22px}.welcome-links>a{padding-top:13px;padding-bottom:13px}.welcome-bottom{margin-top:20px}}
@media(prefers-reduced-motion:reduce){.workspace-rail *,.welcome-links *{transition:none}}

.welcome-links b svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.user-top strong{font-size:13px}.preview{font-size:12px}.welcome-links strong{font-size:12px}.welcome-links small{font-size:12px}.sidebar-utilities .announcement-entry,.sidebar-utilities .tools-entry{justify-content:flex-start}.composer-top>.attachment-tool:first-child{margin-left:0}
@media(max-width:700px){.user-top strong{font-size:14px}.chat-header{grid-template-columns:28px 38px minmax(0,1fr) auto;gap:9px;min-height:78px}.chat-header .back{min-width:28px;min-height:36px;padding:0}.chat-header .peer-details{grid-column:3/-1}.chat-header-actions{grid-column:1/-1;justify-content:flex-end;gap:6px}.chat-header:has(#group-open:not([hidden])) .peer-details{grid-column:3}.chat-header:has(#group-open:not([hidden])) .chat-header-actions{grid-column:4;grid-row:1}.chat-header-actions .secondary-button{font-size:12px;padding:7px 10px;min-height:32px}.composer-top>.attachment-tool:first-child{margin-left:0}body.chat-mode.keyboard-open .composer textarea{min-height:40px}body.chat-mode.searching .sidebar-section-label{display:none}}
@media(max-width:700px) and (max-height:550px){.sidebar-brand,.sidebar-section-label,.list-heading{display:none}.sidebar-heading{padding-top:12px}.search-box{margin:9px 17px}.sidebar-utilities{padding:8px 14px;gap:6px}.utilities-heading{display:none}.sidebar-utilities .drive-entry,.sidebar-utilities .announcement-entry,.sidebar-utilities .tools-entry{min-height:34px;padding:7px 10px;font-size:12px}.my-profile{padding:9px 18px}.composer{margin-bottom:7px}.composer textarea{min-height:40px;height:48px}.emoji-panel{max-height:100px}}

.tool-arrow svg{display:block;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* Readability and spacing contract: primary 15–16px, secondary 12–14px.
   Keep the mobile shell and scroll containers intact rather than scaling the page. */
:root { --workspace-muted: #61765e; line-height: 1.6; }
button, input, select, textarea { font-family: inherit; }
.sidebar { min-width: 0; }
.sidebar-brand .brand-en { line-height: 1.6; letter-spacing: .6px; color: #657a5d; }
.sidebar-section-label { font-size: 11px; letter-spacing: .8px; color: #687c62; }
.school-label { font-size: 12px; padding: 6px 10px; color: #5f7656; }
.connection { font-size: 12px; line-height: 1.5; padding: 5px 9px; flex: none; }
.sidebar-heading { gap: 12px; }
.search-box { padding: 0 14px; min-height: 48px; }
.search-box input { font-size: 16px; line-height: 1.5; margin: 0; padding: 12px 0; color: #344f35; }
.search-box input::placeholder { color: #72836c; }
.list-heading, .list-heading span:last-child { font-size: 12px; letter-spacing: 0; color: var(--workspace-muted); }
.user-list { padding-inline: 14px; }
.user-item { min-height: 100px; padding: 16px 14px; gap: 12px; }
.user-item .avatar { width: 46px; height: 46px; font-size: 18px; }
.user-top { align-items: flex-start; }
.user-name { flex: 1; min-width: 0; flex-wrap: wrap; row-gap: 5px; }
.user-top strong { min-width: 0; max-width: 100%; font-size: 16px; line-height: 1.5; }
.user-top time { font-size: 12px; line-height: 2; color: var(--workspace-muted); }
.preview { font-size: 14px; line-height: 1.6; color: #5f745d; }
.user-presence { font-size: 12px; color: #61775f; }
.role-badge { max-width: 108px; padding: 3px 7px; font-size: 11px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; flex: none; }
.unread { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; font-size: 11px; }
.sidebar-utilities { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 20px; gap: 8px; }
.utilities-heading { font-size: 13px; padding: 0 2px 4px; color: #607759; }
.utilities-heading small { font-size: 11px; letter-spacing: 1px; color: #6e8264; }
.sidebar-utilities .drive-entry, .sidebar-utilities .announcement-entry, .sidebar-utilities .tools-entry {
  min-height: 48px; padding: 11px 10px; gap: 8px; font-size: 13px; line-height: 1.5; color: #496c43;
}
.sidebar-utilities .drive-entry > img, .sidebar-utilities .announcement-entry > svg, .sidebar-utilities .tools-entry > svg { width: 20px; height: 20px; }
.my-profile { padding: 18px 20px; gap: 10px; }
.my-profile .avatar { width: 40px; height: 40px; font-size: 16px; }
.profile-text strong { font-size: 15px; line-height: 1.5; }
.profile-text span { font-size: 12px; color: var(--workspace-muted); }
.my-profile .role-badge { max-width: 75px; }
.my-profile .icon-button { flex: none; }
.rail-link { font-size: 12px; min-height: 70px; padding: 10px 4px; }
.rail-signature { font-size: 11px; letter-spacing: 0; color: #6a7f61; }
.chat-header { flex-wrap: wrap; gap: 14px; padding: 20px 28px; }
.chat-header .peer-details { flex: 1; }
.chat-header h2 { font-size: 18px; line-height: 1.5; flex-wrap: wrap; row-gap: 5px; }
.peer-status { font-size: 13px; color: #61775c; }
.chat-header-note { font-size: 12px; color: #687d5e; }
.chat-header-actions { flex-wrap: wrap; margin-left: auto; }
.secondary-button, .danger-button { min-height: 40px; padding: 9px 13px; font-size: 14px; line-height: 1.5; }
.message-scroll { padding: 26px 30px; }
.message-body { max-width: min(82%, 640px); }
.bubble { font-size: 16px; line-height: 1.8; padding: 14px 18px; }
.message-meta { font-size: 12px; line-height: 1.7; color: #61785b; }
.group-sender, .message-quote, .file-expired, .history-state, .load-more, .retry { font-size: 13px; }
.message-quote { padding: 10px 12px; line-height: 1.6; }
.attachment-link { font-size: 14px; padding: 12px 14px; }
.day-divider { font-size: 12px; letter-spacing: 0; }
.composer { padding: 14px 16px 16px; }
.composer-top { gap: 6px; padding-bottom: 10px; }
.attachment-tool { font-size: 14px; line-height: 1.5; gap: 7px; padding: 8px 10px; min-height: 40px; color: #526f49; }
.attachment-tool svg { width: 20px; height: 20px; }
#composer-note, #char-count { font-size: 12px; color: #63795a; }
#char-count { width: auto; min-width: 76px; }
.composer textarea { font-size: 16px; line-height: 1.8; min-height: 80px; height: 90px; padding: 14px 4px; }
.composer-bottom { gap: 10px; }
.composer-bottom > span { font-size: 12px; line-height: 1.6; color: #61785a; }
.newline-button { font-size: 14px; padding: 9px 12px; min-height: 40px; }
.send { min-width: 100px; min-height: 42px; font-size: 15px; padding: 10px 17px; }
.compose-preview { margin: 0 0 12px; padding: 10px 12px; font-size: 13px; }
.emoji-heading, .emoji-heading button { font-size: 14px; }
.new-messages { bottom: 238px; font-size: 13px; }
.reconnect-banner, .mute-banner { font-size: 13px; padding: 12px 16px; }
.welcome { padding: 78px 32px 30px; }
.welcome > * { flex-shrink: 0; }
.welcome-topline { font-size: 12px; color: #667c5b; gap: 18px; letter-spacing: 0; }
.welcome-art > span:not(.orbit-dot) { font-size: 13px; right: -60px; padding: 10px 14px; }
.welcome .eyebrow { font-size: 11px; color: #697e5d; letter-spacing: 2px; }
.welcome h2 { line-height: 1.5; }
.welcome p { font-size: 16px; line-height: 1.9; color: #617756; }
.welcome-links { width: min(490px, 100%); }
.welcome-links > a { padding: 18px; }
.welcome-links > a > span:nth-child(2) { min-width: 0; }
.welcome-links strong { font-size: 15px; line-height: 1.6; color: #48643d; }
.welcome-links small { font-size: 13px; line-height: 1.7; color: #617756; }
.welcome-links b { flex: none; }
.welcome-bottom { font-size: 12px; color: #697e5e; }
.intro p { font-size: 16px; color: #637955; }
.intro .eyebrow, .intro-footer { font-size: 14px; }
.note > div { font-size: 15px; }
.note small { font-size: 12px; }
.auth-panel { padding-bottom: 70px; }
.auth-card { width: 420px; }
.auth-card > .muted { font-size: 15px; color: #617754; }
.auth-tabs button { min-height: 44px; font-size: 15px; }
.auth-card form label, form label { font-size: 15px; line-height: 1.6; }
.auth-card form input { font-size: 16px; padding: 14px 16px; line-height: 1.5; }
.password-wrap input { padding-right: 68px; }
.password-wrap button { min-width: 44px; font-size: 13px; }
.auth-submit { min-height: 50px; font-size: 16px; padding: 14px 18px; }
.auth-footnote { font-size: 13px; line-height: 1.9; color: #647858; }
.panel-footer { font-size: 12px; color: #6b7f5f; }
.form-error { font-size: 14px; line-height: 1.7; }
.manage-dialog > .dialog-heading { padding: 16px 24px; }
.manage-dialog > .dialog-body, #upgrade-dialog .dialog-body { margin: 0; padding: 20px 24px 26px; scroll-padding-block: 20px; }
.dialog-header-label { font-size: 13px; color: #657b58; letter-spacing: .5px; }
.dialog-close { min-width: 42px; min-height: 42px; flex: none; }
.manage-dialog h2 { font-size: 26px; line-height: 1.5; margin: 0 0 12px; }
.manage-dialog p.muted, #upgrade-dialog .muted { font-size: 15px; line-height: 1.85; color: #617854; }
.manage-dialog input, .manage-dialog select, .manage-dialog textarea { font-size: 16px; line-height: 1.5; }
.manage-dialog input:not([type=checkbox]):not([type=range]), .manage-dialog select { min-height: 46px; padding: 11px 13px; }
.check-label { align-items: flex-start; line-height: 1.7; }
.check-label input[type=checkbox] { flex-shrink: 0; margin-top: 5px; }
.check-label.channel-row { align-items: center; }
.check-label.channel-row input { padding: 0; margin: 0; }
.manage-dialog .primary { min-height: 44px; font-size: 15px; }
.tools-dialog { width: min(640px, calc(100vw - 32px)); }
.tools-grid { gap: 12px; }
.tool-card { min-height: 108px; padding: 18px 16px; gap: 12px; }
.tool-symbol { flex-basis: 36px; height: 38px; }
.tool-copy strong { font-size: 16px; line-height: 1.5; }
.tool-copy small { font-size: 13px; line-height: 1.7; margin-top: 0; color: #617956; }
.tools-dialog h3 { font-size: 15px; }
.owner-settings-dialog { width: min(860px, calc(100vw - 32px)); }
.owner-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.owner-panel { padding: 22px; }
.owner-panel h3 { font-size: 18px; }
.owner-panel > .muted, .settings-tip, .channel-row small { font-size: 13px; line-height: 1.8; color: #617955; }
.channel-row strong { font-size: 15px; }
.application-controls .channel-row { padding: 16px; }
.upgrade-settings-fields { column-gap: 18px; }
.dialog-actions, .duration-options, .reset-selection-actions { flex-wrap: wrap; gap: 10px; }
.duration-options button { flex: 1 1 80px; min-height: 40px; font-size: 14px; }
.dialog-footnote, .attempts-note, .admin-benefits, .info-box, .lock-note, .moderation-list, .order-name, .order-rank, .order-empty, .announcement-row small, #advanced-selected-count { font-size: 13px; line-height: 1.8; }
.announcement-content { font-size: 16px; line-height: 1.9; }
.announcement-row { padding: 14px; }
.announcement-row strong { font-size: 15px; }
.order-row { padding-block: 12px; }
.advanced-reset-users { padding: 10px 16px; }
.advanced-reset-users .check-label { padding-block: 10px; font-size: 15px; }
.toast, .recall-menu span, .recall-menu button { font-size: 14px; }
@media (max-width: 1200px) and (min-width: 701px) {
  .chat-header-note, #composer-note { display: none; }
  .sidebar-utilities { padding-inline: 14px; }
  .sidebar-utilities .drive-entry, .sidebar-utilities .announcement-entry, .sidebar-utilities .tools-entry { gap: 6px; padding-inline: 8px; }
}
@media (max-width: 900px) and (min-width: 701px) {
  .welcome { padding-inline: 22px; }
  .welcome-topline span:last-child { display: none; }
  .welcome-links > a { gap: 10px; padding: 15px 12px; }
  .welcome-links b { display: none; }
  .composer-top { gap: 2px; }
  .attachment-tool { padding-inline: 7px; }
  .message-scroll { padding-inline: 18px; }
}
@media (min-width: 701px) and (max-height: 820px) {
  .welcome { justify-content: flex-start; padding-top: 65px; }
  .sidebar-brand { min-height: 76px; padding-block: 16px; }
}
@media (max-width: 700px) {
  .sidebar-brand { min-height: 76px; padding: 16px 20px; }
  .sidebar-section-label { padding: 0 20px 8px; }
  .sidebar-heading { padding-inline: 20px; }
  .search-box { margin: 14px 16px; }
  .list-heading { padding-inline: 20px; }
  .user-item { min-height: 96px; padding: 14px 12px; }
  .user-item .avatar { width: 44px; height: 44px; }
  .sidebar-utilities { padding: 12px 16px; }
  .sidebar-utilities .drive-entry, .sidebar-utilities .announcement-entry, .sidebar-utilities .tools-entry { min-height: 44px; padding: 10px 9px; gap: 7px; font-size: 13px; }
  .sidebar-utilities .drive-entry > img, .sidebar-utilities .announcement-entry > svg, .sidebar-utilities .tools-entry > svg { width: 18px; height: 18px; }
  .my-profile { padding: 14px 16px max(14px, env(safe-area-inset-bottom)); }
  .my-profile .role-badge { max-width: 62px; }
  .chat-header { grid-template-columns: 40px 40px minmax(0, 1fr); padding: 12px 16px; gap: 10px; min-height: 80px; }
  .chat-header .back { min-width: 40px; min-height: 40px; padding: 0; }
  .chat-header .avatar { width: 40px; height: 40px; }
  .chat-header .peer-details, .chat-header:has(#group-open:not([hidden])) .peer-details { grid-column: 3; }
  .chat-header h2 { font-size: 17px; }
  .peer-status { font-size: 12px; }
  .chat-header-actions, .chat-header:has(#group-open:not([hidden])) .chat-header-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; width: 100%; margin: 0; }
  .chat-header-actions .secondary-button { min-height: 38px; font-size: 13px; padding: 8px 12px; }
  .message-scroll { padding: 20px 14px; }
  .message-body { max-width: calc(100% - 42px); }
  .bubble { padding: 12px 15px; }
  .composer { padding: 11px 12px 12px; }
  .composer-top { flex-wrap: wrap; gap: 3px; padding-bottom: 8px; }
  .attachment-tool { min-height: 38px; font-size: 13px; gap: 5px; padding: 7px; }
  .attachment-tool svg { width: 18px; height: 18px; }
  #char-count { min-width: 72px; font-size: 12px; }
  .composer textarea { min-height: 64px; height: 76px; padding: 12px 3px; }
  .composer-bottom > span { min-width: 100%; font-size: 12px; }
  .newline-button { font-size: 13px; min-height: 40px; }
  .send { min-width: 90px; font-size: 15px; }
  .new-messages { bottom: 242px; }
  .auth-panel { padding: 32px 24px 40px; }
  .panel-footer { position: static; }
  .manage-dialog > .dialog-heading { padding: 14px 18px; }
  .manage-dialog > .dialog-body, #upgrade-dialog .dialog-body { padding: 18px 20px 24px; }
  .manage-dialog h2 { font-size: 24px; }
  .owner-settings-grid { grid-template-columns: 1fr; gap: 16px; }
  .owner-panel { padding: 18px; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 92px; padding: 16px 14px; }
  .tool-symbol { flex-basis: 34px; height: 36px; }
}
@media (max-width: 380px) {
  .manage-dialog > .dialog-body, #upgrade-dialog .dialog-body { padding-inline: 14px; }
  .owner-panel { padding: 14px; }
  .my-profile { gap: 8px; padding-inline: 14px; }
  .my-profile .avatar { width: 34px; height: 34px; }
  .my-profile .icon-button { min-width: 34px; padding: 5px; }
  .password-pair, .duration-fields, .upgrade-settings-fields { grid-template-columns: 1fr; }
}
@media (min-width: 380px) and (max-width: 700px) {
  /* A single group action fits beside the title; multi-action private chats wrap. */
  .chat-header:has(#group-open:not([hidden])) { grid-template-columns: 40px 40px minmax(0, 1fr) auto; }
  .chat-header:has(#group-open:not([hidden])) .chat-header-actions { grid-column: 4; grid-row: 1; width: auto; }
}
@media (max-width: 700px) and (max-height: 600px) {
  .sidebar-brand, .sidebar-section-label, .list-heading, .utilities-heading { display: none; }
  .sidebar-heading { padding-top: 10px; }
  .search-box { margin-block: 8px; min-height: 44px; }
  .sidebar-utilities { padding-block: 8px; }
  .my-profile { padding-block: 10px; }
  .composer textarea { min-height: 40px; height: 48px; }
  .composer-bottom > span { display: none; }
}
@media (max-width: 700px) {
  body.chat-mode.keyboard-open .composer textarea { min-height: 40px; height: 48px; }
}

/* Two compact rows keep the conversation list usable on short screens. */
.sidebar-utilities{grid-template-columns:repeat(6,minmax(0,1fr));padding:10px 14px;gap:6px}
.sidebar-utilities .utilities-heading{display:none}
.sidebar-utilities > :is(.drive-entry,.announcement-entry,.ai-entry,.tools-entry){grid-column:span 2;display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:40px;margin:0;padding:7px 5px;border:1px solid var(--workspace-border);border-radius:9px;background:#fafcf8;color:#496c43;font-size:13px;font-weight:500;line-height:1.5;white-space:nowrap}
.sidebar-utilities > :is(#hosting-open,#drive-open){grid-column:span 3}
.sidebar-utilities > :is(.drive-entry,.announcement-entry,.ai-entry,.tools-entry):hover{background:#eef5e9;border-color:#c3d6bc}
.sidebar-utilities > :is(.drive-entry,.announcement-entry,.ai-entry,.tools-entry) > :is(svg,img){width:18px;height:18px;flex:none}
.sidebar-utilities #hosting-open > span:first-of-type,.sidebar-utilities #drive-open > span:first-of-type,.sidebar-utilities #tools-open > span:first-of-type{display:inline}
.sidebar-utilities #announcement-unread{margin-left:0}
.my-profile{padding:11px 16px}
@media(max-width:700px){.sidebar-utilities > :is(.drive-entry,.announcement-entry,.ai-entry,.tools-entry){min-height:44px}.my-profile{padding-block:10px}}

.sidebar-utilities > :is(.drive-entry,.announcement-entry,.ai-entry,.tools-entry) > span{margin:0;color:inherit}
