.profile-body {
  background: var(--bg);
  min-height: 100vh;
}

#post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.fb-profile-wrap {
  max-width: 940px;
  margin: 0 auto;
  padding-top: 0;
}

.fb-cover-section {
  background: var(--surface);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 24px #00000073;
  overflow: visible;
}

.fb-cover-photo {
  position: relative;
  aspect-ratio: 1200/350;
  height: auto;
  background: linear-gradient(135deg,#060b18,#0d1f3c 35%,#0a1928 65%,#07090f);
  border-radius: 0;
  overflow: hidden;
}

.fb-cover-photo:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 25% 55%,rgba(var(--primary-rgb),.22) 0%,transparent 55%),radial-gradient(ellipse at 78% 25%,rgba(var(--primary-rgb),.18) 0%,transparent 50%),radial-gradient(ellipse at 55% 80%,rgba(236,72,153,.1) 0%,transparent 45%);
  pointer-events: none;
}

.fb-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.fb-cover-placeholder {
  width: 100%;
  height: 100%;
}

.fb-cover-drag-img {
  position: absolute;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
}

.cover-reposition-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #000000a6;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.cover-reposition-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.fb-cover-edit-btn {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 5;
  background: #0000008c;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  transition: background .2s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.fb-cover-edit-btn:hover {
  background: #000000b8;
}

.fb-profile-info-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 20px 12px;
  margin-top: -50px;
  position: relative;
  z-index: 2;
}

.fb-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}

.fb-avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  display: block;
  box-shadow: 0 2px 12px #00000080;
}

.fb-avatar-init {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--primary),#6366f1);
  border: 3px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 12px #00000080;
}

.fb-avatar-edit-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0e1525eb;
  border: 2px solid rgba(255,255,255,.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
  user-select: none;
}

.fb-avatar-edit-btn:hover {
  background: rgba(var(--primary-rgb),.35);
}

.fb-profile-name-block {
  flex: 1;
  padding-bottom: 6px;
  min-width: 0;
}

.fb-profile-username {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-profile-sub {
  font-size: 13px;
  color: var(--muted);
}

.fb-profile-handle {
  font-size: 13px;
  color: var(--muted);
  margin-top: -2px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-profile-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.fb-prof-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background .2s,color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.fb-prof-btn--primary {
  background: var(--primary);
  color: #fff;
}

.fb-prof-btn--primary:hover {
  filter: brightness(1.1);
}

.fb-prof-btn--ghost {
  background: #ffffff14;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
}

.fb-prof-btn--ghost:hover {
  background: #ffffff24;
}

.friend-menu-wrap {
  position: relative;
}

.friend-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: 0 8px 24px #00000080;
  min-width: 150px;
  z-index: 100;
  overflow: hidden;
}

.friend-menu-item {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
}

.friend-menu-item:hover {
  background: var(--border);
}

.friend-menu-item--danger {
  color: #f87171;
}

.friend-menu-item--danger:hover {
  background: #ff50501a;
}

.fb-profile-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--border);
  padding: 0 8px;
  margin-top: 4px;
}

.fb-profile-tabs::-webkit-scrollbar {
  display: none;
}

.fb-prof-tab {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  transition: color .15s;
}

.fb-prof-tab:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transition: background .15s;
}

.fb-prof-tab--active {
  color: var(--primary);
}

.fb-prof-tab--active:after {
  background: var(--primary);
}

.fb-prof-tab:hover:not(.fb-prof-tab--active) {
  color: var(--text);
}

.fb-profile-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
  padding: 0 8px 80px;
  align-items: start;
}

.fb-profile-feed>* {
  margin: 0;
}

.fb-profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 70px;
  padding-top: 12px;
  align-self: start;
}

.fb-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.fb-info-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.fb-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-sub);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.fb-info-row:last-child {
  border-bottom: none;
}

.fb-info-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.fb-friends-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fb-friends-count {
  font-size: 13px;
  color: var(--muted);
}

.fb-friends-see-all {
  font-size: 13px;
  font-weight: 600;
  color: #1877f2;
  text-decoration: none;
  white-space: nowrap;
  padding-top: 2px;
  transition: color .15s;
}

.fb-friends-see-all:hover {
  color: #1a6fd8;
  text-decoration: underline;
}

[data-theme=light] .fb-friends-see-all {
  color: #1877f2;
}

.fb-friends-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}

