.ccRoot {
  --cc-bg: #ffffff;
  --cc-text: #1c2b3a;
  --cc-muted: #5d6b7a;
  --cc-line: rgba(28, 43, 58, 0.12);
  --cc-primary: #285a8c;
  --cc-primary-dark: #1f476e;
  --cc-accent: #e07a3f;
  --cc-soft: #f3ede3;
  --cc-radius: 14px;
  --cc-motion: 0.28s ease;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cc-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99990;
  background: var(--cc-bg);
  box-shadow: 0 -10px 34px rgba(20, 40, 62, 0.18);
  border-top: 3px solid var(--cc-accent);
  transform: translateY(110%);
  transition: transform var(--cc-motion);
}
.cc-banner.cc-visible { transform: translateY(0); }

.cc-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  align-items: center;
  justify-content: space-between;
}
.cc-text { flex: 1 1 320px; min-width: 280px; }
.cc-text h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cc-text);
}
.cc-text p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--cc-muted);
}
.cc-text a { color: var(--cc-primary); font-weight: 700; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.cc-btn {
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 800;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 46px;
  transition: background var(--cc-motion), color var(--cc-motion), transform var(--cc-motion);
}
.cc-btn:hover { transform: translateY(-2px); }
.cc-btn:focus-visible { outline: 3px solid rgba(40, 90, 140, 0.4); outline-offset: 2px; }
.cc-btn-accept { background: var(--cc-accent); color: #fff; }
.cc-btn-accept:hover { background: #c5632c; }
.cc-btn-reject { background: var(--cc-soft); color: var(--cc-text); border-color: var(--cc-line); }
.cc-btn-reject:hover { background: #e8e0d2; }
.cc-btn-config { background: transparent; color: var(--cc-primary); text-decoration: underline; }
.cc-btn-config:hover { background: rgba(40, 90, 140, 0.08); }
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 99991;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cc-motion), visibility var(--cc-motion);
}
.cc-modal.cc-visible { opacity: 1; visibility: visible; }
.cc-modal-veil {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 62, 0.6);
  cursor: pointer;
}
.cc-modal-box {
  position: relative;
  background: var(--cc-bg);
  border-radius: var(--cc-radius);
  width: 92%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 50px rgba(20, 40, 62, 0.28);
}
.cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--cc-line);
}
.cc-modal-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--cc-text); }
.cc-modal-close {
  width: 2.2rem; height: 2.2rem;
  border: none;
  background: var(--cc-soft);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--cc-text);
}
.cc-modal-body { padding: 1.3rem 1.5rem; }
.cc-modal-body > p { margin-top: 0; font-size: 0.94rem; color: var(--cc-muted); }
.cc-modal-foot {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--cc-line);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.cc-cat {
  padding: 1rem 0;
  border-bottom: 1px solid var(--cc-line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.cc-cat:last-child { border-bottom: none; }
.cc-cat h3 { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 800; color: var(--cc-text); }
.cc-cat p { margin: 0; font-size: 0.86rem; color: var(--cc-muted); line-height: 1.5; }

.cc-switch { flex-shrink: 0; }
.cc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cc-switch label {
  display: block;
  width: 50px; height: 28px;
  background: #d8d0c2;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background var(--cc-motion);
}
.cc-switch label::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform var(--cc-motion);
}
.cc-switch input:checked + label { background: var(--cc-primary); }
.cc-switch input:checked + label::after { transform: translateX(22px); }
.cc-switch input:disabled + label { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 640px) {
  .cc-inner { padding: 1.2rem 1rem; }
  .cc-actions { width: 100%; flex-direction: column; }
  .cc-btn { width: 100%; }
  .cc-modal-box { max-height: 100vh; height: 100%; border-radius: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-modal, .cc-btn, .cc-switch label, .cc-switch label::after { transition: none; }
}
@media print { .cc-banner, .cc-modal { display: none !important; } }
