:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#29222e;background:#eae5ec;--brand:#67436f;--muted:#84798a}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}.app{max-width:1500px;margin:auto;min-height:100dvh;background:#fff;display:flex;flex-direction:column}.top{background:linear-gradient(120deg,#56315e,#795282);color:#fff;padding:12px 18px;display:flex;justify-content:space-between;align-items:center;min-height:66px}.brand{display:flex;align-items:center;gap:10px}.brandIcon{background:#ffffff26;border-radius:12px;padding:8px 12px;font-size:22px}.brand strong{display:block;font-size:20px}.brand small{font-size:11px;opacity:.8}.topRight{display:flex;align-items:center;gap:18px;font-size:12px}.status{background:#ffffff1e;padding:7px 10px;border-radius:30px}.entry{margin:10vh auto;padding:28px;width:min(440px,95%);border:1px solid #eee5f0;border-radius:18px;box-shadow:0 8px 40px #52345a12;text-align:center}.welcomeIcon{font-size:42px;color:var(--brand)}.entry h1{font-size:23px}.entry p{color:var(--muted)}.entry form{display:grid;text-align:right;gap:12px}.entry label{font-weight:650}.entry input,.composer input{padding:13px;border:1px solid #ddd3e1;border-radius:10px;min-width:0}.entry form button,.composer button[type=submit]{background:var(--brand);color:white;border:0;border-radius:10px;padding:12px 20px}.error{color:#b42318}.chat{display:grid;grid-template-columns:230px minmax(0,1fr) 280px;flex:1;min-height:0;height:calc(100dvh - 99px)}.usersPanel,.sidePanel{min-height:0;background:#fcfafc;display:flex;flex-direction:column}.usersPanel{border-left:1px solid #ece6ee}.sidePanel{border-right:1px solid #ece6ee}.panelHead{padding:16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eee7f0}.panelHead h2{font-size:15px;margin:0}.panelHead span{font-size:11px;color:var(--muted)}.panelHead button{border:0;background:#f1eaf3;border-radius:8px;padding:5px 10px}.usersList{overflow:auto;flex:1;padding:10px}.user{padding:10px;display:flex;gap:9px;align-items:center;border-radius:10px}.user:nth-child(odd){background:#f5f0f6}.avatar{width:31px;height:31px;border-radius:50%;background:#e9dcec;display:grid;place-items:center;color:#67436f;font-weight:700}.userMeta{min-width:0}.userMeta strong{display:block;font-size:13px}.userMeta small{display:block;font-size:10px;color:#8c7c92}.panelFoot{padding:12px;color:#94869a;font-size:11px;border-top:1px solid #eee}.conversation{display:flex;flex-direction:column;min-height:0;min-width:0}.micBar{background:#f8f5f9;border-bottom:1px solid #eee5f0;min-height:49px;display:flex;align-items:center;gap:9px;padding:0 14px;font-size:13px}.micHint{color:#9c8ba1;font-size:11px;margin-right:auto}.roomHeader{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid #eee}.roomHeader h2{font-size:17px;margin:0}.roomHeader small{color:#8e7c92}.roomMenu{background:#eee7f0;color:#67436f;border:0;border-radius:8px;padding:7px 12px}.messages{flex:1;min-height:0;overflow:auto;padding:16px;background:linear-gradient(135deg,#fff,#fcfafc);display:flex;flex-direction:column;gap:9px}.emptyState{text-align:center;margin:auto;color:#a293a8;font-size:13px}.message{background:#f2edf4;border-radius:12px;padding:9px 12px;max-width:86%;align-self:flex-start;overflow-wrap:anywhere;border-right:3px solid #c6a4cd}.message strong{font-size:13px;color:#67436f}.message time{font-size:10px;color:#998d9d;margin-right:10px}.message p{margin:5px 0 0;font-size:14px;white-space:pre-wrap}.composer{padding:10px;display:flex;gap:8px;border-top:1px solid #eee}.composer input{flex:1}.tool{border:0;background:#f3eef4;color:#67436f;border-radius:9px;font-size:20px;padding:5px 13px}.toolbar{display:grid;grid-template-columns:repeat(6,1fr);border-top:1px solid #eee;background:#faf8fb}.toolbar button{padding:10px 3px;background:none;border:0;color:#67436f;font-size:19px;display:flex;flex-direction:column;align-items:center;gap:3px}.toolbar button span{font-size:11px}.toolbar button.active{background:#eee4f0}.panelBody{padding:13px;overflow:auto;flex:1}.roomCard{width:100%;text-align:right;display:flex;align-items:center;gap:10px;background:white;border:1px solid #eee3f0;padding:11px;border-radius:12px;margin-bottom:9px;color:#3c2c41}.roomCard.active{border-color:#91669c;background:#f6f0f7}.roomIcon{width:39px;height:39px;border-radius:11px;background:#eee3f1;display:grid;place-items:center;font-size:20px}.roomCard strong{display:block}.roomCard small{color:#96879c;font-size:11px}.placeholder{background:#f8f4f9;padding:17px;border-radius:12px;line-height:1.9;color:#74647b;font-size:13px}.hidden{display:none!important}footer{text-align:center;padding:8px;font-size:11px;color:#9b8b9f;border-top:1px solid #eee}@media(max-width:1100px){.chat{grid-template-columns:195px minmax(0,1fr)}.sidePanel{position:absolute;left:0;top:66px;bottom:31px;width:min(330px,88vw);z-index:10;box-shadow:8px 0 24px #0002}.sidePanel.closed{display:none}}@media(max-width:650px){.top{padding:9px 12px}.brand strong{font-size:17px}.brand small{font-size:10px}.topRight{gap:5px}.topRight #onlineTop{display:none}.chat{display:flex;position:relative;height:calc(100dvh - 91px)}.usersPanel{display:none}.usersPanel.mobileOpen{display:flex;position:absolute;inset:0 0 0 auto;width:min(290px,90vw);z-index:15;box-shadow:-5px 0 20px #0002}.conversation{flex:1}.sidePanel{top:0;bottom:0}.micBar{min-height:42px}.micHint{font-size:9px}.messages{padding:10px}.toolbar button span{font-size:9px}.toolbar button{font-size:17px}.composer{padding:7px}.composer input{padding:10px}.message{max-width:95%}}
/* Anchor short conversations to the composer while preserving normal scrolling for long histories. */
.messages>:first-child{margin-top:auto}
