@media (min-width: 681px) {
  .site-nav .site-auth {
    display: flex;
    align-items: center;
    flex: 0 0 88px;
    width: 88px;
    justify-content: flex-end;
  }

  .site-nav .login-action {
    display: inline-flex;
    width: 76px;
    min-height: 40px;
    padding: 0 22px;
    box-sizing: border-box;
  }
}

html.site-auth-cached .login-action {
  display: none !important;
}

html.site-auth-cached body.login-page .site-nav .login-action.is-current {
  display: inline-flex !important;
}

html.site-auth-cached .site-user-menu[hidden] {
  display: flex !important;
  align-items: center;
}

/* Match the final account control before the deferred app script takes over. */
html.site-auth-cached .site-user-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 1px 8px 1px 1px;
  border: 1px solid rgba(255, 194, 118, 0.42);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.98);
  box-shadow: 0 12px 24px rgba(104, 70, 30, 0.08);
}

html.site-auth-cached .site-user-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffefb, #fff5e7);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 194, 118, 0.18);
}

html.site-auth-cached .site-user-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  color: rgba(90, 51, 15, 0.72);
}

html.site-auth-cached .site-user-avatar::before {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  content: var(--site-auth-initial, "U");
  line-height: 1;
  transform: translateY(1px);
}

html.site-auth-cached[data-site-page="account"] .site-user-avatar {
  background: linear-gradient(135deg, #ffb347, #ff9830);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

html.site-auth-cached[data-site-page="account"] .site-user-avatar::before {
  color: #fff8ef;
}

@media (max-width: 680px) {
  html.site-auth-cached .site-user-bar {
    min-height: 36px;
    gap: 6px;
    padding-right: 6px;
  }

  html.site-auth-cached .site-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  html.site-auth-cached .site-user-logout-icon {
    width: 28px;
    height: 28px;
  }
}

html.site-sections-pending .site-nav .nav-item[href="./software.html"],
html.site-sections-pending .site-nav .nav-item[href="./wallpapers.html"],
html.site-sections-pending .site-nav .nav-item[href="./products.html"],
html.site-sections-pending .site-nav .nav-item[href="./suggestions.html"] {
  visibility: hidden !important;
  pointer-events: none !important;
}
