/* Seite: Profil (profile_page.dart) – Kopfbild randlos, alles flach auf dem Seitenhintergrund. */

/* ---------- Kopfbild: 44 % der Höhe, ohne Foto nur der Verlauf ---------- */
.profile-cover {
  --cover-base: linear-gradient(135deg, #141418 0%, #070709 50%, #000000 100%);
  --cover-shade: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .40) 100%);
  --cover-art: rgba(255, 255, 255, .13);
  position: relative;
  display: grid;
  place-items: center;
  height: 44vh;
  min-height: 260px;
  max-height: 420px;
  background: var(--cover-shade), var(--cover-base);
}
:root[data-theme="light"] .profile-cover {
  --cover-base: linear-gradient(135deg, #FFFFFF 0%, #F0F0F0 50%, #F7F7F7 100%);
  --cover-shade: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, 0) 55%);
  --cover-art: rgba(0, 0, 0, .10);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .profile-cover {
    --cover-base: linear-gradient(135deg, #FFFFFF 0%, #F0F0F0 50%, #F7F7F7 100%);
    --cover-shade: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, 0) 55%);
    --cover-art: rgba(0, 0, 0, .10);
  }
}
.profile-cover__art {
  display: grid;
  place-items: center;
  color: var(--cover-art);
}
.profile-cover__art .icon { width: 132px; height: 132px; }
.profile-cover__actions {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
}

/* ---------- Identität: zentriert, Rand 16, oben 22 ---------- */
.profile-id {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px var(--gutter) 0;
  text-align: center;
}
.profile-id__name {
  font-size: 27px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.4px;
}
.profile-id__hint {
  margin-top: 6px;
  max-width: 320px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-2);
}
.profile-id__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

/* ---------- Kennzahlen: Zahl 20 w900, Label 12.5 w600 ----------
   Drei Zahlen (Events, Follower, Following) – Profilbesuche gibt es nur in der App. */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px var(--gutter) 0;
  text-align: center;
}
.profile-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.profile-stats__value {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}
.profile-stats__label {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- Zwei Knöpfe: Höhe 46, Radius 16, Schrift 15 ---------- */
.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px var(--gutter) 0;
}
.profile-actions .btn {
  min-height: 46px;
  height: 46px;
  padding: 0 12px;
  gap: 8px;
  border-radius: var(--r-button);
  font-size: 15px;
  font-weight: 800;
}
.profile-actions .btn .icon { width: 20px; height: 20px; }
.profile-actions .btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Storyboard-Leiste: Kreise 64 ---------- */
.profile-hls { margin-top: var(--section-gap); }
.profile-hls__title {
  padding: 0 var(--gutter) 10px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.1px;
}
.profile-hls__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--gutter) 14px;
}
.profile-hls__row::-webkit-scrollbar { display: none; }
.profile-hl {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 64px;
}
.profile-hl__circle { width: 64px; height: 64px; }
.profile-hl .profile-hl__line { margin-top: 7px; height: 8px; }