.fb-sidebar-photos-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 3px;
  border-radius: 8px;
  overflow: hidden;
}

.fb-sidebar-photos-grid .fb-sidebar-photo-slot {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: zoom-in;
}

.fb-sidebar-photos-grid .fb-sidebar-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}

.fb-sidebar-photos-grid .fb-sidebar-photo-slot:hover img {
  transform: scale(1.07);
}

.fb-friend-item {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity .15s;
}

.fb-friend-item:hover {
  opacity: .85;
}

.fb-friend-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.fb-friend-avatar-init {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(135deg,var(--primary),#6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.fb-friend-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  padding: 0 2px 4px;
}

.fb-friends-loading {
  font-size: 12px;
  color: var(--muted);
}

.friends-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 0;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
  position: relative;
}

.friend-card:hover {
  background: var(--surface);
}

.friend-card-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.friend-card-avatar-init {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg,var(--primary),#6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.friend-card-info {
  flex: 1;
  min-width: 0;
}

.friend-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card-mutual {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.friend-card-menu {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}

.friend-card-menu:hover {
  background: var(--border);
  color: var(--text);
}

.friend-card-dropdown-wrap {
  position: relative;
}

.friend-card-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px #0000004d;
  z-index: 99;
  min-width: 160px;
  padding: 4px 0;
}

.friend-card-dropdown button {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-card-dropdown button:hover {
  background: var(--surface);
}

.friend-card-dropdown button.danger {
  color: var(--error);
}

.fb-profile-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
  min-width: 0;
}

.create-post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
}

.create-post-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.fb-avatar-sm-wrap {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
}

.fb-avatar-sm {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fb-avatar-sm-init {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--primary),#6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.create-post-trigger {
  flex: 1;
  height: 38px;
  background: #ffffff0f;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 16px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background .15s;
}

.create-post-trigger:hover {
  background: var(--border);
}

.create-post-form {
  margin-top: 10px;
}

.create-post-textarea {
  width: 100%;
  min-height: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.create-post-textarea:focus {
  border-color: var(--primary);
}

.create-post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cp-img-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff0f;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
}

.cp-img-btn:hover {
  background: #ffffff1f;
}

.cp-submit-btn {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s;
}

.cp-submit-btn:hover {
  filter: brightness(1.1);
}

.cp-submit-btn:disabled {
  opacity: .6;
  cursor: default;
}

.cp-img-preview-wrap {
  position: relative;
  margin-top: 8px;
}

.cp-img-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: cover;
}

.cp-remove-img {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #0009;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
}

.feed-loading,.feed-end {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
}

.sb-social-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0 6px;
}

.sb-social-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-sub);
  font-size: 13px;
  transition: background .15s,color .15s;
}

.sb-social-row:hover {
  background: var(--border);
  color: var(--text);
}

.sb-social-icon {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-social-label {
  font-weight: 600;
  flex-shrink: 0;
}

.sb-social-value {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-social-nolink {
  cursor: default;
}

.sb-social-nolink:hover {
  background: none;
  color: var(--text-sub);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}

.stat-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

[data-theme=light] .stat-block {
  background: #f5f6f8;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 4px;
  border-radius: 10px;
  overflow: hidden;
}

.photo-thumb-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  background: var(--surface);
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}

.photo-thumb-wrap:hover .photo-thumb {
  transform: scale(1.05);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 4px;
  border-radius: 10px;
  overflow: hidden;
}

.video-thumb-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  background: #000;
  position: relative;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}

.video-thumb-wrap:hover .video-thumb {
  transform: scale(1.05);
}

.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffffd9;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
  transition: opacity .15s;
}

.video-thumb-wrap:hover .video-thumb-play {
  opacity: 0;
}

.sb-bio {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

.sb-bio-edit-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
  display: block;
  margin-top: 4px;
  transition: opacity .15s;
}

.sb-bio-edit-btn:hover {
  opacity: .75;
}

.bio-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bio-edit-icon-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 5px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s,color .15s;
  display: flex;
  align-items: center;
}

.bio-edit-icon-btn:hover {
  background: var(--border);
  color: var(--text);
}

.bio-main-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.bio-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bio-main-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.bio-edit-btn {
  font-size: 12px!important;
  padding: 5px 12px!important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bio-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
}

.bio-placeholder {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.bio-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  line-height: 1.6;
}

.bio-textarea:focus {
  border-color: var(--primary);
}

