.analytics-consent[hidden], .analytics-preferences[hidden], .analytics-settings[hidden], .analytics-consent button[hidden] { display: none !important; }
.analytics-consent {
  position: fixed; z-index: 10000; bottom: max(.65rem, env(safe-area-inset-bottom)); left: .75rem; right: .75rem;
  width: auto; max-width: 1100px; margin-inline: auto;
  max-height: calc(100dvh - 1.5rem); overflow-y: auto;
  display: flex; align-items: center; gap: 1.25rem;
  box-sizing: border-box; padding: .85rem 1rem; border-radius: 1rem;
  background: var(--card-bg, #fff); color: var(--text, #24324b); border: 1px solid var(--border, #dce0ff);
  box-shadow: 0 5px 28px #20255720; font: 400 .8125rem/1.45 system-ui, sans-serif;
}
.analytics-consent-copy { flex: 1; min-width: 0; }
.analytics-consent h2 { font-size: .875rem; margin: 0 0 .2rem; color: inherit; }
.analytics-consent p { margin: 0; overflow-wrap: anywhere; }
.analytics-consent [data-consent-status] { margin-top: .35rem; }
.analytics-consent [data-consent-status]:empty { display: none; }
.analytics-consent-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: .5rem; }
.analytics-consent button {
  font: 600 .8125rem/1.3 system-ui, sans-serif; cursor: pointer;
  border: 1px solid #b8b4fd; background: #eeedff; color: #4035a3;
  border-radius: .7rem; padding: .6rem .85rem; min-height: 44px;
}
.analytics-consent button:focus-visible, .analytics-settings:focus-visible { outline: 3px solid #7364ff; outline-offset: 3px; }
.analytics-consent button:hover { background: #e0ddff; }
.analytics-preferences { position: relative; z-index: 1; padding: .8rem 1rem; text-align: center; }
.analytics-settings {
  position: static; display: inline; border: 0; border-radius: 0; box-shadow: none;
  padding: .5rem; min-height: 44px; background: transparent;
  color: var(--muted, #68758e); font: 400 .75rem/1.4 system-ui, sans-serif;
  text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.analytics-settings:hover { color: var(--accent, #6254d9); }
:is(html[data-theme="dark"],body[data-theme="dark"],body.dark,body.dark-mode) .analytics-consent {
  background: #202b42; color: #edf0ff; border-color: #4c527c;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .analytics-consent { background: #202b42; color: #edf0ff; border-color: #4c527c; }
}
@media (max-width: 640px) {
  .analytics-consent { left: .5rem; right: .5rem; padding: .75rem; flex-direction: column; align-items: stretch; gap: .65rem; }
  .analytics-consent-actions > button { flex: 1 1 0; }
}
