/* Profilseite (/p/UIN): Name groß links, das Blümchen groß rechts, Pillen, Knopfzeile. Deluxe mit Akzent. */
@layer seiten {
  .profil {
    position: relative;
    max-width: 38rem;
    margin: clamp(1.5rem, 5vh, 3.5rem) auto;
    padding: 2.2rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    background: rgba(18, 18, 22, 0.75);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.6), 0 16px 32px -8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    isolation: isolate;
    --p-akzent: var(--d-akzent);
  }
  .profil:hover {
    transform: translateY(-2px);
    box-shadow: 0 40px 80px -16px rgba(0, 0, 0, 0.7), 0 24px 48px -8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }
  .profil-kompakt {
    max-width: 28rem;
    margin: clamp(2rem, 7vh, 4.5rem) auto 0;
  }
  .profil-glas-schein {
    position: absolute;
    top: -50px;
    right: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, rgba(56, 189, 248, 0.12) 50%, transparent 70%);
    filter: blur(36px);
  }
  .profil-status { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
  .profil-status .punkt { width: 1.3rem; height: 1.3rem; box-shadow: 0 0 10px currentColor; }
  .profil-kennung { margin: 0; font-size: 2rem; font-weight: 750; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.2; letter-spacing: .03em; color: #ffffff; }
  .profil-kennung .text-knopf { font: inherit; color: inherit; padding: 0; cursor: pointer; transition: opacity .2s; }
  .profil-kennung .text-knopf:hover { opacity: .85; }
  .profil-nick { font-size: 1.15rem; line-height: 1.3; margin: .3rem 0 0; color: rgba(255, 255, 255, 0.7); font-weight: 500; }
  
  .profil-anmelden { margin-top: 1.8rem; }
  .profil-kompakt .profil-knoepfe { display: flex; flex-direction: column; gap: .85rem; margin-top: 1.8rem; }

  /* Zettelkasten & Kapsel-Knopf */
  .zettel-kasten { width: 100%; }
  .zettel-kasten summary { list-style: none; cursor: pointer; }
  .zettel-kasten summary::-webkit-details-marker { display: none; }
  .glas-kapsel-haupt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    box-sizing: border-box;
    padding: .75rem 1.4rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 99px;
    color: #ffffff;
    font-weight: 500;
    font-size: .95rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 24px -4px rgba(0, 0, 0, 0.35);
    transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }
  .glas-kapsel-haupt:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px) scale(1.01);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 32px -4px rgba(139, 92, 246, 0.25), 0 8px 16px -2px rgba(0, 0, 0, 0.45);
  }
  .glas-kapsel-haupt:active {
    transform: scale(0.98);
  }
  details[open] > .glas-kapsel-haupt {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
  }

  /* Formular im Glas-Stil */
  .zettel-form { margin-top: .85rem; display: flex; flex-direction: column; gap: .75rem; text-align: left; }
  .zettel-form textarea.glas-eingabe {
    width: 100%;
    min-height: 6rem;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: .9rem 1.1rem;
    color: #ffffff;
    font: inherit;
    font-size: .95rem;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .zettel-form input.glas-eingabe {
    width: 100%;
    height: 3.2rem;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 0 1.1rem;
    color: #ffffff;
    font: inherit;
    font-size: .95rem;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .zettel-form .glas-eingabe::placeholder { color: rgba(255, 255, 255, 0.45); }
  .zettel-form .glas-eingabe:hover { background: rgba(0, 0, 0, 0.42); border-color: rgba(255, 255, 255, 0.22); }
  .zettel-form .glas-eingabe:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.25);
  }
  .glas-knopf-submit {
    width: 100%;
    height: 3.2rem;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px -4px rgba(0, 0, 0, 0.4);
    transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .glas-knopf-submit:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px) scale(1.01);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 28px -4px rgba(0, 0, 0, 0.45);
  }
  .glas-knopf-submit:active { transform: scale(0.98); }

  /* Segmentierte Glas-Kapsel für Anmeldung & Schwarzes Brett */
  .profil-glas-segmente {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  .glas-segment-knopf {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .65rem 1rem;
    border-radius: 99px;
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }
  .glas-segment-knopf:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-0.5px);
  }

  /* Morphing-Erfolgszustand (Kompakte Kapsel) */
  .zettel-erfolg {
    text-align: center;
    padding: 1.2rem .5rem;
    background: transparent;
    border: none;
    animation: kapsel-morpht .35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .zettel-kapsel-erfolg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    background: #131316;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 99px;
    padding: .65rem 1.4rem;
    color: #ffffff;
    font-weight: 500;
    font-size: .95rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
  .zettel-kapsel-erfolg .erfolg-haekchen {
    width: 1.25rem;
    height: 1.25rem;
    stroke: #22c55e;
    flex-shrink: 0;
  }
  .zettel-erfolg .tipp {
    margin: .85rem 0 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: .88rem;
  }

  /* Fehler-Kapsel */
  .zettel-fehler {
    text-align: center;
    padding: 1rem .5rem;
    background: transparent;
    border: none;
    animation: kapsel-morpht .35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .zettel-kapsel-fehler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    background: #131316;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 99px;
    padding: .65rem 1.4rem;
    color: #ffffff;
    font-weight: 500;
    font-size: .95rem;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  .zettel-kapsel-fehler .fehler-icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: #ef4444;
    flex-shrink: 0;
  }
  @keyframes kapsel-morpht {
    0% { transform: scale(0.92); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
  }
  .profil-vorschau-hinweis { text-align: center; margin: 0 0 1.2rem; }
  .profil-vorschau-hinweis .vorschau-zurueck { display: inline-flex; width: auto; font-size: .85rem; padding: .4rem 1.1rem; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #ffffff; }

  .profil-kopf { display: flex; gap: 1.2rem; align-items: flex-start; justify-content: space-between; }
  .profil-kopf-text { min-width: 0; flex: 1; }
  .profil-name { font-size: var(--riesig); line-height: 1.1; margin: 0; color: #ffffff; }
  .profil-uin { margin: .2rem 0 .6rem; }
  .profil-pillen { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; }
  .profil-pillen .pille { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 99px; padding: .25rem .75rem; font-size: .85rem; color: #ffffff; }
  .profil-motto { margin: .2rem 0 0; font-size: 1.15rem; font-style: italic; color: rgba(255, 255, 255, 0.85); }
  .profil-blume .punkt { width: 4.2rem; height: 4.2rem; filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.15)); }
  .profil-seit { margin: .5rem 0 0; color: rgba(255, 255, 255, 0.55); font-size: .85rem; }
  .profil-deluxe-hinweis { font-size: .8rem; color: var(--achtung); letter-spacing: .05em; text-transform: uppercase; }
  
  .profil-knoepfe { display: flex; gap: .7rem; margin-top: 1.4rem; flex-wrap: wrap; }
  .profil-knoepfe > a.knopf,
  .profil-knoepfe > button.knopf,
  .profil-knoepfe .knopf-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 99px;
    color: #ffffff;
    font-weight: 500;
    font-size: .92rem;
    padding: .65rem 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px -4px rgba(0, 0, 0, 0.35);
    transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
  }
  .profil-knoepfe > a.knopf:hover,
  .profil-knoepfe > button.knopf:hover,
  .profil-knoepfe .knopf-form button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px -4px rgba(0, 0, 0, 0.45);
  }
  .profil-knoepfe .knopf-leise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    color: rgba(255, 255, 255, 0.8);
    padding: .65rem 1.3rem;
    font-size: .92rem;
    font-weight: 500;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
  }
  .profil-knoepfe .knopf-leise:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-0.5px);
  }

  .profil-teil { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .profil-teil h2 { font-size: 1.05rem; margin: 0 0 .6rem; color: #ffffff; }
  .profil-warum { font-size: 1.05rem; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }
  .profil-daten { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; }
  .profil-daten dt { color: rgba(255, 255, 255, 0.5); }
  .profil-daten dd { margin: 0; color: rgba(255, 255, 255, 0.9); }
  .stichwort { display: inline-block; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 99px; padding: .2rem .7rem; font-size: .85rem; color: #ffffff; margin: 0 .3rem .3rem 0; }

  /* Tabs für Notizen / Antworten */
  .profil-teil.notizen .reiter {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    max-width: 16rem;
    margin-bottom: 1.2rem;
  }
  .profil-teil.notizen .reiter a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem 1rem;
    border-radius: 99px;
    font-size: .88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }
  .profil-teil.notizen .reiter a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
  }
  .profil-teil.notizen .reiter a.aktiv {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }

  .profil-aktionen { margin-top: 1.4rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
  .profil.deluxe { border: 1px solid color-mix(in srgb, var(--p-akzent) 40%, transparent); }
  .profil.deluxe .profil-name { color: var(--p-akzent); text-shadow: 0 0 12px color-mix(in srgb, var(--p-akzent) 50%, transparent); }
  .profil.deluxe .profil-blume .punkt { background: var(--p-akzent) !important; filter: drop-shadow(0 0 8px var(--p-akzent)); }

  /* Bekannte & Online/Offline-Status */
  .text-gruen { color: #22c55e !important; font-weight: 600; }
  .text-daempfen { opacity: .65; }
  .pille-bekannte { gap: .45rem; }

  /* Kompakte Kapsel auf der Besucher-Karte */
  .profil-bekannte-kapsel {
    margin-top: 1.4rem;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: .8rem 1rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  .bekannte-kapsel-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .84rem;
    margin-bottom: .6rem;
  }
  .kapsel-label { font-weight: 600; color: rgba(255, 255, 255, 0.9); }
  .kapsel-status-zaehler { font-size: .8rem; color: rgba(255, 255, 255, 0.75); }
  .kapsel-status-zaehler .trenner { opacity: .4; margin: 0 .25rem; }
  .bekannte-kapsel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
  }
  .bekannter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: .84rem;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }
  .bekannter-chip:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
  }
  .bekannter-chip.ist-an {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
  }
  .bekannter-chip.ist-an:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
  }
  .chip-mehr {
    display: inline-flex;
    align-items: center;
    font-size: .8rem;
    opacity: .65;
    padding: 0 .3rem;
  }

  /* Ausführliches Raster auf der Profilseite */
  .profil-teil.bekannte-bereich h2 {
    display: flex;
    align-items: baseline;
    gap: .5rem;
  }
  .bekannte-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: .75rem;
    margin-top: .8rem;
  }
  .bekannter-karte {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: .75rem 1rem;
    text-decoration: none;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.2);
    transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .bekannter-karte:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px -4px rgba(0, 0, 0, 0.4);
  }
  .bekannter-karte.ist-an {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.25);
    box-shadow: inset 0 1px 0 rgba(34, 197, 94, 0.2), 0 4px 16px -2px rgba(34, 197, 94, 0.12);
  }
  .bekannter-karte.ist-an:hover {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: inset 0 1px 0 rgba(34, 197, 94, 0.35), 0 8px 24px -4px rgba(34, 197, 94, 0.25);
  }
  .bekannter-karte:not(.ist-an) {
    opacity: 0.72;
  }
  .bekannter-karte:not(.ist-an):hover {
    opacity: 1;
  }
  .bekannter-kopf {
    display: flex;
    align-items: center;
    gap: .55rem;
  }
  .bekannter-name {
    font-size: .95rem;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bekannter-fuss {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .78rem;
  }
  .bekannter-status-text {
    color: rgba(255, 255, 255, 0.65);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bekannter-karte.ist-an .bekannter-status-text {
    color: rgba(34, 197, 94, 0.9);
  }
  .bekannter-uin {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .75rem;
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
  }
}
