.lobby-hero-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lobby-account {
  min-width: 0;
  min-height: 48px;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(80, 200, 255, 0.48);
  border-radius: 6px;
  background: rgba(2, 12, 22, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 0 18px rgba(80, 200, 255, 0.1);
}

.lobby-account-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(106, 224, 255, 0.68);
  border-radius: 50%;
  color: #bdefff;
  background: #071925;
  font-size: 1rem;
  font-weight: 900;
}

.lobby-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-player-avatar-fallback],
img[data-player-avatar-image] {
  grid-area: 1 / 1;
}

img[data-player-avatar-image] {
  z-index: 1;
}

img[data-player-avatar-image][hidden],
.has-avatar-fallback > img[data-player-avatar-image] {
  display: none;
}

.lobby-account-copy {
  min-width: 86px;
  display: grid;
  text-align: left;
}

.lobby-account-copy small {
  color: #7492a5;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.lobby-account-copy strong {
  max-width: 190px;
  overflow: hidden;
  color: #e9faff;
  font-size: 0.9rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-account-actions,
.lobby-account-providers,
.lobby-account-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lobby-account-tools {
  padding-left: 6px;
  border-left: 1px solid rgba(116, 170, 196, 0.24);
}

.lobby-account-button.is-tool {
  min-height: 30px;
  padding-inline: 7px;
  color: #9ddff5;
  background: rgba(5, 25, 38, 0.88);
}

.lobby-account-provider {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  background: #111820;
  font-size: 0.68rem;
  font-weight: 900;
}

.lobby-account-provider.is-yandex {
  color: #ff4b4b;
  background: #070707;
}

.lobby-account-provider.is-vk {
  border-color: rgba(98, 171, 255, 0.58);
  background: #087bea;
}

.lobby-account-button {
  min-height: 34px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(139, 179, 200, 0.42);
  border-radius: 4px;
  color: #eaf9ff;
  background: #101923;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.lobby-account-button.is-yandex {
  border-color: rgba(255, 82, 82, 0.58);
  color: #fff;
  background: #111;
}

.lobby-account-button.is-yandex > span:first-child {
  color: #ff4b4b;
}

.lobby-account-button.is-vk {
  border-color: rgba(116, 188, 255, 0.72);
  background: #0868c5;
}

.lobby-account-button.is-logout {
  color: #b7c8d2;
  background: #071019;
}

.lobby-account-button:hover:not(:disabled),
.lobby-account-button:focus-visible:not(:disabled) {
  color: #fff;
  border-color: #d8f7ff;
  box-shadow: 0 0 14px rgba(80, 200, 255, 0.24);
}

.lobby-account-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.account-field,
.builder-save-field {
  width: 100%;
}

.account-field input,
.builder-save-field input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(93, 207, 242, 0.56);
  border-radius: 4px;
  color: #f4fbff;
  background: rgba(3, 15, 25, 0.94);
  font: inherit;
}

.account-actions-row {
  margin: 12px 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.account-avatar-editor {
  margin-bottom: 18px;
  padding: 12px 0 16px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(86, 161, 190, 0.34);
}

.account-avatar-preview {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(106, 224, 255, 0.72);
  border-radius: 50%;
  color: #dff8ff;
  background: #071925;
  font-size: 1.4rem;
  font-weight: 900;
}

.account-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-avatar-copy small {
  color: #78a7bc;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-avatar-copy strong {
  color: #eafaff;
}

.account-avatar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.account-avatar-actions .ghost-button,
.account-avatar-upload {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}

.account-avatar-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.account-list {
  display: grid;
  gap: 7px;
}

.account-row {
  min-height: 54px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(92, 169, 199, 0.34);
  border-radius: 4px;
  background: rgba(3, 17, 28, 0.86);
}

.account-row.is-active,
.account-row.is-self {
  border-color: rgba(74, 220, 255, 0.82);
  background: rgba(8, 55, 75, 0.82);
}

.account-row.is-result-win {
  border-left-color: #65db8b;
}

.account-row.is-result-loss {
  border-left-color: #ff6f67;
}

.account-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-row strong {
  overflow-wrap: anywhere;
}

.account-row small {
  color: #8daaba;
}

.account-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.account-row .is-danger {
  color: #ff9d98;
  border-color: rgba(255, 95, 87, 0.48);
}

.account-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: #91aebb;
  text-align: center;
}

