/* ==== L A N P  –  Profile UI (dark, glossy, violet hues) ==== */

:root{
  --lanp-bg: #0e0f14;
  --lanp-card: #151724;
  --lanp-card-2: #17192a;
  --lanp-stroke: rgba(255,255,255,.06);
  --lanp-text: #e6e6f0;
  --lanp-sub: #a7a8b6;
  --lanp-accent: #17192a;
  --lanp-accent-2: #151724;
  --lanp-shadow: 0 0 10px var(--glow);
  --lanp-radius: 16px;
}

#lanp-profile.lanp{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--lanp-text);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(124, 88, 255,.18), transparent 60%),
    radial-gradient(900px 500px at -20% 20%, rgba(88, 171, 255,.12), transparent 60%),
    var(--lanp-bg);
  padding: 24px 0 48px;
}

.lanp-container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 24px;
}

.lanp-card{
  background: linear-gradient(180deg, var(--lanp-card), var(--lanp-card-2));
  border: 1px solid var(--lanp-stroke);
  border-radius: var(--lanp-radius);
  box-shadow: var(--lanp-shadow);
  padding: 18px;
}

.lanp-h3{
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.lanp-left .lanp-card + .lanp-card{ margin-top: 16px; }
.lanp-grid-2{
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px;
}

/* Tabs */
.lanp-tabs{ display: flex; gap: 10px; margin: 4px 0 12px; }
.lanp-tab{
  appearance: none; border: 1px solid var(--lanp-stroke);
  background: rgba(255,255,255,.04);
  color: var(--lanp-text); padding: 8px 14px; border-radius: 10px;
  font-weight: 600; cursor: pointer; transition: .2s ease;
}
.lanp-tab:hover{ transform: translateY(-1px); }
.lanp-tab.is-active{
  background: linear-gradient(180deg, var(--lanp-accent), var(--lanp-accent-2));
  border-color: transparent; color: white; box-shadow: 0 6px 14px rgba(110,102,255,.35);
}

/* Panels */
.lanp-panel.is-active{ display: block; }
.lanp-panel[hidden]{ display:none; }

/* Definition list grid */
.lanp-dl{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.lanp-dl > div{ display: contents; }
.lanp-dl dt{ color: var(--lanp-sub); font-weight: 600; }
.lanp-dl dd{ margin: 0; font-weight: 700; letter-spacing: .2px; }

/* Copy */
.lanp-copy{ color: var(--lanp-text); opacity: .92; line-height: 1.7; }

/* Bullet list for facts */
.lanp-list{ margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.lanp-list li{ line-height: 1.6; }

/* Relation chips */
.lanp-rel{ display:flex; flex-wrap:wrap; gap: 10px; }
.lanp-chip{
  display:inline-flex; align-items:center; gap: 8px;
  padding: 6px 10px; border-radius: 999px; border:1px solid var(--lanp-stroke);
  background: rgba(255,255,255,.04); text-decoration:none; color:var(--lanp-text);
}
.lanp-chip img{ width:22px; height:22px; border-radius:50%; object-fit:cover; }

/* Meta row */
.lanp-meta{ display:flex; gap:18px; margin-top:10px; color:var(--lanp-sub); }
.lanp-meta strong{ color:var(--lanp-text); }

/* Szenen */
.lanp-scenes .lanp-row{
  display:flex; align-items:center; justify-content:space-between;
  padding: 8px 0; border-bottom: 1px solid var(--lanp-stroke);
}
.lanp-scenes .lanp-row:last-child{ border-bottom: 0; }
.lanp-badge{
  font-size:12px; font-weight:700; padding:4px 8px;
  border-radius:999px; background:rgba(110,102,255,.14);
  border:1px solid rgba(110,102,255,.4);
}
.lanp-badge.is-closed{ background: rgba(255,255,255,.05); border-color: var(--lanp-stroke); }
.lanp-scenes-link{ margin-top:10px; }
.lanp-scenes-link a{ color: var(--lanp-sub); text-decoration: underline dotted; }

/* Rechte Spalte – Profilkarte */
.lanp-profilecard{ text-align:center; padding: 22px; }
.lanp-avatar-big img{
  width: 100%; height: auto; border-radius: 12px; display:block; object-fit:cover;
}
.lanp-username{ font-size: 22px; font-weight: 800; margin: 12px 0 10px; }

.lanp-button{
  display:inline-block; margin-bottom: 14px;
  background: linear-gradient(180deg, var(--lanp-accent), var(--lanp-accent-2));
  color:#fff; text-decoration:none; font-weight:800; letter-spacing:.3px;
  padding: 10px 14px; border-radius: 12px; box-shadow: 0 6px 14px rgba(110,102,255,.35);
}
.lanp-button:hover{ filter: brightness(1.05); }

.lanp-info-grid{
  margin-top: 6px;
  display:grid; grid-template-columns:1fr; gap:10px; text-align:left;
}
.lanp-info-grid span{ color:var(--lanp-sub); font-size:12px; display:block; }
.lanp-info-grid strong{ font-size:14px; }

/* Responsiv */
@media (max-width: 1024px){
  .lanp-container{ grid-template-columns: 1fr; }
  .lanp-grid-2{ grid-template-columns: 1fr; }
  .lanp-right{ order: -1; }
}



/* Scrollbox für Kurzinfos */
.lanp-scroll{ max-height:520px; overflow:auto; padding-right:6px; }
.lanp-scroll::-webkit-scrollbar{ width:8px; }
.lanp-scroll::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.12); border-radius:8px; }

/* Zeilenumbrüche in Textbereichen */
.lanp-copy{ white-space:pre-line; }

/* CSS-Fallback-Logik für Werte: primary -> alt -> fallback */
.lanp-val .alt{ display:none; }
.lanp-val .fb{ display:inline; } /* standard: Fallback sichtbar */

.lanp-val .primary:not(:empty) ~ .alt{ display:none; }
.lanp-val .primary:not(:empty) ~ .fb{ display:none; }   /* wenn primary da -> nur primary */

.lanp-val .primary:empty ~ .alt:not(:empty){ display:inline; }        /* wenn alt da */
.lanp-val .primary:empty ~ .alt:not(:empty) ~ .fb{ display:none; }    /* alt versteckt Fallback */




/* CSS-Fallback-Logik: primary -> alt -> fallback */
.lanp-val .alt,
.lanp-val .fb { display:none; }

/* Wenn primary NICHT leer ist: zeig nur primary */
.lanp-val .primary:not(:empty) ~ .alt,
.lanp-val .primary:not(:empty) ~ .fb { display:none; }
.lanp-val .primary:not(:empty) { display:inline; }

/* Wenn primary leer, aber alt NICHT leer: zeig alt */
.lanp-val .primary:empty ~ .alt:not(:empty) { display:inline; }
.lanp-val .primary:empty ~ .alt:not(:empty) ~ .fb { display:none; }

/* Wenn beide leer: zeig fallback (— oder Core-Feld) */
.lanp-val .primary:empty ~ .alt:empty ~ .fb { display:inline; }

/* Avatarperson-Zeile komplett verstecken, wenn leer */
.lanp-avaperson strong:empty { display:none; }
.lanp-avaperson strong:empty::before { content: ''; }
.lanp-avaperson strong:empty { display:none; }



/* Scrollboxen */
.lanp-scroll{ max-height: 520px; overflow: auto; padding-right: 6px; }
.lanp-scroll--med{ max-height: 380px; }
.lanp-scroll--tall{ max-height: 520px; }

.lanp-scroll::-webkit-scrollbar{ width: 8px; }
.lanp-scroll::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.12); border-radius: 8px; }

