*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#1d1c1d;background:#fff;overflow-x:hidden}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.skip{position:absolute;left:-999px;top:0;background:#fff;padding:8px;z-index:50}
.skip:focus{left:8px;top:8px}
:focus-visible{outline:3px solid #1264a3;outline-offset:2px}
.sidebar :focus-visible{outline-color:#fff}
.app{display:flex;height:100vh;height:100dvh;width:100%}
.sidebar{width:260px;flex:none;background:#3f0e40;color:#e8d9e8;display:flex;flex-direction:column;overflow-y:auto}
.workspace{padding:16px;font-weight:700;font-size:18px;color:#fff;border-bottom:1px solid #5b2b5c}
.side-title{font-size:13px;text-transform:uppercase;letter-spacing:.05em;margin:16px 16px 6px;color:#d3bfd3}
.channels{list-style:none;margin:0;padding:0 8px}
.channels button{width:100%;text-align:left;background:none;border:0;color:#e8d9e8;padding:8px;border-radius:6px;font:inherit;cursor:pointer}
.channels button:hover{background:#350d36}
.channels button[aria-current="true"]{background:#1164a3;color:#fff;font-weight:600}
.side-footer{margin-top:auto;padding:16px;border-top:1px solid #5b2b5c}
.name-form label{display:block;font-size:13px;margin-bottom:4px}
.name-form input{width:100%;padding:8px;border-radius:6px;border:1px solid #8a6a8b;font:inherit}
button{font:inherit}
.name-form button,.composer button{margin-top:8px;padding:8px 14px;border:0;border-radius:6px;background:#007a5a;color:#fff;font-weight:600;cursor:pointer}
.name-form button:hover,.composer button:hover{background:#005e46}
.reset{margin-top:12px;width:100%;padding:8px;background:none;border:1px solid #d3bfd3;color:#fff;border-radius:6px;cursor:pointer}
.reset:hover{background:#350d36}
.status{font-size:13px;min-height:1em;margin:6px 0 0;color:#cfe9df}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.chan-header{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid #ddd}
.chan-header h1{font-size:18px;margin:0}
.topic{margin:2px 0 0;font-size:13px;color:#5e5d5e}
.menu-btn{display:none;padding:8px 12px;border:1px solid #868686;background:#fff;border-radius:6px;cursor:pointer}
.messages{flex:1;overflow-y:auto;padding:16px 20px}
.msg{padding:6px 0;max-width:100%}
.meta{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.author{font-weight:700}
.time{font-size:12px;color:#5e5d5e}
.text{margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.empty{color:#5e5d5e}
.composer{padding:12px 20px 16px;border-top:1px solid #ddd}
.composer textarea{width:100%;resize:none;padding:10px;font:inherit;border:1px solid #868686;border-radius:8px}
.error{color:#b00020;font-size:13px;min-height:1.2em;margin:4px 0 0}
.backdrop{display:none}
@media (max-width:767px){
 .sidebar{position:fixed;inset:0 auto 0 0;width:280px;max-width:85vw;transform:translateX(-100%);z-index:20;visibility:hidden}
 .sidebar.open{transform:none;visibility:visible}
 .backdrop:not([hidden]){display:block;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:10}
 .menu-btn{display:inline-block}
 .chan-header,.messages,.composer{padding-left:12px;padding-right:12px}
}
