@layer components {
  .app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(12px);
  }

  .app-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: min(100% - 2rem, var(--content-max-width));
    min-height: 4rem;
    margin-inline: auto;
  }

  .app-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.65rem;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 750;
    text-decoration: none;
  }

  .app-brand:hover {
    text-decoration: none;
  }

  .app-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    color: #111827;
    background: #fde68a;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    --icon-size: 1.35rem;
  }

  .app-brand__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-header .blitz-staging-badge {
    flex: 0 0 auto;
  }

  .app-user-dropdown {
    --dropdown-menu-left: auto;
    --dropdown-menu-right: 0;
    --dropdown-menu-top: calc(100% + 0.5rem);
    --dropdown-menu-max-height: min(28rem, calc(100vh - 6rem));
    margin-left: auto;
  }

  .app-user-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: #111827;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    --icon-size: 2.35rem;
  }

  .app-user-menu-button:hover,
  .app-user-menu-button:focus-visible {
    background: #f3f4f6;
    outline: none;
  }

  .app-user-dropdown .dropdown-menu {
    min-width: 17rem;
    padding-block: 0.35rem;
    border-color: #d1d5db;
    border-radius: 8px;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.16);
  }

  .app-user-dropdown .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    color: #111827;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    --icon-size: 1.35rem;
  }

  .app-main {
    width: min(100% - 2rem, var(--content-max-width));
    margin-inline: auto;
    padding-block: 5.5rem 2rem;
  }

  @media (max-width: 640px) {
    .app-header__inner,
    .app-main {
      width: min(100% - 1rem, var(--content-max-width));
    }

    .app-brand__name {
      max-width: calc(100vw - 7rem);
    }

    .app-user-dropdown .dropdown-menu {
      min-width: min(17rem, calc(100vw - 1rem));
    }
  }
}
