#game-chat { position: fixed; z-index: 35; top: 82px; left: 22px; width: min(440px, calc(100vw - 44px)); color: #f4f6f8; font: 13px/1.45 system-ui, sans-serif; pointer-events: none; }
#chat-toggle { pointer-events: auto; border: 1px solid #ffffff25; border-radius: 6px; padding: 5px 10px; color: #d6dde5; background: #111820c9; cursor: pointer; }
#chat-log { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow-y: auto; margin: 8px 0; padding: 8px; border-radius: 8px; background: #0d141cbb; scrollbar-width: thin; overflow-wrap: anywhere; }
#chat-log:empty { display: none; }
.chat-line { white-space: pre-wrap; }
.chat-line strong { margin-right: 7px; }
.chat-line[data-kind="system"] { color: #a8cce5; }
.chat-line[data-kind="error"] { color: #ffb4ac; }
#game-chat:not(.is-open) #chat-log { opacity: 0; transition: opacity 1s; }
#game-chat.has-recent #chat-log, #game-chat.is-open #chat-log { opacity: 1; }
#game-chat.is-open { pointer-events: auto; z-index: 60; }
#chat-form { border: 1px solid #ffffff36; border-radius: 8px; background: #101923f5; box-shadow: 0 10px 40px #0005; }
.chat-input-row { display: flex; align-items: center; padding: 10px; gap: 9px; }
#chat-role { color: #83d8b6; font-size: 10px; letter-spacing: .1em; }
#chat-input { min-width: 0; flex: 1; color: white; font: inherit; background: transparent; border: 0; outline: none; }
#chat-input::placeholder { color: #9baaba; }
#chat-input:focus-visible { box-shadow: 0 1px #83d8b6; }
#chat-hints { display: flex; flex-direction: column; max-height: min(300px, 40vh); overflow-y: auto; border-top: 1px solid #ffffff18; }
#chat-hints:empty { display: none; }
.chat-hint { border: 0; border-bottom: 1px solid #ffffff0a; background: transparent; text-align: left; color: #edf1f5; padding: 9px 10px; cursor: pointer; }
.chat-hint[aria-selected="true"], .chat-hint:hover { background: #76b9df22; }
.chat-hint span { display: block; color: #a6b3c0; font-size: 11px; margin-top: 2px; }
.chat-footer { padding: 0 10px 9px; color: #92a4b5; font-size: 10px; }
#game-chat [hidden] { display: none; }
@media (max-width: 650px) { #game-chat { left: 12px; top: 110px; width: calc(100vw - 24px); } #chat-log { max-height: 150px; } }
