/* 全局聊天浮窗：独立于页面路由，始终只有一个实例。 */
.gchat-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: inherit;
}

.gchat-ball {
  position: fixed;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: linear-gradient(145deg, #1d4ed8, #3b82f6 60%, #93c5fd);
  box-shadow: 0 16px 40px rgba(30, 64, 175, 0.34), 0 0 0 5px rgba(37, 99, 235, 0.08);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  opacity: 1;
  transition: opacity 220ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.gchat-ball:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 20px 48px rgba(30, 64, 175, 0.4), 0 0 0 6px rgba(37, 99, 235, 0.12); }
.gchat-ball.is-idle { opacity: 0.46; }
.gchat-ball.is-dragging { cursor: grabbing; transition: none; }
.gchat-ball.is-hidden { display: none; }
.gchat-ball-avatar { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.gchat-ball-fallback { color: #fff; font-weight: 900; font-size: 20px; letter-spacing: 0.04em; }
.gchat-ball-dot { position: absolute; right: 1px; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; display: none; }
.gchat-ball-dot.is-shown { display: block; }
.gchat-ball-badge {
  position: absolute; right: -5px; top: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 900; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(185, 28, 28, 0.35);
}

.gchat-panel {
  position: fixed;
  width: 720px;
  height: 520px;
  min-width: 600px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,248,255,.99));
  box-shadow: 0 28px 80px rgba(15, 47, 107, 0.28), 0 0 0 1px rgba(255,255,255,.7) inset;
  z-index: 2147483001;
}
.gchat-panel.is-pinned { z-index: 2147483640; }
.gchat-panel[hidden] { display: none; }

.gchat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 54px; padding: 0 12px 0 18px;
  color: #fff; cursor: move; user-select: none; touch-action: none;
  background: linear-gradient(100deg, #0f2f6b, #1d4ed8 50%, #3b82f6);
}
.gchat-header-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.gchat-header-title strong { font-size: 15px; letter-spacing: .04em; }
.gchat-header-title small { font-size: 11px; opacity: .72; }
.gchat-header-dot { width: 8px; height: 8px; border-radius: 50%; background: #86efac; box-shadow: 0 0 0 4px rgba(134,239,172,.16); }
.gchat-controls { display: flex; align-items: center; gap: 2px; }
.gchat-control {
  width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #fff;
  display: grid; place-items: center; font-size: 16px; cursor: pointer; transition: background .16s ease, transform .16s ease;
}
.gchat-control:hover { background: rgba(255,255,255,.16); }
.gchat-control:active { transform: scale(.94); }
.gchat-control.is-active { background: rgba(255,255,255,.24); }
.gchat-control.gchat-close:hover { background: #dc2626; }

.gchat-body { flex: 1; min-height: 0; display: flex; }
.gchat-side {
  width: 252px; min-width: 210px; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid #dbe7f7; background: linear-gradient(180deg, #f5f9ff, #eef5ff);
}
.gchat-request-banner {
  margin: 10px 10px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid #bfdbfe;
  background: #eff6ff; color: #1d4ed8; display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer;
}
.gchat-request-banner strong { font-size: 12px; }
.gchat-request-banner span { font-size: 10px; color: #64748b; }
.gchat-request-banner b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: #2563eb; color: #fff; font-size: 11px; }

.gchat-tabs { display: flex; gap: 4px; padding: 10px 10px 6px; }
.gchat-tab {
  flex: 1; border: 0; border-radius: 9px; background: transparent; color: #64748b;
  padding: 7px 4px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.gchat-tab:hover { background: #e5efff; color: #1d4ed8; }
.gchat-tab.is-active { background: #fff; color: #1d4ed8; box-shadow: 0 3px 12px rgba(37,99,235,.12); }

.gchat-search-wrap { padding: 4px 10px 8px; }
.gchat-search {
  width: 100%; height: 34px; padding: 0 11px; border: 1px solid #d5e3f6; border-radius: 9px;
  background: rgba(255,255,255,.88); color: #17345f; outline: none; font: inherit; font-size: 12px;
}
.gchat-search:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.16); }

.gchat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 10px; scrollbar-width: thin; scrollbar-color: #bfdbfe transparent; }
.gchat-group-title { display: flex; justify-content: space-between; padding: 10px 7px 5px; color: #7b8da8; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.gchat-contact {
  width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 9px; align-items: center;
  padding: 9px 8px; border: 0; border-radius: 11px; background: transparent; text-align: left; color: inherit; cursor: pointer;
}
.gchat-contact:hover { background: rgba(219,234,254,.72); }
.gchat-contact.is-active { background: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.12); }
.gchat-contact-avatar { position: relative; width: 38px; height: 38px; border-radius: 11px; overflow: visible; }
.gchat-contact-avatar img, .gchat-contact-avatar > span:last-child {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit; object-fit: cover;
  background: linear-gradient(140deg,#dbeafe,#bfdbfe); color: #1e40af; font-size: 14px; font-weight: 900;
}
.gchat-presence-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #94a3b8; }
.gchat-presence-dot.online { background: #22c55e; }
.gchat-presence-dot.away { background: #f59e0b; }
.gchat-presence-dot.busy { background: #ef4444; }
.gchat-presence-dot.offline { background: #94a3b8; }
.gchat-contact-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gchat-contact-copy strong { font-size: 12px; color: #17345f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchat-contact-copy small { color: #7b8da8; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchat-unread { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 900; }
.gchat-empty { padding: 30px 14px; color: #8a9bb1; text-align: center; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.gchat-empty strong { color: #475569; font-size: 13px; }
.gchat-side-foot { border-top: 1px solid #dce8f7; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #64748b; font-size: 10px; background: rgba(255,255,255,.6); }
.gchat-side-foot button { border: 0; background: transparent; color: #2563eb; font-size: 10px; font-weight: 700; cursor: pointer; }

.gchat-divider { width: 1px; background: #dbe7f7; }
.gchat-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #fbfdff; }
.gchat-chat-head { min-height: 58px; padding: 9px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e2ebf8; background: rgba(255,255,255,.86); }
.gchat-chat-person { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.gchat-chat-person .gchat-contact-avatar { width: 36px; height: 36px; }
.gchat-chat-person strong { display: block; color: #132a4a; font-size: 13px; }
.gchat-chat-person small { display: block; color: #8494a9; font-size: 10px; margin-top: 2px; }
.gchat-chat-tools { display: flex; gap: 4px; }
.gchat-mini-btn { border: 1px solid #dbe7f7; border-radius: 8px; background: #fff; color: #4f6580; padding: 5px 8px; font-size: 10px; cursor: pointer; }
.gchat-mini-btn:hover { border-color: #93c5fd; color: #1d4ed8; }
.gchat-mini-btn.is-danger { color: #b91c1c; border-color: #fecaca; background: #fff7f7; }

.gchat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #bfdbfe transparent; }
.gchat-message { max-width: 76%; align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.gchat-message.is-mine { align-self: flex-end; align-items: flex-end; }
.gchat-bubble { padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: #fff; color: #20364f; font-size: 12px; line-height: 1.55; box-shadow: 0 4px 15px rgba(30,64,175,.07); border: 1px solid #e6eef9; word-break: break-word; white-space: pre-wrap; }
.gchat-message.is-mine .gchat-bubble { border-radius: 14px 4px 14px 14px; background: linear-gradient(135deg,#2563eb,#3b82f6); color: #fff; border-color: transparent; }
.gchat-bubble img { display: block; max-width: min(280px, 100%); max-height: 260px; border-radius: 10px; cursor: zoom-in; }
.gchat-bubble-caption { margin-top: 5px; font-size: 11px; opacity: .88; }
.gchat-message-meta { font-size: 9px; color: #9aa9bb; padding: 0 3px; }
.gchat-message.is-blocked .gchat-bubble { opacity: .65; text-decoration: line-through; }
.gchat-load-older { align-self: center; border: 0; background: transparent; color: #2563eb; font-size: 10px; cursor: pointer; padding: 4px 12px; }
.gchat-new-msg { align-self: center; color: #94a3b8; font-size: 10px; }
.gchat-unlock { margin: 12px 18px; padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; color: #1e40af; font-size: 11px; }

.gchat-composer { border-top: 1px solid #e2ebf8; padding: 10px 14px 12px; background: #fff; }
.gchat-composer-row { display: flex; gap: 7px; align-items: flex-end; }
.gchat-input { flex: 1; min-height: 36px; max-height: 92px; resize: none; border: 1px solid #d6e3f5; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 12px; line-height: 1.45; color: #17345f; outline: none; }
.gchat-input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.14); }
.gchat-input:disabled { background: #f1f5f9; color: #94a3b8; }
.gchat-icon-btn { width: 36px; height: 36px; border: 1px solid #dbe7f7; border-radius: 10px; background: #fff; color: #4f6580; cursor: pointer; display: grid; place-items: center; font-size: 15px; }
.gchat-icon-btn:hover { border-color: #93c5fd; color: #1d4ed8; background: #f5f9ff; }
.gchat-send { min-width: 62px; height: 36px; border: 0; border-radius: 10px; background: linear-gradient(135deg,#1d4ed8,#3b82f6); color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; }
.gchat-send:disabled { opacity: .5; cursor: not-allowed; }
.gchat-composer-hint { margin-top: 6px; color: #98a8bb; font-size: 9px; }
.gchat-emoji-pop { position: absolute; right: 18px; bottom: 90px; width: 250px; padding: 10px; display: grid; grid-template-columns: repeat(8,1fr); gap: 4px; background: #fff; border: 1px solid #dbe7f7; border-radius: 12px; box-shadow: 0 18px 35px rgba(15,47,107,.2); z-index: 3; }
.gchat-emoji-pop button { border: 0; background: transparent; font-size: 18px; cursor: pointer; border-radius: 6px; padding: 2px; }
.gchat-emoji-pop button:hover { background: #eff6ff; }

.gchat-resize { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; cursor: nwse-resize; z-index: 5; }
.gchat-resize::before, .gchat-resize::after { content: ''; position: absolute; right: 3px; bottom: 3px; border-right: 2px solid #9db4d0; border-bottom: 2px solid #9db4d0; }
.gchat-resize::before { width: 12px; height: 12px; }
.gchat-resize::after { width: 6px; height: 6px; }

.gchat-modal-layer { position: fixed; inset: 0; z-index: 2147483646; display: grid; place-items: center; padding: 16px; background: rgba(8, 25, 52, .26); backdrop-filter: blur(2px); pointer-events: auto; }
.gchat-modal { width: min(460px, 100%); max-height: min(620px, calc(100vh - 32px)); overflow: auto; border-radius: 16px; border: 1px solid #dbe7f7; background: #fff; box-shadow: 0 28px 80px rgba(15,47,107,.28); }
.gchat-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: linear-gradient(100deg,#0f2f6b,#1d4ed8); color: #fff; }
.gchat-modal-head strong { font-size: 14px; }
.gchat-modal-close { border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
.gchat-modal-body { padding: 16px; }
.gchat-modal-body h3 { margin: 0 0 6px; color: #132a4a; font-size: 15px; }
.gchat-modal-body p { margin: 0 0 12px; color: #71829a; font-size: 11px; line-height: 1.6; }
.gchat-form-row { display: flex; gap: 8px; }
.gchat-text-input { width: 100%; height: 38px; border: 1px solid #d6e3f5; border-radius: 9px; padding: 0 11px; font: inherit; font-size: 12px; color: #17345f; outline: none; }
.gchat-text-input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.14); }
.gchat-primary { height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: #2563eb; color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; white-space: nowrap; }
.gchat-primary:disabled { opacity: .55; cursor: not-allowed; }
.gchat-form-field { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; color: #50647e; font-size: 11px; }
.gchat-form-check { display: flex; align-items: center; gap: 8px; margin-top: 11px; color: #415873; font-size: 12px; }
.gchat-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.gchat-secondary { height: 38px; padding: 0 14px; border: 1px solid #d6e3f5; border-radius: 9px; background: #fff; color: #50647e; font-weight: 700; font-size: 12px; cursor: pointer; }
.gchat-search-results { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.gchat-search-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid #e6eef9; border-radius: 10px; }
.gchat-search-person strong { display: block; color: #17345f; font-size: 12px; }
.gchat-search-person small { color: #8797ad; font-size: 10px; }
.gchat-request-item { padding: 11px; border: 1px solid #e6eef9; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.gchat-request-item strong { display: block; color: #17345f; font-size: 12px; }
.gchat-request-item small { display: block; color: #7b8da8; font-size: 10px; margin-top: 3px; }
.gchat-request-actions { display: flex; gap: 5px; }
.gchat-profile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gchat-profile-avatar { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; background: #dbeafe; display: grid; place-items: center; color: #1d4ed8; font-weight: 900; font-size: 22px; }
.gchat-profile-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.gchat-profile-tags span { border-radius: 6px; background: #eff6ff; color: #1d4ed8; font-size: 9px; font-weight: 800; padding: 3px 6px; }
.gchat-profile-tags span.is-bao { background: #fee2e2; color: #b91c1c; }
.gchat-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gchat-profile-grid div { border-radius: 9px; background: #f6f9ff; padding: 9px; color: #7b8da8; font-size: 10px; }
.gchat-profile-grid b { display: block; color: #17345f; font-size: 13px; margin-top: 3px; }
.gchat-context-menu { position: fixed; z-index: 2147483646; min-width: 160px; border: 1px solid #dbe7f7; border-radius: 11px; background: #fff; padding: 5px; box-shadow: 0 18px 48px rgba(15,47,107,.24); pointer-events: auto; }
.gchat-context-menu button { width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 7px; color: #38506c; font-size: 11px; cursor: pointer; }
.gchat-context-menu button:hover { background: #eff6ff; color: #1d4ed8; }
.gchat-context-menu button.is-danger { color: #b91c1c; }
.gchat-context-menu button.is-danger:hover { background: #fef2f2; }
.gchat-toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 2147483647; max-width: min(460px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 10px; background: rgba(15,47,107,.94); color: #fff; font-size: 12px; box-shadow: 0 12px 35px rgba(15,47,107,.3); pointer-events: none; }
.gchat-toast.is-error { background: rgba(153,27,27,.96); }
.gchat-image-view { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: center; padding: 24px; background: rgba(3,12,28,.82); pointer-events: auto; }
.gchat-image-view img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.4); }

.gchat-message { max-width: 86%; flex-direction: row; align-items: flex-end; gap: 8px; }
.gchat-message.is-mine { flex-direction: row; align-items: flex-end; }
.gchat-message-content { min-width: 0; max-width: calc(100% - 38px); display: flex; flex-direction: column; gap: 4px; }
.gchat-message.is-mine .gchat-message-content { align-items: flex-end; }
.gchat-message-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(140deg,#dbeafe,#bfdbfe); color: #1e40af; font-size: 11px; font-weight: 900; }
.gchat-message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gchat-message.is-sending .gchat-bubble { opacity: .72; }
.gchat-message.is-failed .gchat-bubble { border-color: #fecaca; background: #fff7f7; color: #991b1b; }
.gchat-message.is-failed .gchat-message-meta { color: #dc2626; font-weight: 700; }
.gchat-message.is-blocked .gchat-message-meta { color: #d97706; }
.gchat-bubble-emoji { width: 68px; height: 68px; object-fit: contain; display: block; }
.gchat-recall { border: 0; background: transparent; color: #94a3b8; padding: 0 2px; font-size: 9px; cursor: pointer; }
.gchat-recall:hover { color: #dc2626; }
.gchat-system-line { align-self: center; max-width: 82%; padding: 4px 10px; border-radius: 999px; background: #eef4fc; color: #7b8da8; font-size: 10px; text-align: center; }
.gchat-typing { align-self: flex-start; display: flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 10px; background: #eef4fc; color: #71839a; font-size: 10px; }
.gchat-typing span { width: 5px; height: 5px; border-radius: 50%; background: #60a5fa; animation: gchat-typing 1s infinite ease-in-out; }
.gchat-typing span:nth-child(2) { animation-delay: .15s; }
.gchat-typing span:nth-child(3) { animation-delay: .3s; margin-right: 3px; }
@keyframes gchat-typing { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-3px); opacity: 1; } }

.gchat-group-title { border: 0; background: transparent; cursor: pointer; width: 100%; border-radius: 7px; }
.gchat-group-title:hover { background: #eef4fc; }
.gchat-chat-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.gchat-tag, .gchat-level-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 9px; font-weight: 800; white-space: nowrap; }
.gchat-tag.is-bao { background: #fee2e2; color: #b91c1c; }
.gchat-level-badge { background: #f1f5f9; color: #475569; }
.gchat-level-badge img { width: 12px; height: 12px; object-fit: contain; }
.gchat-credit-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--gchat-credit) 14%, white); color: var(--gchat-credit); border: 1px solid color-mix(in srgb, var(--gchat-credit) 34%, white); font-size: 9px; font-weight: 900; white-space: nowrap; }
.gchat-credit-icon, .gchat-credit-icon img { width: 13px; height: 13px; object-fit: contain; display: inline-grid; place-items: center; }
.gchat-credit-badge[data-icon-position="icon"] .gchat-credit-text { display: none; }
.gchat-profile-hero { display: flex; align-items: flex-start; gap: 14px; }
.gchat-profile-hero-copy { min-width: 0; }
.gchat-profile-hero-copy h3 { margin: 0; color: #132a4a; font-size: 18px; }
.gchat-profile-hero-copy p { margin: 3px 0 0; color: #7b8da8; font-size: 11px; }
.gchat-profile-bio { margin: 13px 0 10px; padding: 10px 12px; border-radius: 10px; background: #f7faff; color: #50647e; font-size: 12px; line-height: 1.6; }
.gchat-profile-games { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; color: #475569; font-size: 11px; }
.gchat-profile-games > span { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 8px; background: #f7faff; }
.gchat-profile-games small { color: #7b8da8; }
.gchat-credit-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.gchat-credit-history { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.gchat-credit-row { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 9px; background: #f7faff; }
.gchat-credit-row > span { font-weight: 900; font-size: 12px; text-align: center; }
.gchat-credit-row > span.is-plus { color: #16a34a; }
.gchat-credit-row > span.is-minus { color: #dc2626; }
.gchat-credit-row strong { display: block; color: #334b68; font-size: 11px; }
.gchat-credit-row small { color: #8a9bb1; font-size: 9px; }
.gchat-credit-row > b { color: #17345f; font-size: 12px; }
.gchat-emoji-pop button.is-image { display: grid; place-items: center; min-height: 26px; }
.gchat-emoji-pop button img { width: 24px; height: 24px; object-fit: contain; }

@media (max-width: 760px) {
  .gchat-ball { width: 52px; height: 52px; }
  .gchat-panel { left: 8px !important; top: 66px !important; width: calc(100vw - 16px) !important; height: calc(100vh - 82px) !important; min-width: 0; min-height: 0; border-radius: 16px; }
  .gchat-side { width: 110px; min-width: 110px; }
  .gchat-tabs { flex-direction: column; gap: 2px; }
  .gchat-tab { padding: 7px 2px; font-size: 10px; }
  .gchat-contact { grid-template-columns: 34px minmax(0,1fr); gap: 7px; }
  .gchat-contact .gchat-unread { position: absolute; }
  .gchat-contact-avatar { width: 34px; height: 34px; }
  .gchat-contact-copy small { display: none; }
  .gchat-header { padding-left: 12px; }
  .gchat-header-title small { display: none; }
  .gchat-control { width: 30px; height: 30px; font-size: 14px; }
  .gchat-messages { padding: 12px; }
  .gchat-message { max-width: 88%; }
  .gchat-resize { display: none; }
  .gchat-chat-tools .gchat-mini-btn:nth-child(2) { display: none; }
  .gchat-request-banner { margin: 7px 5px 0; padding: 7px; }
  .gchat-request-banner span { display: none; }
  .gchat-side-foot { padding: 7px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .gchat-side { width: 92px; min-width: 92px; }
  .gchat-header-dot { display: none; }
  .gchat-tab { font-size: 9px; }
  .gchat-chat-person small { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.friend-request-list { margin: 14px 0; padding: 12px; border: 1px solid #bfdbfe; border-radius: 14px; background: #f5f9ff; }
.friend-request-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #e2ebf8; }
.friend-request-card:first-of-type { border-top: 0; }
.friend-request-card > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.friend-request-card strong { color: #17345f; font-size: 13px; }
.friend-request-card span, .friend-request-card small { color: #6c8098; font-size: 11px; }
.friend-request-outgoing { margin: 10px 0; color: #64748b; font-size: 12px; }
.chat-message-image { display: block; max-width: 260px; max-height: 230px; border-radius: 9px; margin-bottom: 4px; }

/* ===== 2026-11 聊天浮窗视觉升级：左侧对话 + 右侧好友列表 ===== */
.gchat-panel {
  width: 980px;
  height: 640px;
  min-width: 780px;
  min-height: 520px;
  border: 1px solid rgba(104, 124, 255, .45);
  border-radius: 28px;
  background:
    radial-gradient(760px 520px at 12% 4%, rgba(32, 51, 126, .3), transparent 66%),
    radial-gradient(520px 420px at 92% 100%, rgba(63, 34, 129, .26), transparent 70%),
    linear-gradient(155deg, #0a1022 0%, #070b16 52%, #0b1020 100%);
  box-shadow:
    0 40px 110px rgba(0, 0, 0, .72),
    0 0 0 1px rgba(255, 255, 255, .035) inset,
    0 0 74px rgba(78, 103, 255, .2);
  color: #eaf1ff;
  color-scheme: dark;
}
.gchat-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(124, 151, 255, .9), rgba(182, 132, 255, .8), transparent);
  pointer-events: none;
}
.gchat-header {
  min-height: 58px;
  padding: 0 14px 0 20px;
  border-bottom: 1px solid rgba(111, 137, 216, .17);
  background: linear-gradient(90deg, rgba(16, 25, 50, .92), rgba(9, 14, 28, .9));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.gchat-header-title strong { color: #f6f9ff; font-size: 16px; }
.gchat-header-title small { color: #7383a5; }
.gchat-header-dot { background: #64ef8c; box-shadow: 0 0 0 4px rgba(100, 239, 140, .12), 0 0 14px rgba(100, 239, 140, .6); }
.gchat-control { color: #b7c4e3; border: 1px solid transparent; }
.gchat-control:hover { color: #fff; background: rgba(255, 255, 255, .07); border-color: rgba(152, 176, 235, .2); }
.gchat-control.is-active { background: rgba(117, 238, 154, .12); border-color: rgba(117, 238, 154, .3); color: #8ef3ad; }
.gchat-control.gchat-close:hover { background: rgba(219, 65, 65, .3); border-color: rgba(255, 123, 123, .38); }
.gchat-body { flex-direction: row; background: rgba(2, 6, 14, .2); }
.gchat-main { order: 3; flex: 1; min-width: 0; }
.gchat-divider { order: 2; width: 1px; background: linear-gradient(180deg, transparent, rgba(112, 137, 205, .3) 12%, rgba(112, 137, 205, .3) 88%, transparent); }
.gchat-side {
  order: 1;
  width: 300px;
  min-width: 268px;
  border-right: 1px solid rgba(111, 137, 216, .16);
  border-left: 0;
  background:
    radial-gradient(300px 220px at 100% 0%, rgba(75, 58, 162, .18), transparent 70%),
    linear-gradient(180deg, rgba(12, 18, 36, .96), rgba(7, 11, 22, .98));
}
.gchat-side-self {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 14px 4px;
  padding: 11px 12px;
  border-radius: 17px;
  border: 1px solid rgba(126, 151, 220, .2);
  background: linear-gradient(135deg, rgba(35, 51, 102, .66), rgba(19, 27, 54, .7));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2), 0 0 0 1px rgba(255, 255, 255, .025) inset;
}
.gchat-side-self-avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #dbe7ff;
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(140deg, #4164d9, #8c5bff);
  border: 2px solid rgba(145, 199, 255, .7);
  box-shadow: 0 0 0 3px rgba(103, 147, 255, .12), 0 0 18px rgba(91, 164, 255, .25);
}
.gchat-side-self-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gchat-side-self-copy { min-width: 0; flex: 1; }
.gchat-side-self-copy strong { display: block; color: #f2f7ff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchat-side-self-copy small { display: block; margin-top: 3px; color: #7f91b5; font-size: 10px; }
.gchat-side-self-live { width: 9px; height: 9px; border-radius: 50%; background: #62ed8e; box-shadow: 0 0 12px rgba(98, 237, 142, .8); }
.gchat-request-banner {
  margin: 9px 14px 0;
  border: 1px solid rgba(255, 190, 91, .25);
  background: linear-gradient(135deg, rgba(91, 66, 20, .42), rgba(53, 36, 13, .5));
  color: #ffd68a;
}
.gchat-request-banner strong { color: #ffe6b5; }
.gchat-request-banner span { color: #b99a68; }
.gchat-request-banner b { background: #ffb43f; color: #241504; }
.gchat-tabs { gap: 3px; padding: 12px 14px 8px; }
.gchat-tab {
  position: relative;
  flex: 1;
  padding: 8px 4px 10px;
  border-radius: 0;
  color: #7b8cae;
  font-size: 12px;
  font-weight: 800;
  background: transparent;
}
.gchat-tab:hover { background: transparent; color: #bdcaf0; }
.gchat-tab.is-active { background: transparent; color: #f0f5ff; box-shadow: none; }
.gchat-tab.is-active::after {
  content: '';
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #67c8ff, #9e7dff);
  box-shadow: 0 0 12px rgba(116, 157, 255, .65);
}
.gchat-search-wrap { padding: 2px 14px 9px; }
.gchat-search {
  height: 37px;
  border: 1px solid rgba(113, 138, 201, .24);
  border-radius: 12px;
  background: rgba(5, 10, 22, .7);
  color: #dce7ff;
  font-size: 11px;
}
.gchat-search::placeholder { color: #667593; }
.gchat-search:focus { border-color: rgba(123, 158, 255, .65); box-shadow: 0 0 0 3px rgba(91, 123, 255, .12), 0 0 22px rgba(85, 118, 255, .12); }
.gchat-list { padding: 0 10px 10px; gap: 6px; }
.gchat-contact {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.gchat-contact:hover { background: rgba(53, 76, 145, .24); border-color: rgba(117, 153, 235, .24); transform: translateX(-1px); }
.gchat-contact.is-active {
  background: linear-gradient(135deg, rgba(40, 61, 119, .68), rgba(28, 37, 76, .8));
  border-color: rgba(103, 155, 255, .55);
  box-shadow: 0 0 0 1px rgba(103, 155, 255, .08) inset, 0 10px 26px rgba(0, 0, 0, .2), 0 0 24px rgba(68, 119, 255, .1);
}
.gchat-contact.is-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #71c7ff, #9b7cff);
  box-shadow: 0 0 10px rgba(113, 199, 255, .7);
}
.gchat-contact-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #3c63cc, #774ee4);
  color: #f7fbff;
  font-size: 15px;
  font-weight: 900;
  border: 1px solid rgba(163, 196, 255, .4);
  box-shadow: 0 0 0 3px rgba(83, 129, 255, .08);
}
.gchat-contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gchat-presence-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #0a1122;
  background: #67738a;
  z-index: 1;
}
.gchat-presence-dot.online { background: #59ee86; box-shadow: 0 0 10px rgba(89, 238, 134, .8); }
.gchat-presence-dot.busy { background: #ffbf4f; box-shadow: 0 0 10px rgba(255, 191, 79, .65); }
.gchat-contact-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gchat-contact-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gchat-contact-name-row strong { color: #eaf1ff; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchat-contact-credit {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--gchat-credit) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--gchat-credit) 42%, transparent);
  color: var(--gchat-credit);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.gchat-contact-copy > small { color: #71819f; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gchat-contact-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.gchat-contact-presence { color: #66748f; font-size: 8px; white-space: nowrap; }
.gchat-contact-presence.is-online { color: #76e999; }
.gchat-contact-presence.is-busy { color: #ffc463; }
.gchat-unread { position: static; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(135deg, #ff4d5e, #ff2e78); color: #fff; font-size: 9px; font-weight: 900; box-shadow: 0 0 12px rgba(255, 53, 105, .5); }
.gchat-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 4px;
  color: #8798ba;
  font-size: 9px;
  background: transparent;
}
.gchat-group-title b { color: #687998; font-size: 9px; }
.gchat-side-foot { border-top: 1px solid rgba(111, 137, 216, .12); color: #72819e; }
.gchat-side-foot button { color: #8ce9a8; }
.gchat-main { display: flex; flex-direction: column; background: radial-gradient(520px 340px at 74% 12%, rgba(63, 78, 172, .12), transparent 70%); }
.gchat-chat-head {
  min-height: 78px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(117, 140, 207, .14);
  background: linear-gradient(180deg, rgba(12, 19, 38, .72), rgba(8, 13, 26, .2));
}
.gchat-chat-person { gap: 12px; }
.gchat-chat-person .gchat-contact-avatar {
  width: 54px;
  height: 54px;
  border: 2px solid rgba(125, 193, 255, .65);
  box-shadow: 0 0 0 4px rgba(92, 151, 255, .1), 0 0 24px rgba(95, 151, 255, .25);
  font-size: 17px;
}
.gchat-chat-person strong { color: #f7faff; font-size: 20px; letter-spacing: .02em; }
.gchat-chat-person small { color: #6e7f9f; font-size: 10px; }
.gchat-chat-badges { gap: 5px; margin-top: 5px; }
.gchat-tag, .gchat-level-badge {
  padding: 3px 7px;
  border: 1px solid rgba(129, 157, 223, .2);
  background: rgba(57, 76, 137, .28);
  color: #a9bdea;
  font-size: 9px;
}
.gchat-tag.is-bao { background: rgba(242, 53, 71, .18); border-color: rgba(255, 101, 116, .35); color: #ff8492; }
.gchat-level-badge { background: rgba(255, 221, 120, .09); border-color: rgba(255, 222, 125, .22); color: #ffdf91; }
.gchat-credit-badge {
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--gchat-credit) 48%, transparent);
  background: color-mix(in srgb, var(--gchat-credit) 15%, transparent);
  color: var(--gchat-credit);
  font-size: 9px;
  text-shadow: 0 0 12px color-mix(in srgb, var(--gchat-credit) 42%, transparent);
}
.gchat-mini-btn {
  border: 1px solid rgba(118, 143, 206, .24);
  border-radius: 9px;
  background: rgba(19, 29, 56, .7);
  color: #96a8cc;
  font-size: 10px;
}
.gchat-mini-btn:hover { color: #dce8ff; border-color: rgba(127, 169, 255, .5); background: rgba(42, 64, 121, .55); }
.gchat-messages { padding: 18px 20px 12px; gap: 16px; }
.gchat-message { gap: 10px; max-width: 82%; }
.gchat-message-avatar {
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  border: 1px solid rgba(139, 180, 255, .38);
  background: linear-gradient(140deg, #3157be, #784de0);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 0 0 3px rgba(91, 139, 255, .07);
}
.gchat-message-content { max-width: calc(100% - 45px); gap: 5px; }
.gchat-bubble {
  padding: 11px 15px;
  border-radius: 6px 18px 18px 18px;
  border: 1px solid rgba(112, 147, 228, .3);
  background: linear-gradient(145deg, #172752, #122043);
  color: #eff5ff;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.gchat-message.is-mine .gchat-bubble {
  border-radius: 18px 6px 18px 18px;
  border-color: rgba(82, 218, 182, .34);
  background: linear-gradient(145deg, #0f3b44, #115a54);
  color: #e8fff9;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .26), 0 0 24px rgba(48, 213, 166, .1);
}
.gchat-message-meta { color: #687897; font-size: 9px; }
.gchat-message.is-mine .gchat-message-meta { color: #77a99d; }
.gchat-message.is-failed .gchat-bubble { border-color: rgba(255, 113, 113, .6); background: rgba(95, 24, 29, .75); color: #ffd7d7; }
.gchat-system-line { background: rgba(83, 103, 163, .16); color: #8191af; border: 1px solid rgba(113, 137, 199, .12); }
.gchat-typing { background: rgba(45, 65, 122, .35); color: #8ea0c2; }
.gchat-load-older { color: #78a8ff; }
.gchat-composer {
  border-top: 1px solid rgba(112, 137, 205, .15);
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, rgba(7, 12, 24, .55), rgba(5, 9, 19, .92));
}
.gchat-composer-row { gap: 9px; }
.gchat-input {
  min-height: 42px;
  border: 1px solid rgba(113, 141, 211, .26);
  border-radius: 14px;
  background: rgba(10, 17, 34, .85);
  color: #e8f0ff;
  font-size: 12px;
}
.gchat-input::placeholder { color: #657593; }
.gchat-input:focus { border-color: rgba(125, 158, 255, .62); box-shadow: 0 0 0 3px rgba(92, 124, 255, .12), 0 0 20px rgba(76, 112, 255, .1); }
.gchat-icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(113, 141, 211, .24);
  border-radius: 13px;
  background: rgba(13, 21, 40, .8);
  color: #91a3c7;
}
.gchat-icon-btn:hover { border-color: rgba(130, 166, 255, .55); color: #c8dcff; background: rgba(38, 57, 107, .7); }
.gchat-send {
  min-width: 76px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #6d62ff, #a74dff);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(124, 82, 255, .32), 0 0 0 1px rgba(255, 255, 255, .12) inset;
}
.gchat-send:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(124, 82, 255, .42), 0 0 0 1px rgba(255, 255, 255, .16) inset; }
.gchat-composer-hint { color: #5e6d88; }
.gchat-emoji-pop {
  border: 1px solid rgba(113, 141, 211, .28);
  background: #111a2e;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .55);
}
.gchat-emoji-pop button:hover { background: rgba(94, 120, 194, .25); }
.gchat-empty { color: #6e7d9a; }
.gchat-empty strong { color: #aebcd8; }
.gchat-resize::before, .gchat-resize::after { border-color: #60739a; }
.gchat-modal-layer { background: rgba(3, 7, 18, .72); backdrop-filter: blur(8px); }
.gchat-modal {
  border: 1px solid rgba(113, 141, 211, .35);
  background: linear-gradient(150deg, #121b32, #080d1a);
  color: #eaf1ff;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .7);
}
.gchat-modal-head { background: linear-gradient(100deg, #172853, #243a78); }
.gchat-modal-body h3 { color: #eef4ff; }
.gchat-modal-body p { color: #8594b3; }
.gchat-text-input { border-color: rgba(113, 141, 211, .26); background: rgba(7, 13, 27, .8); color: #eaf1ff; }
.gchat-primary { background: linear-gradient(135deg, #6d62ff, #a74dff); }
.gchat-secondary { border-color: rgba(113, 141, 211, .26); background: rgba(15, 24, 44, .8); color: #9baccd; }
.gchat-profile-grid div, .gchat-credit-row, .gchat-profile-bio, .gchat-profile-games > span { background: rgba(19, 30, 57, .68); border: 1px solid rgba(96, 122, 187, .16); color: #8d9dbb; }
.gchat-profile-grid b, .gchat-credit-row > b, .gchat-profile-hero-copy h3 { color: #eef4ff; }
.gchat-context-menu { border-color: rgba(113, 141, 211, .32); background: #111a2e; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.gchat-context-menu button { color: #a7b8d8; }
.gchat-context-menu button:hover { background: rgba(78, 104, 179, .26); color: #eef5ff; }
.gchat-context-menu button.is-danger { color: #ff8b8b; }
.gchat-credit-history::-webkit-scrollbar, .gchat-list::-webkit-scrollbar, .gchat-messages::-webkit-scrollbar { width: 6px; }
.gchat-credit-history::-webkit-scrollbar-thumb, .gchat-list::-webkit-scrollbar-thumb, .gchat-messages::-webkit-scrollbar-thumb { background: rgba(102, 126, 185, .35); border-radius: 999px; }
@media (max-width: 980px) {
  .gchat-panel { min-width: 0; }
  .gchat-side { width: 292px; min-width: 274px; }
}
@media (max-width: 760px) {
  .gchat-panel { left: 8px !important; top: 64px !important; width: calc(100vw - 16px) !important; height: calc(100vh - 78px) !important; min-width: 0; min-height: 0; border-radius: 20px; }
  .gchat-body { flex-direction: column; }
  .gchat-main { order: 1; flex: 1 1 62%; min-height: 0; }
  .gchat-divider { order: 2; width: 100%; height: 1px; background: rgba(112, 137, 205, .18); }
  .gchat-side { order: 3; width: 100%; min-width: 0; height: 38%; min-height: 190px; border-left: 0; border-right: 0; border-top: 1px solid rgba(111, 137, 216, .16); }
  .gchat-side-self { display: none; }
  .gchat-side-foot { display: none; }
  .gchat-contact { grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 58px; padding: 7px 8px; }
  .gchat-contact-avatar { width: 40px; height: 40px; }
  .gchat-chat-head { min-height: 64px; padding: 9px 12px; }
  .gchat-chat-person .gchat-contact-avatar { width: 44px; height: 44px; }
  .gchat-chat-person strong { font-size: 16px; }
  .gchat-messages { padding: 12px; gap: 12px; }
  .gchat-message { max-width: 90%; }
  .gchat-message-avatar { flex-basis: 31px; width: 31px; height: 31px; }
  .gchat-message-content { max-width: calc(100% - 39px); }
  .gchat-bubble { font-size: 12px; padding: 9px 12px; }
  .gchat-composer { padding: 9px 10px 10px; }
  .gchat-tabs { padding: 8px 10px 4px; }
  .gchat-tab { padding: 6px 2px 8px; font-size: 10px; }
  .gchat-search-wrap { padding: 2px 10px 7px; }
  .gchat-list { padding: 0 8px 8px; }
  .gchat-request-banner { margin: 7px 10px 0; }
}

/* 右侧好友栏：四分类、订单卡片与高对比度默认头像 */
#global-chat-root .gchat-tabs {
  gap: 2px;
  padding: 8px 8px 5px;
}
#global-chat-root .gchat-tab {
  min-width: 0;
  padding: 7px 1px 8px;
  font-size: 10px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
#global-chat-root .gchat-tab.is-active {
  background: linear-gradient(180deg, rgba(51, 79, 148, .55), rgba(24, 39, 78, .65));
  color: #dceaff;
  box-shadow: 0 0 0 1px rgba(116, 158, 255, .18) inset, 0 6px 16px rgba(0, 0, 0, .18);
}
#global-chat-root .gchat-side-foot {
  min-height: 34px;
  padding: 8px 12px;
  border-top: 1px solid rgba(111, 137, 216, .14);
  background: linear-gradient(180deg, rgba(8, 13, 26, .45), rgba(5, 9, 19, .95));
  color: #8292b2;
}
#global-chat-root .gchat-side-foot button {
  border: 0;
  background: transparent;
  color: #8ce9a8;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

#global-chat-root .gchat-contact-avatar > span:not(.gchat-presence-dot),
#global-chat-root .gchat-message-avatar > span:not(.gchat-presence-dot),
#global-chat-root .gchat-order-avatar > span:not(.gchat-presence-dot) {
  background: transparent !important;
  color: #f7fbff;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
#global-chat-root .gchat-side-self-avatar {
  color: #f7fbff;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}

#global-chat-root .gchat-order-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 7px 9px;
  color: #8494b4;
  font-size: 9px;
}
#global-chat-root .gchat-order-list-head span {
  color: #b9c8e4;
  font-size: 10px;
  font-weight: 800;
}
#global-chat-root .gchat-order-list-head button {
  border: 0;
  background: transparent;
  color: #8ecaff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
#global-chat-root .gchat-order-item {
  display: grid;
  width: 100%;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  padding: 9px;
  border: 1px solid rgba(92, 121, 188, .2);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(22, 36, 70, .55), rgba(10, 17, 34, .72));
  color: #e9f0ff;
  text-align: left;
  cursor: pointer;
  transition: .16s ease;
}
#global-chat-root .gchat-order-item:hover,
#global-chat-root .gchat-order-item.is-active {
  border-color: rgba(112, 158, 255, .46);
  background: linear-gradient(135deg, rgba(35, 57, 111, .68), rgba(14, 25, 52, .82));
  transform: translateY(-1px);
}
#global-chat-root .gchat-order-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(136, 177, 255, .4);
  border-radius: 12px;
  background: linear-gradient(140deg, #3c63cc, #774ee4);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
#global-chat-root .gchat-order-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#global-chat-root .gchat-order-avatar .gchat-presence-dot { display: none; }
#global-chat-root .gchat-order-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#global-chat-root .gchat-order-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
#global-chat-root .gchat-order-title strong {
  overflow: hidden;
  color: #eff5ff;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#global-chat-root .gchat-order-state {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(126, 148, 202, .22);
  border-radius: 999px;
  color: #95a5c2;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}
#global-chat-root .gchat-order-state.is-live {
  border-color: rgba(93, 235, 144, .32);
  background: rgba(74, 211, 124, .1);
  color: #83edaa;
}
#global-chat-root .gchat-order-state.is-paused {
  border-color: rgba(255, 193, 92, .32);
  background: rgba(255, 193, 92, .1);
  color: #ffd28a;
}
#global-chat-root .gchat-order-copy > small {
  overflow: hidden;
  color: #7888a6;
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#global-chat-root .gchat-order-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #697a98;
  font-size: 8px;
}
#global-chat-root .gchat-order-meta i {
  color: #8fb4ea;
  font-style: normal;
}
#global-chat-root .gchat-order-meta b {
  color: #f4d477;
  font-weight: 800;
}
#global-chat-root .gchat-order-meta time {
  margin-left: auto;
}
#global-chat-root .gchat-order-retry {
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(117, 156, 235, .34);
  border-radius: 8px;
  background: rgba(55, 83, 150, .35);
  color: #bad7ff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

#global-chat-root .gchat-message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
#global-chat-root .gchat-message-meta .gchat-credit-badge {
  background: color-mix(in srgb, var(--gchat-credit) 13%, transparent);
  border-color: color-mix(in srgb, var(--gchat-credit) 38%, transparent);
}
#global-chat-root .gchat-message-time { color: #5f6f8e; }

/* 移动端单栏：好友列表 ⇄ 对话，避免左右两栏被压成上下碎块 */
#global-chat-root .gchat-mobile-back {
  display: none;
}

@media (max-width: 760px) {
  #global-chat-root .gchat-panel {
    left: 8px !important;
    top: 64px !important;
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 78px) !important;
    min-width: 0;
    min-height: 0;
  }
  #global-chat-root .gchat-body {
    flex-direction: row !important;
  }
  #global-chat-root .gchat-side,
  #global-chat-root .gchat-main {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
  }
  #global-chat-root .gchat-side {
    border: 0;
    border-radius: 0 0 20px 20px;
  }
  #global-chat-root .gchat-side-self {
    display: flex !important;
    margin: 10px 10px 2px;
  }
  #global-chat-root .gchat-tabs {
    display: flex;
    flex-direction: row !important;
    gap: 3px;
    overflow: hidden;
  }
  #global-chat-root .gchat-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 1px 8px;
    font-size: 10px;
  }
  #global-chat-root .gchat-panel[data-mobile-view="list"] .gchat-main,
  #global-chat-root .gchat-panel[data-mobile-view="list"] .gchat-divider,
  #global-chat-root .gchat-panel[data-mobile-view="thread"] .gchat-side,
  #global-chat-root .gchat-panel[data-mobile-view="thread"] .gchat-divider {
    display: none !important;
  }
  #global-chat-root .gchat-panel[data-mobile-view="thread"] .gchat-main {
    display: flex !important;
  }
  #global-chat-root .gchat-mobile-back {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0 0 3px;
    border: 1px solid rgba(126, 160, 235, .25);
    border-radius: 10px;
    background: rgba(27, 44, 82, .5);
    color: #dce9ff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }
  #global-chat-root .gchat-chat-person {
    flex: 1;
    min-width: 0;
  }
  #global-chat-root .gchat-chat-tools {
    flex: 0 0 auto;
  }
  #global-chat-root .gchat-side-foot {
    display: none !important;
  }
}

/* 计时小猫并入聊天浮窗：一个球、一个面板。 */
#global-chat-root .gchat-timer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  min-width: 0;
  margin-right: 4px;
  padding: 0 9px 0 5px;
  border: 1px solid rgba(125, 171, 239, .22);
  border-radius: 10px;
  background: rgba(25, 43, 81, .52);
  color: #cfe0ff;
  cursor: pointer;
  transition: .16s ease;
}
#global-chat-root .gchat-timer-toggle:hover,
#global-chat-root .gchat-timer-toggle.is-active {
  border-color: rgba(114, 228, 255, .48);
  background: rgba(40, 71, 133, .7);
  box-shadow: 0 0 18px rgba(93, 182, 255, .12);
}
#global-chat-root .gchat-timer-toggle img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 40%;
  box-shadow: 0 0 0 1px rgba(169, 218, 255, .35);
}
#global-chat-root .gchat-timer-toggle span {
  color: #9fb3d6;
  font-size: 10px;
  font-weight: 800;
}
#global-chat-root .gchat-timer-toggle b {
  color: #9fb3d6;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}
#global-chat-root .gchat-timer-toggle.is-live b { color: #8cf0ad; }
#global-chat-root .gchat-timer-toggle.is-paused b { color: #ffd28a; }
#global-chat-root .gchat-timer-view {
  flex: 1;
  min-height: 0;
  display: flex;
}
#global-chat-root .gchat-timer-view[hidden] { display: none !important; }
#global-chat-root .gchat-panel.is-timer-view .gchat-body { display: none !important; }
#global-chat-root .gchat-panel.is-timer-view .gchat-timer-view { display: flex !important; }
#global-chat-root .gchat-panel.is-timer-view .gchat-timer-toggle { color: #e7f4ff; }
@media (max-width: 760px) {
  #global-chat-root .gchat-timer-toggle {
    width: 34px;
    padding: 0;
    justify-content: center;
    margin-right: 1px;
  }
  #global-chat-root .gchat-timer-toggle span,
  #global-chat-root .gchat-timer-toggle b { display: none; }
  #global-chat-root .gchat-timer-toggle img { width: 26px; height: 26px; }
}