.bio-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.bio-char-count {
  font-size: 12px;
  color: var(--muted);
}

.social-links-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}

.social-link-row:hover {
  background: var(--border);
}

.social-link-icon {
  font-size: 17px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.social-link-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  flex-shrink: 0;
  min-width: 90px;
}

.social-link-url {
  font-size: 13px;
  color: var(--primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #0000008c;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.profile-modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px #0000008c;
  overflow: hidden;
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.profile-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.profile-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  padding: 5px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s,color .15s;
  display: flex;
  align-items: center;
}

.profile-modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.profile-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 12px;
}

.modal-field {
  margin-bottom: 12px;
}

.modal-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 5px;
}

.social-icon-label {
  font-size: 15px;
}

.modal-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color .15s;
}

.modal-input:focus {
  border-color: var(--primary);
}

.modal-select {
  cursor: pointer;
}

.profile-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

[data-theme=light] .profile-modal-box {
  background: #fff;
  border-color: var(--border);
}

[data-theme=light] .modal-input {
  background: #f5f6f8;
  border-color: var(--border);
}

[data-theme=light] .social-link-row:hover {
  background: #0000000a;
}

[data-theme=light] .bio-main-card {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme=light] .bio-textarea {
  background: #f5f6f8;
  border-color: var(--border);
}

[data-theme=light] .fb-cover-section {
  background: var(--surface);
  box-shadow: 0 2px 12px #00000014;
}

[data-theme=light] .fb-cover-photo {
  background: linear-gradient(135deg,#c7d2fe,#ddd6fe 35%,#e0e7ff 65%,#f0f4ff);
}

[data-theme=light] .fb-cover-photo:before {
  background: radial-gradient(ellipse at 25% 55%,rgba(var(--primary-rgb),.15) 0%,transparent 55%),radial-gradient(ellipse at 78% 25%,rgba(139,92,246,.12) 0%,transparent 50%);
}

[data-theme=light] .fb-avatar-img,[data-theme=light] .fb-avatar-init {
  border-color: var(--surface);
}

[data-theme=light] .fb-avatar-edit-btn {
  background: #ffffffeb;
  border-color: var(--border);
}

[data-theme=light] .fb-avatar-edit-btn:hover {
  background: rgba(var(--primary-rgb),.15);
}

[data-theme=light] .fb-cover-edit-btn {
  background: #fffc;
  color: var(--text);
  border-color: var(--border);
}

[data-theme=light] .fb-cover-edit-btn:hover {
  background: #fffffff2;
}

[data-theme=light] .fb-profile-sub {
  color: var(--muted);
}

[data-theme=light] .fb-prof-btn--ghost {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

[data-theme=light] .fb-prof-btn--ghost:hover {
  background: var(--surface);
}

[data-theme=light] .friend-menu-dropdown {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 8px 24px #0000001f;
}

[data-theme=light] .friend-menu-item {
  color: var(--text);
}

[data-theme=light] .friend-menu-item:hover {
  background: #0000000a;
}

[data-theme=light] .fb-profile-tabs {
  border-color: var(--border);
}

[data-theme=light] .fb-prof-tab {
  color: var(--muted);
}

[data-theme=light] .fb-prof-tab:hover:not(.fb-prof-tab--active) {
  color: var(--text);
}

[data-theme=light] .fb-info-card {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme=light] .fb-info-row {
  color: var(--text);
  border-color: #00000012;
}

[data-theme=light] .fb-friend-item:hover {
  background: #0000000a;
}

[data-theme=light] .fb-friend-name {
  color: var(--text);
}

[data-theme=light] .fb-friends-loading {
  color: var(--muted);
}

[data-theme=light] .create-post-card {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme=light] .cover-reposition-hint {
  color: var(--text);
}

.img-edit-wrap {
  position: relative;
}

.img-edit-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  min-width: 170px;
  overflow: hidden;
  padding: 4px 0;
}

.img-edit-dropdown.hidden {
  display: none;
}

.img-edit-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}

.img-edit-opt:hover {
  background: rgba(var(--primary-rgb),.12);
}

.img-edit-opt--danger {
  color: #f87171;
}

.img-edit-opt--danger:hover {
  .fb-avatar-tap-hint {
    pointer-events: none;
  }
  .fb-avatar-wrap--own {
    cursor: pointer;
  }
  .fb-avatar-tap-hint {
    pointer-events: none;
  }
}
