.emg-analytics-panel,
.emg-analytics-preferences {
  font-family: Figtree, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #193d34;
}
.emg-analytics-panel {
  position: fixed;
  z-index: 100;
  inset-inline: 24px;
  bottom: 24px;
  width: min(640px, calc(100% - 48px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px;
  background: #fafbf8;
  border: 1px solid #b7cabd;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  text-align: start;
}
.emg-analytics-panel[hidden] { display: none !important; }
.emg-analytics-panel h2 {
  margin: 0 0 10px;
  font: 600 20px/1.35 Figtree, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -.015em;
}
.emg-analytics-panel p { margin: 0 0 16px; max-width: 68ch; color: #3f5e51; font-size: inherit; line-height: inherit; }
.emg-analytics-panel a { color: #17503d; text-decoration: underline; text-underline-offset: 3px; }
.emg-analytics-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.emg-analytics-choice {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  background: #fff;
  color: #193d34;
  border: 1px solid #236b53;
  border-radius: 8px;
  font: 600 15px/1.45 Figtree, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.emg-analytics-choice:hover { background: #e9f2ec; }
.emg-analytics-panel .emg-analytics-status { margin: 14px 0 0; font-size: 14px; }
.emg-analytics-preferences { width: 100%; padding: 16px 0; font-size: 14px; }
.emg-analytics-preferences button {
  appearance: none;
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.emg-analytics-panel :focus-visible,
.emg-analytics-preferences button:focus-visible { outline: 3px solid #a66b24; outline-offset: 4px; }
.emg-analytics-panel ::selection { background: #d3e7d9; color: #193d34; }
@media (max-width: 700px) {
  .emg-analytics-panel {
    inset-inline: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-height: calc(100dvh - 110px - env(safe-area-inset-bottom));
    padding: 18px;
  }
  .emg-analytics-panel h2 { font-size: 18px; }
  .emg-analytics-choices { gap: 10px; }
  .emg-analytics-choice { padding-inline: 9px; }
}
@media (max-width: 359px) {
  .emg-analytics-choices { grid-template-columns: 1fr; }
}
