:root{--navigation-height:76px;--chat-height:40px}
.has-world-chat .app-shell{padding-bottom:calc(var(--navigation-height) + var(--chat-height) + 28px)}
#worldChat[hidden],#chatToggle[hidden],#chatStreamIndicator[hidden],#chatEmpty[hidden]{display:none!important}
.world-chat{position:fixed;z-index:69;bottom:calc(var(--navigation-height) + 7px);left:50%;transform:translateX(-50%);width:min(calc(100% - 22px),628px);border:1px solid #99764970;border-radius:15px;background:linear-gradient(115deg,#121919f5,#100c0bf5);box-shadow:0 8px 35px #0009,inset 0 1px #f1d89e20;backdrop-filter:blur(18px);animation:chat-arrive .24s ease-out;color:#ece2c9}
.world-chat header{display:flex;align-items:center;gap:8px;padding:5px 10px;border-bottom:1px solid #d8bf8720}
.world-chat header button{border:0;background:transparent;color:#dac396;min-height:32px;font-size:11px;padding:3px 6px;font-weight:700}
#chatOpen{margin-right:auto;letter-spacing:.07em}#chatOpen span{font-size:15px;margin-right:5px}
.chat-live{color:#81d4b7;font-size:9px;letter-spacing:.1em}
.chat-preview{list-style:none;margin:0;padding:4px 13px 8px;max-height:32vh;overflow:auto}
.chat-message{position:relative;display:block;font-size:12px;line-height:1.45;overflow-wrap:anywhere;padding:3px 0;color:#e5ddd0}
.chat-message b{font-size:11px;font-weight:700;color:#e0bc74;margin-right:7px}.chat-message b::after{content:':'}.chat-message>span:not(.chat-source){white-space:pre-wrap}
.chat-source{display:inline-grid;place-content:center;border:1px solid #4e9b9370;border-radius:4px;width:16px;height:16px;margin-right:5px;color:#72e3d5;font-weight:bold}.chat-from-stream b{color:#90d7d0}
.chat-empty{font-size:12px;color:#ad9f88;padding:0 13px}.chat-toggle{position:fixed;z-index:69;bottom:calc(var(--navigation-height) + 8px);right:max(12px,calc((100vw - 626px)/2));padding:7px 13px;min-height:34px;border:1px solid #6e5942;border-radius:30px;background:#101918f2;color:#d7c59c;font-size:11px;box-shadow:0 4px 20px #0008}
.chat-dialog{width:min(94vw,580px);max-height:84dvh;padding:0;border:1px solid #b8945266;border-radius:22px;background:#11120f;color:#efe5ce;box-shadow:0 24px 100px #000b}.chat-dialog::backdrop{background:#020504cc;backdrop-filter:blur(5px)}
.chat-dialog header{display:flex;align-items:center;justify-content:space-between;padding:20px;background:linear-gradient(120deg,#21302a,#141610);border-bottom:1px solid #b8945230}.chat-dialog h2{font-size:24px;margin:0}.chat-dialog header p{font-size:11px;color:#bfa97a;margin:0 0 5px;letter-spacing:.1em}
.chat-history{height:min(45dvh,420px);list-style:none;padding:12px 20px;margin:0;overflow-y:auto;overscroll-behavior:contain}.chat-history .chat-message{padding:10px 0;border-bottom:1px solid #bfa97a1a;font-size:14px}.chat-history .chat-message b{font-size:12px}.chat-history time{display:block;font-size:10px;color:#9e998b;margin-top:5px}.chat-delete{font-size:10px;padding:2px 0;background:none;border:0;color:#bc9a87}
.chat-form{padding:14px 20px 20px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;border-top:1px solid #b8945230}.chat-form label,.chat-form p{grid-column:1/-1;font-size:12px;margin:0;color:#c7bfae}.chat-form input{width:100%;min-width:0;font-size:16px;padding:12px;border:1px solid #a4874b66;border-radius:10px;background:#070b09;color:#f0e2be}.chat-form button{min-height:44px;font-size:13px}.chat-form #chatFeedback{min-height:1.5em;color:#b3ccbd}
@keyframes chat-arrive{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){.world-chat{animation:none}}
