:root {
  --gg20-gold: #d8a11b;
  --gg20-gold-soft: #fff7e2;
  --gg20-red: #e8394f;
  --gg20-ink: #171914;
  --gg20-muted: #747a84;
  --gg20-line: rgba(20, 22, 18, .1);
  --gg20-surface: #fff;
}

html[data-theme="dark"] {
  --gg20-gold-soft: rgba(216, 161, 27, .13);
  --gg20-ink: #f8f7f2;
  --gg20-muted: #9da39d;
  --gg20-line: rgba(255, 255, 255, .11);
  --gg20-surface: #171915;
}

.gg-v20-friend-toolbar {
  max-inline-size: 940px;
  margin: 0 auto 12px;
  padding: 4px;
  border: 1px solid var(--gg20-line);
  border-radius: 16px;
  background: var(--gg20-surface);
  box-shadow: 0 5px 22px rgba(20, 21, 18, .035);
}

.gg-v20-friend-toolbar > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.gg-v20-friend-toolbar button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-block-size: 43px;
  padding: 8px 12px;
  color: var(--gg20-muted);
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.gg-v20-friend-toolbar button:active { transform: scale(.98); }
.gg-v20-friend-toolbar button[aria-selected="true"] {
  color: var(--gg20-ink);
  background: var(--gg20-gold-soft);
}

