/* 访问统计同意入口独立于客服面板，确保未同意也能正常浏览与咨询。 */
.analytics-consent {
  position: fixed;
  z-index: 1200;
  right: 20px;
  bottom: 20px;
  width: min(440px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 18px 20px;
  border: 1px solid #d8dadc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
  color: #222;
  font: 16px/1.55 system-ui, -apple-system, "PingFang SC", sans-serif;
}

.analytics-consent[hidden] { display: none; }
.analytics-consent p { margin: 0 0 14px; }
.analytics-consent a { color: #252525; text-decoration: underline; }
.analytics-consent div { display: flex; justify-content: flex-end; gap: 10px; }
.analytics-consent button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #222;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font: inherit;
  cursor: pointer;
}
.analytics-consent [data-analytics-accept] { background: #222; color: #fff; }
.analytics-consent :is(button, a):focus-visible,
.analytics-settings:focus-visible { outline: 3px solid #596b80; outline-offset: 2px; }

/* 页脚入口用于以后查看说明或撤回同意，不依赖浏览器缓存清理。 */
.analytics-settings {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 600px) {
  .analytics-consent { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}
