.analytics-footer {
  padding: .5rem 1rem;
  text-align: center;
  background: var(--color-canvas, #f4f6f5);
}
.analytics-settings, .footer-legal {
  padding: .5rem .25rem;
  border: 0;
  background: transparent;
  color: var(--color-secondary, #454b48);
  font: inherit;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}
.analytics-footer .footer-legal { margin-inline-start: .75rem; }
#analytics-consent {
  position: fixed;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  z-index: 30;
  box-sizing: border-box;
  width: min(27rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  color: var(--color-ink, #202723);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-control, #a5b1aa);
  border-radius: .75rem;
  box-shadow: 0 .4rem 1.8rem #19221e29;
  font: 400 .9375rem/1.5 var(--font-body, 'DM Sans', Arial, sans-serif);
  text-align: start;
  overflow-wrap: anywhere;
}
#analytics-consent::backdrop { background: #19221e45; }
/* Defer the automatic prompt during registration. The footer still opens settings as a modal. */
#root:empty ~ #analytics-consent:not(:modal),
#root:has(.registration-pending) ~ #analytics-consent:not(:modal) { display: none; }
#analytics-consent .analytics-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#analytics-consent h2 {
  margin: 0;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
}
#analytics-consent p { margin: .5rem 0; font: inherit; color: inherit; }
#analytics-consent a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }
#analytics-consent button { font-family: inherit; color: inherit; cursor: pointer; }
#analytics-consent .analytics-close {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
}
#analytics-consent .analytics-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .875rem;
}
#analytics-consent .analytics-actions button {
  min-height: 2.75rem;
  padding: .45rem;
  border: 1px solid var(--color-control, #a5b1aa);
  border-radius: .375rem;
  background: var(--color-surface, #fff);
  font-size: .9375rem;
  font-weight: 600;
}
#analytics-consent .analytics-actions button:enabled:hover { background: var(--color-inset, #eff2f0); }
#analytics-consent .analytics-actions button:disabled { opacity: .65; cursor: default; }
#analytics-consent .analytics-status { font-size: .875rem; }
#analytics-consent .analytics-error { color: var(--color-danger, #972f2b); }
#analytics-consent p:empty { margin: 0; }
#analytics-consent :focus-visible, .analytics-settings:focus-visible { outline: 3px solid var(--color-focus, #265ea5); outline-offset: 2px; }
