html body #ctl-analytics-consent.ctl-analytics-consent {
  position: fixed !important;
  inset: auto 0 0 0 !important;
  z-index: 2147483000 !important;
  display: grid !important;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr) auto !important;
  column-gap: clamp(2rem, 4vw, 5.6rem) !important;
  align-items: center !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 7.2rem !important;
  margin: 0 !important;
  padding: 1.6rem clamp(1.8rem, 4vw, 5.6rem) calc(1.6rem + env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-top: 0.1rem solid rgba(246, 241, 235, 0.18) !important;
  border-radius: 0 !important;
  background: #11110f !important;
  color: #f6f1eb !important;
  box-shadow: 0 -1.2rem 4rem rgba(0, 0, 0, 0.18) !important;
  font-family: var(--font-body-family), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 1.3rem !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__title {
  margin: 0 !important;
  color: #f6f1eb !important;
  font-family: var(--font-body-family), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__text {
  max-width: 68rem !important;
  margin: 0 !important;
  color: rgba(246, 241, 235, 0.78) !important;
  font-size: 1.3rem !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.8rem !important;
  margin: 0 !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button,
html body #ctl-analytics-consent .ctl-analytics-consent__link {
  min-height: 3.8rem !important;
  border-radius: 0 !important;
  font-family: var(--font-body-family), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button {
  cursor: pointer !important;
  padding: 1rem 1.7rem !important;
  border: 0.1rem solid #f6f1eb !important;
  background: #f6f1eb !important;
  color: #11110f !important;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button:hover {
  border-color: rgba(246, 241, 235, 0.72) !important;
  background: rgba(246, 241, 235, 0.86) !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button--secondary {
  background: transparent !important;
  color: #f6f1eb !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button--secondary:hover {
  background: rgba(246, 241, 235, 0.12) !important;
  color: #f6f1eb !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__link {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.8rem 0 !important;
  color: rgba(246, 241, 235, 0.72) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 0.1rem !important;
  text-underline-offset: 0.4rem !important;
  white-space: nowrap !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__link:hover {
  color: #f6f1eb !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button:focus-visible,
html body #ctl-analytics-consent .ctl-analytics-consent__link:focus-visible {
  outline: 0.2rem solid #f6f1eb !important;
  outline-offset: 0.3rem !important;
  box-shadow: none !important;
}

@media screen and (max-width: 989px) {
  html body #ctl-analytics-consent.ctl-analytics-consent {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 1rem !important;
    align-items: start !important;
    min-height: 0 !important;
    padding: 1.6rem 2rem calc(1.6rem + env(safe-area-inset-bottom)) !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__title {
    max-width: 44rem !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__text {
    max-width: 62rem !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__actions {
    justify-content: flex-start !important;
    width: 100% !important;
  }
}

@media screen and (max-width: 520px) {
  html body #ctl-analytics-consent.ctl-analytics-consent {
    padding: 1.5rem 1.4rem calc(1.5rem + env(safe-area-inset-bottom)) !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__text {
    font-size: 1.25rem !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.8rem !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__button {
    width: 100% !important;
    padding-inline: 1rem !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__link {
    grid-column: 1 / -1 !important;
    justify-content: center !important;
    min-height: 3rem !important;
  }
}

@media (forced-colors: active) {
  html body #ctl-analytics-consent.ctl-analytics-consent {
    border-top: 0.1rem solid ButtonText !important;
    background: Canvas !important;
    color: CanvasText !important;
    box-shadow: none !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__title,
  html body #ctl-analytics-consent .ctl-analytics-consent__text {
    color: CanvasText !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__button {
    forced-color-adjust: none;
    border-color: ButtonText !important;
    background: ButtonFace !important;
    color: ButtonText !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__button--secondary {
    background: Canvas !important;
    color: CanvasText !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__link {
    color: LinkText !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body #ctl-analytics-consent .ctl-analytics-consent__button,
  html body #ctl-analytics-consent .ctl-analytics-consent__link {
    transition: none !important;
  }
}

/* ===== 4-category extension (preferences/statistics/marketing toggles) ===== */
html body #ctl-analytics-consent .ctl-analytics-consent__button--ghost {
  background: transparent !important;
  color: #f6f1eb !important;
  border: 0.1rem solid rgba(246, 241, 235, 0.42) !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__categories {
  grid-column: 1 / -1 !important;
  margin-top: 1.4rem !important;
  padding-top: 1.2rem !important;
  border-top: 0.1rem solid rgba(246, 241, 235, 0.18) !important;
  display: grid !important;
  gap: 0.8rem !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__category {
  border: 0.1rem solid rgba(246, 241, 235, 0.18) !important;
  border-radius: 0 !important;
  padding: 0.9rem 1.2rem !important;
  background: rgba(246, 241, 235, 0.04) !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__cat-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1.2rem !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__cat-name {
  color: #f6f1eb !important;
  font-family: var(--font-body-family), ui-sans-serif, system-ui, sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__cat-desc {
  margin: 0.4rem 0 0 !important;
  color: rgba(246, 241, 235, 0.7) !important;
  font-size: 1.2rem !important;
  line-height: 1.45 !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__switch {
  position: relative !important;
  display: inline-block !important;
  width: 3.6rem !important;
  height: 2rem !important;
  flex-shrink: 0 !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__switch input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__slider {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(246, 241, 235, 0.2) !important;
  border-radius: 999px !important;
  transition: background 0.15s !important;
  cursor: pointer !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__slider::after {
  content: "" !important;
  position: absolute !important;
  top: 0.2rem !important;
  left: 0.2rem !important;
  width: 1.6rem !important;
  height: 1.6rem !important;
  background: #f6f1eb !important;
  border-radius: 50% !important;
  transition: transform 0.15s !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__switch input:checked + .ctl-analytics-consent__slider {
  background: #c9a96a !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__switch input:checked + .ctl-analytics-consent__slider::after {
  transform: translateX(1.6rem) !important;
  background: #11110f !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__switch input:disabled + .ctl-analytics-consent__slider {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

html body #ctl-analytics-consent .ctl-analytics-consent__button--save {
  margin-top: 0.6rem !important;
  justify-self: start !important;
}

@media screen and (max-width: 520px) {
  html body #ctl-analytics-consent .ctl-analytics-consent__button--save {
    width: 100% !important;
    justify-self: stretch !important;
  }
}

/* ===== Mobile: cap height + scroll inside (avoid full-screen takeover) ===== */
html body #ctl-analytics-consent.ctl-analytics-consent {
  max-height: calc(100vh - 2rem) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

@media screen and (max-width: 800px) {
  html body #ctl-analytics-consent.ctl-analytics-consent {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "title"
      "text"
      "actions"
      "categories" !important;
    row-gap: 1rem !important;
    max-height: 75vh !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__title { grid-area: title !important; }
  html body #ctl-analytics-consent .ctl-analytics-consent__text { grid-area: text !important; }
  html body #ctl-analytics-consent .ctl-analytics-consent__actions { grid-area: actions !important; }
  html body #ctl-analytics-consent .ctl-analytics-consent__categories { grid-area: categories !important; }
}

@media screen and (max-width: 520px) {
  html body #ctl-analytics-consent.ctl-analytics-consent {
    max-height: 78vh !important;
    padding: 1.4rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom)) !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__category {
    padding: 0.8rem 1rem !important;
  }

  html body #ctl-analytics-consent .ctl-analytics-consent__cat-desc {
    font-size: 1.1rem !important;
  }
}

/* Fix: ensure [hidden] beats display:grid for the customize panel */
html body #ctl-analytics-consent .ctl-analytics-consent__categories[hidden] {
  display: none !important;
}