/* ---------- Inhalts-Tabs: nur Symbole, Unterstrich im Verlauf 2.5 × 44 ---------- */
.profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 2px 0 4px;
}
.profile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding-top: 6px;
  color: var(--text-2);
}
.profile-tab .icon { width: 24px; height: 24px; }
.profile-tab__bar {
  display: block;
  width: 44px;
  height: 2.5px;
  border-radius: var(--r-pill);
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform .18s var(--ease-out);
}
.profile-tab[aria-selected="true"] { color: var(--text); }
.profile-tab[aria-selected="true"] .icon { fill: url(#cv-accent); }
.profile-tab[aria-selected="true"] .icon--stroke { fill: none; stroke: url(#cv-accent); }
.profile-tab[aria-selected="true"] .profile-tab__bar { transform: scaleX(1); }

/* ---------- Raster: 3 Spalten, 2 px Abstand, 4:5 ---------- */
.profile-panel:focus-visible { outline-offset: -2px; border-radius: 0; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}
.profile-grid__tile {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
}
.profile-grid__sk {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.page--profil .empty { padding-top: 30px; }

/* =====================================================================
   Angemeldet (renderSignedIn): echtes Profil, gleiche Maße wie oben.
   ===================================================================== */

.page--profil-live {
  --profile-outline: rgba(255, 255, 255, .24);
  --profile-chip-bg: rgba(11, 11, 18, .82);
}
:root[data-theme="light"] .page--profil-live,
:root[data-theme="light"] .person-row,
:root[data-theme="light"] .profile-people-sheet {
  --profile-outline: rgba(17, 17, 17, .18);
  --profile-chip-bg: rgba(255, 255, 255, .94);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .page--profil-live,
  :root:not([data-theme]) .person-row,
  :root:not([data-theme]) .profile-people-sheet {
    --profile-outline: rgba(17, 17, 17, .18);
    --profile-chip-bg: rgba(255, 255, 255, .94);
  }
}

/* ---------- Kopfbild mit Foto, Glasknöpfe oben, Chip und Story unten ---------- */
.profile-cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.profile-cover__img.is-loaded { opacity: 1; }
.profile-cover__img.is-broken { display: none; }
.profile-cover__shade { display: none; }
.profile-cover--photo .profile-cover__shade {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .50) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0) 58%, var(--bg) 100%);
}
.profile-cover__bar {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-cover__spacer { flex: 1 1 auto; }
.profile-cover__bottom {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 15px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--profile-chip-bg), var(--profile-chip-bg)) padding-box,
    var(--accent-tint-border) border-box;
}
.profile-chip .icon { width: 14px; height: 14px; }

/* Story-Ring: Glaspille mit Profilbild im Story-Verlauf */
.profile-story {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 13px 3px 3px;
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  background: var(--glass-btn);
  border: 1px solid var(--glass-btn-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
.profile-story__ring { padding: 2px; }

/* Menü „…“ (Blockieren, Melden) */
.profile-more { position: relative; }
.menu.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  bottom: auto;
  min-width: 210px;
}
.profile-menu__danger,
.profile-menu__danger .icon { color: var(--danger); }

/* ---------- Identität ---------- */
.profile-id--live .profile-id__name {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
}
.profile-id__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-id__name .icon { align-self: center; width: 20px; height: 20px; }
.profile-id__age {
  flex: none;
  font-size: 22px;
  font-weight: 500;
  color: var(--text-2);
}
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 8px;
  max-width: 100%;
}
.profile-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}
.profile-meta__item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-meta__item .icon { width: 16px; height: 16px; }
.profile-meta__item--accent { color: var(--text); font-weight: 700; }
.profile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
  margin-top: 2px;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .profile-link:hover span:last-child { text-decoration: underline; }
}
/* Spotify nur in seinem Grün (keine Akzentfarbe auf Fremdmarken) */
.profile-link__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1DB954;
}
.profile-bio {
  margin-top: 14px;
  max-width: 420px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.profile-interests {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.profile-interest {
  padding: 7px 12px;
  border-radius: var(--r-pill);
  font-size: 12.8px;
  font-weight: 800;
  color: var(--text);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--accent-tint-border) border-box;
  overflow-wrap: anywhere;
}

/* ---------- Kennzahlen: ganze Spalte tippbar ---------- */
.profile-stats__hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 4px 0;
  border-radius: 12px;
  text-align: center;
}
@media (hover: hover) and (pointer: fine) {
  a.profile-stats__hit:hover .profile-stats__label,
  button.profile-stats__hit:hover .profile-stats__label { color: var(--text); }
}

/* ---------- Knöpfe: Folgen (Verlauf) wird nach dem Folgen schmaler ---------- */
.profile-actions { transition: grid-template-columns .38s var(--ease-out); }
.profile-actions.is-followed { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); }
.profile-btn--quiet,
.follow-btn--quiet {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--profile-outline, var(--border));
}
.profile-btn--quiet:disabled,
.follow-btn:disabled { opacity: .45; }
.profile-actions .btn .icon--accent { fill: url(#cv-accent); }
.profile-actions__sk { height: 46px; border-radius: var(--r-button); }
.profile-blocked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin: 22px var(--gutter) 0;
  text-align: center;
}
.profile-blocked__text { font-size: 14px; color: var(--text-2); }

/* „Gefolgt von …“: kleine überlappende Bilder, ohne Kasten */
.profile-followedby {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 2 * var(--gutter));
  margin: 16px var(--gutter) 0;
  padding: 4px 0;
  text-align: left;
}
.profile-followedby__faces { display: inline-flex; flex: none; }
.profile-followedby__face {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
}
.profile-followedby__face + .profile-followedby__face { margin-left: -8px; }
.profile-followedby__text {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Inhalt unter den Knöpfen ---------- */
.profile-body { margin-top: var(--section-gap); }
.profile-hls-live { margin-bottom: 6px; }
.profile-pane { min-height: 220px; }
.profile-pane[hidden] { display: none; }
.profile-pane .empty { padding-top: 24px; }
.profile-pane .empty__art { width: min(200px, 60%); }
.profile-loading__grid { margin-top: 26px; }

/* Hinweis (privat, blockiert): Kreis-Umriss ohne Fläche, Symbol im Verlauf */
.profile-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 12px;
  text-align: center;
}
.profile-hint__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.4px solid var(--profile-outline, var(--border));
}
.profile-hint__icon .icon { width: 26px; height: 26px; }
.profile-hint__title {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 800;
}
.profile-hint__text {
  margin-top: 6px;
  max-width: 340px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-2);
}
.profile-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px var(--gutter);
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.35;
  color: var(--text-2);
}
.profile-info .icon { width: 18px; height: 18px; }
.profile-retry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px var(--gutter) 18px;
}
.profile-retry--inline { padding-bottom: 8px; }