/* Lesbarkeit & Medien in langen Texten */
.lanp-copy{ white-space: pre-line; line-height: 1.7; }
.lanp-copy img{ max-width: 100%; height: auto; display: block; border-radius: 8px; margin: 8px 0; }




/* Profil-Icon 300x150 */
.lanp-banner-wrap{ margin-top:16px; display:flex; justify-content:center; }
.lanp-banner{
  width:300px; height:150px; max-width:100%;
  object-fit:cover; border-radius:12px;
  border:1px solid var(--lanp-stroke);
  background: rgba(255,255,255,.04);
  box-shadow: var(--lanp-shadow);
}
/* Wenn das Feld leer ist, Bild ausblenden (kein kaputtes Platzhalter-Icon) */
.lanp-banner[src=""], .lanp-banner:not([src]){ display:none; }




/* Karte im Postbit */
.lanp-postcard{
  background: linear-gradient(180deg, var(--lanp-card), var(--lanp-card-2));
  border: 1px solid var(--lanp-stroke);
  border-radius: var(--lanp-radius);
  box-shadow: var(--lanp-shadow);
  padding: 16px;
  color: var(--lanp-text);
}

.lanp-post-avatar img{ width:100%; height:auto; border-radius:12px; display:block; }
.lanp-post-username{ font-size:18px; font-weight:800; text-align:center; margin:10px 0 6px; }
.lanp-post-badges{ text-align:center; opacity:.9; margin-bottom:10px; }
.lanp-button--sm{ padding:8px 12px; font-size:13px; display:block; width:100%; text-align:center; }

.lanp-post-info-grid{ margin-top:8px; display:grid; grid-template-columns:1fr; gap:8px; }
.lanp-post-info-grid span{ color:var(--lanp-sub); font-size:12px; display:block; }
.lanp-post-info-grid strong{ font-size:14px; }

