/* Shared chat UI. The cinema drawer replaces only these colour variables. */
.room-shell .chat{--chat-paper:#fffbf5;--chat-surface:#f2e6d9;--chat-ink:#73553e;--chat-muted:#aa8e76;--chat-line:#eadaca;--chat-hover:#f6ebdf;--chat-selected:#f0decb;--chat-accent:#a77250;--chat-popover:#fffaf3;--chat-shadow:#62412a24;--chat-mention:#f6e4c7;position:relative;color:var(--chat-ink);background:var(--chat-paper)!important;overflow:hidden;isolation:isolate}
.room-shell .chat .chat-title{min-height:57px;padding:15px 18px;border-bottom:1px solid var(--chat-line);background:var(--chat-paper);color:var(--chat-ink);gap:10px}
.room-shell .chat .chat-title>div{gap:9px;min-width:0}.room-shell .chat .chat-title strong{font-size:14px;font-weight:700;letter-spacing:-.15px}.room-shell .chat .chat-title svg{color:var(--chat-muted)}
.room-shell .chat .chat-title button{width:30px;min-width:30px;height:30px;min-height:30px;border:0;border-radius:9px;background:transparent;color:var(--chat-muted)}
.room-shell .chat .chat-title button:hover{background:var(--chat-surface);color:var(--chat-ink)}
.room-shell .chat .messages{position:relative;display:block;padding:0 8px 13px;flex:1;min-height:0;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--chat-line) transparent;scroll-behavior:auto;scroll-padding-top:43px;scroll-padding-bottom:18px;overflow-anchor:none}
.room-shell .chat .message-list{display:flex;flex-direction:column;min-height:100%;padding-top:20px}
.room-shell .chat .chat-day{font-size:9px;color:var(--chat-muted);margin:3px 9px 22px;letter-spacing:.15px;gap:10px}
.room-shell .chat .chat-day::before,.room-shell .chat .chat-day::after{background:var(--chat-line)}
.room-shell .chat .message{display:flex;align-items:flex-start;position:relative;gap:10px;padding:9px 9px 7px;min-height:48px;flex-shrink:0;margin:3px 0 0;border:0;border-radius:8px;background:transparent;box-shadow:none!important;outline:0;transition:background-color .12s;animation:none;touch-action:pan-y}
.room-shell .chat .message-avatar,.room-shell .chat .message-avatar>.avatar,.room-shell .chat .message>.avatar{width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;max-height:32px!important;aspect-ratio:1;border-radius:50%;object-fit:cover;flex-shrink:0;padding:0;border:0;background:var(--chat-surface)}
.room-shell .chat .message-avatar{overflow:hidden;display:grid;place-items:center;color:var(--chat-muted)}
.room-shell .chat .message-avatar>img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:cover;border-radius:50%;flex-shrink:0}
.room-shell .chat .message-avatar-spacer{width:32px;min-width:32px;flex:0 0 32px;font-size:8px;line-height:20px;text-align:center;color:var(--chat-muted)}
.room-shell .chat .message-avatar-spacer time{opacity:0}.room-shell .chat .message:hover .message-avatar-spacer time,.room-shell .chat .message:focus-within .message-avatar-spacer time{opacity:1}
.room-shell .chat .message-grouped{margin:0;padding-top:2px;padding-bottom:2px;min-height:24px}
.room-shell .chat .message-body{position:static;min-width:0;flex:1;overflow:visible!important}
.room-shell .chat .message-heading{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 3px;line-height:1.3;min-height:17px}
.room-shell .chat .message-heading strong{font-size:12px;line-height:1.3;font-weight:700;color:var(--chat-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70%}
.room-shell .chat .message-heading time{font-size:9px;color:var(--chat-muted);white-space:nowrap;font-weight:400}
.room-shell .chat .message-heading .host-badge,.room-shell .chat .message-host,.room-shell .chat .chat-host{display:inline-flex;align-items:center;gap:3px;min-height:14px;padding:1px 4px;font-size:8px;font-weight:650;border-radius:4px;color:var(--chat-accent);background:var(--chat-surface)}
.room-shell .chat .message-body .message-text{display:block;width:auto;max-width:100%;padding:0;margin:0;border:0;border-radius:0;background:none!important;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;color:var(--chat-ink)!important;font:400 13px/1.52 'DM Sans',system-ui,sans-serif;user-select:text}
.room-shell .chat .message-edited{font-size:9px;color:var(--chat-muted);margin-left:5px;white-space:nowrap}
.room-shell .chat .message-pending .message-text{opacity:.55}
.room-shell .chat .message:hover,.room-shell .chat .message-selected{background:var(--chat-hover)!important}
.room-shell .chat .message-mentioned,.room-shell .chat .message-reply-recipient{background:var(--chat-mention)!important;box-shadow:none!important;border:0!important}
.room-shell .chat .message-mentioned:hover,.room-shell .chat .message-reply-recipient:hover,.room-shell .chat .message-highlight{background:var(--chat-selected)!important;box-shadow:none!important;border:0!important}
.room-shell .chat .message-mention{display:inline;padding:1px 3px;margin:0 1px;border:0;border-radius:4px;background:var(--chat-selected);color:var(--chat-accent);font-weight:600;white-space:normal;font-size:inherit;line-height:inherit}
.room-shell .chat .reply-ref{display:flex;align-items:center;gap:5px;max-width:100%;padding:0;margin:0 0 5px;border:0!important;border-left:0!important;border-radius:0;background:none;box-shadow:none!important;color:var(--chat-muted);font-size:10px;line-height:16px;text-align:left;white-space:nowrap;overflow:hidden;animation:none}
.room-shell .chat .reply-ref>svg{flex-shrink:0;width:14px;height:14px;opacity:.7}
.room-shell .chat .reply-ref>b,.room-shell .chat .reply-ref>strong{color:var(--chat-ink);font-size:10px;max-width:92px;font-weight:600;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}
.room-shell .chat .reply-ref>span{min-width:0;font-size:10px;font-weight:400;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.room-shell .chat .reply-ref:hover{color:var(--chat-ink)}
.room-shell .chat .message-retry{color:#bd755c;font-size:10px;padding:4px 0;border:0;background:transparent}

/* A single persistent surface, with frequently used reactions up front. */
.room-shell .chat .message .message-actions{position:absolute!important;top:auto;bottom:calc(100% - 4px);right:5px;z-index:7;display:flex!important;align-items:center;justify-content:flex-end;gap:1px!important;max-width:calc(100% - 6px);width:max-content;padding:4px!important;margin:0!important;border:1px solid var(--chat-line)!important;border-radius:10px;background:var(--chat-popover)!important;box-shadow:0 3px 12px var(--chat-shadow)!important;opacity:0!important;visibility:hidden;pointer-events:none;transform:none;transition:opacity .1s,visibility .1s;overflow:visible}
.room-shell .chat .message .message-actions>button{width:26px!important;min-width:26px;height:28px!important;min-height:28px;padding:3px;flex-shrink:0;display:grid;place-items:center;border:0!important;border-radius:6px!important;background:transparent!important;color:var(--chat-muted);font-size:18px;line-height:1;box-shadow:none;transition:background-color .12s,color .12s}
.room-shell .chat .message .message-actions>button>svg:not(.chat-emoji){width:16px;height:16px}
.room-shell .chat .message .message-actions>button:hover,.room-shell .chat .message .message-actions>button:focus-visible{background:var(--chat-surface)!important;color:var(--chat-ink)}
.room-shell .chat .message .message-actions>button[aria-pressed=true]{background:var(--chat-selected)!important;color:var(--chat-accent)}
.room-shell .chat .message .message-actions>.action-divider{display:block;width:1px;height:21px;background:var(--chat-line);margin:0 4px;flex-shrink:0}
.room-shell .chat .message:hover .message-actions,.room-shell .chat .message:focus-within .message-actions,.room-shell .chat .message-selected .message-actions{display:flex!important;opacity:1!important;visibility:visible;pointer-events:auto;transform:none}
.room-shell .chat .chat-emoji{display:inline-block;width:24px;height:24px;font-size:24px;line-height:24px;vertical-align:-6px;flex-shrink:0;object-fit:contain}
.room-shell .chat .quick-reaction .chat-emoji{width:19px;height:19px;font-size:19px;line-height:19px;vertical-align:middle}
.room-shell .chat .reaction-row.outside{display:flex;flex-wrap:wrap;gap:5px;margin:5px 0 0}
.room-shell .chat .reaction-row.outside button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:27px;min-width:39px;padding:3px 7px;border:1px solid var(--chat-line);border-radius:8px;background:var(--chat-surface);color:var(--chat-ink);box-shadow:none;animation:none;font-size:16px;line-height:19px}
.room-shell .chat .reaction-row.outside button:hover{background:var(--chat-hover)}
.room-shell .chat .reaction-row.outside button.reacted{border-color:var(--chat-accent);background:var(--chat-selected);animation:none}
.room-shell .chat .reaction-row.outside small{margin:0;font-size:10px;font-weight:650;color:var(--chat-ink)}
.room-shell .chat .reaction-row .chat-emoji{width:18px;height:18px;font-size:18px;line-height:18px;vertical-align:middle}
.room-shell .chat .chat-empty{padding:22px 15px;gap:10px;margin:auto;min-height:140px;justify-content:center;color:var(--chat-muted);text-align:center}
.room-shell .chat .chat-empty>strong{font-size:12px;font-weight:600;color:var(--chat-muted)}

/* Composer, replies and inline editing share one compact field treatment. */
.room-shell .chat .composer{position:relative;z-index:8;flex-shrink:0;padding:10px 12px max(12px,env(safe-area-inset-bottom));border:0;background:var(--chat-paper)!important}
.room-shell .chat .compose-row{display:flex;align-items:flex-end;gap:2px;padding:5px;border:1px solid transparent;border-radius:13px;background:var(--chat-surface);box-shadow:none;transition:border-color .12s}
.room-shell .chat .compose-row:focus-within{border-color:var(--chat-line);box-shadow:none}
.room-shell .chat .compose-row textarea.text-input{display:block;resize:none;width:100%;flex:1;min-width:0;height:36px;min-height:36px!important;max-height:108px;margin:0;padding:8px 6px!important;border:0!important;border-radius:7px;background:transparent!important;box-shadow:none!important;color:var(--chat-ink)!important;font-family:inherit;font-size:16px!important;line-height:20px;outline:0!important;overflow:auto;scrollbar-width:thin}
.room-shell .chat .compose-row .text-input::placeholder{font-size:12px;color:var(--chat-muted);opacity:1}
.room-shell .chat .composer-emoji{display:grid;place-items:center;width:32px;min-width:32px;height:36px;margin:0;padding:6px;border:0;border-radius:8px;background:transparent;color:var(--chat-muted);flex-shrink:0}
.room-shell .chat .composer-emoji>svg{width:21px;height:21px}
.room-shell .chat .composer-emoji:hover,.room-shell .chat .composer-emoji[aria-expanded=true]{color:var(--chat-ink);background:var(--chat-hover)}
.room-shell .chat .compose-row .primary-icon{width:34px!important;min-width:34px;height:34px!important;min-height:34px;display:grid;place-items:center;flex-shrink:0;align-self:flex-end;margin:1px 0;border:0;border-radius:9px;background:#e8ac87;color:#704728;box-shadow:none;transition:background-color .12s,color .12s}
.room-shell .chat .compose-row .primary-icon>svg{width:18px;height:18px}
.room-shell .chat .compose-row .primary-icon:hover:not(:disabled){background:#e3a079;color:#5c3820}
.room-shell .chat .compose-row .primary-icon:disabled{opacity:.5;color:var(--chat-muted);background:transparent;border:0}
.room-shell .chat .replying{display:flex;align-items:center;gap:8px;min-height:36px;padding:1px 5px 8px;color:var(--chat-muted);font-size:10px;animation:none}
.room-shell .chat .replying>svg{width:15px;height:15px;flex-shrink:0}
.room-shell .chat .replying>span{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow:hidden;white-space:nowrap}
.room-shell .chat .replying b{font-size:10px;color:var(--chat-ink);font-weight:600}
.room-shell .chat .replying small{font-size:10px;color:var(--chat-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-shell .chat .replying .icon-button{height:25px;min-height:25px;width:25px;min-width:25px;background:transparent;color:var(--chat-muted);border:0;border-radius:7px}
.room-shell .chat .replying .icon-button:hover{background:var(--chat-surface)}
.room-shell .chat .message-edit{margin-top:4px}
.room-shell .chat .message-edit textarea{display:block;resize:vertical;width:100%;min-height:60px;max-height:150px;padding:8px 10px;border:1px solid var(--chat-line);border-radius:8px;background:var(--chat-surface);color:var(--chat-ink);font:400 13px/1.5 'DM Sans',system-ui,sans-serif;outline:0}
.room-shell .chat .message-edit textarea:focus{border-color:var(--chat-accent)}
.room-shell .chat .edit-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:6px;font-size:9px;color:var(--chat-muted)}
.room-shell .chat .edit-actions button{border:0;border-radius:6px;padding:5px 9px;font-size:10px;line-height:1.3;color:var(--chat-ink);background:var(--chat-surface);min-height:27px}
.room-shell .chat .edit-actions button:last-child{background:var(--chat-selected);color:var(--chat-accent);font-weight:650}
.room-shell .chat .edit-actions button:hover{background:var(--chat-hover)}
.room-shell .chat .edit-error{font-size:10px;color:#b2684e;margin:5px 0 0}

/* Searchable emoji popover: no backdrop and no interruption to the movie. */
.room-shell .chat .emoji-popover{position:absolute;z-index:20;bottom:calc(100% + 8px);right:8px;display:flex;flex-direction:column;width:min(360px,calc(100% - 16px));height:340px;max-height:min(360px,var(--emoji-available-height,320px));min-height:0;overflow:hidden;background:var(--chat-popover);border:1px solid var(--chat-line);border-radius:15px;box-shadow:0 7px 22px var(--chat-shadow);color:var(--chat-ink);animation:chat-menu-arrive .12s ease-out}
.room-shell .chat .emoji-popover>header{display:flex;align-items:center;gap:7px;padding:10px;border-bottom:1px solid var(--chat-line);flex-shrink:0}
.room-shell .chat .emoji-search{display:flex;align-items:center;gap:7px;flex:0 0 auto;min-width:0;border:1px solid transparent;border-radius:8px;background:var(--chat-surface);padding:0 8px;margin:9px;color:var(--chat-muted)}
.room-shell .chat .emoji-search:focus-within{border-color:var(--chat-accent)}
.room-shell .chat .emoji-search>svg{width:16px;height:16px;flex-shrink:0}
.room-shell .chat .emoji-search input{width:100%;height:33px;min-width:0;padding:0;border:0;background:transparent;color:var(--chat-ink);font-size:13px;outline:0}
.room-shell .chat .emoji-search input::placeholder{color:var(--chat-muted)}
.room-shell .chat .emoji-search>button{display:grid;place-items:center;width:25px;min-width:25px;height:27px;padding:3px;border:0;border-radius:6px;background:transparent;color:var(--chat-muted)}
.room-shell .chat .emoji-search>button:hover{background:var(--chat-hover);color:var(--chat-ink)}
.room-shell .chat .emoji-popover>header>button{display:grid;place-items:center;width:28px;min-width:28px;height:30px;border:0;border-radius:7px;background:transparent;color:var(--chat-muted)}
.room-shell .chat .emoji-popover>header>button:hover{background:var(--chat-surface);color:var(--chat-ink)}
.room-shell .chat .emoji-browser{display:flex;min-height:0;flex:1;overflow:hidden}
.room-shell .chat .emoji-categories{display:flex;flex-direction:column;align-items:center;gap:5px;width:40px;min-width:40px;padding:8px 3px;overflow-y:auto;scrollbar-width:none;border-right:1px solid var(--chat-line);background:var(--chat-paper)}
.room-shell .chat .emoji-categories button{display:grid;place-items:center;width:30px;height:31px;min-height:31px;padding:5px;border:0;border-radius:8px;background:transparent;color:var(--chat-muted);font-size:18px;line-height:1}
.room-shell .chat .emoji-categories button>svg{width:18px;height:18px}
.room-shell .chat .emoji-categories button>.chat-emoji{width:20px;height:20px;font-size:20px;line-height:20px}
.room-shell .chat .emoji-categories button:hover,.room-shell .chat .emoji-categories button[aria-selected=true],.room-shell .chat .emoji-categories button[aria-pressed=true]{color:var(--chat-ink);background:var(--chat-selected)}
.room-shell .chat .emoji-scroll{flex:1;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 8px 12px;scrollbar-width:thin;scrollbar-color:var(--chat-line) transparent}
.room-shell .chat .emoji-scroll h4{font-size:10px;line-height:1.3;font-weight:700;letter-spacing:.1px;color:var(--chat-muted);margin:4px 3px 8px}
.room-shell .chat .emoji-scroll section+section{margin-top:15px}
.room-shell .chat .emoji-scroll .emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
.room-shell .chat .emoji-scroll .emoji-grid button{display:grid;place-items:center;aspect-ratio:1;width:100%;height:auto;min-width:0;min-height:31px;padding:3px;border:0;border-radius:8px;background:transparent;color:var(--chat-ink);font-size:25px;line-height:1;transition:background-color .1s;box-shadow:none}
.room-shell .chat .emoji-scroll .emoji-grid button:hover,.room-shell .chat .emoji-scroll .emoji-grid button:focus-visible{background:var(--chat-surface);transform:none}
.room-shell .chat .emoji-scroll .emoji-grid button[aria-pressed=true]{background:var(--chat-selected)}
.room-shell .chat .emoji-grid .chat-emoji{width:28px;height:28px;font-size:28px;line-height:28px;max-width:100%;vertical-align:middle}
.room-shell .chat .emoji-preview{display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 12px;border-top:1px solid var(--chat-line);background:var(--chat-paper);flex-shrink:0;font-size:10px;color:var(--chat-muted);overflow:hidden}
.room-shell .chat .emoji-preview>span.chat-emoji{font-size:24px;line-height:24px}
.room-shell .chat .emoji-preview strong{font-size:11px;font-weight:650;color:var(--chat-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-shell .chat .emoji-preview small{font-size:9px;line-height:1.4;color:var(--chat-muted)}
.room-shell .chat .emoji-preview>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.room-shell .chat .emoji-empty,.room-shell .chat .emoji-no-results{padding:18px 9px;text-align:center;color:var(--chat-muted);font-size:11px;line-height:1.5}

.room-shell .chat .mention-menu{position:absolute;z-index:21;left:12px;right:12px;bottom:calc(100% + 6px);max-height:min(220px,var(--emoji-available-height,220px));overflow:auto;padding:5px;border:1px solid var(--chat-line);border-radius:12px;background:var(--chat-popover);box-shadow:0 5px 20px var(--chat-shadow);scrollbar-width:thin;animation:chat-menu-arrive .12s ease-out}
.room-shell .chat .mention-menu>button,.room-shell .chat .mention-menu>[role=option]{display:flex;align-items:center;gap:8px;width:100%;min-height:39px;padding:6px 8px;border:0;border-radius:8px;color:var(--chat-ink);background:transparent;text-align:left;font-size:12px}
.room-shell .chat .mention-menu>[role=option][aria-selected=true],.room-shell .chat .mention-menu>button:hover{background:var(--chat-selected)}
.room-shell .chat .mention-menu .avatar{width:25px!important;min-width:25px;height:25px!important;border:0;border-radius:50%;object-fit:cover;flex-shrink:0;padding:0}
.room-shell .chat .mention-menu small{margin-left:auto;color:var(--chat-muted);font-size:9px}
.room-shell .chat .chat-new-banner{position:absolute;z-index:9;top:61px;left:10px;right:10px;min-height:29px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;gap:8px;border:0;border-radius:7px;background:var(--chat-selected);color:var(--chat-accent);font-size:10px;box-shadow:0 2px 7px var(--chat-shadow)}
.room-shell .chat .chat-new-banner button{border:0;background:transparent;font-size:10px;font-weight:600;color:inherit;padding:2px 0;white-space:nowrap}
.room-shell .chat .new-message-divider{display:flex;align-items:center;gap:9px;margin:15px 9px 8px;min-height:14px;flex-shrink:0;color:var(--chat-accent);font-size:9px;font-weight:650}
.room-shell .chat .new-message-divider::before,.room-shell .chat .new-message-divider::after{content:'';height:1px;background:var(--chat-accent);opacity:.4;flex:1}
.room-shell .chat .chat-jump{position:absolute;z-index:9;left:50%;bottom:calc(var(--composer-height,76px) + 5px);display:flex;align-items:center;gap:6px;white-space:nowrap;max-width:calc(100% - 30px);min-height:31px;padding:6px 12px;border:1px solid var(--chat-line);border-radius:20px;background:var(--chat-popover);color:var(--chat-ink);box-shadow:0 2px 10px var(--chat-shadow);font-size:10px;font-weight:600;transform:translateX(-50%)}
.room-shell .chat .chat-jump:hover{background:var(--chat-surface)}
.room-shell .chat .chat-jump:active{transform:translateX(-50%) scale(.98)}
@keyframes chat-menu-arrive{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(hover:none){
  .room-shell .chat .message:not(.message-selected):not(.message-mentioned):not(.message-reply-recipient):not(.message-highlight):hover{background:transparent!important}
  .room-shell .chat .message:not(.message-selected):not(:focus-within) .message-actions{opacity:0!important;visibility:hidden;pointer-events:none}
  .room-shell .chat .message .message-actions>button{width:28px!important;min-width:28px;height:31px!important;min-height:31px}
}
@media(hover:none) and (max-width:380px){.room-shell .chat .message .message-actions>button{width:27px!important;min-width:27px}.room-shell .chat .message .message-actions{gap:0!important}}
@media(max-width:760px){
  .room-shell .chat .chat-title{min-height:48px;padding:11px 15px}.room-shell .chat .chat-title strong{font-size:13px}
  .room-shell .chat .messages{padding:0 7px 10px}.room-shell .chat .message-list{padding-top:19px}.room-shell .chat .message{padding-left:7px;padding-right:7px;gap:9px}.room-shell .chat .message-grouped{padding-top:2px;padding-bottom:2px}
  .room-shell .chat .composer{padding:8px 9px max(9px,env(safe-area-inset-bottom))}.room-shell .chat .chat-new-banner{top:52px;left:9px;right:9px}
  .room-shell .chat .emoji-popover{right:8px;width:calc(100% - 16px)}
  .room-shell .chat .emoji-search input{font-size:16px}.room-shell .chat .emoji-search input::placeholder{font-size:12px}
  .room-shell .chat .mention-menu{left:9px;right:9px}
  .room-shell .chat .chat-jump{bottom:calc(var(--composer-height,67px) + 5px)}
}
@media(prefers-reduced-motion:reduce){.room-shell .chat *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Floating chat surfaces live above the scroll panel, within movie-safe bounds. */
.room-shell.chat-layer-shell{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;background:transparent!important;overflow:visible!important;pointer-events:none!important;z-index:1200!important;container-type:normal;display:block!important;isolation:auto}
.room-shell.chat-layer-shell .chat.chat-layer{position:fixed!important;display:block!important;min-height:0!important;max-height:none!important;overflow:visible!important;background:transparent!important;pointer-events:auto;border:0!important;isolation:auto;flex:none}
.room-shell .chat-layer .message-actions{position:static!important;inset:auto!important;display:flex!important;flex-direction:column!important;gap:0!important;width:100%!important;max-width:none!important;height:100%;padding:5px!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important;background:var(--chat-popover)!important;border:1px solid var(--chat-line)!important;border-radius:15px!important;box-shadow:0 8px 28px var(--chat-shadow)!important;animation:chat-menu-arrive .12s ease-out}
.room-shell .chat-layer .action-reactions{display:flex;justify-content:space-around;gap:3px;padding-bottom:4px;border-bottom:1px solid var(--chat-line)}
.room-shell .chat-layer .message-actions button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;width:auto!important;min-width:0!important;min-height:38px!important;height:38px!important;flex:1;padding:4px;border:0;border-radius:9px;background:transparent;color:var(--chat-ink);box-shadow:none;transition:background .12s ease,transform .12s ease}
.room-shell .chat-layer .message-actions button:hover,.room-shell .chat-layer .message-actions button[aria-pressed=true]{background:var(--chat-selected)}
.room-shell .chat-layer .message-actions button:active{transform:scale(.94)}
.room-shell .chat-layer .message-actions button:disabled,.room-shell .chat-layer .emoji-grid button:disabled{opacity:.3;cursor:default}
.room-shell .chat-layer .message-actions button>svg{width:22px!important;height:22px!important}
.room-shell .chat-layer .message-actions button>.chat-emoji{font-size:24px;line-height:26px;width:26px;height:26px}
.room-shell .chat-layer .action-tools{display:flex;gap:3px;padding-top:5px}
.room-shell .chat-layer .action-tools button{height:51px!important;min-height:51px!important}
.room-shell .chat-layer .action-tools span{font-size:10px;font-weight:650;line-height:12px}
.room-shell .chat-layer .emoji-popover{position:static!important;inset:auto!important;display:flex!important;flex-direction:column;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;border-radius:17px!important;overflow:hidden!important;border:1px solid var(--chat-line)!important;background:var(--chat-popover)!important;box-shadow:0 10px 36px var(--chat-shadow)!important}
.room-shell .chat-layer .emoji-search{height:48px;min-height:48px;padding:8px 10px}
.room-shell .chat-layer .emoji-search input{min-width:0;font-size:16px}
.room-shell .chat-layer .emoji-search>button{width:32px;min-width:32px;height:32px}
.room-shell .chat-layer .emoji-categories{width:44px;min-width:44px}
.room-shell .chat-layer .emoji-categories button{width:34px;min-height:35px;height:35px}
.room-shell .chat-layer .emoji-scroll{padding:10px;touch-action:pan-y}
.room-shell .chat-layer .emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
.room-shell .chat-layer .emoji-grid button{min-height:36px}
.room-shell .chat-layer .emoji-preview{min-height:34px;height:34px;padding:5px 12px}
.room-shell .chat .chat-history{align-self:center;border:0;background:transparent;color:var(--chat-muted);font-size:10px;min-height:28px;padding:5px 12px;margin:0 0 9px;border-radius:20px;flex-shrink:0}
.room-shell .chat .chat-history:hover{background:var(--chat-hover);color:var(--chat-ink)}
.room-shell .chat .message-reply-recipient{background:#efe8dc!important}
.room-shell .chat .message-mentioned{background:#f7e4ce!important}
.room-shell .chat .message-reply-recipient.message-mentioned{background:linear-gradient(110deg,#f7e4ce,#efe8dc)!important}
.room-shell .chat .message-highlight{background:#e4cbb2!important}
.stage .fullscreen-chat .message-reply-recipient{background:#69847829!important}
.stage .fullscreen-chat .message-mentioned{background:#d5a16a27!important}
.stage .fullscreen-chat .message-highlight{background:#d5a16a45!important}
/* The avatar and approved heart artwork remain unchanged. */
/* Compact, single-action menus and consistently centred emoji tiles. */
.room-shell .chat-layer .action-tools button{height:43px!important;min-height:43px!important}
.room-shell .chat-layer .message-actions{border-radius:13px!important}
.room-shell .chat .chat-emoji{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex:none;margin:0;padding:0;line-height:1;text-align:center}
.room-shell .chat .emoji-grid button{display:flex!important;align-items:center;justify-content:center;padding:0!important;line-height:1;text-align:center}
.room-shell .chat .emoji-grid .chat-emoji{width:100%;height:100%;line-height:1;font-size:26px}
.room-shell .chat .emoji-grid svg.chat-emoji{width:28px;height:28px;display:block}
.room-shell .chat .messages{overscroll-behavior-y:contain}
.room-shell .chat .chat-refresh{position:absolute;top:50px;left:50%;z-index:15;pointer-events:none;width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--chat-line);border-radius:50%;background:var(--chat-popover);color:var(--chat-muted);box-shadow:0 3px 12px var(--chat-shadow);transition:transform .18s ease-out,opacity .16s ease-out}
.room-shell .chat .chat-refresh.is-loading svg{animation:chat-refresh-spin .75s linear infinite}
.room-shell .chat .chat-history-error{border:0;background:transparent;color:var(--chat-muted);font-size:11px;padding:8px}
@keyframes chat-refresh-spin{to{transform:rotate(360deg)}}
