.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.profile-avatar__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  padding: 0;
  border: 2px solid rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.45);
  border-radius: 50%;
  background: var(--ddg-surface-elevated, rgba(255, 255, 255, 0.08));
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-avatar__btn:hover:not(:disabled),
.profile-avatar__btn:focus-visible:not(:disabled) {
  border-color: var(--ddg-accent-gold, #f5c518);
  box-shadow: 0 0 0 3px rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.2);
  outline: none;
}

.profile-avatar__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar__img[hidden] {
  display: none !important;
}

.profile-avatar__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  color: var(--ddg-text-muted, var(--ddg-text-muted-on-dark));
}

.profile-avatar__fallback[hidden] {
  display: none !important;
}

.profile-avatar__badge {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--ddg-accent-gold, #f5c518);
  color: #0a0a0a;
  font-size: 0.625rem;
  border: 2px solid var(--ddg-sheet, #16181e);
  pointer-events: none;
}

.profile-avatar__hint,
.profile-avatar__status {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--ddg-text-muted);
  text-align: center;
  line-height: 1.4;
  max-width: 16rem;
}

.profile-avatar__status--pending {
  color: #7a5206;
  font-weight: 600;
}

.profile-avatar__status--rejected {
  color: #9b2c2c;
  font-weight: 600;
}

.profile-avatar.is-uploading .profile-avatar__btn {
  opacity: 0.7;
  pointer-events: none;
}

.portal-map .profile-avatar__btn {
  border-color: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.portal-map .profile-avatar__fallback {
  color: var(--ddg-text-muted-on-dark);
}

.portal-map .profile-avatar__hint {
  color: var(--ddg-text-muted-on-dark);
}

.portal-map .profile-avatar__badge {
  border-color: var(--ddg-sheet);
}

.bottom-sheet--compact .profile-avatar {
  margin-bottom: var(--space-2);
}

.bottom-sheet--compact .profile-avatar__btn {
  width: 4.5rem;
  height: 4.5rem;
}

.bottom-sheet--compact .profile-avatar__fallback {
  font-size: 1.5rem;
}

.portal-map .profile-avatar__status--pending {
  color: var(--ddg-accent-gold-light, #ffe566);
}

.profile-avatar-camera {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-3);
  padding-bottom: calc(var(--space-4) + var(--safe-bottom));
}

.profile-avatar-camera[hidden] {
  display: none !important;
}

.profile-avatar-camera__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  border: none;
  padding: 0;
  cursor: pointer;
}

.profile-avatar-camera__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--ddg-sheet, #16181e);
  color: var(--ddg-text-on-dark, #fafafa);
  box-shadow: var(--shadow-sheet);
}

.profile-avatar-camera__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.profile-avatar-camera__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
}

.profile-avatar-camera__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.profile-avatar-camera__lead {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  color: var(--ddg-text-muted-on-dark, var(--ddg-text-muted));
  line-height: 1.45;
}

.profile-avatar-camera__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.profile-avatar-camera__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.profile-avatar-camera__error {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  color: #f5a5a5;
}

.profile-avatar-camera__error[hidden] {
  display: none !important;
}

.profile-avatar-camera__actions {
  display: flex;
  gap: var(--space-2);
}

.profile-avatar-camera__actions .btn-primary,
.profile-avatar-camera__actions .btn-secondary {
  flex: 1;
  min-height: var(--ddg-btn-h);
}

.admin-avatar-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  background: rgba(0, 0, 0, 0.08);
}
