.pc-shared-topbar.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 18px clamp(28px, 5vw, 72px);
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  background:
    linear-gradient(180deg, rgba(18, 18, 22, 0.88) 0%, rgba(8, 8, 10, 0.72) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 44%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  backdrop-filter: blur(24px) saturate(1.12);
  color: var(--text, #f4f5f7);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
  font-weight: 400;
}

.pc-shared-topbar.topbar,
.pc-shared-topbar.topbar * {
  box-sizing: border-box;
  letter-spacing: 0;
  text-transform: none;
}

.pc-shared-topbar.topbar a,
.pc-shared-topbar.topbar button,
.pc-shared-topbar.topbar span,
.pc-shared-topbar.topbar strong,
.pc-shared-topbar.topbar small {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.1;
}

.pc-shared-topbar.topbar a,
.pc-shared-topbar.topbar button {
  appearance: none;
  -webkit-appearance: none;
}

.pc-shared-topbar .brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.pc-shared-topbar .brand strong,
.pc-shared-topbar .brand small {
  display: block;
  line-height: 1.1;
}

.pc-shared-topbar .brand strong {
  font-size: 15px;
  font-weight: 700;
}

.pc-shared-topbar .mobile-nav-icon,
.pc-shared-topbar .brand .mobile-nav-label {
  display: none;
}

.pc-shared-topbar .top-nav {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-shared-topbar .top-nav a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text, #f4f5f7);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.pc-shared-topbar .top-nav .mobile-nav-label {
  display: inline;
}

.pc-shared-topbar .top-nav a .mobile-nav-label {
  font-weight: 800;
}

.pc-shared-topbar .top-nav a.mobile-only-nav {
  display: none;
}

.pc-shared-topbar .top-nav a.pc-search-nav {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
}

.pc-shared-topbar .top-nav a.pc-search-nav .mobile-nav-icon {
  display: block;
  width: 17px;
  height: 17px;
}

.pc-shared-topbar .account-area {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  justify-self: end;
}

.pc-shared-topbar .profile-button,
.pc-shared-topbar .profile-button * {
  font-synthesis: none;
}

.pc-shared-topbar .profile-button {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 13px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text, #f4f5f7);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.pc-shared-topbar .account-name {
  font-size: 12px;
  font-weight: 800;
}

.pc-shared-topbar .profile-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted, #a1a1aa);
}

.pc-shared-topbar .icon {
  width: 18px;
  height: 18px;
}

@media (min-width: 701px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 18px clamp(28px, 5vw, 72px);
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.11));
    background:
      linear-gradient(180deg, rgba(18, 18, 22, 0.88) 0%, rgba(8, 8, 10, 0.72) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 44%, rgba(255, 255, 255, 0.04) 100%);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
    -webkit-backdrop-filter: blur(24px) saturate(1.12);
    backdrop-filter: blur(24px) saturate(1.12);
    color: var(--text, #f4f5f7);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
    font-synthesis: none;
    font-weight: 400;
  }

  .topbar,
  .topbar * {
    box-sizing: border-box;
    letter-spacing: 0;
    text-transform: none;
  }

  .topbar a,
  .topbar button,
  .topbar span,
  .topbar strong,
  .topbar small {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
    font-synthesis: none;
    line-height: 1.1;
  }

  .topbar a,
  .topbar button {
    appearance: none;
    -webkit-appearance: none;
  }

  .topbar .brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
  }

  .topbar .brand strong,
  .topbar .brand small {
    display: block;
    line-height: 1.1;
  }

  .topbar .brand strong {
    font-size: 15px;
    font-weight: 700;
  }

  .topbar .mobile-nav-icon,
  .topbar .brand .mobile-nav-label {
    display: none;
  }

  .topbar .top-nav {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .topbar .top-nav a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text, #f4f5f7);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  .topbar .top-nav .mobile-nav-label {
    display: inline;
  }

  .topbar .top-nav a .mobile-nav-label {
    font-weight: 800;
  }

  .topbar .top-nav a.mobile-only-nav {
    display: none;
  }

  .topbar .top-nav a.pc-search-nav {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 0;
  }

  .topbar .top-nav a.pc-search-nav .mobile-nav-icon {
    display: block;
    width: 17px;
    height: 17px;
  }

  .topbar .account-area {
    grid-column: 3;
    grid-row: 1;
    position: relative;
    justify-self: end;
  }

  .topbar .profile-button,
  .topbar .profile-button * {
    font-synthesis: none;
  }

  .topbar .profile-button {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text, #f4f5f7);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
  }

  .topbar .account-name {
    display: none;
  }

  .topbar .profile-avatar {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted, #a1a1aa);
  }

  .topbar .icon {
    width: 18px;
    height: 18px;
  }
}