/* ---------- Geplante Events: kleine Kacheln, Bild 16:9 mit Datum ---------- */
.profile-evs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  padding: 14px var(--gutter) 8px;
}
.profile-ev { min-width: 0; }
.profile-ev__link {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.profile-ev__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--placeholder);
}
.profile-ev__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.profile-ev__ph .icon { width: 28px; height: 28px; }
.profile-ev__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-ev__pill {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  font-size: 11.5px;
  background: rgba(0, 0, 0, .55);
  border-color: rgba(255, 255, 255, .12);
}
.profile-ev__title {
  margin-top: 8px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-ev__where {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-ev .profile-ev__sk { margin-top: 10px; }
@media (hover: hover) and (pointer: fine) {
  .profile-ev__link:hover .profile-ev__title { text-decoration: underline; }
}

/* ---------- Zustände: lädt nicht, nicht sichtbar, nicht verfügbar ---------- */
.profile-state { min-height: 60vh; }
.profile-state__bar {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: max(8px, env(safe-area-inset-top)) 12px 0;
}
.profile-state__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18vh 24px 24px;
  text-align: center;
}
.profile-state__text { font-size: 16px; color: var(--text-2); }

/* ---------- Melden (Sheet) ---------- */
.profile-report { display: grid; gap: 16px; padding: 12px var(--gutter) 18px; }
.profile-report__reasons { display: grid; }
.profile-report__reason {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 2px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.profile-report__foot { display: grid; gap: 10px; }

/* ---------- Follower-/Following-Listen (Sheet) ---------- */
.profile-people-sheet {
  --profile-outline: rgba(255, 255, 255, .24);
  padding: 4px 0 calc(16px + env(safe-area-inset-bottom));
}
.profile-people__head { padding: 10px var(--gutter) 6px; }
.profile-people__head:empty { display: none; }
.profile-people__search { width: 100%; }
.profile-people__search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
}
.profile-people__search input::placeholder { color: var(--text-2); }
.profile-people__sub {
  padding: 8px var(--gutter) 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.profile-people__more { display: flex; margin: 10px auto 0; }
.profile-people__more[hidden] { display: none; }
.profile-people__empty { padding: 32px var(--gutter); text-align: center; }
.profile-people__empty .profile-hint__title { margin-top: 0; }
.profile-people__empty .profile-hint__text { margin: 6px auto 0; }
.profile-people__remove {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--danger);
}
.profile-people__remove .icon { width: 20px; height: 20px; }

/* =====================================================================
   Gemeinsame Bausteine aus follow.js (auch für /suche):
   Personen-Zeile wie die Chat-Liste und der Folgen-Knopf.
   ===================================================================== */
.person-row {
  --profile-outline: rgba(255, 255, 255, .24);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 14px;
}
.person-row__link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.person-row__avatar {
  display: inline-grid;
  flex: none;
  width: 46px;
  height: 46px;
}
.person-row__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.person-row__name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}
.person-row__name-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.person-row__name .icon { width: 16px; height: 16px; }
.person-row__sub {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person-row__end {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.person-row .person-row__sk-name { width: 110px; height: 13px; }
.person-row .person-row__sk-sub { width: 150px; height: 11px; }
@media (hover: hover) and (pointer: fine) {
  .person-row__link:hover .person-row__name-text { text-decoration: underline; }
}

.follow-btn { gap: 8px; }
.follow-btn .icon { width: 18px; height: 18px; }
.follow-btn.btn--primary { color: var(--on-accent); }
.follow-btn--small {
  min-width: 86px;
  min-height: 34px;
  height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
}
.follow-btn--small.follow-btn--quiet { color: var(--text-2); }
