@font-face{font-family:"Rubik";font-style:normal;font-weight:700;font-display:swap;src:url("rubik-bold.ttf") format("truetype")}
.chat-panel{position:fixed;z-index:38;left:18px;top:150px;width:clamp(230px,21vw,320px);height:min(663px,calc(100dvh - 175px));display:flex;flex-direction:column;box-sizing:border-box;border:1px solid #ffffffd9;border-radius:20px;background:#f7fbfff2;box-shadow:0 8px 30px #24496b29;backdrop-filter:blur(16px);color:#28477b;font:14px/1.4 system-ui,sans-serif;overflow:hidden}
.chat-panel[hidden],.chat-entry[hidden],.chat-shade[hidden],.chat-panel [hidden]{display:none!important}
.chat-heading{display:flex;align-items:center;justify-content:space-between;padding:15px;border-bottom:1px solid #dce6f3}.chat-heading h2{margin:0;font-size:18px}.chat-heading small{font-size:11px;color:#61799a}.chat-minimize{border:0;border-radius:10px;background:#e5edfc;color:#28477b;width:36px;height:36px;font-size:24px;cursor:pointer}
.chat-messages{flex:1;min-height:0;overflow:auto;padding:14px;overscroll-behavior:contain}.chat-empty{text-align:center;color:#71819c;margin:35px 4px;font-size:13px}.chat-message{display:flex;gap:8px;margin-bottom:15px}.chat-avatar{width:28px;height:28px;border-radius:7px;object-fit:cover;flex:0 0 28px;background:#dee8fd;display:grid;place-items:center;font-weight:700}.chat-message>div{min-width:0;flex:1}.chat-meta{display:flex;align-items:center;flex-wrap:wrap;gap:4px;font-size:11px}.chat-meta strong{font-size:12px}.chat-meta time{margin-left:auto;color:#7888a0;font-size:10px}.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0 0;color:#263e68}.chat-status{margin:0;padding:0 12px;font-size:11px;color:#a04d34}.chat-status:not(:empty){padding-bottom:8px}
.chat-form{display:flex;align-items:flex-end;gap:5px;padding:10px;border-top:1px solid #dce6f3;background:#fff9}.chat-form textarea{box-sizing:border-box;resize:none;width:100%;min-width:0;min-height:40px;max-height:90px;padding:9px 7px;border:1px solid #ccdaf0;border-radius:10px;color:#263e68;background:white;font:14px/1.4 system-ui,sans-serif}.chat-form button{flex:0 0 34px;height:40px;padding:0;border:0;border-radius:10px;cursor:pointer}.chat-emoji-toggle{font-size:25px;color:#4263a6;background:#eaf0fc}.chat-send{background:#3558df;color:#fff;font-size:20px}.chat-form :disabled{opacity:.5;cursor:default}.chat-panel :focus-visible,.chat-entry:focus-visible{outline:3px solid #6485e8;outline-offset:-3px}.chat-emojis{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;padding:8px;border-top:1px solid #dce6f3}.chat-emojis button{border:0;background:transparent;font-size:22px;padding:4px;cursor:pointer;border-radius:6px}.chat-emojis button:hover{background:#dfe9fd}

@media(max-width:1024px){.chat-entry{position:absolute;z-index:39;box-sizing:border-box;min-height:30px;padding:5px 7px;border:1px solid white;border-radius:12px;background:#f7fbfff2;box-shadow:0 3px 12px #24496b24;color:#28477b;font:700 11px/1.3 system-ui,sans-serif;cursor:pointer}.chat-shade{position:fixed;inset:0;z-index:99;background:#14294870;backdrop-filter:blur(4px)}.chat-panel{z-index:100;inset:auto 8px max(8px,env(safe-area-inset-bottom));width:auto;height:min(620px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);border-radius:20px}.chat-form textarea{font-size:16px}.chat-modal-open{overflow:hidden!important}.chat-heading{padding:12px 15px}.chat-messages{padding:15px}.chat-message{margin-bottom:18px}}

.chat-messages{position:relative;isolation:isolate;background:transparent}.chat-messages::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none}.chat-panel{background:#eef5ff url("chat-background.png") center/100% 100% no-repeat}.chat-heading{background:#f7fbffcf}.chat-message p,.chat-form textarea{font-family:"Rubik",sans-serif;font-weight:700}.chat-heading>div:first-child{flex:1;min-width:0}.chat-heading h2{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-online{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font:600 11px/1.3 system-ui,sans-serif;color:#397353}.chat-online::before{content:"";width:6px;height:6px;border-radius:50%;background:#36a975}.chat-heading:has(.chat-minimize:not([hidden])){gap:8px}

.chat-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:7px}.chat-actions button{border:0;padding:3px 0;background:transparent;color:#4567a2;font:600 11px/1.4 system-ui,sans-serif;cursor:pointer}.chat-actions button:disabled{opacity:.5}.chat-edit-input{box-sizing:border-box;width:100%;min-height:80px;margin-top:8px;padding:8px;border:1px solid #b8cbea;border-radius:8px;background:#fff;color:#263e68;font:700 14px/1.5 Rubik,sans-serif;resize:vertical}.chat-actions button:hover{text-decoration:underline}

.chat-creator-compass{display:inline-block;width:18px;height:18px;flex:0 0 18px;object-fit:contain;cursor:help}

.chat-message-line{display:flex;align-items:flex-start;gap:6px;flex-wrap:wrap}.chat-message-line>p{flex:1;min-width:0}.chat-message-tools{flex:0 0 auto;gap:2px;margin-top:2px;flex-wrap:nowrap}.chat-message-tools .chat-tool{display:grid;place-items:center;width:24px;height:26px;padding:4px;border-radius:6px;color:#57749c}.chat-tool svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.chat-message-tools .chat-tool-delete{color:#d43d4f}.chat-message-tools .chat-tool:hover{background:#e1eaf8}.chat-message-tools.is-confirming{flex-basis:100%;justify-content:flex-end;gap:12px}.chat-message-tools.is-confirming button:first-child{color:#c32f43}.chat-drawer-handle{display:none}
@media(min-width:1025px){.chat-drawer{position:fixed;z-index:38;left:18px;top:150px;width:clamp(230px,21vw,320px);height:min(663px,calc(100dvh - 175px));transform:translateX(0);transition:transform .32s cubic-bezier(.22,.7,.25,1);pointer-events:none}.chat-drawer .chat-panel{position:relative;left:0;top:0;width:100%;height:100%;pointer-events:auto}.chat-drawer.is-collapsed{transform:translateX(calc(-100% - 18px))}.chat-drawer.is-collapsed .chat-panel{pointer-events:none}.chat-drawer.is-dragging{transition:none;user-select:none}.chat-drawer-handle{position:absolute;display:grid;place-items:center;left:100%;top:24px;width:28px;height:64px;border:1px solid #c9d9f1;border-left:0;border-radius:0 12px 12px 0;background:#f2f7fff2;color:#3558a5;font:700 28px/1 system-ui;box-shadow:4px 3px 12px #24496b20;cursor:ew-resize;touch-action:none;pointer-events:auto}.chat-drawer-handle:focus-visible{outline:3px solid #6485e8;outline-offset:2px}.chat-heading h2{font-size:17px}.chat-minimize{flex:0 0 28px;width:28px;height:28px}}
@media(max-width:1024px){.chat-drawer{display:contents}.chat-message-tools .chat-tool{width:30px;height:30px}.chat-tool svg{width:17px;height:17px}}
@media(prefers-reduced-motion:reduce){.chat-drawer{transition:none}}

.chat-resize-grip{display:none}
@media(min-width:1025px){.chat-drawer{transition:transform .32s cubic-bezier(.22,.7,.25,1),left .32s,top .32s,width .32s,height .32s;min-width:240px;min-height:240px}.chat-drawer.is-dragging{transition:none}.chat-drawer .chat-heading{cursor:move;touch-action:none;user-select:none}.chat-drawer .chat-panel{min-width:0;min-height:0}.chat-resize-grip{position:absolute;display:block;right:0;bottom:0;width:17px;height:17px;padding:0;border:0;background:transparent;color:#57749c;font-size:13px;cursor:nwse-resize;touch-action:none;z-index:2}.chat-drawer .chat-form{padding-right:17px}}

@media(min-width:1025px){.chat-drawer-handle{top:0;height:55px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.chat-drawer-handle svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.chat-heading{min-height:55px;box-sizing:border-box}.chat-heading h2{line-height:24px}}

.chat-drawer[hidden]{display:none!important}

@media(min-width:1025px){.chat-form{flex-shrink:0}.chat-form textarea{resize:vertical;min-height:40px;max-height:var(--chat-compose-max,280px);overflow:auto}}

@media(min-width:1025px){.chat-drawer .chat-panel{border-top-right-radius:0}.chat-drawer .chat-heading{background:#f5f9ff}.chat-drawer-handle{left:calc(100% - 1px);top:0;width:24px;height:55px;border:1px solid #ffffffd9;border-left:1px solid #dce6f3;border-radius:0 13px 13px 0;background:#f5f9ff;box-shadow:3px 2px 7px #24496b12;color:#54729e;transition:background .18s,color .18s}.chat-drawer-handle svg{width:15px;height:15px;stroke-width:2}.chat-drawer-handle:hover{background:#e8f0fd;color:#3159a0}.chat-drawer-handle:active{background:#dfeafb;cursor:grabbing}.chat-drawer.is-collapsed .chat-drawer-handle{box-shadow:3px 2px 8px #24496b1f}}

.chat-online{padding:3px 0;border:0;background:transparent;cursor:pointer;border-radius:5px}.chat-online:hover{text-decoration:underline}.chat-online:focus-visible{outline:2px solid #6485e8;outline-offset:3px}.chat-author-name{cursor:pointer}.chat-author-name:hover{text-decoration:underline}.chat-mention{color:#3966c3;background:#e4edff;border-radius:4px;padding:0 2px}.chat-quote{display:flex;flex-direction:column;gap:3px;box-sizing:border-box;text-align:left;width:100%;min-width:0;margin-top:6px;padding:7px 9px;border:0;border-left:3px solid #7798d5;border-radius:0 7px 7px 0;background:#e6eefbcc;color:#44618a;cursor:pointer;font:12px/1.4 system-ui,sans-serif}.chat-quote span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.chat-quote:disabled{cursor:default;opacity:.65}.chat-reply-preview{display:flex;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid #dce6f3;background:#eaf1fddd;flex-shrink:0;font:12px/1.4 system-ui,sans-serif}.chat-reply-preview>div{min-width:0;flex:1;display:grid;border-left:3px solid #7798d5;padding-left:8px}.chat-reply-preview span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-reply-preview>button{border:0;background:none;color:#54729e;font-size:22px;cursor:pointer}.chat-mention-options{display:flex;flex-direction:column;max-height:150px;overflow:auto;flex-shrink:0;padding:5px;border-top:1px solid #dce6f3;background:#f5f9ff}.chat-mention-options button{border:0;border-radius:6px;text-align:left;padding:9px 10px;background:transparent;color:#3966c3;font:700 13px Rubik,sans-serif;cursor:pointer}.chat-mention-options button[aria-selected=true],.chat-mention-options button:hover{background:#e0eaff}.chat-message.is-reply-highlight{background:#dceaff;border-radius:8px;box-shadow:0 0 0 5px #dceaff}.chat-roster{position:absolute;left:100%;top:0;width:220px;height:100%;box-sizing:border-box;display:flex;flex-direction:column;border:1px solid #fff;border-left:1px solid #dce6f3;border-radius:0 16px 16px 0;background:#f5f9fff5;color:#28477b;box-shadow:6px 5px 20px #24496b20;font:13px/1.4 system-ui,sans-serif;pointer-events:auto;z-index:42;overflow:hidden}.chat-roster[hidden]{display:none!important}.chat-roster-header{display:flex;justify-content:space-between;align-items:center;padding:13px 12px;border-bottom:1px solid #dce6f3;flex-shrink:0}.chat-roster-header button{border:0;background:transparent;font-size:22px;color:#54729e;cursor:pointer}.chat-roster-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:7px}.chat-roster-member{display:flex;align-items:center;gap:9px;width:100%;box-sizing:border-box;min-width:0;padding:8px;border:0;border-radius:8px;background:transparent;color:#28477b;cursor:pointer;text-align:left}.chat-roster-member:hover{background:#e4edfc}.chat-roster-member strong{overflow-wrap:anywhere;min-width:0}.chat-drawer-handle.is-roster-open{visibility:hidden}.chat-roster.opens-left{left:auto;right:100%;border-radius:16px 0 0 16px}.chat-roster-list p{padding:6px}
@media(max-width:1024px){.chat-roster{position:fixed;z-index:101;inset:auto 8px max(8px,env(safe-area-inset-bottom));width:auto;height:min(620px,calc(100dvh - 24px));border-radius:20px}.chat-roster-member{min-height:44px}}

.chat-leave{display:grid;place-items:center;flex:0 0 25px;width:25px;height:28px;padding:4px;border:0;border-radius:7px;background:transparent;color:#65809e;cursor:pointer}.chat-leave svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.chat-leave:hover{background:#e5edfa;color:#b23d4b}.chat-left-state{height:100%;min-height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;color:#54729e}.chat-left-state>button{padding:9px 24px;border:0;border-radius:10px;background:#3558df;color:white;font:700 14px/1.4 Rubik,sans-serif;cursor:pointer}

.chat-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:6px}.chat-heading>.chat-online{grid-column:1;grid-row:1;justify-self:start;font-size:10px;max-width:100%}.chat-heading>div:not(.chat-heading-actions){grid-column:2;grid-row:1;min-width:0;justify-self:center}.chat-heading h2{justify-content:center;white-space:nowrap;text-align:center;font-size:16px}.chat-heading>.chat-heading-actions{grid-column:3;grid-row:1;display:flex;justify-content:flex-end;align-items:center;gap:3px;justify-self:end;min-width:0}.chat-heading:has(.chat-minimize:not([hidden])){column-gap:6px}

.chat-mention{color:#203961}

.chat-sound{display:grid;place-items:center;flex:0 0 25px;width:25px;height:28px;padding:4px;border:0;border-radius:7px;background:transparent;color:#65809e;cursor:pointer}.chat-sound svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.chat-sound:hover{background:#e5edfa;color:#3558a5}.chat-sound[aria-pressed=false]{color:#a56d5b}.chat-heading-actions .chat-minimize{width:25px;height:28px;flex:0 0 25px}

.chat-attachment-preview{display:flex;align-items:center;gap:8px;padding:8px 12px;flex-shrink:0;border-top:1px solid #dce6f3;background:#f5f9ff;font:12px/1.4 system-ui,sans-serif}.chat-attachment-preview img{width:64px;height:48px;object-fit:contain;border-radius:5px;background:#e4ecf8}.chat-attachment-preview span{flex:1;min-width:0}.chat-attachment-preview button{border:0;background:transparent;color:#54729e;font-size:22px;cursor:pointer}.chat-screenshot{display:block;margin-top:7px}.chat-screenshot img{display:block;max-width:100%;max-height:240px;width:auto;height:auto;border-radius:8px;object-fit:contain;background:#e4ecf8}

@media(min-width:1025px){.chat-drawer-handle{width:58px;height:55px;gap:7px;padding:0 9px;border-radius:0 14px 14px 0;font:700 13px/1.2 Rubik,system-ui,sans-serif;white-space:nowrap}.chat-handle-label{display:block;pointer-events:none}.chat-drawer-handle svg{width:15px;height:15px;flex:0 0 15px;pointer-events:none}}

.chat-drawer-handle[hidden]{display:none!important}
@media(min-width:1025px){html[data-chat-section] .chat-drawer{z-index:75}}

@media(min-width:1025px){.chat-drawer-handle{gap:4px;padding:0 7px;font-size:12px}.chat-drawer-handle svg{width:13px;height:13px;flex-basis:13px}}




.chat-unread-badge{display:none}.chat-jump-latest{align-self:flex-end;flex-shrink:0;margin:0 10px 6px;padding:5px 11px;border:1px solid #c8d8f0;border-radius:16px;background:#f5f9ff;color:#3558a5;font:700 11px/1.4 system-ui,sans-serif;cursor:pointer;box-shadow:0 2px 6px #24496b14}.chat-jump-latest:hover{background:#e5eeff}
@media(min-width:1025px){.chat-unread-badge{position:absolute;left:9px;top:3px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:18px;height:18px;padding:0 4px;border:2px solid #f5f9ff;border-radius:12px;background:#dc3549;color:white;font:800 10px/1 system-ui,sans-serif;pointer-events:none}.chat-unread-badge[hidden]{display:none!important}.chat-drawer-handle:has(.chat-unread-badge:not([hidden])) .chat-handle-label{transform:translateY(7px)}}

@media(max-width:1024px){.chat-drawer-handle{display:none!important}}
/* Right-side desktop dock; mobile keeps its existing full-width dialog. */
@media(min-width:1025px){
  .chat-drawer{left:auto;right:18px}
  .chat-drawer.is-collapsed{transform:translateX(calc(100% + 18px))}
  .chat-drawer .chat-panel{border-top-right-radius:20px;border-top-left-radius:0}
  .chat-drawer-handle{left:auto;right:calc(100% - 1px);border-left:1px solid #ffffffd9;border-right:1px solid #dce6f3;border-radius:13px 0 0 13px;box-shadow:-3px 2px 7px #24496b12}
  .chat-drawer.is-collapsed .chat-drawer-handle{box-shadow:-3px 2px 8px #24496b1f}
  .chat-resize-grip{left:0;right:auto;cursor:nesw-resize}
  .chat-drawer .chat-form{padding-left:17px;padding-right:10px}
  .chat-roster.opens-left{border-left:1px solid #ffffffd9;border-right:1px solid #dce6f3;box-shadow:-6px 5px 20px #24496b20}
}
