.analytics-choice[hidden] { display: none; }
.analytics-choice {
  position: fixed; z-index: 200; inset: auto 16px max(16px, env(safe-area-inset-bottom));
  margin-inline: auto; max-width: 860px; max-height: min(70dvh, 480px); overflow: auto;
  display: flex; align-items: center; gap: 24px; padding: 22px;
  color: var(--text, #fff8f3); background: var(--bg, #130f12);
  border: 1px solid #79646e; border-radius: 18px; box-shadow: 0 12px 48px #0009;
}
.analytics-choice h2 { margin: 0 0 8px; font-size: 18px; }
.analytics-choice p { margin: 6px 0; font-size: 14px; line-height: 1.55; }
.analytics-choice a { color: #ffabb3; text-decoration: underline; }
.analytics-choice-actions { display: flex; flex-shrink: 0; gap: 8px; }
.analytics-choice button, .analytics-preferences {
  font: inherit; cursor: pointer; min-height: 44px; padding: 10px 14px;
  border: 1px solid #b49aa7; border-radius: 12px; color: #fff8f3; background: #251c22;
}
.analytics-choice button:hover, .analytics-preferences:hover { border-color: #ff7b8c; }
.analytics-choice button:focus-visible, .analytics-preferences:focus-visible { outline: 3px solid #ff7b8c; outline-offset: 3px; }
.analytics-choice button:disabled { opacity: .6; cursor: default; }
/* A discreet footer link, styled like its neighbours; there is no notice on entry. */
.lp-footer-links .analytics-preferences { min-width: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: inherit; line-height: inherit; }
.lp-footer-links .analytics-preferences:hover { color: var(--text); }
.analytics-state:empty { display: none; }
.analytics-choice-short { display: none; }
@media (max-width: 680px) {
  /* Compact preferences on phones. Both choices keep the same weight. */
  .analytics-choice { flex-direction: column; align-items: stretch; gap: 8px; inset: auto 8px max(8px, env(safe-area-inset-bottom)); padding: 10px 12px; border-radius: 14px; }
  .analytics-choice > div:first-child { font-size: 13px; line-height: 1.4; }
  .analytics-choice h2 { display: inline; margin: 0 4px 0 0; font-size: 13px; line-height: inherit; }
  .analytics-choice p { font-size: 13px; line-height: inherit; margin: 0; }
  .analytics-choice .analytics-choice-long { display: none; }
  .analytics-choice .analytics-choice-short { display: inline; }
  .analytics-choice .analytics-state:not(:empty) { display: block; margin-top: 4px; }
  .analytics-choice-actions button { flex: 1; min-height: 40px; padding: 8px 12px; }
  /* Keyboard focus is never hidden under the open preferences (WCAG 2.4.11). */
  html:has(.analytics-choice:not([hidden])) { scroll-padding-bottom: 190px; }
}
@media (max-width: 359px) {
  .analytics-choice-actions button { white-space: nowrap; padding: 8px; font-size: 14px; }
}
