*{box-sizing:border-box} [hidden]{display:none!important} html,body{height:100%;margin:0} body{background:#fff;color:#222;font:13px Arial,Helvetica,sans-serif} button,input,textarea,select{font:inherit} button{cursor:pointer} button:disabled{cursor:default;opacity:.55} button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #587ba0;outline-offset:1px}.chat{height:100%;height:100dvh;min-height:220px;display:flex;flex-direction:column;border:1px solid #b9bfc5;position:relative;overflow:hidden}.bar{height:36px;flex:none;display:flex;gap:6px;align-items:center;padding:0 8px;background:linear-gradient(#f3f5f7,#e3e7eb);border-bottom:1px solid #b9bfc5;color:#263749}.bar strong{font-size:13px}.bar #connection{margin-left:auto;color:#666;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool{display:inline-grid;place-items:center;flex:none;width:25px;height:25px;border:1px solid transparent;background:transparent;color:#586574;border-radius:3px;padding:3px}.tool:hover:not(:disabled),.tool[aria-expanded=true]{background:#d8dfe6;border-color:#b9bfc5}.tool svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.log{flex:1;overflow:auto;min-height:0;padding:10px 10px 8px;overflow-wrap:anywhere;line-height:18px}.line{margin:0 0 3px;white-space:pre-wrap}.name{font-weight:bold}.stamp{color:#888;font-size:10px;margin-right:5px;display:none}.showTime .stamp{display:inline}.action{font-style:italic}.notice{flex:none;padding:5px 10px;background:#fff9e9;border-top:1px solid #ded5bf;color:#6a5429;font-size:11px;overflow-wrap:anywhere}.panel{flex:none;padding:10px;background:#f6f7f8;border-bottom:1px solid #c8ccd0;max-height:45%;overflow:auto}.panel form{display:grid;gap:5px;max-width:360px}.panel input:not([type=checkbox]),.panel select{padding:5px;border:1px solid #b7bec5;background:white;width:100%;border-radius:2px}.panel small{display:block;color:#666;margin:5px 0}.panel label{font-weight:bold;font-size:12px}.panel .check{display:flex;align-items:center;gap:5px;margin-top:8px;font-weight:normal}.buttons{display:flex;gap:6px;margin-top:3px}.buttons button,#emotes button{background:linear-gradient(#fff,#e5e8eb);border:1px solid #aeb5bc;border-radius:3px;color:#333;padding:4px 9px}.panelHeading{font-weight:bold;color:#35465a}#count{color:#777;font-size:11px;margin-left:4px}#roster{list-style:none;margin:7px 0 0;padding:0;columns:1}#roster li{padding:2px 0;overflow-wrap:anywhere;break-inside:avoid}footer{flex:none;background:#f1f1f1;border-top:1px solid #c6c8ca;padding:7px 8px}textarea{display:block;width:100%;height:53px;resize:none;border:1px solid #b5b5b5;border-radius:2px;background:#fff;padding:6px 7px;color:#222;box-shadow:inset 0 1px 2px #0000000d}textarea:disabled{background:#fafafa}.bottom{display:flex;align-items:center;gap:5px;margin-top:5px;min-height:28px}.smile{font-size:20px;line-height:18px}.send{margin-left:auto;color:#fff;font-weight:bold;background:linear-gradient(#64809d,#405a77);border:1px solid #354d67;border-radius:3px;min-width:65px;height:27px;text-shadow:0 1px #354d67}.send:hover:not(:disabled){background:#4c6988}#emotes{display:flex;gap:3px;flex-wrap:wrap}#emotes button{padding:2px 5px}.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Classic compact channel badges and right-side roster. */
.chatBody{display:flex;flex:1;min-height:0;min-width:0}
.chatBody .log{min-width:0}
.usersPanel{flex:0 0 clamp(112px,35%,170px);min-width:0;overflow:auto;background:#f6f7f8;border-left:1px solid #c8ccd0;padding:8px 7px}
.usersPanel .panelHeading{font-size:12px;white-space:normal}
.speaker{display:inline-flex;align-items:center;gap:3px;vertical-align:baseline}
.roleBadge{display:inline-flex;align-items:center;justify-content:center;height:14px;min-width:0;padding:2px 4px 0;border-radius:2px;color:#fff;font:normal 700 10px/12px Arial,Helvetica,sans-serif;margin:0;white-space:nowrap;letter-spacing:0;text-align:center;vertical-align:middle}
.role-host{background:#111}
.role-admin{background:#c42026}
.role-mod{background:#16823a}
.role-pro{background:#e87500}
#roster li{display:flex;align-items:center;gap:3px;flex-wrap:wrap;min-width:0;padding:3px 0;line-height:18px}
#roster li .name{min-width:0;overflow-wrap:anywhere;font-weight:normal}

/* v1.0.3: classic right-edge tabs; panels overlay, never stretch chat. */
.chat{padding-right:29px;background:#eef0f2}
.bar,.chatBody,.notice,footer{border-right:1px solid #b9bfc5}
.bar{height:36px;justify-content:center;flex-direction:column;gap:1px;padding:2px 6px;text-align:center;color:#46515c}
.bar strong{font-size:12px;font-weight:normal;line-height:15px}
.bar #connection{margin:0;font-size:10px;line-height:12px;max-width:100%}
.chatBody{background:#fff;position:relative}
.edgeTabs{position:absolute;right:0;top:3px;width:29px;display:flex;flex-direction:column;gap:5px;z-index:5}
.edgeTabs .tool{width:28px;height:34px;border:1px solid #b9bfc5;border-left:0;border-radius:0 4px 4px 0;background:linear-gradient(#fff,#e9edf1);color:#666;padding:5px;box-shadow:1px 1px 2px #00000016}
.edgeTabs .tool:hover,.edgeTabs .tool[aria-expanded=true]{background:#dbe2e9;color:#35465a}
.edgeTabs .tool svg{width:16px;height:16px;stroke-width:1.6}
#users svg{fill:currentColor;stroke:none}
#settingsPanel{position:absolute;z-index:4;right:29px;top:36px;width:min(270px,calc(100% - 29px));max-height:calc(100% - 145px);border:1px solid #b9bfc5;border-top:0;box-shadow:-2px 3px 7px #0002;border-radius:0 0 0 3px}
.usersPanel{position:absolute;z-index:3;right:0;top:0;bottom:0;width:clamp(128px,42%,170px);max-width:55%;padding:8px;box-shadow:-2px 0 5px #0002}
