.ads-panel {
  position: fixed;
  z-index: 20;
  inset-inline: 0;
  bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  width: min(42rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 2rem);
  margin-inline: auto;
  overflow: auto;
  padding: .85rem 1rem;
  border: 1px solid #ded5d8;
  border-radius: .6rem;
  color: #2b2c30;
  background: #fffefd;
  box-shadow: 0 3px 12px rgb(77 51 73 / 10%);
  font: .875rem/1.5 Poppins, sans-serif;
}
.ads-panel[hidden], .ads-panel [hidden] { display: none; }
.ads-panel h2 {
  margin: 0 0 .25rem;
  color: #4d3349;
  font: 700 1rem/1.4 Poppins, sans-serif;
}
.ads-panel p { margin: 0 0 .45rem; }
.ads-links { color: #4d3349; }
.ads-panel a { color: #4d3349; text-decoration: underline; }
.ads-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem;
}
.ads-option { margin-bottom: .6rem; }
.ads-option label { cursor: pointer; }
.ads-option input { accent-color: #4d3349; }
.ads-option p { margin: .25rem 0 0; }
.ads-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.ads-choices button {
  min-height: 44px;
  padding: .35rem .5rem;
  border: 1px solid #4d3349;
  border-radius: .4rem;
  color: #4d3349;
  background: #fffefd;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ads-choices button:hover { background: #f2e9ef; }
.ads-settings {
  padding: .1rem;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.ads-choices button:focus-visible, .ads-settings:focus-visible, .ads-panel a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
body:has(.ads-panel:not([hidden])) { padding-bottom: 10rem; }
body:has(dialog[open]) .ads-panel { visibility: hidden; }
@media (max-width: 36rem) {
  .ads-panel { padding: .7rem .8rem; }
  body:has(.ads-panel:not([hidden])) { padding-bottom: 12rem; }
}
