.profile-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  margin: 0;
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

.profile-main {
  min-width: 0;
  padding: 28px clamp(22px, 4vw, 56px) 56px;
}

.profile-privacy {
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .58);
  font-size: .74rem;
  line-height: 1.6;
  margin-top: auto;
  padding-top: 20px;
}

.profile-topbar,
.personal-card,
.traveler-profile-list,
.traveler-profile-editor {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(12, 38, 56, .05);
  padding: 24px;
}

.profile-topbar {
  background:
    linear-gradient(90deg, rgba(248, 245, 238, .98), rgba(248, 245, 238, .72)),
    url("../assets/suggestions/destination.webp") center / cover;
  min-height: 180px;
  padding: 38px;
}

.profile-topbar h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
  letter-spacing: -.04em;
}

.profile-topbar,
.personal-card,
.profile-section-heading,
.profile-form-actions,
.traveler-profile-card,
.profile-card-actions {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.profile-topbar p,
.personal-card h2 {
  margin-bottom: 0;
}

.personal-card {
  margin-top: 16px;
}

.personal-card {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-800));
  color: #fff;
}

.personal-card .eyebrow,
.personal-card dt {
  color: var(--gold-soft);
}

.personal-card dl {
  display: flex;
  gap: 28px;
  margin: 0;
}

.personal-card dt {
  color: #6b7975;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.personal-card dd {
  margin: 4px 0 0;
}

.profile-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, .68fr) minmax(0, 1.5fr);
  margin-top: 16px;
}

.traveler-profile-list > div:last-child {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.traveler-profile-card {
  background:
    linear-gradient(90deg, rgba(255, 253, 248, .97), rgba(255, 253, 248, .84)),
    url("../assets/suggestions/stay.webp") center / cover;
  border: 1px solid var(--line);
  border-radius: 15px;
  min-height: 124px;
  padding: 18px;
}

.traveler-profile-card.is-active {
  background:
    linear-gradient(90deg, rgba(8, 37, 65, .96), rgba(8, 37, 65, .76)),
    url("../assets/suggestions/stay.webp") center / cover;
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 12px 28px rgba(7, 26, 46, .18);
}

.traveler-profile-card span {
  color: #1f6170;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.traveler-profile-card h3,
.traveler-profile-card p {
  margin: 4px 0 0;
}

.traveler-profile-card p {
  color: #65736f;
  font-size: .85rem;
}

.traveler-profile-card.is-active p {
  color: rgba(255, 255, 255, .72);
}

.traveler-profile-card.is-active span {
  color: var(--gold-soft);
}

.profile-card-actions {
  flex-shrink: 0;
}

.profile-card-actions button {
  min-height: 38px;
  padding: 7px 10px;
}

.profile-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.traveler-profile-editor h2 {
  font-size: 2rem;
}

.traveler-profile-editor label {
  color: #344858;
  font-size: .82rem;
  font-weight: 700;
}

.traveler-profile-editor label {
  display: grid;
  gap: 6px;
}

.traveler-profile-editor input,
.traveler-profile-editor select,
.traveler-profile-editor textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  min-height: 46px;
  padding: 11px 12px;
}

.traveler-profile-editor .check-label {
  align-items: center;
  display: flex;
  margin-top: 24px;
}

.traveler-profile-editor .check-label input {
  margin: 0;
}

.profile-form-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

@media (max-width: 850px) {
  .profile-shell {
    display: block;
  }

  .profile-sidebar {
    align-items: center;
    flex-direction: row;
    min-height: auto;
    padding: 14px 18px;
  }

  .profile-sidebar nav {
    display: flex;
    margin: 0 0 0 auto;
  }

  .profile-privacy {
    display: none;
  }

  .profile-main {
    padding: 16px;
  }

  .profile-layout,
  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-topbar,
  .personal-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .personal-card dl {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .profile-sidebar nav a {
    font-size: 0;
  }

  .profile-sidebar nav a span {
    font-size: 1rem;
  }

  .profile-topbar {
    min-height: 160px;
    padding: 24px;
  }

  .profile-topbar h1 {
    font-size: 2.6rem;
  }

  .profile-section-heading,
  .traveler-profile-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
