/* BAOYING_V979_ACCEPTANCE_CLOSEOUT */
/* BAOYING_V9792_PLAYER_BRAND_BALANCE */
.by-chat-tools[data-v979-ready="1"] {
  display: block;
  min-height: 0;
  overflow: visible;
}

.by-chat-tool-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.by-chat-tool-primary > button,
.by-chat-tool-more > summary,
.by-chat-tool-more-body > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(151, 174, 205, .18);
  border-radius: 6px;
  padding: 0 9px;
  background: linear-gradient(180deg, rgba(27, 42, 65, .98), rgba(15, 26, 43, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 4px 12px rgba(0, 0, 0, .12);
  color: #c5d0df;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.by-chat-tool-primary > button:hover,
.by-chat-tool-more > summary:hover,
.by-chat-tool-more-body > button:hover {
  border-color: rgba(232, 197, 106, .48);
  background: linear-gradient(180deg, rgba(34, 52, 79, 1), rgba(20, 33, 53, 1));
  color: #fff;
  transform: translateY(-1px);
}

.by-chat-tool-primary > button:focus-visible,
.by-chat-tool-more > summary:focus-visible,
.by-chat-tool-more-body > button:focus-visible,
.by-persona-random input:focus-visible + span,
.by-persona-recent-chip:focus-visible,
.by-real-presence:focus-visible,
.by-presence-head button:focus-visible {
  outline: 2px solid #e8c56a;
  outline-offset: 2px;
}

.by-tool-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  place-items: center;
  color: #9fb7d7;
}

.by-tool-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-tool-kind="emoji"] { background: linear-gradient(180deg, rgba(34, 49, 69, .98), rgba(18, 29, 46, .98)) !important; }
[data-tool-kind="quick"] { background: linear-gradient(180deg, rgba(28, 51, 76, .98), rgba(16, 32, 51, .98)) !important; }
[data-tool-kind="color"] { background: linear-gradient(180deg, rgba(52, 42, 73, .98), rgba(28, 24, 46, .98)) !important; }
[data-tool-kind="image"], [data-tool-kind="capture"] { background: linear-gradient(180deg, rgba(28, 53, 58, .98), rgba(16, 32, 38, .98)) !important; }
[data-tool-kind="color"] .by-tool-icon { color: #d9b7ff; }
[data-tool-kind="quick"] .by-tool-icon { color: #89c9ff; }
[data-tool-kind="image"] .by-tool-icon,
[data-tool-kind="capture"] .by-tool-icon { color: #79d5bc; }

.by-chat-tool-more {
  position: relative;
  flex: 0 0 auto;
}

.by-chat-tool-more > summary { list-style: none; }
.by-chat-tool-more > summary::-webkit-details-marker { display: none; }
.by-chat-tool-more[open] > summary { border-color: rgba(232, 197, 106, .48); color: #fff; }

.by-chat-tool-more-body {
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  z-index: 30;
  display: grid;
  min-width: 126px;
  gap: 6px;
  border: 1px solid rgba(232, 197, 106, .22);
  border-radius: 8px;
  padding: 7px;
  background: #0d1727;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
}

.by-chat-tool-more-body > button { justify-content: flex-start; width: 100%; }

.by-persona-console {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  border: 1px solid rgba(232, 197, 106, .16);
  border-radius: 8px;
  padding: 7px 8px;
  background: linear-gradient(135deg, rgba(22, 31, 47, .96), rgba(11, 19, 32, .96));
  box-shadow: inset 3px 0 #d8b35a;
}

.by-persona-console-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.by-persona-console .by-persona-switch,
.by-persona-console .by-persona-select {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 0;
  background: transparent;
}

.by-persona-console .by-persona-switch > span:first-child,
.by-persona-console .by-persona-select > span:first-child {
  color: #e8c56a;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.by-persona-console .by-persona-switch select,
.by-persona-console .by-persona-select select {
  flex: 0 1 180px;
  width: 180px;
  max-width: 180px;
  height: 34px;
  border-color: rgba(232, 197, 106, .32);
  border-radius: 6px;
  background-color: #111d2e;
  color: #fff;
  font-size: 12px;
}

.by-persona-console .by-persona-current {
  max-width: 180px;
  color: #8fa0b7;
  font-size: 10px;
}

.by-persona-random {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: #d6deea;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.by-persona-random input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.by-persona-random > span {
  position: relative;
  width: 28px;
  height: 16px;
  border: 1px solid #405069;
  border-radius: 999px;
  background: #111a29;
  transition: background .18s ease, border-color .18s ease;
}

.by-persona-random > span::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8290a5;
  content: "";
  transition: transform .18s ease, background .18s ease;
}

.by-persona-random input:checked + span {
  border-color: rgba(66, 211, 146, .62);
  background: rgba(66, 211, 146, .18);
}

.by-persona-random input:checked + span::after {
  background: #42d392;
  transform: translateX(12px);
}

.by-persona-recent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.by-persona-recent > b {
  color: #8190a6;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.by-persona-recent > div {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.by-persona-recent-chip {
  flex: 0 0 auto;
  min-height: 26px;
  border: 1px solid rgba(123, 151, 188, .22);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(21, 35, 56, .9);
  color: #bac7d8;
  font-size: 10px;
  cursor: pointer;
}

.by-persona-recent-chip:hover { border-color: rgba(232, 197, 106, .42); color: #fff; }
.by-persona-recent-empty { color: #64738a; font-size: 10px; }

.by-player-brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
}

.by-player-brand-lockup .by-brand-mark {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.by-player-brand-lockup strong,
.by-player-brand-lockup small { display: block; text-align: left; }
.by-player-brand-lockup strong { color: #fff; font-size: 15px; letter-spacing: .04em; }
.by-player-brand-lockup small { margin-top: 2px; color: #d8b35a; font-size: 8px; font-weight: 800; letter-spacing: .16em; }

.by-real-presence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(66, 211, 146, .22);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(66, 211, 146, .07);
  color: #9fb0c5;
  font-size: 10px;
  cursor: pointer;
}

.by-real-presence b { color: #7be2b7; font-size: 11px; font-variant-numeric: tabular-nums; }

.by-presence-popover {
  position: fixed;
  top: 62px;
  right: 18px;
  z-index: 1000;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 84px));
  border: 1px solid rgba(232, 197, 106, .2);
  border-radius: 10px;
  padding: 12px;
  background: #0d1727;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .48);
  color: #fff;
}

.by-presence-popover[hidden] { display: none; }
.by-presence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.by-presence-head b, .by-presence-head span { display: block; }
.by-presence-head b { font-size: 14px; }
.by-presence-head span { margin-top: 4px; color: #8fa0b7; font-size: 10px; }
.by-presence-head button { width: 32px; height: 32px; border: 0; border-radius: 6px; background: #162339; color: #bac7d8; font-size: 20px; cursor: pointer; }
.by-presence-list { display: grid; gap: 5px; max-height: 340px; margin-top: 10px; overflow-y: auto; }
.by-presence-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(151,174,205,.1); border-radius: 6px; padding: 8px 9px; background: #111d2e; }
.by-presence-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.by-presence-row span { flex: 0 0 auto; color: #7f8da1; font-size: 9px; }
.by-presence-empty { padding: 20px 8px; color: #8090a6; font-size: 11px; text-align: center; }
.by-presence-popover > p { margin: 10px 0 0; color: #6f7f95; font-size: 9px; line-height: 1.5; }

@media (max-width: 767px) {
  .by-chat-tool-primary { gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .by-chat-tool-primary::-webkit-scrollbar { display: none; }
  .by-chat-tool-primary > button,
  .by-chat-tool-more > summary { flex: 0 0 auto; min-height: 44px; padding: 0 10px; font-size: 11px; }
  .by-tool-icon, .by-tool-icon svg { width: 16px; height: 16px; }
  .by-persona-console { gap: 7px; margin-top: 5px; padding: 7px; }
  .by-persona-console-main { flex-wrap: wrap; gap: 6px; }
  .by-persona-console .by-persona-switch,
  .by-persona-console .by-persona-select { flex: 1 1 210px; min-height: 44px; }
  .by-persona-console .by-persona-switch select,
  .by-persona-console .by-persona-select select { flex: 1 1 auto; width: auto; max-width: none; min-height: 40px; font-size: 16px; }
  .by-persona-console .by-persona-current { display: none; }
  .by-persona-random { min-height: 44px; }
  .by-persona-recent { grid-template-columns: 1fr; gap: 4px; }
  .by-persona-recent > b { display: none; }
  .by-persona-recent-chip { min-height: 32px; }
  .by-player-brand-lockup { margin-bottom: 3px; }
  .by-player-brand-lockup .by-brand-mark { width: 28px; height: 28px; font-size: 12px; }
  .by-player-brand-lockup strong { font-size: 12px; }
  .by-player-brand-lockup small { font-size: 7px; }
  .by-real-presence { min-width: 44px; min-height: 44px; justify-content: center; padding: 0 8px; }
  .by-real-presence span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .by-presence-popover { top: 58px; right: 12px; }
}

@media (max-width: 390px) {
  .by-tool-label { display: none; }
  .by-chat-tool-primary > button,
  .by-chat-tool-more > summary { width: 44px; padding: 0; }
  .by-chat-tool-more > summary > span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .by-chat-tool-primary > button,
  .by-chat-tool-more > summary,
  .by-persona-random > span,
  .by-persona-random > span::after { transition: none; }
}
