.analytics-notice {
  position: fixed;
  z-index: 20000;
  inset: auto 20px 20px auto;
  width: min(440px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-sizing: border-box;
  padding: 22px;
  border: 1px solid #ef9a52;
  border-radius: 18px;
  background: #20140f;
  color: #fff6e8;
  box-shadow: 0 12px 50px #0008;
  font: 15px/1.5 system-ui, sans-serif;
}
.analytics-notice[hidden] { display: none; }
.analytics-notice h2 {
  margin: 0 0 10px;
  font: 700 21px/1.2 system-ui, sans-serif;
  letter-spacing: 0;
}
.analytics-notice p { margin: 10px 0; }
.analytics-notice summary { cursor: pointer; padding-block: 6px; }
.analytics-notice a { color: #ffd19c; text-decoration: underline; }
.analytics-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.analytics-actions button,
.analytics-settings {
  font: 600 14px/1.3 system-ui, sans-serif;
  min-height: 44px;
  cursor: pointer;
}
.analytics-actions button {
  flex: 1 1 150px;
  padding: 12px;
  color: #fff6e8;
  background: #39261c;
  border: 1px solid #ef9a52;
  border-radius: 8px;
}
.analytics-actions button:hover { background: #563b29; }
.analytics-notice :focus-visible,
.analytics-settings:focus-visible { outline: 3px solid #fff6e8; outline-offset: 3px; }
.analytics-settings {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  padding: 10px;
}
.analytics-status:empty { display: none; }
@media (max-width: 600px) {
  .analytics-notice {
    inset: auto 10px calc(80px + env(safe-area-inset-bottom)) 10px;
    width: auto;
    max-height: calc(100dvh - 110px - env(safe-area-inset-bottom));
    padding: 18px;
  }
}
