:root {
  --host-topbar-height: 58px;
}

.host-topbar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  height: var(--host-topbar-height);
  padding: 8px 10px 8px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f6f7f8;
  background: #0a0b0d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  font-family: Bahnschrift, "Microsoft YaHei", "PingFang SC", sans-serif;
}

.host-topbar-logo {
  display: block;
  width: 142px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: left center;
}

.host-topbar-spacer { flex: 1; }

.host-player-summary,
.host-room-code,
.host-topbar-button,
.host-icon-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  background: #202227;
}

.host-player-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.host-player-avatars {
  display: flex;
  align-items: center;
  min-width: 30px;
  max-width: 128px;
  overflow: hidden;
  padding: 0;
}

.host-player-avatars:empty::before {
  content: "";
  display: block;
  width: 29px;
  height: 29px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 9px;
}

.host-player-avatars > img,
.host-player-avatars .player-chip {
  position: relative;
  display: grid;
  flex: 0 0 29px;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-right: -7px;
  padding: 0;
  overflow: visible;
  border: 2px solid #202227;
  border-radius: 9px;
  background: #7ed6d6;
  box-shadow: none;
  filter: none;
  opacity: 1;
  transform: none;
}

.host-player-avatars > img:last-child,
.host-player-avatars .player-chip:last-child { margin-right: 0; }

.host-player-avatars .player-chip img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.host-player-avatars .player-chip em {
  top: -5px;
  right: -4px;
  z-index: 2;
  padding: 1px 3px;
  border-radius: 4px;
  font-size: 7px;
}

.host-player-avatars .player-chip::after {
  right: -3px;
  bottom: -3px;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 1px solid #202227;
  color: #263033;
  background: #7ed6d6;
  font-size: 7px;
  box-shadow: none;
}

.host-topbar-button,
.host-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 100ms ease;
}

.host-topbar-button {
  gap: 7px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
}

.host-topbar-button i {
  color: #7ed6d6;
  font-size: 19px;
}

.host-return-lobby i { color: #ffb26b; }

.host-return-lobby:hover {
  border-color: rgba(255, 178, 107, 0.58);
  background: #2d2926;
}

.host-return-lobby:focus-visible {
  outline-color: #ffb26b;
}

.host-return-lobby:disabled {
  cursor: wait;
  opacity: 0.58;
}

.host-topbar-button:hover,
.host-icon-button:hover,
.host-topbar-button[aria-pressed="true"],
.host-topbar-button[aria-expanded="true"] {
  border-color: rgba(126, 214, 214, 0.55);
  background: #292c31;
}

.host-topbar-button[aria-pressed="true"] {
  box-shadow: inset 0 -2px 0 #7ed6d6;
}

.host-topbar-button:active,
.host-icon-button:active { transform: scale(0.96); }

.host-topbar-button:focus-visible,
.host-icon-button:focus-visible {
  outline: 3px solid #7ed6d6;
  outline-offset: 2px;
}

.host-room-code {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-variant-numeric: tabular-nums;
}

.host-room-code i {
  color: #ffb26b;
  font-size: 18px;
}

.host-room-code strong {
  font: 800 16px/1 Bahnschrift, Consolas, monospace;
  letter-spacing: 0.09em;
}

.host-icon-button {
  width: 40px;
  padding: 0;
  flex: 0 0 40px;
  font-size: 21px;
}

@media (max-width: 1180px) {
  .host-player-avatars { max-width: 92px; }
}

@media (max-width: 820px) {
  .host-player-summary span { display: none; }
  .host-player-summary { padding-right: 7px; }
  .host-topbar-logo { width: 120px; }
}

@media (max-width: 720px) {
  :root {
    --host-topbar-height: 52px;
    --game-topbar-height: 52px;
  }

  .host-topbar { gap: 6px; padding: 6px 7px; }
  .host-topbar-logo { width: 104px; height: 34px; }
  .host-player-summary { display: none; }
  .host-topbar-button { padding: 0 10px; }
  .host-topbar-button span { display: none; }
  .host-room-code { padding: 0 8px; }
  .host-room-code strong { font-size: 13px; }
}
