/* Gemeinsame Grundlage der drei eigenen Versionen von „Creator finden“.
   Ruhige, helle Arbeitsfläche; Rot nur für „neu“ und die Hauptaktion. */

:root {
  --papier: #f7f7f8;
  --flaeche: #ffffff;
  --linie: #e6e6ea;
  --linie-stark: #d4d4db;
  --tinte: #0e0e12;
  --tinte-2: #3a3a42;
  --grau: #6e6e78;
  --grau-hell: #9a9aa3;
  --rot: #e20613;
  --rot-tief: #b40510;
  --rot-hauch: #fdeeef;
  --gruen: #167a52;
  --kopf: #0e0e12;
  --r-flaeche: 12px;
  --r-feld: 10px;
  --schatten: 0 18px 40px -18px rgba(14, 14, 18, .28);
  --display: 'Albert Sans', system-ui, sans-serif;
  --text: 'Figtree', system-ui, sans-serif;
  --breite: 1320px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; } /* kein seitliches Springen, wenn die Seite kürzer oder länger wird */
body {
  background: var(--papier);
  color: var(--tinte);
  font: 400 14px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; border-radius: 6px; }
.zahl { font-family: var(--display); font-variant-numeric: tabular-nums; }
.gedaempft { color: var(--grau); }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Rahmen: schmale Symbolleiste links, Inhalt rechts. Aufgeklappt wird die Leiste breiter und legt sich über den
   Inhalt (die Spalte bleibt schmal), damit der Inhalt nicht springt. */
