.friend-table {
  width: min(520px, calc(100% - 28px));
  max-height: min(90dvh, 820px);
  overflow: auto;
  padding: 22px;
  color: inherit;
  background: #172729;
  border: 1px solid #2d4443;
  border-radius: 16px;
  box-shadow: 0 24px 80px #000a;
}
.friend-table--cubicles { width: min(920px, calc(100% - 28px)); max-height: min(92dvh, 900px); }
.friend-table::backdrop { background: #071214dc; backdrop-filter: blur(4px); }
.friend-table h2 { margin: 0 0 14px; font-size: 24px; }
.friend-table button, .friend-table input, .friend-table select { font: inherit; }
.friend-table .ft-code-form { display: grid; gap: 7px; margin: 0 0 12px; color: #afc3bd; font-size: 13px; }
.friend-table .ft-code-form[hidden] { display: none; }
.friend-table .ft-code-row { display: flex; gap: 8px; }
.friend-table .ft-code-row input { width: min(100%, 280px); min-height: 42px; padding: 8px 11px; color: #edf6ed; background: #101e20; border: 1px solid #2d4443; border-radius: 7px; letter-spacing: .16em; text-transform: uppercase; }
.friend-table .ft-code-row button { min-height: 42px; padding: 7px 14px; color: #b7efd5; background: #1b302f; border: 1px solid #2d4443; border-radius: 7px; font-weight: 700; cursor: pointer; }
.friend-table .ft-code-row input:focus-visible, .friend-table .ft-code-row button:focus-visible { outline: 2px solid #f0d391; outline-offset: 2px; }
.friend-table .ft-profile { padding: 12px; border: 1px solid #2d4443; border-radius: 10px; }
.friend-table .ft-profile[hidden] { display: none; }
.friend-table .ft-name, .friend-table .ft-invite-label { display: grid; gap: 5px; margin-bottom: 10px; color: #afc3bd; font-size: 13px; }
.friend-table .ft-name input, .friend-table .ft-link {
  width: 100%; min-width: 0; padding: 8px; color: #edf6ed; background: #101e20;
  border: 1px solid #2d4443; border-radius: 7px;
}
.friend-table .ft-label { margin: 9px 0 5px; color: #afc3bd; font-size: 12px; }
.friend-table .ft-avatars, .friend-table .ft-colors, .friend-table .ft-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.friend-table .ft-avatar, .friend-table .ft-swatch, .friend-table .ft-actions button,
.friend-table .ft-start, .friend-table .ft-add-bot, .friend-table .ft-kick, .friend-table .ft-connect {
  min-height: 34px; padding: 5px 9px; color: #b7efd5; background: #1b302f;
  border: 1px solid #2d4443; border-radius: 7px; cursor: pointer;
}
.friend-table .ft-avatar { font-size: 21px; }
.friend-table .ft-avatar[aria-pressed="true"], .friend-table .ft-swatch[aria-pressed="true"] {
  outline: 2px solid #f0d391; outline-offset: 1px;
}
.friend-table .ft-swatch { width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%; background: var(--swatch); }
.friend-table button:disabled { opacity: .32; cursor: not-allowed; }
.friend-table .ft-invite-label { margin: 12px 0 5px; }
.friend-table .ft-actions { margin: 4px 0 8px; }
.friend-table .ft-message { min-height: 1.4em; margin: 8px 0; color: #afc3bd; font-size: 13px; }
.friend-table .ft-roster { display: grid; gap: 5px; list-style: none; margin: 0 0 10px; padding: 0; }
.friend-table .ft-player { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 7px 8px; border-radius: 7px; background: #101e20; }
.friend-table .ft-player-identity { display: flex; align-items: center; gap: 7px; min-width: 0; }
.friend-table .ft-player-identity > span:last-child { overflow-wrap: anywhere; }
.friend-table .ft-player-avatar { font-size: 19px; }
.friend-table .ft-chip { width: 13px; height: 13px; flex: none; border-radius: 50%; background: var(--swatch); }
.friend-table .ft-away { color: #afc3bd; font-size: 12px; }
.friend-table .ft-kick { min-height: 28px; padding: 3px 8px; color: #ffd0c6; border-color: #75544d; background: #3a2928; }
.friend-table .ft-host-music, .friend-table .ft-bot-controls, .friend-table .ft-game-length { display: block; margin: 8px 0; color: #afc3bd; font-size: 13px; }
.friend-table .ft-rules { margin-top: 12px; padding: 11px; border: 1px solid #2d4443; border-radius: 10px; background: #101e20; color: #afc3bd; }
.friend-table .ft-rules summary { color: #b7efd5; font-weight: 700; }
.friend-table .ft-rule-examples { display: grid; gap: 12px; margin-top: 12px; }
.friend-table .ft-rule-examples figure { margin: 0; overflow: hidden; border: 1px solid #2d4443; border-radius: 8px; background: #0d191b; }
.friend-table .ft-rule-examples a { display: block; }
.friend-table .ft-rule-examples img { display: block; width: 100%; height: auto; }
.friend-table .ft-rule-examples figcaption { padding: 7px 9px; font-size: 13px; line-height: 1.45; }
.friend-table .ft-start, .friend-table .ft-add-bot { margin-top: 8px; font-weight: 700; }
.friend-table .ft-connect { margin-top: 12px; font-weight: 700; }
.friend-table-manage {
  position: fixed; z-index: 20; right: 14px; top: 14px; padding: 9px 13px;
  color: #edf6ed; background: #172729ed; border: 1px solid #8ac8b2;
  border-radius: 9px; font: 700 13px/1.2 system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 3px 15px #0008;
}
.friend-table-manage[hidden] { display: none; }
@media (max-width: 480px) {
  .friend-table { padding: 15px; }
  .friend-table-manage { top: auto; bottom: 12px; right: 12px; }
}
