/* Room chat drawer and idle countdown: fixed elements outside #app, shared by every game. Reuses uno.css keyframes. */
.chat.hidden{display:none}
.chat-fab{position:fixed;right:18px;bottom:18px;z-index:44;width:56px;height:56px;border-radius:50%;padding:0;font-size:26px;line-height:1;background:#2a2440;color:#fff;box-shadow:0 8px 24px #2a244055;display:grid;place-items:center}
.chat-fab:hover:not(:disabled){background:#3d3466;transform:translateY(-2px);box-shadow:0 10px 26px #2a244066}
.chat-fab.ping{animation:chat-ping 1.2s ease-in-out infinite}
.chat-badge{position:absolute;top:-4px;right:-4px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#d52b49;color:#fff;font-size:12px;font-weight:800;display:grid;place-items:center;border:2px solid #fff}
.chat-badge[hidden]{display:none}
.chat-drawer{position:fixed;right:18px;bottom:86px;z-index:45;width:min(360px,calc(100vw - 36px));height:min(480px,calc(100vh - 120px));display:flex;flex-direction:column;background:#fff;border:1px solid #e3def2;border-radius:20px;box-shadow:0 24px 60px #2a244044;overflow:hidden;animation:uno-pop .25s cubic-bezier(.3,1.4,.5,1) both}
.chat-drawer[hidden]{display:none}
.chat-drawer header{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 16px;background:#f3f0ff;border-bottom:1px solid #e3def2}
.chat-drawer header strong{white-space:nowrap}
.chat-title{flex:1;font-size:13px;color:#776f8b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-close{padding:2px 10px;font-size:22px;line-height:1;background:transparent;color:#5f5377;box-shadow:none;border:0}
.chat-close:hover:not(:disabled){background:#e6e0ff;color:#2a2440;transform:none;box-shadow:none}
.chat-list{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:6px;background:#faf9ff}
.chat-empty{margin:auto;text-align:center;color:#8a819d;font-size:13px}
.chat-sys{margin:2px 0;text-align:center;font-size:12px;color:#8a819d}
.chat-msg{display:flex;flex-direction:column;align-items:flex-start;max-width:85%}
.chat-msg.mine{align-self:flex-end;align-items:flex-end}
.chat-who{font-size:11px;color:#776f8b;margin:0 0 2px 6px;font-weight:700}
.chat-bubble{background:#fff;border:1px solid #e3def2;border-radius:16px 16px 16px 4px;padding:8px 12px;font-size:14px;line-height:1.5;color:#2d2a3e;word-break:break-word;white-space:pre-wrap}
.chat-msg.mine .chat-bubble{background:#594bed;color:#fff;border-color:#594bed;border-radius:16px 16px 4px 16px}
.chat-msg time{font-size:10px;color:#a9a3b8;margin:2px 6px 0}
.chat-quick{display:flex;gap:6px;padding:8px 10px 0;overflow:auto;scrollbar-width:none}
.chat-quick button{flex:none;padding:5px 12px;font-size:12px;background:#fff;color:#4d426e;border:1px solid #dcd9ef;box-shadow:none}
.chat-quick button:hover:not(:disabled){background:#f0edff;transform:none;box-shadow:none}
.chat-form{display:flex;gap:8px;padding:10px}
.chat-form input{flex:1;min-width:0;width:auto;padding:10px 14px}
.chat-form button{padding:10px 16px;border-radius:14px}
.idle-bar{position:fixed;left:50%;top:12px;transform:translateX(-50%);z-index:46;max-width:calc(100vw - 32px);background:#d52b49;color:#fff;font-weight:700;font-size:14px;padding:10px 18px;border-radius:30px;box-shadow:0 10px 30px #d52b4955;animation:uno-throb 1.2s ease-in-out infinite;text-align:center}
.idle-bar[hidden]{display:none}
@keyframes chat-ping{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
@media(max-width:700px){.chat-fab{right:12px;bottom:12px;width:50px;height:50px;font-size:22px}.chat.open .chat-fab{display:none}.chat-drawer{right:0;left:0;bottom:0;width:100%;height:min(72vh,560px);border-radius:20px 20px 0 0}.idle-bar{font-size:12px;padding:8px 14px}}
@media(prefers-reduced-motion:reduce){.chat-fab,.chat-drawer,.idle-bar{animation:none!important}}
