.chat-page{background:#f9faff}
.message-retraction{display:flex;justify-content:center;margin:10px 0;padding:2px 12px;color:#687386;font:12px/20px system-ui,'Microsoft YaHei',sans-serif;text-align:center}
.message-retraction>span{display:inline-flex;align-items:center;justify-content:center;gap:5px}
.message-retraction svg{width:13px;height:13px;flex:none}
.quoted-message{display:flex;flex-direction:column;gap:3px;background:#75718b0b;border-left:2px solid #b9abd9;padding:6px 9px;margin-bottom:7px;max-width:100%;font-size:12px;color:#797087;line-height:1.5}
.quoted-message strong{font-size:11px;font-weight:500}.quoted-message span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
button.quoted-message{width:100%;text-align:left;font-family:inherit;border-top:0;border-right:0;border-bottom:0;border-radius:0;cursor:pointer;white-space:normal}
button.quoted-message:hover{background:#75718b20}
button.quoted-message:focus-visible{outline:2px solid #7454ba;outline-offset:2px}
.quoted-target .bubble,.quoted-target .bubble-block,.message-retraction.quoted-target,.join-notice.quoted-target{position:relative}
.quoted-target .bubble:after,.message-retraction.quoted-target:after,.join-notice.quoted-target:after{content:'';position:absolute;inset:-4px;border:2px solid #7454ba;border-radius:10px;background:#7454ba12;pointer-events:none;animation:quote-emphasis 4s ease both}
.quoted-target-label{position:absolute;bottom:100%;left:0;color:#594087;background:#f5f1ff;border-radius:4px;padding:0 5px;white-space:nowrap;font-size:12px;font-weight:600;line-height:20px;pointer-events:none;animation:quote-emphasis 4s ease both}
@keyframes quote-emphasis{0%,100%{opacity:0}6%,88%{opacity:1}}
.chat-date-overlay{position:sticky;top:8px;height:0;z-index:3;display:flex;justify-content:center;pointer-events:none;overflow:visible}
.chat-date-badge{flex:none;align-self:flex-start;padding:4px 12px;border-radius:8px;background:#e8edf5;color:#42516a;box-shadow:0 2px 6px #24324716;font-size:12px;line-height:20px;font-weight:500;opacity:0;transition:opacity 180ms ease;pointer-events:none}
.chat-date-overlay.is-visible .chat-date-badge{opacity:1}
@media(prefers-reduced-motion:reduce){.chat-date-badge{transition:none}.quoted-target .bubble:after,.message-retraction.quoted-target:after,.join-notice.quoted-target:after,.quoted-target-label{animation:none}}
.bubble-row[tabindex="-1"]:focus,.message-retraction[tabindex="-1"]:focus,.join-notice[tabindex="-1"]:focus{outline:none}
.reply-draft{display:flex;align-items:center;gap:8px;padding:7px 10px;background:#f3f0fa;border-radius:6px;margin-bottom:8px}.reply-draft span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-draft button{display:flex;background:transparent;padding:5px}.reply-draft svg{width:16px;height:16px}
.chat-page .chat-header{gap:10px;padding:12px 0;min-height:70px;border-bottom:0}
.chat-room-avatar{width:40px;height:40px;flex:0 0 40px;background:#e9f2ff;color:#458ccb;display:flex;align-items:center;justify-content:center;border-radius:12px;overflow:hidden}
.chat-room-avatar img{width:100%;height:100%;object-fit:cover}.chat-room-avatar svg{width:25px;height:25px}
.chat-header .top-title h1{font-size:17px;line-height:1.4}.chat-header .top-title p{margin:3px 0 0;font-size:11px;color:#7a8495}.chat-header .icon-btn{padding:4px;min-width:32px;min-height:36px}
.chat-room-note{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:8px;background:#f1edff;margin:0 0 6px;flex-shrink:0}.chat-room-note>svg{width:23px;height:23px;flex-shrink:0;color:#9477e9}.chat-room-note>div{min-width:0}.chat-room-note span{font-size:11px;color:#785cbf}.chat-room-note p{margin:3px 0 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.chat-page .network:empty{display:none}.chat-page .network{min-height:0}
.chat-page .history{padding:10px 0 14px}.chat-page .earlier{background:transparent;color:#84899c;margin-bottom:8px}
.chat-day{display:flex;align-items:center;justify-content:center;gap:12px;color:#8b90a0;font-size:11px;margin:14px 0 20px}.chat-day:before,.chat-day:after{content:'';height:1px;width:24px;background:#d9dce5}
.chat-page .bubble-row{margin:16px 0;gap:10px}.chat-page .bubble-row .avatar{border-radius:50%;background:#eae9f8}.chat-page .bubble-row>[data-person]{border-radius:50%}
.chat-page .message-meta{color:#7c8291;font-size:11px;line-height:1.5;margin-bottom:5px}.chat-page .message-meta .badge{margin:0 5px;padding:1px 5px;font-size:10px;border-radius:4px;background:#eaf4ff;color:#3984ac}
.chat-page .sender-official .message-meta .badge{color:#bb5354;background:#fff0ed}.chat-page .sender-support .message-meta .badge{color:#4889b0;background:#e8f3fc}
.chat-page .bubble{background:white;border-radius:8px;padding:8px 11px;line-height:1.6;box-shadow:0 3px 10px #29314c03;min-width:0;width:fit-content}
.chat-page .sender-official:not(.own) .bubble{background:#f3efff}.chat-page .own .bubble{background:#eee8ff}
.chat-page .message-tools{gap:12px;min-height:20px}.chat-page .message-tools button{font-size:10px;color:#8c849f}
.chat-page .composer{background:#fff;border:0;border-radius:8px 8px 0 0;padding:10px 8px max(12px,env(safe-area-inset-bottom));box-shadow:0 -4px 16px #29314c03}
.chat-page .compose-line{align-items:center;gap:7px}.chat-page .compose-line textarea{border:0;background:#f5f6fb;border-radius:22px;padding:12px 14px;min-height:44px;font-size:15px;line-height:1.4}
.chat-page .compose-line [type=submit]{width:42px;height:42px;min-width:42px;min-height:42px;border-radius:50%;background:var(--accent)}
.chat-page .media-tools{gap:8px;margin-bottom:7px}.chat-page .media-tools small{font-size:10px;color:#878b99}.chat-page .media-tools button{color:#666c7b}
.chat-page .reply-bar:empty{display:none}.chat-page #emoji-panel[hidden]{display:none}.chat-support-link{display:block;margin:14px 0;color:var(--accent)}
@media(max-width:600px){.chat-page{padding:0 12px}.chat-page .chat-header{gap:7px}.chat-room-avatar{width:34px;height:34px;flex-basis:34px;border-radius:10px}.chat-header .top-title h1{font-size:15px}.chat-page .chat-header .icon-btn svg{width:21px;height:21px}.chat-page .bubble-block{max-width:calc(100% - 52px)}.chat-page .bubble{font-size:15px}}
@media(min-width:900px){#community>.chat-page{padding-inline:26px}.chat-page .bubble-block{max-width:min(70%,560px)}.chat-page .bubble{font-size:14px}.chat-page .composer{padding:12px 16px 18px}.chat-page .compose-line textarea{min-height:46px}.chat-room-note{margin-top:4px}}
.official-user-badge{display:inline-flex;align-items:center;vertical-align:middle;gap:3px;padding:1px 5px;border-radius:4px;background:#fff3d6;color:#865600;font-size:inherit;line-height:inherit;font-weight:500;white-space:nowrap;flex-shrink:0}
.official-user-badge svg{display:block;width:1em;height:1em;flex:none}
.conversation-title:has(.official-user-badge){font-size:14px;line-height:20px;align-items:center}
.conversation-title:has(.official-user-badge) h3{font-size:inherit;line-height:inherit;margin:0}
.chat-page .message-meta{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.chat-page .message-meta .official-user-badge{font-size:inherit;line-height:inherit}
.personal h2:has(.official-user-badge),.copy h3:has(.official-user-badge){display:flex;align-items:center;flex-wrap:wrap;gap:6px}
/* Lightweight avatar action menu, outside the scroll container. */
.person-action-menu{position:fixed;z-index:20;min-width:144px;max-width:min(240px,calc(100vw - 24px));padding:5px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #20243724}
.person-action-menu button{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:9px 11px;border-radius:4px;background:transparent;text-align:left;font-size:14px;color:var(--ink)}
.person-action-menu button+button{border-top:1px solid var(--line)}
.person-action-menu button:hover,.person-action-menu button:focus-visible{background:#f2eefb;filter:none}
.person-action-menu button svg{width:16px;height:16px;flex:none;color:var(--accent)}
.person-action-menu button span{min-width:0;overflow-wrap:anywhere}
.person-action-menu button:disabled{color:var(--muted);cursor:not-allowed}
