.analytics-consent {
  position: fixed;
  z-index: 10000;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 760px;
  margin-left: auto;
  padding: 1rem 1.1rem;
  color: var(--text, #f5f6fb);
  background: rgba(18, 18, 28, 0.96);
  border: 1px solid var(--cyan, var(--accent, #8d73f6));
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  font: 500 0.88rem/1.45 system-ui, sans-serif;
}

.analytics-consent[hidden],
.analytics-preferences[hidden] {
  display: none !important;
}

.analytics-consent-copy strong {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--cyan, var(--accent, #8d73f6));
  font-size: 0.96rem;
}

.analytics-consent-copy p {
  margin: 0;
  color: var(--muted, #b8bfcb);
}

.analytics-consent-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.55rem;
}

.analytics-consent button,
.analytics-preferences {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
  font: 700 0.78rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.analytics-consent .analytics-consent-allow {
  color: #090a10;
  background: var(--cyan, var(--accent, #8d73f6));
  border-color: transparent;
}

.analytics-consent button:focus-visible,
.analytics-preferences:focus-visible {
  outline: 3px solid var(--focus, #f6d98b);
  outline-offset: 3px;
}

.analytics-preferences {
  position: fixed;
  z-index: 9999;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  color: var(--muted, #b8bfcb);
  background: rgba(18, 18, 28, 0.88);
  backdrop-filter: blur(10px);
}

@media (max-width: 680px) {
  .analytics-consent {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent,
  .analytics-preferences {
    scroll-behavior: auto;
  }
}
