.ck-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px max(24px, calc((100vw - 1200px) / 2));
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 40px var(--shadow);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.ck-banner.is-visible { transform: none; opacity: 1; }

.ck-art { flex: none; width: 72px; height: 72px; }
.ck-copy { flex: 1 1 auto; min-width: 0; }

.ck-title { margin: 0 0 6px; font-size: 22px; font-weight: var(--fw-head); }

.ck-text { margin: 0; font-size: 16px; line-height: 1.45; color: var(--muted); }

.ck-text a { color: var(--accent); }

.ck-actions { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }

.ck-link {
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 16px;
  font-weight: var(--fw-head);
  cursor: pointer;
}

.ck-link:hover { background: var(--hover); }
.ck-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ck-btn {
  flex: 1 1 auto;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: var(--fw-head);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.ck-btn:hover { background: var(--hover); }
.ck-btn:active { transform: scale(0.98); }
.ck-btn:focus-visible, .ck-switch input:focus-visible + .ck-slider { outline: 2px solid var(--accent); outline-offset: 2px; }

.ck-btn--primary {
  border-color: transparent;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.ck-btn--primary:hover { filter: brightness(1.08); }

.ck-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay);
}

.ck-overlay.is-open { display: flex; }

.ck-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px var(--shadow);
}

.ck-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 4px; }
.ck-head h2 { margin: 0; font-size: 22px; font-weight: var(--fw-head); }

.ck-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.ck-close:hover { background: var(--hover); color: var(--text); }

.ck-body { padding: 8px 20px; overflow-y: auto; }

.ck-intro { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: var(--muted); }

.ck-cat { padding: 14px 0; border-top: 1px solid var(--line); }
.ck-cat:first-of-type { border-top: 0; }
.ck-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ck-cat h3 { margin: 0; font-size: 17px; font-weight: var(--fw-head); }
.ck-cat p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.ck-always { font-size: 13px; color: var(--accent); white-space: nowrap; }

.ck-switch { position: relative; flex: none; width: 46px; height: 26px; }
.ck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }

.ck-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--switch-off);
  transition: background 0.2s;
}

.ck-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.ck-switch input:checked + .ck-slider { background: var(--accent); }
.ck-switch input:checked + .ck-slider::after { transform: translateX(20px); }

.ck-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }

.foot-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.foot-link:hover { color: var(--text); }

@media (max-width: 900px) {
  .ck-banner { flex-wrap: wrap; padding: 16px; gap: 16px; }
  .ck-art { width: 56px; height: 56px; }
  .ck-copy { flex-basis: calc(100% - 72px); }
  .ck-actions { flex: 1 1 100%; justify-content: stretch; }
  .ck-actions .ck-btn { flex: 1 1 0; }
  .ck-link { flex: 1 1 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-banner, .ck-btn, .ck-slider, .ck-slider::after { transition: none; }
}