.account-rating-summary {
  margin-bottom: 10px;
  padding: 12px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 201, 86, 0.48);
  border-radius: 4px;
  background: rgba(46, 33, 8, 0.72);
}

.account-rating-summary strong {
  color: #ffe18d;
  font-size: 1.8rem;
}

.account-rating-summary small {
  color: #c4b987;
}

.account-connections {
  margin-top: 24px;
  padding-top: 18px;
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(86, 161, 190, 0.34);
}

.account-section-heading h2 {
  font-size: 1.15rem;
}

.account-connection-list {
  display: grid;
  gap: 7px;
}

.account-connection-row {
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(91, 166, 194, 0.32);
  border-radius: 4px;
  background: rgba(3, 17, 28, 0.78);
}

.account-connection-row > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-connection-row small {
  color: #7f9daf;
}

.account-connection-status {
  color: #8cefb0;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-logout-button {
  justify-self: start;
  color: #ffaaa4;
  border-color: rgba(255, 103, 94, 0.46);
}

@media (max-width: 640px) {
  .lobby-hero-actions {
    align-items: stretch;
  }

  .lobby-account {
    width: 100%;
  }

  .lobby-account.is-authenticated {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 6px 8px;
  }

  .lobby-account.is-authenticated > .lobby-account-avatar {
    grid-column: 1;
    grid-row: 1;
  }

  .lobby-account.is-authenticated > .lobby-account-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .lobby-account.is-authenticated > .lobby-account-providers {
    grid-column: 3;
    grid-row: 1;
  }

  .lobby-account.is-authenticated > .lobby-account-actions {
    display: none;
  }

  .lobby-account-copy {
    flex: 1 1 auto;
  }

  .lobby-account-copy strong {
    max-width: min(32vw, 150px);
  }

  .lobby-account-actions {
    margin-left: auto;
  }

  .lobby-account-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 5px 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(116, 170, 196, 0.24);
    border-left: 0;
  }

  .lobby-account-tools .lobby-account-button {
    min-width: 0;
    padding-inline: 3px;
    font-size: 0.62rem;
  }

  .lobby-account-button {
    min-width: 34px;
  }

  .lobby-account-button > span:last-child {
    display: none;
  }

  .account-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .account-tabs button {
    min-height: 40px;
    padding: 6px 2px;
    font-size: 0.61rem;
  }

  .account-row {
    align-items: stretch;
    flex-direction: column;
  }

  .account-row-actions {
    justify-content: stretch;
  }

  .account-row-actions .ghost-button {
    flex: 1 1 auto;
  }

  .account-page {
    padding: max(8px, env(safe-area-inset-top)) 8px max(18px, env(safe-area-inset-bottom));
  }

  .account-page-shell {
    gap: 10px;
  }

  .account-page-header {
    min-height: 66px;
    grid-template-columns: 40px minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 6px 2px 9px;
  }

  .account-page-back {
    width: 38px;
    height: 38px;
    font-size: 1.7rem;
  }

  .account-page-avatar {
    width: 40px;
    height: 40px;
  }

  .account-page-heading span {
    font-size: 0.56rem;
  }

  .account-page-heading h1 {
    font-size: 1.35rem;
  }

  .account-content {
    min-height: 0;
  }

  .account-actions-row {
    justify-content: stretch;
  }

  .account-actions-row .primary-button {
    width: 100%;
  }

  .account-avatar-editor {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }

  .account-avatar-preview {
    width: 54px;
    height: 54px;
  }

  .account-avatar-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .account-avatar-actions .ghost-button,
  .account-avatar-upload {
    flex: 1 1 150px;
  }

  .account-connection-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .account-connection-row .lobby-account-button {
    padding-inline: 7px;
    font-size: 0.64rem;
  }
}
.rating-launch-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.rating-note {
  display: block;
  margin-top: 10px;
  line-height: 1.45;
}

.is-account-page:has(.command-matchmaking-banner) .account-page-shell {
  padding-bottom: 112px;
}
