#player-chat{position:fixed;left:86px;bottom:24px;z-index:40;font:inherit;color:#203b32;--chat-height:100dvh;--chat-keyboard:0px}#player-chat[hidden],#player-chat [hidden]{display:none!important}#modal:not([hidden])~#player-chat{visibility:hidden;pointer-events:none}
#player-chat button{font:inherit;cursor:pointer;transition:background .15s,color .15s}#player-chat button:focus-visible,#player-chat input:focus-visible{outline:3px solid #8abfda;outline-offset:2px}#player-chat button:disabled{cursor:default;opacity:.5}
#player-chat .chat-toggle{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 15px;background:#fff;border:1px solid #d2e1da;border-radius:24px;color:#254d3d;font-size:13px;font-weight:800;box-shadow:0 3px 14px #173c2620}.chat-toggle svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#player-chat .chat-toggle:hover,#player-chat .chat-toggle[aria-expanded=true]{background:#244d3e;color:#fff;border-color:#244d3e}.chat-badge{display:grid;place-items:center;min-width:19px;height:19px;border-radius:12px;background:#e56e52;color:white;padding:0 4px;font-size:10px}
#player-chat .chat-panel{position:absolute;bottom:54px;left:0;width:356px;max-width:calc(100vw - 28px);height:min(470px,calc(var(--chat-height) - 150px));min-height:240px;background:#fff;border:1px solid #cfdfd6;border-radius:20px;box-shadow:0 12px 44px #102e3033;display:flex;flex-direction:column;overflow:hidden}
.chat-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:19px 16px 12px;background:#f2f7f4}.chat-header strong{font-size:15px;font-weight:800}.chat-header p{font-size:11px;line-height:1.5;color:#527063;margin:5px 0 0}.chat-close{flex:none;border:1px solid #cedbd2;background:#fff;color:#365647;width:32px;height:32px;border-radius:50%;font-size:23px!important;line-height:1;padding:0}.chat-close:hover{background:#e3eee8!important}
.chat-channels{display:flex;padding:9px 13px;gap:5px;border-bottom:1px solid #edf2ef;background:white}.chat-channels button{flex:1;border:0;border-radius:9px;background:transparent;color:#667f73;padding:9px 5px;font-size:12px!important;font-weight:700!important}.chat-channels button[aria-pressed=true]{background:#e6f2ec;color:#25573e}.chat-channels button:not(:disabled):hover{background:#edf5f1;color:#234e39}
.chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px;scrollbar-width:thin;background:#fff;outline-offset:-3px}.chat-message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 13px}.chat-message-meta{display:flex;gap:7px;align-items:baseline;max-width:100%;margin-bottom:4px}.chat-message-meta b{font-size:11px;color:#4c6558;overflow-wrap:anywhere}.chat-message time{font-size:10px;white-space:nowrap;color:#84948d}.chat-message p{margin:0;padding:9px 12px;max-width:94%;border-radius:2px 12px 12px;background:#f0f4f2;color:#243e31;font-size:13px;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap;user-select:text}.chat-message.is-mine{align-items:flex-end}.chat-message.is-mine p{background:#e5f2e9;border-radius:12px 2px 12px 12px}.chat-empty{font-size:12px;color:#71867a;text-align:center;line-height:1.8;margin:35px 6px}
#player-chat .chat-latest{border:0;border-top:1px solid #dcece2;background:#eff8f3;color:#2b6650;padding:8px;font-size:11px}.chat-error{margin:0;padding:8px 13px;background:#fff4ef;color:#934b33;font-size:11px;line-height:1.5}.chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border-top:1px solid #e4ece7;background:white}.chat-form input{width:100%;min-width:0;margin:0;border:1px solid #d7e2dc;border-radius:11px;padding:11px 10px;font-family:inherit;font-size:16px;line-height:1.3;background:#fafcfb;color:#203b32}.chat-form input::placeholder{color:#86998d;font-size:12px}#player-chat .chat-send{border:0;border-radius:11px;background:#315d48;color:#fff;padding:0 13px;font-size:12px;font-weight:700;min-height:44px}#player-chat .chat-send:not(:disabled):hover{background:#204431}.chat-form-foot{grid-column:1/-1;display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#7c8e83}.chat-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
body.is-hunting #player-chat{left:max(16px,env(safe-area-inset-left));bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--chat-keyboard))}
@media(max-width:760px){#player-chat{left:12px;bottom:calc(82px + env(safe-area-inset-bottom) + var(--chat-keyboard))}#player-chat .chat-panel{width:min(356px,calc(100vw - 24px));height:min(440px,calc(var(--chat-height) - 158px));min-height:190px}body.is-hunting #player-chat{left:12px;bottom:calc(max(12px,env(safe-area-inset-bottom)) + var(--chat-keyboard))}body.is-hunting #player-chat .chat-panel{height:min(440px,calc(var(--chat-height) - 88px))}.chat-header{padding:14px 13px 10px}.chat-header strong{font-size:14px}.chat-toggle{min-height:44px}.chat-messages{padding:11px}}
@media(max-height:500px){#player-chat{bottom:calc(8px + var(--chat-keyboard))}#player-chat .chat-panel{bottom:49px;height:calc(var(--chat-height) - 68px);min-height:150px}.chat-header{padding:8px 12px}.chat-header p,.chat-form-foot{display:none}.chat-channels{padding:3px 10px}.chat-channels button{padding:6px}.chat-form{padding:7px}.chat-messages{padding:8px 12px}}

.map-speech-layer{position:absolute;inset:0;z-index:450;pointer-events:none;overflow:hidden;contain:layout style;cursor:inherit}
.map-speech-layer[hidden],.map-speech-bubble[hidden]{display:none!important}
.map-speech-bubble{position:absolute;top:0;left:0;width:max-content;max-width:min(230px,calc(100% - 16px));padding:9px 12px;border:1px solid #cedbd4;border-radius:15px;background:#fffffff5;color:#243b32;box-shadow:0 3px 12px #122c3426;font-family:inherit;font-size:12px;font-weight:600;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap;text-align:left;pointer-events:none}
.map-speech-bubble:after{content:"";position:absolute;left:var(--speech-tail,50%);bottom:-5px;width:8px;height:8px;background:#fff;border-right:1px solid #cedbd4;border-bottom:1px solid #cedbd4;transform:translateX(-50%) rotate(45deg)}
.map-speech-bubble.is-mine{background:#effaf3;border-color:#a9cfb7}.map-speech-bubble.is-mine:after{background:#effaf3;border-color:#a9cfb7}
@media(max-width:600px){.map-speech-bubble{max-width:min(200px,calc(100% - 16px));font-size:11px;padding:7px 10px}}

/* Keyboard chat is a single composer; history opens only from the chat button. */
#player-chat .chat-quick-label{display:none}
#player-chat.is-quick .chat-panel{width:min(520px,calc(100vw - 32px));height:auto;min-height:0;bottom:54px;border-radius:14px;overflow:visible;box-shadow:0 6px 24px #17362924}
#player-chat.is-quick .chat-header,#player-chat.is-quick .chat-channels,#player-chat.is-quick .chat-messages,#player-chat.is-quick .chat-latest,#player-chat.is-quick .chat-form-foot{display:none}
#player-chat.is-quick .chat-form{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;border:0;border-radius:14px;padding:8px;gap:8px}
#player-chat.is-quick .chat-quick-label{display:block;padding:0 5px;color:#315d48;font-size:12px;font-weight:800;white-space:nowrap}
#player-chat.is-quick .chat-error{border-radius:14px 14px 0 0}
