.analytics-consent {
  position: fixed;
  z-index: 1000;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  width: min(680px, calc(100vw - 36px));
  padding: 20px;
  color: var(--ink, #f6f1ff);
  background: color-mix(in srgb, var(--surface, var(--glass, #17111f)) 94%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  border-radius: 22px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(22px) saturate(135%);
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}

.analytics-consent.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.analytics-consent strong { display: block; margin-bottom: 5px; font: 650 16px/1.25 system-ui, sans-serif; }
.analytics-consent p { margin: 0 0 6px; color: color-mix(in srgb, currentColor 72%, transparent); font: 400 14px/1.55 system-ui, sans-serif; }
.analytics-consent a { color: inherit; font: 600 13px/1.4 system-ui, sans-serif; text-underline-offset: 3px; }
.analytics-consent__actions { display: flex; flex-wrap: wrap; align-content: center; justify-content: flex-end; gap: 8px; max-width: 230px; }
.analytics-consent button { min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font: 650 13px/1 system-ui, sans-serif; }
.analytics-consent__primary { color: #160f1d; background: #d8c5ff; }
.analytics-consent__secondary { color: inherit; background: transparent; border-color: color-mix(in srgb, currentColor 24%, transparent) !important; }
.analytics-consent__quiet { color: inherit; background: color-mix(in srgb, currentColor 8%, transparent); }
.analytics-settings-link { margin: 10px auto 0; padding: 0; color: inherit; opacity: .66; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.analytics-settings-link:hover { opacity: 1; }
.site-footer > .analytics-settings-link { grid-column: 1 / -1; justify-self: center; }

@media (max-width: 640px) {
  .analytics-consent { grid-template-columns: 1fr; gap: 14px; }
  .analytics-consent__actions { justify-content: flex-start; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent { transition: none; }
}
