/* Shared presentation for existing world and dungeon chat surfaces.
   No backdrop blur / extra render pass. Gameplay state remains with native owners. */
:root{--s407-surface:rgba(10,22,29,.87);--s407-edge:rgba(210,185,127,.38);--s407-text:#f1eadb;--s407-muted:#b2c4c8;--s407-accent:#e8c67f}
body .a59-rail.a65-rail.a294-rail>nav{gap:3px!important}
body .a59-rail.a65-rail.a294-rail .a65-slot{min-height:48px!important}
body .a59-rail.a65-rail.a294-rail .a59-tab{box-sizing:border-box!important;width:48px!important;min-width:48px!important;height:48px!important;min-height:48px!important;padding:10px!important;border:1px solid var(--s407-edge)!important;border-left:0!important;border-radius:0 10px 10px 0!important;background:var(--s407-surface)!important;backdrop-filter:none!important;color:var(--s407-accent)!important;box-shadow:0 2px 7px #0005!important}
body .a59-rail.a65-rail.a294-rail .a59-tab svg{width:26px!important;height:26px!important;stroke-width:1.7}
body .a59-rail.a65-rail.a294-rail .a59-tab[aria-expanded=true]{background:#24454c!important;border-color:#e8c67f!important}
body .a59-rail.a65-rail.a294-rail .a59-tab:focus-visible{outline:2px solid #9bdce9;outline-offset:2px}
body .a59-rail.a65-rail.a294-rail .a59-tab b{right:-3px!important;top:0!important;min-width:16px!important;height:16px!important;font-size:9px!important;line-height:14px!important;box-shadow:0 1px 3px #0007}
body .a59-rail.a65-rail.a294-rail .a59-tab.a59-alert{border-color:#f18f85!important}
body .a59-rail.a65-rail.a294-rail .a59-tab.a59-alert b{background:#7e2c31!important}
/* The overhead actor bars are the only dungeon target-health display. */
body #boss{display:none!important;pointer-events:none!important}
body[data-ui-state="dungeon"] #boss[style*="block"]~#objective{opacity:1}
/* Same palette, typography and readable message treatment in either scene. */
:is(#root .social-chat-layout,#partyChat.open){color:var(--s407-text);font:14px/1.45 system-ui,sans-serif;--s407-channel:#172e38}
#root .social-chat-layout>nav[aria-label="Social channels"]{display:flex!important;gap:4px!important;overflow-x:auto;flex-shrink:0;padding-bottom:3px!important;scrollbar-width:thin}
#root .social-chat-layout>nav[aria-label="Social channels"]>button{flex:1 0 56px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px!important;min-height:52px!important;border-radius:10px!important;font-size:11px!important;line-height:1.1!important}
#root .social-chat-layout>nav[aria-label="Social channels"]>button::before{content:none!important}
.s-chat-channel-icon332{width:20px!important;height:20px!important;flex:none}
#root .social-chat-message{display:flex!important;align-items:flex-start!important;gap:8px!important;margin:0 0 10px!important;padding:0!important;background:none!important;border:0!important;min-width:0}
#root .social-chat-message.is-own{flex-direction:row-reverse!important}
#root .social-chat-bubble,#partyChat .chatMsg{background:rgba(27,47,57,.93)!important;border:1px solid #aac2c51e!important;border-radius:4px 13px 13px 13px!important;padding:9px 11px!important;color:var(--s407-text)!important;min-width:0;max-width:100%;box-sizing:border-box}
#root .social-chat-message.is-own .social-chat-bubble,#partyChat .chatMsg.me{background:rgba(39,62,58,.95)!important;border-color:#cfbb7938!important;border-radius:13px 4px 13px 13px!important}
#root .social-chat-name{display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:10px!important;margin-bottom:4px!important}
#root .social-chat-name :is(b,button),#partyChat .chatMsg b{color:#d9c491!important;font-size:12px!important;font-weight:700!important}
#root .social-chat-name button{padding:0!important;text-align:left;overflow-wrap:anywhere}
#root .social-chat-name time{font-size:10px!important;color:var(--s407-muted)!important;white-space:nowrap;flex:none}
#root .social-chat-text{margin:0!important;font:14px/1.5 system-ui!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:normal!important}
#root .s-chat-avatar332{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#24404a;border:1px solid #c5af714d;color:#e9d6a6;font:700 13px system-ui}
#root .social-chat-compose :is(input,textarea),#partyChat #chatInput{font-size:16px!important;min-height:48px!important;border-radius:10px!important;background:#0b1922!important;color:#f1eadb!important;border:1px solid #b2c4c84d!important}
#root .social-chat-compose button,#partyChat #chatForm button{min-width:54px!important;min-height:48px!important;border-radius:10px!important;background:#31594f!important;color:#f5ead1!important;border:1px solid #b7c69270!important}
#root .social-chat-compose button:disabled{opacity:.45}
#root .s-chat-empty332{padding:20px 12px;text-align:center;color:var(--s407-muted);font-size:13px}
#root .s-chat-latest260,#partyChat .s-chat-latest260{background:#244c48!important;border-color:#ddc687!important;color:#fff0ca!important;min-height:44px!important}
#partyChat.open,#partyChat.open #chatDrawer{background:#0e2029!important}
#partyChat #chatMessages .chatMsg{margin-bottom:8px!important}
#partyChat #chatTabs238 button{background:#172e38!important;border-color:#b2c4c82b!important}
#partyChat #chatTabs238 button.active{background:#35584e!important;border-color:#d7be7b!important}
@media(max-height:540px){body .a59-rail.a65-rail.a294-rail>nav{gap:2px!important}body .a59-rail.a65-rail.a294-rail .a59-tab{border-radius:9px!important;border-left:1px solid var(--s407-edge)!important}}
@media(prefers-reduced-motion:reduce){.social-chat-layout *,#partyChat *{scroll-behavior:auto!important}}
