.analytics-settings-link[hidden],
#analytics-choices[hidden],
#analytics-choices [hidden] {
  display: none;
}
footer .analytics-settings-link {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
footer .analytics-settings-link:hover {
  color: var(--text);
  text-decoration: underline;
}
#analytics-choices {
  position: fixed;
  z-index: 48;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 32px));
  max-height: min(320px, 60dvh);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 5px 28px #0002;
}
#analytics-choices h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
}
#analytics-choices p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
#analytics-choices a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .14em;
}
.analytics-actions {display: flex; gap: 8px; flex-wrap: wrap;}
#analytics-choices button {
  flex: 1 1 110px;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
#analytics-choices button:hover {background: var(--tint);}
.analytics-settings-link:focus-visible,
#analytics-choices :focus-visible {outline: 2px solid var(--accent); outline-offset: 2px;}
@media (max-width: 650px) {
  body:has(.site-information) #analytics-choices {bottom: calc(78px + env(safe-area-inset-bottom));}
}
