/* Scoped rules: the game decides when chat is available and where its button lives. */
.dream-chat{position:fixed;z-index:4;display:flex;flex-direction:column;gap:0;box-sizing:border-box;min-width:0;min-height:0;margin:0;padding:5px;border:1px solid #70414b85;border-radius:0;background:rgba(10,9,13,.78);color:#d3bbc0;font:12px/1.5 'Yume Pixel',monospace;letter-spacing:0;opacity:1;transition:opacity .35s ease;isolation:isolate;pointer-events:auto;contain:layout style}
.dream-chat[hidden]{display:none!important}
.dream-chat.is-dimmed{opacity:.34}
.dream-chat *{box-sizing:border-box}
.dream-chat-drag{position:relative;flex:0 0 15px;margin:-5px -5px 4px;border:0;border-bottom:1px solid #70414b70;background:#24141bbf;cursor:grab;touch-action:none;user-select:none;outline:none}
.dream-chat-drag::after{content:'';position:absolute;left:50%;top:5px;width:24px;height:3px;transform:translateX(-50%);border-top:1px solid #9b6477a6;border-bottom:1px solid #59323e99}
.dream-chat-drag:focus-visible{outline:1px solid #a26879;outline-offset:0}
.dream-chat.is-moving .dream-chat-drag{cursor:grabbing;background:#2d1922d9}
.dream-chat-history{flex:1 1 auto;min-height:0;overflow:auto;padding:2px 3px 5px;scrollbar-color:#67404a #151016;scrollbar-width:thin;overscroll-behavior:contain;overflow-anchor:none;outline:none;cursor:text}
.dream-chat-message{margin:0;padding:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.dream-chat-name{color:#b68391}
.dream-chat-compose{display:flex;flex:none;gap:5px;margin:0;padding:4px 0 0;border-top:1px solid #65343e66;min-width:0}
.dream-chat-channel,.dream-chat-input{appearance:none;box-sizing:border-box;margin:0;height:29px;border:1px solid #61313b80;border-radius:0;background:#100c12b3;color:#d8bfc4;font:inherit;line-height:1.3;min-width:0;box-shadow:none;outline:none}
.dream-chat-channel{flex:0 0 77px;padding:3px 20px 3px 6px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath fill='%23956875' d='M0 0h8L4 5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;cursor:pointer;color-scheme:dark}
.dream-chat-channel option{background:#181017;color:#d8bfc4}
.dream-chat-input{flex:1 1 0;width:0;padding:3px 6px;caret-color:#dfb3bc}
.dream-chat :is(input,select,[tabindex]):focus-visible{outline:1px solid #a26879;outline-offset:0}
.dream-chat-error{flex:none;padding:2px 4px;color:#e4a7ae;font:11px/1.4 'Courier New',monospace;overflow-wrap:anywhere;max-height:42px;overflow:auto}
.dream-chat-error[hidden]{display:none}
.dream-chat-resize{position:absolute;touch-action:none;user-select:none;z-index:1}
.dream-chat-resize[data-edge=n],.dream-chat-resize[data-edge=s]{height:8px;left:9px;right:9px;cursor:ns-resize}
.dream-chat-resize[data-edge=n]{top:-4px}.dream-chat-resize[data-edge=s]{bottom:-4px}
.dream-chat-resize[data-edge=e],.dream-chat-resize[data-edge=w]{width:8px;top:9px;bottom:9px;cursor:ew-resize}
.dream-chat-resize[data-edge=e]{right:-4px}.dream-chat-resize[data-edge=w]{left:-4px}
.dream-chat-resize[data-edge=nw],.dream-chat-resize[data-edge=ne],.dream-chat-resize[data-edge=sw],.dream-chat-resize[data-edge=se]{width:16px;height:16px}
.dream-chat-resize[data-edge=nw]{left:-5px;top:-5px;cursor:nwse-resize}.dream-chat-resize[data-edge=ne]{right:-5px;top:-5px;cursor:nesw-resize}.dream-chat-resize[data-edge=sw]{left:-5px;bottom:-5px;cursor:nesw-resize}.dream-chat-resize[data-edge=se]{right:-5px;bottom:-5px;cursor:nwse-resize}
.dream-chat-resize[data-edge=ne]::after{content:'';position:absolute;inset:5px 5px 5px 5px;border-top:1px solid #9b647780;border-right:1px solid #9b647780}
.dream-chat.is-resizing,.dream-chat.is-moving{transition:none;user-select:none}
@media(pointer:coarse){.dream-chat-input{font-size:16px}.dream-chat-channel,.dream-chat-input{height:34px}.dream-chat-resize[data-edge=nw],.dream-chat-resize[data-edge=ne],.dream-chat-resize[data-edge=sw],.dream-chat-resize[data-edge=se]{width:22px;height:22px}}
@media(prefers-reduced-motion:reduce){.dream-chat{transition:none}}
/* Closing never clears messages or the draft. The drag strip stays separate. */
.dream-chat-close{position:absolute;z-index:4;right:6px;top:1px;width:28px;height:24px;padding:0;border:1px solid #70414b;background:#21111a;color:#dfb8c0;font:20px/1 'Yume Pixel',monospace;cursor:pointer}
.dream-chat-close:hover,.dream-chat-close:focus-visible{background:#4d202f;color:#f7dadd;outline:1px solid #be777d}
.dream-chat .dream-chat-drag{flex-basis:25px}
.dream-chat .dream-chat-drag::after{max-width:calc(100% - 70px)}
