.shop-support {
  --support-inset: clamp(.85rem, 2.35vw, 2rem);
  position: fixed;
  z-index: 10;
  right: max(var(--support-inset), env(safe-area-inset-right, 0px));
  bottom: calc(var(--support-inset) + env(safe-area-inset-bottom, 0px));
  color: #233a2b;
  font: 500 .94rem/1.4 var(--sans, Arial, sans-serif);
}

.shop-support-toggle {
  display: inline-flex;
  min-height: 48px;
  min-width: 48px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .65rem 1.05rem;
  border: 1px solid #fcfaee70;
  border-radius: 2rem;
  background: #263d30;
  box-shadow: 0 .23rem .85rem #1c30243b;
  color: #fffaf0;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.shop-support-toggle::marker {content: "";}
.shop-support-toggle::-webkit-details-marker {display: none;}
.shop-support-toggle svg {width: 23px; height: 23px; flex: none;}

.shop-support-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .55rem);
  width: min(20rem, calc(100vw - 2 * var(--support-inset) - env(safe-area-inset-right, 0px) - env(safe-area-inset-left, 0px)));
  max-height: calc(100vh - var(--header-h, 4.75rem) - 5.75rem);
  max-height: calc(100dvh - var(--header-h, 4.75rem) - 5.75rem - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: .95rem 1rem 1rem;
  border: 1px solid #aeb9a3;
  border-radius: 1.1rem 1.1rem .35rem 1.1rem;
  background: #faf8f2;
  box-shadow: 0 .9rem 2.8rem #1e35232e, 0 .13rem .5rem #223a2621;
}

.shop-support-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
}

.shop-support-heading h2 {
  margin: 0;
  font: 500 clamp(1.35rem, 3.4vw, 1.55rem)/1.16 var(--serif, Georgia, serif);
  color: #263d30;
  letter-spacing: -.025em;
}

.shop-support-dismiss {
  display: grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #405344;
}

.shop-support-dismiss[hidden] {display: none;}
.shop-support-dismiss svg {width: 18px; height: 18px;}

.shop-support-channels {display: grid; gap: .4rem;}
.shop-support-channels a {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  min-height: 49px;
  align-items: center;
  gap: .55rem;
  padding: .35rem .85rem .35rem .55rem;
  border: 1px solid #d6dacb;
  border-radius: .6rem;
  background: #f0f1e7;
  color: #243b2c;
  text-decoration: none;
  font-weight: 600;
}
.shop-support-channel-mark {width: 26px; height: 26px; justify-self: center;}
.shop-support-arrow {font-size: 1.1rem; line-height: 1; font-weight: 400;}
.shop-support :is(a, button, summary):focus-visible {
  outline: 3px solid #8e511e;
  outline-offset: 2px;
}

body.dialog-open .shop-support,
body:has(dialog[open]) .shop-support,
body:has(.mobile-menu[open]) .shop-support {visibility: hidden;}

@media (hover: hover) {
  .shop-support-toggle:hover {background: #38543f;}
  .shop-support-channels a:hover, .shop-support-dismiss:hover {background: #e6eadb;}
}

@media (max-width: 700px) {
  .shop-support-toggle {width: 48px; height: 48px; padding: 0;}
  .shop-support-toggle > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  body:has(.shop-toast.shown) .shop-support:not([open]) {visibility: hidden;}
  body:has(.shop-support) .footer-credit {padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));}
}

@media (prefers-reduced-motion: no-preference) {
  .shop-support-toggle, .shop-support-dismiss, .shop-support-channels a {transition: background-color .16s ease;}
}

@media (forced-colors: active) {
  .shop-support-toggle, .shop-support-panel, .shop-support-channels a {border: 1px solid ButtonText;}
}
