.chat-heading h2{margin:.2rem 0}.chat-eyebrow{color:#547b82;letter-spacing:.18em;font-size:.65rem;font-weight:700}.chat-room-list{display:grid;gap:14px}.chat-room-card{display:flex;align-items:center;gap:16px;margin:0}.chat-room-card>div{flex:1;min-width:0}.chat-room-card h3{margin:0 0 8px}.chat-room-card h3 button{text-align:left;font-size:1.1rem;font-weight:750;padding:0;word-break:break-word}.chat-room-card p{font-size:.85rem;margin:0 0 12px;white-space:pre-wrap;overflow-wrap:anywhere}.chat-room-mark{display:grid;place-items:center;background:#e4f1ef;color:#3a7778;border-radius:18px;width:48px;height:48px;font-size:2rem;flex-shrink:0}.chat-room-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;color:#7a8492;font-size:.75rem}.chat-room-meta time{font-size:.68rem}.chat-role,.chat-pin-label{display:inline-flex;align-items:center;background:#eaf1f3;color:#4c6b74;border-radius:5px;padding:3px 7px;font-size:.68rem;font-weight:600}.chat-back{margin-bottom:16px;color:#4e6a85}.chat-room-header{display:flex;gap:14px;align-items:flex-start;justify-content:space-between}.chat-room-header h2{margin:.4rem 0;overflow-wrap:anywhere}.chat-room-header p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.85rem}.chat-room-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.chat-room-actions button{font-size:.72rem}.chat-conversation{padding:0;overflow:hidden}.chat-messages{height:min(58vh,600px);min-height:260px;overflow:auto;overscroll-behavior:contain;padding:20px;scrollbar-gutter:stable}.chat-message{padding:14px 12px;margin:0 0 12px;border-radius:12px;max-width:96%;background:#f4f6f8;overflow-wrap:anywhere}.chat-message.chat-own{background:#eef3ff;margin-left:5%}.chat-message-byline{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:9px}.chat-message-byline .author-link{font-size:.75rem}.chat-message-byline time,.chat-deleted time{font-size:.63rem;color:#8590a0;white-space:nowrap}.chat-identity{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.chat-identity button{font-weight:700;padding:0}.chat-message-text{font-size:.9rem;line-height:1.65;overflow-wrap:anywhere}.chat-message-tools{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-top:8px}.chat-message-tools button{padding:4px 7px;font-size:.68rem;color:#768094}.chat-deleted{color:#87909c;background:transparent;border:1px dashed #e0e4eb;font-size:.8rem}.chat-older{text-align:center}.chat-older button{font-size:.76rem;margin-top:12px}.chat-empty{text-align:center;color:#8c95a1;padding:35px 10px}.chat-composer{border-top:1px solid #e8edf2;padding:16px;background:#fff}.chat-composer textarea{min-height:70px;max-height:200px;resize:vertical;margin:0;font-size:.9rem}.chat-composer-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.chat-composer-footer>span{font-size:.7rem;color:#8b95a4}.chat-composer .error:empty,.chat-composer .form-note:empty{display:none}.chat-notice-option{display:flex;align-items:center;gap:7px;font-size:.75rem;margin:0}.chat-notice-option input{width:16px;height:16px;margin:0}.chat-notices{border-bottom:1px solid #d9e9e7;background:#f4faf8;padding:14px 16px}.chat-notices summary{display:flex;align-items:center;gap:9px;cursor:pointer;color:#47776f;font-weight:700;font-size:.8rem}.chat-notices summary b{display:inline-grid;place-items:center;min-width:22px;height:22px;background:#dfeee9;border-radius:50%;font-size:.65rem}.chat-notices>div{max-height:38vh;overflow:auto;margin-top:12px}.chat-pinned-message{background:#fff;border-left:3px solid #78a59b;max-width:100%;padding:12px;margin:0 0 8px}.chat-pinned-message button{font-size:.68rem}.chat-member-list{display:grid;gap:10px;max-height:55vh;overflow:auto}.chat-member{border-bottom:1px solid #e9edf2;padding:10px 0;display:flex;align-items:center;gap:10px;justify-content:space-between}.chat-member>div:first-child{min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:5px}.chat-member-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.chat-member-actions button{font-size:.7rem;padding:6px 8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:620px){.chat-room-card{gap:10px;padding:18px 14px}.chat-room-card>button{font-size:.72rem;padding:6px}.chat-room-mark{width:36px;height:36px;border-radius:12px;font-size:1.5rem}.chat-room-header{display:block}.chat-room-actions{justify-content:flex-start;margin-top:15px}.chat-message-byline{gap:5px}.chat-messages{padding:12px;height:52vh}.chat-message{max-width:100%;padding:11px}.chat-composer{padding:12px}.chat-member{align-items:flex-start;flex-direction:column}.chat-member-actions{align-self:flex-end}}
.chat-room-mark{overflow:hidden}.chat-room-mark img{width:100%;height:100%;object-fit:contain;display:block}.chat-room-mark-large{width:76px;height:76px;border-radius:20px;font-size:2.4rem;background:#f5f7fa;color:#2563eb}.chat-room-title{display:flex;align-items:center;gap:14px}.chat-room-title>div,.chat-room-details{min-width:0}.chat-room-person{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;color:#617084;font-size:.76rem;margin:7px 0}.chat-room-person button{font-size:inherit;padding:0;text-align:left;overflow-wrap:anywhere;color:#475569}.chat-room-person button span{color:#617084;font-weight:400}.chat-room-people{display:flex;gap:6px 20px;flex-wrap:wrap;margin:10px 0}.chat-room-person+.chat-room-meta{margin-top:10px}.chat-supervisor-note{padding:10px 12px;border:1px solid #e2e8f0;border-radius:9px;background:#eff6ff;color:#1e40af;line-height:1.6}.chat-photo-preview{display:flex;justify-content:center;margin:20px 0}.chat-photo-preview .chat-room-mark{width:144px;height:144px;border-radius:24px}.chat-photo-form input[type=file]{max-width:100%}.chat-photo-form .status:empty,.chat-photo-form .error:empty{display:none}@media(max-width:620px){.chat-room-card>button{max-width:5.5rem;line-height:1.5}.chat-room-title{gap:12px}.chat-room-mark-large{width:60px;height:60px;border-radius:16px}.chat-room-people{display:block}.chat-room-person{font-size:.76rem}}
/* Compact conversation view. Keep these selectors more specific than shared card themes. */
.chat-room-header.chat-messenger-header{display:block;padding:14px 16px;margin-bottom:12px}.chat-room-bar{display:flex;align-items:center;gap:10px;min-width:0}.chat-room-back{font-size:22px;min-width:34px;min-height:40px;padding:0;color:#2563eb}.chat-room-name{flex:1;min-width:0}.chat-messenger-header .chat-room-name h2{font-size:1.08rem;line-height:1.4;margin:0 0 3px}.chat-messenger-header .chat-room-mark{width:42px;height:42px;border-radius:13px}.chat-messenger-header .chat-room-meta{font-size:12px;gap:5px}.chat-members-open{font-size:12px;min-height:40px;flex-shrink:0;padding:6px}.chat-supervisor-bar{display:flex;align-items:center;gap:10px;margin-top:12px;font-size:12px;line-height:1.5;color:#2563eb}.chat-supervisor-bar>span{flex:1}.chat-supervisor-bar button{font-size:12px;min-height:38px;white-space:nowrap;padding:8px 12px}.chat-room-info{margin-top:10px;border-top:1px solid #e2e8f0;padding-top:5px}.chat-room-info>summary{font-size:12px;color:#617084;cursor:pointer;padding:7px 2px}.chat-room-info-content>p{margin:6px 0;font-size:13px}.chat-room-info .chat-room-people{margin:8px 0}.chat-room-info .chat-room-actions{justify-content:flex-start;margin:8px 0 0}.chat-room-info .chat-room-actions button{min-height:38px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;padding:7px 10px}
.chat-conversation.card{display:flex;flex-direction:column;height:min(72dvh,760px);min-height:400px;padding:0;border-radius:18px;overflow:hidden}.chat-conversation .chat-messages{flex:1;height:auto;min-height:170px;padding:12px 16px 18px;background:#f5f7fa;scrollbar-gutter:stable}.chat-conversation .chat-message,.chat-conversation .chat-message.chat-own{display:flex;align-items:flex-start;gap:8px;max-width:100%;padding:0;margin:0 0 12px;border:0;border-radius:0;background:transparent;box-shadow:none}.chat-conversation .chat-message.chat-own{justify-content:flex-end;margin-left:0}.chat-message-avatar{display:block;flex:0 0 32px;width:32px;height:32px;padding:0;border-radius:50%;overflow:hidden}.chat-message-avatar .avatar,.chat-message-avatar .avatar-small{width:32px;height:32px;min-width:32px;border-radius:50%;margin:0;display:grid;place-items:center}.chat-message-avatar .avatar img{width:100%;height:100%;object-fit:cover}.chat-message-stack{flex:1;min-width:0;max-width:calc(100% - 40px)}.chat-own .chat-message-stack{max-width:100%}.chat-sender{margin:0 0 4px;line-height:1.4}.chat-sender button{padding:0;font-size:12px;font-weight:650;line-height:1.4;text-align:left;max-width:100%;overflow-wrap:anywhere;color:#172033}.chat-message-line{display:flex;align-items:flex-end;gap:6px;max-width:100%}.chat-own .chat-message-line{flex-direction:row-reverse}.chat-bubble{width:max-content;max-width:calc(100% - 62px);min-width:0;padding:9px 12px;border-radius:3px 15px 15px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 1px 3px #17203306;overflow-wrap:anywhere}.chat-own .chat-bubble{border-radius:15px 3px 15px 15px;background:#dbeafe;border-color:#bfdbfe}.chat-conversation .chat-message-text{font-size:15px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}.chat-message-text:empty{display:none}.chat-message-side{width:56px;flex:0 0 56px;display:flex;flex-direction:column-reverse;align-items:flex-start;gap:2px;padding-bottom:2px}.chat-own .chat-message-side{align-items:flex-end}.chat-conversation .chat-message-time{display:block;font-size:11px;line-height:1.35;font-variant-numeric:tabular-nums;white-space:nowrap;color:#617084}.chat-message-menu{position:relative}.chat-message-menu>summary{display:grid;place-items:center;list-style:none;cursor:pointer;width:28px;height:24px;line-height:1;font-size:19px;color:#617084;border-radius:8px}.chat-message-menu>summary::-webkit-details-marker{display:none}.chat-message-menu>summary:hover,.chat-message-menu[open]>summary{background:#e2e8f0}.chat-message-menu>summary:focus-visible,.chat-room-info>summary:focus-visible,.chat-composer-options>summary:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.chat-message-menu .chat-message-tools{position:absolute;z-index:6;top:100%;right:0;display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:132px;padding:6px;margin:2px 0 0;border:1px solid #e2e8f0;border-radius:11px;background:#fff;box-shadow:0 7px 24px #1720331c}.chat-own .chat-message-menu .chat-message-tools{right:auto;left:0}.chat-message-menu .chat-message-tools button{display:block;min-height:36px;font-size:12px;line-height:1.4;text-align:left;padding:8px 10px;white-space:nowrap}.chat-message-menu .chat-message-tools button:hover{background:#f5f7fa;border-radius:7px}.chat-message-menu .chat-message-tools .danger{color:#aa3431}.chat-date-divider{display:flex;align-items:center;justify-content:center;gap:10px;margin:12px 0 18px;font-size:11px;color:#617084}.chat-date-divider:before,.chat-date-divider:after{content:"";height:1px;flex:1;background:#e2e8f0}.chat-date-divider span{background:#e2e8f0;padding:4px 10px;border-radius:20px;line-height:1.5}.chat-conversation .chat-deleted .chat-bubble{background:#f1f5f9;border:1px dashed #cbd5e1;color:#617084;box-shadow:none}.chat-conversation .chat-retained .chat-bubble{background:#f1f5f9;border-color:#94a3b8;color:#475569}.chat-deletion-label{font-size:12px;line-height:1.5;margin:0}.chat-retained .chat-deletion-label{font-size:10px;color:#617084;margin:0 0 7px}.chat-deletion-note{font-size:11px;line-height:1.5;margin:5px 0 0}.chat-conversation .chat-pin-label{font-size:10px;padding:2px 5px;margin-bottom:5px}.chat-conversation .chat-bubble .attachment-gallery{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:7px 0 0;max-width:300px}.chat-conversation .chat-bubble .attachment-gallery figure{border:0;border-radius:9px;background:transparent}.chat-conversation .chat-bubble .attachment-gallery img{width:100%;height:auto;max-height:320px;object-fit:contain}.chat-conversation .chat-bubble:has(.attachment-gallery){width:min(100%,300px)}
.chat-conversation .chat-notices{flex:none;padding:9px 14px;background:#eff6ff}.chat-conversation .chat-notices>summary{font-size:12px;min-height:24px}.chat-conversation .chat-notices>div{max-height:28dvh;margin-top:10px}.chat-conversation .chat-pinned-message{margin:0 0 10px;padding:0;border:0;background:transparent}.chat-conversation .chat-composer{flex:none;padding:10px 12px 12px;background:#fff;border-top:1px solid #e2e8f0}.chat-conversation .chat-composer textarea{font-size:16px;min-height:44px;max-height:130px;resize:vertical;border-radius:14px;padding:10px 12px;line-height:1.5}.chat-composer-options{margin:4px 0 0}.chat-composer-options>summary{display:inline-flex;align-items:center;cursor:pointer;font-size:12px;color:#2563eb;padding:6px 2px}.chat-conversation .chat-composer .attachment-editor{margin:2px 0 8px}.chat-conversation .chat-composer .attachment-previews{max-height:160px;overflow:auto}.chat-conversation .chat-composer-footer{margin-top:4px;gap:8px}.chat-conversation .chat-composer-footer>span,.chat-conversation .chat-notice-option{font-size:11px}.chat-conversation .chat-composer-footer>button{min-height:36px;padding:8px 18px;border-radius:12px;font-size:13px}.chat-conversation .chat-message-status{font-size:12px}body:has(.chat-conversation) .mobile-write{display:none!important}
@media(max-width:620px){.chat-room-header.chat-messenger-header{padding:11px 12px;border-radius:16px}.chat-room-bar{gap:8px}.chat-room-back{min-width:26px}.chat-messenger-header .chat-room-mark{width:36px;height:36px;border-radius:11px}.chat-messenger-header .chat-room-name h2{font-size:15px}.chat-messenger-header .chat-room-meta{font-size:11px}.chat-members-open{font-size:11px;padding:5px}.chat-supervisor-bar{font-size:11px;margin-top:8px;gap:8px}.chat-supervisor-bar button{font-size:11px;padding:7px 9px}.chat-conversation.card{height:calc(100dvh - 215px);min-height:390px;border-radius:16px}.chat-conversation .chat-messages{padding:9px 10px 14px;scrollbar-gutter:auto}.chat-conversation .chat-message{gap:7px;margin-bottom:11px}.chat-message-avatar,.chat-message-avatar .avatar,.chat-message-avatar .avatar-small{width:30px;height:30px;min-width:30px}.chat-message-avatar{flex-basis:30px}.chat-message-stack{max-width:calc(100% - 37px)}.chat-bubble{padding:8px 10px;max-width:calc(100% - 58px)}.chat-message-side{width:52px;flex-basis:52px}.chat-conversation .chat-message-time{font-size:10px}.chat-conversation .chat-message-text{font-size:15px}.chat-sender button{font-size:12px}.chat-conversation .chat-composer{padding:9px 10px 10px}.chat-date-divider{font-size:10px;margin:10px 0 15px}}