.gg-v20-friend-toolbar svg,
.gg-v20-friend-button svg,
.gg-v20-verified svg,
.gg-v20-banner-close svg,
.gg-v20-notice-empty svg {
  inline-size: 19px;
  block-size: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gg-v20-friend-toolbar b,
.gg-v20-sheet-badge {
  display: grid;
  place-items: center;
  min-inline-size: 20px;
  block-size: 20px;
  padding-inline: 5px;
  color: #fff;
  border-radius: 999px;
  background: var(--gg20-red);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.directory-member-card.gg-v18-member-row {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
}

.directory-member-card[hidden] { display: none !important; }

.gg-v20-friend-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.gg-v20-request-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gg-v20-friend-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-block-size: 40px;
  padding: 8px 15px;
  color: var(--gg20-ink);
  border: 1px solid var(--gg20-line);
  border-radius: 999px;
  background: var(--gg20-surface);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, border-color .15s ease, background .15s ease;
}

.gg-v20-friend-button:active { transform: scale(.97); }
.gg-v20-friend-button.add,
.gg-v20-friend-button.accept {
  color: #15130d;
  border-color: #dda20c;
  background: linear-gradient(135deg, #f3bd2d, #d99b08);
}

.gg-v20-friend-button.friend { color: #916a0b; background: var(--gg20-gold-soft); }
.gg-v20-friend-button.pending { color: var(--gg20-muted); background: rgba(125, 130, 137, .07); }
.gg-v20-friend-button.decline { background: rgba(125, 130, 137, .08); }
.gg-v20-friend-button:disabled { opacity: .58; pointer-events: none; }
.gg-v20-friend-button.loading span { opacity: .55; }
.gg-v20-friend-button.loading::after {
  content: "";
  inline-size: 14px;
  block-size: 14px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: gg20Spin .7s linear infinite;
}

.gg-v20-profile-friend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  inline-size: 100%;
  margin-block: 5px 10px;
}

.gg-v20-profile-friend > .gg-v20-friend-button,
.gg-v20-profile-friend > .gg-v20-request-actions { flex: 1 1 160px; }
.gg-v20-profile-friend .gg-v20-friend-button { inline-size: 100%; }
.gg-v20-profile-friend > small {
  flex-basis: 100%;
  color: var(--gg20-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.gg-v20-avatar,
.gg-v20-admin-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  overflow: hidden;
  color: #e8b52d;
  border: 1px solid rgba(216, 161, 27, .48);
  border-radius: 50%;
  background: #191b17;
  font-size: 12px;
  font-weight: 900;
}

.gg-v20-avatar img,
.gg-v20-admin-avatar img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.gg-v20-admin-avatar { padding: 5px; border-radius: 14px; background: #10110f; }
.gg-v20-admin-avatar img { object-fit: contain; }

.notification-list.gg-v20-original-hidden { display: none !important; }

.gg-v20-notification-list {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  padding: 5px !important;
}

.gg-v20-notice {
  position: relative;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 11px;
  inline-size: 100%;
  min-block-size: 72px;
  padding: 11px 12px !important;
  color: var(--gg20-ink) !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  text-align: start !important;
  cursor: pointer;
}

.gg-v20-notice:hover { background: rgba(130, 135, 127, .06) !important; }
.gg-v20-notice.unread { background: rgba(225, 169, 24, .09) !important; }
.gg-v20-notice-copy { display: grid; gap: 2px; min-inline-size: 0; }
.gg-v20-notice-copy strong {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--gg20-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gg-v20-notice-copy b {
  overflow: hidden;
  color: var(--gg20-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.42;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gg-v20-notice-copy small { color: #a4770c; font-size: 10px; font-weight: 750; }
.gg-v20-verified { display: inline-grid; place-items: center; color: #b98409; }
.gg-v20-verified svg { inline-size: 17px; block-size: 17px; }
.gg-v20-unread-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--gg20-red);
  box-shadow: 0 0 0 4px rgba(232, 57, 79, .09);
}

.gg-v20-notice-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-block-size: 190px;
  color: var(--gg20-muted);
  text-align: center;
}
.gg-v20-notice-empty svg { inline-size: 31px; block-size: 31px; color: #b98209; }
.gg-v20-notice-empty strong { color: var(--gg20-ink); font-size: 15px; }
.gg-v20-notice-empty span { font-size: 12px; }

.gg-v20-live-banner {
  position: fixed;
  z-index: 5000;
  top: max(10px, calc(env(safe-area-inset-top) + 7px));
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  inline-size: min(440px, calc(100vw - 24px));
  min-block-size: 70px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: rgba(20, 22, 18, .94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
  opacity: 0;
  transform: translate(-50%, -22px) scale(.98);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  transition: opacity .22s ease, transform .22s ease;
}

.gg-v20-live-banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.gg-v20-live-banner.leaving { opacity: 0; transform: translate(-50%, -18px) scale(.98); }
.gg-v20-banner-open {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-inline-size: 0;
  padding: 0;
  color: #fff;
  border: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
}

.gg-v20-banner-open > span:last-child { display: grid; gap: 3px; min-inline-size: 0; }
.gg-v20-banner-open strong { display: flex; align-items: center; gap: 4px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gg-v20-banner-open b { overflow: hidden; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.gg-v20-banner-close {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  padding: 0;
  color: rgba(255,255,255,.66);
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}

.gg-v20-toast {
  position: fixed;
  z-index: 5200;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 18px));
  max-inline-size: min(420px, calc(100vw - 28px));
  padding: 11px 16px;
  color: #fff;
  border-radius: 999px;
  background: rgba(22, 24, 20, .96);
  box-shadow: 0 14px 42px rgba(0,0,0,.23);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}
.gg-v20-toast.show { opacity: 1; transform: translate(-50%, 0); }
.gg-v20-toast.error { background: rgba(151, 37, 50, .97); }

#gg-mobile-nav .gg-mobile-badge,
.product-nav .nav-notice-count,
.gg-v20-sheet-badge {
  color: #fff !important;
  background: var(--gg20-red) !important;
  box-shadow: 0 0 0 2px #fff;
}

#gg-mobile-more-sheet [data-tab] { position: relative; }
.gg-v20-sheet-badge { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; }

@keyframes gg20Spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .gg-v20-friend-toolbar { margin: 0 12px 9px; border-radius: 14px; }
  .gg-v20-friend-toolbar button { min-block-size: 41px; padding-inline: 7px; font-size: 11px; }

  .directory-member-card.gg-v18-member-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  .gg-v20-friend-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    inline-size: 100%;
  }

  .gg-v20-friend-controls > .gg-v20-friend-button,
  .gg-v20-friend-controls > .gg-v20-request-actions { flex: 1; }
  .gg-v20-friend-controls .gg-v20-friend-button { flex: 1; min-block-size: 36px; padding-block: 6px; }
  .gg-v18-member-row > button:not(.directory-profile-open) { grid-column: 2; grid-row: 1; }

  .gg-v20-notification-list { margin-inline: 12px !important; }
  .gg-v20-notice { grid-template-columns: 45px minmax(0, 1fr) 9px; min-block-size: 68px; padding: 9px 10px !important; }
  .gg-v20-avatar, .gg-v20-admin-avatar { inline-size: 43px; block-size: 43px; }
  .gg-v20-live-banner { border-radius: 18px; }
  .gg-v20-toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

@media (max-width: 370px) {
  .gg-v20-friend-toolbar button svg { display: none; }
  .gg-v20-friend-toolbar button { font-size: 10px; }
  .gg-v20-friend-button { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .gg-v20-live-banner,
  .gg-v20-toast,
  .gg-v20-friend-button,
  .gg-v20-friend-toolbar button { transition: none !important; }
}
