.analytics-preferences {
  position: fixed;
  z-index: 10;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  inline-size: min(34rem, calc(100% - 32px));
  max-block-size: calc(100dvh - 32px);
  overflow: auto;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #ab7858;
  border-radius: 9px;
  background: #231d19;
  color: #f3eee6;
  box-shadow: 0 14px 48px #0007;
}

.analytics-preferences h2 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
}

.analytics-preferences p {
  margin: 0 0 10px;
  color: #e5dbcf;
  font-size: .925rem;
  line-height: 1.55;
}

.analytics-preferences a,
.analytics-settings {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-preferences a { color: #ffcb94; }

.analytics-settings,
.analytics-actions button {
  min-block-size: 44px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}

.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 14px;
}

.analytics-actions button {
  border: 1px solid #ab7858;
  border-radius: 4px;
  color: #f3eee6;
}

.analytics-actions button:hover { background: #403027; }
.analytics-preferences :focus-visible { outline-color: #ffb76b; }
