/* Approved floating bubbles: 70% transparent backgrounds, opaque text/portraits. */
.match-chat-button{order:5;flex-shrink:0}
.match-chat-button.chat-discovery{position:relative;border-color:#ffe38d;box-shadow:0 0 0 2px #ffd17270;animation:chat-discovery-glow 1.2s ease-in-out 3}
.match-chat-button.chat-discovery:after{content:"";position:absolute;right:3px;top:3px;width:7px;height:7px;border-radius:50%;background:#ffe38d;pointer-events:none}
@keyframes chat-discovery-glow{50%{box-shadow:0 0 0 4px #ffd17244}}
@media(prefers-reduced-motion:reduce){.match-chat-button.chat-discovery{animation:none}}
.match-standings-button{order:4;flex-shrink:0;color:#ffe38d}
.match-chat-panel{position:absolute;z-index:6;left:max(12px,env(safe-area-inset-left));top:76px;width:147px;max-width:21vw;max-height:calc(100dvh - 190px);display:flex;flex-direction:column;color:#f2fbff;background:transparent;border:0;overflow:visible;text-shadow:0 1px 3px #031327;pointer-events:none}
/* Visual footprint is 70% of v36's width; text stays readable and footer targets stay 44px. */
.match-chat-heading{display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:0;margin:0;pointer-events:auto}
.match-chat-heading button{background:transparent;min-width:44px;min-height:44px;color:#c9f6ff;padding:3px;font-size:15px}
.match-chat-heading .match-chat-title{flex:1;min-width:44px;font-size:18px;text-align:center;padding-inline:0}
.match-chat-minimize,.match-chat-hide{flex:0 0 44px}
.match-chat-content{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.match-chat-log{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#7fd3eb66 transparent;touch-action:pan-y;padding:0}
.match-chat-message{position:relative;margin:0 0 2px;margin-inline-start:24px;padding:3px 5px 4px;min-height:38px;min-width:0;overflow-wrap:anywhere;background:rgba(6,18,39,.30);border:1px solid #87e9ff4d;border-radius:3px 10px 10px;pointer-events:auto}
.match-chat-author{display:flex;align-items:center;gap:3px;min-width:0;padding-inline-end:26px}
.match-chat-face{position:absolute;inset-inline-start:-24px;top:3px;width:20px;height:20px;border:1px solid #91e9ffad;border-radius:50%;background:#0a23434d;pointer-events:none}
.match-chat-identity{display:flex;min-width:0;flex:1;gap:0;align-items:flex-start;flex-direction:column;line-height:1.1}
.match-chat-identity bdi{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:800;color:#fff}
.match-chat-identity .rank-prestige{flex:0 1 auto;min-width:0;border:0;background:none;font-size:7px;line-height:1.2;padding:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--prestige-color,#a7dfee)}
.match-chat-text{font-size:11px;line-height:1.25;margin:0;padding:1px 0 0;white-space:pre-wrap;min-width:0}
.match-friend-button{background:#64d9fb19;border:1px solid #89e3fa66;border-radius:7px;color:#c3f9ff;font-size:9px;min-height:30px;padding:4px 7px;white-space:nowrap}
.match-friend-button.is-compact{position:absolute;inset-inline-end:2px;top:4px;width:30px;height:30px;min-height:30px;padding:0;border:0;background:#8cecff20;font-size:17px}
.match-friend-button[data-state=friends]{color:#a7f4c7;border-color:#a7f4c777}
.match-friend-button:disabled{opacity:.78}
.match-chat-compose{display:flex;gap:5px;padding:6px 0;flex:0 0 auto;pointer-events:auto}
.match-chat-compose input{flex:1;min-width:0;max-width:100%;height:40px;padding:7px 8px;font-size:12px;background:#0612274d;border:1px solid #91edff66;border-radius:8px;color:#fff}
.match-chat-compose input::placeholder{color:#bbd9e8}
.match-chat-send{min-width:38px;min-height:40px;padding:6px 10px;border-radius:8px;background:#7de0f426;border:1px solid #91edff70;color:#d3fbff;font-size:14px}
.match-chat-status{font-size:10px;color:#ffe5ae;margin:0;padding:4px 8px;pointer-events:auto}
.match-chat-status:empty{display:none}
.match-chat-empty{font-size:11px;color:#d0eaf7;margin:8px 2px}
.match-chat-consent{font-size:10px;display:flex;align-items:center;gap:6px;padding:6px;overflow:auto;flex-wrap:wrap;pointer-events:auto}
.match-chat-consent .match-chat-send{font-size:10px;flex:1}
.match-chat-rules{flex:1;min-width:80px}
.match-chat-rules p{max-height:80px;overflow:auto;line-height:1.5}
.match-chat-message-actions{font-size:9px;text-align:end;color:#a5d6e7}
.match-chat-message-actions summary{padding:5px;cursor:pointer}
.match-chat-action{background:#76d2f021;border:1px solid #8fe4fc50;border-radius:6px;min-height:32px;padding:5px 8px;font-size:10px;margin:2px;color:#d3fbff;pointer-events:auto}
.match-chat-panel:not(.is-typing) .match-chat-compose,.match-chat-panel:not(.is-typing) .match-chat-consent,.match-chat-panel:not(.is-typing) .match-chat-empty,.match-chat-panel:not(.is-typing) .match-chat-message-actions{display:none}
.match-chat-panel:not(.is-typing) .match-chat-log{overflow:hidden}
.match-chat-panel:not(.is-typing) .match-chat-message:nth-last-of-type(n+3){display:none}
.match-chat-panel:not(.is-typing) .match-chat-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.match-chat-panel:not(.is-typing):not(.has-recent) .match-chat-log{display:none}
.match-chat-panel.is-collapsed .match-chat-content{display:none}
.match-chat-panel.is-typing{width:286px;max-width:42vw;height:min(285px,calc(100dvh - 165px));max-height:calc(100dvh - 165px)}
.match-chat-panel.is-typing .match-chat-content,.match-chat-panel.is-typing .match-chat-log{flex:1}
.match-chat-panel.is-typing .match-chat-message{margin-inline-start:32px;padding:5px 7px 6px}
.match-chat-panel.is-typing .match-chat-face{inset-inline-start:-33px;width:28px;height:28px}
.match-chat-panel[dir=rtl] .match-chat-message{border-radius:12px 3px 12px 12px}
#matchChatPanel.input-viewport{left:calc(var(--input-left,0px) + 8px);top:calc(var(--input-top,0px) + 8px);width:min(330px,calc(var(--input-width,100vw) - 16px));max-width:calc(var(--input-width,100vw) - 16px);height:calc(var(--input-height,100dvh) - 16px);max-height:calc(var(--input-height,100dvh) - 16px)}
.tournament-five .score-player-badges .match-friend-button{font-size:8px;min-height:26px;padding:3px 6px}
.tournament-panel{z-index:9}
#arena:has(#tournamentPanel:not(.hidden)) .match-chat-panel{visibility:hidden}
@media(max-height:450px){.match-chat-panel{top:66px;max-height:calc(100dvh - 175px)}.match-chat-panel.is-typing{height:calc(100dvh - 160px);max-height:calc(100dvh - 160px)}}
@media(max-width:650px) and (orientation:landscape){.match-chat-panel{top:58px;max-width:24.5vw;max-height:calc(100dvh - 150px)}.match-chat-panel.is-typing{max-width:46vw;max-height:calc(100dvh - 160px)}}
@media(orientation:portrait){.match-chat-panel{max-width:43.4vw;top:96px}.match-chat-panel.is-typing{max-width:78vw}}

.match-voice-button{order:5;flex-shrink:0;position:relative;color:#d0e4f5}
.match-voice-button.voice-connected{border-color:#7dccd4;color:#b5f2f1}
.match-voice-button.voice-speaking:after{content:"";position:absolute;right:3px;top:3px;width:7px;height:7px;border-radius:50%;background:#84edba}
.waiting-voice-notice{font-size:11px;line-height:1.45;color:#d3e9f8;margin:5px 0;max-width:620px}
.voice-player{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 0;border-top:1px solid #ffffff20}
.voice-player bdi{flex:1;min-width:80px;overflow-wrap:anywhere}.voice-player button{min-height:44px;padding:7px 10px}.voice-explanation{font-size:13px;line-height:1.5}.voice-status{font-size:12px;color:#a7e3ea}

#arena .match-voice-button.voice-moderated{border-color:#ff948c;color:#ffbbb5}
#arena .match-voice-button.voice-moderated:after{content:"!";position:absolute;right:1px;top:-2px;font-size:12px;font-weight:900;color:#ffbbb5}

@media(max-height:360px) and (orientation:landscape){
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) .match-seat{min-height:90px}
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) .match-seat-avatar{height:36px}
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) .match-seat-search{width:32px;height:32px;font-size:23px;margin:4px 0 5px}
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) .matchmaking-progress{margin:5px 0}
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) #queueRule{display:none}
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) .matchmaking-actions{margin-inline-start:auto}
 #waiting .waiting-card:has(#waitingVoiceNotice:not(.hidden)) .matchmaking-actions button{min-height:44px}
 #waiting .waiting-card #waitingVoiceNotice{font-size:11px;line-height:1.4;margin:4px 0}
}

.voice-player.is-speaking bdi{color:#9cf3c8;text-shadow:0 0 9px #5cf2bf80}
