.game-chat{margin-top:24px;border:1px solid var(--border);border-radius:14px;background:var(--surface);overflow:hidden;color:var(--text);font-family:var(--retro)}
.game-chat-header{padding:17px 16px 14px;border-bottom:1px solid var(--border);background:var(--button);color:var(--button-text)}
.game-chat-header .eyebrow{font-size:9px;color:var(--button-text);opacity:.8;letter-spacing:1.5px}
.game-chat-header h2{font-size:21px;line-height:1.3;margin:5px 0 6px;overflow-wrap:anywhere;color:var(--button-text)}
.chat-room-note{font-size:12px;color:var(--button-text);opacity:.85}
.chat-messages{height:290px;overflow-y:auto;overscroll-behavior-y:contain;padding:4px 13px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.chat-empty{display:flex;flex-direction:column;justify-content:center;min-height:270px;text-align:center;padding:22px 8px;color:var(--muted);font-size:13px;line-height:1.65}
.chat-empty strong{font-size:15px;color:var(--text);line-height:1.5}
.chat-empty p{margin:9px 0 0}
.chat-message{display:flex;gap:9px;padding:13px 0;border-bottom:1px solid var(--border)}
.chat-message:last-child{border-bottom:0}
.chat-avatar{display:block;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:var(--bg);border:1px solid var(--border);object-fit:cover}
.chat-message-content{min-width:0;flex:1}
.chat-message-meta{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;line-height:1.3}
.chat-name{font-size:11px;font-weight:700;overflow-wrap:anywhere}
.chat-message-meta time{color:var(--muted);font-size:9px;white-space:nowrap}
.chat-message-content>p{font-family:Inter,'Segoe UI',Arial,sans-serif;font-size:12px;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap;margin:5px 0 0}
.chat-message-actions{display:flex;gap:10px;margin-top:5px}
.chat-message-actions button{padding:2px 0;background:none;color:var(--muted);font-size:10px;min-height:22px}
.chat-message-actions button:hover{color:var(--text);text-decoration:underline}
.chat-notice{font-size:12px;line-height:1.55;padding:0 14px;color:var(--active-text)}
.chat-notice:not(:empty){padding-top:10px;padding-bottom:4px}
.chat-notice.is-error{color:#f1ad99}
.chat-join,.chat-composer{padding:12px 14px 14px;border-top:1px solid var(--border)}
.chat-join p{font-size:12px;color:var(--muted);margin:0 0 11px;line-height:1.6}
.chat-join-button,.chat-compose-footer button{background:var(--button);color:var(--button-text);font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:8px;min-height:36px;padding:8px 14px}
.chat-join-button{width:100%;justify-content:space-between}
.chat-join small{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin-top:9px}
.chat-identity{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.chat-identity .chat-avatar{width:27px;height:27px;flex-basis:27px;border-radius:8px}
.chat-composer textarea{width:100%;display:block;min-height:74px;resize:vertical;max-height:180px;box-sizing:border-box;font-family:Inter,'Segoe UI',Arial,sans-serif;font-size:12px;line-height:1.6;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:9px;padding:10px}
.chat-composer textarea:focus{outline:2px solid var(--accent);outline-offset:2px}
.chat-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:9px}
.chat-compose-footer small{font-size:10px;color:var(--muted)}
.chat-compose-footer button{display:inline-flex;align-items:center;justify-content:center;min-width:78px;min-height:38px;padding:8px 14px;font-size:15px;line-height:1;text-align:center}
.chat-footer{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;border-top:1px solid var(--border);padding:11px 14px;font-size:10px;line-height:1.5;color:var(--muted)}
.chat-footer>span{flex-basis:100%}
.chat-footer a,.chat-footer button{font-size:10px;text-decoration:underline;text-underline-offset:3px;background:none;color:inherit;padding:0;min-height:22px}
.chat-footer button{margin-left:auto}
.chat-footer [data-chat-unmute]{margin-left:0}
.chat-honeypot,.chat-sr-only{position:absolute!important;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.game-chat.is-collapsed .chat-messages,.game-chat.is-collapsed .chat-notice,.game-chat.is-collapsed .chat-join,.game-chat.is-collapsed .chat-composer{display:none}
.chat-color-0{color:#b9d89e}.chat-color-1{color:#e9b294}.chat-color-2{color:#9dcced}.chat-color-3{color:#d1b7f0}.chat-color-4{color:#e5c97c}.chat-color-5{color:#94d5ca}.chat-color-6{color:#e9adc5}.chat-color-7{color:#c6d0eb}
[data-theme=light] .chat-color-0{color:#3c651e}[data-theme=light] .chat-color-1{color:#914c27}[data-theme=light] .chat-color-2{color:#225e88}[data-theme=light] .chat-color-3{color:#735194}[data-theme=light] .chat-color-4{color:#77601d}[data-theme=light] .chat-color-5{color:#256b60}[data-theme=light] .chat-color-6{color:#914764}[data-theme=light] .chat-color-7{color:#4f608c}
[data-theme=light] .chat-notice.is-error{color:#a33f28}
@media(max-width:850px){.game-chat{max-width:520px}.chat-messages{height:270px}}
