.cookie-consent-banner {
  position: fixed;
  z-index: 95;
  inset-inline: clamp(12px, 3vw, 32px);
  bottom: calc(76px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
}

.cookie-consent-banner[hidden] { display: none; }

.cookie-consent-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1040px);
  border: 1px solid rgb(var(--c-tint) / .3);
  background: color-mix(in srgb, rgb(var(--c-surface)) 96%, rgb(var(--c-accent)) 4%);
  box-shadow: 0 18px 54px rgb(var(--c-shadow) / .3);
}

.cookie-consent-copy { min-width: 0; }
.cookie-consent-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cookie-consent-heading .material-symbols-outlined { color: rgb(var(--c-accent)); }
.cookie-consent-heading h2 { margin: 0; }
.cookie-consent-copy > p { margin: 0; color: rgb(var(--c-on-bg-dim)); }
.cookie-consent-policy { color: rgb(var(--c-accent)); text-decoration: underline; text-underline-offset: 3px; }
.cookie-consent-policy:hover { color: rgb(var(--c-primary)); }
.cookie-consent-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.site-footer-cookie-settings { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.site-footer-cookie-settings:hover { color: rgb(var(--c-accent)); }
.site-footer-cookie-settings:focus-visible { outline: 2px solid rgb(var(--c-accent)); outline-offset: 3px; border-radius: 3px; }

.cookie-preferences-dialog { width: min(520px, calc(100vw - 24px)); }
.cookie-preferences-list { display: grid; gap: 10px; }
.cookie-preference-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgb(var(--c-tint) / .2);
  border-radius: 12px;
  background: rgb(var(--c-tint) / .04);
}
.cookie-preference-item h3 { margin: 0 0 3px; color: rgb(var(--c-on-bg)); }
.cookie-preference-item p { margin: 0; color: rgb(var(--c-on-bg-dim)); }
.cookie-preference-status { flex: 0 0 auto; color: rgb(var(--c-on-bg-dim)); font-size: var(--type-caption); }
.cookie-preference-item:first-child .cookie-preference-status { color: rgb(var(--c-accent)); }
.cookie-preferences-storage-note { display: block; margin-top: 14px; }
.cookie-preferences-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }

@media (min-width: 768px) {
  .cookie-consent-banner { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 600px) {
  .cookie-consent-card { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px; }
  .cookie-consent-actions { justify-content: stretch; }
  .cookie-consent-actions > * { flex: 1 1 150px; }
  .cookie-preference-item { flex-direction: column; gap: 6px; }
}
