:root {
  --ck-pink: #e51a82;
  --ck-pink-text: #c8146f; /* für Schrift auf Weiß, siehe --pink-text in style.css */
  --ck-white: #ffffff;
  --ck-black: #000000;
  --ck-bg: #f9f3ed;
}

.ck[hidden],
.ck [hidden] { display: none !important; }

.ck {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  background: var(--ck-white);
  color: var(--ck-black);
  border: 2px solid var(--ck-black);
  border-radius: 4px;
  font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-sizing: border-box;
  animation: ck-in .25s ease-out;
}

.ck *,
.ck *::before,
.ck *::after { box-sizing: border-box; }

@keyframes ck-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.ck__title {
  margin: 0 0 8px;
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 800;
}

.ck__text { margin: 0 0 20px; }

.ck a {
  color: var(--ck-black);
  text-decoration-color: var(--ck-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.ck a:hover { color: var(--ck-pink-text); }

/* Buttons */
.ck__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ck__btn {
  flex: 1 1 180px;
  padding: 14px 20px;
  font: 700 1rem/1.2 inherit;
  font-family: inherit;
  color: var(--ck-white);
  border: 2px solid var(--ck-black);
  border-radius: 4px;
  cursor: pointer;
  transition: transform .1s ease, background-color .15s ease, color .15s ease;
}
.ck__btn--pink  { background: var(--ck-pink);  border-color: var(--ck-pink); }
.ck__btn--black { background: var(--ck-black); }
.ck__btn:hover  { transform: translateY(-2px); }
.ck__btn--pink:hover  { background: var(--ck-black); border-color: var(--ck-black); }
.ck__btn--black:hover { background: var(--ck-pink);  border-color: var(--ck-pink); }

.ck__link {
  flex: 0 0 auto;
  padding: 8px 4px;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--ck-black);
  text-decoration: underline;
  text-decoration-color: var(--ck-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ck__link:hover { color: var(--ck-pink-text); }

.ck button:focus-visible,
.ck a:focus-visible,
.ck input:focus-visible + .ck__slider {
  outline: 3px solid var(--ck-black);
  outline-offset: 3px;
}

/* Einstellungsliste */
.ck__list {
  list-style: none;
  margin: 12px 0 24px;
  padding: 0;
  border-top: 2px solid var(--ck-black);
}

.ck__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ck-black);
}

.ck__item-text { display: flex; flex-direction: column; gap: 2px; }
.ck__item-text span { font-size: .92rem; }

/* Toggle Schalter */
.ck__switch { position: relative; flex: 0 0 auto; width: 52px; height: 28px; cursor: pointer; }
.ck__switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }

.ck__slider {
  position: absolute;
  inset: 0;
  background: var(--ck-white);
  border: 2px solid var(--ck-black);
  border-radius: 999px;
  transition: background-color .15s ease;
}
.ck__slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--ck-black);
  border-radius: 50%;
  transition: transform .15s ease, background-color .15s ease;
}
.ck__switch input:checked + .ck__slider { background: var(--ck-pink); border-color: var(--ck-pink); }
.ck__switch input:checked + .ck__slider::before { transform: translateX(24px); background: var(--ck-white); }
.ck__switch input:disabled + .ck__slider { opacity: .55; }
.ck__switch input:disabled { cursor: not-allowed; }

/* Mobil: Karte als Sheet am unteren Rand */
@media (max-width: 600px) {
  .ck {
    left: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    padding: 20px 16px;
    border-width: 2px 0 0;
    border-radius: 0;
    box-shadow: 0 -6px 0 var(--ck-pink);
    animation: ck-in-mobile .25s ease-out;
  }
  .ck__btn { flex: 1 1 100%; }
  .ck__link { width: 100%; text-align: center; }
}
@keyframes ck-in-mobile {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ck, .ck__btn, .ck__slider, .ck__slider::before { animation: none; transition: none; }
}
