/* ============================================================
   Prodifystudio — Datenschutz-Panel („Kurz und ehrlich.")
   Dunkles Glas-Panel, fährt von unten hoch, Sterne bleiben sichtbar.
   Eigenständig: bringt eigene Tokens mit, nutzt aber die Lab-Schrift.
   ============================================================ */
.cst {
  --cst-night: #03060b;
  --cst-paper: #edeae2;
  --cst-bone: #f1eee6;
  --cst-ink: #161513;
  --cst-mute: rgba(241, 238, 230, 0.58);
  --cst-hair: rgba(241, 238, 230, 0.14);
  --cst-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cst-out: cubic-bezier(0.6, 0, 0.4, 1);
  --cst-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --cst-mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --cst-pad: clamp(1.25rem, 4vw, 4.5rem);
  position: fixed; inset: 0; z-index: 200;
  display: grid; justify-items: center; align-items: end;
  padding: 0 var(--cst-pad) clamp(0.9rem, 2.4vh, 1.8rem);
  background: linear-gradient(to top, rgba(3, 6, 11, 0.92) 0, rgba(3, 6, 11, 0.55) 38%, rgba(3, 6, 11, 0.08) 70%, transparent);
  opacity: 0; transition: opacity 0.6s var(--cst-ease);
  overflow: hidden;
  font-family: var(--cst-display); font-weight: 500; line-height: 1.45; color: var(--cst-bone);
  -webkit-font-smoothing: antialiased;
}
.cst.is-on { opacity: 1; }
.cst.is-out { opacity: 0; transition: opacity 0.5s var(--cst-out) 0.1s; }

/* ---------- Panel ---------- */
.cst__panel {
  position: relative;
  width: min(1180px, 100%);
  border-radius: 26px;
  padding: clamp(1.4rem, 2.6vw, 2.2rem) clamp(1.4rem, 2.8vw, 2.6rem);
  background: rgba(8, 12, 19, 0.66);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 0 0 1px var(--cst-hair), 0 50px 120px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(241, 238, 230, 0.08);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.4rem clamp(2rem, 4vw, 4.5rem); align-items: center;
  transform: translateY(calc(100% + 3rem));
  transition: transform 0.95s var(--cst-ease);
  overflow: hidden;
}
.cst.is-on .cst__panel { transform: none; }
.cst.is-out .cst__panel { transform: translateY(calc(100% + 3rem)); transition: transform 0.55s var(--cst-out); }

/* Lichtstrahl entlang der Oberkante — wie ein Stern, der vorbeizieht */
.cst__panel::before {
  content: ''; position: absolute; top: 0; left: 0; height: 1px; width: 34%;
  background: linear-gradient(90deg, transparent, rgba(241, 238, 230, 0.95) 50%, transparent);
  transform: translateX(-100%); opacity: 0;
}
.cst.is-on .cst__panel::before { animation: cstSweep 3.6s var(--cst-ease) 0.55s infinite; }
@keyframes cstSweep {
  0% { transform: translateX(-100%); opacity: 0; }
  8% { opacity: 1; }
  60% { transform: translateX(300%); opacity: 1; }
  70%, 100% { transform: translateX(300%); opacity: 0; }
}
/* leiser Glanz hinter dem Titel */
.cst__panel::after {
  content: ''; position: absolute; left: -10%; top: -60%; width: 46%; height: 220%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(122, 177, 254, 0.16), transparent 70%);
  opacity: 0; transition: opacity 1.4s var(--cst-ease) 0.4s;
}
.cst.is-on .cst__panel::after { opacity: 1; }

/* ---------- Text ---------- */
.cst__text { position: relative; z-index: 1; display: grid; gap: 0.75rem; align-content: center; }
.cst__eyebrow, .cst__chip, .cst__btn, .cst__links, .cst__lock {
  font-family: var(--cst-mono); font-weight: 500; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.35;
}
.cst__eyebrow { margin: 0; color: var(--cst-mute); }
.cst__title { margin: 0; font-size: clamp(1.7rem, 2.9vw, 2.5rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; }
.cst__title span { display: block; overflow: hidden; }
.cst__title span b { display: block; font-weight: inherit; transform: translateY(110%); transition: transform 0.9s var(--cst-ease); }
.cst.is-on .cst__title span:nth-child(1) b { transform: none; transition-delay: 0.35s; }
.cst.is-on .cst__title span:nth-child(2) b { transform: none; transition-delay: 0.45s; }
.cst__intro { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--cst-mute); max-width: 40ch; }
.cst__intro strong { color: var(--cst-bone); font-weight: 600; }

