/* Lex-Profil: native Auswahl, echte Avatarbilder, durchgängige Studioflächen in Hell & Dunkel. */
.nw .profil-bild {
  display: inline-grid; place-items: center; flex: none;
  width: var(--profil-bildgroesse, 44px); height: var(--profil-bildgroesse, 44px);
  overflow: clip; border-radius: var(--nw-radius-small);
  background: var(--gw-weiss); color: var(--gw-auf-weiss);
  font-size: calc(var(--profil-bildgroesse, 44px) * .4); font-weight: 650; line-height: 1;
}
.nw .profil-bild img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.nw dialog.profil-dialog {
  width: 100%; max-width: 680px; max-height: 90vh; max-height: 90dvh;
  padding: 0; margin: auto auto 0;
  border: 1px solid var(--linie); border-bottom: 0;
  border-radius: var(--nw-radius-large) var(--nw-radius-large) 0 0;
  background: var(--erhaben); color: var(--tinte); box-shadow: none;
}
.nw .profil-dialog::backdrop { background: rgba(9, 9, 11, .56); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.nw .profil-formular {
  display: flex; flex-direction: column;
  max-height: calc(90vh - 2px); max-height: calc(90dvh - 2px); margin: 0;
}
.nw .profil-inhalt {
  overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain;
  padding: 24px; min-height: 0;
}
.nw .profil-inhalt h2 { margin: 6px 0 22px; font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.65rem); line-height: 1.2; font-weight: 650; }
.nw .profil-felder, .nw .profil-avatargruppe { min-width: 0; padding: 0; margin: 0; border: 0; }
.nw .profil-avatargruppe { margin-top: 22px; }
.nw .profil-avatargruppe legend { margin-bottom: 12px; padding: 0; font-size: 14px; font-weight: 600; color: var(--tinte); }
.nw .profil-hilfe { margin: 0; color: var(--tinte-2); font-size: 13px; line-height: 1.45; }
.nw .profil-login {
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 12px 14px;
  border: 1px solid var(--linie); border-radius: var(--nw-radius-small); background: var(--flaeche);
}
.nw .profil-login > span { color: var(--tinte-2); }
.nw .profil-login > strong { overflow-wrap: anywhere; font-weight: 600; color: var(--tinte); }
.nw .profil-avatare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nw .profil-avatarwahl { position: relative; display: block; min-width: 0; cursor: pointer; }
.nw .profil-avatarwahl > input, .nw .profil-datei {
  position: absolute; width: 1px; min-height: 0; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.nw .profil-avatarinhalt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  position: relative; min-height: 112px; padding: 14px 8px 12px;
  border: 1px solid var(--linie); border-radius: var(--nw-radius-medium); background: var(--flaeche);
  transition: border-color 160ms, background-color 160ms;
}
@media (hover: hover) {
  .nw .profil-avatarwahl:hover .profil-avatarinhalt { border-color: var(--linie-2); background: var(--flaeche-2); }
}
.nw .profil-avatarname { font-size: 13px; font-weight: 550; line-height: 1.3; text-align: center; overflow-wrap: anywhere; color: var(--tinte); }
.nw .profil-wahlhaken { position: absolute; right: 7px; top: 7px; display: none; width: 18px; height: 18px; color: var(--gw-aktiv); }
.nw .profil-wahlhaken svg { display: block; width: 100%; height: 100%; }
.nw .profil-avatarwahl > input:checked + .profil-avatarinhalt {
  border-color: var(--gw-aktiv); background: var(--gw-aktiv-flaeche, var(--flaeche));
}
.nw .profil-avatarwahl > input:checked + .profil-avatarinhalt .profil-wahlhaken { display: block; }
.nw .profil-avatarwahl > input:focus-visible + .profil-avatarinhalt { outline: 2px solid var(--gw-aktiv); outline-offset: 2px; }
.nw .profil-felder:disabled .profil-avatarwahl { cursor: default; }
.nw .profil-upload {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--linie);
}
.nw .profil-uploadtext { min-width: 0; flex: 1; }
.nw .profil-uploadtext > p:first-child { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--tinte); }
.nw .profil-uploadtext .profil-hilfe { margin-bottom: 12px; }
.nw .profil-dateiknopf { min-height: 44px; cursor: pointer; white-space: normal; text-align: center; font-size: 14px; }
.nw .profil-datei:focus-visible + .profil-dateiknopf { outline: 2px solid var(--gw-aktiv); outline-offset: 2px; }
.nw .profil-uploadtext > .knopf { margin: 8px 0 0; }
.nw .profil-leseschrift {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 14px 14px; margin-top: 20px; cursor: pointer;
  border: 1px solid var(--linie); border-radius: var(--nw-radius-medium); background: var(--flaeche);
}
.nw .profil-leseschrift input { flex: none; width: 20px; min-height: 20px; height: 20px; accent-color: var(--gw-weiss); }
.nw .profil-leseschrift span { font-size: 15px; font-weight: 550; line-height: 1.4; color: var(--tinte); }
.nw .profil-leseschrift small { display: block; font-size: 13px; font-weight: 400; color: var(--tinte-2); }
.nw .profil-fehler { color: var(--gw-fehler); font-size: 14px; line-height: 1.45; margin: 16px 0 0; }
.nw .profil-status { color: var(--gw-aktiv); font-size: 14px; line-height: 1.45; margin: 16px 0 0; }
.nw :is(.profil-fehler,.profil-status):empty { display: none; }
.nw .profil-fuss {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 16px 24px max(16px, env(safe-area-inset-bottom));
  background: var(--erhaben); border-top: 1px solid var(--linie); flex: none;
}
.nw .profil-fuss > .knopf { flex: 1 1 140px; min-width: 0; min-height: 48px; }
@media (min-width: 640px) {
  .nw dialog.profil-dialog {
    width: min(680px, calc(100dvw - 40px)); margin: auto;
    border: 1px solid var(--linie-2); border-radius: var(--nw-radius-large);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  }
  .nw .profil-inhalt { padding: 28px 32px; }
  .nw .profil-fuss { padding-inline: 32px; }
  .nw .profil-avatare { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .nw .profil-inhalt { padding: 20px 16px; }
  .nw .profil-fuss { padding-inline: 16px; }
  .nw .profil-upload { gap: 12px; }
  .nw .profil-avatare { gap: 8px; }
}
