/* Keep the pet above the visual scrim; the full-screen host itself never traps clicks. */
body:is(.workspace-social-open,.workspace-gomoku-open)>#hlong-pet-widget { z-index:21020!important; pointer-events:none; filter:none!important; }
body:is(.workspace-social-open,.workspace-gomoku-open)>#hlong-pet-launcher { z-index:21021!important; }
.workspace-gomoku-modal { pointer-events:none; }
.workspace-gomoku-backdrop,.workspace-gomoku-card { pointer-events:auto; }
.workspace-gomoku-card.has-room-chat { width:min(1040px,calc(100vw - 28px)); }
.workspace-gomoku-room { display:flex; min-height:0; flex:1; }
.workspace-gomoku-content { min-width:0; flex:1; }
.workspace-gomoku-chat { --social-line:rgba(97,113,154,.16); display:flex; width:320px; min-width:280px; flex:0 0 32%; flex-direction:column; min-height:0; border-left:1px solid var(--social-line); color:#26344b; background:#f4f6fc; }
.workspace-gomoku-chat[hidden] { display:none; }
.workspace-gomoku-chat>header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px; border-bottom:1px solid var(--social-line); }
.workspace-gomoku-chat>header div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.workspace-gomoku-chat>header strong { font-size:14px; overflow-wrap:anywhere; }
.workspace-gomoku-chat>header small { color:#8390a8; font-size:11px; }
.workspace-gomoku-chat button { cursor:pointer; }
.workspace-gomoku-chat>header button { border:1px solid var(--social-line); border-radius:9px; width:30px; height:30px; color:#7180a0; background:#fff; font-size:20px; }
.gomoku-chat-list { flex:1; min-height:160px; overflow:auto; padding:16px 12px; overscroll-behavior:contain; }
.gomoku-chat-empty { margin:36px 0; color:#8c96aa; font-size:12px; text-align:center; }
.gomoku-chat-message { display:flex; flex-direction:column; align-items:flex-start; gap:4px; margin-bottom:16px; }
.gomoku-chat-message.is-own { align-items:flex-end; }
.gomoku-chat-message small { font-size:10px; color:#8993a8; max-width:95%; overflow-wrap:anywhere; }
.gomoku-chat-message p { margin:0; max-width:95%; border:1px solid #e5e9f3; border-radius:3px 12px 12px; padding:9px 11px; color:#344057; background:white; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.65; user-select:text; }
.gomoku-chat-message.is-own p { border-color:transparent; border-radius:12px 3px 12px 12px; color:#fff; background:#6570de; }
.gomoku-chat-error { margin:0; padding:8px 14px; color:#b2495a; font-size:12px; overflow-wrap:anywhere; }
.gomoku-chat-error[hidden] { display:none; }
.gomoku-chat-compose { padding:12px; border-top:1px solid var(--social-line); background:#fafbff; }
.gomoku-chat-compose textarea { box-sizing:border-box; width:100%; height:68px; min-height:50px; max-height:130px; resize:vertical; border:1px solid #dfe4f1; border-radius:10px; padding:10px; color:#344057; background:#fff; font:13px/1.6 system-ui,'Microsoft YaHei',sans-serif; }
.gomoku-chat-compose textarea:focus { outline:2px solid #b4bafa; outline-offset:1px; }
.gomoku-chat-compose>div { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; }
.gomoku-chat-compose button { border:0; border-radius:8px; padding:7px 12px; font-size:12px; }
.gomoku-chat-compose button[type=button] { padding-left:0; color:#7b88a1; background:transparent; }
.gomoku-chat-compose button[type=submit] { color:white; background:#6570de; }
.workspace-gomoku-chat button:disabled { opacity:.5; cursor:wait; }
.gomoku-room-header-actions { display:flex; gap:8px; align-items:center; }
[data-gomoku-chat-toggle] { display:none; border:1px solid #dbe0f3; border-radius:9px; padding:7px 12px; background:#fff; color:#6470d9; font-size:12px; }
.has-room-chat .workspace-gomoku-board-stage { --gomoku-cell:clamp(14px,min(26px,calc((100dvh - 390px)/15),calc((100vw - 410px)/15)),26px); }
@media(max-width:760px) {
  .workspace-gomoku-card.has-room-chat { width:calc(100vw - 20px); height:calc(100dvh - 20px); }
  .has-room-chat .workspace-gomoku-content { width:100%; }
  .has-room-chat .workspace-gomoku-board-stage { --gomoku-cell:clamp(12px,min(26px,calc((100vw - 100px)/15),calc((100dvh - 390px)/15)),26px); }
  .has-room-chat .workspace-gomoku-chat { display:none; width:100%; flex:1; min-width:0; border-left:0; }
  .has-room-chat [data-gomoku-chat-toggle]:not([hidden]) { display:block; }
  .has-room-chat.is-room-chat-open .workspace-gomoku-content { display:none; }
  .has-room-chat.is-room-chat-open .workspace-gomoku-chat:not([hidden]) { display:flex; }
  .has-room-chat.is-room-chat-open [data-gomoku-chat-toggle] { color:#fff; background:#6570de; }
}
[data-theme=dark] .workspace-gomoku-chat,[data-theme=cyber] .workspace-gomoku-chat { background:#151e2e; color:#e2e7f5; }
[data-theme=dark] .gomoku-chat-message:not(.is-own) p,[data-theme=cyber] .gomoku-chat-message:not(.is-own) p { background:#202b40; color:#dce5f8; border-color:#34435e; }
[data-theme=dark] .gomoku-chat-compose,[data-theme=cyber] .gomoku-chat-compose { background:#151e2e; }


.gomoku-chat-compose { position:relative; }
.gomoku-compose-shortcuts { display:flex; align-items:center; gap:12px; }
.gomoku-chat-compose [data-gomoku-taunts-toggle] { color:#6470d9; font-weight:600; padding-right:0; }
.gomoku-taunt-picker { position:absolute; left:10px; right:10px; bottom:calc(100% + 8px); z-index:4; display:grid; gap:4px; max-height:min(340px,48dvh); overflow:auto; padding:9px; border:1px solid #dce2f4; border-radius:14px; background:#fff; box-shadow:0 12px 36px #25375926; overscroll-behavior:contain; }
.gomoku-taunt-picker[hidden] { display:none; }
.gomoku-chat-compose .gomoku-taunt-picker button { text-align:left; padding:9px 10px; color:#52607c; background:#f5f6fd; font-size:12px; line-height:1.5; }
.gomoku-chat-compose .gomoku-taunt-picker button:hover,.gomoku-chat-compose .gomoku-taunt-picker button:focus-visible { color:#505fd0; background:#eaedff; outline:2px solid #a6b0f3; }
[data-theme=dark] .gomoku-taunt-picker,[data-theme=cyber] .gomoku-taunt-picker { background:#1a2437; border-color:#34435e; }
.gomoku-chat-compose>.gomoku-taunt-picker { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; justify-content:stretch; }
.gomoku-chat-compose>.gomoku-taunt-picker[hidden] { display:none; }
.gomoku-chat-compose .gomoku-taunt-picker button { width:100%; white-space:normal; overflow-wrap:anywhere; }
