/* Account utilities stay secondary to the workspace content. */
.submission-page:has(.creator-card.is-authenticated) .nav [data-header-account] {
  min-height: 44px;
  max-width: clamp(64px, 20vw, 180px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 12px;
  display: block;
  line-height: 44px;
  align-items: center;
  border-radius: 10px;
  color: var(--submit-ink, #1d1d1f);
  background: #edf0f4;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

.creator-card.is-authenticated {
  padding: 24px;
  border-radius: 24px;
}

.creator-card.is-authenticated .creator-center {
  gap: 16px;
}

.creator-card.is-authenticated .creator-head {
  min-width: 0;
  margin: 0;
  padding: 0 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--submit-line, rgba(23, 24, 26, .1));
}

.creator-profile,
.creator-profile .creator-identity-row {
  min-width: 0;
}

.creator-profile .creator-identity-row {
  gap: 6px;
}

.creator-profile .creator-identity-row h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--submit-ink, #1d1d1f);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-profile .creator-name-edit {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
}

.creator-profile .creator-public-id {
  margin-top: 2px;
  color: #626973;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.creator-account-tools .creator-head-actions {
  gap: 4px;
  align-self: center;
}

.creator-account-tools .creator-alert-button,
.creator-account-tools .creator-quiet {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  color: #535b66;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: none;
}

.creator-account-tools .creator-alert-button {
  width: 44px;
  padding: 0;
}

.creator-account-tools .creator-head-actions > button svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.creator-account-tools .creator-head-actions > button:hover,
.creator-profile .creator-name-edit:hover {
  color: var(--submit-ink, #1d1d1f);
  background: #edf0f4;
}

.creator-account-tools .creator-head-actions > button:active {
  transform: none;
  background: #e3e8ee;
}

.creator-account-tools .creator-head-actions > button:focus-visible,
.creator-profile .creator-name-edit:focus-visible,
.submission-page .nav [data-header-account]:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 3px;
}

.creator-account-tools .creator-head-actions > button:disabled {
  cursor: wait;
  opacity: .55;
}

.creator-alert-button #creatorAlertBadge {
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.creator-alert-button #creatorAlertBadge[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .creator-card.is-authenticated {
    padding: 16px;
    border-radius: 20px;
  }

  .creator-card.is-authenticated .creator-head {
    gap: 8px;
    padding-bottom: 12px;
  }

  .creator-profile .creator-identity-row h2 {
    font-size: 20px;
  }

  .creator-account-tools .creator-quiet {
    width: 44px;
    padding: 0;
  }

  .creator-account-tools .creator-quiet span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .creator-card.is-authenticated {
    padding: 12px;
  }
}

/* One account control group in the global navigation; no content-layer hit areas. */
.creator-account-tools {
  justify-self: end;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.creator-account-tools #creatorSessionActions[hidden] { display: none !important; }
.creator-account-tools .creator-head-actions { position: static; }
.creator-account-tools > [data-header-account] { min-width: 0; }
.submission-page { --creator-nav-height: 64px; }
.submission-page .nav { column-gap: 12px; }
.creator-alert-panel[popover] {
  inset: auto;
  left: auto;
  margin: 0;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-width: none;
  overflow: auto;
}
.creator-alert-panel[popover]::backdrop { background: transparent; }

@media (min-width: 861px) {
  .creator-card.is-authenticated .creator-center {
    grid-template-rows: auto 1fr;
    gap: 16px 20px;
  }
  .creator-card.is-authenticated .creator-head {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: 12px;
  }
  .creator-card.is-authenticated .creator-center > .creator-tabs {
    grid-column: 1;
    grid-row: 2;
  }
  .creator-card.is-authenticated .creator-center > .creator-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
}
@media (max-width: 860px) {
  .creator-center > .creator-tabs {
    top: calc(var(--creator-nav-height) + 8px + env(safe-area-inset-top));
  }
}
@media (max-width: 820px) { .submission-page { --creator-nav-height: 60px; } }
@media (max-width: 420px) {
  .submission-page .nav { padding-inline: 12px; }
  .creator-account-tools [data-header-account] { padding-inline: 8px; }
}
