.analytics-settings {
  display: block;
  width: fit-content;
  min-height: 44px;
  margin: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.analytics-settings[hidden],
.analytics-consent[hidden] { display: none; }
.analytics-consent,
.analytics-dialog {
  padding: 26px;
  border: 1px solid var(--line, #dbe2dd);
  border-radius: 20px;
  background: var(--white, #fff);
  color: var(--ink, #17272b);
  box-shadow: 0 12px 50px rgb(23 39 43 / 16%);
  font: 0.94rem/1.6 var(--body, Arial, sans-serif);
}
.analytics-consent {
  position: fixed;
  z-index: 110;
  bottom: 24px;
  left: 24px;
  width: min(550px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.analytics-consent h2,
.analytics-dialog h2 {
  max-width: 440px;
  margin: 0 0 12px;
  font: 600 clamp(1.4rem, 3vw, 1.8rem)/1.15 var(--display, Arial, sans-serif);
  letter-spacing: -0.035em;
}
.analytics-consent p,
.analytics-dialog p { margin: 0 0 18px; color: var(--muted, #586769); }
.analytics-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.analytics-consent__actions button {
  flex: 1 1 170px;
  min-height: 48px;
  padding: 10px 17px;
  border: 1px solid var(--accent, #5355cf);
  border-radius: 10px;
  background: var(--white, #fff);
  color: var(--accent-dark, #3033a5);
  font-weight: 700;
}
.analytics-consent__actions button:hover { background: var(--blue, #e8edff); }
.analytics-consent__policy { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--muted, #586769); font-size: 0.85rem; }
.analytics-dialog {
  position: fixed;
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
.analytics-dialog::backdrop { background: rgb(12 21 25 / 48%); }
.analytics-dialog h2 { padding-right: 32px; }
.analytics-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper, #f7f8f5);
  color: var(--ink, #17272b);
  font-size: 1.6rem;
  line-height: 1;
}
.analytics-dialog__status { font-size: 0.87rem; font-weight: 700; }
.analytics-settings:focus-visible,
.analytics-consent :focus-visible,
.analytics-dialog :focus-visible { outline: 3px solid var(--accent, #5355cf); outline-offset: 4px; }
@media (max-width: 600px) {
  .analytics-consent { bottom: 12px; left: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 20px; }
  .analytics-dialog { padding: 24px 20px 20px; }
  .analytics-consent__actions { gap: 8px; }
  .analytics-consent__actions button { flex-basis: 100%; }
}
