.analytics-consent {
  position: fixed;
  z-index: 20;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: min(370px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 16px;
  border: 1px solid #cfb6a3;
  border-radius: 14px;
  color: #292127;
  background: #fff8ed;
  box-shadow: 0 6px 28px #2b182838;
  font: 14px/1.45 Arial, sans-serif;
}
.analytics-consent[hidden], .analytics-settings[hidden] { display: none !important; }
.analytics-consent h2 { margin: 0 0 6px; font-size: 17px; color: #a00040; }
.analytics-consent p { margin: 0 0 10px; }
.analytics-consent summary { cursor: pointer; font-size: 13px; text-decoration: underline; }
.analytics-consent details p { margin-top: 8px; font-size: 13px; }
.analytics-consent a { color: #8f003d; }
.analytics-actions { display: flex; gap: 8px; margin-top: 12px; }
.analytics-actions button {
  flex: 1;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #a00040;
  border-radius: 8px;
  background: #fff8ed;
  color: #8f003d;
  font: 600 13px/1.25 Arial, sans-serif;
  cursor: pointer;
}
.analytics-actions button:hover { background: #f8e2eb; }
.analytics-consent :focus-visible, .analytics-settings:focus-visible { outline: 3px solid #7baf0c; outline-offset: 3px; }
.analytics-settings {
  position: fixed;
  z-index: 19;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(10px, env(safe-area-inset-bottom));
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #cbb49e;
  border-radius: 20px;
  background: #fff8edf2;
  color: #713047;
  font: 12px/1.3 Arial, sans-serif;
  cursor: pointer;
}
@media (max-width: 520px) {
  .analytics-consent { padding: 12px; font-size: 13px; line-height: 1.4; }
  .analytics-consent h2 { font-size: 16px; }
  .analytics-actions { margin-top: 8px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .analytics-consent { left: auto; right: max(12px, env(safe-area-inset-right)); top: 12px; bottom: auto; width: 330px; padding: 12px; }
}
