/* Social controls stay inside the chat scroll budget and the players' identity area. */
.room-chat-dialog #room-chat-picker-toggle{align-self:flex-start;border:0;background:var(--ui-surface-soft);color:var(--ui-ink);padding:6px 12px;border-radius:12px;min-height:34px;font-size:12px;flex:none}
.chat-reply-preview{display:flex;align-items:center;gap:8px;flex:none;border-left:3px solid var(--ui-accent);padding:7px 9px;background:var(--ui-surface-soft);border-radius:8px;font-size:11px}.chat-reply-preview span{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-reply-preview button,.chat-picker button,.chat-action-menu button{border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-ink);border-radius:9px;min-height:34px;padding:5px 9px}
.chat-action-menu{display:flex;flex-wrap:wrap;gap:5px;padding:8px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface-soft);flex:none}.chat-action-menu button{min-width:34px}.chat-action-menu button:first-child{font-size:12px}
.chat-content{position:relative}.chat-actions-toggle{display:inline-block;border:0;background:transparent;color:var(--ui-muted);min-width:36px;min-height:30px;font-size:16px;line-height:1;padding:3px 8px}.chat-actions-toggle:focus-visible,.chat-avatar[role=button]:focus-visible,.avatar-wrap[role=button]:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}.chat-avatar[role=button],.avatar-wrap[role=button]{cursor:pointer}.chat-message{touch-action:pan-y}.chat-quoted{font-size:11px;line-height:1.5;border-left:2px solid var(--ui-accent);padding:5px 8px;margin-top:5px;background:var(--ui-surface-soft);border-radius:5px;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.chat-reactions{display:flex;gap:4px;flex-wrap:wrap}.chat-reactions:empty{display:none}.chat-reactions button{border:1px solid var(--ui-line);border-radius:14px;padding:4px 8px;min-height:30px;color:var(--ui-ink);background:var(--ui-surface-soft);font-size:12px}.chat-reactions button[aria-pressed=true]{border-color:var(--ui-accent);box-shadow:inset 0 0 0 1px var(--ui-accent)}.chat-self .chat-reactions{justify-content:flex-end}.chat-favorite{display:block;font-size:10px;padding:4px}
.chat-picker{display:flex;flex-direction:column;flex:0 1 auto;min-height:100px;max-height:min(280px,38dvh);overflow:hidden;overscroll-behavior:contain;border:1px solid var(--ui-line);border-radius:14px;padding:10px;background:var(--ui-surface-soft)}.chat-picker-heading{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:6px}.chat-picker-tabs{display:flex;gap:5px;min-width:0}.chat-picker-tabs button{font-size:12px}.chat-picker-tabs button[aria-selected=true]{border-color:var(--ui-accent);color:var(--ui-accent);font-weight:600}.chat-picker-page{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.chat-picker-page .chat-pack-import{margin-top:0}.chat-emoji-list{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}.emoji-choice{display:inline-flex;align-items:center}.emoji-choice>button:first-child{font-size:20px}.emoji-choice>button+button{padding:2px;min-height:28px;font-size:12px}.chat-emoji-form,.chat-pack-import{display:flex;gap:6px;margin:7px 0}.chat-picker input{min-width:0;flex:1;width:0;font:inherit;font-size:16px;line-height:22px;border:1px solid var(--ui-line);border-radius:8px;padding:8px;color:var(--ui-ink);background:var(--ui-surface)}.chat-picker form button{font-size:12px;flex:none}.sticker-pack-list{display:flex;gap:5px;overflow:auto;padding:4px 0}.sticker-pack-list button{flex:none;font-size:11px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sticker-pack-list button[aria-pressed=true]{border-color:var(--ui-accent);color:var(--ui-accent)}.sticker-pack-actions{text-align:right}.sticker-pack-actions button{font-size:10px}.sticker-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:7px}.sticker-tile{min-width:0;text-align:center}.sticker-send{width:100%;aspect-ratio:1}.sticker-favorite{font-size:9px!important;min-height:28px!important;padding:3px!important;margin-top:3px}.sticker-media{overflow:hidden;display:grid;place-items:center;min-width:0}.sticker-media img,.sticker-media video,.sticker-animation{display:block;width:100%;height:100%;object-fit:contain;max-width:100%;max-height:100%}.sticker-animation svg{display:block;width:100%;height:100%}.chat-sticker-preview{width:120px;height:120px;padding:6px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface-soft);color:var(--ui-ink);font-size:12px;margin-top:5px}
.seat-identity:has(.avatar-social-bubble:not([hidden]))>strong,.seat-identity:has(.avatar-social-bubble:not([hidden]))>small{visibility:hidden}.avatar-social-bubble{position:absolute;left:0;right:2px;top:50%;transform:translateY(-50%);max-height:45px;padding:5px 7px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface);color:var(--ui-ink);font-size:11px;line-height:1.4;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;pointer-events:none}.avatar-social-bubble.sticker-media{width:48px;height:48px;max-height:48px;padding:0;display:grid;right:auto;left:0}.seat-identity:has(.avatar-social-bubble){position:relative}
.player-profile-dialog{width:min(440px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:20px;overflow:auto;background:var(--ui-surface);color:var(--ui-ink)}.player-profile-dialog .dialog-heading{align-items:center;gap:12px}.player-profile-dialog h2{font-size:20px;min-width:0;overflow-wrap:anywhere}.player-profile-tabs{display:flex;gap:8px;margin:14px 0}.player-profile-tabs button{flex:1;min-height:42px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface-soft);color:var(--ui-ink)}.player-profile-tabs button[aria-selected=true]{border-color:var(--ui-accent);color:var(--ui-accent)}#player-profile-status{font-size:13px;color:var(--ui-muted)}#player-profile-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.profile-stat{display:flex;flex-direction:column;gap:5px;text-align:center;background:var(--ui-surface-soft);border-radius:10px;padding:10px 2px}.profile-stat strong{font-size:18px}.profile-stat span{font-size:10px;color:var(--ui-muted)}#player-profile-recent{list-style:none;margin:14px 0;padding:0}.profile-result{display:grid;grid-template-columns:24px 1fr;gap:5px 8px;padding:10px 0;border-bottom:1px solid var(--ui-line);font-size:12px}.profile-result small{grid-column:2;color:var(--ui-muted)}.profile-result span{overflow-wrap:anywhere}.profile-result-win{color:var(--ui-accent)}
.chat-reply-preview[hidden],.chat-picker[hidden],.chat-action-menu[hidden],.avatar-social-bubble[hidden],#room-chat-picker-toggle[hidden]{display:none!important}
@media(max-width:380px){.room-chat-dialog[open]{gap:6px}.sticker-items{grid-template-columns:repeat(3,minmax(0,1fr))}.avatar-social-bubble{left:0;right:2px;font-size:10px}.avatar-social-bubble.sticker-media{left:0}}
@media(max-height:520px) and (orientation:landscape){.chat-picker{max-height:150px}#room-chat-picker #sticker-pack-source{min-height:36px;height:36px;padding:5px 8px}.room-chat-dialog .room-chat-shortcuts,.room-chat-dialog .room-chat-footnote{display:none}.avatar-social-bubble{max-height:36px}.avatar-social-bubble.sticker-media{height:36px;width:36px}.player-profile-dialog{padding:14px}}
@media(prefers-reduced-motion:reduce){.avatar-social-bubble,.sticker-media{animation:none!important;transition:none!important}}
.room-chat-dialog[data-keyboard-open='true'] .chat-picker{min-height:60px;max-height:160px}
.room-chat-dialog[data-keyboard-open='true'] #room-chat-picker-toggle{min-height:30px;padding:4px 10px}

.sticker-import-status{margin:5px 0 8px;font-size:12px;line-height:1.5;color:var(--ui-ink);overflow-wrap:anywhere}.sticker-import-status[hidden]{display:none}.chat-pack-import input[aria-invalid='true']{outline:2px solid var(--ui-accent);outline-offset:1px}