.mobile-bottom-nav {
  display: none;
}

.page-back {
  display: none;
  min-height: 36px;
  align-items: center;
  margin: 0 0 24px;
  color: #7c92ff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
}

.game-topbar,
.ranking-topbar {
  display: none;
}

@media (max-width: 700px) {
  .pc-shared-topbar.topbar {
    display: none;
  }

  .game-topbar,
  .ranking-topbar {
    display: block;
  }

  .page-back {
    display: inline-flex;
    min-height: 36px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 800;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 76px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: rgba(9, 10, 13, 0.92);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: blur(22px) saturate(1.16);
    backdrop-filter: blur(22px) saturate(1.16);
  }

  .mobile-bottom-link {
    display: flex;
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 3px;
    border: 0;
    background: transparent;
    color: rgba(244, 245, 247, 0.48);
    text-align: center;
    text-decoration: none;
  }

  .mobile-bottom-link.is-active,
  .mobile-bottom-link[aria-current="page"] {
    color: #fff;
  }

  .mobile-bottom-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
  }

  .mobile-bottom-label {
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.mobile-account-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.mobile-account-backdrop.is-open {
  display: grid;
}

.mobile-account-dialog {
  width: min(480px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(18, 18, 21, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  color: #f4f5f7;
}

.mobile-account-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.mobile-account-head h2 {
  margin: 0;
  font-size: 28px;
}

.mobile-account-head p,
.mobile-account-status {
  margin: 8px 0 0;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.5;
}

.mobile-account-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4f5f7;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.mobile-account-form,
.mobile-account-profile {
  display: grid;
  gap: 14px;
}

.mobile-account-form .field {
  display: grid;
  gap: 7px;
}

.mobile-account-form .field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4f5f7;
  font: inherit;
}

.mobile-account-form .checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.mobile-account-form .checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.mobile-account-form .checkbox-field span {
  flex: 1;
}

.mobile-account-form .login-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.mobile-account-primary {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-account-primary {
  background: #e8e8ea;
  color: #08080a;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #a1a1aa;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.11);
}

.login-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #f4f5f7;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}

.login-social:hover {
  background: rgba(255, 255, 255, 0.08);
}

.login-social svg {
  flex: 0 0 auto;
}

.mobile-account-toggle {
  margin: 18px 0 0;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.5;
}

.mobile-account-toggle button {
  border: 0;
  background: transparent;
  color: #f4f5f7;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.mobile-account-profile .profile-menu-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-account-profile .profile-stat {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.mobile-account-profile .profile-stat strong,
.mobile-account-profile .profile-stat span {
  display: block;
}

.mobile-account-profile .profile-stat strong {
  color: #f4f5f7;
  font-size: 15px;
}

.mobile-account-profile .profile-stat span {
  margin-top: 3px;
  color: #70717a;
  font-size: 11px;
}

.mobile-account-profile .profile-menu-actions {
  display: grid;
  gap: 8px;
}

.mobile-account-profile .profile-menu-action {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #f4f5f7;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mobile-account-profile .profile-menu-action.is-danger {
  background: rgba(255, 112, 112, 0.16);
  color: #ffb6b6;
}
