.analytics-preferences { display: block; width: 100%; max-width: 64rem; margin: 1.5rem auto 0; text-align: left; font: 1rem/1.5 var(--font-body, "Patrick Hand", sans-serif); }
.analytics-preferences summary { cursor: pointer; min-height: 44px; padding-block: .5rem; }
.analytics-preferences p { max-width: 65ch; margin-block: .75rem; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: .75rem; }
.analytics-actions button { min-height: 44px; padding: .5rem .25rem; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }
.analytics-preferences :is(button, summary, a):focus-visible { outline: 2px dashed currentColor; outline-offset: 4px; }
.analytics-actions button:disabled { cursor: default; opacity: .65; }

/* A visible first choice; the footer summary reopens these same settings. */
.analytics-preferences[data-floating="true"][open] {
  position: fixed;
  z-index: 1000;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  box-sizing: border-box;
  width: min(31rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1px dashed currentColor;
  border-radius: 9px 15px 8px 13px;
  background: var(--theme-paper, #1b1e1c);
  color: var(--theme-ink, #f4f1e6);
  scrollbar-color: currentColor var(--theme-paper, #1b1e1c);
  scrollbar-width: thin;
}
.analytics-preferences[data-floating="true"][open] summary { font-size: 1.2rem; }
.analytics-preferences[data-floating="true"][open] .analytics-actions { gap: .75rem; }
.analytics-preferences[data-floating="true"][open] .analytics-actions button {
  flex: 1 1 10rem;
  padding: .65rem .5rem;
  border: 1px solid currentColor;
  border-radius: 5px 8px 6px 9px;
  text-decoration: none;
}
.analytics-preferences[data-floating="true"][open] .analytics-actions button:hover:not(:disabled) { background: var(--theme-hover, #303833); }
@media (max-height: 35rem) {
  .analytics-preferences[data-floating="true"][open] { max-height: calc(100dvh - 1rem); bottom: .5rem; }
}
