.profile-body {
  background-color: var(--profile-bg, #0a0a0b);
  background-image: var(--profile-bg-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.profile-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 2.4rem) clamp(1rem, 4vw, 1.6rem) 4rem;
}
.profile-loading { color: #a49e90; text-align: center; padding: 3rem 1rem; }

.profile-header {
  position: relative;
  background-color: var(--profile-box, #fff);
  background-image: var(--profile-box-image, none);
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(120, 60, 70, 0.18);
}
.profile-banner {
  height: clamp(140px, 26vw, 220px);
  background: linear-gradient(135deg, #17121a, #2a2a2e);
  background-size: cover;
  background-position: center;
}
.profile-header__body {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 0 1.4rem 1.2rem;
}
.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  margin-top: -56px;
  border: 4px solid #fff;
  background: #d98b8b center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 2rem;
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(23, 18, 26, 0.18);
}
.profile-meta { flex: 1 1 auto; min-width: 0; padding-top: 0.7rem; }
.profile-name { color: var(--profile-box-ink, #17121a); font-size: clamp(1.4rem, 4vw, 1.9rem); margin: 0; }
.profile-username { color: var(--profile-box-muted, #8a7f74); font-size: 0.9rem; margin: 0.15rem 0 0.4rem; }
.profile-bio {
  color: var(--profile-box-text, #4a4038);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  max-width: 60ch;
  white-space: pre-wrap;
}
.profile-stats { color: var(--profile-accent, #b8860b); font-size: 0.8rem; letter-spacing: 0.04em; margin: 0; }
.profile-header__actions {
  align-self: flex-start;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.profile-edit-btn {
  align-self: flex-start;
  margin-left: 0;
  color: var(--profile-accent, #d98b8b) !important;
  border-color: rgba(217, 139, 139, 0.35) !important;
}
.profile-follow-btn.is-following {
  background: transparent;
  color: var(--profile-accent, #d98b8b) !important;
  border: 1px solid rgba(217, 139, 139, 0.45);
}
.profile-follow-btn[hidden] { display: none; }
.profile-vip-btn {
  align-self: flex-start;
  color: var(--profile-accent, #d98b8b) !important;
  border-color: rgba(217, 139, 139, 0.35) !important;
}
.profile-message-btn {
  align-self: flex-start;
  margin-left: auto;
  color: var(--profile-accent, #d98b8b) !important;
  border-color: rgba(217, 139, 139, 0.35) !important;
}
.profile-theme-media { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.2rem; }
.profile-theme-media .profile-media-field { flex: 1 1 200px; }

.profile-profiles {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  color: #a49e90;
  font-size: 0.78rem;
}
.profile-profiles[hidden] { display: none; }
.profile-profiles__label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b7468;
}
.profile-profiles__links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.profile-profiles__link {
  color: var(--profile-accent, #d98b8b);
  text-decoration: none;
  border: 1px solid rgba(217, 139, 139, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.profile-profiles__link:disabled { cursor: default; }
.profile-profiles__link:hover { background: rgba(217, 139, 139, 0.12); }
.profile-profiles__link.is-current { font-weight: 700; background: rgba(217, 139, 139, 0.16); }

.profile-switch__select {
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.profile-switch[hidden] { display: none; }

.profile-music {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #141416;
  border: 1px solid rgba(184, 134, 11, 0.3);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  margin-top: 1rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.profile-music[hidden] { display: none; }
.profile-music__top { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.profile-music__controls { display: flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; }
.profile-music__btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(217, 139, 139, 0.35);
  background: transparent;
  color: var(--profile-accent, #d98b8b);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}
.profile-music__btn:hover { background: rgba(217, 139, 139, 0.12); }
.profile-music__play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--profile-accent, #d98b8b);
  background: transparent;
  color: var(--profile-accent, #d98b8b);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.profile-music__play:hover { background: rgba(217, 139, 139, 0.12); }
.profile-music__meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.profile-music__label {
  color: #a49e90;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.profile-music__title {
  color: #f4ede1;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-music__count { color: #7b7468; font-size: 0.72rem; }
.profile-music__mute {
  border: 1px solid rgba(217, 139, 139, 0.35);
  border-radius: 6px;
  background: transparent;
  color: var(--profile-accent, #d98b8b);
  font: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.profile-music__mute:hover { background: rgba(217, 139, 139, 0.12); }
.profile-music__seek { display: flex; align-items: center; gap: 0.6rem; }
.profile-music__progress {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--profile-accent, #d98b8b);
}
.profile-music__time {
  color: #a49e90;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.4em;
  text-align: center;
}
.profile-music__notice {
  width: 100%;
  border: 1px dashed var(--profile-accent, #d98b8b);
  border-radius: 9px;
  background: rgba(217, 139, 139, 0.08);
  color: var(--profile-accent, #d98b8b);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}
.profile-music__notice:hover { background: rgba(217, 139, 139, 0.16); }
.profile-music__notice[hidden] { display: none; }
.profile-music__list {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0.45rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 190px;
  overflow: auto;
}
.profile-music__track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 8px;
  padding: 0.25rem 0.4rem;
}
.profile-music__track.is-active { background: rgba(217, 139, 139, 0.12); }
.profile-music__track-num { color: #7b7468; font-size: 0.72rem; width: 1rem; text-align: right; flex: 0 0 auto; }
.profile-music__track-btn {
  background: none;
  border: 0;
  color: #ddd6c8;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  padding: 0.15rem 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-music__track.is-active .profile-music__track-btn { color: var(--profile-accent, #d98b8b); font-weight: 600; }
.profile-music__plays {
  color: #7b7468;
  font-size: 0.7rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.profile-music__track-btn:hover { color: #fff; }

.profile-song-like {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #b9b0a0;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.profile-song-like:hover {
  border-color: var(--profile-accent, #d98b8b);
  color: var(--profile-accent, #d98b8b);
}
.profile-song-like.is-liked {
  background: var(--profile-accent, #d98b8b);
  border-color: var(--profile-accent, #d98b8b);
  color: #fff;
}
.profile-song-like:disabled { opacity: 0.6; }
.profile-song-like__count { font-size: 0.68rem; }

.profile-edit {
  background-color: var(--profile-box, #fff);
  background-image: var(--profile-box-image, none);
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  margin-top: 1rem;
  box-shadow: 0 12px 30px rgba(120, 60, 70, 0.12);
}
.profile-edit h2 { color: var(--profile-accent, #b8860b); font-size: 1.2rem; margin: 0 0 0.9rem; }
.profile-edit[hidden],
.profile-edit-btn[hidden] { display: none; }
.profile-form { display: flex; flex-direction: column; gap: 0.9rem; }
.profile-media-edit { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; }
.profile-media-field { display: flex; flex-direction: column; align-self: flex-start; gap: 0.4rem; }
.profile-upload {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #141416;
  color: var(--profile-accent, #d98b8b);
  border: 1px solid rgba(176, 86, 106, 0.28);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.profile-upload:hover { border-color: #d98b8b; }
.profile-upload__preview {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2a2e center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a49e90;
  font-size: 0.65rem;
  overflow: hidden;
  flex: 0 0 auto;
}
.profile-upload--wide { flex: 0 1 280px; }
.profile-upload--wide .profile-upload__preview { width: 110px; height: 44px; border-radius: 8px; }
.profile-track-editor { display: flex; flex-direction: column; gap: 0.5rem; max-width: 540px; }
.profile-track-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.profile-track {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #141416;
  border: 1px solid rgba(176, 86, 106, 0.25);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}
.profile-track__title {
  color: #f4ede1;
  font-size: 0.85rem;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-track__title-input {
  flex: 1 1 auto;
  min-width: 0;
  color: #f4ede1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.2rem 0.35rem;
  font: inherit;
  font-size: 0.85rem;
}
.profile-track__title-input::placeholder { color: #8a7f74; }
.profile-track__title-input:focus {
  outline: none;
  border-color: rgba(217, 139, 139, 0.5);
  background: rgba(255, 255, 255, 0.04);
}
.profile-track__tools { display: flex; gap: 0.3rem; flex: 0 0 auto; }
.profile-track__btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(217, 139, 139, 0.3);
  background: transparent;
  color: var(--profile-accent, #d98b8b);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}
.profile-track__btn:disabled { opacity: 0.3; cursor: default; }
.profile-track__btn--remove { color: #e07a7a; border-color: rgba(224, 122, 122, 0.4); }
.profile-upload:disabled { opacity: 0.5; cursor: default; }
.profile-audio-edit { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.profile-hint { color: var(--profile-box-muted, #8a7f74); font-size: 0.72rem; }
.profile-upsell { margin: 0; color: var(--profile-box-text, #4a4038); font-size: 0.85rem; }
.profile-upsell a { color: var(--profile-accent, #b8860b); font-weight: 600; }
.profile-theme-edit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-theme-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--profile-box-text, #4a4038);
  font-size: 0.85rem;
}
.profile-theme-field input[type="color"] {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(176, 86, 106, 0.28);
  border-radius: 8px;
  background: #141416;
  cursor: pointer;
}
.profile-theme-field select {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(176, 86, 106, 0.28);
  background: #141416;
  color: var(--profile-accent, #d98b8b);
}
.profile-form__actions { display: flex; gap: 0.7rem; }

/* ---------- Page navigation / framing ---------- */
.profile-back {
  display: inline-block;
  margin: 0 0 0.8rem;
  color: #a49e90;
  font-size: 0.8rem;
  text-decoration: none;
}
.profile-back:hover { color: var(--profile-accent, #d98b8b); }
.profile-backbar {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.8rem 0 0.5rem;
}
.profile-back-home {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f4ede1;
  text-decoration: none;
  font-size: 0.85rem;
}
.profile-back-home:hover { border-color: var(--profile-accent, #d98b8b); color: var(--profile-accent, #d98b8b); }

/* ---------- Status composer ---------- */
.status-composer {
  background-color: var(--profile-box, #fff);
  background-image: var(--profile-box-image, none);
  background-size: cover;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  box-shadow: 0 12px 30px rgba(120, 60, 70, 0.12);
}
.status-composer[hidden] { display: none; }
.status-composer__as {
  margin: 0 0 0.35rem;
  color: var(--profile-box-muted, #8a7f74);
  font-size: 0.8rem;
}
.status-composer__as[hidden] { display: none; }
.status-composer__tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.status-composer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.status-composer__foot .form-status { flex: 1 1 180px; margin: 0; }
.status-preview { position: relative; margin-top: 0.6rem; }
.status-preview[hidden] { display: none; }
.status-preview img,
.status-preview video { max-width: 100%; display: block; border-radius: 10px; }
.status-preview__remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Post timeline ---------- */
.profile-timeline { margin-top: 1.6rem; }
.profile-timeline__title { color: #f4ede1; font-size: 1.25rem; margin: 0 0 0.8rem; }
.profile-feed { margin-top: 0; }
.profile-timeline__empty {
  grid-column: 1 / -1;
  color: #a49e90;
  text-align: center;
  padding: 2rem 1rem;
  margin: 0;
}

@media (max-width: 520px) {
  .profile-header__body { flex-wrap: wrap; align-items: flex-start; }
  .profile-edit-btn { margin-left: 0; }
  .profile-header__actions { margin-left: 0; justify-content: flex-start; }
  .profile-theme-edit { gap: 0.7rem; }
}