.lanp-banner-post .lanp-banner{
  width:300px; height:150px; max-width:100%;
  object-fit:cover; border-radius:12px; display:block; margin:12px auto 0;
  border:1px solid var(--lanp-stroke); background: rgba(255,255,255,.04);
}
.lanp-banner-post .lanp-banner[src=""], .lanp-banner-post .lanp-banner:not([src]){ display:none; }

.lanp-meta{ display:flex; justify-content:space-between; color:var(--lanp-sub); margin-top:10px; font-size:12px; }
.lanp-meta strong{ color:var(--lanp-text); }

/* Fallback-Logik: primary -> alt -> fallback */
.lanp-val .alt, .lanp-val .fb { display:none; }
.lanp-val .primary:not(:empty) ~ .alt,
.lanp-val .primary:not(:empty) ~ .fb { display:none; }
.lanp-val .primary:not(:empty){ display:inline; }
.lanp-val .primary:empty ~ .alt:not(:empty){ display:inline; }
.lanp-val .primary:empty ~ .alt:not(:empty) ~ .fb{ display:none; }

/* Avatarperson-Zeile verstecken, wenn leer */
.lanp-row-avaperson strong:empty { display:none; }



/* Karte sauber in der linken Autorenspalte */
.post_author .lanp-postcard{ max-width:320px; margin:0 auto; }


/* === Postbit: 2-Spalten-Layout erzwingen (klassisch) === */
.post.classic .post_author{
  float: left;                 /* linke Spalte aktivieren */
  width: 320px;                /* gleiche Breite wie die Karte */
  padding-right: 12px;
  box-sizing: border-box;
}
.post.classic .post_content{
  margin-left: 332px;          /* width + Abstand */
}

/* Karte innerhalb der Spalte nicht zentrieren (optional) */
.post_author .lanp-postcard{ max-width: 320px; margin: 0; }

/* Auf kleinen Screens wieder einspaltig */
@media (max-width: 900px){
  .post.classic .post_author{ float:none; width:auto; padding-right:0; }
  .post.classic .post_content{ margin-left:0; }
}

/* Notfall: falls andere Theme-Regeln dazwischenfunken */
.post.classic .post_author{ float:left !important; width:320px !important; }
.post.classic .post_content{ margin-left:332px !important; }






/* === Postbit: linke Autoren-Spalte erzwingen === */
.post.classic .post_author{
  float: left !important;          /* linke Spalte aktiv */
  width: 320px !important;         /* gleiche Breite wie die Karte */
  padding: 0 !important;
  margin: 0 12px 0 0 !important;   /* kleiner Abstand zur rechten Spalte */
  text-align: left !important;     /* verhindert zentrieren */
  box-sizing: border-box;
}
.post.classic .post_content{
  margin-left: 332px !important;   /* width + Abstand, muss zur Breite oben passen */
}

/* Karte innerhalb der Spalte nicht mehr mittig */
.post_author .lanp-postcard{ max-width:320px; margin:0 !important; }

/* Float sauber abschließen, damit nachfolgende Posts nicht verrutschen */
.post.classic::after{ content:""; display:block; clear:both; }

/* Optional: Wenn dein Theme die Autoren-Spalte selbst extrem breit macht */
.post .post_author{ width: 320px !important; }




/* Abstand zwischen zwei Beiträgen (wirkt links & rechts) */
.post.classic{ 
  margin-bottom: 28px;           /* <- Abstand nach unten, frei wählbar */
}

/* falls dein Theme das übersteuert */
.post.classic{ margin-bottom: 28px !important; }

/* Float sauber abschließen (verhindert Überlappungen) */
.post.classic::after{ content:""; display:block; clear:both; }







/* Hintergründe mit Glow oben */
#lanp-profile.lanp{
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(var(--lanp-accent-rgb), .18), transparent 60%),
    radial-gradient(900px 500px at -20% 20%, rgba(var(--lanp-accent-rgb), .12), transparent 60%),
    var(--lanp-bg);
}

/* Aktiver Tab & Button im neuen Accent */
.lanp-tab.is-active{
  background: linear-gradient(180deg, var(--lanp-accent), var(--lanp-accent-2));
  box-shadow: 0 6px 14px rgba(var(--lanp-accent-rgb), .35);
}
.lanp-button{
  background: linear-gradient(180deg, var(--lanp-accent), var(--lanp-accent-2));
  box-shadow: 0 6px 14px rgba(var(--lanp-accent-rgb), .35);
}

/* Badges/Chips in weichem Accent */
.lanp-badge{
  background: rgba(var(--lanp-accent-rgb), .14);
  border-color: rgba(var(--lanp-accent-rgb), .40);
}

/* Optional: Scrollbar-Thumb leicht im Accent */
.lanp-scroll::-webkit-scrollbar-thumb{
  background: rgba(var(--lanp-accent-rgb), .22);
}


