:root {
  --cc-bg: rgba(18, 28, 36, 0.96);
  --cc-surface: #ffffff;
  --cc-text: #273441;
  --cc-muted: #647586;
  --cc-line: #d9e4ee;
  --cc-accent: #4d8f67;
  --cc-focus: #2a64bf;
}

.cc-hidden {
  display: none !important;
}

.cc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 22, 0.46);
  z-index: 85;
}

.cc-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: 980px;
  margin: 0 auto;
  background: var(--cc-surface);
  color: var(--cc-text);
  border: 1px solid var(--cc-line);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 26, 36, 0.22);
  padding: 1rem;
  z-index: 90;
}

.cc-title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 800;
}

.cc-text {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.cc-text a {
  color: #355f47;
  font-weight: 700;
}

.cc-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.62rem 0.84rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  background: #f2f6fa;
  color: #324354;
}

.cc-btn:hover {
  filter: brightness(0.98);
}

.cc-btn:focus-visible,
.cc-toggle:focus-visible,
.cc-manage-btn:focus-visible {
  outline: 3px solid rgba(42, 100, 191, 0.35);
  outline-offset: 2px;
}

.cc-btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #3f7f58, var(--cc-accent));
  box-shadow: 0 8px 18px rgba(77, 143, 103, 0.24);
}

.cc-btn-secondary {
  background: #fff;
  border-color: var(--cc-line);
}

.cc-manage-btn {
  position: fixed;
  left: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 78;
  appearance: none;
  border: 1px solid #c8d6e3;
  border-radius: 999px;
  padding: 0.52rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #324759;
  background: #fff;
  box-shadow: 0 10px 18px rgba(25, 41, 57, 0.12);
  cursor: pointer;
}

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cc-modal-panel {
  width: min(660px, 100%);
  max-height: min(84vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--cc-line);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(14, 24, 34, 0.3);
  padding: 1rem;
}

.cc-modal-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
}

.cc-modal-intro {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--cc-muted);
}

.cc-groups {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.cc-group {
  border: 1px solid var(--cc-line);
  border-radius: 12px;
  padding: 0.62rem;
  background: #fbfdff;
}

.cc-group-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.cc-group-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #314659;
}

.cc-group-desc {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: #66798b;
  line-height: 1.45;
}

.cc-toggle {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #c6d5e3;
  background: #ebf1f7;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.cc-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(18, 33, 45, 0.22);
  transition: transform 0.2s ease;
}

.cc-toggle[aria-checked="true"] {
  background: #dff0e7;
  border-color: #b8d8c4;
}

.cc-toggle[aria-checked="true"]::after {
  transform: translateX(20px);
}

.cc-toggle[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
}

.cc-modal-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cc-note {
  margin-top: 0.55rem;
  color: #6b7e8f;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .cc-banner {
    left: 0.7rem;
    right: 0.7rem;
    bottom: calc(0.72rem + env(safe-area-inset-bottom, 0px));
    padding: 0.82rem;
  }

  .cc-actions .cc-btn {
    width: 100%;
  }

  .cc-manage-btn {
    left: 0.7rem;
    bottom: calc(4.1rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-toggle::after {
    transition: none;
  }
}
