.profile-photo-widget { min-width: 0; grid-column: 1 / -1; }
.profile-photo-widget .admin-photo-preview { width: 100%; max-width: 350px; margin-inline: auto; }
.profile-photo-widget .admin-photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-photo-widget .photo-selection-status { margin: 10px 0; font-size: 12px; line-height: 1.65; color: #526986; overflow-wrap: anywhere; }
.profile-photo-widget .photo-selection-status.is-error { color: #a32942; font-weight: 700; }
.profile-photo-widget .admin-photo-field input[type="file"] { width: 100%; font-size: 13px; padding: 10px; }
.profile-photo-widget .photo-public-sample { display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; color: #234362; font-size: 12px; font-weight: 700; }
.profile-photo-widget .photo-public-sample img { width: 60px; height: 80px; border-radius: 10px; object-fit: cover; background: #142a48; }
.profile-photo-widget .photo-public-sample small { color: #627893; font-weight: 500; }
.profile-photo-widget button { white-space: normal; min-height: 46px; }


/* The public endpoint already returns a blurred image. Do not blur it twice. */
.profile-visual.has-profile-photo,
.profile-detail-visual.has-profile-photo { isolation: isolate; }
.profile-visual.has-profile-photo::before,
.profile-visual.has-profile-photo::after,
.profile-detail-visual.has-profile-photo::before,
.profile-detail-visual.has-profile-photo::after { display: none; }
.profile-visual .public-profile-photo,
.profile-detail-visual .public-profile-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transform: none;
  opacity: 1;
}
.has-profile-photo .profile-photo-privacy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 14px 12px;
  background: linear-gradient(180deg, transparent 65%, rgba(4, 22, 43, .12));
}
.has-profile-photo .profile-photo-privacy > span { display: none; }
.has-profile-photo .profile-photo-privacy small { font-size: 9px; letter-spacing: .03em; }
.has-profile-photo .profile-id,
.has-profile-photo .verified-badge { z-index: 3; }

.profile-visual .public-profile-photo { object-position: center 30%; }

/* HMB v5 privacy editor: full, selective, or approved unblurred public derivative. */
.photo-privacy-editor { margin: 16px 0; padding: 16px; border: 1px solid #dbe7f4; border-radius: 16px; background: linear-gradient(145deg,#f8fbff,#eef5fc); }
.photo-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.photo-editor-heading strong { display: block; color: #12375f; font-size: 14px; }
.photo-editor-heading small { display: block; margin-top: 3px; color: #60758f; font-size: 11px; line-height: 1.45; }
.photo-mode-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #0756a8; background: #dceeff; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.photo-privacy-modes { display: grid; gap: 8px; }
.photo-privacy-modes label { cursor: pointer; }
.photo-privacy-modes input { position: absolute; opacity: 0; pointer-events: none; }
.photo-privacy-modes label > span { display: block; padding: 10px 12px; border: 1px solid #d4e1ef; border-radius: 12px; color: #173a5e; background: #fff; transition: .2s ease; }
.photo-privacy-modes label > span strong,.photo-privacy-modes label > span small { display: block; }
.photo-privacy-modes label > span strong { font-size: 12px; }
.photo-privacy-modes label > span small { margin-top: 2px; color: #71849a; font-size: 10px; }
.photo-privacy-modes input:checked + span { border-color: #2477df; background: #e9f3ff; box-shadow: 0 0 0 2px rgba(36,119,223,.1); }
.photo-editor-tools { margin-top: 12px; padding: 12px; border-radius: 12px; color: #425d78; background: #fff; }
.photo-editor-tools p { margin: 0 0 9px; font-size: 11px; line-height: 1.55; }
.photo-editor-tools > div { display: flex; flex-wrap: wrap; gap: 7px; }
.photo-editor-warning { margin: 12px 0 0; padding: 11px; border: 1px solid #ffd3a1; border-radius: 12px; color: #874910; background: #fff5e9; font-size: 11px; line-height: 1.5; }
.profile-photo-widget .admin-photo-preview { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid #cddded; border-radius: 18px; background: #eaf2fb; }
.profile-photo-widget .admin-photo-preview canvas { display: block; width: 100%; height: 100%; object-fit: cover; touch-action: none; }
.profile-photo-widget[data-photo-mode="selective"] .admin-photo-preview canvas { cursor: crosshair; }
.photo-privacy-none .profile-photo-privacy { background: linear-gradient(180deg,transparent 78%,rgba(4,22,43,.35)); }
.photo-privacy-none .profile-photo-privacy small { background: #1d7a55; }
.photo-privacy-selective .profile-photo-privacy small { background: #176db8; }
.has-profile-photo .profile-photo-privacy small { padding: 5px 8px; border-radius: 999px; color: #fff; background: rgba(5,31,58,.78); font-weight: 800; }