.app { --menue-schmal: 64px; --menue-breit: 208px; display: grid; grid-template-columns: var(--menue-schmal) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.kopfleiste { display: none; }
.menue {
  position: sticky; top: 0; z-index: 35; width: var(--menue-schmal); height: 100vh; height: 100dvh; background: var(--kopf); color: #d7d7dc;
  display: flex; flex-direction: column; padding: 16px 12px 16px;
  transition: width .26s cubic-bezier(.2, .8, .2, 1), box-shadow .26s;
}
.menue.offen { width: var(--menue-breit); box-shadow: 34px 0 70px -28px rgba(0, 0, 0, .7); }
.menue :focus-visible { outline-color: #fff; }
/* Jede Zeile schneidet ihren Text ab: Symbole stehen fest, beim Aufklappen wird nur die Beschriftung aufgedeckt.
   Die Abstände links setzen jedes Symbol mittig in die 40 px breite Spur der schmalen Leiste. */
.menue-logo, .menue-punkt, .menue-marke, .menue-person { overflow: hidden; white-space: nowrap; }
.menue-text, .menue-marke text { transition: opacity .16s; }
.menue:not(.offen) :is(.menue-text, .menue-marke text) { opacity: 0; }
.menue.offen :is(.menue-text, .menue-marke text) { transition-delay: .08s; }
/* DD-Logo als Schalter: der kleine Pfeil daneben und die Fläche beim Darüberfahren zeigen, dass man klicken kann.
   Etwas breiter als die Spur, damit DD und Pfeil zusammen mittig in der schmalen Leiste sitzen. */
.menue-logo {
  display: flex; align-items: center; flex: none; width: calc(100% + 12px); height: 40px; margin: 0 -6px 18px; padding: 0 4px 0 3px;
  border: 0; border-radius: 10px; background: none; color: #8d8d97; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.menue-logo:hover, .menue-logo:focus-visible { background: #1b1b20; color: #fff; }
.menue-logo .dd-logo { flex: none; }
.menue-wortmarke {
  max-width: 0; margin-left: 0; overflow: hidden; opacity: 0; font: 700 15px var(--display); letter-spacing: -.02em; color: #f5f5f5;
  transition: max-width .26s cubic-bezier(.2, .8, .2, 1), margin-left .26s, opacity .16s;
}
.menue.offen .menue-wortmarke { max-width: 140px; margin-left: 9px; opacity: 1; transition-delay: 0s, 0s, .08s; }
.menue-pfeil { flex: none; margin-left: auto; transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.menue-logo:hover .menue-pfeil { transform: translateX(2px); }
.menue.offen .menue-pfeil { transform: rotate(180deg); }
.menue.offen .menue-logo:hover .menue-pfeil { transform: rotate(180deg) translateX(2px); }
.menue-liste { display: grid; gap: 4px; }
.menue-punkt {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 11px; border-radius: 10px;
  text-decoration: none; color: #b9b9c1; font-size: 14px; font-weight: 500;
}
.menue-punkt svg { flex: none; }
.menue-punkt:hover { background: #1b1b20; color: #f5f5f5; }
.menue-punkt[aria-current="page"] { background: #1f1f25; color: #fff; box-shadow: inset 2px 0 0 var(--rot); }
.menue-zahl { margin-left: auto; font: 600 12px var(--display); color: #a5a5ad; font-variant-numeric: tabular-nums; }
.menue-zahl:empty { display: none; }
/* Schmal: die Zahl der Auswahl sitzt als rotes Abzeichen am Symbol */
.menue:not(.offen) .menue-zahl {
  position: absolute; left: 21px; top: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--rot); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center;
}
.menue-fuss { margin-top: auto; display: grid; gap: 14px; padding: 16px 0 0; border-top: 1px solid rgba(245, 245, 245, .1); }
.menue-marke { display: flex; padding-left: 10px; }
.menue-person { display: flex; align-items: center; gap: 10px; padding-left: 5px; font-size: 13px; }
.menue-tipp {
  position: absolute; left: calc(100% + 10px); z-index: 2; transform: translateY(-50%); pointer-events: none; white-space: nowrap;
  background: #f5f5f7; color: var(--tinte); font: 600 12.5px var(--text); padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .55);
}
.menue-tipp[hidden] { display: none; }
/* Schleier hinter der aufgeklappten Leiste; ein Klick darauf klappt sie wieder zu */
.menue-grund { position: fixed; inset: 0; z-index: 34; background: rgba(7, 7, 10, .42); opacity: 0; pointer-events: none; transition: opacity .26s; }
.menue-grund.zeigen { opacity: 1; pointer-events: auto; }
.kopf-initialen {
  width: 30px; height: 30px; border-radius: 50%; background: #2c2c33; color: #f5f5f5;
  display: grid; place-items: center; font: 600 12px var(--display); flex: none;
}

/* Seitenrahmen */
/* width: 100%, sonst schrumpft die Seite im Raster auf die Breite ihres Inhalts */
.seite { width: 100%; max-width: var(--breite); margin: 0 auto; padding: 32px 32px 64px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.seitenkopf h1 { font: 700 30px/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.seitenkopf p { margin: 0; color: var(--grau); }
.live { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--grau); white-space: nowrap; }
.live-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 4px rgba(22, 122, 82, .12); }

/* Bedienelemente */
.auswahl {
  appearance: none; border: 1px solid var(--linie-stark); background: var(--flaeche) no-repeat right 10px center / 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e78' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-radius: var(--r-feld); padding: 7px 30px 7px 11px; font-size: 13px; color: var(--tinte); cursor: pointer;
}
.chip {
  border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--tinte-2);
}
.chip[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.suchfeld {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--linie-stark); background: var(--flaeche);
  border-radius: var(--r-feld); padding: 0 11px; color: var(--grau); min-width: 240px;
}
.suchfeld input { border: 0; outline: 0; background: none; padding: 8px 0; width: 100%; font-size: 13px; color: var(--tinte); }
.knopf {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--linie-stark); background: var(--flaeche);
  border-radius: var(--r-feld); padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.knopf:hover { border-color: var(--tinte-2); }
.knopf.primaer { background: var(--rot); border-color: var(--rot); color: #fff; }
.knopf.primaer:hover { background: var(--rot-tief); border-color: var(--rot-tief); }
.knopf[disabled] { opacity: .45; cursor: not-allowed; }
/* Ausgewählt: ruhiger Zustand in Markenrot statt schwerem Schwarz */
.knopf.gewaehlt { background: var(--rot-hauch); border-color: #f5c6c9; color: var(--rot-tief); }
.knopf.gewaehlt:hover { border-color: var(--rot-tief); }
.knopf.gewaehlt svg { color: var(--rot); }

/* Menü „Zu Kampagne hinzufügen“ */
.k-menue {
  position: absolute; z-index: 60; width: min(300px, calc(100vw - 24px)); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 14px; box-shadow: var(--schatten); padding: 6px;
}
.k-menue-titel { font-size: 12px; color: var(--grau); padding: 8px 10px 6px; }
.k-menue button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  border: 0; background: none; border-radius: 9px; padding: 8px 10px; cursor: pointer; font-size: 13.5px;
}
.k-menue button:hover, .k-menue button:focus-visible { background: var(--papier); outline: 0; }
.k-menue button b { display: block; font-weight: 600; }
.k-menue button small { display: block; font-size: 12px; color: var(--grau); }
.k-menue button svg { color: var(--rot); flex: none; }
.k-menue .k-neu { justify-content: flex-start; color: var(--tinte-2); border-top: 1px solid var(--linie); border-radius: 0 0 9px 9px; margin-top: 4px; padding-top: 10px; }
.k-menue .k-neu svg { color: var(--grau); }
.merkmal.kampagne { background: #eef3ee; color: #25583b; display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.icon-knopf {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: none; color: var(--grau); cursor: pointer;
}
.icon-knopf:hover { background: var(--papier); border-color: var(--linie); color: var(--tinte); }
.icon-knopf.an { color: var(--rot); }

.link-knopf { border: 0; background: none; padding: 0; color: var(--grau); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Kleine Merkmale */
.merkmal { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; flex: none; }
.merkmal.pool { background: var(--tinte); color: #fff; }
.merkmal.kontakt { background: #eef0f4; color: var(--tinte-2); }
.merkmal.fit { background: var(--rot-hauch); color: var(--rot-tief); }
.merkmal.aufsteiger { background: #e6f4ec; color: var(--gruen); }
.merkmal.wettbewerb { background: #fdf0e1; color: #8a4a0b; }
.avatar { position: relative; border-radius: 50%; overflow: hidden; flex: none; display: block; line-height: 0; }
.avatar svg { width: 100%; height: 100%; }
/* KI-Fotos (shared/bilder.js): füllen ihren Rahmen; im Profilbild legt der Ausschnitt das Gesicht in die Mitte */
.foto { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-foto { position: absolute; max-width: none; height: auto; }
.pool-hinweis { background: var(--papier); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.pool-hinweis b { font-weight: 600; }

/* Leerzustand */
.leer { text-align: center; padding: 56px 20px; color: var(--grau); }
.leer b { display: block; color: var(--tinte); font: 600 16px var(--display); margin-bottom: 4px; }

/* Toast mit Rückgängig */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--tinte); color: #fff; border-radius: 12px; padding: 11px 14px 11px 16px; box-shadow: var(--schatten);
  display: flex; align-items: center; gap: 16px; font-size: 13.5px; transition: opacity .18s, transform .18s; z-index: 50;
  max-width: calc(100vw - 32px);
}
.toast.zeigen { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: none; color: #ff8a8f; font-weight: 600; cursor: pointer; padding: 2px 4px; }

@media (max-width: 1100px) {
  .seite { padding: 24px 20px 56px; }
  .seitenkopf { flex-direction: column; align-items: flex-start; }
}
/* Handy: Kopfleiste oben statt Symbolleiste; die Leiste kommt aufgeklappt als Schublade von links */
@media (max-width: 760px) {
  .app { display: block; }
  .kopfleiste {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
    height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
    background: rgba(14, 14, 18, .86); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .kopf-logo {
    display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 6px; border: 0; border-radius: 12px;
    background: none; color: #8d8d97; cursor: pointer;
  }
  .kopf-logo:hover, .kopf-logo:active { background: #1b1b20; color: #fff; }
  .kopf-logo:focus-visible { outline-color: #fff; }
  .menue {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 36; width: min(280px, 84vw);
    padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-100%); visibility: hidden;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), box-shadow .26s, visibility 0s .26s;
  }
  .menue.offen { width: min(280px, 84vw); transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2, .8, .2, 1), box-shadow .26s; }
  .menue-tipp { display: none !important; }
}
/* Touch: Klickflächen mindestens 40 px hoch */
@media (pointer: coarse) {
  .chip, .knopf { min-height: 40px; }
  .icon-knopf { width: 40px; height: 40px; }
  .k-menue button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
