.consent {
  font-family: var(--mark-body, "DM Sans", Arial, sans-serif);
  color: var(--mark-midnight, #192b45);
}

.consent-open {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid #ffffff2e;
  border-radius: 999px;
  background: var(--mark-midnight, #192b45);
  box-shadow: 0 10px 30px #101a2a3d;
  color: var(--mark-ivory, #f7f3eb);
  font-size: 12px;
  line-height: 1.2;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.consent-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 34px #101a2a52;
}

.consent-open svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.consent-panel {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 1001;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100svh - 112px);
  overflow: auto;
  padding: 25px;
  border: 1px solid #ccaa796b;
  background: var(--mark-ivory, #f7f3eb);
  box-shadow: 0 20px 55px #101a2a3d;
  color: var(--mark-midnight, #192b45);
  animation: consent-panel-in 180ms ease-out;
}

@keyframes consent-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.consent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.consent-head h2 {
  margin: 0;
  color: var(--mark-midnight, #192b45);
  font-family: var(--mark-display, "Cormorant Garamond", Georgia, serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.025em;
}

.consent-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  margin: -8px -8px 0 0;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--mark-midnight, #192b45);
}

.consent-close svg {
  width: 20px;
  height: 20px;
}

.consent-intro {
  margin: 14px 0 21px;
  color: #43536a;
  font-size: 12px;
  line-height: 1.65;
}

.consent-cats {
  border-top: 1px solid #ccaa7952;
}

.consent-cat {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 11px;
  padding: 16px 0;
  border-bottom: 1px solid #ccaa7952;
}

.consent-cat-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #ccaa7980;
  color: #8a673c;
}

.consent-cat-icon svg {
  width: 19px;
  height: 19px;
}

.consent-cat-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.consent-cat-copy strong {
  color: var(--mark-midnight, #192b45);
  font-size: 12px;
  font-weight: 600;
}

.consent-cat-copy span {
  color: #526173;
  font-size: 10px;
  line-height: 1.5;
}

.consent-switch {
  position: relative;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--mark-slate, #677789);
  transition: background 160ms ease;
}

.consent-switch.is-on {
  background: var(--mark-copper, #ccaa79);
}

.consent-switch.is-locked {
  cursor: default;
  opacity: .72;
}

.consent-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mark-ivory, #f7f3eb);
  box-shadow: 0 1px 4px #192b4540;
  transition: transform 160ms ease;
}

.consent-switch.is-on .consent-knob {
  transform: translateX(18px);
}

.consent-actions {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.consent .consent-actions .button {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  background: var(--mark-copper, #ccaa79);
  color: var(--mark-midnight, #192b45);
  font-size: 11px;
  font-weight: 600;
  transform: none;
}

.consent .consent-actions .button:hover {
  background: #ddc19b;
  transform: none;
}

.consent .consent-actions .button.dark {
  border-color: var(--mark-midnight, #192b45);
  background: var(--mark-midnight, #192b45);
  color: var(--mark-ivory, #f7f3eb);
}

.consent .consent-actions .button.dark:hover {
  background: #2b405e;
}

.consent-necessary,
.consent-policy {
  justify-self: center;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: #526173;
  font-size: 10px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-policy {
  display: block;
  margin: 8px auto 0;
  color: var(--mark-midnight, #192b45);
}

.consent-status {
  min-height: 16px;
  margin: 3px 0 0;
  color: #526173;
  font-size: 10px;
  text-align: center;
}

.consent button:focus-visible {
  outline: 2px solid var(--mark-midnight, #192b45);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--mark-copper, #ccaa79);
}

.consent-open:focus-visible {
  outline-color: var(--mark-ivory, #f7f3eb);
  box-shadow: 0 0 0 2px var(--mark-copper, #ccaa79), 0 10px 30px #101a2a3d;
}

@media (max-width: 760px) {
  .consent-open {
    right: 14px;
    bottom: 14px;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 10px;
  }

  .consent-open svg {
    width: 18px;
    height: 18px;
  }

  .consent-panel {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: calc(100svh - 12px);
    padding: 23px 20px calc(20px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .consent-head h2 { font-size: 30px; }
  .consent-intro { margin-bottom: 17px; }
  .consent-cat { padding: 14px 0; }
  .consent-actions { margin-top: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-panel { animation: none; }
  .consent-open,
  .consent-switch,
  .consent-knob { transition: none; }
}
