.analytics-panel[hidden] { display: none; }
.analytics-panel {
  position: fixed;
  z-index: 90;
  inset: auto 20px max(20px, env(safe-area-inset-bottom)) auto;
  width: min(440px, calc(100% - 40px));
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 22px;
  background: #fff;
  color: #102f32;
  border: 1px solid #d5dfe0;
  border-radius: 12px;
  box-shadow: 0 5px 28px #102f3220;
  font-family: inherit;
}
.analytics-panel > strong { display: block; font-size: 18px; line-height: 1.4; }
.analytics-panel p { margin: 10px 0 16px; font-size: 14px; line-height: 1.55; }
.analytics-panel a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.analytics-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.analytics-choices button {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #194e55;
  border-radius: 5px;
  color: #102f32;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}
.analytics-choices button:hover { background: #eef4f4; }
.analytics-panel .analytics-status { margin-bottom: 0; font-size: 12px; }
.analytics-preferences { padding-bottom: 20px; }
.analytics-preferences button {
  min-height: 44px; padding: 8px 0; border: 0; background: none;
  color: inherit; font: inherit; font-size: 14px; text-decoration: underline;
  text-underline-offset: 4px; cursor: pointer;
}
.analytics-panel button:focus-visible, .analytics-preferences button:focus-visible { outline: 3px solid #1a6975; outline-offset: 3px; }
@media (max-width: 480px) {
  .analytics-panel {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    padding: 18px;
    /* Keep mobile choices stationary when the page's webfont finishes loading. */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
}
