.messages-stack {
  margin-bottom: 18px;
}

.site-message {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  margin-bottom: 10px;
}

.account-shell {
  display: flex;
  justify-content: center;
}

.account-card,
.profile-card {
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.account-eyebrow {
  margin: 0 0 10px;
  color: rgba(255,239,197,0.82);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
}

.account-card h1,
.profile-card h1,
.profile-card h2,
.profile-card h3 {
  margin-top: 0;
}

.account-subtitle {
  color: var(--muted);
  line-height: 1.6;
}

.site-form {
  margin-top: 22px;
}

.account-card .btn:focus-visible,
.profile-card--editor button.btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.32);
  color: var(--text);
  padding: 12px 14px;
}

.form-row textarea {
  min-height: 128px;
  resize: vertical;
}

.form-row input[type="file"] {
  padding: 10px;
}

.form-row small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.form-row ul.errorlist {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #ffb5b5;
}

.account-alt-link {
  margin-top: 18px;
  color: var(--muted);
}

.profile-page-shell {
  display: grid;
  gap: 22px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
}

.profile-layout--polished {
  align-items: start;
}

.profile-public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
}

.profile-card--summary {
  align-self: start;
}

.profile-card--stacked,
.profile-card--editor,
.profile-card--public-main,
.profile-card--public-side {
  min-height: 100%;
}

.profile-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 28px;
  min-height: 270px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: 0 20px 60px rgba(0,0,0,.34);
}

.profile-hero-card__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 280px at 15% 20%, rgba(214,176,111,.16), transparent 60%),
    radial-gradient(640px 280px at 85% 30%, rgba(255,255,255,.08), transparent 62%),
    linear-gradient(180deg, rgba(12,13,16,.92), rgba(7,8,11,.88));
}

.profile-hero-card__content {
  position: relative;
  z-index: 1;
  min-height: inherit;
  padding: 30px;
}

.profile-hero-card__identity {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-hero-card__copy h1 {
  margin-bottom: 12px;
  font-family: "Playfair Display", serif;
  font-size: clamp(44px, 7vw, 76px);
  line-height: .98;
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #f8edd0 0%, #e4c98d 45%, #c89a53 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.profile-hero-card__actions {
  margin-top: 22px;
}

.profile-hero-card__content--public {
  display: grid;
  place-items: center;
  text-align: center;
}

.profile-avatar-wrap {
  margin: 20px 0;
}

.profile-avatar-wrap--hero {
  margin: 0;
}

.profile-avatar {
  width: 124px;
  height: 124px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
}

.profile-avatar--hero {
  width: 144px;
  height: 144px;
  box-shadow: 0 18px 42px rgba(0,0,0,.26);
}

.profile-avatar--placeholder {
  color: rgba(255,255,255,.88);
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.profile-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
}

.profile-section-heading {
  margin-bottom: 18px;
}

.profile-section-heading h2 {
  margin-bottom: 8px;
  font-family: "Playfair Display", serif;
  font-size: 30px;
  letter-spacing: -.02em;
}

.profile-summary-list {
  display: grid;
  gap: 12px;
}

.profile-summary-item {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}

.profile-summary-item strong {
  display: block;
  color: rgba(255,255,255,.94);
}

.profile-summary-item__label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.profile-meta p {
  margin: 0 0 10px;
  color: var(--muted);
}

.profile-copy-block {
  margin-top: 22px;
}

.profile-copy-block p,
.profile-copy-block--reading {
  color: rgba(255,255,255,.82);
  line-height: 1.75;
}

.profile-copy-block--reading {
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}

.profile-account-handle {
  margin-top: 6px;
}

.profile-hero-intro {
  max-width: 52ch;
  margin: 18px auto 0;
  color: rgba(255,255,255,.88);
  line-height: 1.75;
}

.profile-hero-intro--muted {
  color: var(--muted);
}

.profile-empty-state {
  padding: 18px 20px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
}

.site-form--polished {
  margin-top: 0;
}

.form-row--polished {
  margin-bottom: 20px;
}

.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-row--stacked {
  gap: 12px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}

.profile-chip--large {
  padding: 12px 16px;
  font-size: 15px;
  color: rgba(255,255,255,.92);
}

@media (max-width: 980px) {
  .profile-layout,
  .profile-public-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .profile-hero-card__identity {
    grid-template-columns: 1fr;
    display: grid;
    justify-items: start;
  }

  .profile-hero-card__copy h1 {
    font-size: clamp(38px, 12vw, 62px);
  }
}

@media (max-width: 640px) {
  .account-card,
  .profile-card,
  .profile-hero-card__content {
    padding: 22px;
  }

  .profile-avatar--hero {
    width: 118px;
    height: 118px;
  }

  .form-actions-row {
    flex-direction: column;
  }
}