/* gestaffelte Einblendung */
.cst__eyebrow, .cst__intro, .cst__chip, .cst__detail, .cst__actions, .cst__links {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s var(--cst-ease), transform 0.9s var(--cst-ease);
}
.cst.is-on :is(.cst__eyebrow, .cst__intro, .cst__chip, .cst__detail, .cst__actions, .cst__links) { opacity: 1; transform: none; }
.cst.is-on .cst__eyebrow { transition-delay: 0.3s; }
.cst.is-on .cst__intro { transition-delay: 0.55s; }
.cst.is-on .cst__chip:nth-child(1) { transition-delay: 0.5s; }
.cst.is-on .cst__chip:nth-child(2) { transition-delay: 0.58s; }
.cst.is-on .cst__chip:nth-child(3) { transition-delay: 0.66s; }
.cst.is-on .cst__chip:nth-child(4) { transition-delay: 0.74s; }
.cst.is-on .cst__chip:nth-child(5) { transition-delay: 0.82s; }
.cst.is-on .cst__detail { transition-delay: 0.9s; }
.cst.is-on .cst__actions { transition-delay: 1s; }
.cst.is-on .cst__links { transition-delay: 1.1s; }

/* ---------- Auswahl ---------- */
.cst__pick { position: relative; z-index: 1; display: grid; gap: 0.9rem; align-content: center; }
.cst__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.cst__chip {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 40px; padding: 0 1rem 0 0.7rem;
  border-radius: 999px; border: 1px solid rgba(241, 238, 230, 0.42); background: rgba(241, 238, 230, 0.06);
  color: var(--cst-bone); cursor: pointer; white-space: nowrap; font: inherit;
  font-family: var(--cst-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.cst__chip, .cst__chip i, .cst__chip i::before, .cst__chip i::after {
  transition: background 0.4s var(--cst-ease), border-color 0.4s var(--cst-ease), color 0.4s var(--cst-ease), transform 0.5s var(--cst-ease), opacity 0.4s var(--cst-ease);
}
.cst__chip i { position: relative; width: 18px; height: 18px; border-radius: 50%; flex: none; background: var(--cst-bone); border: 1px solid var(--cst-bone); }
.cst__chip i::before, .cst__chip i::after { content: ''; position: absolute; background: var(--cst-night); border-radius: 1px; }
.cst__chip i::before { width: 2px; height: 5px; left: 5px; top: 7px; transform: rotate(-45deg); transform-origin: center; }
.cst__chip i::after { width: 2px; height: 9px; left: 9.5px; top: 3.5px; transform: rotate(45deg); transform-origin: center; }
.cst__chip[aria-checked="false"] { border-color: var(--cst-hair); background: transparent; color: var(--cst-mute); }
.cst__chip[aria-checked="false"] i { background: transparent; border-color: rgba(241, 238, 230, 0.35); transform: scale(0.85); }
.cst__chip[aria-checked="false"] i::before, .cst__chip[aria-checked="false"] i::after { opacity: 0; transform: scale(0.4); }
.cst__chip:hover, .cst__chip:focus-visible { border-color: var(--cst-bone); color: var(--cst-bone); }
.cst__chip:focus-visible { outline: 2px solid var(--cst-bone); outline-offset: 3px; }
.cst__chip:active { transform: scale(0.97); }
.cst__chip--lock { cursor: default; border-style: dashed; border-color: rgba(241, 238, 230, 0.3); background: transparent; }
.cst__chip--lock i { background: transparent; border-color: rgba(241, 238, 230, 0.6); }
.cst__chip--lock i::before, .cst__chip--lock i::after { background: var(--cst-bone); }
.cst__chip--lock:hover { border-color: rgba(241, 238, 230, 0.3); }
.cst__chip--lock .cst__lock { color: var(--cst-mute); margin-left: 0.2rem; }

.cst__detail { margin: 0; min-height: 2.6em; font-size: 0.86rem; line-height: 1.5; color: var(--cst-mute); max-width: 60ch; }
.cst__detail b { color: var(--cst-bone); font-weight: 600; }
.cst__detail span { display: block; transition: opacity 0.35s var(--cst-ease), transform 0.45s var(--cst-ease); }
.cst__detail.is-swap span { opacity: 0; transform: translateY(6px); }

/* ---------- Buttons ---------- */
.cst__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.cst__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.35rem;
  border: 1px solid currentColor; border-radius: 999px; background: transparent; color: var(--cst-bone);
  position: relative; overflow: hidden; isolation: isolate; cursor: pointer; white-space: nowrap;
  font-size: 0.72rem; transition: color 0.35s var(--cst-ease), background 0.35s var(--cst-ease), border-color 0.35s var(--cst-ease), opacity 0.35s var(--cst-ease);
}
.cst__btn::before { content: ''; position: absolute; inset: 0; background: var(--cst-bone); z-index: -1; transform: translateY(101%); transition: transform 0.45s var(--cst-ease); }
.cst__btn:hover::before, .cst__btn:focus-visible::before { transform: none; }
.cst__btn:hover, .cst__btn:focus-visible { color: var(--cst-night); }
.cst__btn--solid { background: var(--cst-bone); color: var(--cst-night); }
.cst__btn--solid::before { display: none; }
.cst__btn--solid:hover, .cst__btn--solid:focus-visible { opacity: 0.86; }
.cst__btn--ghost { border-color: transparent; color: var(--cst-mute); padding: 0 0.9rem; }
.cst__btn--ghost::before { display: none; }
.cst__btn--ghost:hover, .cst__btn--ghost:focus-visible { color: var(--cst-bone); }
.cst__btn:focus-visible { outline: 2px solid var(--cst-bone); outline-offset: 3px; }
/* Sobald etwas abgewählt ist, wird „Auswahl speichern" die Hauptaktion */
.cst.is-custom [data-c-all] { background: transparent; color: var(--cst-bone); }
.cst.is-custom [data-c-all]::before { display: block; }
.cst.is-custom [data-c-all]:hover, .cst.is-custom [data-c-all]:focus-visible { color: var(--cst-night); }
.cst.is-custom [data-c-save] { background: var(--cst-bone); color: var(--cst-night); }
.cst.is-custom [data-c-save]::before { display: none; }

.cst__links { display: flex; gap: 1.3rem; margin: 0; }
.cst__links a { color: var(--cst-mute); text-decoration: none; transition: color 0.3s var(--cst-ease); }
.cst__links a:hover { color: var(--cst-bone); }

body.is-consent { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cst__panel { grid-template-columns: 1fr; gap: 1.2rem; }
  .cst__intro { max-width: 56ch; }
}
@media (max-width: 640px) {
  .cst { padding: 0; }
  .cst__panel {
    width: 100%; border-radius: 26px 26px 0 0;
    padding: 1.4rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    max-height: 100svh; overflow-y: auto; overscroll-behavior: contain; gap: 1rem;
    background: rgba(8, 12, 19, 0.82);
  }
  .cst__title { font-size: 1.75rem; }
  .cst__intro { font-size: 0.86rem; }
  .cst__more { display: none; }
  .cst__chip { min-height: 38px; font-size: 0.66rem; padding-right: 0.85rem; }
  .cst__detail { font-size: 0.8rem; min-height: 0; }
  .cst__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cst__btn { min-height: 44px; }
  .cst__btn--ghost { grid-column: 1 / -1; min-height: 40px; }
  .cst__links { font-size: 0.64rem; }
}
@media (max-height: 560px) and (min-width: 641px) {
  .cst__panel { padding: 1.1rem 1.6rem; gap: 0.8rem 2rem; }
  .cst__title { font-size: 1.5rem; }
  .cst__intro { display: none; }
  .cst__detail { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cst, .cst__panel, .cst__panel::after, .cst__title span b, .cst__eyebrow, .cst__intro, .cst__chip, .cst__detail, .cst__actions, .cst__links, .cst__btn, .cst__btn::before, .cst__detail span { transition: none; }
  .cst.is-on .cst__panel::before { animation: none; }
}
