.gx-chat-block>.block_head{display:flex;align-items:center;justify-content:space-between;gap:12px}.gx-chat-controls{display:flex;align-items:center;gap:8px}.gx-chat-controls button,.gx-chat-dialog button{border:1px solid var(--gx-border,#6f5d1a);background:var(--gx-card-2,#24242a);color:var(--gx-text,#eee);border-radius:8px;padding:6px 10px;cursor:pointer;font-size:12px}.gx-chat-controls button:focus-visible,.gx-chat-dialog button:focus-visible{outline:2px solid var(--gx-gold,#f5c518);outline-offset:2px}.gx-chat-dialog{inset:0;margin:auto;box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:85dvh;overflow-y:auto;padding:24px;border:1px solid var(--gx-border,#6f5d1a);border-radius:16px;background:var(--gx-card,#15151a);color:var(--gx-text,#eee);box-shadow:0 20px 80px #0008}.gx-chat-dialog::backdrop{background:#0009}.gx-chat-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.gx-chat-dialog h2{margin:0;font-size:20px}.gx-chat-dialog h3{font-size:16px;margin:20px 0 12px}.gx-chat-dialog ul{padding-left:22px;line-height:1.6}.gx-chat-dialog li{margin:8px 0}.gx-chat-dialog details{border-top:1px solid var(--gx-border,#6f5d1a);padding-top:16px;margin-top:18px}.gx-chat-dialog summary{cursor:pointer}.gx-chat-dialog label{display:block;margin:10px 0}.gx-chat-dialog p{font-size:12px;color:var(--gx-muted,#999);margin-top:12px}.gx-chat-reply{border:0;background:none;color:var(--gx-gold,#f5c518);font-size:11px;cursor:pointer}.gx-chat-reactions{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.gx-chat-reactions button{border:1px solid var(--gx-border,#6f5d1a);border-radius:10px;background:var(--gx-card-2,#24242a);color:var(--gx-text,#eee);padding:3px 7px;font-size:12px}.gx-chat-reactions button[aria-pressed=true]{border-color:var(--gx-gold,#f5c518)}

.gx-chat-react-picker{position:relative}.gx-chat-react-picker summary{cursor:pointer;font-size:12px;list-style:none;color:var(--gx-muted,#999)}.gx-chat-react-picker>div{position:absolute;z-index:12;display:flex;gap:4px;padding:8px;right:0;bottom:100%;border:1px solid var(--gx-border,#705b21);background:var(--gx-card,#17171c);border-radius:12px;box-shadow:0 8px 25px #0005}.gx-chat-react-picker:not([open])>div{display:none}

/* Author styles must preserve the native closed-dialog state. */
html body dialog#gxChatRulesDialog:not([open]){display:none!important;pointer-events:none!important}
html body dialog#gxChatRulesDialog[open]{display:block!important}

/* The top layer prevents clipping by #chat_messages and message containers. */
html body .gx-chat-react-picker > div.gx-chat-react-overlay {
  position: fixed !important;
  inset: auto;
  right: auto !important;
  bottom: auto !important;
  margin: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 8px;
  box-sizing: border-box;
  background: var(--ves-panel, var(--gx-card, #17171c));
  border: 1px solid var(--ves-accent-line, var(--gx-gold-line, #705b21));
  color: var(--ves-text, var(--gx-text, #eee));
}
html body .gx-chat-react-picker > div.gx-chat-react-overlay[popover]:not(:popover-open),
html body .gx-chat-react-picker:not([open]) > div.gx-chat-react-overlay { display: none !important; }
html body .gx-chat-react-overlay > button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 4px;
  font-size: 21px;
  line-height: 1;
  background: var(--ves-raised, var(--gx-card-2, #24242a));
  color: var(--ves-text, var(--gx-text, #eee));
  cursor: pointer;
}
